The structure for all events in SDL.
Defined in <SDL3/SDL_events.h>
typedef union SDL_Event
{/**< Event type, shared with all events, Uint32 to cover user events which are not in the SDL_EventType enumeration */
Uint32 type; /**< Common event data */
SDL_CommonEvent common; /**< Display event data */
SDL_DisplayEvent display; /**< Window event data */
SDL_WindowEvent window; /**< Keyboard device change event data */
SDL_KeyboardDeviceEvent kdevice; /**< Keyboard event data */
SDL_KeyboardEvent key; /**< Text editing event data */
SDL_TextEditingEvent edit; /**< Text input event data */
SDL_TextInputEvent text; /**< Mouse device change event data */
SDL_MouseDeviceEvent mdevice; /**< Mouse motion event data */
SDL_MouseMotionEvent motion; /**< Mouse button event data */
SDL_MouseButtonEvent button; /**< Mouse wheel event data */
SDL_MouseWheelEvent wheel; /**< Joystick device change event data */
SDL_JoyDeviceEvent jdevice; /**< Joystick axis event data */
SDL_JoyAxisEvent jaxis; /**< Joystick ball event data */
SDL_JoyBallEvent jball; /**< Joystick hat event data */
SDL_JoyHatEvent jhat; /**< Joystick button event data */
SDL_JoyButtonEvent jbutton; /**< Joystick battery event data */
SDL_JoyBatteryEvent jbattery; /**< Gamepad device event data */
SDL_GamepadDeviceEvent gdevice; /**< Gamepad axis event data */
SDL_GamepadAxisEvent gaxis; /**< Gamepad button event data */
SDL_GamepadButtonEvent gbutton; /**< Gamepad touchpad event data */
SDL_GamepadTouchpadEvent gtouchpad; /**< Gamepad sensor event data */
SDL_GamepadSensorEvent gsensor; /**< Audio device event data */
SDL_AudioDeviceEvent adevice; /**< Camera device event data */
SDL_CameraDeviceEvent cdevice; /**< Sensor event data */
SDL_SensorEvent sensor; /**< Quit request event data */
SDL_QuitEvent quit; /**< Custom event data */
SDL_UserEvent user; /**< Touch finger event data */
SDL_TouchFingerEvent tfinger; /**< Pen tip touching or leaving drawing surface */
SDL_PenTipEvent ptip; /**< Pen change in position, pressure, or angle */
SDL_PenMotionEvent pmotion; /**< Pen button press */
SDL_PenButtonEvent pbutton; /**< Drag and drop event data */
SDL_DropEvent drop; /**< Clipboard event data */
SDL_ClipboardEvent clipboard;
/* 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 the same 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.
*/
128];
Uint8 padding[ } SDL_Event;
This struct is available since SDL 3.0.0.
CategoryAPI, CategoryAPIStruct