pub enum PlatformEvent {
Show 28 variants
WindowCreated,
WindowResized {
width: u32,
height: u32,
},
WindowMoved {
x: i32,
y: i32,
},
WindowFocused(bool),
WindowCloseRequested,
WindowDestroyed,
RedrawRequested,
PointerEntered,
PointerLeft,
PointerMoved {
x: f64,
y: f64,
},
PointerDown {
x: f64,
y: f64,
button: MouseButton,
},
PointerUp {
x: f64,
y: f64,
button: MouseButton,
},
TouchStart {
id: u64,
x: f64,
y: f64,
},
TouchMove {
id: u64,
x: f64,
y: f64,
},
TouchEnd {
id: u64,
x: f64,
y: f64,
},
TouchCancel {
id: u64,
},
Scroll {
dx: f64,
dy: f64,
},
KeyDown {
key: KeyCode,
modifiers: ModifierKeys,
},
KeyUp {
key: KeyCode,
modifiers: ModifierKeys,
},
TextInput {
text: String,
},
ModifiersChanged {
modifiers: ModifierKeys,
},
ClipboardPaste {
text: String,
},
FileDropped {
path: PathBuf,
},
FileHovered {
path: PathBuf,
},
FileCancelled,
Ime(ImeEvent),
ThemeChanged {
dark_mode: bool,
},
ScaleFactorChanged {
scale: f64,
},
}Variants§
WindowCreated
WindowResized
WindowMoved
WindowFocused(bool)
WindowCloseRequested
WindowDestroyed
RedrawRequested
PointerEntered
PointerLeft
PointerMoved
PointerDown
PointerUp
TouchStart
TouchMove
TouchEnd
TouchCancel
Scroll
KeyDown
KeyUp
TextInput
ModifiersChanged
Fields
§
modifiers: ModifierKeysClipboardPaste
FileDropped
FileHovered
FileCancelled
Ime(ImeEvent)
ThemeChanged
ScaleFactorChanged
Trait Implementations§
Source§impl Clone for PlatformEvent
impl Clone for PlatformEvent
Source§fn clone(&self) -> PlatformEvent
fn clone(&self) -> PlatformEvent
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for PlatformEvent
impl RefUnwindSafe for PlatformEvent
impl Send for PlatformEvent
impl Sync for PlatformEvent
impl Unpin for PlatformEvent
impl UnsafeUnpin for PlatformEvent
impl UnwindSafe for PlatformEvent
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