SDL_EventType

Struct SDL_EventType 

Source
#[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)

Associated constantGlobal constantDescription
FIRSTSDL_EVENT_FIRSTUnused (do not remove)
QUITSDL_EVENT_QUITUser-requested quit
TERMINATINGSDL_EVENT_TERMINATINGThe 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()
LOW_MEMORYSDL_EVENT_LOW_MEMORYThe 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()
WILL_ENTER_BACKGROUNDSDL_EVENT_WILL_ENTER_BACKGROUNDThe 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()
DID_ENTER_BACKGROUNDSDL_EVENT_DID_ENTER_BACKGROUNDThe 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()
WILL_ENTER_FOREGROUNDSDL_EVENT_WILL_ENTER_FOREGROUNDThe 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()
DID_ENTER_FOREGROUNDSDL_EVENT_DID_ENTER_FOREGROUNDThe 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()
LOCALE_CHANGEDSDL_EVENT_LOCALE_CHANGEDThe user’s locale preferences have changed.
SYSTEM_THEME_CHANGEDSDL_EVENT_SYSTEM_THEME_CHANGEDThe system theme changed
DISPLAY_ORIENTATIONSDL_EVENT_DISPLAY_ORIENTATIONDisplay orientation has changed to data1
DISPLAY_ADDEDSDL_EVENT_DISPLAY_ADDEDDisplay has been added to the system
DISPLAY_REMOVEDSDL_EVENT_DISPLAY_REMOVEDDisplay has been removed from the system
DISPLAY_MOVEDSDL_EVENT_DISPLAY_MOVEDDisplay has changed position
DISPLAY_DESKTOP_MODE_CHANGEDSDL_EVENT_DISPLAY_DESKTOP_MODE_CHANGEDDisplay has changed desktop mode
DISPLAY_CURRENT_MODE_CHANGEDSDL_EVENT_DISPLAY_CURRENT_MODE_CHANGEDDisplay has changed current mode
DISPLAY_CONTENT_SCALE_CHANGEDSDL_EVENT_DISPLAY_CONTENT_SCALE_CHANGEDDisplay has changed content scale
DISPLAY_USABLE_BOUNDS_CHANGEDSDL_EVENT_DISPLAY_USABLE_BOUNDS_CHANGEDDisplay has changed usable bounds
DISPLAY_FIRSTSDL_EVENT_DISPLAY_FIRST
DISPLAY_LASTSDL_EVENT_DISPLAY_LAST
WINDOW_SHOWNSDL_EVENT_WINDOW_SHOWNWindow has been shown
WINDOW_HIDDENSDL_EVENT_WINDOW_HIDDENWindow has been hidden
WINDOW_EXPOSEDSDL_EVENT_WINDOW_EXPOSEDWindow 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.
WINDOW_MOVEDSDL_EVENT_WINDOW_MOVEDWindow has been moved to data1, data2
WINDOW_RESIZEDSDL_EVENT_WINDOW_RESIZEDWindow has been resized to data1xdata2
WINDOW_PIXEL_SIZE_CHANGEDSDL_EVENT_WINDOW_PIXEL_SIZE_CHANGEDThe pixel size of the window has changed to data1xdata2
WINDOW_METAL_VIEW_RESIZEDSDL_EVENT_WINDOW_METAL_VIEW_RESIZEDThe pixel size of a Metal view associated with the window has changed
WINDOW_MINIMIZEDSDL_EVENT_WINDOW_MINIMIZEDWindow has been minimized
WINDOW_MAXIMIZEDSDL_EVENT_WINDOW_MAXIMIZEDWindow has been maximized
WINDOW_RESTOREDSDL_EVENT_WINDOW_RESTOREDWindow has been restored to normal size and position
WINDOW_MOUSE_ENTERSDL_EVENT_WINDOW_MOUSE_ENTERWindow has gained mouse focus
WINDOW_MOUSE_LEAVESDL_EVENT_WINDOW_MOUSE_LEAVEWindow has lost mouse focus
WINDOW_FOCUS_GAINEDSDL_EVENT_WINDOW_FOCUS_GAINEDWindow has gained keyboard focus
WINDOW_FOCUS_LOSTSDL_EVENT_WINDOW_FOCUS_LOSTWindow has lost keyboard focus
WINDOW_CLOSE_REQUESTEDSDL_EVENT_WINDOW_CLOSE_REQUESTEDThe window manager requests that the window be closed
WINDOW_HIT_TESTSDL_EVENT_WINDOW_HIT_TESTWindow had a hit test that wasn’t SDL_HITTEST_NORMAL
WINDOW_ICCPROF_CHANGEDSDL_EVENT_WINDOW_ICCPROF_CHANGEDThe ICC profile of the window’s display has changed
WINDOW_DISPLAY_CHANGEDSDL_EVENT_WINDOW_DISPLAY_CHANGEDWindow has been moved to display data1
WINDOW_DISPLAY_SCALE_CHANGEDSDL_EVENT_WINDOW_DISPLAY_SCALE_CHANGEDWindow display scale has been changed
WINDOW_SAFE_AREA_CHANGEDSDL_EVENT_WINDOW_SAFE_AREA_CHANGEDThe window safe area has been changed
WINDOW_OCCLUDEDSDL_EVENT_WINDOW_OCCLUDEDThe window has been occluded
WINDOW_ENTER_FULLSCREENSDL_EVENT_WINDOW_ENTER_FULLSCREENThe window has entered fullscreen mode
WINDOW_LEAVE_FULLSCREENSDL_EVENT_WINDOW_LEAVE_FULLSCREENThe window has left fullscreen mode
WINDOW_DESTROYEDSDL_EVENT_WINDOW_DESTROYEDThe 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
WINDOW_HDR_STATE_CHANGEDSDL_EVENT_WINDOW_HDR_STATE_CHANGEDWindow HDR properties have changed
WINDOW_FIRSTSDL_EVENT_WINDOW_FIRST
WINDOW_LASTSDL_EVENT_WINDOW_LAST
KEY_DOWNSDL_EVENT_KEY_DOWNKey pressed
KEY_UPSDL_EVENT_KEY_UPKey released
TEXT_EDITINGSDL_EVENT_TEXT_EDITINGKeyboard text editing (composition)
TEXT_INPUTSDL_EVENT_TEXT_INPUTKeyboard text input
KEYMAP_CHANGEDSDL_EVENT_KEYMAP_CHANGEDKeymap changed due to a system event such as an input language or keyboard layout change.
KEYBOARD_ADDEDSDL_EVENT_KEYBOARD_ADDEDA new keyboard has been inserted into the system
KEYBOARD_REMOVEDSDL_EVENT_KEYBOARD_REMOVEDA keyboard has been removed
TEXT_EDITING_CANDIDATESSDL_EVENT_TEXT_EDITING_CANDIDATESKeyboard text editing candidates
SCREEN_KEYBOARD_SHOWNSDL_EVENT_SCREEN_KEYBOARD_SHOWNThe on-screen keyboard has been shown
SCREEN_KEYBOARD_HIDDENSDL_EVENT_SCREEN_KEYBOARD_HIDDENThe on-screen keyboard has been hidden
MOUSE_MOTIONSDL_EVENT_MOUSE_MOTIONMouse moved
MOUSE_BUTTON_DOWNSDL_EVENT_MOUSE_BUTTON_DOWNMouse button pressed
MOUSE_BUTTON_UPSDL_EVENT_MOUSE_BUTTON_UPMouse button released
MOUSE_WHEELSDL_EVENT_MOUSE_WHEELMouse wheel motion
MOUSE_ADDEDSDL_EVENT_MOUSE_ADDEDA new mouse has been inserted into the system
MOUSE_REMOVEDSDL_EVENT_MOUSE_REMOVEDA mouse has been removed
JOYSTICK_AXIS_MOTIONSDL_EVENT_JOYSTICK_AXIS_MOTIONJoystick axis motion
JOYSTICK_BALL_MOTIONSDL_EVENT_JOYSTICK_BALL_MOTIONJoystick trackball motion
JOYSTICK_HAT_MOTIONSDL_EVENT_JOYSTICK_HAT_MOTIONJoystick hat position change
JOYSTICK_BUTTON_DOWNSDL_EVENT_JOYSTICK_BUTTON_DOWNJoystick button pressed
JOYSTICK_BUTTON_UPSDL_EVENT_JOYSTICK_BUTTON_UPJoystick button released
JOYSTICK_ADDEDSDL_EVENT_JOYSTICK_ADDEDA new joystick has been inserted into the system
JOYSTICK_REMOVEDSDL_EVENT_JOYSTICK_REMOVEDAn opened joystick has been removed
JOYSTICK_BATTERY_UPDATEDSDL_EVENT_JOYSTICK_BATTERY_UPDATEDJoystick battery level change
JOYSTICK_UPDATE_COMPLETESDL_EVENT_JOYSTICK_UPDATE_COMPLETEJoystick update is complete
GAMEPAD_AXIS_MOTIONSDL_EVENT_GAMEPAD_AXIS_MOTIONGamepad axis motion
GAMEPAD_BUTTON_DOWNSDL_EVENT_GAMEPAD_BUTTON_DOWNGamepad button pressed
GAMEPAD_BUTTON_UPSDL_EVENT_GAMEPAD_BUTTON_UPGamepad button released
GAMEPAD_ADDEDSDL_EVENT_GAMEPAD_ADDEDA new gamepad has been inserted into the system
GAMEPAD_REMOVEDSDL_EVENT_GAMEPAD_REMOVEDA gamepad has been removed
GAMEPAD_REMAPPEDSDL_EVENT_GAMEPAD_REMAPPEDThe gamepad mapping was updated
GAMEPAD_TOUCHPAD_DOWNSDL_EVENT_GAMEPAD_TOUCHPAD_DOWNGamepad touchpad was touched
GAMEPAD_TOUCHPAD_MOTIONSDL_EVENT_GAMEPAD_TOUCHPAD_MOTIONGamepad touchpad finger was moved
GAMEPAD_TOUCHPAD_UPSDL_EVENT_GAMEPAD_TOUCHPAD_UPGamepad touchpad finger was lifted
GAMEPAD_SENSOR_UPDATESDL_EVENT_GAMEPAD_SENSOR_UPDATEGamepad sensor was updated
GAMEPAD_UPDATE_COMPLETESDL_EVENT_GAMEPAD_UPDATE_COMPLETEGamepad update is complete
GAMEPAD_STEAM_HANDLE_UPDATEDSDL_EVENT_GAMEPAD_STEAM_HANDLE_UPDATEDGamepad Steam handle has changed
FINGER_DOWNSDL_EVENT_FINGER_DOWN
FINGER_UPSDL_EVENT_FINGER_UP
FINGER_MOTIONSDL_EVENT_FINGER_MOTION
FINGER_CANCELEDSDL_EVENT_FINGER_CANCELED
PINCH_BEGINSDL_EVENT_PINCH_BEGINPinch gesture started
PINCH_UPDATESDL_EVENT_PINCH_UPDATEPinch gesture updated
PINCH_ENDSDL_EVENT_PINCH_ENDPinch gesture ended
CLIPBOARD_UPDATESDL_EVENT_CLIPBOARD_UPDATEThe clipboard changed
DROP_FILESDL_EVENT_DROP_FILEThe system requests a file open
DROP_TEXTSDL_EVENT_DROP_TEXTtext/plain drag-and-drop event
DROP_BEGINSDL_EVENT_DROP_BEGINA new set of drops is beginning (NULL filename)
DROP_COMPLETESDL_EVENT_DROP_COMPLETECurrent set of drops is now complete (NULL filename)
DROP_POSITIONSDL_EVENT_DROP_POSITIONPosition while moving over the window
AUDIO_DEVICE_ADDEDSDL_EVENT_AUDIO_DEVICE_ADDEDA new audio device is available
AUDIO_DEVICE_REMOVEDSDL_EVENT_AUDIO_DEVICE_REMOVEDAn audio device has been removed.
AUDIO_DEVICE_FORMAT_CHANGEDSDL_EVENT_AUDIO_DEVICE_FORMAT_CHANGEDAn audio device’s format has been changed by the system.
SENSOR_UPDATESDL_EVENT_SENSOR_UPDATEA sensor was updated
PEN_PROXIMITY_INSDL_EVENT_PEN_PROXIMITY_INPressure-sensitive pen has become available
PEN_PROXIMITY_OUTSDL_EVENT_PEN_PROXIMITY_OUTPressure-sensitive pen has become unavailable
PEN_DOWNSDL_EVENT_PEN_DOWNPressure-sensitive pen touched drawing surface
PEN_UPSDL_EVENT_PEN_UPPressure-sensitive pen stopped touching drawing surface
PEN_BUTTON_DOWNSDL_EVENT_PEN_BUTTON_DOWNPressure-sensitive pen button pressed
PEN_BUTTON_UPSDL_EVENT_PEN_BUTTON_UPPressure-sensitive pen button released
PEN_MOTIONSDL_EVENT_PEN_MOTIONPressure-sensitive pen is moving on the tablet
PEN_AXISSDL_EVENT_PEN_AXISPressure-sensitive pen angle/pressure/etc changed
CAMERA_DEVICE_ADDEDSDL_EVENT_CAMERA_DEVICE_ADDEDA new camera device is available
CAMERA_DEVICE_REMOVEDSDL_EVENT_CAMERA_DEVICE_REMOVEDA camera device has been removed.
CAMERA_DEVICE_APPROVEDSDL_EVENT_CAMERA_DEVICE_APPROVEDA camera device has been approved for use by the user.
CAMERA_DEVICE_DENIEDSDL_EVENT_CAMERA_DEVICE_DENIEDA camera device has been denied for use by the user.
RENDER_TARGETS_RESETSDL_EVENT_RENDER_TARGETS_RESETThe render targets have been reset and their contents need to be updated
RENDER_DEVICE_RESETSDL_EVENT_RENDER_DEVICE_RESETThe device has been reset and all textures need to be recreated
RENDER_DEVICE_LOSTSDL_EVENT_RENDER_DEVICE_LOSTThe device has been lost and can’t be recovered.
PRIVATE0SDL_EVENT_PRIVATE0
PRIVATE1SDL_EVENT_PRIVATE1
PRIVATE2SDL_EVENT_PRIVATE2
PRIVATE3SDL_EVENT_PRIVATE3
POLL_SENTINELSDL_EVENT_POLL_SENTINELSignals the end of an event poll cycle
USERSDL_EVENT_USEREvents SDL_EVENT_USER through SDL_EVENT_LAST are for your use, and should be allocated with SDL_RegisterEvents()
LASTSDL_EVENT_LAST* This last event is only for bounding internal arrays
ENUM_PADDINGSDL_EVENT_ENUM_PADDING

Tuple Fields§

§0: Uint32

Implementations§

Source§

impl SDL_EventType

Source

pub const FIRST: Self

Unused (do not remove)

Source

pub const QUIT: Self

User-requested quit

Source

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()

Source

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()

Source

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()

Source

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()

Source

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()

Source

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()

Source

pub const LOCALE_CHANGED: Self

The user’s locale preferences have changed.

Source

pub const SYSTEM_THEME_CHANGED: Self

The system theme changed

Source

pub const DISPLAY_ORIENTATION: Self

Display orientation has changed to data1

Source

pub const DISPLAY_ADDED: Self

Display has been added to the system

Source

pub const DISPLAY_REMOVED: Self

Display has been removed from the system

Source

pub const DISPLAY_MOVED: Self

Display has changed position

Source

pub const DISPLAY_DESKTOP_MODE_CHANGED: Self

Display has changed desktop mode

Source

pub const DISPLAY_CURRENT_MODE_CHANGED: Self

Display has changed current mode

Source

pub const DISPLAY_CONTENT_SCALE_CHANGED: Self

Display has changed content scale

Source

pub const DISPLAY_USABLE_BOUNDS_CHANGED: Self

Display has changed usable bounds

Source

pub const DISPLAY_FIRST: Self = SDL_EVENT_DISPLAY_ORIENTATION

Source

pub const DISPLAY_LAST: Self = SDL_EVENT_DISPLAY_USABLE_BOUNDS_CHANGED

Source

pub const WINDOW_SHOWN: Self

Window has been shown

Source

pub const WINDOW_HIDDEN: Self

Window has been hidden

Source

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.

Source

pub const WINDOW_MOVED: Self

Window has been moved to data1, data2

Source

pub const WINDOW_RESIZED: Self

Window has been resized to data1xdata2

Source

pub const WINDOW_PIXEL_SIZE_CHANGED: Self

The pixel size of the window has changed to data1xdata2

Source

pub const WINDOW_METAL_VIEW_RESIZED: Self

The pixel size of a Metal view associated with the window has changed

Source

pub const WINDOW_MINIMIZED: Self

Window has been minimized

Source

pub const WINDOW_MAXIMIZED: Self

Window has been maximized

Source

pub const WINDOW_RESTORED: Self

Window has been restored to normal size and position

Source

pub const WINDOW_MOUSE_ENTER: Self

Window has gained mouse focus

Source

pub const WINDOW_MOUSE_LEAVE: Self

Window has lost mouse focus

Source

pub const WINDOW_FOCUS_GAINED: Self

Window has gained keyboard focus

Source

pub const WINDOW_FOCUS_LOST: Self

Window has lost keyboard focus

Source

pub const WINDOW_CLOSE_REQUESTED: Self

The window manager requests that the window be closed

Source

pub const WINDOW_HIT_TEST: Self

Window had a hit test that wasn’t SDL_HITTEST_NORMAL

Source

pub const WINDOW_ICCPROF_CHANGED: Self

The ICC profile of the window’s display has changed

Source

pub const WINDOW_DISPLAY_CHANGED: Self

Window has been moved to display data1

Source

pub const WINDOW_DISPLAY_SCALE_CHANGED: Self

Window display scale has been changed

Source

pub const WINDOW_SAFE_AREA_CHANGED: Self

The window safe area has been changed

Source

pub const WINDOW_OCCLUDED: Self

The window has been occluded

Source

pub const WINDOW_ENTER_FULLSCREEN: Self

The window has entered fullscreen mode

Source

pub const WINDOW_LEAVE_FULLSCREEN: Self

The window has left fullscreen mode

Source

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

Source

pub const WINDOW_HDR_STATE_CHANGED: Self

Window HDR properties have changed

Source

pub const WINDOW_FIRST: Self = SDL_EVENT_WINDOW_SHOWN

Source

pub const WINDOW_LAST: Self = SDL_EVENT_WINDOW_HDR_STATE_CHANGED

Source

pub const KEY_DOWN: Self

Key pressed

Source

pub const KEY_UP: Self

Key released

Source

pub const TEXT_EDITING: Self

Keyboard text editing (composition)

Source

pub const TEXT_INPUT: Self

Keyboard text input

Source

pub const KEYMAP_CHANGED: Self

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

Source

pub const KEYBOARD_ADDED: Self

A new keyboard has been inserted into the system

Source

pub const KEYBOARD_REMOVED: Self

A keyboard has been removed

Source

pub const TEXT_EDITING_CANDIDATES: Self

Keyboard text editing candidates

Source

pub const SCREEN_KEYBOARD_SHOWN: Self

The on-screen keyboard has been shown

Source

pub const SCREEN_KEYBOARD_HIDDEN: Self

The on-screen keyboard has been hidden

Source

pub const MOUSE_MOTION: Self

Mouse moved

Source

pub const MOUSE_BUTTON_DOWN: Self

Mouse button pressed

Source

pub const MOUSE_BUTTON_UP: Self

Mouse button released

Source

pub const MOUSE_WHEEL: Self

Mouse wheel motion

Source

pub const MOUSE_ADDED: Self

A new mouse has been inserted into the system

Source

pub const MOUSE_REMOVED: Self

A mouse has been removed

Source

pub const JOYSTICK_AXIS_MOTION: Self

Joystick axis motion

Source

pub const JOYSTICK_BALL_MOTION: Self

Joystick trackball motion

Source

pub const JOYSTICK_HAT_MOTION: Self

Joystick hat position change

Source

pub const JOYSTICK_BUTTON_DOWN: Self

Joystick button pressed

Source

pub const JOYSTICK_BUTTON_UP: Self

Joystick button released

Source

pub const JOYSTICK_ADDED: Self

A new joystick has been inserted into the system

Source

pub const JOYSTICK_REMOVED: Self

An opened joystick has been removed

Source

pub const JOYSTICK_BATTERY_UPDATED: Self

Joystick battery level change

Source

pub const JOYSTICK_UPDATE_COMPLETE: Self

Joystick update is complete

Source

pub const GAMEPAD_AXIS_MOTION: Self

Gamepad axis motion

Source

pub const GAMEPAD_BUTTON_DOWN: Self

Gamepad button pressed

Source

pub const GAMEPAD_BUTTON_UP: Self

Gamepad button released

Source

pub const GAMEPAD_ADDED: Self

A new gamepad has been inserted into the system

Source

pub const GAMEPAD_REMOVED: Self

A gamepad has been removed

Source

pub const GAMEPAD_REMAPPED: Self

The gamepad mapping was updated

Source

pub const GAMEPAD_TOUCHPAD_DOWN: Self

Gamepad touchpad was touched

Source

pub const GAMEPAD_TOUCHPAD_MOTION: Self

Gamepad touchpad finger was moved

Source

pub const GAMEPAD_TOUCHPAD_UP: Self

Gamepad touchpad finger was lifted

Source

pub const GAMEPAD_SENSOR_UPDATE: Self

Gamepad sensor was updated

Source

pub const GAMEPAD_UPDATE_COMPLETE: Self

Gamepad update is complete

Source

pub const GAMEPAD_STEAM_HANDLE_UPDATED: Self

Gamepad Steam handle has changed

Source

pub const FINGER_DOWN: Self

Source

pub const FINGER_UP: Self

Source

pub const FINGER_MOTION: Self

Source

pub const FINGER_CANCELED: Self

Source

pub const PINCH_BEGIN: Self

Pinch gesture started

Source

pub const PINCH_UPDATE: Self

Pinch gesture updated

Source

pub const PINCH_END: Self

Pinch gesture ended

Source

pub const CLIPBOARD_UPDATE: Self

The clipboard changed

Source

pub const DROP_FILE: Self

The system requests a file open

Source

pub const DROP_TEXT: Self

text/plain drag-and-drop event

Source

pub const DROP_BEGIN: Self

A new set of drops is beginning (NULL filename)

Source

pub const DROP_COMPLETE: Self

Current set of drops is now complete (NULL filename)

Source

pub const DROP_POSITION: Self

Position while moving over the window

Source

pub const AUDIO_DEVICE_ADDED: Self

A new audio device is available

Source

pub const AUDIO_DEVICE_REMOVED: Self

An audio device has been removed.

Source

pub const AUDIO_DEVICE_FORMAT_CHANGED: Self

An audio device’s format has been changed by the system.

Source

pub const SENSOR_UPDATE: Self

A sensor was updated

Source

pub const PEN_PROXIMITY_IN: Self

Pressure-sensitive pen has become available

Source

pub const PEN_PROXIMITY_OUT: Self

Pressure-sensitive pen has become unavailable

Source

pub const PEN_DOWN: Self

Pressure-sensitive pen touched drawing surface

Source

pub const PEN_UP: Self

Pressure-sensitive pen stopped touching drawing surface

Source

pub const PEN_BUTTON_DOWN: Self

Pressure-sensitive pen button pressed

Source

pub const PEN_BUTTON_UP: Self

Pressure-sensitive pen button released

Source

pub const PEN_MOTION: Self

Pressure-sensitive pen is moving on the tablet

Source

pub const PEN_AXIS: Self

Pressure-sensitive pen angle/pressure/etc changed

Source

pub const CAMERA_DEVICE_ADDED: Self

A new camera device is available

Source

pub const CAMERA_DEVICE_REMOVED: Self

A camera device has been removed.

Source

pub const CAMERA_DEVICE_APPROVED: Self

A camera device has been approved for use by the user.

Source

pub const CAMERA_DEVICE_DENIED: Self

A camera device has been denied for use by the user.

Source

pub const RENDER_TARGETS_RESET: Self

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

Source

pub const RENDER_DEVICE_RESET: Self

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

Source

pub const RENDER_DEVICE_LOST: Self

The device has been lost and can’t be recovered.

Source

pub const PRIVATE0: Self

Source

pub const PRIVATE1: Self

Source

pub const PRIVATE2: Self

Source

pub const PRIVATE3: Self

Source

pub const POLL_SENTINEL: Self

Signals the end of an event poll cycle

Source

pub const USER: Self

Events SDL_EVENT_USER through SDL_EVENT_LAST are for your use, and should be allocated with SDL_RegisterEvents()

Source

pub const LAST: Self

  • This last event is only for bounding internal arrays
Source

pub const ENUM_PADDING: Self

Trait Implementations§

Source§

impl Clone for SDL_EventType

Source§

fn clone(&self) -> SDL_EventType

Returns a duplicate 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

Available on crate feature debug-impls only.
Source§

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

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

impl Default for SDL_EventType

Source§

fn default() -> SDL_EventType

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

impl From<SDL_EventType> for Uint32

Source§

fn from(value: SDL_EventType) -> Self

Converts to this type from the input type.
Source§

impl GroupMetadata for SDL_EventType

Available on crate feature metadata only.
Source§

const GROUP_METADATA: &'static Group

Metadata for this group
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 Ord for SDL_EventType

Source§

fn cmp(&self, other: &SDL_EventType) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl PartialEq<SDL_EventType> for Uint32

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<u32> for SDL_EventType

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq for SDL_EventType

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialOrd for SDL_EventType

Source§

fn partial_cmp(&self, other: &SDL_EventType) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

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

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

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

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

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

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl Copy for SDL_EventType

Source§

impl Eq 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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

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>,

Source§

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.