Struct mterm::MouseState[][src]

pub struct MouseState {
    pub on_window: bool,
    pub primary_pressed: bool,
    pub secondary_pressed: bool,
    pub x: i32,
    pub y: i32,
}
Expand description

Provides information about the position of the mouse pointer, its buttons and scroll wheel.

Fields

on_window: bool

True if the mouse pointer is currently on the application window.

primary_pressed: bool

True if the mouse’s primary mouse button was clicked.

secondary_pressed: bool

True if the mouse’s secondary mouse button was clicked.

x: i32

The X coordinate of the mouse pointer, relative to the top left corner of the application window.

y: i32

The Y coordinate of the mouse pointer, relative to the top left corner of the application window.

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

Performs the conversion.

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. 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.