pub enum PlatformEvent {
Show 28 variants
WindowResized {
width: u32,
height: u32,
},
WindowMoved {
x: i32,
y: i32,
},
WindowCloseRequested,
WindowFocused(bool),
WindowMaximized(bool),
ScaleFactorChanged {
scale_factor: f32,
},
ThemeChanged(ThemeMode),
RedrawRequested,
AnimationTick,
MouseMove {
x: f32,
y: f32,
},
MouseDown {
button: MouseButton,
x: f32,
y: f32,
},
MouseUp {
button: MouseButton,
x: f32,
y: f32,
},
DoubleClick {
button: MouseButton,
x: f32,
y: f32,
},
Scroll {
delta_x: f32,
delta_y: f32,
is_momentum: bool,
},
CursorEntered,
CursorLeft,
KeyDown {
key: KeyCode,
modifiers: Modifiers,
},
KeyUp {
key: KeyCode,
modifiers: Modifiers,
},
ReceivedCharacter(char),
ImePreedit {
text: String,
cursor: Option<(usize, usize)>,
},
ImeCommit(String),
ImeDeleteSurrounding {
offset: i32,
n_chars: u32,
},
Touch {
touch_id: u64,
phase: TouchPhase,
x: f32,
y: f32,
},
Stylus {
phase: StylusPhase,
pointer_id: u64,
tool: PointerKind,
x: f32,
y: f32,
pressure: f32,
tilt_x: f32,
tilt_y: f32,
twist: f32,
tangential_pressure: f32,
hovering: bool,
buttons: u16,
},
FileDrop(Vec<PathBuf>),
TrayIconClicked,
TrayMenuItemClicked(u64),
SingleInstanceTriggered(Vec<String>),
}Expand description
Native platform event emitted to the Strata event loop.
Variants§
WindowResized
WindowMoved
WindowCloseRequested
WindowFocused(bool)
WindowMaximized(bool)
Emitted when the window enters or leaves the maximized state.
ScaleFactorChanged
ThemeChanged(ThemeMode)
RedrawRequested
AnimationTick
Periodic VSync display frame animation tick for physics and inertial kinetic scrolling.
MouseMove
MouseDown
MouseUp
DoubleClick
Scroll
CursorEntered
CursorLeft
KeyDown
KeyUp
ReceivedCharacter(char)
ImePreedit
ImeCommit(String)
ImeDeleteSurrounding
Touch
Stylus
FileDrop(Vec<PathBuf>)
TrayIconClicked
TrayMenuItemClicked(u64)
SingleInstanceTriggered(Vec<String>)
Trait Implementations§
Source§impl Clone for PlatformEvent
impl Clone for PlatformEvent
Source§impl Debug for PlatformEvent
impl Debug for PlatformEvent
Source§impl PartialEq for PlatformEvent
impl PartialEq for PlatformEvent
impl StructuralPartialEq for PlatformEvent
Auto Trait Implementations§
impl Forget for PlatformEvent
impl Freeze for PlatformEvent
impl Move 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