Enum sdl2_sys::SDL_EventType
source · [−]#[repr(u32)]
pub enum SDL_EventType {
Show 56 variants
SDL_FIRSTEVENT,
SDL_QUIT,
SDL_APP_TERMINATING,
SDL_APP_LOWMEMORY,
SDL_APP_WILLENTERBACKGROUND,
SDL_APP_DIDENTERBACKGROUND,
SDL_APP_WILLENTERFOREGROUND,
SDL_APP_DIDENTERFOREGROUND,
SDL_LOCALECHANGED,
SDL_DISPLAYEVENT,
SDL_WINDOWEVENT,
SDL_SYSWMEVENT,
SDL_KEYDOWN,
SDL_KEYUP,
SDL_TEXTEDITING,
SDL_TEXTINPUT,
SDL_KEYMAPCHANGED,
SDL_MOUSEMOTION,
SDL_MOUSEBUTTONDOWN,
SDL_MOUSEBUTTONUP,
SDL_MOUSEWHEEL,
SDL_JOYAXISMOTION,
SDL_JOYBALLMOTION,
SDL_JOYHATMOTION,
SDL_JOYBUTTONDOWN,
SDL_JOYBUTTONUP,
SDL_JOYDEVICEADDED,
SDL_JOYDEVICEREMOVED,
SDL_CONTROLLERAXISMOTION,
SDL_CONTROLLERBUTTONDOWN,
SDL_CONTROLLERBUTTONUP,
SDL_CONTROLLERDEVICEADDED,
SDL_CONTROLLERDEVICEREMOVED,
SDL_CONTROLLERDEVICEREMAPPED,
SDL_CONTROLLERTOUCHPADDOWN,
SDL_CONTROLLERTOUCHPADMOTION,
SDL_CONTROLLERTOUCHPADUP,
SDL_CONTROLLERSENSORUPDATE,
SDL_FINGERDOWN,
SDL_FINGERUP,
SDL_FINGERMOTION,
SDL_DOLLARGESTURE,
SDL_DOLLARRECORD,
SDL_MULTIGESTURE,
SDL_CLIPBOARDUPDATE,
SDL_DROPFILE,
SDL_DROPTEXT,
SDL_DROPBEGIN,
SDL_DROPCOMPLETE,
SDL_AUDIODEVICEADDED,
SDL_AUDIODEVICEREMOVED,
SDL_SENSORUPDATE,
SDL_RENDER_TARGETS_RESET,
SDL_RENDER_DEVICE_RESET,
SDL_USEREVENT,
SDL_LASTEVENT,
}
Expand description
\brief The types of events that can be delivered.
Variants
SDL_FIRSTEVENT
< Unused (do not remove)
SDL_QUIT
< User-requested quit
SDL_APP_TERMINATING
< The application is being terminated by the OS Called on iOS in applicationWillTerminate() Called on Android in onDestroy()
SDL_APP_LOWMEMORY
< The application is low on memory, free memory if possible. Called on iOS in applicationDidReceiveMemoryWarning() Called on Android in onLowMemory()
SDL_APP_WILLENTERBACKGROUND
< The application is about to enter the background Called on iOS in applicationWillResignActive() Called on Android in onPause()
SDL_APP_DIDENTERBACKGROUND
< 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
< The application is about to enter the foreground Called on iOS in applicationWillEnterForeground() Called on Android in onResume()
SDL_APP_DIDENTERFOREGROUND
< The application is now interactive Called on iOS in applicationDidBecomeActive() Called on Android in onResume()
SDL_LOCALECHANGED
< The user’s locale preferences have changed.
SDL_DISPLAYEVENT
< Display state change
SDL_WINDOWEVENT
< Window state change
SDL_SYSWMEVENT
< System specific event
SDL_KEYDOWN
< Key pressed
SDL_KEYUP
< Key released
SDL_TEXTEDITING
< Keyboard text editing (composition)
SDL_TEXTINPUT
< Keyboard text input
SDL_KEYMAPCHANGED
< Keymap changed due to a system event such as an input language or keyboard layout change.
SDL_MOUSEMOTION
< Mouse moved
SDL_MOUSEBUTTONDOWN
< Mouse button pressed
SDL_MOUSEBUTTONUP
< Mouse button released
SDL_MOUSEWHEEL
< Mouse wheel motion
SDL_JOYAXISMOTION
< Joystick axis motion
SDL_JOYBALLMOTION
< Joystick trackball motion
SDL_JOYHATMOTION
< Joystick hat position change
SDL_JOYBUTTONDOWN
< Joystick button pressed
SDL_JOYBUTTONUP
< Joystick button released
SDL_JOYDEVICEADDED
< A new joystick has been inserted into the system
SDL_JOYDEVICEREMOVED
< An opened joystick has been removed
SDL_CONTROLLERAXISMOTION
< Game controller axis motion
SDL_CONTROLLERBUTTONDOWN
< Game controller button pressed
SDL_CONTROLLERBUTTONUP
< Game controller button released
SDL_CONTROLLERDEVICEADDED
< A new Game controller has been inserted into the system
SDL_CONTROLLERDEVICEREMOVED
< An opened Game controller has been removed
SDL_CONTROLLERDEVICEREMAPPED
< The controller mapping was updated
SDL_CONTROLLERTOUCHPADDOWN
< Game controller touchpad was touched
SDL_CONTROLLERTOUCHPADMOTION
< Game controller touchpad finger was moved
SDL_CONTROLLERTOUCHPADUP
< Game controller touchpad finger was lifted
SDL_CONTROLLERSENSORUPDATE
< Game controller sensor was updated
SDL_FINGERDOWN
SDL_FINGERUP
SDL_FINGERMOTION
SDL_DOLLARGESTURE
SDL_DOLLARRECORD
SDL_MULTIGESTURE
SDL_CLIPBOARDUPDATE
< The clipboard changed
SDL_DROPFILE
< The system requests a file open
SDL_DROPTEXT
< text/plain drag-and-drop event
SDL_DROPBEGIN
< A new set of drops is beginning (NULL filename)
SDL_DROPCOMPLETE
< Current set of drops is now complete (NULL filename)
SDL_AUDIODEVICEADDED
< A new audio device is available
SDL_AUDIODEVICEREMOVED
< An audio device has been removed.
SDL_SENSORUPDATE
< A sensor was updated
SDL_RENDER_TARGETS_RESET
< The render targets have been reset and their contents need to be updated
SDL_RENDER_DEVICE_RESET
< The device has been reset and all textures need to be recreated
SDL_USEREVENT
Events ::SDL_USEREVENT through ::SDL_LASTEVENT are for your use, and should be allocated with SDL_RegisterEvents()
SDL_LASTEVENT
This last event is only for bounding internal arrays
Trait Implementations
sourceimpl Clone for SDL_EventType
impl Clone for SDL_EventType
sourcefn clone(&self) -> SDL_EventType
fn clone(&self) -> SDL_EventType
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for SDL_EventType
impl Debug for SDL_EventType
sourceimpl Hash for SDL_EventType
impl Hash for SDL_EventType
sourceimpl PartialEq<SDL_EventType> for SDL_EventType
impl PartialEq<SDL_EventType> for SDL_EventType
impl Copy for SDL_EventType
impl Eq for SDL_EventType
impl StructuralEq for SDL_EventType
impl StructuralPartialEq for SDL_EventType
Auto Trait Implementations
impl RefUnwindSafe for SDL_EventType
impl Send for SDL_EventType
impl Sync for SDL_EventType
impl Unpin for SDL_EventType
impl UnwindSafe for SDL_EventType
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more