---
name: "SDL_EventType"
section: "3type"
platform: "linux"
package: "libsdl3-doc"
version: "3.2.10+ds-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/SDL_EventType"
---

# SDL\_EventType(3type)

The types of events that can be delivered.

## NAME

SDL\_EventType - The types of events that can be delivered.

## HEADER FILE

Defined in SDL3/SDL\_events.h

## SYNOPSIS

```
#include "SDL3/SDL.h"
```

**typedef enum SDL\_EventType** **{**     **SDL\_EVENT\_FIRST     = 0,     /\*\*\< Unused (do not remove) \*/**     **/\* Application events \*/**     **SDL\_EVENT\_QUIT           = 0x100, /\*\*\< User-requested quit \*/**     **/\* These application events have special meaning on iOS and Android, see README-ios.md and README-android.md for details \*/**     **SDL\_EVENT\_TERMINATING,      /\*\*\< 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()**                                 **\*/**     **SDL\_EVENT\_LOW\_MEMORY,       /\*\*\< 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()**                                 **\*/**     **SDL\_EVENT\_WILL\_ENTER\_BACKGROUND, /\*\*\< 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()**                                 **\*/**     **SDL\_EVENT\_DID\_ENTER\_BACKGROUND, /\*\*\< 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()**                                 **\*/**     **SDL\_EVENT\_WILL\_ENTER\_FOREGROUND, /\*\*\< 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()**                                 **\*/**     **SDL\_EVENT\_DID\_ENTER\_FOREGROUND, /\*\*\< 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()**                                 **\*/**     **SDL\_EVENT\_LOCALE\_CHANGED,  /\*\*\< The user's locale preferences have changed. \*/**     **SDL\_EVENT\_SYSTEM\_THEME\_CHANGED, /\*\*\< The system theme changed \*/**     **/\* Display events \*/**     **/\* 0x150 was SDL\_DISPLAYEVENT, reserve the number for sdl2-compat \*/**     **SDL\_EVENT\_DISPLAY\_ORIENTATION = 0x151,   /\*\*\< Display orientation has changed to data1 \*/**     **SDL\_EVENT\_DISPLAY\_ADDED,                 /\*\*\< Display has been added to the system \*/**     **SDL\_EVENT\_DISPLAY\_REMOVED,               /\*\*\< Display has been removed from the system \*/**     **SDL\_EVENT\_DISPLAY\_MOVED,                 /\*\*\< Display has changed position \*/**     **SDL\_EVENT\_DISPLAY\_DESKTOP\_MODE\_CHANGED,  /\*\*\< Display has changed desktop mode \*/**     **SDL\_EVENT\_DISPLAY\_CURRENT\_MODE\_CHANGED,  /\*\*\< Display has changed current mode \*/**     **SDL\_EVENT\_DISPLAY\_CONTENT\_SCALE\_CHANGED, /\*\*\< Display has changed content scale \*/**     **SDL\_EVENT\_DISPLAY\_FIRST = SDL\_EVENT\_DISPLAY\_ORIENTATION,**     **SDL\_EVENT\_DISPLAY\_LAST = SDL\_EVENT\_DISPLAY\_CONTENT\_SCALE\_CHANGED,**     **/\* Window events \*/**     **/\* 0x200 was SDL\_WINDOWEVENT, reserve the number for sdl2-compat \*/**     **/\* 0x201 was SDL\_SYSWMEVENT, reserve the number for sdl2-compat \*/**     **SDL\_EVENT\_WINDOW\_SHOWN = 0x202,     /\*\*\< Window has been shown \*/**     **SDL\_EVENT\_WINDOW\_HIDDEN,            /\*\*\< Window has been hidden \*/**     **SDL\_EVENT\_WINDOW\_EXPOSED,           /\*\*\< Window has been exposed and should be redrawn, and can be redrawn directly from event watchers for this event \*/**     **SDL\_EVENT\_WINDOW\_MOVED,             /\*\*\< Window has been moved to data1, data2 \*/**     **SDL\_EVENT\_WINDOW\_RESIZED,           /\*\*\< Window has been resized to data1xdata2 \*/**     **SDL\_EVENT\_WINDOW\_PIXEL\_SIZE\_CHANGED,/\*\*\< The pixel size of the window has changed to data1xdata2 \*/**     **SDL\_EVENT\_WINDOW\_METAL\_VIEW\_RESIZED,/\*\*\< The pixel size of a Metal view associated with the window has changed \*/**     **SDL\_EVENT\_WINDOW\_MINIMIZED,         /\*\*\< Window has been minimized \*/**     **SDL\_EVENT\_WINDOW\_MAXIMIZED,         /\*\*\< Window has been maximized \*/**     **SDL\_EVENT\_WINDOW\_RESTORED,          /\*\*\< Window has been restored to normal size and position \*/**     **SDL\_EVENT\_WINDOW\_MOUSE\_ENTER,       /\*\*\< Window has gained mouse focus \*/**     **SDL\_EVENT\_WINDOW\_MOUSE\_LEAVE,       /\*\*\< Window has lost mouse focus \*/**     **SDL\_EVENT\_WINDOW\_FOCUS\_GAINED,      /\*\*\< Window has gained keyboard focus \*/**     **SDL\_EVENT\_WINDOW\_FOCUS\_LOST,        /\*\*\< Window has lost keyboard focus \*/**     **SDL\_EVENT\_WINDOW\_CLOSE\_REQUESTED,   /\*\*\< The window manager requests that the window be closed \*/**     **SDL\_EVENT\_WINDOW\_HIT\_TEST,          /\*\*\< Window had a hit test that wasn't SDL\_HITTEST\_NORMAL \*/**     **SDL\_EVENT\_WINDOW\_ICCPROF\_CHANGED,   /\*\*\< The ICC profile of the window's display has changed \*/**     **SDL\_EVENT\_WINDOW\_DISPLAY\_CHANGED,   /\*\*\< Window has been moved to display data1 \*/**     **SDL\_EVENT\_WINDOW\_DISPLAY\_SCALE\_CHANGED, /\*\*\< Window display scale has been changed \*/**     **SDL\_EVENT\_WINDOW\_SAFE\_AREA\_CHANGED, /\*\*\< The window safe area has been changed \*/**     **SDL\_EVENT\_WINDOW\_OCCLUDED,          /\*\*\< The window has been occluded \*/**     **SDL\_EVENT\_WINDOW\_ENTER\_FULLSCREEN,  /\*\*\< The window has entered fullscreen mode \*/**     **SDL\_EVENT\_WINDOW\_LEAVE\_FULLSCREEN,  /\*\*\< The window has left fullscreen mode \*/**     **SDL\_EVENT\_WINDOW\_DESTROYED,         /\*\*\< 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 \*/**     **SDL\_EVENT\_WINDOW\_HDR\_STATE\_CHANGED, /\*\*\< Window HDR properties have changed \*/**     **SDL\_EVENT\_WINDOW\_FIRST = SDL\_EVENT\_WINDOW\_SHOWN,**     **SDL\_EVENT\_WINDOW\_LAST = SDL\_EVENT\_WINDOW\_HDR\_STATE\_CHANGED,**     **/\* Keyboard events \*/**     **SDL\_EVENT\_KEY\_DOWN        = 0x300, /\*\*\< Key pressed \*/**     **SDL\_EVENT\_KEY\_UP,                  /\*\*\< Key released \*/**     **SDL\_EVENT\_TEXT\_EDITING,            /\*\*\< Keyboard text editing (composition) \*/**     **SDL\_EVENT\_TEXT\_INPUT,              /\*\*\< Keyboard text input \*/**     **SDL\_EVENT\_KEYMAP\_CHANGED,          /\*\*\< Keymap changed due to a system event such as an**                                             **input language or keyboard layout change. \*/**     **SDL\_EVENT\_KEYBOARD\_ADDED,          /\*\*\< A new keyboard has been inserted into the system \*/**     **SDL\_EVENT\_KEYBOARD\_REMOVED,        /\*\*\< A keyboard has been removed \*/**     **SDL\_EVENT\_TEXT\_EDITING\_CANDIDATES, /\*\*\< Keyboard text editing candidates \*/**     **/\* Mouse events \*/**     **SDL\_EVENT\_MOUSE\_MOTION    = 0x400, /\*\*\< Mouse moved \*/**     **SDL\_EVENT\_MOUSE\_BUTTON\_DOWN,       /\*\*\< Mouse button pressed \*/**     **SDL\_EVENT\_MOUSE\_BUTTON\_UP,         /\*\*\< Mouse button released \*/**     **SDL\_EVENT\_MOUSE\_WHEEL,             /\*\*\< Mouse wheel motion \*/**     **SDL\_EVENT\_MOUSE\_ADDED,             /\*\*\< A new mouse has been inserted into the system \*/**     **SDL\_EVENT\_MOUSE\_REMOVED,           /\*\*\< A mouse has been removed \*/**     **/\* Joystick events \*/**     **SDL\_EVENT\_JOYSTICK\_AXIS\_MOTION  = 0x600, /\*\*\< Joystick axis motion \*/**     **SDL\_EVENT\_JOYSTICK\_BALL\_MOTION,          /\*\*\< Joystick trackball motion \*/**     **SDL\_EVENT\_JOYSTICK\_HAT\_MOTION,           /\*\*\< Joystick hat position change \*/**     **SDL\_EVENT\_JOYSTICK\_BUTTON\_DOWN,          /\*\*\< Joystick button pressed \*/**     **SDL\_EVENT\_JOYSTICK\_BUTTON\_UP,            /\*\*\< Joystick button released \*/**     **SDL\_EVENT\_JOYSTICK\_ADDED,                /\*\*\< A new joystick has been inserted into the system \*/**     **SDL\_EVENT\_JOYSTICK\_REMOVED,              /\*\*\< An opened joystick has been removed \*/**     **SDL\_EVENT\_JOYSTICK\_BATTERY\_UPDATED,      /\*\*\< Joystick battery level change \*/**     **SDL\_EVENT\_JOYSTICK\_UPDATE\_COMPLETE,      /\*\*\< Joystick update is complete \*/**     **/\* Gamepad events \*/**     **SDL\_EVENT\_GAMEPAD\_AXIS\_MOTION  = 0x650, /\*\*\< Gamepad axis motion \*/**     **SDL\_EVENT\_GAMEPAD\_BUTTON\_DOWN,          /\*\*\< Gamepad button pressed \*/**     **SDL\_EVENT\_GAMEPAD\_BUTTON\_UP,            /\*\*\< Gamepad button released \*/**     **SDL\_EVENT\_GAMEPAD\_ADDED,                /\*\*\< A new gamepad has been inserted into the system \*/**     **SDL\_EVENT\_GAMEPAD\_REMOVED,              /\*\*\< A gamepad has been removed \*/**     **SDL\_EVENT\_GAMEPAD\_REMAPPED,             /\*\*\< The gamepad mapping was updated \*/**     **SDL\_EVENT\_GAMEPAD\_TOUCHPAD\_DOWN,        /\*\*\< Gamepad touchpad was touched \*/**     **SDL\_EVENT\_GAMEPAD\_TOUCHPAD\_MOTION,      /\*\*\< Gamepad touchpad finger was moved \*/**     **SDL\_EVENT\_GAMEPAD\_TOUCHPAD\_UP,          /\*\*\< Gamepad touchpad finger was lifted \*/**     **SDL\_EVENT\_GAMEPAD\_SENSOR\_UPDATE,        /\*\*\< Gamepad sensor was updated \*/**     **SDL\_EVENT\_GAMEPAD\_UPDATE\_COMPLETE,      /\*\*\< Gamepad update is complete \*/**     **SDL\_EVENT\_GAMEPAD\_STEAM\_HANDLE\_UPDATED,  /\*\*\< Gamepad Steam handle has changed \*/**     **/\* Touch events \*/**     **SDL\_EVENT\_FINGER\_DOWN      = 0x700,**     **SDL\_EVENT\_FINGER\_UP,**     **SDL\_EVENT\_FINGER\_MOTION,**     **SDL\_EVENT\_FINGER\_CANCELED,**     **/\* 0x800, 0x801, and 0x802 were the Gesture events from SDL2. Do not reuse these values! sdl2-compat needs them! \*/**     **/\* Clipboard events \*/**     **SDL\_EVENT\_CLIPBOARD\_UPDATE = 0x900, /\*\*\< The clipboard or primary selection changed \*/**     **/\* Drag and drop events \*/**     **SDL\_EVENT\_DROP\_FILE        = 0x1000, /\*\*\< The system requests a file open \*/**     **SDL\_EVENT\_DROP\_TEXT,                 /\*\*\< text/plain drag-and-drop event \*/**     **SDL\_EVENT\_DROP\_BEGIN,                /\*\*\< A new set of drops is beginning (NULL filename) \*/**     **SDL\_EVENT\_DROP\_COMPLETE,             /\*\*\< Current set of drops is now complete (NULL filename) \*/**     **SDL\_EVENT\_DROP\_POSITION,             /\*\*\< Position while moving over the window \*/**     **/\* Audio hotplug events \*/**     **SDL\_EVENT\_AUDIO\_DEVICE\_ADDED = 0x1100,  /\*\*\< A new audio device is available \*/**     **SDL\_EVENT\_AUDIO\_DEVICE\_REMOVED,         /\*\*\< An audio device has been removed. \*/**     **SDL\_EVENT\_AUDIO\_DEVICE\_FORMAT\_CHANGED,  /\*\*\< An audio device's format has been changed by the system. \*/**     **/\* Sensor events \*/**     **SDL\_EVENT\_SENSOR\_UPDATE = 0x1200,     /\*\*\< A sensor was updated \*/**     **/\* Pressure-sensitive pen events \*/**     **SDL\_EVENT\_PEN\_PROXIMITY\_IN = 0x1300,  /\*\*\< Pressure-sensitive pen has become available \*/**     **SDL\_EVENT\_PEN\_PROXIMITY\_OUT,          /\*\*\< Pressure-sensitive pen has become unavailable \*/**     **SDL\_EVENT\_PEN\_DOWN,                   /\*\*\< Pressure-sensitive pen touched drawing surface \*/**     **SDL\_EVENT\_PEN\_UP,                     /\*\*\< Pressure-sensitive pen stopped touching drawing surface \*/**     **SDL\_EVENT\_PEN\_BUTTON\_DOWN,            /\*\*\< Pressure-sensitive pen button pressed \*/**     **SDL\_EVENT\_PEN\_BUTTON\_UP,              /\*\*\< Pressure-sensitive pen button released \*/**     **SDL\_EVENT\_PEN\_MOTION,                 /\*\*\< Pressure-sensitive pen is moving on the tablet \*/**     **SDL\_EVENT\_PEN\_AXIS,                   /\*\*\< Pressure-sensitive pen angle/pressure/etc changed \*/**     **/\* Camera hotplug events \*/**     **SDL\_EVENT\_CAMERA\_DEVICE\_ADDED = 0x1400,  /\*\*\< A new camera device is available \*/**     **SDL\_EVENT\_CAMERA\_DEVICE\_REMOVED,         /\*\*\< A camera device has been removed. \*/**     **SDL\_EVENT\_CAMERA\_DEVICE\_APPROVED,        /\*\*\< A camera device has been approved for use by the user. \*/**     **SDL\_EVENT\_CAMERA\_DEVICE\_DENIED,          /\*\*\< A camera device has been denied for use by the user. \*/**     **/\* Render events \*/**     **SDL\_EVENT\_RENDER\_TARGETS\_RESET = 0x2000, /\*\*\< The render targets have been reset and their contents need to be updated \*/**     **SDL\_EVENT\_RENDER\_DEVICE\_RESET, /\*\*\< The device has been reset and all textures need to be recreated \*/**     **SDL\_EVENT\_RENDER\_DEVICE\_LOST, /\*\*\< The device has been lost and can't be recovered. \*/**     **/\* Reserved events for private platforms \*/**     **SDL\_EVENT\_PRIVATE0 = 0x4000,**     **SDL\_EVENT\_PRIVATE1,**     **SDL\_EVENT\_PRIVATE2,**     **SDL\_EVENT\_PRIVATE3,**     **/\* Internal events \*/**     **SDL\_EVENT\_POLL\_SENTINEL = 0x7F00, /\*\*\< Signals the end of an event poll cycle \*/**     **/\*\* Events SDL\_EVENT\_USER through SDL\_EVENT\_LAST are for your use,**      **\*  and should be allocated with SDL\_RegisterEvents()**      **\*/**     **SDL\_EVENT\_USER    = 0x8000,**     **/\*\***      **\*  This last event is only for bounding internal arrays**      **\*/**     **SDL\_EVENT\_LAST    = 0xFFFF,**     **/\* This just makes sure the enum is the size of Uint32 \*/**     **SDL\_EVENT\_ENUM\_PADDING = 0x7FFFFFFF** **} SDL\_EventType;**

## AVAILABILITY

This enum is available since SDL 3.2.0.
