[][src]Struct ps2_mouse::MouseState

pub struct MouseState { /* fields omitted */ }

A snapshot of the mouse flags, x delta and y delta.

Implementations

impl MouseState[src]

pub const fn new() -> MouseState[src]

Returns a new MouseState.

pub fn left_button_down(&self) -> bool[src]

Returns true if the left mouse button is currently down.

pub fn left_button_up(&self) -> bool[src]

Returns true if the left mouse button is currently up.

pub fn right_button_down(&self) -> bool[src]

Returns true if the right mouse button is currently down.

pub fn right_button_up(&self) -> bool[src]

Returns true if the right mouse button is currently up.

pub fn x_moved(&self) -> bool[src]

Returns true if the x axis has moved.

pub fn y_moved(&self) -> bool[src]

Returns true if the y axis has moved.

pub fn moved(&self) -> bool[src]

Returns true if the x or y axis has moved.

pub fn get_x(&self) -> i16[src]

Returns the x delta of the mouse state.

pub fn get_y(&self) -> i16[src]

Returns the y delta of the mouse state.

Trait Implementations

impl Clone for MouseState[src]

impl Copy for MouseState[src]

impl Debug for MouseState[src]

impl Default for MouseState[src]

Auto Trait Implementations

impl Send for MouseState

impl Sync for MouseState

impl Unpin for MouseState

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.