pub enum WireEvent {
CursorMoved {
position: Point,
},
CursorEntered,
CursorLeft,
ButtonPressed {
button: WireButton,
},
ButtonReleased {
button: WireButton,
},
WheelScrolled {
delta: WireScrollDelta,
},
KeyPressed {
key: WireKey,
modified_key: WireKey,
physical_key: WirePhysicalKey,
location: WireLocation,
modifiers: WireModifiers,
text: Option<String>,
repeat: bool,
},
KeyReleased {
key: WireKey,
modified_key: WireKey,
physical_key: WirePhysicalKey,
location: WireLocation,
modifiers: WireModifiers,
},
ModifiersChanged {
modifiers: WireModifiers,
},
WindowFocused,
WindowUnfocused,
}Expand description
One input event.
Variants§
CursorMoved
The pointer moved to a position in logical window coordinates.
CursorEntered
The pointer entered the window.
CursorLeft
The pointer left the window.
ButtonPressed
A mouse button went down.
Fields
Which one.
ButtonReleased
A mouse button came up.
Fields
Which one.
WheelScrolled
The wheel or a touchpad scrolled.
Fields
§
delta: WireScrollDeltaBy how much.
KeyPressed
A key went down.
Fields
§
physical_key: WirePhysicalKeyThe physical key.
§
location: WireLocationWhere on the keyboard it is.
§
modifiers: WireModifiersThe modifiers held.
KeyReleased
A key came up.
Fields
§
physical_key: WirePhysicalKeyThe physical key.
§
location: WireLocationWhere on the keyboard it is.
§
modifiers: WireModifiersThe modifiers held.
ModifiersChanged
The held modifiers changed.
Fields
§
modifiers: WireModifiersThe modifiers held now.
WindowFocused
The window gained focus.
WindowUnfocused
The window lost focus.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for WireEvent
impl<'de> Deserialize<'de> for WireEvent
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
impl StructuralPartialEq for WireEvent
Auto Trait Implementations§
impl Forget for WireEvent
impl Freeze for WireEvent
impl Move for WireEvent
impl RefUnwindSafe for WireEvent
impl Send for WireEventwhere
RawVecInner: Send,
impl Sync for WireEventwhere
RawVecInner: Sync,
impl Unpin for WireEvent
impl UnsafeUnpin for WireEvent
impl UnwindSafe for WireEventwhere
RawVecInner: UnwindSafe,
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