Mouse

Trait Mouse 

Source
pub trait Mouse {
    // Required methods
    fn press(&self, button: MouseButton) -> bool;
    fn release(&self, button: MouseButton) -> bool;
    fn is_pressed(&self, button: MouseButton) -> bool;
    fn move_to(&self, x: u16, y: u16, display_index: Option<usize>) -> bool;
    fn get_position(&self) -> MousePosition;

    // Provided method
    fn is_pressed_all(&self, buttons: Vec<MouseButton>) -> Vec<bool> { ... }
}

Required Methods§

Source

fn press(&self, button: MouseButton) -> bool

Source

fn release(&self, button: MouseButton) -> bool

Source

fn is_pressed(&self, button: MouseButton) -> bool

Source

fn move_to(&self, x: u16, y: u16, display_index: Option<usize>) -> bool

Source

fn get_position(&self) -> MousePosition

Provided Methods§

Source

fn is_pressed_all(&self, buttons: Vec<MouseButton>) -> Vec<bool>

Implementors§