pub enum Event {
Exit,
WindowClosed {
window_id: u64,
},
WindowResized {
window_id: u64,
width: u32,
height: u32,
},
WindowMoved {
window_id: u64,
x: i32,
y: i32,
},
WindowFocused {
window_id: u64,
},
WindowUnfocused {
window_id: u64,
},
FileDrop {
window_id: u64,
paths: Vec<String>,
},
Custom {
name: String,
data: Value,
},
}Expand description
Events that can occur in the application lifecycle.
Variants§
Exit
Application is about to exit
WindowClosed
Window was closed
WindowResized
Window was resized
WindowMoved
Window was moved
WindowFocused
Window gained focus
WindowUnfocused
Window lost focus
FileDrop
File was dropped on the window
Custom
Custom event from the renderer
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Event
impl<'de> Deserialize<'de> for Event
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Event
impl RefUnwindSafe for Event
impl Send for Event
impl Sync for Event
impl Unpin for Event
impl UnsafeUnpin for Event
impl UnwindSafe for Event
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more