Enum embedded_graphics_simulator::SimulatorEvent[][src]

pub enum SimulatorEvent {
    KeyUp {
        keycode: Keycode,
        keymod: Mod,
        repeat: bool,
    },
    KeyDown {
        keycode: Keycode,
        keymod: Mod,
        repeat: bool,
    },
    MouseButtonUp {
        mouse_btn: MouseButton,
        point: Point,
    },
    MouseButtonDown {
        mouse_btn: MouseButton,
        point: Point,
    },
    MouseWheel {
        scroll_delta: Point,
        direction: MouseWheelDirection,
    },
    MouseMove {
        point: Point,
    },
    Quit,
}

A derivation of sdl2::event::Event mapped to embedded-graphics coordinates

Variants

KeyUp

A keypress event, fired on keyUp

Show fields

Fields of KeyUp

keycode: Keycode

The key being released

keymod: Mod

Any modifier being held at the time of keyup

repeat: bool

Whether the key is repeating

KeyDown

A keypress event, fired on keyDown

Show fields

Fields of KeyDown

keycode: Keycode

The key being pressed

keymod: Mod

Any modifier being held at the time of keydown

repeat: bool

Whether the key is repeating

MouseButtonUp

A mouse click event, fired on mouseUp

Show fields

Fields of MouseButtonUp

mouse_btn: MouseButton

The mouse button being released

point: Point

The location of the mouse in Simulator coordinates

MouseButtonDown

A mouse click event, fired on mouseDown

Show fields

Fields of MouseButtonDown

mouse_btn: MouseButton

The mouse button being pressed

point: Point

The location of the mouse in Simulator coordinates

MouseWheel

A mouse wheel event

Show fields

Fields of MouseWheel

scroll_delta: Point

The scroll wheel delta in the x and y direction

direction: MouseWheelDirection

The directionality of the scroll (normal or flipped)

MouseMove

Mouse move event

Show fields

Fields of MouseMove

point: Point

The current mouse position

Quit

An exit event

Trait Implementations

impl Clone for SimulatorEvent[src]

impl Copy for SimulatorEvent[src]

impl Debug for SimulatorEvent[src]

impl Eq for SimulatorEvent[src]

impl PartialEq<SimulatorEvent> for SimulatorEvent[src]

impl StructuralEq for SimulatorEvent[src]

impl StructuralPartialEq for SimulatorEvent[src]

Auto Trait Implementations

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> Pointable for T

type Init = T

The type for initializers.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.