pub enum WindowEvent {
Show 18 variants
Resized(WindowId, u32, u32, f32),
SafeAreaChanged(WindowId, SafeAreaInsets),
ThemeChanged(WindowId, ThemeMode),
Focused(WindowId, bool),
CloseRequested(WindowId),
PointerDown(WindowId, PointerEvent),
PointerMove(WindowId, PointerEvent),
PointerUp(WindowId, PointerEvent),
PointerCancel(WindowId, u64),
Scroll(WindowId, Point),
KeyDown(WindowId, KeyEvent),
KeyUp(WindowId, KeyEvent),
TextInput(WindowId, String),
Ime(WindowId, ImeEvent),
Lifecycle(LifecycleEvent),
RedrawRequested(WindowId),
DeepLink(DeepLinkEvent),
System(SystemEvent),
}Expand description
Complete unified platform window event dispatched to the application loop.
Variants§
Resized(WindowId, u32, u32, f32)
Window logical and physical dimensions changed.
SafeAreaChanged(WindowId, SafeAreaInsets)
Safe-area insets updated (rotation, Stage Manager, virtual keyboard).
ThemeChanged(WindowId, ThemeMode)
OS light/dark appearance toggled.
Focused(WindowId, bool)
Window gained or lost focus.
CloseRequested(WindowId)
OS requested window closure.
PointerDown(WindowId, PointerEvent)
Pointer pressed down.
PointerMove(WindowId, PointerEvent)
Pointer moved.
PointerUp(WindowId, PointerEvent)
Pointer released.
PointerCancel(WindowId, u64)
Pointer gesture cancelled by OS.
Scroll(WindowId, Point)
Scroll wheel / trackpad / pan delta.
KeyDown(WindowId, KeyEvent)
Keyboard key pressed.
KeyUp(WindowId, KeyEvent)
Keyboard key released.
TextInput(WindowId, String)
Direct UTF-8 text input event.
Ime(WindowId, ImeEvent)
IME composition lifecycle event.
Lifecycle(LifecycleEvent)
Application lifecycle transition.
RedrawRequested(WindowId)
Platform requests a fresh rendered frame.
DeepLink(DeepLinkEvent)
Operating system delivered a custom-scheme or universal deep link URI.
System(SystemEvent)
Normalized cross-platform system or lifecycle event.
Trait Implementations§
Source§impl Clone for WindowEvent
impl Clone for WindowEvent
Source§impl Debug for WindowEvent
impl Debug for WindowEvent
Source§impl PartialEq for WindowEvent
impl PartialEq for WindowEvent
impl StructuralPartialEq for WindowEvent
Auto Trait Implementations§
impl Forget for WindowEvent
impl Freeze for WindowEvent
impl Move for WindowEvent
impl RefUnwindSafe for WindowEvent
impl Send for WindowEvent
impl Sync for WindowEvent
impl Unpin for WindowEvent
impl UnsafeUnpin for WindowEventwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<(String, String)>: UnsafeUnpin,
impl UnwindSafe for WindowEvent
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