Enum lambda::events::Mouse

source ·
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

Fields

§x: f64
§y: f64
§dx: f64
§dy: f64
§device_id: u32

Emitted when the mouse cursor is moved within the window.

§

Scrolled

Fields

§device_id: u32

Emitted when the mouse wheel is scrolled.

§

Pressed

Fields

§x: f64
§y: f64
§button: Button
§device_id: u32

Emitted when a mouse button is pressed.

§

Released

Fields

§x: f64
§y: f64
§button: Button
§device_id: u32

Emitted when a mouse button is released.

§

LeftWindow

Fields

§device_id: u32

Emitted when the mouse cursor leaves the window.

§

EnteredWindow

Fields

§device_id: u32

Emitted when the mouse cursor enters the window.

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.