Enum allegro::events::Event

source ·
pub enum Event {
Show 17 variants NoEvent, DisplayClose { source: *mut ALLEGRO_EVENT_SOURCE, timestamp: f64, }, DisplayResize { source: *mut ALLEGRO_EVENT_SOURCE, x: i32, y: i32, width: i32, height: i32, timestamp: f64, }, JoystickAxes { source: *mut ALLEGRO_EVENT_SOURCE, timestamp: f64, id: *mut ALLEGRO_JOYSTICK, stick: i32, axis: i32, pos: f32, }, JoystickButtonDown { source: *mut ALLEGRO_EVENT_SOURCE, timestamp: f64, id: *mut ALLEGRO_JOYSTICK, button: i32, }, JoystickButtonUp { source: *mut ALLEGRO_EVENT_SOURCE, timestamp: f64, id: *mut ALLEGRO_JOYSTICK, button: i32, }, JoystickConfiguration { source: *mut ALLEGRO_EVENT_SOURCE, timestamp: f64, }, KeyDown { source: *mut ALLEGRO_EVENT_SOURCE, timestamp: f64, keycode: KeyCode, display: *mut ALLEGRO_DISPLAY, }, KeyUp { source: *mut ALLEGRO_EVENT_SOURCE, timestamp: f64, keycode: KeyCode, display: *mut ALLEGRO_DISPLAY, }, KeyChar { source: *mut ALLEGRO_EVENT_SOURCE, timestamp: f64, keycode: KeyCode, display: *mut ALLEGRO_DISPLAY, unichar: char, repeat: bool, modifiers: KeyModifier, }, MouseAxes { source: *mut ALLEGRO_EVENT_SOURCE, timestamp: f64, x: i32, y: i32, z: i32, w: i32, dx: i32, dy: i32, dz: i32, dw: i32, display: *mut ALLEGRO_DISPLAY, }, MouseButtonDown { source: *mut ALLEGRO_EVENT_SOURCE, timestamp: f64, x: i32, y: i32, z: i32, w: i32, button: u32, display: *mut ALLEGRO_DISPLAY, }, MouseButtonUp { source: *mut ALLEGRO_EVENT_SOURCE, timestamp: f64, x: i32, y: i32, z: i32, w: i32, button: u32, display: *mut ALLEGRO_DISPLAY, }, MouseWarped { source: *mut ALLEGRO_EVENT_SOURCE, timestamp: f64, x: i32, y: i32, z: i32, w: i32, dx: i32, dy: i32, dz: i32, dw: i32, display: *mut ALLEGRO_DISPLAY, }, MouseEnterDisplay { source: *mut ALLEGRO_EVENT_SOURCE, timestamp: f64, x: i32, y: i32, z: i32, w: i32, display: *mut ALLEGRO_DISPLAY, }, MouseLeaveDisplay { source: *mut ALLEGRO_EVENT_SOURCE, timestamp: f64, x: i32, y: i32, z: i32, w: i32, display: *mut ALLEGRO_DISPLAY, }, TimerTick { source: *mut ALLEGRO_EVENT_SOURCE, timestamp: f64, count: i64, },
}

Variants

NoEvent

DisplayClose

Fields

timestamp: f64

DisplayResize

Fields

x: i32
y: i32
width: i32
height: i32
timestamp: f64

JoystickAxes

Fields

timestamp: f64
stick: i32
axis: i32
pos: f32

JoystickButtonDown

Fields

timestamp: f64
button: i32

JoystickButtonUp

Fields

timestamp: f64
button: i32

JoystickConfiguration

Fields

timestamp: f64

KeyDown

Fields

timestamp: f64
keycode: KeyCode

KeyUp

Fields

timestamp: f64
keycode: KeyCode

KeyChar

Fields

timestamp: f64
keycode: KeyCode
unichar: char
repeat: bool
modifiers: KeyModifier

MouseAxes

Fields

timestamp: f64
x: i32
y: i32
z: i32
w: i32
dx: i32
dy: i32
dz: i32
dw: i32

MouseButtonDown

Fields

timestamp: f64
x: i32
y: i32
z: i32
w: i32
button: u32

MouseButtonUp

Fields

timestamp: f64
x: i32
y: i32
z: i32
w: i32
button: u32

MouseWarped

Fields

timestamp: f64
x: i32
y: i32
z: i32
w: i32
dx: i32
dy: i32
dz: i32
dw: i32

MouseEnterDisplay

Fields

timestamp: f64
x: i32
y: i32
z: i32
w: i32

MouseLeaveDisplay

Fields

timestamp: f64
x: i32
y: i32
z: i32
w: i32

TimerTick

Fields

timestamp: f64
count: i64

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.