SDL_events.h
Go to the documentation of this file.
/*
Simple DirectMedia Layer
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
/**
* # CategoryEvents
*
* Include file for SDL event handling.
*/
#ifndef SDL_events_h_
#define SDL_events_h_
#include "SDL_stdinc.h"
#include "SDL_error.h"
#include "SDL_video.h"
#include "SDL_keyboard.h"
#include "SDL_mouse.h"
#include "SDL_joystick.h"
#include "SDL_gamecontroller.h"
#include "SDL_quit.h"
#include "SDL_gesture.h"
#include "SDL_touch.h"
#include "begin_code.h"
/* Set up for C function definitions, even when using C++ */
#ifdef __cplusplus
extern "C" {
#endif
/* General keyboard/mouse state definitions */
#define SDL_RELEASED 0
#define SDL_PRESSED 1
/**
* The types of events that can be delivered.
*/
typedef enum SDL_EventType
{
SDL_FIRSTEVENT = 0, /**< Unused (do not remove) */
/* Application events */
SDL_QUIT = 0x100, /**< User-requested quit */
/* These application events have special meaning on iOS, see README-ios.md for details */
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. */
/* Display events */
SDL_DISPLAYEVENT = 0x150, /**< Display state change */
/* Window events */
SDL_WINDOWEVENT = 0x200, /**< Window state change */
SDL_SYSWMEVENT, /**< System specific event */
/* Keyboard events */
SDL_KEYDOWN = 0x300, /**< 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_TEXTEDITING_EXT, /**< Extended keyboard text editing (composition) */
/* Mouse events */
SDL_MOUSEMOTION = 0x400, /**< Mouse moved */
SDL_MOUSEBUTTONDOWN, /**< Mouse button pressed */
SDL_MOUSEBUTTONUP, /**< Mouse button released */
SDL_MOUSEWHEEL, /**< Mouse wheel motion */
/* Joystick events */
SDL_JOYAXISMOTION = 0x600, /**< 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_JOYBATTERYUPDATED, /**< Joystick battery level change */
/* Game controller events */
SDL_CONTROLLERAXISMOTION = 0x650, /**< 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_CONTROLLERUPDATECOMPLETE_RESERVED_FOR_SDL3,
SDL_CONTROLLERSTEAMHANDLEUPDATED, /**< Game controller Steam handle has changed */
/* Touch events */
SDL_FINGERDOWN = 0x700,
SDL_FINGERUP,
SDL_FINGERMOTION,
/* Gesture events */
SDL_DOLLARGESTURE = 0x800,
SDL_DOLLARRECORD,
SDL_MULTIGESTURE,
/* Clipboard events */
SDL_CLIPBOARDUPDATE = 0x900, /**< The clipboard or primary selection changed */
/* Drag and drop events */
SDL_DROPFILE = 0x1000, /**< 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) */
/* Audio hotplug events */
SDL_AUDIODEVICEADDED = 0x1100, /**< A new audio device is available */
SDL_AUDIODEVICEREMOVED, /**< An audio device has been removed. */
/* Sensor events */
SDL_SENSORUPDATE = 0x1200, /**< A sensor was updated */
/* Render events */
SDL_RENDER_TARGETS_RESET = 0x2000, /**< 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 */
/* Internal events */
SDL_POLLSENTINEL = 0x7F00, /**< Signals the end of an event poll cycle */
/** Events SDL_USEREVENT through SDL_LASTEVENT are for your use,
* and should be allocated with SDL_RegisterEvents()
*/
SDL_USEREVENT = 0x8000,
/**
* This last event is only for bounding internal arrays
*/
SDL_LASTEVENT = 0xFFFF
} SDL_EventType;
/**
* Fields shared by every event
*/
typedef struct SDL_CommonEvent
{
Uint32 type;
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
} SDL_CommonEvent;
/**
* Display state change event data (event.display.*)
*/
typedef struct SDL_DisplayEvent
{
Uint32 type; /**< SDL_DISPLAYEVENT */
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
Uint32 display; /**< The associated display index */
Uint8 event; /**< SDL_DisplayEventID */
Uint8 padding1;
Uint8 padding2;
Uint8 padding3;
Sint32 data1; /**< event dependent data */
} SDL_DisplayEvent;
/**
* Window state change event data (event.window.*)
*/
typedef struct SDL_WindowEvent
{
Uint32 type; /**< SDL_WINDOWEVENT */
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
Uint32 windowID; /**< The associated window */
Uint8 event; /**< SDL_WindowEventID */
Uint8 padding1;
Uint8 padding2;
Uint8 padding3;
Sint32 data1; /**< event dependent data */
Sint32 data2; /**< event dependent data */
} SDL_WindowEvent;
/**
* Keyboard button event structure (event.key.*)
*/
typedef struct SDL_KeyboardEvent
{
Uint32 type; /**< SDL_KEYDOWN or SDL_KEYUP */
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
Uint32 windowID; /**< The window with keyboard focus, if any */
Uint8 state; /**< SDL_PRESSED or SDL_RELEASED */
Uint8 repeat; /**< Non-zero if this is a key repeat */
Uint8 padding2;
Uint8 padding3;
SDL_Keysym keysym; /**< The key that was pressed or released */
} SDL_KeyboardEvent;
#define SDL_TEXTEDITINGEVENT_TEXT_SIZE (32)
/**
* Keyboard text editing event structure (event.edit.*)
*/
typedef struct SDL_TextEditingEvent
{
Uint32 type; /**< SDL_TEXTEDITING */
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
Uint32 windowID; /**< The window with keyboard focus, if any */
char text[SDL_TEXTEDITINGEVENT_TEXT_SIZE]; /**< The editing text */
Sint32 start; /**< The start cursor of selected editing text */
Sint32 length; /**< The length of selected editing text */
} SDL_TextEditingEvent;
/**
* Extended keyboard text editing event structure (event.editExt.*) when text
* would be truncated if stored in the text buffer SDL_TextEditingEvent
*/
typedef struct SDL_TextEditingExtEvent
{
Uint32 type; /**< SDL_TEXTEDITING_EXT */
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
Uint32 windowID; /**< The window with keyboard focus, if any */
char* text; /**< The editing text, which should be freed with SDL_free(), and will not be NULL */
Sint32 start; /**< The start cursor of selected editing text */
Sint32 length; /**< The length of selected editing text */
} SDL_TextEditingExtEvent;
/**
* The maximum bytes of text that can be supplied in an SDL_TextInputEvent.
*/
#define SDL_TEXTINPUTEVENT_TEXT_SIZE (32)
/**
* Keyboard text input event structure (event.text.*)
*
* `text` is limited to SDL_TEXTINPUTEVENT_TEXT_SIZE bytes. If the incoming
* string is larger than this, SDL will split it and send it in pieces, across
* multiple events. The string is in UTF-8 format, and if split, SDL
* guarantees that it will not split in the middle of a UTF-8 sequence, so any
* event will only contain complete codepoints. However, if there are several
* codepoints that go together into a single glyph (like an emoji "thumbs up"
* followed by a skin color), they may be split between events.
*
* This event will never be delivered unless text input is enabled by calling
* SDL_StartTextInput(). Text input is enabled by default on desktop
* platforms, and disabled by default on mobile platforms!
*
* \sa SDL_StartTextInput
* \sa SDL_StopTextInput
*/
typedef struct SDL_TextInputEvent
{
Uint32 type; /**< SDL_TEXTINPUT */
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
Uint32 windowID; /**< The window with keyboard focus, if any */
char text[SDL_TEXTINPUTEVENT_TEXT_SIZE]; /**< The input text; UTF-8 encoded. */
} SDL_TextInputEvent;
/**
* Mouse motion event structure (event.motion.*)
*/
typedef struct SDL_MouseMotionEvent
{
Uint32 type; /**< SDL_MOUSEMOTION */
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
Uint32 windowID; /**< The window with mouse focus, if any */
Uint32 which; /**< The mouse instance id, or SDL_TOUCH_MOUSEID */
Uint32 state; /**< The current button state */
Sint32 x; /**< X coordinate, relative to window */
Sint32 y; /**< Y coordinate, relative to window */
Sint32 xrel; /**< The relative motion in the X direction */
Sint32 yrel; /**< The relative motion in the Y direction */
} SDL_MouseMotionEvent;
/**
* Mouse button event structure (event.button.*)
*/
typedef struct SDL_MouseButtonEvent
{
Uint32 type; /**< SDL_MOUSEBUTTONDOWN or SDL_MOUSEBUTTONUP */
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
Uint32 windowID; /**< The window with mouse focus, if any */
Uint32 which; /**< The mouse instance id, or SDL_TOUCH_MOUSEID */
Uint8 button; /**< The mouse button index */
Uint8 state; /**< SDL_PRESSED or SDL_RELEASED */
Uint8 clicks; /**< 1 for single-click, 2 for double-click, etc. */
Uint8 padding1;
Sint32 x; /**< X coordinate, relative to window */
Sint32 y; /**< Y coordinate, relative to window */
} SDL_MouseButtonEvent;
/**
* Mouse wheel event structure (event.wheel.*)
*/
typedef struct SDL_MouseWheelEvent
{
Uint32 type; /**< SDL_MOUSEWHEEL */
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
Uint32 windowID; /**< The window with mouse focus, if any */
Uint32 which; /**< The mouse instance id, or SDL_TOUCH_MOUSEID */
Sint32 x; /**< The amount scrolled horizontally, positive to the right and negative to the left */
Sint32 y; /**< The amount scrolled vertically, positive away from the user and negative toward the user */
Uint32 direction; /**< Set to one of the SDL_MOUSEWHEEL_* defines. When FLIPPED the values in X and Y will be opposite. Multiply by -1 to change them back */
float preciseX; /**< The amount scrolled horizontally, positive to the right and negative to the left, with float precision (added in 2.0.18) */
float preciseY; /**< The amount scrolled vertically, positive away from the user and negative toward the user, with float precision (added in 2.0.18) */
Sint32 mouseX; /**< X coordinate, relative to window (added in 2.26.0) */
Sint32 mouseY; /**< Y coordinate, relative to window (added in 2.26.0) */
} SDL_MouseWheelEvent;
/**
* Joystick axis motion event structure (event.jaxis.*)
*/
typedef struct SDL_JoyAxisEvent
{
Uint32 type; /**< SDL_JOYAXISMOTION */
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
SDL_JoystickID which; /**< The joystick instance id */
Uint8 axis; /**< The joystick axis index */
Uint8 padding1;
Uint8 padding2;
Uint8 padding3;
Sint16 value; /**< The axis value (range: -32768 to 32767) */
Uint16 padding4;
} SDL_JoyAxisEvent;
/**
* Joystick trackball motion event structure (event.jball.*)
*/
typedef struct SDL_JoyBallEvent
{
Uint32 type; /**< SDL_JOYBALLMOTION */
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
SDL_JoystickID which; /**< The joystick instance id */
Uint8 ball; /**< The joystick trackball index */
Uint8 padding1;
Uint8 padding2;
Uint8 padding3;
Sint16 xrel; /**< The relative motion in the X direction */
Sint16 yrel; /**< The relative motion in the Y direction */
} SDL_JoyBallEvent;
/**
* Joystick hat position change event structure (event.jhat.*)
*/
typedef struct SDL_JoyHatEvent
{
Uint32 type; /**< SDL_JOYHATMOTION */
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
SDL_JoystickID which; /**< The joystick instance id */
Uint8 hat; /**< The joystick hat index */
Uint8 value; /**< The hat position value.
* \sa SDL_HAT_LEFTUP SDL_HAT_UP SDL_HAT_RIGHTUP
* \sa SDL_HAT_LEFT SDL_HAT_CENTERED SDL_HAT_RIGHT
* \sa SDL_HAT_LEFTDOWN SDL_HAT_DOWN SDL_HAT_RIGHTDOWN
*
* Note that zero means the POV is centered.
*/
Uint8 padding1;
Uint8 padding2;
} SDL_JoyHatEvent;
/**
* Joystick button event structure (event.jbutton.*)
*/
typedef struct SDL_JoyButtonEvent
{
Uint32 type; /**< SDL_JOYBUTTONDOWN or SDL_JOYBUTTONUP */
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
SDL_JoystickID which; /**< The joystick instance id */
Uint8 button; /**< The joystick button index */
Uint8 state; /**< SDL_PRESSED or SDL_RELEASED */
Uint8 padding1;
Uint8 padding2;
} SDL_JoyButtonEvent;
/**
* Joystick device event structure (event.jdevice.*)
*
* SDL will send JOYSTICK_ADDED events for devices that are already plugged in
* during SDL_Init.
*
* \sa SDL_ControllerDeviceEvent
*/
typedef struct SDL_JoyDeviceEvent
{
Uint32 type; /**< SDL_JOYDEVICEADDED or SDL_JOYDEVICEREMOVED */
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
Sint32 which; /**< The joystick device index for the ADDED event, instance id for the REMOVED event */
} SDL_JoyDeviceEvent;
/**
* Joysick battery level change event structure (event.jbattery.*)
*/
typedef struct SDL_JoyBatteryEvent
{
Uint32 type; /**< SDL_JOYBATTERYUPDATED */
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
SDL_JoystickID which; /**< The joystick instance id */
SDL_JoystickPowerLevel level; /**< The joystick battery level */
} SDL_JoyBatteryEvent;
/**
* Game controller axis motion event structure (event.caxis.*)
*/
typedef struct SDL_ControllerAxisEvent
{
Uint32 type; /**< SDL_CONTROLLERAXISMOTION */
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
SDL_JoystickID which; /**< The joystick instance id */
Uint8 axis; /**< The controller axis (SDL_GameControllerAxis) */
Uint8 padding1;
Uint8 padding2;
Uint8 padding3;
Sint16 value; /**< The axis value (range: -32768 to 32767) */
Uint16 padding4;
} SDL_ControllerAxisEvent;
/**
* Game controller button event structure (event.cbutton.*)
*/
typedef struct SDL_ControllerButtonEvent
{
Uint32 type; /**< SDL_CONTROLLERBUTTONDOWN or SDL_CONTROLLERBUTTONUP */
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
SDL_JoystickID which; /**< The joystick instance id */
Uint8 button; /**< The controller button (SDL_GameControllerButton) */
Uint8 state; /**< SDL_PRESSED or SDL_RELEASED */
Uint8 padding1;
Uint8 padding2;
} SDL_ControllerButtonEvent;
/**
* Controller device event structure (event.cdevice.*)
*
* Joysticks that are supported game controllers receive both an
* SDL_JoyDeviceEvent and an SDL_ControllerDeviceEvent.
*
* SDL will send CONTROLLERDEVICEADDED events for joysticks that are already
* plugged in during SDL_Init() and are recognized as game controllers.
*/
typedef struct SDL_ControllerDeviceEvent
{
Uint32 type; /**< SDL_CONTROLLERDEVICEADDED, SDL_CONTROLLERDEVICEREMOVED, SDL_CONTROLLERDEVICEREMAPPED, or SDL_CONTROLLERSTEAMHANDLEUPDATED */
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
Sint32 which; /**< The joystick device index for the ADDED event, instance id for the REMOVED or REMAPPED event */
} SDL_ControllerDeviceEvent;
/**
* Game controller touchpad event structure (event.ctouchpad.*)
*/
typedef struct SDL_ControllerTouchpadEvent
{
Uint32 type; /**< SDL_CONTROLLERTOUCHPADDOWN or SDL_CONTROLLERTOUCHPADMOTION or SDL_CONTROLLERTOUCHPADUP */
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
SDL_JoystickID which; /**< The joystick instance id */
Sint32 touchpad; /**< The index of the touchpad */
Sint32 finger; /**< The index of the finger on the touchpad */
float x; /**< Normalized in the range 0...1 with 0 being on the left */
float y; /**< Normalized in the range 0...1 with 0 being at the top */
float pressure; /**< Normalized in the range 0...1 */
} SDL_ControllerTouchpadEvent;
/**
* Game controller sensor event structure (event.csensor.*)
*/
typedef struct SDL_ControllerSensorEvent
{
Uint32 type; /**< SDL_CONTROLLERSENSORUPDATE */
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
SDL_JoystickID which; /**< The joystick instance id */
Sint32 sensor; /**< The type of the sensor, one of the values of SDL_SensorType */
float data[3]; /**< Up to 3 values from the sensor, as defined in SDL_sensor.h */
Uint64 timestamp_us; /**< The timestamp of the sensor reading in microseconds, if the hardware provides this information. */
} SDL_ControllerSensorEvent;
/**
* Audio device event structure (event.adevice.*)
*/
typedef struct SDL_AudioDeviceEvent
{
Uint32 type; /**< SDL_AUDIODEVICEADDED, or SDL_AUDIODEVICEREMOVED */
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
Uint32 which; /**< The audio device index for the ADDED event (valid until next SDL_GetNumAudioDevices() call), SDL_AudioDeviceID for the REMOVED event */
Uint8 iscapture; /**< zero if an output device, non-zero if a capture device. */
Uint8 padding1;
Uint8 padding2;
Uint8 padding3;
} SDL_AudioDeviceEvent;
/**
* Touch finger event structure (event.tfinger.*)
*/
typedef struct SDL_TouchFingerEvent
{
Uint32 type; /**< SDL_FINGERMOTION or SDL_FINGERDOWN or SDL_FINGERUP */
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
SDL_TouchID touchId; /**< The touch device id */
SDL_FingerID fingerId;
float x; /**< Normalized in the range 0...1 */
float y; /**< Normalized in the range 0...1 */
float dx; /**< Normalized in the range -1...1 */
float dy; /**< Normalized in the range -1...1 */
float pressure; /**< Normalized in the range 0...1 */
Uint32 windowID; /**< The window underneath the finger, if any */
} SDL_TouchFingerEvent;
/**
* Multiple Finger Gesture Event (event.mgesture.*)
*/
typedef struct SDL_MultiGestureEvent
{
Uint32 type; /**< SDL_MULTIGESTURE */
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
SDL_TouchID touchId; /**< The touch device id */
float dTheta;
float dDist;
float x;
float y;
Uint16 numFingers;
Uint16 padding;
} SDL_MultiGestureEvent;
/**
* Dollar Gesture Event (event.dgesture.*)
*/
typedef struct SDL_DollarGestureEvent
{
Uint32 type; /**< SDL_DOLLARGESTURE or SDL_DOLLARRECORD */
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
SDL_TouchID touchId; /**< The touch device id */
SDL_GestureID gestureId;
Uint32 numFingers;
float error;
float x; /**< Normalized center of gesture */
float y; /**< Normalized center of gesture */
} SDL_DollarGestureEvent;
/**
* An event used to request a file open by the system (event.drop.*)
*
* This event is enabled by default, you can disable it with SDL_EventState().
*
* If this event is enabled, you must free the filename in the event.
*/
typedef struct SDL_DropEvent
{
Uint32 type; /**< SDL_DROPBEGIN or SDL_DROPFILE or SDL_DROPTEXT or SDL_DROPCOMPLETE */
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
char *file; /**< The file name, which should be freed with SDL_free(), is NULL on begin/complete */
Uint32 windowID; /**< The window that was dropped on, if any */
} SDL_DropEvent;
/**
* Sensor event structure (event.sensor.*)
*/
typedef struct SDL_SensorEvent
{
Uint32 type; /**< SDL_SENSORUPDATE */
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
Sint32 which; /**< The instance ID of the sensor */
float data[6]; /**< Up to 6 values from the sensor - additional values can be queried using SDL_SensorGetData() */
Uint64 timestamp_us; /**< The timestamp of the sensor reading in microseconds, if the hardware provides this information. */
} SDL_SensorEvent;
/**
* The "quit requested" event
*/
typedef struct SDL_QuitEvent
{
Uint32 type; /**< SDL_QUIT */
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
} SDL_QuitEvent;
/**
* A user-defined event type (event.user.*)
*/
typedef struct SDL_UserEvent
{
Uint32 type; /**< SDL_USEREVENT through SDL_LASTEVENT-1 */
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
Uint32 windowID; /**< The associated window if any */
Sint32 code; /**< User defined event code */
void *data1; /**< User defined data pointer */
void *data2; /**< User defined data pointer */
} SDL_UserEvent;
struct SDL_SysWMmsg;
typedef struct SDL_SysWMmsg SDL_SysWMmsg;
/**
* A video driver dependent system event (event.syswm.*)
*
* This event is disabled by default, you can enable it with SDL_EventState()
*
* If you want to use this event, you should include SDL_syswm.h.
*/
typedef struct SDL_SysWMEvent
{
Uint32 type; /**< SDL_SYSWMEVENT */
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
SDL_SysWMmsg *msg; /**< driver dependent data, defined in SDL_syswm.h */
} SDL_SysWMEvent;
/**
* General event structure
*
* The SDL_Event structure is the core of all event handling in SDL. SDL_Event
* is a union of all event structures used in SDL.
*/
typedef union SDL_Event
{
Uint32 type; /**< Event type, shared with all events */
SDL_CommonEvent common; /**< Common event data */
SDL_DisplayEvent display; /**< Display event data */
SDL_WindowEvent window; /**< Window event data */
SDL_KeyboardEvent key; /**< Keyboard event data */
SDL_TextEditingEvent edit; /**< Text editing event data */
SDL_TextEditingExtEvent editExt; /**< Extended text editing event data */
SDL_TextInputEvent text; /**< Text input event data */
SDL_MouseMotionEvent motion; /**< Mouse motion event data */
SDL_MouseButtonEvent button; /**< Mouse button event data */
SDL_MouseWheelEvent wheel; /**< Mouse wheel event data */
SDL_JoyAxisEvent jaxis; /**< Joystick axis event data */
SDL_JoyBallEvent jball; /**< Joystick ball event data */
SDL_JoyHatEvent jhat; /**< Joystick hat event data */
SDL_JoyButtonEvent jbutton; /**< Joystick button event data */
SDL_JoyDeviceEvent jdevice; /**< Joystick device change event data */
SDL_JoyBatteryEvent jbattery; /**< Joystick battery event data */
SDL_ControllerAxisEvent caxis; /**< Game Controller axis event data */
SDL_ControllerButtonEvent cbutton; /**< Game Controller button event data */
SDL_ControllerDeviceEvent cdevice; /**< Game Controller device event data */
SDL_ControllerTouchpadEvent ctouchpad; /**< Game Controller touchpad event data */
SDL_ControllerSensorEvent csensor; /**< Game Controller sensor event data */
SDL_AudioDeviceEvent adevice; /**< Audio device event data */
SDL_SensorEvent sensor; /**< Sensor event data */
SDL_QuitEvent quit; /**< Quit request event data */
SDL_UserEvent user; /**< Custom event data */
SDL_SysWMEvent syswm; /**< System dependent window event data */
SDL_TouchFingerEvent tfinger; /**< Touch finger event data */
SDL_MultiGestureEvent mgesture; /**< Gesture event data */
SDL_DollarGestureEvent dgesture; /**< Gesture event data */
SDL_DropEvent drop; /**< Drag and drop event data */
/* This is necessary for ABI compatibility between Visual C++ and GCC.
Visual C++ will respect the push pack pragma and use 52 bytes (size of
SDL_TextEditingEvent, the largest structure for 32-bit and 64-bit
architectures) for this union, and GCC will use the alignment of the
largest datatype within the union, which is 8 bytes on 64-bit
architectures.
So... we'll add padding to force the size to be 56 bytes for both.
On architectures where pointers are 16 bytes, this needs rounding up to
the next multiple of 16, 64, and on architectures where pointers are
even larger the size of SDL_UserEvent will dominate as being 3 pointers.
*/
Uint8 padding[sizeof(void *) <= 8 ? 56 : sizeof(void *) == 16 ? 64 : 3 * sizeof(void *)];
} SDL_Event;
/* Make sure we haven't broken binary compatibility */
SDL_COMPILE_TIME_ASSERT(SDL_Event, sizeof(SDL_Event) == sizeof(((SDL_Event *)NULL)->padding));
/* Function prototypes */
/**
* Pump the event loop, gathering events from the input devices.
*
* This function updates the event queue and internal input device state.
*
* **WARNING**: This should only be run in the thread that initialized the
* video subsystem, and for extra safety, you should consider only doing those
* things on the main thread in any case.
*
* SDL_PumpEvents() gathers all the pending input information from devices and
* places it in the event queue. Without calls to SDL_PumpEvents() no events
* would ever be placed on the queue. Often the need for calls to
* SDL_PumpEvents() is hidden from the user since SDL_PollEvent() and
* SDL_WaitEvent() implicitly call SDL_PumpEvents(). However, if you are not
* polling or waiting for events (e.g. you are filtering them), then you must
* call SDL_PumpEvents() to force an event queue update.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_PollEvent
* \sa SDL_WaitEvent
*/
extern DECLSPEC void SDLCALL SDL_PumpEvents(void);
/* @{ */
typedef enum SDL_eventaction
{
SDL_ADDEVENT,
SDL_PEEKEVENT,
SDL_GETEVENT
} SDL_eventaction;
/**
* Check the event queue for messages and optionally return them.
*
* `action` may be any of the following:
*
* - `SDL_ADDEVENT`: up to `numevents` events will be added to the back of the
* event queue.
* - `SDL_PEEKEVENT`: `numevents` events at the front of the event queue,
* within the specified minimum and maximum type, will be returned to the
* caller and will _not_ be removed from the queue.
* - `SDL_GETEVENT`: up to `numevents` events at the front of the event queue,
* within the specified minimum and maximum type, will be returned to the
* caller and will be removed from the queue.
*
* You may have to call SDL_PumpEvents() before calling this function.
* Otherwise, the events may not be ready to be filtered when you call
* SDL_PeepEvents().
*
* This function is thread-safe.
*
* \param events destination buffer for the retrieved events.
* \param numevents if action is SDL_ADDEVENT, the number of events to add
* back to the event queue; if action is SDL_PEEKEVENT or
* SDL_GETEVENT, the maximum number of events to retrieve.
* \param action action to take; see [[#action|Remarks]] for details.
* \param minType minimum value of the event type to be considered;
* SDL_FIRSTEVENT is a safe choice.
* \param maxType maximum value of the event type to be considered;
* SDL_LASTEVENT is a safe choice.
* \returns the number of events actually stored or a negative error code on
* failure; call SDL_GetError() for more information.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_PollEvent
* \sa SDL_PumpEvents
* \sa SDL_PushEvent
*/
extern DECLSPEC int SDLCALL SDL_PeepEvents(SDL_Event * events, int numevents,
SDL_eventaction action,
Uint32 minType, Uint32 maxType);
/* @} */
/**
* Check for the existence of a certain event type in the event queue.
*
* If you need to check for a range of event types, use SDL_HasEvents()
* instead.
*
* \param type the type of event to be queried; see SDL_EventType for details.
* \returns SDL_TRUE if events matching `type` are present, or SDL_FALSE if
* events matching `type` are not present.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_HasEvents
*/
extern DECLSPEC SDL_bool SDLCALL SDL_HasEvent(Uint32 type);
/**
* Check for the existence of certain event types in the event queue.
*
* If you need to check for a single event type, use SDL_HasEvent() instead.
*
* \param minType the low end of event type to be queried, inclusive; see
* SDL_EventType for details.
* \param maxType the high end of event type to be queried, inclusive; see
* SDL_EventType for details.
* \returns SDL_TRUE if events with type >= `minType` and <= `maxType` are
* present, or SDL_FALSE if not.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_HasEvents
*/
extern DECLSPEC SDL_bool SDLCALL SDL_HasEvents(Uint32 minType, Uint32 maxType);
/**
* Clear events of a specific type from the event queue.
*
* This will unconditionally remove any events from the queue that match
* `type`. If you need to remove a range of event types, use SDL_FlushEvents()
* instead.
*
* It's also normal to just ignore events you don't care about in your event
* loop without calling this function.
*
* This function only affects currently queued events. If you want to make
* sure that all pending OS events are flushed, you can call SDL_PumpEvents()
* on the main thread immediately before the flush call.
*
* \param type the type of event to be cleared; see SDL_EventType for details.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_FlushEvents
*/
extern DECLSPEC void SDLCALL SDL_FlushEvent(Uint32 type);
/**
* Clear events of a range of types from the event queue.
*
* This will unconditionally remove any events from the queue that are in the
* range of `minType` to `maxType`, inclusive. If you need to remove a single
* event type, use SDL_FlushEvent() instead.
*
* It's also normal to just ignore events you don't care about in your event
* loop without calling this function.
*
* This function only affects currently queued events. If you want to make
* sure that all pending OS events are flushed, you can call SDL_PumpEvents()
* on the main thread immediately before the flush call.
*
* \param minType the low end of event type to be cleared, inclusive; see
* SDL_EventType for details.
* \param maxType the high end of event type to be cleared, inclusive; see
* SDL_EventType for details.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_FlushEvent
*/
extern DECLSPEC void SDLCALL SDL_FlushEvents(Uint32 minType, Uint32 maxType);
/**
* Poll for currently pending events.
*
* If `event` is not NULL, the next event is removed from the queue and stored
* in the SDL_Event structure pointed to by `event`. The 1 returned refers to
* this event, immediately stored in the SDL Event structure -- not an event
* to follow.
*
* If `event` is NULL, it simply returns 1 if there is an event in the queue,
* but will not remove it from the queue.
*
* As this function may implicitly call SDL_PumpEvents(), you can only call
* this function in the thread that set the video mode.
*
* SDL_PollEvent() is the favored way of receiving system events since it can
* be done from the main loop and does not suspend the main loop while waiting
* on an event to be posted.
*
* The common practice is to fully process the event queue once every frame,
* usually as a first step before updating the game's state:
*
* ```c
* while (game_is_still_running) {
* SDL_Event event;
* while (SDL_PollEvent(&event)) { // poll until all events are handled!
* // decide what to do with this event.
* }
*
* // update game state, draw the current frame
* }
* ```
*
* \param event the SDL_Event structure to be filled with the next event from
* the queue, or NULL.
* \returns 1 if there is a pending event or 0 if there are none available.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_GetEventFilter
* \sa SDL_PeepEvents
* \sa SDL_PushEvent
* \sa SDL_SetEventFilter
* \sa SDL_WaitEvent
* \sa SDL_WaitEventTimeout
*/
extern DECLSPEC int SDLCALL SDL_PollEvent(SDL_Event * event);
/**
* Wait indefinitely for the next available event.
*
* If `event` is not NULL, the next event is removed from the queue and stored
* in the SDL_Event structure pointed to by `event`.
*
* As this function may implicitly call SDL_PumpEvents(), you can only call
* this function in the thread that initialized the video subsystem.
*
* \param event the SDL_Event structure to be filled in with the next event
* from the queue, or NULL.
* \returns 1 on success or 0 if there was an error while waiting for events;
* call SDL_GetError() for more information.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_PollEvent
* \sa SDL_PumpEvents
* \sa SDL_WaitEventTimeout
*/
extern DECLSPEC int SDLCALL SDL_WaitEvent(SDL_Event * event);
/**
* Wait until the specified timeout (in milliseconds) for the next available
* event.
*
* If `event` is not NULL, the next event is removed from the queue and stored
* in the SDL_Event structure pointed to by `event`.
*
* As this function may implicitly call SDL_PumpEvents(), you can only call
* this function in the thread that initialized the video subsystem.
*
* \param event the SDL_Event structure to be filled in with the next event
* from the queue, or NULL.
* \param timeout the maximum number of milliseconds to wait for the next
* available event.
* \returns 1 on success or 0 if there was an error while waiting for events;
* call SDL_GetError() for more information. This also returns 0 if
* the timeout elapsed without an event arriving.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_PollEvent
* \sa SDL_PumpEvents
* \sa SDL_WaitEvent
*/
extern DECLSPEC int SDLCALL SDL_WaitEventTimeout(SDL_Event * event,
int timeout);
/**
* Add an event to the event queue.
*
* The event queue can actually be used as a two way communication channel.
* Not only can events be read from the queue, but the user can also push
* their own events onto it. `event` is a pointer to the event structure you
* wish to push onto the queue. The event is copied into the queue, and the
* caller may dispose of the memory pointed to after SDL_PushEvent() returns.
*
* Note: Pushing device input events onto the queue doesn't modify the state
* of the device within SDL.
*
* This function is thread-safe, and can be called from other threads safely.
*
* Note: Events pushed onto the queue with SDL_PushEvent() get passed through
* the event filter but events added with SDL_PeepEvents() do not.
*
* For pushing application-specific events, please use SDL_RegisterEvents() to
* get an event type that does not conflict with other code that also wants
* its own custom event types.
*
* \param event the SDL_Event to be added to the queue.
* \returns 1 on success, 0 if the event was filtered, or a negative error
* code on failure; call SDL_GetError() for more information. A
* common reason for error is the event queue being full.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_PeepEvents
* \sa SDL_PollEvent
* \sa SDL_RegisterEvents
*/
extern DECLSPEC int SDLCALL SDL_PushEvent(SDL_Event * event);
/**
* A function pointer used for callbacks that watch the event queue.
*
* \param userdata what was passed as `userdata` to SDL_SetEventFilter() or
* SDL_AddEventWatch, etc.
* \param event the event that triggered the callback.
* \returns 1 to permit event to be added to the queue, and 0 to disallow it.
* When used with SDL_AddEventWatch, the return value is ignored.
*
* \sa SDL_SetEventFilter
* \sa SDL_AddEventWatch
*/
typedef int (SDLCALL * SDL_EventFilter) (void *userdata, SDL_Event * event);
/**
* Set up a filter to process all events before they change internal state and
* are posted to the internal event queue.
*
* If the filter function returns 1 when called, then the event will be added
* to the internal queue. If it returns 0, then the event will be dropped from
* the queue, but the internal state will still be updated. This allows
* selective filtering of dynamically arriving events.
*
* **WARNING**: Be very careful of what you do in the event filter function,
* as it may run in a different thread!
*
* On platforms that support it, if the quit event is generated by an
* interrupt signal (e.g. pressing Ctrl-C), it will be delivered to the
* application at the next event poll.
*
* There is one caveat when dealing with the SDL_QuitEvent event type. The
* event filter is only called when the window manager desires to close the
* application window. If the event filter returns 1, then the window will be
* closed, otherwise the window will remain open if possible.
*
* Note: Disabled events never make it to the event filter function; see
* SDL_EventState().
*
* Note: If you just want to inspect events without filtering, you should use
* SDL_AddEventWatch() instead.
*
* Note: Events pushed onto the queue with SDL_PushEvent() get passed through
* the event filter, but events pushed onto the queue with SDL_PeepEvents() do
* not.
*
* \param filter An SDL_EventFilter function to call when an event happens.
* \param userdata a pointer that is passed to `filter`.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_AddEventWatch
* \sa SDL_EventState
* \sa SDL_GetEventFilter
* \sa SDL_PeepEvents
* \sa SDL_PushEvent
*/
extern DECLSPEC void SDLCALL SDL_SetEventFilter(SDL_EventFilter filter,
void *userdata);
/**
* Query the current event filter.
*
* This function can be used to "chain" filters, by saving the existing filter
* before replacing it with a function that will call that saved filter.
*
* \param filter the current callback function will be stored here.
* \param userdata the pointer that is passed to the current event filter will
* be stored here.
* \returns SDL_TRUE on success or SDL_FALSE if there is no event filter set.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_SetEventFilter
*/
extern DECLSPEC SDL_bool SDLCALL SDL_GetEventFilter(SDL_EventFilter * filter,
void **userdata);
/**
* Add a callback to be triggered when an event is added to the event queue.
*
* `filter` will be called when an event happens, and its return value is
* ignored.
*
* **WARNING**: Be very careful of what you do in the event filter function,
* as it may run in a different thread!
*
* If the quit event is generated by a signal (e.g. SIGINT), it will bypass
* the internal queue and be delivered to the watch callback immediately, and
* arrive at the next event poll.
*
* Note: the callback is called for events posted by the user through
* SDL_PushEvent(), but not for disabled events, nor for events by a filter
* callback set with SDL_SetEventFilter(), nor for events posted by the user
* through SDL_PeepEvents().
*
* \param filter an SDL_EventFilter function to call when an event happens.
* \param userdata a pointer that is passed to `filter`.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_DelEventWatch
* \sa SDL_SetEventFilter
*/
extern DECLSPEC void SDLCALL SDL_AddEventWatch(SDL_EventFilter filter,
void *userdata);
/**
* Remove an event watch callback added with SDL_AddEventWatch().
*
* This function takes the same input as SDL_AddEventWatch() to identify and
* delete the corresponding callback.
*
* \param filter the function originally passed to SDL_AddEventWatch().
* \param userdata the pointer originally passed to SDL_AddEventWatch().
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_AddEventWatch
*/
extern DECLSPEC void SDLCALL SDL_DelEventWatch(SDL_EventFilter filter,
void *userdata);
/**
* Run a specific filter function on the current event queue, removing any
* events for which the filter returns 0.
*
* See SDL_SetEventFilter() for more information. Unlike SDL_SetEventFilter(),
* this function does not change the filter permanently, it only uses the
* supplied filter until this function returns.
*
* \param filter the SDL_EventFilter function to call when an event happens.
* \param userdata a pointer that is passed to `filter`.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_GetEventFilter
* \sa SDL_SetEventFilter
*/
extern DECLSPEC void SDLCALL SDL_FilterEvents(SDL_EventFilter filter,
void *userdata);
/* @{ */
#define SDL_QUERY -1
#define SDL_IGNORE 0
#define SDL_DISABLE 0
#define SDL_ENABLE 1
/**
* Set the state of processing events by type.
*
* `state` may be any of the following:
*
* - `SDL_QUERY`: returns the current processing state of the specified event
* - `SDL_IGNORE` (aka `SDL_DISABLE`): the event will automatically be dropped
* from the event queue and will not be filtered
* - `SDL_ENABLE`: the event will be processed normally
*
* \param type the type of event; see SDL_EventType for details.
* \param state how to process the event.
* \returns `SDL_DISABLE` or `SDL_ENABLE`, representing the processing state
* of the event before this function makes any changes to it.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_GetEventState
*/
extern DECLSPEC Uint8 SDLCALL SDL_EventState(Uint32 type, int state);
/* @} */
#define SDL_GetEventState(type) SDL_EventState(type, SDL_QUERY)
/**
* Allocate a set of user-defined events, and return the beginning event
* number for that set of events.
*
* Calling this function with `numevents` <= 0 is an error and will return
* (Uint32)-1.
*
* Note, (Uint32)-1 means the maximum unsigned 32-bit integer value (or
* 0xFFFFFFFF), but is clearer to write.
*
* \param numevents the number of events to be allocated.
* \returns the beginning event number, or (Uint32)-1 if there are not enough
* user-defined events left.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_PushEvent
*/
extern DECLSPEC Uint32 SDLCALL SDL_RegisterEvents(int numevents);
/* Ends C function definitions when using C++ */
#ifdef __cplusplus
}
#endif
#include "close_code.h"
#endif /* SDL_events_h_ */
/* vi: set ts=4 sw=4 expandtab: */
SDL_error.h
SDL_PeepEvents
int SDL_PeepEvents(SDL_Event *events, int numevents, SDL_eventaction action, Uint32 minType, Uint32 maxType)
SDL_DelEventWatch
void SDL_DelEventWatch(SDL_EventFilter filter, void *userdata)
SDL_TEXTEDITINGEVENT_TEXT_SIZE
#define SDL_TEXTEDITINGEVENT_TEXT_SIZE
Definition SDL_events.h:236
SDL_FilterEvents
void SDL_FilterEvents(SDL_EventFilter filter, void *userdata)
SDL_HasEvent
SDL_bool SDL_HasEvent(Uint32 type)
SDL_PollEvent
int SDL_PollEvent(SDL_Event *event)
SDL_RegisterEvents
Uint32 SDL_RegisterEvents(int numevents)
SDL_EventType
SDL_EventType
Definition SDL_events.h:56
SDL_MOUSEMOTION
@ SDL_MOUSEMOTION
Definition SDL_events.h:108
SDL_JOYDEVICEADDED
@ SDL_JOYDEVICEADDED
Definition SDL_events.h:119
SDL_DROPBEGIN
@ SDL_DROPBEGIN
Definition SDL_events.h:153
SDL_SENSORUPDATE
@ SDL_SENSORUPDATE
Definition SDL_events.h:161
SDL_CONTROLLERTOUCHPADDOWN
@ SDL_CONTROLLERTOUCHPADDOWN
Definition SDL_events.h:130
SDL_FINGERMOTION
@ SDL_FINGERMOTION
Definition SDL_events.h:140
SDL_TEXTEDITING
@ SDL_TEXTEDITING
Definition SDL_events.h:100
SDL_DROPTEXT
@ SDL_DROPTEXT
Definition SDL_events.h:152
SDL_QUIT
@ SDL_QUIT
Definition SDL_events.h:60
SDL_APP_LOWMEMORY
@ SDL_APP_LOWMEMORY
Definition SDL_events.h:67
SDL_JOYBUTTONDOWN
@ SDL_JOYBUTTONDOWN
Definition SDL_events.h:117
SDL_POLLSENTINEL
@ SDL_POLLSENTINEL
Definition SDL_events.h:168
SDL_APP_WILLENTERFOREGROUND
@ SDL_APP_WILLENTERFOREGROUND
Definition SDL_events.h:79
SDL_USEREVENT
@ SDL_USEREVENT
Definition SDL_events.h:173
SDL_MOUSEBUTTONUP
@ SDL_MOUSEBUTTONUP
Definition SDL_events.h:110
SDL_JOYDEVICEREMOVED
@ SDL_JOYDEVICEREMOVED
Definition SDL_events.h:120
SDL_TEXTINPUT
@ SDL_TEXTINPUT
Definition SDL_events.h:101
SDL_WINDOWEVENT
@ SDL_WINDOWEVENT
Definition SDL_events.h:94
SDL_MOUSEWHEEL
@ SDL_MOUSEWHEEL
Definition SDL_events.h:111
SDL_CONTROLLERTOUCHPADMOTION
@ SDL_CONTROLLERTOUCHPADMOTION
Definition SDL_events.h:131
SDL_CLIPBOARDUPDATE
@ SDL_CLIPBOARDUPDATE
Definition SDL_events.h:148
SDL_SYSWMEVENT
@ SDL_SYSWMEVENT
Definition SDL_events.h:95
SDL_LOCALECHANGED
@ SDL_LOCALECHANGED
Definition SDL_events.h:88
SDL_JOYBUTTONUP
@ SDL_JOYBUTTONUP
Definition SDL_events.h:118
SDL_JOYBALLMOTION
@ SDL_JOYBALLMOTION
Definition SDL_events.h:115
SDL_DISPLAYEVENT
@ SDL_DISPLAYEVENT
Definition SDL_events.h:91
SDL_FINGERUP
@ SDL_FINGERUP
Definition SDL_events.h:139
SDL_TEXTEDITING_EXT
@ SDL_TEXTEDITING_EXT
Definition SDL_events.h:105
SDL_RENDER_DEVICE_RESET
@ SDL_RENDER_DEVICE_RESET
Definition SDL_events.h:165
SDL_CONTROLLERBUTTONUP
@ SDL_CONTROLLERBUTTONUP
Definition SDL_events.h:126
SDL_MOUSEBUTTONDOWN
@ SDL_MOUSEBUTTONDOWN
Definition SDL_events.h:109
SDL_CONTROLLERDEVICEADDED
@ SDL_CONTROLLERDEVICEADDED
Definition SDL_events.h:127
SDL_APP_DIDENTERFOREGROUND
@ SDL_APP_DIDENTERFOREGROUND
Definition SDL_events.h:83
SDL_DOLLARRECORD
@ SDL_DOLLARRECORD
Definition SDL_events.h:144
SDL_APP_WILLENTERBACKGROUND
@ SDL_APP_WILLENTERBACKGROUND
Definition SDL_events.h:71
SDL_MULTIGESTURE
@ SDL_MULTIGESTURE
Definition SDL_events.h:145
SDL_FINGERDOWN
@ SDL_FINGERDOWN
Definition SDL_events.h:138
SDL_DROPCOMPLETE
@ SDL_DROPCOMPLETE
Definition SDL_events.h:154
SDL_DOLLARGESTURE
@ SDL_DOLLARGESTURE
Definition SDL_events.h:143
SDL_CONTROLLERBUTTONDOWN
@ SDL_CONTROLLERBUTTONDOWN
Definition SDL_events.h:125
SDL_APP_DIDENTERBACKGROUND
@ SDL_APP_DIDENTERBACKGROUND
Definition SDL_events.h:75
SDL_JOYBATTERYUPDATED
@ SDL_JOYBATTERYUPDATED
Definition SDL_events.h:121
SDL_APP_TERMINATING
@ SDL_APP_TERMINATING
Definition SDL_events.h:63
SDL_CONTROLLERAXISMOTION
@ SDL_CONTROLLERAXISMOTION
Definition SDL_events.h:124
SDL_KEYDOWN
@ SDL_KEYDOWN
Definition SDL_events.h:98
SDL_KEYMAPCHANGED
@ SDL_KEYMAPCHANGED
Definition SDL_events.h:102
SDL_CONTROLLERUPDATECOMPLETE_RESERVED_FOR_SDL3
@ SDL_CONTROLLERUPDATECOMPLETE_RESERVED_FOR_SDL3
Definition SDL_events.h:134
SDL_AUDIODEVICEREMOVED
@ SDL_AUDIODEVICEREMOVED
Definition SDL_events.h:158
SDL_DROPFILE
@ SDL_DROPFILE
Definition SDL_events.h:151
SDL_AUDIODEVICEADDED
@ SDL_AUDIODEVICEADDED
Definition SDL_events.h:157
SDL_KEYUP
@ SDL_KEYUP
Definition SDL_events.h:99
SDL_CONTROLLERDEVICEREMOVED
@ SDL_CONTROLLERDEVICEREMOVED
Definition SDL_events.h:128
SDL_CONTROLLERSTEAMHANDLEUPDATED
@ SDL_CONTROLLERSTEAMHANDLEUPDATED
Definition SDL_events.h:135
SDL_RENDER_TARGETS_RESET
@ SDL_RENDER_TARGETS_RESET
Definition SDL_events.h:164
SDL_CONTROLLERTOUCHPADUP
@ SDL_CONTROLLERTOUCHPADUP
Definition SDL_events.h:132
SDL_CONTROLLERDEVICEREMAPPED
@ SDL_CONTROLLERDEVICEREMAPPED
Definition SDL_events.h:129
SDL_JOYAXISMOTION
@ SDL_JOYAXISMOTION
Definition SDL_events.h:114
SDL_CONTROLLERSENSORUPDATE
@ SDL_CONTROLLERSENSORUPDATE
Definition SDL_events.h:133
SDL_JOYHATMOTION
@ SDL_JOYHATMOTION
Definition SDL_events.h:116
SDL_FIRSTEVENT
@ SDL_FIRSTEVENT
Definition SDL_events.h:57
SDL_LASTEVENT
@ SDL_LASTEVENT
Definition SDL_events.h:178
SDL_TEXTINPUTEVENT_TEXT_SIZE
#define SDL_TEXTINPUTEVENT_TEXT_SIZE
Definition SDL_events.h:268
SDL_EventFilter
int(* SDL_EventFilter)(void *userdata, SDL_Event *event)
Definition SDL_events.h:1010
SDL_SetEventFilter
void SDL_SetEventFilter(SDL_EventFilter filter, void *userdata)
SDL_GetEventFilter
SDL_bool SDL_GetEventFilter(SDL_EventFilter *filter, void **userdata)
SDL_AddEventWatch
void SDL_AddEventWatch(SDL_EventFilter filter, void *userdata)
SDL_WaitEventTimeout
int SDL_WaitEventTimeout(SDL_Event *event, int timeout)
SDL_eventaction
SDL_eventaction
Definition SDL_events.h:737
SDL_ADDEVENT
@ SDL_ADDEVENT
Definition SDL_events.h:738
SDL_PEEKEVENT
@ SDL_PEEKEVENT
Definition SDL_events.h:739
SDL_GETEVENT
@ SDL_GETEVENT
Definition SDL_events.h:740
SDL_FlushEvents
void SDL_FlushEvents(Uint32 minType, Uint32 maxType)
SDL_FlushEvent
void SDL_FlushEvent(Uint32 type)
SDL_WaitEvent
int SDL_WaitEvent(SDL_Event *event)
SDL_EventState
Uint8 SDL_EventState(Uint32 type, int state)
SDL_PushEvent
int SDL_PushEvent(SDL_Event *event)
SDL_HasEvents
SDL_bool SDL_HasEvents(Uint32 minType, Uint32 maxType)
SDL_PumpEvents
void SDL_PumpEvents(void)
SDL_gamecontroller.h
SDL_gesture.h
SDL_GestureID
Sint64 SDL_GestureID
Definition SDL_gesture.h:44
SDL_joystick.h
SDL_JoystickPowerLevel
SDL_JoystickPowerLevel
Definition SDL_joystick.h:113
SDL_JoystickID
Sint32 SDL_JoystickID
Definition SDL_joystick.h:96
SDL_keyboard.h
SDL_mouse.h
SDL_quit.h
SDL_stdinc.h
Uint8
uint8_t Uint8
Definition SDL_stdinc.h:203
Uint16
uint16_t Uint16
Definition SDL_stdinc.h:217
Sint32
int32_t Sint32
Definition SDL_stdinc.h:224
SDL_bool
SDL_bool
Definition SDL_stdinc.h:187
Sint16
int16_t Sint16
Definition SDL_stdinc.h:210
SDL_COMPILE_TIME_ASSERT
#define SDL_COMPILE_TIME_ASSERT(name, x)
Definition SDL_stdinc.h:406
Uint64
uint64_t Uint64
Definition SDL_stdinc.h:245
Uint32
uint32_t Uint32
Definition SDL_stdinc.h:231
SDL_touch.h
SDL_TouchID
Sint64 SDL_TouchID
Definition SDL_touch.h:41
SDL_FingerID
Sint64 SDL_FingerID
Definition SDL_touch.h:42
SDL_video.h
begin_code.h
NULL
#define NULL
Definition begin_code.h:165
close_code.h
SDL_AudioDeviceEvent
Definition SDL_events.h:519
SDL_AudioDeviceEvent::iscapture
Uint8 iscapture
Definition SDL_events.h:523
SDL_AudioDeviceEvent::timestamp
Uint32 timestamp
Definition SDL_events.h:521
SDL_AudioDeviceEvent::which
Uint32 which
Definition SDL_events.h:522
SDL_AudioDeviceEvent::padding1
Uint8 padding1
Definition SDL_events.h:524
SDL_AudioDeviceEvent::padding2
Uint8 padding2
Definition SDL_events.h:525
SDL_AudioDeviceEvent::type
Uint32 type
Definition SDL_events.h:520
SDL_AudioDeviceEvent::padding3
Uint8 padding3
Definition SDL_events.h:526
SDL_CommonEvent
Definition SDL_events.h:185
SDL_CommonEvent::type
Uint32 type
Definition SDL_events.h:186
SDL_CommonEvent::timestamp
Uint32 timestamp
Definition SDL_events.h:187
SDL_ControllerAxisEvent
Definition SDL_events.h:443
SDL_ControllerAxisEvent::which
SDL_JoystickID which
Definition SDL_events.h:446
SDL_ControllerAxisEvent::value
Sint16 value
Definition SDL_events.h:451
SDL_ControllerAxisEvent::padding2
Uint8 padding2
Definition SDL_events.h:449
SDL_ControllerAxisEvent::type
Uint32 type
Definition SDL_events.h:444
SDL_ControllerAxisEvent::padding3
Uint8 padding3
Definition SDL_events.h:450
SDL_ControllerAxisEvent::axis
Uint8 axis
Definition SDL_events.h:447
SDL_ControllerAxisEvent::padding4
Uint16 padding4
Definition SDL_events.h:452
SDL_ControllerAxisEvent::padding1
Uint8 padding1
Definition SDL_events.h:448
SDL_ControllerAxisEvent::timestamp
Uint32 timestamp
Definition SDL_events.h:445
SDL_ControllerButtonEvent
Definition SDL_events.h:460
SDL_ControllerButtonEvent::state
Uint8 state
Definition SDL_events.h:465
SDL_ControllerButtonEvent::button
Uint8 button
Definition SDL_events.h:464
SDL_ControllerButtonEvent::type
Uint32 type
Definition SDL_events.h:461
SDL_ControllerButtonEvent::padding1
Uint8 padding1
Definition SDL_events.h:466
SDL_ControllerButtonEvent::timestamp
Uint32 timestamp
Definition SDL_events.h:462
SDL_ControllerButtonEvent::padding2
Uint8 padding2
Definition SDL_events.h:467
SDL_ControllerButtonEvent::which
SDL_JoystickID which
Definition SDL_events.h:463
SDL_ControllerDeviceEvent
Definition SDL_events.h:481
SDL_ControllerDeviceEvent::type
Uint32 type
Definition SDL_events.h:482
SDL_ControllerDeviceEvent::timestamp
Uint32 timestamp
Definition SDL_events.h:483
SDL_ControllerDeviceEvent::which
Sint32 which
Definition SDL_events.h:484
SDL_ControllerSensorEvent
Definition SDL_events.h:506
SDL_ControllerSensorEvent::data
float data[3]
Definition SDL_events.h:511
SDL_ControllerSensorEvent::type
Uint32 type
Definition SDL_events.h:507
SDL_ControllerSensorEvent::timestamp
Uint32 timestamp
Definition SDL_events.h:508
SDL_ControllerSensorEvent::timestamp_us
Uint64 timestamp_us
Definition SDL_events.h:512
SDL_ControllerSensorEvent::sensor
Sint32 sensor
Definition SDL_events.h:510
SDL_ControllerSensorEvent::which
SDL_JoystickID which
Definition SDL_events.h:509
SDL_ControllerTouchpadEvent
Definition SDL_events.h:491
SDL_ControllerTouchpadEvent::finger
Sint32 finger
Definition SDL_events.h:496
SDL_ControllerTouchpadEvent::which
SDL_JoystickID which
Definition SDL_events.h:494
SDL_ControllerTouchpadEvent::timestamp
Uint32 timestamp
Definition SDL_events.h:493
SDL_ControllerTouchpadEvent::touchpad
Sint32 touchpad
Definition SDL_events.h:495
SDL_ControllerTouchpadEvent::pressure
float pressure
Definition SDL_events.h:499
SDL_ControllerTouchpadEvent::y
float y
Definition SDL_events.h:498
SDL_ControllerTouchpadEvent::type
Uint32 type
Definition SDL_events.h:492
SDL_ControllerTouchpadEvent::x
float x
Definition SDL_events.h:497
SDL_DisplayEvent
Definition SDL_events.h:194
SDL_DisplayEvent::event
Uint8 event
Definition SDL_events.h:198
SDL_DisplayEvent::data1
Sint32 data1
Definition SDL_events.h:202
SDL_DisplayEvent::type
Uint32 type
Definition SDL_events.h:195
SDL_DisplayEvent::timestamp
Uint32 timestamp
Definition SDL_events.h:196
SDL_DisplayEvent::padding1
Uint8 padding1
Definition SDL_events.h:199
SDL_DisplayEvent::padding3
Uint8 padding3
Definition SDL_events.h:201
SDL_DisplayEvent::display
Uint32 display
Definition SDL_events.h:197
SDL_DisplayEvent::padding2
Uint8 padding2
Definition SDL_events.h:200
SDL_DollarGestureEvent
Definition SDL_events.h:569
SDL_DollarGestureEvent::numFingers
Uint32 numFingers
Definition SDL_events.h:574
SDL_DollarGestureEvent::y
float y
Definition SDL_events.h:577
SDL_DollarGestureEvent::error
float error
Definition SDL_events.h:575
SDL_DollarGestureEvent::timestamp
Uint32 timestamp
Definition SDL_events.h:571
SDL_DollarGestureEvent::touchId
SDL_TouchID touchId
Definition SDL_events.h:572
SDL_DollarGestureEvent::gestureId
SDL_GestureID gestureId
Definition SDL_events.h:573
SDL_DollarGestureEvent::x
float x
Definition SDL_events.h:576
SDL_DollarGestureEvent::type
Uint32 type
Definition SDL_events.h:570
SDL_DropEvent
Definition SDL_events.h:589
SDL_DropEvent::timestamp
Uint32 timestamp
Definition SDL_events.h:591
SDL_DropEvent::type
Uint32 type
Definition SDL_events.h:590
SDL_DropEvent::windowID
Uint32 windowID
Definition SDL_events.h:593
SDL_DropEvent::file
char * file
Definition SDL_events.h:592
SDL_JoyAxisEvent
Definition SDL_events.h:351
SDL_JoyAxisEvent::axis
Uint8 axis
Definition SDL_events.h:355
SDL_JoyAxisEvent::value
Sint16 value
Definition SDL_events.h:359
SDL_JoyAxisEvent::padding4
Uint16 padding4
Definition SDL_events.h:360
SDL_JoyAxisEvent::timestamp
Uint32 timestamp
Definition SDL_events.h:353
SDL_JoyAxisEvent::padding3
Uint8 padding3
Definition SDL_events.h:358
SDL_JoyAxisEvent::which
SDL_JoystickID which
Definition SDL_events.h:354
SDL_JoyAxisEvent::padding2
Uint8 padding2
Definition SDL_events.h:357
SDL_JoyAxisEvent::padding1
Uint8 padding1
Definition SDL_events.h:356
SDL_JoyAxisEvent::type
Uint32 type
Definition SDL_events.h:352
SDL_JoyBallEvent
Definition SDL_events.h:367
SDL_JoyBallEvent::type
Uint32 type
Definition SDL_events.h:368
SDL_JoyBallEvent::padding2
Uint8 padding2
Definition SDL_events.h:373
SDL_JoyBallEvent::yrel
Sint16 yrel
Definition SDL_events.h:376
SDL_JoyBallEvent::which
SDL_JoystickID which
Definition SDL_events.h:370
SDL_JoyBallEvent::xrel
Sint16 xrel
Definition SDL_events.h:375
SDL_JoyBallEvent::timestamp
Uint32 timestamp
Definition SDL_events.h:369
SDL_JoyBallEvent::padding3
Uint8 padding3
Definition SDL_events.h:374
SDL_JoyBallEvent::ball
Uint8 ball
Definition SDL_events.h:371
SDL_JoyBallEvent::padding1
Uint8 padding1
Definition SDL_events.h:372
SDL_JoyBatteryEvent
Definition SDL_events.h:432
SDL_JoyBatteryEvent::level
SDL_JoystickPowerLevel level
Definition SDL_events.h:436
SDL_JoyBatteryEvent::which
SDL_JoystickID which
Definition SDL_events.h:435
SDL_JoyBatteryEvent::type
Uint32 type
Definition SDL_events.h:433
SDL_JoyBatteryEvent::timestamp
Uint32 timestamp
Definition SDL_events.h:434
SDL_JoyButtonEvent
Definition SDL_events.h:403
SDL_JoyButtonEvent::which
SDL_JoystickID which
Definition SDL_events.h:406
SDL_JoyButtonEvent::padding1
Uint8 padding1
Definition SDL_events.h:409
SDL_JoyButtonEvent::button
Uint8 button
Definition SDL_events.h:407
SDL_JoyButtonEvent::padding2
Uint8 padding2
Definition SDL_events.h:410
SDL_JoyButtonEvent::type
Uint32 type
Definition SDL_events.h:404
SDL_JoyButtonEvent::timestamp
Uint32 timestamp
Definition SDL_events.h:405
SDL_JoyButtonEvent::state
Uint8 state
Definition SDL_events.h:408
SDL_JoyDeviceEvent
Definition SDL_events.h:422
SDL_JoyDeviceEvent::type
Uint32 type
Definition SDL_events.h:423
SDL_JoyDeviceEvent::timestamp
Uint32 timestamp
Definition SDL_events.h:424
SDL_JoyDeviceEvent::which
Sint32 which
Definition SDL_events.h:425
SDL_JoyHatEvent
Definition SDL_events.h:383
SDL_JoyHatEvent::value
Uint8 value
Definition SDL_events.h:388
SDL_JoyHatEvent::hat
Uint8 hat
Definition SDL_events.h:387
SDL_JoyHatEvent::type
Uint32 type
Definition SDL_events.h:384
SDL_JoyHatEvent::which
SDL_JoystickID which
Definition SDL_events.h:386
SDL_JoyHatEvent::padding2
Uint8 padding2
Definition SDL_events.h:396
SDL_JoyHatEvent::timestamp
Uint32 timestamp
Definition SDL_events.h:385
SDL_JoyHatEvent::padding1
Uint8 padding1
Definition SDL_events.h:395
SDL_KeyboardEvent
Definition SDL_events.h:225
SDL_KeyboardEvent::state
Uint8 state
Definition SDL_events.h:229
SDL_KeyboardEvent::keysym
SDL_Keysym keysym
Definition SDL_events.h:233
SDL_KeyboardEvent::timestamp
Uint32 timestamp
Definition SDL_events.h:227
SDL_KeyboardEvent::repeat
Uint8 repeat
Definition SDL_events.h:230
SDL_KeyboardEvent::windowID
Uint32 windowID
Definition SDL_events.h:228
SDL_KeyboardEvent::type
Uint32 type
Definition SDL_events.h:226
SDL_KeyboardEvent::padding3
Uint8 padding3
Definition SDL_events.h:232
SDL_KeyboardEvent::padding2
Uint8 padding2
Definition SDL_events.h:231
SDL_Keysym
Definition SDL_keyboard.h:49
SDL_MouseButtonEvent
Definition SDL_events.h:316
SDL_MouseButtonEvent::button
Uint8 button
Definition SDL_events.h:321
SDL_MouseButtonEvent::which
Uint32 which
Definition SDL_events.h:320
SDL_MouseButtonEvent::x
Sint32 x
Definition SDL_events.h:325
SDL_MouseButtonEvent::padding1
Uint8 padding1
Definition SDL_events.h:324
SDL_MouseButtonEvent::y
Sint32 y
Definition SDL_events.h:326
SDL_MouseButtonEvent::state
Uint8 state
Definition SDL_events.h:322
SDL_MouseButtonEvent::clicks
Uint8 clicks
Definition SDL_events.h:323
SDL_MouseButtonEvent::timestamp
Uint32 timestamp
Definition SDL_events.h:318
SDL_MouseButtonEvent::windowID
Uint32 windowID
Definition SDL_events.h:319
SDL_MouseButtonEvent::type
Uint32 type
Definition SDL_events.h:317
SDL_MouseMotionEvent
Definition SDL_events.h:300
SDL_MouseMotionEvent::xrel
Sint32 xrel
Definition SDL_events.h:308
SDL_MouseMotionEvent::x
Sint32 x
Definition SDL_events.h:306
SDL_MouseMotionEvent::state
Uint32 state
Definition SDL_events.h:305
SDL_MouseMotionEvent::type
Uint32 type
Definition SDL_events.h:301
SDL_MouseMotionEvent::which
Uint32 which
Definition SDL_events.h:304
SDL_MouseMotionEvent::yrel
Sint32 yrel
Definition SDL_events.h:309
SDL_MouseMotionEvent::y
Sint32 y
Definition SDL_events.h:307
SDL_MouseMotionEvent::windowID
Uint32 windowID
Definition SDL_events.h:303
SDL_MouseMotionEvent::timestamp
Uint32 timestamp
Definition SDL_events.h:302
SDL_MouseWheelEvent
Definition SDL_events.h:333
SDL_MouseWheelEvent::which
Uint32 which
Definition SDL_events.h:337
SDL_MouseWheelEvent::y
Sint32 y
Definition SDL_events.h:339
SDL_MouseWheelEvent::mouseX
Sint32 mouseX
Definition SDL_events.h:343
SDL_MouseWheelEvent::preciseY
float preciseY
Definition SDL_events.h:342
SDL_MouseWheelEvent::x
Sint32 x
Definition SDL_events.h:338
SDL_MouseWheelEvent::mouseY
Sint32 mouseY
Definition SDL_events.h:344
SDL_MouseWheelEvent::timestamp
Uint32 timestamp
Definition SDL_events.h:335
SDL_MouseWheelEvent::direction
Uint32 direction
Definition SDL_events.h:340
SDL_MouseWheelEvent::type
Uint32 type
Definition SDL_events.h:334
SDL_MouseWheelEvent::windowID
Uint32 windowID
Definition SDL_events.h:336
SDL_MouseWheelEvent::preciseX
float preciseX
Definition SDL_events.h:341
SDL_MultiGestureEvent
Definition SDL_events.h:552
SDL_MultiGestureEvent::x
float x
Definition SDL_events.h:558
SDL_MultiGestureEvent::y
float y
Definition SDL_events.h:559
SDL_MultiGestureEvent::dDist
float dDist
Definition SDL_events.h:557
SDL_MultiGestureEvent::padding
Uint16 padding
Definition SDL_events.h:561
SDL_MultiGestureEvent::dTheta
float dTheta
Definition SDL_events.h:556
SDL_MultiGestureEvent::numFingers
Uint16 numFingers
Definition SDL_events.h:560
SDL_MultiGestureEvent::timestamp
Uint32 timestamp
Definition SDL_events.h:554
SDL_MultiGestureEvent::touchId
SDL_TouchID touchId
Definition SDL_events.h:555
SDL_MultiGestureEvent::type
Uint32 type
Definition SDL_events.h:553
SDL_QuitEvent
Definition SDL_events.h:613
SDL_QuitEvent::type
Uint32 type
Definition SDL_events.h:614
SDL_QuitEvent::timestamp
Uint32 timestamp
Definition SDL_events.h:615
SDL_SensorEvent
Definition SDL_events.h:601
SDL_SensorEvent::type
Uint32 type
Definition SDL_events.h:602
SDL_SensorEvent::timestamp
Uint32 timestamp
Definition SDL_events.h:603
SDL_SensorEvent::which
Sint32 which
Definition SDL_events.h:604
SDL_SensorEvent::data
float data[6]
Definition SDL_events.h:605
SDL_SensorEvent::timestamp_us
Uint64 timestamp_us
Definition SDL_events.h:606
SDL_SysWMEvent
Definition SDL_events.h:643
SDL_SysWMEvent::timestamp
Uint32 timestamp
Definition SDL_events.h:645
SDL_SysWMEvent::type
Uint32 type
Definition SDL_events.h:644
SDL_SysWMEvent::msg
SDL_SysWMmsg * msg
Definition SDL_events.h:646
SDL_SysWMmsg
Definition SDL_syswm.h:158
SDL_TextEditingEvent
Definition SDL_events.h:242
SDL_TextEditingEvent::type
Uint32 type
Definition SDL_events.h:243
SDL_TextEditingEvent::windowID
Uint32 windowID
Definition SDL_events.h:245
SDL_TextEditingEvent::text
char text[SDL_TEXTEDITINGEVENT_TEXT_SIZE]
Definition SDL_events.h:246
SDL_TextEditingEvent::start
Sint32 start
Definition SDL_events.h:247
SDL_TextEditingEvent::length
Sint32 length
Definition SDL_events.h:248
SDL_TextEditingEvent::timestamp
Uint32 timestamp
Definition SDL_events.h:244
SDL_TextEditingExtEvent
Definition SDL_events.h:256
SDL_TextEditingExtEvent::timestamp
Uint32 timestamp
Definition SDL_events.h:258
SDL_TextEditingExtEvent::start
Sint32 start
Definition SDL_events.h:261
SDL_TextEditingExtEvent::type
Uint32 type
Definition SDL_events.h:257
SDL_TextEditingExtEvent::windowID
Uint32 windowID
Definition SDL_events.h:259
SDL_TextEditingExtEvent::text
char * text
Definition SDL_events.h:260
SDL_TextEditingExtEvent::length
Sint32 length
Definition SDL_events.h:262
SDL_TextInputEvent
Definition SDL_events.h:289
SDL_TextInputEvent::text
char text[SDL_TEXTINPUTEVENT_TEXT_SIZE]
Definition SDL_events.h:293
SDL_TextInputEvent::timestamp
Uint32 timestamp
Definition SDL_events.h:291
SDL_TextInputEvent::type
Uint32 type
Definition SDL_events.h:290
SDL_TextInputEvent::windowID
Uint32 windowID
Definition SDL_events.h:292
SDL_TouchFingerEvent
Definition SDL_events.h:534
SDL_TouchFingerEvent::x
float x
Definition SDL_events.h:539
SDL_TouchFingerEvent::type
Uint32 type
Definition SDL_events.h:535
SDL_TouchFingerEvent::windowID
Uint32 windowID
Definition SDL_events.h:544
SDL_TouchFingerEvent::fingerId
SDL_FingerID fingerId
Definition SDL_events.h:538
SDL_TouchFingerEvent::dy
float dy
Definition SDL_events.h:542
SDL_TouchFingerEvent::pressure
float pressure
Definition SDL_events.h:543
SDL_TouchFingerEvent::timestamp
Uint32 timestamp
Definition SDL_events.h:536
SDL_TouchFingerEvent::y
float y
Definition SDL_events.h:540
SDL_TouchFingerEvent::dx
float dx
Definition SDL_events.h:541
SDL_TouchFingerEvent::touchId
SDL_TouchID touchId
Definition SDL_events.h:537
SDL_UserEvent
Definition SDL_events.h:622
SDL_UserEvent::data2
void * data2
Definition SDL_events.h:628
SDL_UserEvent::data1
void * data1
Definition SDL_events.h:627
SDL_UserEvent::type
Uint32 type
Definition SDL_events.h:623
SDL_UserEvent::windowID
Uint32 windowID
Definition SDL_events.h:625
SDL_UserEvent::timestamp
Uint32 timestamp
Definition SDL_events.h:624
SDL_UserEvent::code
Sint32 code
Definition SDL_events.h:626
SDL_WindowEvent
Definition SDL_events.h:209
SDL_WindowEvent::type
Uint32 type
Definition SDL_events.h:210
SDL_WindowEvent::data1
Sint32 data1
Definition SDL_events.h:217
SDL_WindowEvent::padding1
Uint8 padding1
Definition SDL_events.h:214
SDL_WindowEvent::event
Uint8 event
Definition SDL_events.h:213
SDL_WindowEvent::windowID
Uint32 windowID
Definition SDL_events.h:212
SDL_WindowEvent::padding2
Uint8 padding2
Definition SDL_events.h:215
SDL_WindowEvent::timestamp
Uint32 timestamp
Definition SDL_events.h:211
SDL_WindowEvent::padding3
Uint8 padding3
Definition SDL_events.h:216
SDL_WindowEvent::data2
Sint32 data2
Definition SDL_events.h:218
SDL_Event
Definition SDL_events.h:656
SDL_Event::quit
SDL_QuitEvent quit
Definition SDL_events.h:681
SDL_Event::adevice
SDL_AudioDeviceEvent adevice
Definition SDL_events.h:679
SDL_Event::jdevice
SDL_JoyDeviceEvent jdevice
Definition SDL_events.h:672
SDL_Event::type
Uint32 type
Definition SDL_events.h:657
SDL_Event::wheel
SDL_MouseWheelEvent wheel
Definition SDL_events.h:667
SDL_Event::jhat
SDL_JoyHatEvent jhat
Definition SDL_events.h:670
SDL_Event::dgesture
SDL_DollarGestureEvent dgesture
Definition SDL_events.h:686
SDL_Event::jbutton
SDL_JoyButtonEvent jbutton
Definition SDL_events.h:671
SDL_Event::window
SDL_WindowEvent window
Definition SDL_events.h:660
SDL_Event::edit
SDL_TextEditingEvent edit
Definition SDL_events.h:662
SDL_Event::text
SDL_TextInputEvent text
Definition SDL_events.h:664
SDL_Event::caxis
SDL_ControllerAxisEvent caxis
Definition SDL_events.h:674
SDL_Event::tfinger
SDL_TouchFingerEvent tfinger
Definition SDL_events.h:684
SDL_Event::syswm
SDL_SysWMEvent syswm
Definition SDL_events.h:683
SDL_Event::button
SDL_MouseButtonEvent button
Definition SDL_events.h:666
SDL_Event::user
SDL_UserEvent user
Definition SDL_events.h:682
SDL_Event::key
SDL_KeyboardEvent key
Definition SDL_events.h:661
SDL_Event::editExt
SDL_TextEditingExtEvent editExt
Definition SDL_events.h:663
SDL_Event::common
SDL_CommonEvent common
Definition SDL_events.h:658
SDL_Event::mgesture
SDL_MultiGestureEvent mgesture
Definition SDL_events.h:685
SDL_Event::motion
SDL_MouseMotionEvent motion
Definition SDL_events.h:665
SDL_Event::jaxis
SDL_JoyAxisEvent jaxis
Definition SDL_events.h:668
SDL_Event::drop
SDL_DropEvent drop
Definition SDL_events.h:687
SDL_Event::cdevice
SDL_ControllerDeviceEvent cdevice
Definition SDL_events.h:676
SDL_Event::csensor
SDL_ControllerSensorEvent csensor
Definition SDL_events.h:678
SDL_Event::padding
Uint8 padding[sizeof(void *)<=8 ? 56 :sizeof(void *)==16 ? 64 :3 *sizeof(void *)]
Definition SDL_events.h:702
SDL_Event::jball
SDL_JoyBallEvent jball
Definition SDL_events.h:669
SDL_Event::jbattery
SDL_JoyBatteryEvent jbattery
Definition SDL_events.h:673
SDL_Event::cbutton
SDL_ControllerButtonEvent cbutton
Definition SDL_events.h:675
SDL_Event::sensor
SDL_SensorEvent sensor
Definition SDL_events.h:680
SDL_Event::ctouchpad
SDL_ControllerTouchpadEvent ctouchpad
Definition SDL_events.h:677
SDL_Event::display
SDL_DisplayEvent display
Definition SDL_events.h:659