Skip to main content

MouseInterface

Trait MouseInterface 

Source
pub trait MouseInterface {
    // Required methods
    fn set_buttons(&mut self, buttons: MouseButtons);
    fn get_buttons(&self) -> MouseButtons;
    fn move_mouse(&mut self, mov: MouseMovement);
}
Expand description

An interface for providing user input data for a MouseDevice implementation.

Required Methods§

Source

fn set_buttons(&mut self, buttons: MouseButtons)

Sets the state of all mouse buttons.

Source

fn get_buttons(&self) -> MouseButtons

Returns a state of all mouse buttons.

Source

fn move_mouse(&mut self, mov: MouseMovement)

Moves the mouse by the given interval.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§