My Project
Loading...
Searching...
No Matches
SDL_events.h
Go to the documentation of this file.
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21
28#ifndef SDL_events_h_
29#define SDL_events_h_
30
31#include "SDL_stdinc.h"
32#include "SDL_error.h"
33#include "SDL_video.h"
34#include "SDL_keyboard.h"
35#include "SDL_mouse.h"
36#include "SDL_joystick.h"
37#include "SDL_gamecontroller.h"
38#include "SDL_quit.h"
39#include "SDL_gesture.h"
40#include "SDL_touch.h"
41
42#include "begin_code.h"
43/* Set up for C function definitions, even when using C++ */
44#ifdef __cplusplus
45extern "C" {
46#endif
47
48/* General keyboard/mouse state definitions */
49#define SDL_RELEASED 0
50#define SDL_PRESSED 1
51
55typedef enum
56{
59 /* Application events */
60 SDL_QUIT = 0x100,
62 /* These application events have special meaning on iOS, see README-ios.md for details */
90 /* Display events */
93 /* Window events */
97 /* Keyboard events */
98 SDL_KEYDOWN = 0x300,
107 /* Mouse events */
113 /* Joystick events */
123 /* Game controller events */
135 /* Touch events */
136 SDL_FINGERDOWN = 0x700,
137 SDL_FINGERUP,
138 SDL_FINGERMOTION,
139
140 /* Gesture events */
141 SDL_DOLLARGESTURE = 0x800,
142 SDL_DOLLARRECORD,
143 SDL_MULTIGESTURE,
144
145 /* Clipboard events */
148 /* Drag and drop events */
149 SDL_DROPFILE = 0x1000,
154 /* Audio hotplug events */
158 /* Sensor events */
161 /* Render events */
165 /* Internal events */
172
176 SDL_LASTEVENT = 0xFFFF
178
182typedef struct SDL_CommonEvent
183{
184 Uint32 type;
185 Uint32 timestamp;
187
191typedef struct SDL_DisplayEvent
192{
193 Uint32 type;
194 Uint32 timestamp;
195 Uint32 display;
196 Uint8 event;
197 Uint8 padding1;
198 Uint8 padding2;
199 Uint8 padding3;
200 Sint32 data1;
202
206typedef struct SDL_WindowEvent
207{
208 Uint32 type;
209 Uint32 timestamp;
210 Uint32 windowID;
211 Uint8 event;
212 Uint8 padding1;
213 Uint8 padding2;
214 Uint8 padding3;
215 Sint32 data1;
216 Sint32 data2;
218
222typedef struct SDL_KeyboardEvent
223{
224 Uint32 type;
225 Uint32 timestamp;
226 Uint32 windowID;
227 Uint8 state;
228 Uint8 repeat;
229 Uint8 padding2;
230 Uint8 padding3;
233
234#define SDL_TEXTEDITINGEVENT_TEXT_SIZE (32)
239{
240 Uint32 type;
241 Uint32 timestamp;
242 Uint32 windowID;
243 char text[SDL_TEXTEDITINGEVENT_TEXT_SIZE];
244 Sint32 start;
245 Sint32 length;
247
253{
254 Uint32 type;
255 Uint32 timestamp;
256 Uint32 windowID;
257 char* text;
258 Sint32 start;
259 Sint32 length;
261
262#define SDL_TEXTINPUTEVENT_TEXT_SIZE (32)
266typedef struct SDL_TextInputEvent
267{
268 Uint32 type;
269 Uint32 timestamp;
270 Uint32 windowID;
271 char text[SDL_TEXTINPUTEVENT_TEXT_SIZE];
273
278{
279 Uint32 type;
280 Uint32 timestamp;
281 Uint32 windowID;
282 Uint32 which;
283 Uint32 state;
284 Sint32 x;
285 Sint32 y;
286 Sint32 xrel;
287 Sint32 yrel;
289
294{
295 Uint32 type;
296 Uint32 timestamp;
297 Uint32 windowID;
298 Uint32 which;
299 Uint8 button;
300 Uint8 state;
301 Uint8 clicks;
302 Uint8 padding1;
303 Sint32 x;
304 Sint32 y;
306
311{
312 Uint32 type;
313 Uint32 timestamp;
314 Uint32 windowID;
315 Uint32 which;
316 Sint32 x;
317 Sint32 y;
318 Uint32 direction;
319 float preciseX;
320 float preciseY;
321 Sint32 mouseX;
322 Sint32 mouseY;
324
328typedef struct SDL_JoyAxisEvent
329{
330 Uint32 type;
331 Uint32 timestamp;
333 Uint8 axis;
334 Uint8 padding1;
335 Uint8 padding2;
336 Uint8 padding3;
337 Sint16 value;
338 Uint16 padding4;
340
344typedef struct SDL_JoyBallEvent
345{
346 Uint32 type;
347 Uint32 timestamp;
349 Uint8 ball;
350 Uint8 padding1;
351 Uint8 padding2;
352 Uint8 padding3;
353 Sint16 xrel;
354 Sint16 yrel;
356
360typedef struct SDL_JoyHatEvent
361{
362 Uint32 type;
363 Uint32 timestamp;
365 Uint8 hat;
366 Uint8 value;
373 Uint8 padding1;
374 Uint8 padding2;
376
380typedef struct SDL_JoyButtonEvent
381{
382 Uint32 type;
383 Uint32 timestamp;
385 Uint8 button;
386 Uint8 state;
387 Uint8 padding1;
388 Uint8 padding2;
390
394typedef struct SDL_JoyDeviceEvent
395{
396 Uint32 type;
397 Uint32 timestamp;
398 Sint32 which;
400
405{
406 Uint32 type;
407 Uint32 timestamp;
409 SDL_JoystickPowerLevel level;
411
416{
417 Uint32 type;
418 Uint32 timestamp;
420 Uint8 axis;
421 Uint8 padding1;
422 Uint8 padding2;
423 Uint8 padding3;
424 Sint16 value;
425 Uint16 padding4;
427
428
433{
434 Uint32 type;
435 Uint32 timestamp;
437 Uint8 button;
438 Uint8 state;
439 Uint8 padding1;
440 Uint8 padding2;
442
443
448{
449 Uint32 type;
450 Uint32 timestamp;
451 Sint32 which;
453
458{
459 Uint32 type;
460 Uint32 timestamp;
462 Sint32 touchpad;
463 Sint32 finger;
464 float x;
465 float y;
466 float pressure;
468
473{
474 Uint32 type;
475 Uint32 timestamp;
477 Sint32 sensor;
478 float data[3];
481
486{
487 Uint32 type;
488 Uint32 timestamp;
489 Uint32 which;
490 Uint8 iscapture;
491 Uint8 padding1;
492 Uint8 padding2;
493 Uint8 padding3;
495
496
501{
502 Uint32 type;
503 Uint32 timestamp;
504 SDL_TouchID touchId;
505 SDL_FingerID fingerId;
506 float x;
507 float y;
508 float dx;
509 float dy;
510 float pressure;
511 Uint32 windowID;
513
514
519{
520 Uint32 type;
521 Uint32 timestamp;
522 SDL_TouchID touchId;
523 float dTheta;
524 float dDist;
525 float x;
526 float y;
527 Uint16 numFingers;
528 Uint16 padding;
530
531
536{
537 Uint32 type;
538 Uint32 timestamp;
539 SDL_TouchID touchId;
540 SDL_GestureID gestureId;
541 Uint32 numFingers;
542 float error;
543 float x;
544 float y;
546
547
553typedef struct SDL_DropEvent
554{
555 Uint32 type;
556 Uint32 timestamp;
557 char *file;
558 Uint32 windowID;
560
561
565typedef struct SDL_SensorEvent
566{
567 Uint32 type;
568 Uint32 timestamp;
569 Sint32 which;
570 float data[6];
573
577typedef struct SDL_QuitEvent
578{
579 Uint32 type;
580 Uint32 timestamp;
582
586typedef struct SDL_OSEvent
587{
588 Uint32 type;
589 Uint32 timestamp;
591
595typedef struct SDL_UserEvent
596{
597 Uint32 type;
598 Uint32 timestamp;
599 Uint32 windowID;
600 Sint32 code;
601 void *data1;
602 void *data2;
604
605
606struct SDL_SysWMmsg;
607typedef struct SDL_SysWMmsg SDL_SysWMmsg;
608
615typedef struct SDL_SysWMEvent
616{
617 Uint32 type;
618 Uint32 timestamp;
621
625typedef union SDL_Event
626{
627 Uint32 type;
659 /* This is necessary for ABI compatibility between Visual C++ and GCC.
660 Visual C++ will respect the push pack pragma and use 52 bytes (size of
661 SDL_TextEditingEvent, the largest structure for 32-bit and 64-bit
662 architectures) for this union, and GCC will use the alignment of the
663 largest datatype within the union, which is 8 bytes on 64-bit
664 architectures.
665
666 So... we'll add padding to force the size to be 56 bytes for both.
667
668 On architectures where pointers are 16 bytes, this needs rounding up to
669 the next multiple of 16, 64, and on architectures where pointers are
670 even larger the size of SDL_UserEvent will dominate as being 3 pointers.
671 */
672 Uint8 padding[sizeof(void *) <= 8 ? 56 : sizeof(void *) == 16 ? 64 : 3 * sizeof(void *)];
674
675/* Make sure we haven't broken binary compatibility */
676SDL_COMPILE_TIME_ASSERT(SDL_Event, sizeof(SDL_Event) == sizeof(((SDL_Event *)NULL)->padding));
677
678
679/* Function prototypes */
680
703extern DECLSPEC void SDLCALL SDL_PumpEvents(void);
704
705/* @{ */
706typedef enum
707{
708 SDL_ADDEVENT,
709 SDL_PEEKEVENT,
710 SDL_GETEVENT
711} SDL_eventaction;
712
751extern DECLSPEC int SDLCALL SDL_PeepEvents(SDL_Event * events, int numevents,
752 SDL_eventaction action,
753 Uint32 minType, Uint32 maxType);
754/* @} */
755
770extern DECLSPEC SDL_bool SDLCALL SDL_HasEvent(Uint32 type);
771
772
789extern DECLSPEC SDL_bool SDLCALL SDL_HasEvents(Uint32 minType, Uint32 maxType);
790
811extern DECLSPEC void SDLCALL SDL_FlushEvent(Uint32 type);
812
836extern DECLSPEC void SDLCALL SDL_FlushEvents(Uint32 minType, Uint32 maxType);
837
883extern DECLSPEC int SDLCALL SDL_PollEvent(SDL_Event * event);
884
905extern DECLSPEC int SDLCALL SDL_WaitEvent(SDL_Event * event);
906
931extern DECLSPEC int SDLCALL SDL_WaitEventTimeout(SDL_Event * event,
932 int timeout);
933
966extern DECLSPEC int SDLCALL SDL_PushEvent(SDL_Event * event);
967
980typedef int (SDLCALL * SDL_EventFilter) (void *userdata, SDL_Event * event);
981
1024extern DECLSPEC void SDLCALL SDL_SetEventFilter(SDL_EventFilter filter,
1025 void *userdata);
1026
1042extern DECLSPEC SDL_bool SDLCALL SDL_GetEventFilter(SDL_EventFilter * filter,
1043 void **userdata);
1044
1071extern DECLSPEC void SDLCALL SDL_AddEventWatch(SDL_EventFilter filter,
1072 void *userdata);
1073
1087extern DECLSPEC void SDLCALL SDL_DelEventWatch(SDL_EventFilter filter,
1088 void *userdata);
1089
1106extern DECLSPEC void SDLCALL SDL_FilterEvents(SDL_EventFilter filter,
1107 void *userdata);
1108
1109/* @{ */
1110#define SDL_QUERY -1
1111#define SDL_IGNORE 0
1112#define SDL_DISABLE 0
1113#define SDL_ENABLE 1
1114
1134extern DECLSPEC Uint8 SDLCALL SDL_EventState(Uint32 type, int state);
1135/* @} */
1136#define SDL_GetEventState(type) SDL_EventState(type, SDL_QUERY)
1137
1156extern DECLSPEC Uint32 SDLCALL SDL_RegisterEvents(int numevents);
1157
1158/* Ends C function definitions when using C++ */
1159#ifdef __cplusplus
1160}
1161#endif
1162#include "close_code.h"
1163
1164#endif /* SDL_events_h_ */
1165
1166/* vi: set ts=4 sw=4 expandtab: */
DECLSPEC void SDLCALL SDL_DelEventWatch(SDL_EventFilter filter, void *userdata)
DECLSPEC void SDLCALL SDL_FilterEvents(SDL_EventFilter filter, void *userdata)
SDL_EventType
Definition: SDL_events.h:56
@ SDL_MOUSEMOTION
Definition: SDL_events.h:108
@ SDL_JOYDEVICEADDED
Definition: SDL_events.h:119
@ SDL_DROPBEGIN
Definition: SDL_events.h:151
@ SDL_SENSORUPDATE
Definition: SDL_events.h:159
@ SDL_CONTROLLERTOUCHPADDOWN
Definition: SDL_events.h:130
@ SDL_TEXTEDITING
Definition: SDL_events.h:100
@ SDL_DROPTEXT
Definition: SDL_events.h:150
@ SDL_QUIT
Definition: SDL_events.h:60
@ SDL_APP_LOWMEMORY
Definition: SDL_events.h:67
@ SDL_JOYBUTTONDOWN
Definition: SDL_events.h:117
@ SDL_POLLSENTINEL
Definition: SDL_events.h:166
@ SDL_APP_WILLENTERFOREGROUND
Definition: SDL_events.h:79
@ SDL_USEREVENT
Definition: SDL_events.h:171
@ SDL_MOUSEBUTTONUP
Definition: SDL_events.h:110
@ SDL_JOYDEVICEREMOVED
Definition: SDL_events.h:120
@ SDL_TEXTINPUT
Definition: SDL_events.h:101
@ SDL_WINDOWEVENT
Definition: SDL_events.h:94
@ SDL_MOUSEWHEEL
Definition: SDL_events.h:111
@ SDL_CONTROLLERTOUCHPADMOTION
Definition: SDL_events.h:131
@ SDL_CLIPBOARDUPDATE
Definition: SDL_events.h:146
@ SDL_SYSWMEVENT
Definition: SDL_events.h:95
@ SDL_LOCALECHANGED
Definition: SDL_events.h:88
@ SDL_JOYBUTTONUP
Definition: SDL_events.h:118
@ SDL_JOYBALLMOTION
Definition: SDL_events.h:115
@ SDL_DISPLAYEVENT
Definition: SDL_events.h:91
@ SDL_TEXTEDITING_EXT
Definition: SDL_events.h:105
@ SDL_RENDER_DEVICE_RESET
Definition: SDL_events.h:163
@ SDL_CONTROLLERBUTTONUP
Definition: SDL_events.h:126
@ SDL_MOUSEBUTTONDOWN
Definition: SDL_events.h:109
@ SDL_CONTROLLERDEVICEADDED
Definition: SDL_events.h:127
@ SDL_APP_DIDENTERFOREGROUND
Definition: SDL_events.h:83
@ SDL_APP_WILLENTERBACKGROUND
Definition: SDL_events.h:71
@ SDL_DROPCOMPLETE
Definition: SDL_events.h:152
@ SDL_CONTROLLERBUTTONDOWN
Definition: SDL_events.h:125
@ SDL_APP_DIDENTERBACKGROUND
Definition: SDL_events.h:75
@ SDL_JOYBATTERYUPDATED
Definition: SDL_events.h:121
@ SDL_APP_TERMINATING
Definition: SDL_events.h:63
@ SDL_CONTROLLERAXISMOTION
Definition: SDL_events.h:124
@ SDL_KEYDOWN
Definition: SDL_events.h:98
@ SDL_KEYMAPCHANGED
Definition: SDL_events.h:102
@ SDL_AUDIODEVICEREMOVED
Definition: SDL_events.h:156
@ SDL_DROPFILE
Definition: SDL_events.h:149
@ SDL_AUDIODEVICEADDED
Definition: SDL_events.h:155
@ SDL_KEYUP
Definition: SDL_events.h:99
@ SDL_CONTROLLERDEVICEREMOVED
Definition: SDL_events.h:128
@ SDL_RENDER_TARGETS_RESET
Definition: SDL_events.h:162
@ SDL_CONTROLLERTOUCHPADUP
Definition: SDL_events.h:132
@ SDL_CONTROLLERDEVICEREMAPPED
Definition: SDL_events.h:129
@ SDL_JOYAXISMOTION
Definition: SDL_events.h:114
@ SDL_CONTROLLERSENSORUPDATE
Definition: SDL_events.h:133
@ SDL_JOYHATMOTION
Definition: SDL_events.h:116
@ SDL_FIRSTEVENT
Definition: SDL_events.h:57
@ SDL_LASTEVENT
Definition: SDL_events.h:176
DECLSPEC void SDLCALL SDL_FlushEvent(Uint32 type)
DECLSPEC int SDLCALL SDL_WaitEventTimeout(SDL_Event *event, int timeout)
DECLSPEC SDL_bool SDLCALL SDL_HasEvents(Uint32 minType, Uint32 maxType)
DECLSPEC int SDLCALL SDL_PeepEvents(SDL_Event *events, int numevents, SDL_eventaction action, Uint32 minType, Uint32 maxType)
int(SDLCALL * SDL_EventFilter)(void *userdata, SDL_Event *event)
Definition: SDL_events.h:980
DECLSPEC SDL_bool SDLCALL SDL_GetEventFilter(SDL_EventFilter *filter, void **userdata)
DECLSPEC void SDLCALL SDL_FlushEvents(Uint32 minType, Uint32 maxType)
DECLSPEC void SDLCALL SDL_PumpEvents(void)
DECLSPEC void SDLCALL SDL_SetEventFilter(SDL_EventFilter filter, void *userdata)
DECLSPEC SDL_bool SDLCALL SDL_HasEvent(Uint32 type)
DECLSPEC int SDLCALL SDL_PollEvent(SDL_Event *event)
DECLSPEC void SDLCALL SDL_AddEventWatch(SDL_EventFilter filter, void *userdata)
DECLSPEC int SDLCALL SDL_PushEvent(SDL_Event *event)
DECLSPEC int SDLCALL SDL_WaitEvent(SDL_Event *event)
DECLSPEC Uint32 SDLCALL SDL_RegisterEvents(int numevents)
DECLSPEC Uint8 SDLCALL SDL_EventState(Uint32 type, int state)
Sint32 SDL_JoystickID
Definition: SDL_joystick.h:82
Audio device event structure (event.adevice.*)
Definition: SDL_events.h:486
Uint32 type
Definition: SDL_events.h:487
Uint8 iscapture
Definition: SDL_events.h:490
Uint32 which
Definition: SDL_events.h:489
Uint32 timestamp
Definition: SDL_events.h:488
Fields shared by every event.
Definition: SDL_events.h:183
Uint32 timestamp
Definition: SDL_events.h:185
Game controller axis motion event structure (event.caxis.*)
Definition: SDL_events.h:416
Uint8 axis
Definition: SDL_events.h:420
SDL_JoystickID which
Definition: SDL_events.h:419
Uint32 type
Definition: SDL_events.h:417
Uint32 timestamp
Definition: SDL_events.h:418
Sint16 value
Definition: SDL_events.h:424
Game controller button event structure (event.cbutton.*)
Definition: SDL_events.h:433
Uint8 button
Definition: SDL_events.h:437
Uint8 state
Definition: SDL_events.h:438
SDL_JoystickID which
Definition: SDL_events.h:436
Uint32 type
Definition: SDL_events.h:434
Uint32 timestamp
Definition: SDL_events.h:435
Controller device event structure (event.cdevice.*)
Definition: SDL_events.h:448
Uint32 type
Definition: SDL_events.h:449
Uint32 timestamp
Definition: SDL_events.h:450
Sint32 which
Definition: SDL_events.h:451
Game controller sensor event structure (event.csensor.*)
Definition: SDL_events.h:473
Sint32 sensor
Definition: SDL_events.h:477
SDL_JoystickID which
Definition: SDL_events.h:476
Uint32 type
Definition: SDL_events.h:474
Uint64 timestamp_us
Definition: SDL_events.h:479
Uint32 timestamp
Definition: SDL_events.h:475
Game controller touchpad event structure (event.ctouchpad.*)
Definition: SDL_events.h:458
Sint32 touchpad
Definition: SDL_events.h:462
SDL_JoystickID which
Definition: SDL_events.h:461
Uint32 type
Definition: SDL_events.h:459
float y
Definition: SDL_events.h:465
Uint32 timestamp
Definition: SDL_events.h:460
float pressure
Definition: SDL_events.h:466
float x
Definition: SDL_events.h:464
Sint32 finger
Definition: SDL_events.h:463
Display state change event data (event.display.*)
Definition: SDL_events.h:192
Uint8 event
Definition: SDL_events.h:196
Sint32 data1
Definition: SDL_events.h:200
Uint32 type
Definition: SDL_events.h:193
Uint32 timestamp
Definition: SDL_events.h:194
Uint32 display
Definition: SDL_events.h:195
Dollar Gesture Event (event.dgesture.*)
Definition: SDL_events.h:536
SDL_TouchID touchId
Definition: SDL_events.h:539
Uint32 type
Definition: SDL_events.h:537
float y
Definition: SDL_events.h:544
Uint32 timestamp
Definition: SDL_events.h:538
float x
Definition: SDL_events.h:543
An event used to request a file open by the system (event.drop.*) This event is enabled by default,...
Definition: SDL_events.h:554
Uint32 windowID
Definition: SDL_events.h:558
Uint32 type
Definition: SDL_events.h:555
Uint32 timestamp
Definition: SDL_events.h:556
char * file
Definition: SDL_events.h:557
Joystick axis motion event structure (event.jaxis.*)
Definition: SDL_events.h:329
Uint8 axis
Definition: SDL_events.h:333
SDL_JoystickID which
Definition: SDL_events.h:332
Uint32 type
Definition: SDL_events.h:330
Uint32 timestamp
Definition: SDL_events.h:331
Sint16 value
Definition: SDL_events.h:337
Joystick trackball motion event structure (event.jball.*)
Definition: SDL_events.h:345
Sint16 yrel
Definition: SDL_events.h:354
SDL_JoystickID which
Definition: SDL_events.h:348
Uint32 type
Definition: SDL_events.h:346
Uint32 timestamp
Definition: SDL_events.h:347
Uint8 ball
Definition: SDL_events.h:349
Sint16 xrel
Definition: SDL_events.h:353
Joysick battery level change event structure (event.jbattery.*)
Definition: SDL_events.h:405
SDL_JoystickPowerLevel level
Definition: SDL_events.h:409
SDL_JoystickID which
Definition: SDL_events.h:408
Uint32 type
Definition: SDL_events.h:406
Uint32 timestamp
Definition: SDL_events.h:407
Joystick button event structure (event.jbutton.*)
Definition: SDL_events.h:381
Uint8 button
Definition: SDL_events.h:385
Uint8 state
Definition: SDL_events.h:386
SDL_JoystickID which
Definition: SDL_events.h:384
Uint32 type
Definition: SDL_events.h:382
Uint32 timestamp
Definition: SDL_events.h:383
Joystick device event structure (event.jdevice.*)
Definition: SDL_events.h:395
Uint32 type
Definition: SDL_events.h:396
Uint32 timestamp
Definition: SDL_events.h:397
Sint32 which
Definition: SDL_events.h:398
Joystick hat position change event structure (event.jhat.*)
Definition: SDL_events.h:361
Uint8 hat
Definition: SDL_events.h:365
SDL_JoystickID which
Definition: SDL_events.h:364
Uint32 type
Definition: SDL_events.h:362
Uint8 value
Definition: SDL_events.h:366
Uint32 timestamp
Definition: SDL_events.h:363
Keyboard button event structure (event.key.*)
Definition: SDL_events.h:223
Uint8 state
Definition: SDL_events.h:227
Uint8 repeat
Definition: SDL_events.h:228
Uint32 windowID
Definition: SDL_events.h:226
SDL_Keysym keysym
Definition: SDL_events.h:231
Uint32 type
Definition: SDL_events.h:224
Uint32 timestamp
Definition: SDL_events.h:225
The SDL keysym structure, used in key events.
Definition: SDL_keyboard.h:48
Mouse button event structure (event.button.*)
Definition: SDL_events.h:294
Sint32 x
Definition: SDL_events.h:303
Uint8 button
Definition: SDL_events.h:299
Uint8 state
Definition: SDL_events.h:300
Uint32 windowID
Definition: SDL_events.h:297
Uint8 clicks
Definition: SDL_events.h:301
Uint32 type
Definition: SDL_events.h:295
Uint32 which
Definition: SDL_events.h:298
Uint32 timestamp
Definition: SDL_events.h:296
Sint32 y
Definition: SDL_events.h:304
Mouse motion event structure (event.motion.*)
Definition: SDL_events.h:278
Sint32 x
Definition: SDL_events.h:284
Uint32 state
Definition: SDL_events.h:283
Sint32 xrel
Definition: SDL_events.h:286
Uint32 windowID
Definition: SDL_events.h:281
Uint32 type
Definition: SDL_events.h:279
Uint32 which
Definition: SDL_events.h:282
Uint32 timestamp
Definition: SDL_events.h:280
Sint32 y
Definition: SDL_events.h:285
Sint32 yrel
Definition: SDL_events.h:287
Mouse wheel event structure (event.wheel.*)
Definition: SDL_events.h:311
Sint32 x
Definition: SDL_events.h:316
float preciseX
Definition: SDL_events.h:319
float preciseY
Definition: SDL_events.h:320
Uint32 direction
Definition: SDL_events.h:318
Uint32 windowID
Definition: SDL_events.h:314
Sint32 mouseY
Definition: SDL_events.h:322
Uint32 type
Definition: SDL_events.h:312
Uint32 which
Definition: SDL_events.h:315
Uint32 timestamp
Definition: SDL_events.h:313
Sint32 y
Definition: SDL_events.h:317
Sint32 mouseX
Definition: SDL_events.h:321
Multiple Finger Gesture Event (event.mgesture.*)
Definition: SDL_events.h:519
SDL_TouchID touchId
Definition: SDL_events.h:522
Uint32 type
Definition: SDL_events.h:520
Uint32 timestamp
Definition: SDL_events.h:521
OS Specific event.
Definition: SDL_events.h:587
Uint32 type
Definition: SDL_events.h:588
Uint32 timestamp
Definition: SDL_events.h:589
The "quit requested" event.
Definition: SDL_events.h:578
Uint32 type
Definition: SDL_events.h:579
Uint32 timestamp
Definition: SDL_events.h:580
Sensor event structure (event.sensor.*)
Definition: SDL_events.h:566
Uint32 type
Definition: SDL_events.h:567
Uint64 timestamp_us
Definition: SDL_events.h:571
Uint32 timestamp
Definition: SDL_events.h:568
Sint32 which
Definition: SDL_events.h:569
A video driver dependent system event (event.syswm.*) This event is disabled by default,...
Definition: SDL_events.h:616
SDL_SysWMmsg * msg
Definition: SDL_events.h:619
Uint32 type
Definition: SDL_events.h:617
Uint32 timestamp
Definition: SDL_events.h:618
Definition: SDL_syswm.h:158
Keyboard text editing event structure (event.edit.*)
Definition: SDL_events.h:239
char text[SDL_TEXTEDITINGEVENT_TEXT_SIZE]
Definition: SDL_events.h:243
Uint32 windowID
Definition: SDL_events.h:242
Uint32 type
Definition: SDL_events.h:240
Uint32 timestamp
Definition: SDL_events.h:241
Sint32 start
Definition: SDL_events.h:244
Sint32 length
Definition: SDL_events.h:245
Extended keyboard text editing event structure (event.editExt.*) when text would be truncated if stor...
Definition: SDL_events.h:253
char * text
Definition: SDL_events.h:257
Uint32 windowID
Definition: SDL_events.h:256
Uint32 type
Definition: SDL_events.h:254
Uint32 timestamp
Definition: SDL_events.h:255
Sint32 start
Definition: SDL_events.h:258
Sint32 length
Definition: SDL_events.h:259
Keyboard text input event structure (event.text.*)
Definition: SDL_events.h:267
Uint32 windowID
Definition: SDL_events.h:270
Uint32 type
Definition: SDL_events.h:268
char text[SDL_TEXTINPUTEVENT_TEXT_SIZE]
Definition: SDL_events.h:271
Uint32 timestamp
Definition: SDL_events.h:269
Touch finger event structure (event.tfinger.*)
Definition: SDL_events.h:501
SDL_TouchID touchId
Definition: SDL_events.h:504
Uint32 windowID
Definition: SDL_events.h:511
float dy
Definition: SDL_events.h:509
float dx
Definition: SDL_events.h:508
Uint32 type
Definition: SDL_events.h:502
float y
Definition: SDL_events.h:507
Uint32 timestamp
Definition: SDL_events.h:503
float pressure
Definition: SDL_events.h:510
float x
Definition: SDL_events.h:506
A user-defined event type (event.user.*)
Definition: SDL_events.h:596
void * data2
Definition: SDL_events.h:602
Uint32 windowID
Definition: SDL_events.h:599
void * data1
Definition: SDL_events.h:601
Uint32 type
Definition: SDL_events.h:597
Uint32 timestamp
Definition: SDL_events.h:598
Sint32 code
Definition: SDL_events.h:600
Window state change event data (event.window.*)
Definition: SDL_events.h:207
Uint8 event
Definition: SDL_events.h:211
Sint32 data1
Definition: SDL_events.h:215
Uint32 windowID
Definition: SDL_events.h:210
Uint32 type
Definition: SDL_events.h:208
Uint32 timestamp
Definition: SDL_events.h:209
Sint32 data2
Definition: SDL_events.h:216
General event structure.
Definition: SDL_events.h:626
SDL_ControllerDeviceEvent cdevice
Definition: SDL_events.h:646
SDL_DisplayEvent display
Definition: SDL_events.h:629
SDL_QuitEvent quit
Definition: SDL_events.h:651
SDL_ControllerSensorEvent csensor
Definition: SDL_events.h:648
SDL_AudioDeviceEvent adevice
Definition: SDL_events.h:649
SDL_DropEvent drop
Definition: SDL_events.h:657
SDL_KeyboardEvent key
Definition: SDL_events.h:631
SDL_SensorEvent sensor
Definition: SDL_events.h:650
SDL_UserEvent user
Definition: SDL_events.h:652
SDL_ControllerButtonEvent cbutton
Definition: SDL_events.h:645
SDL_JoyBallEvent jball
Definition: SDL_events.h:639
SDL_JoyDeviceEvent jdevice
Definition: SDL_events.h:642
SDL_JoyAxisEvent jaxis
Definition: SDL_events.h:638
SDL_CommonEvent common
Definition: SDL_events.h:628
SDL_JoyBatteryEvent jbattery
Definition: SDL_events.h:643
SDL_TextEditingEvent edit
Definition: SDL_events.h:632
SDL_MouseWheelEvent wheel
Definition: SDL_events.h:637
SDL_ControllerTouchpadEvent ctouchpad
Definition: SDL_events.h:647
SDL_DollarGestureEvent dgesture
Definition: SDL_events.h:656
SDL_TouchFingerEvent tfinger
Definition: SDL_events.h:654
SDL_WindowEvent window
Definition: SDL_events.h:630
SDL_MouseButtonEvent button
Definition: SDL_events.h:636
SDL_MouseMotionEvent motion
Definition: SDL_events.h:635
SDL_TextEditingExtEvent editExt
Definition: SDL_events.h:633
SDL_SysWMEvent syswm
Definition: SDL_events.h:653
SDL_MultiGestureEvent mgesture
Definition: SDL_events.h:655
Uint32 type
Definition: SDL_events.h:627
SDL_TextInputEvent text
Definition: SDL_events.h:634
SDL_JoyButtonEvent jbutton
Definition: SDL_events.h:641
SDL_JoyHatEvent jhat
Definition: SDL_events.h:640
SDL_ControllerAxisEvent caxis
Definition: SDL_events.h:644