Enum bracket_terminal::prelude::BEvent
source · [−]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
Fields
new_position: Point
The window was moved
CloseRequested
The window has requested that it be closed
Character
Fields
c: char
A character was input
Focused
Fields
focused: bool
The window gained or lost focus
CursorEntered
The mouse cursor entered the window
CursorLeft
The mouse cursor left the window
CursorMoved
Fields
position: Point
The mouse cursor moved
MouseClick
A mouse button was pressed or released
MouseButtonDown
Fields
Mouse button is down
MouseButtonUp
Fields
Mouse button is up
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 RefUnwindSafe for BEvent
impl Send for BEvent
impl Sync for BEvent
impl Unpin for BEvent
impl UnwindSafe for BEvent
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