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.