Enum sdl2_sys::SDL_EventType
source · #[repr(u32)]pub enum SDL_EventType {
Show 59 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_TEXTEDITING_EXT = 773,
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_JOYBATTERYUPDATED = 1_543,
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_TEXTEDITING_EXT = 773
< Extended keyboard text editing (composition)
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_JOYBATTERYUPDATED = 1_543
< Joystick battery level change
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 or primary selection 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
impl Clone for SDL_EventType
source§fn clone(&self) -> SDL_EventType
fn clone(&self) -> SDL_EventType
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Hash for SDL_EventType
impl Hash for SDL_EventType
source§impl PartialEq for SDL_EventType
impl PartialEq for SDL_EventType
source§fn eq(&self, other: &SDL_EventType) -> bool
fn eq(&self, other: &SDL_EventType) -> bool
self
and other
values to be equal, and is used
by ==
.