pub enum BEvent {
Show 13 variants
Resized {
new_size: Point,
dpi_scale_factor: f32,
},
Moved {
new_position: Point,
},
CloseRequested,
Character {
c: char,
},
Focused {
focused: bool,
},
CursorEntered,
CursorLeft,
CursorMoved {
position: Point,
},
MouseClick {
button: usize,
pressed: bool,
},
MouseButtonDown {
button: usize,
},
MouseButtonUp {
button: usize,
},
KeyboardInput {
key: VirtualKeyCode,
scan_code: u32,
pressed: bool,
},
ScaleFactorChanged {
new_size: Point,
dpi_scale_factor: f32,
},
}
Expand description
Available device events
Variants§
Resized
The window was resized
Moved
The window was moved
CloseRequested
The window has requested that it be closed
Character
A character was input
Focused
The window gained or lost focus
CursorEntered
The mouse cursor entered the window
CursorLeft
The mouse cursor left the window
CursorMoved
The mouse cursor moved
MouseClick
A mouse button was pressed or released
MouseButtonDown
Mouse button is down
Fields
MouseButtonUp
Mouse button is up
Fields
KeyboardInput
A key on the keyboard was pressed or released.
ScaleFactorChanged
The window’s scale factor was changed. You generally don’t need to do anything for this, unless you are working with pixel coordinates.
Trait Implementations§
impl StructuralPartialEq for BEvent
Auto Trait Implementations§
impl Freeze for BEvent
impl RefUnwindSafe for BEvent
impl Send for BEvent
impl Sync for BEvent
impl Unpin for BEvent
impl UnwindSafe for BEvent
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