1 
2 //          Copyright Michael D. Parker 2018.
3 // Distributed under the Boost Software License, Version 1.0.
4 //    (See accompanying file LICENSE_1_0.txt or copy at
5 //          http://www.boost.org/LICENSE_1_0.txt)
6 
7 module bindbc.sdl.bind.sdlevents;
8 
9 import bindbc.sdl.config;
10 
11 import bindbc.sdl.bind.sdlgesture,
12        bindbc.sdl.bind.sdljoystick,
13        bindbc.sdl.bind.sdlkeyboard,
14        bindbc.sdl.bind.sdlkeycode,
15        bindbc.sdl.bind.sdlstdinc,
16        bindbc.sdl.bind.sdlsyswm,
17        bindbc.sdl.bind.sdltouch,
18        bindbc.sdl.bind.sdlvideo;
19 
20 enum {
21     SDL_RELEASED = 0,
22     SDL_PRESSED = 1,
23 }
24 
25 static if(sdlSupport >= SDLSupport.sdl209) {
26     enum SDL_EventType {
27         SDL_FIRSTEVENT = 0,
28         SDL_QUIT = 0x100,
29         SDL_APP_TERMINATING,
30         SDL_APP_LOWMEMORY,
31         SDL_APP_WILLENTERBACKGROUND,
32         SDL_APP_DIDENTERBACKGROUND,
33         SDL_APP_WILLENTERFOREGROUND,
34         SDL_APP_DIDENTERFOREGROUND,
35         SDL_DISPLAYEVENT = 0x150,
36         SDL_WINDOWEVENT = 0x200,
37         SDL_SYSWMEVENT,
38         SDL_KEYDOWN = 0x300,
39         SDL_KEYUP,
40         SDL_TEXTEDITING,
41         SDL_TEXTINPUT,
42         SDL_KEYMAPCHANGED,
43         SDL_MOUSEMOTION = 0x400,
44         SDL_MOUSEBUTTONDOWN,
45         SDL_MOUSEBUTTONUP,
46         SDL_MOUSEWHEEL,
47         SDL_JOYAXISMOTION = 0x600,
48         SDL_JOYBALLMOTION,
49         SDL_JOYHATMOTION,
50         SDL_JOYBUTTONDOWN,
51         SDL_JOYBUTTONUP,
52         SDL_JOYDEVICEADDED,
53         SDL_JOYDEVICEREMOVED,
54         SDL_CONTROLLERAXISMOTION = 0x650,
55         SDL_CONTROLLERBUTTONDOWN,
56         SDL_CONTROLLERBUTTONUP,
57         SDL_CONTROLLERDEVICEADDED,
58         SDL_CONTROLLERDEVICEREMOVED,
59         SDL_CONTROLLERDEVICEREMAPPED,
60         SDL_FINGERDOWN = 0x700,
61         SDL_FINGERUP,
62         SDL_FINGERMOTION,
63         SDL_DOLLARGESTURE = 0x800,
64         SDL_DOLLARRECORD,
65         SDL_MULTIGESTURE,
66         SDL_CLIPBOARDUPDATE = 0x900,
67         SDL_DROPFILE = 0x1000,
68         SDL_DROPTEXT,
69         SDL_DROPBEGIN,
70         SDL_DROPCOMPLETE,
71         SDL_AUDIODEVICEADDED = 0x1100,
72         SDL_AUDIODEVICEREMOVED,
73         SDL_SENSORUPDATE = 0x1200,
74         SDL_RENDER_TARGETS_RESET = 0x2000,
75         SDL_RENDER_DEVICE_RESET,
76         SDL_USEREVENT = 0x8000,
77         SDL_LASTEVENT = 0xFFFF
78     }
79 }
80 else static if(sdlSupport >= SDLSupport.sdl205) {
81     enum SDL_EventType {
82         SDL_FIRSTEVENT = 0,
83         SDL_QUIT = 0x100,
84         SDL_APP_TERMINATING,
85         SDL_APP_LOWMEMORY,
86         SDL_APP_WILLENTERBACKGROUND,
87         SDL_APP_DIDENTERBACKGROUND,
88         SDL_APP_WILLENTERFOREGROUND,
89         SDL_APP_DIDENTERFOREGROUND,
90         SDL_WINDOWEVENT = 0x200,
91         SDL_SYSWMEVENT,
92         SDL_KEYDOWN = 0x300,
93         SDL_KEYUP,
94         SDL_TEXTEDITING,
95         SDL_TEXTINPUT,
96         SDL_KEYMAPCHANGED,
97         SDL_MOUSEMOTION = 0x400,
98         SDL_MOUSEBUTTONDOWN,
99         SDL_MOUSEBUTTONUP,
100         SDL_MOUSEWHEEL,
101         SDL_JOYAXISMOTION = 0x600,
102         SDL_JOYBALLMOTION,
103         SDL_JOYHATMOTION,
104         SDL_JOYBUTTONDOWN,
105         SDL_JOYBUTTONUP,
106         SDL_JOYDEVICEADDED,
107         SDL_JOYDEVICEREMOVED,
108         SDL_CONTROLLERAXISMOTION = 0x650,
109         SDL_CONTROLLERBUTTONDOWN,
110         SDL_CONTROLLERBUTTONUP,
111         SDL_CONTROLLERDEVICEADDED,
112         SDL_CONTROLLERDEVICEREMOVED,
113         SDL_CONTROLLERDEVICEREMAPPED,
114         SDL_FINGERDOWN = 0x700,
115         SDL_FINGERUP,
116         SDL_FINGERMOTION,
117         SDL_DOLLARGESTURE = 0x800,
118         SDL_DOLLARRECORD,
119         SDL_MULTIGESTURE,
120         SDL_CLIPBOARDUPDATE = 0x900,
121         SDL_DROPFILE = 0x1000,
122         SDL_DROPTEXT,
123         SDL_DROPBEGIN,
124         SDL_DROPCOMPLETE,
125         SDL_AUDIODEVICEADDED = 0x1100,
126         SDL_AUDIODEVICEREMOVED,
127         SDL_RENDER_TARGETS_RESET = 0x2000,
128         SDL_RENDER_DEVICE_RESET,
129         SDL_USEREVENT = 0x8000,
130         SDL_LASTEVENT = 0xFFFF
131     }
132 }
133 else static if(sdlSupport >= SDLSupport.sdl204) {
134     enum SDL_EventType {
135         SDL_FIRSTEVENT = 0,
136         SDL_QUIT = 0x100,
137         SDL_APP_TERMINATING,
138         SDL_APP_LOWMEMORY,
139         SDL_APP_WILLENTERBACKGROUND,
140         SDL_APP_DIDENTERBACKGROUND,
141         SDL_APP_WILLENTERFOREGROUND,
142         SDL_APP_DIDENTERFOREGROUND,
143         SDL_WINDOWEVENT = 0x200,
144         SDL_SYSWMEVENT,
145         SDL_KEYDOWN = 0x300,
146         SDL_KEYUP,
147         SDL_TEXTEDITING,
148         SDL_TEXTINPUT,
149         SDL_KEYMAPCHANGED,
150         SDL_MOUSEMOTION = 0x400,
151         SDL_MOUSEBUTTONDOWN,
152         SDL_MOUSEBUTTONUP,
153         SDL_MOUSEWHEEL,
154         SDL_JOYAXISMOTION = 0x600,
155         SDL_JOYBALLMOTION,
156         SDL_JOYHATMOTION,
157         SDL_JOYBUTTONDOWN,
158         SDL_JOYBUTTONUP,
159         SDL_JOYDEVICEADDED,
160         SDL_JOYDEVICEREMOVED,
161         SDL_CONTROLLERAXISMOTION = 0x650,
162         SDL_CONTROLLERBUTTONDOWN,
163         SDL_CONTROLLERBUTTONUP,
164         SDL_CONTROLLERDEVICEADDED,
165         SDL_CONTROLLERDEVICEREMOVED,
166         SDL_CONTROLLERDEVICEREMAPPED,
167         SDL_FINGERDOWN = 0x700,
168         SDL_FINGERUP,
169         SDL_FINGERMOTION,
170         SDL_DOLLARGESTURE = 0x800,
171         SDL_DOLLARRECORD,
172         SDL_MULTIGESTURE,
173         SDL_CLIPBOARDUPDATE = 0x900,
174         SDL_DROPFILE = 0x1000,
175         SDL_AUDIODEVICEADDED = 0x1100,
176         SDL_AUDIODEVICEREMOVED,
177         SDL_RENDER_TARGETS_RESET = 0x2000,
178         SDL_RENDER_DEVICE_RESET,
179         SDL_USEREVENT = 0x8000,
180         SDL_LASTEVENT = 0xFFFF
181     }
182 }
183 else static if(sdlSupport >= SDLSupport.sdl201) {
184     enum SDL_EventType {
185         SDL_FIRSTEVENT = 0,
186         SDL_QUIT = 0x100,
187         SDL_APP_TERMINATING,
188         SDL_APP_LOWMEMORY,
189         SDL_APP_WILLENTERBACKGROUND,
190         SDL_APP_DIDENTERBACKGROUND,
191         SDL_APP_WILLENTERFOREGROUND,
192         SDL_APP_DIDENTERFOREGROUND,
193         SDL_WINDOWEVENT = 0x200,
194         SDL_SYSWMEVENT,
195         SDL_KEYDOWN = 0x300,
196         SDL_KEYUP,
197         SDL_TEXTEDITING,
198         SDL_TEXTINPUT,
199         SDL_MOUSEMOTION = 0x400,
200         SDL_MOUSEBUTTONDOWN,
201         SDL_MOUSEBUTTONUP,
202         SDL_MOUSEWHEEL,
203         SDL_JOYAXISMOTION = 0x600,
204         SDL_JOYBALLMOTION,
205         SDL_JOYHATMOTION,
206         SDL_JOYBUTTONDOWN,
207         SDL_JOYBUTTONUP,
208         SDL_JOYDEVICEADDED,
209         SDL_JOYDEVICEREMOVED,
210         SDL_CONTROLLERAXISMOTION = 0x650,
211         SDL_CONTROLLERBUTTONDOWN,
212         SDL_CONTROLLERBUTTONUP,
213         SDL_CONTROLLERDEVICEADDED,
214         SDL_CONTROLLERDEVICEREMOVED,
215         SDL_CONTROLLERDEVICEREMAPPED,
216         SDL_FINGERDOWN = 0x700,
217         SDL_FINGERUP,
218         SDL_FINGERMOTION,
219         SDL_DOLLARGESTURE = 0x800,
220         SDL_DOLLARRECORD,
221         SDL_MULTIGESTURE,
222         SDL_CLIPBOARDUPDATE = 0x900,
223         SDL_DROPFILE = 0x1000,
224         SDL_RENDER_TARGETS_RESET = 0x2000,
225         SDL_USEREVENT = 0x8000,
226         SDL_LASTEVENT = 0xFFFF
227     }
228 }
229 else {
230     enum SDL_EventType {
231         SDL_FIRSTEVENT = 0,
232         SDL_QUIT = 0x100,
233         SDL_APP_TERMINATING,
234         SDL_APP_LOWMEMORY,
235         SDL_APP_WILLENTERBACKGROUND,
236         SDL_APP_DIDENTERBACKGROUND,
237         SDL_APP_WILLENTERFOREGROUND,
238         SDL_APP_DIDENTERFOREGROUND,
239         SDL_WINDOWEVENT = 0x200,
240         SDL_SYSWMEVENT,
241         SDL_KEYDOWN = 0x300,
242         SDL_KEYUP,
243         SDL_TEXTEDITING,
244         SDL_TEXTINPUT,
245         SDL_MOUSEMOTION = 0x400,
246         SDL_MOUSEBUTTONDOWN,
247         SDL_MOUSEBUTTONUP,
248         SDL_MOUSEWHEEL,
249         SDL_JOYAXISMOTION = 0x600,
250         SDL_JOYBALLMOTION,
251         SDL_JOYHATMOTION,
252         SDL_JOYBUTTONDOWN,
253         SDL_JOYBUTTONUP,
254         SDL_JOYDEVICEADDED,
255         SDL_JOYDEVICEREMOVED,
256         SDL_CONTROLLERAXISMOTION = 0x650,
257         SDL_CONTROLLERBUTTONDOWN,
258         SDL_CONTROLLERBUTTONUP,
259         SDL_CONTROLLERDEVICEADDED,
260         SDL_CONTROLLERDEVICEREMOVED,
261         SDL_CONTROLLERDEVICEREMAPPED,
262         SDL_FINGERDOWN = 0x700,
263         SDL_FINGERUP,
264         SDL_FINGERMOTION,
265         SDL_DOLLARGESTURE = 0x800,
266         SDL_DOLLARRECORD,
267         SDL_MULTIGESTURE,
268         SDL_CLIPBOARDUPDATE = 0x900,
269         SDL_DROPFILE = 0x1000,
270         SDL_USEREVENT = 0x8000,
271         SDL_LASTEVENT = 0xFFFF
272     }
273 }
274 mixin(expandEnum!SDL_EventType);
275 
276 struct SDL_CommonEvent {
277     SDL_EventType type;
278     uint timestamp;
279 }
280 
281 static if(sdlSupport >= SDLSupport.sdl209) {
282     struct SDL_DisplayEvent {
283         SDL_EventType type;
284         uint timestamp;
285         uint display;
286         ubyte event;
287         ubyte padding1;
288         ubyte padding2;
289         ubyte padding3;
290         int data1;
291     }
292 }
293 
294 struct SDL_WindowEvent {
295     SDL_EventType type;
296     uint timestamp;
297     uint windowID;
298     SDL_WindowEventID event;
299     ubyte padding1;
300     ubyte padding2;
301     ubyte padding3;
302     int data1;
303     int data2;
304 }
305 
306 struct SDL_KeyboardEvent {
307     SDL_EventType type;
308     uint timestamp;
309     uint windowID;
310     ubyte state;
311     ubyte repeat;
312     ubyte padding2;
313     ubyte padding3;
314     SDL_Keysym keysym;
315 }
316 
317 enum SDL_TEXTEDITINGEVENT_TEXT_SIZE = 32;
318 struct SDL_TextEditingEvent {
319     SDL_EventType type;
320     uint timestamp;
321     uint windowID;
322     char[SDL_TEXTEDITINGEVENT_TEXT_SIZE] text;
323     int start;
324     int length;
325 }
326 
327 enum SDL_TEXTINPUTEVENT_TEXT_SIZE = 32;
328 struct SDL_TextInputEvent {
329     SDL_EventType type;
330     uint timestamp;
331     uint windowID;
332     char[SDL_TEXTINPUTEVENT_TEXT_SIZE] text;
333 }
334 
335 struct SDL_MouseMotionEvent {
336     SDL_EventType type;
337     uint timestamp;
338     uint windowID;
339     uint which;
340     uint state;
341     int x;
342     int y;
343     int xrel;
344     int yrel;
345 }
346 
347 struct SDL_MouseButtonEvent {
348     SDL_EventType type;
349     uint timestamp;
350     uint windowID;
351     uint which;
352     ubyte button;
353     ubyte state;
354     static if(sdlSupport == SDLSupport.sdl200) {
355         ubyte padding1;
356         ubyte padding2;
357     }
358     else {
359         ubyte clicks;
360         ubyte padding1;
361     }
362     int x;
363     int y;
364 }
365 
366 struct SDL_MouseWheelEvent {
367     SDL_EventType type;
368     uint timestamp;
369     uint windowID;
370     uint which;
371     int x;
372     int y;
373     static if(sdlSupport >= SDLSupport.sdl204) {
374         uint direction;
375     }
376 }
377 
378 struct SDL_JoyAxisEvent {
379     SDL_EventType type;
380     uint timestamp;
381     SDL_JoystickID which;
382     ubyte axis;
383     ubyte padding1;
384     ubyte padding2;
385     ubyte padding3;
386     short value;
387     ushort padding4;
388 }
389 
390 struct SDL_JoyBallEvent {
391     SDL_EventType type;
392     uint timestamp;
393     SDL_JoystickID which;
394     ubyte ball;
395     ubyte padding1;
396     ubyte padding2;
397     ubyte padding3;
398     short xrel;
399     short yrel;
400 }
401 
402 struct SDL_JoyHatEvent {
403     SDL_EventType type;
404     uint timestamp;
405     SDL_JoystickID which;
406     ubyte hat;
407     ubyte value;
408     ubyte padding1;
409     ubyte padding2;
410 }
411 
412 struct SDL_JoyButtonEvent {
413     SDL_EventType type;
414     uint timestamp;
415     SDL_JoystickID which;
416     ubyte button;
417     ubyte state;
418     ubyte padding1;
419     ubyte padding2;
420 }
421 
422 struct SDL_JoyDeviceEvent {
423     SDL_EventType type;
424     uint timestamp;
425     int which;
426 }
427 
428 struct SDL_ControllerAxisEvent {
429     SDL_EventType type;
430     uint timestamp;
431     SDL_JoystickID which;
432     ubyte axis;
433     ubyte padding1;
434     ubyte padding2;
435     ubyte padding3;
436     short value;
437     ushort padding4;
438 }
439 
440 struct SDL_ControllerButtonEvent {
441     SDL_EventType type;
442     uint timestamp;
443     SDL_JoystickID which;
444     ubyte button;
445     ubyte state;
446     ubyte padding1;
447     ubyte padding2;
448 }
449 
450 struct SDL_ControllerDeviceEvent {
451     SDL_EventType type;
452     uint timestamp;
453     int which;
454 }
455 
456 static if(sdlSupport >= SDLSupport.sdl204) {
457     struct SDL_AudioDeviceEvent {
458         uint type;
459         uint timestamp;
460         uint which;
461         ubyte iscapture;
462         ubyte padding1;
463         ubyte padding2;
464         ubyte padding3;
465     }
466 }
467 
468 struct SDL_TouchFingerEvent {
469     SDL_EventType type;
470     uint timestamp;
471     SDL_TouchID touchId;
472     SDL_FingerID fingerId;
473     float x;
474     float y;
475     float dx;
476     float dy;
477     float pressure;
478 }
479 
480 struct SDL_MultiGestureEvent {
481     SDL_EventType type;
482     uint timestamp;
483     SDL_TouchID touchId;
484     float dTheta;
485     float dDist;
486     float x;
487     float y;
488     ushort numFingers;
489     ushort padding;
490 }
491 
492 struct SDL_DollarGestureEvent {
493     SDL_EventType type;
494     uint timestamp;
495     SDL_TouchID touchId;
496     SDL_GestureID gestureId;
497     uint numFingers;
498     float error;
499     float x;
500     float y;
501 }
502 
503 struct SDL_DropEvent {
504     SDL_EventType type;
505     uint timestamp;
506     char* file;
507     static if(sdlSupport >= SDLSupport.sdl205) {
508         uint windowID;
509     }
510 }
511 
512 struct SDL_SensorEvent {
513     SDL_EventType type;
514     uint timestamp;
515     int which;
516     float[6] data;
517 }
518 
519 struct SDL_QuitEvent {
520     SDL_EventType type;
521     uint timestamp;
522 }
523 
524 struct SDL_OSEvent {
525     SDL_EventType type;
526     uint timestamp;
527 }
528 
529 struct SDL_UserEvent {
530     SDL_EventType type;
531     uint timestamp;
532     uint windowID;
533     int code;
534     void* data1;
535     void* data2;
536 }
537 
538 struct SDL_SysWMEvent {
539     SDL_EventType type;
540     uint timestamp;
541     SDL_SysWMmsg* msg;
542 }
543 
544 union SDL_Event {
545     SDL_EventType type;
546     SDL_CommonEvent common;
547     static if(sdlSupport >= SDLSupport.sdl209) {
548         SDL_DisplayEvent display;
549     }
550     SDL_WindowEvent window;
551     SDL_KeyboardEvent key;
552     SDL_TextEditingEvent edit;
553     SDL_TextInputEvent text;
554     SDL_MouseMotionEvent motion;
555     SDL_MouseButtonEvent button;
556     SDL_MouseWheelEvent wheel;
557     SDL_JoyAxisEvent jaxis;
558     SDL_JoyBallEvent jball;
559     SDL_JoyHatEvent jhat;
560     SDL_JoyButtonEvent jbutton;
561     SDL_JoyDeviceEvent jdevice;
562     SDL_ControllerAxisEvent caxis;
563     SDL_ControllerButtonEvent cbutton;
564     SDL_ControllerDeviceEvent cdevice;
565     static if(sdlSupport >= SDLSupport.sdl204) {
566         SDL_AudioDeviceEvent adevice;
567     }
568     static if(sdlSupport >= SDLSupport.sdl209) {
569         SDL_SensorEvent sensor;
570     }
571     SDL_QuitEvent quit;
572     SDL_UserEvent user;
573     SDL_SysWMEvent syswm;
574     SDL_TouchFingerEvent tfinger;
575     SDL_MultiGestureEvent mgesture;
576     SDL_DollarGestureEvent dgesture;
577     SDL_DropEvent drop;
578 
579     ubyte[56] padding;
580 }
581 
582 enum SDL_eventaction {
583     SDL_ADDEVENT,
584     SDL_PEEKEVENT,
585     SDL_GETEVENT
586 }
587 alias SDL_EventAction = SDL_eventaction;
588 mixin(expandEnum!SDL_EventAction);
589 
590 extern(C) nothrow alias SDL_EventFilter = int function(void* userdata, SDL_Event* event);
591 
592 enum {
593     SDL_QUERY = -1,
594     SDL_IGNORE = 0,
595     SDL_DISABLE = 0,
596     SDL_ENABLE = 1,
597 }
598 
599 @nogc nothrow {
600     int SDL_GetEventState(SDL_EventType type) {
601         pragma(inline, true);
602         return SDL_EventState(type, SDL_QUERY);
603     }
604 
605     // This is implemented in SDL_quit.h, but works better here.
606     bool SDL_QuitRequested() {
607         pragma(inline, true);
608         SDL_PumpEvents();
609         return SDL_PeepEvents(null,0,SDL_PEEKEVENT,SDL_QUIT,SDL_QUIT) > 0;
610     }
611 }
612 
613 version(BindSDL_Static) {
614     extern(C) @nogc nothrow {
615         void SDL_PumpEvents();
616         int SDL_PeepEvents(SDL_Event*,int,SDL_eventaction,uint,uint);
617         SDL_bool SDL_HasEvent(uint);
618         SDL_bool SDL_HasEvents(uint,uint);
619         void SDL_FlushEvent(uint);
620         void SDL_FlushEvents(uint,uint);
621         int SDL_PollEvent(SDL_Event*);
622         int SDL_WaitEvent(SDL_Event*);
623         int SDL_WaitEventTimeout(SDL_Event*,int);
624         int SDL_PushEvent(SDL_Event*);
625         void SDL_SetEventFilter(SDL_EventFilter,void*);
626         SDL_bool SDL_GetEventFilter(SDL_EventFilter*,void**);
627         void SDL_AddEventWatch(SDL_EventFilter,void*);
628         void SDL_DelEventWatch(SDL_EventFilter,void*);
629         void SDL_FilterEvents(SDL_EventFilter,void*);
630         ubyte SDL_EventState(uint,int);
631         uint SDL_RegisterEvents(int);
632     }
633 }
634 else {
635     extern(C) @nogc nothrow {
636         alias pSDL_PumpEvents = void function();
637         alias pSDL_PeepEvents = int function(SDL_Event*,int,SDL_eventaction,uint,uint);
638         alias pSDL_HasEvent = SDL_bool function(uint);
639         alias pSDL_HasEvents = SDL_bool function(uint,uint);
640         alias pSDL_FlushEvent = void function(uint);
641         alias pSDL_FlushEvents = void function(uint,uint);
642         alias pSDL_PollEvent = int function(SDL_Event*);
643         alias pSDL_WaitEvent = int function(SDL_Event*);
644         alias pSDL_WaitEventTimeout = int function(SDL_Event*,int);
645         alias pSDL_PushEvent = int function(SDL_Event*);
646         alias pSDL_SetEventFilter = void function(SDL_EventFilter,void*);
647         alias pSDL_GetEventFilter = SDL_bool function(SDL_EventFilter*,void**);
648         alias pSDL_AddEventWatch = void function(SDL_EventFilter,void*);
649         alias pSDL_DelEventWatch = void function(SDL_EventFilter,void*);
650         alias pSDL_FilterEvents = void function(SDL_EventFilter,void*);
651         alias pSDL_EventState = ubyte function(uint,int);
652         alias pSDL_RegisterEvents = uint function(int);
653     }
654 
655     __gshared {
656         pSDL_PumpEvents SDL_PumpEvents;
657         pSDL_PeepEvents SDL_PeepEvents;
658         pSDL_HasEvent SDL_HasEvent;
659         pSDL_HasEvents SDL_HasEvents;
660         pSDL_FlushEvent SDL_FlushEvent;
661         pSDL_FlushEvents SDL_FlushEvents;
662         pSDL_PollEvent SDL_PollEvent;
663         pSDL_WaitEvent SDL_WaitEvent;
664         pSDL_WaitEventTimeout SDL_WaitEventTimeout;
665         pSDL_PushEvent SDL_PushEvent;
666         pSDL_SetEventFilter SDL_SetEventFilter;
667         pSDL_GetEventFilter SDL_GetEventFilter;
668         pSDL_AddEventWatch SDL_AddEventWatch;
669         pSDL_DelEventWatch SDL_DelEventWatch;
670         pSDL_FilterEvents SDL_FilterEvents;
671         pSDL_EventState SDL_EventState;
672         pSDL_RegisterEvents SDL_RegisterEvents;
673     }
674 }