#[repr(transparent)]pub struct SDL_EventType(pub Uint32);Expand description
The types of events that can be delivered.
§Availability
This enum is available since SDL 3.2.0.
§Known values (sdl3-sys)
Tuple Fields§
§0: Uint32Implementations§
Source§impl SDL_EventType
impl SDL_EventType
Sourcepub const TERMINATING: Self
pub const TERMINATING: Self
The application is being terminated by the OS. This event must be handled in a callback set with SDL_AddEventWatch().
Called on iOS in applicationWillTerminate()
Called on Android in onDestroy()
Sourcepub const LOW_MEMORY: Self
pub const LOW_MEMORY: Self
The application is low on memory, free memory if possible. This event must be handled in a callback set with SDL_AddEventWatch().
Called on iOS in applicationDidReceiveMemoryWarning()
Called on Android in onTrimMemory()
Sourcepub const WILL_ENTER_BACKGROUND: Self
pub const WILL_ENTER_BACKGROUND: Self
The application is about to enter the background. This event must be handled in a callback set with SDL_AddEventWatch().
Called on iOS in applicationWillResignActive()
Called on Android in onPause()
Sourcepub const DID_ENTER_BACKGROUND: Self
pub const DID_ENTER_BACKGROUND: Self
The application did enter the background and may not get CPU for some time. This event must be handled in a callback set with SDL_AddEventWatch().
Called on iOS in applicationDidEnterBackground()
Called on Android in onPause()
Sourcepub const WILL_ENTER_FOREGROUND: Self
pub const WILL_ENTER_FOREGROUND: Self
The application is about to enter the foreground. This event must be handled in a callback set with SDL_AddEventWatch().
Called on iOS in applicationWillEnterForeground()
Called on Android in onResume()
Sourcepub const DID_ENTER_FOREGROUND: Self
pub const DID_ENTER_FOREGROUND: Self
The application is now interactive. This event must be handled in a callback set with SDL_AddEventWatch().
Called on iOS in applicationDidBecomeActive()
Called on Android in onResume()
Sourcepub const LOCALE_CHANGED: Self
pub const LOCALE_CHANGED: Self
The user’s locale preferences have changed.
Sourcepub const SYSTEM_THEME_CHANGED: Self
pub const SYSTEM_THEME_CHANGED: Self
The system theme changed
Sourcepub const DISPLAY_ORIENTATION: Self
pub const DISPLAY_ORIENTATION: Self
Display orientation has changed to data1
Sourcepub const DISPLAY_ADDED: Self
pub const DISPLAY_ADDED: Self
Display has been added to the system
Sourcepub const DISPLAY_REMOVED: Self
pub const DISPLAY_REMOVED: Self
Display has been removed from the system
Sourcepub const DISPLAY_MOVED: Self
pub const DISPLAY_MOVED: Self
Display has changed position
Sourcepub const DISPLAY_DESKTOP_MODE_CHANGED: Self
pub const DISPLAY_DESKTOP_MODE_CHANGED: Self
Display has changed desktop mode
Sourcepub const DISPLAY_CURRENT_MODE_CHANGED: Self
pub const DISPLAY_CURRENT_MODE_CHANGED: Self
Display has changed current mode
Sourcepub const DISPLAY_CONTENT_SCALE_CHANGED: Self
pub const DISPLAY_CONTENT_SCALE_CHANGED: Self
Display has changed content scale
Sourcepub const DISPLAY_USABLE_BOUNDS_CHANGED: Self
pub const DISPLAY_USABLE_BOUNDS_CHANGED: Self
Display has changed usable bounds
pub const DISPLAY_FIRST: Self = SDL_EVENT_DISPLAY_ORIENTATION
pub const DISPLAY_LAST: Self = SDL_EVENT_DISPLAY_USABLE_BOUNDS_CHANGED
Sourcepub const WINDOW_SHOWN: Self
pub const WINDOW_SHOWN: Self
Window has been shown
Sourcepub const WINDOW_HIDDEN: Self
pub const WINDOW_HIDDEN: Self
Window has been hidden
Sourcepub const WINDOW_EXPOSED: Self
pub const WINDOW_EXPOSED: Self
Window has been exposed and should be redrawn, and can be redrawn directly from event watchers for this event. data1 is 1 for live-resize expose events, 0 otherwise.
Sourcepub const WINDOW_MOVED: Self
pub const WINDOW_MOVED: Self
Window has been moved to data1, data2
Sourcepub const WINDOW_RESIZED: Self
pub const WINDOW_RESIZED: Self
Window has been resized to data1xdata2
Sourcepub const WINDOW_PIXEL_SIZE_CHANGED: Self
pub const WINDOW_PIXEL_SIZE_CHANGED: Self
The pixel size of the window has changed to data1xdata2
Sourcepub const WINDOW_METAL_VIEW_RESIZED: Self
pub const WINDOW_METAL_VIEW_RESIZED: Self
The pixel size of a Metal view associated with the window has changed
Sourcepub const WINDOW_MINIMIZED: Self
pub const WINDOW_MINIMIZED: Self
Window has been minimized
Sourcepub const WINDOW_MAXIMIZED: Self
pub const WINDOW_MAXIMIZED: Self
Window has been maximized
Sourcepub const WINDOW_RESTORED: Self
pub const WINDOW_RESTORED: Self
Window has been restored to normal size and position
Sourcepub const WINDOW_MOUSE_ENTER: Self
pub const WINDOW_MOUSE_ENTER: Self
Window has gained mouse focus
Sourcepub const WINDOW_MOUSE_LEAVE: Self
pub const WINDOW_MOUSE_LEAVE: Self
Window has lost mouse focus
Sourcepub const WINDOW_FOCUS_GAINED: Self
pub const WINDOW_FOCUS_GAINED: Self
Window has gained keyboard focus
Sourcepub const WINDOW_FOCUS_LOST: Self
pub const WINDOW_FOCUS_LOST: Self
Window has lost keyboard focus
Sourcepub const WINDOW_CLOSE_REQUESTED: Self
pub const WINDOW_CLOSE_REQUESTED: Self
The window manager requests that the window be closed
Sourcepub const WINDOW_HIT_TEST: Self
pub const WINDOW_HIT_TEST: Self
Window had a hit test that wasn’t SDL_HITTEST_NORMAL
Sourcepub const WINDOW_ICCPROF_CHANGED: Self
pub const WINDOW_ICCPROF_CHANGED: Self
The ICC profile of the window’s display has changed
Sourcepub const WINDOW_DISPLAY_CHANGED: Self
pub const WINDOW_DISPLAY_CHANGED: Self
Window has been moved to display data1
Sourcepub const WINDOW_DISPLAY_SCALE_CHANGED: Self
pub const WINDOW_DISPLAY_SCALE_CHANGED: Self
Window display scale has been changed
Sourcepub const WINDOW_SAFE_AREA_CHANGED: Self
pub const WINDOW_SAFE_AREA_CHANGED: Self
The window safe area has been changed
Sourcepub const WINDOW_OCCLUDED: Self
pub const WINDOW_OCCLUDED: Self
The window has been occluded
Sourcepub const WINDOW_ENTER_FULLSCREEN: Self
pub const WINDOW_ENTER_FULLSCREEN: Self
The window has entered fullscreen mode
Sourcepub const WINDOW_LEAVE_FULLSCREEN: Self
pub const WINDOW_LEAVE_FULLSCREEN: Self
The window has left fullscreen mode
Sourcepub const WINDOW_DESTROYED: Self
pub const WINDOW_DESTROYED: Self
The window with the associated ID is being or has been destroyed. If this message is being handled in an event watcher, the window handle is still valid and can still be used to retrieve any properties associated with the window. Otherwise, the handle has already been destroyed and all resources associated with it are invalid
Sourcepub const WINDOW_HDR_STATE_CHANGED: Self
pub const WINDOW_HDR_STATE_CHANGED: Self
Window HDR properties have changed
pub const WINDOW_FIRST: Self = SDL_EVENT_WINDOW_SHOWN
pub const WINDOW_LAST: Self = SDL_EVENT_WINDOW_HDR_STATE_CHANGED
Sourcepub const TEXT_EDITING: Self
pub const TEXT_EDITING: Self
Keyboard text editing (composition)
Sourcepub const TEXT_INPUT: Self
pub const TEXT_INPUT: Self
Keyboard text input
Sourcepub const KEYMAP_CHANGED: Self
pub const KEYMAP_CHANGED: Self
Keymap changed due to a system event such as an input language or keyboard layout change.
Sourcepub const KEYBOARD_ADDED: Self
pub const KEYBOARD_ADDED: Self
A new keyboard has been inserted into the system
Sourcepub const KEYBOARD_REMOVED: Self
pub const KEYBOARD_REMOVED: Self
A keyboard has been removed
Sourcepub const TEXT_EDITING_CANDIDATES: Self
pub const TEXT_EDITING_CANDIDATES: Self
Keyboard text editing candidates
Sourcepub const SCREEN_KEYBOARD_SHOWN: Self
pub const SCREEN_KEYBOARD_SHOWN: Self
The on-screen keyboard has been shown
Sourcepub const SCREEN_KEYBOARD_HIDDEN: Self
pub const SCREEN_KEYBOARD_HIDDEN: Self
The on-screen keyboard has been hidden
Sourcepub const MOUSE_MOTION: Self
pub const MOUSE_MOTION: Self
Mouse moved
Sourcepub const MOUSE_BUTTON_DOWN: Self
pub const MOUSE_BUTTON_DOWN: Self
Mouse button pressed
Sourcepub const MOUSE_BUTTON_UP: Self
pub const MOUSE_BUTTON_UP: Self
Mouse button released
Sourcepub const MOUSE_WHEEL: Self
pub const MOUSE_WHEEL: Self
Mouse wheel motion
Sourcepub const MOUSE_ADDED: Self
pub const MOUSE_ADDED: Self
A new mouse has been inserted into the system
Sourcepub const MOUSE_REMOVED: Self
pub const MOUSE_REMOVED: Self
A mouse has been removed
Sourcepub const JOYSTICK_AXIS_MOTION: Self
pub const JOYSTICK_AXIS_MOTION: Self
Joystick axis motion
Sourcepub const JOYSTICK_BALL_MOTION: Self
pub const JOYSTICK_BALL_MOTION: Self
Joystick trackball motion
Sourcepub const JOYSTICK_HAT_MOTION: Self
pub const JOYSTICK_HAT_MOTION: Self
Joystick hat position change
Sourcepub const JOYSTICK_BUTTON_DOWN: Self
pub const JOYSTICK_BUTTON_DOWN: Self
Joystick button pressed
Sourcepub const JOYSTICK_BUTTON_UP: Self
pub const JOYSTICK_BUTTON_UP: Self
Joystick button released
Sourcepub const JOYSTICK_ADDED: Self
pub const JOYSTICK_ADDED: Self
A new joystick has been inserted into the system
Sourcepub const JOYSTICK_REMOVED: Self
pub const JOYSTICK_REMOVED: Self
An opened joystick has been removed
Sourcepub const JOYSTICK_BATTERY_UPDATED: Self
pub const JOYSTICK_BATTERY_UPDATED: Self
Joystick battery level change
Sourcepub const JOYSTICK_UPDATE_COMPLETE: Self
pub const JOYSTICK_UPDATE_COMPLETE: Self
Joystick update is complete
Sourcepub const GAMEPAD_AXIS_MOTION: Self
pub const GAMEPAD_AXIS_MOTION: Self
Gamepad axis motion
Sourcepub const GAMEPAD_BUTTON_DOWN: Self
pub const GAMEPAD_BUTTON_DOWN: Self
Gamepad button pressed
Sourcepub const GAMEPAD_BUTTON_UP: Self
pub const GAMEPAD_BUTTON_UP: Self
Gamepad button released
Sourcepub const GAMEPAD_ADDED: Self
pub const GAMEPAD_ADDED: Self
A new gamepad has been inserted into the system
Sourcepub const GAMEPAD_REMOVED: Self
pub const GAMEPAD_REMOVED: Self
A gamepad has been removed
Sourcepub const GAMEPAD_REMAPPED: Self
pub const GAMEPAD_REMAPPED: Self
The gamepad mapping was updated
Sourcepub const GAMEPAD_TOUCHPAD_DOWN: Self
pub const GAMEPAD_TOUCHPAD_DOWN: Self
Gamepad touchpad was touched
Sourcepub const GAMEPAD_TOUCHPAD_MOTION: Self
pub const GAMEPAD_TOUCHPAD_MOTION: Self
Gamepad touchpad finger was moved
Sourcepub const GAMEPAD_TOUCHPAD_UP: Self
pub const GAMEPAD_TOUCHPAD_UP: Self
Gamepad touchpad finger was lifted
Sourcepub const GAMEPAD_SENSOR_UPDATE: Self
pub const GAMEPAD_SENSOR_UPDATE: Self
Gamepad sensor was updated
Sourcepub const GAMEPAD_UPDATE_COMPLETE: Self
pub const GAMEPAD_UPDATE_COMPLETE: Self
Gamepad update is complete
Sourcepub const GAMEPAD_STEAM_HANDLE_UPDATED: Self
pub const GAMEPAD_STEAM_HANDLE_UPDATED: Self
Gamepad Steam handle has changed
pub const FINGER_DOWN: Self
pub const FINGER_UP: Self
pub const FINGER_MOTION: Self
pub const FINGER_CANCELED: Self
Sourcepub const PINCH_BEGIN: Self
pub const PINCH_BEGIN: Self
Pinch gesture started
Sourcepub const PINCH_UPDATE: Self
pub const PINCH_UPDATE: Self
Pinch gesture updated
Sourcepub const CLIPBOARD_UPDATE: Self
pub const CLIPBOARD_UPDATE: Self
The clipboard changed
Sourcepub const DROP_BEGIN: Self
pub const DROP_BEGIN: Self
A new set of drops is beginning (NULL filename)
Sourcepub const DROP_COMPLETE: Self
pub const DROP_COMPLETE: Self
Current set of drops is now complete (NULL filename)
Sourcepub const DROP_POSITION: Self
pub const DROP_POSITION: Self
Position while moving over the window
Sourcepub const AUDIO_DEVICE_ADDED: Self
pub const AUDIO_DEVICE_ADDED: Self
A new audio device is available
Sourcepub const AUDIO_DEVICE_REMOVED: Self
pub const AUDIO_DEVICE_REMOVED: Self
An audio device has been removed.
Sourcepub const AUDIO_DEVICE_FORMAT_CHANGED: Self
pub const AUDIO_DEVICE_FORMAT_CHANGED: Self
An audio device’s format has been changed by the system.
Sourcepub const SENSOR_UPDATE: Self
pub const SENSOR_UPDATE: Self
A sensor was updated
Sourcepub const PEN_PROXIMITY_IN: Self
pub const PEN_PROXIMITY_IN: Self
Pressure-sensitive pen has become available
Sourcepub const PEN_PROXIMITY_OUT: Self
pub const PEN_PROXIMITY_OUT: Self
Pressure-sensitive pen has become unavailable
Sourcepub const PEN_BUTTON_DOWN: Self
pub const PEN_BUTTON_DOWN: Self
Pressure-sensitive pen button pressed
Sourcepub const PEN_BUTTON_UP: Self
pub const PEN_BUTTON_UP: Self
Pressure-sensitive pen button released
Sourcepub const PEN_MOTION: Self
pub const PEN_MOTION: Self
Pressure-sensitive pen is moving on the tablet
Sourcepub const CAMERA_DEVICE_ADDED: Self
pub const CAMERA_DEVICE_ADDED: Self
A new camera device is available
Sourcepub const CAMERA_DEVICE_REMOVED: Self
pub const CAMERA_DEVICE_REMOVED: Self
A camera device has been removed.
Sourcepub const CAMERA_DEVICE_APPROVED: Self
pub const CAMERA_DEVICE_APPROVED: Self
A camera device has been approved for use by the user.
Sourcepub const CAMERA_DEVICE_DENIED: Self
pub const CAMERA_DEVICE_DENIED: Self
A camera device has been denied for use by the user.
Sourcepub const RENDER_TARGETS_RESET: Self
pub const RENDER_TARGETS_RESET: Self
The render targets have been reset and their contents need to be updated
Sourcepub const RENDER_DEVICE_RESET: Self
pub const RENDER_DEVICE_RESET: Self
The device has been reset and all textures need to be recreated
Sourcepub const RENDER_DEVICE_LOST: Self
pub const RENDER_DEVICE_LOST: Self
The device has been lost and can’t be recovered.
pub const PRIVATE0: Self
pub const PRIVATE1: Self
pub const PRIVATE2: Self
pub const PRIVATE3: Self
Sourcepub const POLL_SENTINEL: Self
pub const POLL_SENTINEL: Self
Signals the end of an event poll cycle
Sourcepub const USER: Self
pub const USER: Self
Events SDL_EVENT_USER through SDL_EVENT_LAST are for your use,
and should be allocated with SDL_RegisterEvents()
pub const ENUM_PADDING: Self
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 Debug for SDL_EventType
Available on crate feature debug-impls only.
impl Debug for SDL_EventType
debug-impls only.Source§impl Default for SDL_EventType
impl Default for SDL_EventType
Source§fn default() -> SDL_EventType
fn default() -> SDL_EventType
Source§impl From<SDL_EventType> for Uint32
impl From<SDL_EventType> for Uint32
Source§fn from(value: SDL_EventType) -> Self
fn from(value: SDL_EventType) -> Self
Source§impl GroupMetadata for SDL_EventType
Available on crate feature metadata only.
impl GroupMetadata for SDL_EventType
metadata only.