Enum basalt::input::InputEvent
source · [−]pub enum InputEvent {
Press {
win: BstWindowID,
key: Key,
},
Release {
win: BstWindowID,
key: Key,
},
Character {
win: BstWindowID,
c: char,
},
Cursor {
win: BstWindowID,
x: f32,
y: f32,
},
Scroll {
win: BstWindowID,
v: f32,
h: f32,
},
Enter {
win: BstWindowID,
},
Leave {
win: BstWindowID,
},
Focus {
win: BstWindowID,
},
FocusLost {
win: BstWindowID,
},
Motion {
x: f32,
y: f32,
},
CursorCapture {
win: BstWindowID,
captured: bool,
},
}
Expand description
An event that Input
should process.
Notes
- This type should only be used externally when using a custom window implementation.
Variants
Press
Release
Character
Cursor
Scroll
Enter
Fields
win: BstWindowID
Leave
Fields
win: BstWindowID
Focus
Fields
win: BstWindowID
FocusLost
Fields
win: BstWindowID
Motion
CursorCapture
Trait Implementations
sourceimpl Clone for InputEvent
impl Clone for InputEvent
sourcefn clone(&self) -> InputEvent
fn clone(&self) -> InputEvent
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations
impl RefUnwindSafe for InputEvent
impl Send for InputEvent
impl Sync for InputEvent
impl Unpin for InputEvent
impl UnwindSafe for InputEvent
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more