Add window::Event::Resized
to iced_native
This commit is contained in:
parent
0a83024505
commit
7ab6ed7ef9
@ -1,4 +1,7 @@
|
|||||||
use crate::input::{keyboard, mouse};
|
use crate::{
|
||||||
|
input::{keyboard, mouse},
|
||||||
|
window,
|
||||||
|
};
|
||||||
|
|
||||||
/// A user interface event.
|
/// A user interface event.
|
||||||
///
|
///
|
||||||
@ -13,4 +16,7 @@ pub enum Event {
|
|||||||
|
|
||||||
/// A mouse event
|
/// A mouse event
|
||||||
Mouse(mouse::Event),
|
Mouse(mouse::Event),
|
||||||
|
|
||||||
|
/// A window event
|
||||||
|
Window(window::Event),
|
||||||
}
|
}
|
||||||
|
@ -44,6 +44,7 @@ pub mod layout;
|
|||||||
pub mod renderer;
|
pub mod renderer;
|
||||||
pub mod subscription;
|
pub mod subscription;
|
||||||
pub mod widget;
|
pub mod widget;
|
||||||
|
pub mod window;
|
||||||
|
|
||||||
mod clipboard;
|
mod clipboard;
|
||||||
mod element;
|
mod element;
|
||||||
|
4
native/src/window.rs
Normal file
4
native/src/window.rs
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
//! Build window-based GUI applications.
|
||||||
|
mod event;
|
||||||
|
|
||||||
|
pub use event::Event;
|
12
native/src/window/event.rs
Normal file
12
native/src/window/event.rs
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
/// A window-related event.
|
||||||
|
#[derive(PartialEq, Clone, Copy, Debug)]
|
||||||
|
pub enum Event {
|
||||||
|
/// A window was resized
|
||||||
|
Resized {
|
||||||
|
/// The new width of the window (in units)
|
||||||
|
width: u32,
|
||||||
|
|
||||||
|
/// The new height of the window (in units)
|
||||||
|
height: u32,
|
||||||
|
},
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user