#[repr(u32)]
pub enum SDL_EventType {
Show 57 variants SDL_FIRSTEVENT = 0, SDL_QUIT = 256, SDL_APP_TERMINATING = 257, SDL_APP_LOWMEMORY = 258, SDL_APP_WILLENTERBACKGROUND = 259, SDL_APP_DIDENTERBACKGROUND = 260, SDL_APP_WILLENTERFOREGROUND = 261, SDL_APP_DIDENTERFOREGROUND = 262, SDL_LOCALECHANGED = 263, SDL_DISPLAYEVENT = 336, SDL_WINDOWEVENT = 512, SDL_SYSWMEVENT = 513, SDL_KEYDOWN = 768, SDL_KEYUP = 769, SDL_TEXTEDITING = 770, SDL_TEXTINPUT = 771, SDL_KEYMAPCHANGED = 772, SDL_MOUSEMOTION = 1_024, SDL_MOUSEBUTTONDOWN = 1_025, SDL_MOUSEBUTTONUP = 1_026, SDL_MOUSEWHEEL = 1_027, SDL_JOYAXISMOTION = 1_536, SDL_JOYBALLMOTION = 1_537, SDL_JOYHATMOTION = 1_538, SDL_JOYBUTTONDOWN = 1_539, SDL_JOYBUTTONUP = 1_540, SDL_JOYDEVICEADDED = 1_541, SDL_JOYDEVICEREMOVED = 1_542, SDL_CONTROLLERAXISMOTION = 1_616, SDL_CONTROLLERBUTTONDOWN = 1_617, SDL_CONTROLLERBUTTONUP = 1_618, SDL_CONTROLLERDEVICEADDED = 1_619, SDL_CONTROLLERDEVICEREMOVED = 1_620, SDL_CONTROLLERDEVICEREMAPPED = 1_621, SDL_CONTROLLERTOUCHPADDOWN = 1_622, SDL_CONTROLLERTOUCHPADMOTION = 1_623, SDL_CONTROLLERTOUCHPADUP = 1_624, SDL_CONTROLLERSENSORUPDATE = 1_625, SDL_FINGERDOWN = 1_792, SDL_FINGERUP = 1_793, SDL_FINGERMOTION = 1_794, SDL_DOLLARGESTURE = 2_048, SDL_DOLLARRECORD = 2_049, SDL_MULTIGESTURE = 2_050, SDL_CLIPBOARDUPDATE = 2_304, SDL_DROPFILE = 4_096, SDL_DROPTEXT = 4_097, SDL_DROPBEGIN = 4_098, SDL_DROPCOMPLETE = 4_099, SDL_AUDIODEVICEADDED = 4_352, SDL_AUDIODEVICEREMOVED = 4_353, SDL_SENSORUPDATE = 4_608, SDL_RENDER_TARGETS_RESET = 8_192, SDL_RENDER_DEVICE_RESET = 8_193, SDL_POLLSENTINEL = 32_512, SDL_USEREVENT = 32_768, SDL_LASTEVENT = 65_535,
}
Expand description

The types of events that can be delivered.

Variants§

§

SDL_FIRSTEVENT = 0

< Unused (do not remove)

§

SDL_QUIT = 256

< User-requested quit

§

SDL_APP_TERMINATING = 257

< The application is being terminated by the OS Called on iOS in applicationWillTerminate() Called on Android in onDestroy()

§

SDL_APP_LOWMEMORY = 258

< The application is low on memory, free memory if possible. Called on iOS in applicationDidReceiveMemoryWarning() Called on Android in onLowMemory()

§

SDL_APP_WILLENTERBACKGROUND = 259

< The application is about to enter the background Called on iOS in applicationWillResignActive() Called on Android in onPause()

§

SDL_APP_DIDENTERBACKGROUND = 260

< The application did enter the background and may not get CPU for some time Called on iOS in applicationDidEnterBackground() Called on Android in onPause()

§

SDL_APP_WILLENTERFOREGROUND = 261

< The application is about to enter the foreground Called on iOS in applicationWillEnterForeground() Called on Android in onResume()

§

SDL_APP_DIDENTERFOREGROUND = 262

< The application is now interactive Called on iOS in applicationDidBecomeActive() Called on Android in onResume()

§

SDL_LOCALECHANGED = 263

< The user’s locale preferences have changed.

§

SDL_DISPLAYEVENT = 336

< Display state change

§

SDL_WINDOWEVENT = 512

< Window state change

§

SDL_SYSWMEVENT = 513

< System specific event

§

SDL_KEYDOWN = 768

< Key pressed

§

SDL_KEYUP = 769

< Key released

§

SDL_TEXTEDITING = 770

< Keyboard text editing (composition)

§

SDL_TEXTINPUT = 771

< Keyboard text input

§

SDL_KEYMAPCHANGED = 772

< Keymap changed due to a system event such as an input language or keyboard layout change.

§

SDL_MOUSEMOTION = 1_024

< Mouse moved

§

SDL_MOUSEBUTTONDOWN = 1_025

< Mouse button pressed

§

SDL_MOUSEBUTTONUP = 1_026

< Mouse button released

§

SDL_MOUSEWHEEL = 1_027

< Mouse wheel motion

§

SDL_JOYAXISMOTION = 1_536

< Joystick axis motion

§

SDL_JOYBALLMOTION = 1_537

< Joystick trackball motion

§

SDL_JOYHATMOTION = 1_538

< Joystick hat position change

§

SDL_JOYBUTTONDOWN = 1_539

< Joystick button pressed

§

SDL_JOYBUTTONUP = 1_540

< Joystick button released

§

SDL_JOYDEVICEADDED = 1_541

< A new joystick has been inserted into the system

§

SDL_JOYDEVICEREMOVED = 1_542

< An opened joystick has been removed

§

SDL_CONTROLLERAXISMOTION = 1_616

< Game controller axis motion

§

SDL_CONTROLLERBUTTONDOWN = 1_617

< Game controller button pressed

§

SDL_CONTROLLERBUTTONUP = 1_618

< Game controller button released

§

SDL_CONTROLLERDEVICEADDED = 1_619

< A new Game controller has been inserted into the system

§

SDL_CONTROLLERDEVICEREMOVED = 1_620

< An opened Game controller has been removed

§

SDL_CONTROLLERDEVICEREMAPPED = 1_621

< The controller mapping was updated

§

SDL_CONTROLLERTOUCHPADDOWN = 1_622

< Game controller touchpad was touched

§

SDL_CONTROLLERTOUCHPADMOTION = 1_623

< Game controller touchpad finger was moved

§

SDL_CONTROLLERTOUCHPADUP = 1_624

< Game controller touchpad finger was lifted

§

SDL_CONTROLLERSENSORUPDATE = 1_625

< Game controller sensor was updated

§

SDL_FINGERDOWN = 1_792

§

SDL_FINGERUP = 1_793

§

SDL_FINGERMOTION = 1_794

§

SDL_DOLLARGESTURE = 2_048

§

SDL_DOLLARRECORD = 2_049

§

SDL_MULTIGESTURE = 2_050

§

SDL_CLIPBOARDUPDATE = 2_304

< The clipboard changed

§

SDL_DROPFILE = 4_096

< The system requests a file open

§

SDL_DROPTEXT = 4_097

< text/plain drag-and-drop event

§

SDL_DROPBEGIN = 4_098

< A new set of drops is beginning (NULL filename)

§

SDL_DROPCOMPLETE = 4_099

< Current set of drops is now complete (NULL filename)

§

SDL_AUDIODEVICEADDED = 4_352

< A new audio device is available

§

SDL_AUDIODEVICEREMOVED = 4_353

< An audio device has been removed.

§

SDL_SENSORUPDATE = 4_608

< A sensor was updated

§

SDL_RENDER_TARGETS_RESET = 8_192

< The render targets have been reset and their contents need to be updated

§

SDL_RENDER_DEVICE_RESET = 8_193

< The device has been reset and all textures need to be recreated

§

SDL_POLLSENTINEL = 32_512

< Signals the end of an event poll cycle

§

SDL_USEREVENT = 32_768

Events ::SDL_USEREVENT through ::SDL_LASTEVENT are for your use, and should be allocated with SDL_RegisterEvents()

§

SDL_LASTEVENT = 65_535

This last event is only for bounding internal arrays

Trait Implementations§

source§

impl Clone for SDL_EventType

source§

fn clone(&self) -> SDL_EventType

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 Debug for SDL_EventType

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Hash for SDL_EventType

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl PartialEq for SDL_EventType

source§

fn eq(&self, other: &SDL_EventType) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Copy for SDL_EventType

source§

impl Eq for SDL_EventType

source§

impl StructuralEq for SDL_EventType

source§

impl StructuralPartialEq for SDL_EventType

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where 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 T
where 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 T
where 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 T
where 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.