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_EventType § common:SDL_CommonEvent § display:SDL_DisplayEvent § window:SDL_WindowEvent § key:SDL_KeyboardEvent § edit:SDL_TextEditingEvent § text:SDL_TextInputEvent § motion:SDL_MouseMotionEvent § button:SDL_MouseButtonEvent § wheel:SDL_MouseWheelEvent § jaxis:SDL_JoyAxisEvent § jball:SDL_JoyBallEvent § jhat:SDL_JoyHatEvent § jbutton:SDL_JoyButtonEvent § jdevice:SDL_JoyDeviceEvent § caxis:SDL_ControllerAxisEvent § cbutton:SDL_ControllerButtonEvent § cdevice:SDL_ControllerDeviceEvent § ctouchpad:SDL_ControllerTouchpadEvent § csensor:SDL_ControllerSensorEvent § adevice:SDL_AudioDeviceEvent § sensor:SDL_SensorEvent § quit:SDL_QuitEvent § user:SDL_UserEvent § syswm:SDL_SysWMEvent § tfinger:SDL_TouchFingerEvent § mgesture:SDL_MultiGestureEvent § dgesture:SDL_DollarGestureEvent § drop:SDL_DropEvent § padding:[u8; 56] § force_align:[u64; 7]

Trait Implementations§

source§

impl Clone for SDL_Event

source§

fn clone(&self) -> SDL_Event

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Default for SDL_Event

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl Copy for SDL_Event

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

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

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.