Union fermium::events::SDL_Event

source ·
#[repr(C)]
pub union SDL_Event {
Show 31 fields pub type_: SDL_EventType, pub common: SDL_CommonEvent, pub display: SDL_DisplayEvent, pub window: SDL_WindowEvent, pub key: SDL_KeyboardEvent, pub edit: SDL_TextEditingEvent, pub text: SDL_TextInputEvent, pub motion: SDL_MouseMotionEvent, pub button: SDL_MouseButtonEvent, pub wheel: SDL_MouseWheelEvent, pub jaxis: SDL_JoyAxisEvent, pub jball: SDL_JoyBallEvent, pub jhat: SDL_JoyHatEvent, pub jbutton: SDL_JoyButtonEvent, pub jdevice: SDL_JoyDeviceEvent, pub caxis: SDL_ControllerAxisEvent, pub cbutton: SDL_ControllerButtonEvent, pub cdevice: SDL_ControllerDeviceEvent, pub ctouchpad: SDL_ControllerTouchpadEvent, pub csensor: SDL_ControllerSensorEvent, pub adevice: SDL_AudioDeviceEvent, pub sensor: SDL_SensorEvent, pub quit: SDL_QuitEvent, pub user: SDL_UserEvent, pub syswm: SDL_SysWMEvent, pub tfinger: SDL_TouchFingerEvent, pub mgesture: SDL_MultiGestureEvent, pub dgesture: SDL_DollarGestureEvent, pub drop: SDL_DropEvent, pub padding: [u8; 56], pub force_align: [u64; 7],
}
Expand description

General event structure

Fields

type_: SDL_EventTypecommon: SDL_CommonEventdisplay: SDL_DisplayEventwindow: SDL_WindowEventkey: SDL_KeyboardEventedit: SDL_TextEditingEventtext: SDL_TextInputEventmotion: SDL_MouseMotionEventbutton: SDL_MouseButtonEventwheel: SDL_MouseWheelEventjaxis: SDL_JoyAxisEventjball: SDL_JoyBallEventjhat: SDL_JoyHatEventjbutton: SDL_JoyButtonEventjdevice: SDL_JoyDeviceEventcaxis: SDL_ControllerAxisEventcbutton: SDL_ControllerButtonEventcdevice: SDL_ControllerDeviceEventctouchpad: SDL_ControllerTouchpadEventcsensor: SDL_ControllerSensorEventadevice: SDL_AudioDeviceEventsensor: SDL_SensorEventquit: SDL_QuitEventuser: SDL_UserEventsyswm: SDL_SysWMEventtfinger: SDL_TouchFingerEventmgesture: SDL_MultiGestureEventdgesture: SDL_DollarGestureEventdrop: SDL_DropEventpadding: [u8; 56]force_align: [u64; 7]

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Returns the “default value” for a type. 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 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.