SDL_Event Union Reference

General event structure. More...

`#include <SDL_events.h>`

Collaboration diagram for SDL_Event:
[legend]

## Data Fields

Uint32 | type
SDL_CommonEvent | common
SDL_WindowEvent | window
SDL_KeyboardEvent | key
SDL_TextEditingEvent | edit
SDL_TextInputEvent | text
SDL_MouseMotionEvent | motion
SDL_MouseButtonEvent | button
SDL_MouseWheelEvent | wheel
SDL_JoyAxisEvent | jaxis
SDL_JoyBallEvent | jball
SDL_JoyHatEvent | jhat
SDL_JoyButtonEvent | jbutton
SDL_JoyDeviceEvent | jdevice
SDL_ControllerAxisEvent | caxis
SDL_ControllerButtonEvent | cbutton
SDL_ControllerDeviceEvent | cdevice
SDL_AudioDeviceEvent | adevice
SDL_QuitEvent | quit
SDL_UserEvent | user
SDL_SysWMEvent | syswm
SDL_TouchFingerEvent | tfinger
SDL_MultiGestureEvent | mgesture
SDL_DollarGestureEvent | dgesture
SDL_DropEvent | drop
Uint8 | padding [56]

## Detailed Description

General event structure.

Definition at line 525 of file SDL_events.h.

## Field Documentation

## adevice

SDL_AudioDeviceEvent SDL_Event::adevice

Audio device event data

Definition at line 544 of file SDL_events.h.

Referenced by iteration(), and main().

## button

SDL_MouseButtonEvent SDL_Event::button

Mouse button event data

Definition at line 534 of file SDL_events.h.

Referenced by loop(), main(), SDL_RendererEventWatch(), and SDLTest_PrintEvent().

## caxis

SDL_ControllerAxisEvent SDL_Event::caxis

Game Controller axis event data

Definition at line 541 of file SDL_events.h.

Referenced by loop(), and SDLTest_PrintEvent().

## cbutton

SDL_ControllerButtonEvent SDL_Event::cbutton

Game Controller button event data

Definition at line 542 of file SDL_events.h.

Referenced by loop(), and SDLTest_PrintEvent().

## cdevice

SDL_ControllerDeviceEvent SDL_Event::cdevice

Game Controller device event data

Definition at line 543 of file SDL_events.h.

Referenced by main(), SDL_GameControllerEventWatcher(), SDL_GameControllerInit(), SDLTest_PrintEvent(), and UpdateEventsForDeviceRemoval().

## common

SDL_CommonEvent SDL_Event::common

Common event data

Definition at line 528 of file SDL_events.h.

## dgesture

SDL_DollarGestureEvent SDL_Event::dgesture

Gesture event data

Definition at line 550 of file SDL_events.h.

Referenced by loop(), and SDLTest_PrintEvent().

## drop

SDL_DropEvent SDL_Event::drop

Drag and drop event data

Definition at line 551 of file SDL_events.h.

Referenced by main().

## edit

SDL_TextEditingEvent SDL_Event::edit

Text editing event data

Definition at line 531 of file SDL_events.h.

Referenced by main(), SDL_SendEditingText(), and SDLTest_PrintEvent().

## jaxis

SDL_JoyAxisEvent SDL_Event::jaxis

Joystick axis event data

Definition at line 536 of file SDL_events.h.

Referenced by loop(), SDL_GameControllerEventWatcher(), and WatchJoystick().

## jball

SDL_JoyBallEvent SDL_Event::jball

Joystick ball event data

Definition at line 537 of file SDL_events.h.

Referenced by loop(), and SDLTest_PrintEvent().

## jbutton

SDL_JoyButtonEvent SDL_Event::jbutton

Joystick button event data

Definition at line 539 of file SDL_events.h.

Referenced by loop(), main(), SDL_GameControllerEventWatcher(), SDLTest_PrintEvent(), and WatchJoystick().

## jdevice

SDL_JoyDeviceEvent SDL_Event::jdevice

Joystick device change event data

Definition at line 540 of file SDL_events.h.

Referenced by loop(), main(), SDL_GameControllerEventWatcher(), SDLTest_PrintEvent(), and UpdateEventsForDeviceRemoval().

## jhat

SDL_JoyHatEvent SDL_Event::jhat

Joystick hat event data

Definition at line 538 of file SDL_events.h.

Referenced by loop(), SDL_GameControllerEventWatcher(), SDLTest_PrintEvent(), and WatchJoystick().

## key

SDL_KeyboardEvent SDL_Event::key

Keyboard event data

Definition at line 530 of file SDL_events.h.

Referenced by iteration(), loop(), main(), SDLTest_CommonEvent(), SDLTest_PrintEvent(), and WatchJoystick().

## mgesture

SDL_MultiGestureEvent SDL_Event::mgesture

Gesture event data

Definition at line 549 of file SDL_events.h.

Referenced by loop(), and SDLTest_PrintEvent().

## motion

SDL_MouseMotionEvent SDL_Event::motion

Mouse motion event data

Definition at line 533 of file SDL_events.h.

Referenced by loop(), SDL_RendererEventWatch(), and SDLTest_PrintEvent().

## padding

Uint8 SDL_Event::padding[56]

Definition at line 560 of file SDL_events.h.

## quit

SDL_QuitEvent SDL_Event::quit

Quit request event data

Definition at line 545 of file SDL_events.h.

## syswm

SDL_SysWMEvent SDL_Event::syswm

System dependent window event data

Definition at line 547 of file SDL_events.h.

Referenced by SDL_AddEvent(), and SDL_PeepEvents().

## text

SDL_TextInputEvent SDL_Event::text

Text input event data

Definition at line 532 of file SDL_events.h.

Referenced by loop(), main(), SDL_SendKeyboardText(), and SDLTest_PrintEvent().

## tfinger

SDL_TouchFingerEvent SDL_Event::tfinger

Touch finger event data

Definition at line 548 of file SDL_events.h.

Referenced by loop(), SDL_GestureProcessEvent(), and SDLTest_PrintEvent().

## type

Uint32 SDL_Event::type

Event type, shared with all events

Definition at line 527 of file SDL_events.h.

Referenced by events_pushPumpAndPollUserevent(), iteration(), loop(), main(), RemovePendingExposedEvents(), RemovePendingMoveEvents(), RemovePendingResizedEvents(), RemovePendingSizeChangedEvents(), SDL_AddEvent(), SDL_FlushEvents(), SDL_GameControllerEventWatcher(), SDL_GameControllerInit(), SDL_GestureProcessEvent(), SDL_PeepEvents(), SDL_PrivateGameControllerButton(), SDL_PrivateJoystickAdded(), SDL_PrivateJoystickButton(), SDL_PrivateJoystickRemoved(), SDL_RendererEventWatch(), SDLTest_CommonEvent(), SDLTest_PrintEvent(), and WatchJoystick().

## user

SDL_UserEvent SDL_Event::user

Custom event data

Definition at line 546 of file SDL_events.h.

Referenced by events_pushPumpAndPollUserevent(), FIFO_Reader(), and SDLTest_PrintEvent().

## wheel

SDL_MouseWheelEvent SDL_Event::wheel

Mouse wheel event data

Definition at line 535 of file SDL_events.h.

Referenced by SDLTest_PrintEvent().

## window

SDL_WindowEvent SDL_Event::window

Window event data

Definition at line 529 of file SDL_events.h.

Referenced by loop(), main(), RemovePendingExposedEvents(), RemovePendingMoveEvents(), RemovePendingResizedEvents(), RemovePendingSizeChangedEvents(), SDL_RendererEventWatch(), SDLTest_CommonEvent(), and SDLTest_PrintEvent().

The documentation for this union was generated from the following file:

- include/SDL_events.h