[][src]Enum monome::MonomeEvent

pub enum MonomeEvent {
    GridKey {
        x: i32,
        y: i32,
        direction: KeyDirection,
    },
    Tilt {
        n: i32,
        x: i32,
        y: i32,
        z: i32,
    },
    EncoderDelta {
        n: usize,
        delta: i32,
    },
    EncoderKey {
        n: usize,
        direction: KeyDirection,
    },
}

An event received from a monome device. This can be either a key press or release, a tilt event, an encoder rotation event, or an encoder press or release.

Variants

GridKey

A key press or release

Fields of GridKey

x: i32

The horizontal offset at which the key has been pressed.

y: i32

The vertical offset at which the key has been pressed.

direction: KeyDirection

Whether the key has been pressed (Down), or released (Up).

Tilt

A update about the tilt of this device.

Fields of Tilt

n: i32

Which sensor sent this tilt update.

x: i32

The pitch of this device.

y: i32

The roll of this device.

z: i32

The yaw of this device.

EncoderDelta

An encoder delta information

Fields of EncoderDelta

n: usize

Which encoder is sending the event.

delta: i32

The delta of this movement on this encoder.

EncoderKey

A key press on an encoder (only available on some older devices).

Fields of EncoderKey

n: usize

Which encoder is sending the event.

direction: KeyDirection

Whether the encoder key has been pressed (Down), or released (Up).

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, 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.