pub enum Event {
CursorEntered,
CursorLeft,
CursorMoved {
position: Point,
},
ButtonPressed(Button),
ButtonReleased(Button),
WheelScrolled {
delta: ScrollDelta,
},
}
Expand description
A mouse event.
Note: This type is largely incomplete! If you need to track additional events, feel free to open an issue and share your use case!
Variants
CursorEntered
The mouse cursor entered the window.
CursorLeft
The mouse cursor left the window.
CursorMoved
Fields
position: Point
The new position of the mouse cursor
The mouse cursor was moved
ButtonPressed(Button)
A mouse button was pressed.
ButtonReleased(Button)
A mouse button was released.
WheelScrolled
Fields
delta: ScrollDelta
The scroll movement.
The mouse wheel was scrolled.
Trait Implementations
impl Copy for Event
impl StructuralPartialEq for Event
Auto Trait Implementations
impl RefUnwindSafe for Event
impl Send for Event
impl Sync for Event
impl Unpin for Event
impl UnwindSafe for Event
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more