pub enum Mouse {
Moved {
x: f64,
y: f64,
dx: f64,
dy: f64,
device_id: u32,
},
Scrolled {
device_id: u32,
},
Pressed {
x: f64,
y: f64,
button: Button,
device_id: u32,
},
Released {
x: f64,
y: f64,
button: Button,
device_id: u32,
},
LeftWindow {
device_id: u32,
},
EnteredWindow {
device_id: u32,
},
}
Expand description
Mouse events are generated in response to mouse events coming from the windowing system. The coordinates are in logical pixels.
Variants§
Moved
Emitted when the mouse cursor is moved within the window.
Scrolled
Emitted when the mouse wheel is scrolled.
Pressed
Emitted when a mouse button is pressed.
Released
Emitted when a mouse button is released.
LeftWindow
Emitted when the mouse cursor leaves the window.
EnteredWindow
Emitted when the mouse cursor enters the window.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Mouse
impl RefUnwindSafe for Mouse
impl Send for Mouse
impl Sync for Mouse
impl Unpin for Mouse
impl UnwindSafe for Mouse
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