Mercurial > sdl-ios-xcode
annotate include/SDL_events.h @ 1324:42e95163d553
Favor using pthread_mutexattr_settype() on Linux.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Fri, 03 Feb 2006 06:33:54 +0000 |
parents | c9b51268668f |
children | 450721ad5436 |
rev | line source |
---|---|
0 | 1 /* |
2 SDL - Simple DirectMedia Layer | |
1312
c9b51268668f
Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents:
1301
diff
changeset
|
3 Copyright (C) 1997-2006 Sam Lantinga |
0 | 4 |
5 This library is free software; you can redistribute it and/or | |
1312
c9b51268668f
Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents:
1301
diff
changeset
|
6 modify it under the terms of the GNU Lesser General Public |
0 | 7 License as published by the Free Software Foundation; either |
1312
c9b51268668f
Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents:
1301
diff
changeset
|
8 version 2.1 of the License, or (at your option) any later version. |
0 | 9 |
10 This library is distributed in the hope that it will be useful, | |
11 but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
1312
c9b51268668f
Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents:
1301
diff
changeset
|
13 Lesser General Public License for more details. |
0 | 14 |
1312
c9b51268668f
Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents:
1301
diff
changeset
|
15 You should have received a copy of the GNU Lesser General Public |
c9b51268668f
Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents:
1301
diff
changeset
|
16 License along with this library; if not, write to the Free Software |
c9b51268668f
Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents:
1301
diff
changeset
|
17 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
0 | 18 |
19 Sam Lantinga | |
251
b8688cfdc232
Updated the headers with the correct e-mail address
Sam Lantinga <slouken@libsdl.org>
parents:
0
diff
changeset
|
20 slouken@libsdl.org |
0 | 21 */ |
22 | |
23 /* Include file for SDL event handling */ | |
24 | |
25 #ifndef _SDL_events_h | |
26 #define _SDL_events_h | |
27 | |
28 #include "SDL_types.h" | |
29 #include "SDL_active.h" | |
30 #include "SDL_keyboard.h" | |
31 #include "SDL_mouse.h" | |
32 #include "SDL_joystick.h" | |
33 #include "SDL_quit.h" | |
34 | |
35 #include "begin_code.h" | |
36 /* Set up for C function definitions, even when using C++ */ | |
37 #ifdef __cplusplus | |
38 extern "C" { | |
39 #endif | |
40 | |
41 /* Event enumerations */ | |
1294
1760ceb23bc6
Date: Fri, 18 Feb 2005 20:49:35 +0200 (EET)
Sam Lantinga <slouken@libsdl.org>
parents:
1258
diff
changeset
|
42 typedef enum { |
1760ceb23bc6
Date: Fri, 18 Feb 2005 20:49:35 +0200 (EET)
Sam Lantinga <slouken@libsdl.org>
parents:
1258
diff
changeset
|
43 SDL_NOEVENT = 0, /* Unused (do not remove) */ |
0 | 44 SDL_ACTIVEEVENT, /* Application loses/gains visibility */ |
45 SDL_KEYDOWN, /* Keys pressed */ | |
46 SDL_KEYUP, /* Keys released */ | |
47 SDL_MOUSEMOTION, /* Mouse moved */ | |
48 SDL_MOUSEBUTTONDOWN, /* Mouse button pressed */ | |
49 SDL_MOUSEBUTTONUP, /* Mouse button released */ | |
50 SDL_JOYAXISMOTION, /* Joystick axis motion */ | |
51 SDL_JOYBALLMOTION, /* Joystick trackball motion */ | |
52 SDL_JOYHATMOTION, /* Joystick hat position change */ | |
53 SDL_JOYBUTTONDOWN, /* Joystick button pressed */ | |
54 SDL_JOYBUTTONUP, /* Joystick button released */ | |
55 SDL_QUIT, /* User-requested quit */ | |
56 SDL_SYSWMEVENT, /* System specific event */ | |
57 SDL_EVENT_RESERVEDA, /* Reserved for future use.. */ | |
58 SDL_EVENT_RESERVEDB, /* Reserved for future use.. */ | |
59 SDL_VIDEORESIZE, /* User resized video mode */ | |
60 SDL_VIDEOEXPOSE, /* Screen needs to be redrawn */ | |
61 SDL_EVENT_RESERVED2, /* Reserved for future use.. */ | |
62 SDL_EVENT_RESERVED3, /* Reserved for future use.. */ | |
63 SDL_EVENT_RESERVED4, /* Reserved for future use.. */ | |
64 SDL_EVENT_RESERVED5, /* Reserved for future use.. */ | |
65 SDL_EVENT_RESERVED6, /* Reserved for future use.. */ | |
66 SDL_EVENT_RESERVED7, /* Reserved for future use.. */ | |
67 /* Events SDL_USEREVENT through SDL_MAXEVENTS-1 are for your use */ | |
68 SDL_USEREVENT = 24, | |
69 /* This last event is only for bounding internal arrays | |
70 It is the number of bits in the event mask datatype -- Uint32 | |
71 */ | |
72 SDL_NUMEVENTS = 32 | |
1294
1760ceb23bc6
Date: Fri, 18 Feb 2005 20:49:35 +0200 (EET)
Sam Lantinga <slouken@libsdl.org>
parents:
1258
diff
changeset
|
73 } SDL_EventType; |
0 | 74 |
75 /* Predefined event masks */ | |
76 #define SDL_EVENTMASK(X) (1<<(X)) | |
1294
1760ceb23bc6
Date: Fri, 18 Feb 2005 20:49:35 +0200 (EET)
Sam Lantinga <slouken@libsdl.org>
parents:
1258
diff
changeset
|
77 typedef enum { |
0 | 78 SDL_ACTIVEEVENTMASK = SDL_EVENTMASK(SDL_ACTIVEEVENT), |
79 SDL_KEYDOWNMASK = SDL_EVENTMASK(SDL_KEYDOWN), | |
80 SDL_KEYUPMASK = SDL_EVENTMASK(SDL_KEYUP), | |
1297
7b32c7a586c9
*** empty log message ***
Sam Lantinga <slouken@libsdl.org>
parents:
1294
diff
changeset
|
81 SDL_KEYEVENTMASK = SDL_EVENTMASK(SDL_KEYDOWN)| |
1301 | 82 SDL_EVENTMASK(SDL_KEYUP), |
0 | 83 SDL_MOUSEMOTIONMASK = SDL_EVENTMASK(SDL_MOUSEMOTION), |
84 SDL_MOUSEBUTTONDOWNMASK = SDL_EVENTMASK(SDL_MOUSEBUTTONDOWN), | |
85 SDL_MOUSEBUTTONUPMASK = SDL_EVENTMASK(SDL_MOUSEBUTTONUP), | |
86 SDL_MOUSEEVENTMASK = SDL_EVENTMASK(SDL_MOUSEMOTION)| | |
87 SDL_EVENTMASK(SDL_MOUSEBUTTONDOWN)| | |
88 SDL_EVENTMASK(SDL_MOUSEBUTTONUP), | |
89 SDL_JOYAXISMOTIONMASK = SDL_EVENTMASK(SDL_JOYAXISMOTION), | |
90 SDL_JOYBALLMOTIONMASK = SDL_EVENTMASK(SDL_JOYBALLMOTION), | |
91 SDL_JOYHATMOTIONMASK = SDL_EVENTMASK(SDL_JOYHATMOTION), | |
92 SDL_JOYBUTTONDOWNMASK = SDL_EVENTMASK(SDL_JOYBUTTONDOWN), | |
93 SDL_JOYBUTTONUPMASK = SDL_EVENTMASK(SDL_JOYBUTTONUP), | |
94 SDL_JOYEVENTMASK = SDL_EVENTMASK(SDL_JOYAXISMOTION)| | |
95 SDL_EVENTMASK(SDL_JOYBALLMOTION)| | |
96 SDL_EVENTMASK(SDL_JOYHATMOTION)| | |
97 SDL_EVENTMASK(SDL_JOYBUTTONDOWN)| | |
98 SDL_EVENTMASK(SDL_JOYBUTTONUP), | |
99 SDL_VIDEORESIZEMASK = SDL_EVENTMASK(SDL_VIDEORESIZE), | |
100 SDL_VIDEOEXPOSEMASK = SDL_EVENTMASK(SDL_VIDEOEXPOSE), | |
101 SDL_QUITMASK = SDL_EVENTMASK(SDL_QUIT), | |
102 SDL_SYSWMEVENTMASK = SDL_EVENTMASK(SDL_SYSWMEVENT) | |
1294
1760ceb23bc6
Date: Fri, 18 Feb 2005 20:49:35 +0200 (EET)
Sam Lantinga <slouken@libsdl.org>
parents:
1258
diff
changeset
|
103 } SDL_EventMask ; |
0 | 104 #define SDL_ALLEVENTS 0xFFFFFFFF |
105 | |
106 /* Application visibility event structure */ | |
911
04a403e4ccf5
Date: Mon, 3 May 2004 03:15:01 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
844
diff
changeset
|
107 typedef struct SDL_ActiveEvent { |
0 | 108 Uint8 type; /* SDL_ACTIVEEVENT */ |
109 Uint8 gain; /* Whether given states were gained or lost (1/0) */ | |
110 Uint8 state; /* A mask of the focus states */ | |
111 } SDL_ActiveEvent; | |
112 | |
113 /* Keyboard event structure */ | |
911
04a403e4ccf5
Date: Mon, 3 May 2004 03:15:01 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
844
diff
changeset
|
114 typedef struct SDL_KeyboardEvent { |
0 | 115 Uint8 type; /* SDL_KEYDOWN or SDL_KEYUP */ |
116 Uint8 which; /* The keyboard device index */ | |
117 Uint8 state; /* SDL_PRESSED or SDL_RELEASED */ | |
118 SDL_keysym keysym; | |
119 } SDL_KeyboardEvent; | |
120 | |
121 /* Mouse motion event structure */ | |
911
04a403e4ccf5
Date: Mon, 3 May 2004 03:15:01 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
844
diff
changeset
|
122 typedef struct SDL_MouseMotionEvent { |
0 | 123 Uint8 type; /* SDL_MOUSEMOTION */ |
124 Uint8 which; /* The mouse device index */ | |
125 Uint8 state; /* The current button state */ | |
126 Uint16 x, y; /* The X/Y coordinates of the mouse */ | |
127 Sint16 xrel; /* The relative motion in the X direction */ | |
128 Sint16 yrel; /* The relative motion in the Y direction */ | |
129 } SDL_MouseMotionEvent; | |
130 | |
131 /* Mouse button event structure */ | |
911
04a403e4ccf5
Date: Mon, 3 May 2004 03:15:01 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
844
diff
changeset
|
132 typedef struct SDL_MouseButtonEvent { |
0 | 133 Uint8 type; /* SDL_MOUSEBUTTONDOWN or SDL_MOUSEBUTTONUP */ |
134 Uint8 which; /* The mouse device index */ | |
135 Uint8 button; /* The mouse button index */ | |
136 Uint8 state; /* SDL_PRESSED or SDL_RELEASED */ | |
137 Uint16 x, y; /* The X/Y coordinates of the mouse at press time */ | |
138 } SDL_MouseButtonEvent; | |
139 | |
140 /* Joystick axis motion event structure */ | |
911
04a403e4ccf5
Date: Mon, 3 May 2004 03:15:01 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
844
diff
changeset
|
141 typedef struct SDL_JoyAxisEvent { |
0 | 142 Uint8 type; /* SDL_JOYAXISMOTION */ |
143 Uint8 which; /* The joystick device index */ | |
144 Uint8 axis; /* The joystick axis index */ | |
145 Sint16 value; /* The axis value (range: -32768 to 32767) */ | |
146 } SDL_JoyAxisEvent; | |
147 | |
148 /* Joystick trackball motion event structure */ | |
911
04a403e4ccf5
Date: Mon, 3 May 2004 03:15:01 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
844
diff
changeset
|
149 typedef struct SDL_JoyBallEvent { |
0 | 150 Uint8 type; /* SDL_JOYBALLMOTION */ |
151 Uint8 which; /* The joystick device index */ | |
152 Uint8 ball; /* The joystick trackball index */ | |
153 Sint16 xrel; /* The relative motion in the X direction */ | |
154 Sint16 yrel; /* The relative motion in the Y direction */ | |
155 } SDL_JoyBallEvent; | |
156 | |
157 /* Joystick hat position change event structure */ | |
911
04a403e4ccf5
Date: Mon, 3 May 2004 03:15:01 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
844
diff
changeset
|
158 typedef struct SDL_JoyHatEvent { |
0 | 159 Uint8 type; /* SDL_JOYHATMOTION */ |
160 Uint8 which; /* The joystick device index */ | |
161 Uint8 hat; /* The joystick hat index */ | |
162 Uint8 value; /* The hat position value: | |
577
f7596a8a3b8b
Fixed header docs for the joystick hat position
Sam Lantinga <slouken@libsdl.org>
parents:
337
diff
changeset
|
163 SDL_HAT_LEFTUP SDL_HAT_UP SDL_HAT_RIGHTUP |
f7596a8a3b8b
Fixed header docs for the joystick hat position
Sam Lantinga <slouken@libsdl.org>
parents:
337
diff
changeset
|
164 SDL_HAT_LEFT SDL_HAT_CENTERED SDL_HAT_RIGHT |
f7596a8a3b8b
Fixed header docs for the joystick hat position
Sam Lantinga <slouken@libsdl.org>
parents:
337
diff
changeset
|
165 SDL_HAT_LEFTDOWN SDL_HAT_DOWN SDL_HAT_RIGHTDOWN |
0 | 166 Note that zero means the POV is centered. |
167 */ | |
168 } SDL_JoyHatEvent; | |
169 | |
170 /* Joystick button event structure */ | |
911
04a403e4ccf5
Date: Mon, 3 May 2004 03:15:01 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
844
diff
changeset
|
171 typedef struct SDL_JoyButtonEvent { |
0 | 172 Uint8 type; /* SDL_JOYBUTTONDOWN or SDL_JOYBUTTONUP */ |
173 Uint8 which; /* The joystick device index */ | |
174 Uint8 button; /* The joystick button index */ | |
175 Uint8 state; /* SDL_PRESSED or SDL_RELEASED */ | |
176 } SDL_JoyButtonEvent; | |
177 | |
178 /* The "window resized" event | |
179 When you get this event, you are responsible for setting a new video | |
180 mode with the new width and height. | |
181 */ | |
911
04a403e4ccf5
Date: Mon, 3 May 2004 03:15:01 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
844
diff
changeset
|
182 typedef struct SDL_ResizeEvent { |
0 | 183 Uint8 type; /* SDL_VIDEORESIZE */ |
184 int w; /* New width */ | |
185 int h; /* New height */ | |
186 } SDL_ResizeEvent; | |
187 | |
188 /* The "screen redraw" event */ | |
911
04a403e4ccf5
Date: Mon, 3 May 2004 03:15:01 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
844
diff
changeset
|
189 typedef struct SDL_ExposeEvent { |
0 | 190 Uint8 type; /* SDL_VIDEOEXPOSE */ |
191 } SDL_ExposeEvent; | |
192 | |
193 /* The "quit requested" event */ | |
911
04a403e4ccf5
Date: Mon, 3 May 2004 03:15:01 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
844
diff
changeset
|
194 typedef struct SDL_QuitEvent { |
0 | 195 Uint8 type; /* SDL_QUIT */ |
196 } SDL_QuitEvent; | |
197 | |
198 /* A user-defined event type */ | |
911
04a403e4ccf5
Date: Mon, 3 May 2004 03:15:01 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
844
diff
changeset
|
199 typedef struct SDL_UserEvent { |
0 | 200 Uint8 type; /* SDL_USEREVENT through SDL_NUMEVENTS-1 */ |
201 int code; /* User defined event code */ | |
202 void *data1; /* User defined data pointer */ | |
203 void *data2; /* User defined data pointer */ | |
204 } SDL_UserEvent; | |
205 | |
206 /* If you want to use this event, you should include SDL_syswm.h */ | |
207 struct SDL_SysWMmsg; | |
208 typedef struct SDL_SysWMmsg SDL_SysWMmsg; | |
911
04a403e4ccf5
Date: Mon, 3 May 2004 03:15:01 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
844
diff
changeset
|
209 typedef struct SDL_SysWMEvent { |
0 | 210 Uint8 type; |
211 SDL_SysWMmsg *msg; | |
212 } SDL_SysWMEvent; | |
213 | |
214 /* General event structure */ | |
1258
b2283b0ded26
Date: Thu, 19 Jan 2006 20:02:29 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
930
diff
changeset
|
215 typedef union SDL_Event { |
0 | 216 Uint8 type; |
217 SDL_ActiveEvent active; | |
218 SDL_KeyboardEvent key; | |
219 SDL_MouseMotionEvent motion; | |
220 SDL_MouseButtonEvent button; | |
221 SDL_JoyAxisEvent jaxis; | |
222 SDL_JoyBallEvent jball; | |
223 SDL_JoyHatEvent jhat; | |
224 SDL_JoyButtonEvent jbutton; | |
225 SDL_ResizeEvent resize; | |
226 SDL_ExposeEvent expose; | |
227 SDL_QuitEvent quit; | |
228 SDL_UserEvent user; | |
229 SDL_SysWMEvent syswm; | |
230 } SDL_Event; | |
231 | |
232 | |
233 /* Function prototypes */ | |
234 | |
235 /* Pumps the event loop, gathering events from the input devices. | |
236 This function updates the event queue and internal input device state. | |
237 This should only be run in the thread that sets the video mode. | |
238 */ | |
337
9154ec9ca3d2
Explicitly specify the SDL API calling convention (C by default)
Sam Lantinga <slouken@libsdl.org>
parents:
297
diff
changeset
|
239 extern DECLSPEC void SDLCALL SDL_PumpEvents(void); |
0 | 240 |
241 /* Checks the event queue for messages and optionally returns them. | |
242 If 'action' is SDL_ADDEVENT, up to 'numevents' events will be added to | |
243 the back of the event queue. | |
244 If 'action' is SDL_PEEKEVENT, up to 'numevents' events at the front | |
245 of the event queue, matching 'mask', will be returned and will not | |
246 be removed from the queue. | |
247 If 'action' is SDL_GETEVENT, up to 'numevents' events at the front | |
248 of the event queue, matching 'mask', will be returned and will be | |
249 removed from the queue. | |
250 This function returns the number of events actually stored, or -1 | |
251 if there was an error. This function is thread-safe. | |
252 */ | |
253 typedef enum { | |
254 SDL_ADDEVENT, | |
255 SDL_PEEKEVENT, | |
256 SDL_GETEVENT | |
257 } SDL_eventaction; | |
258 /* */ | |
337
9154ec9ca3d2
Explicitly specify the SDL API calling convention (C by default)
Sam Lantinga <slouken@libsdl.org>
parents:
297
diff
changeset
|
259 extern DECLSPEC int SDLCALL SDL_PeepEvents(SDL_Event *events, int numevents, |
0 | 260 SDL_eventaction action, Uint32 mask); |
261 | |
262 /* Polls for currently pending events, and returns 1 if there are any pending | |
263 events, or 0 if there are none available. If 'event' is not NULL, the next | |
264 event is removed from the queue and stored in that area. | |
265 */ | |
337
9154ec9ca3d2
Explicitly specify the SDL API calling convention (C by default)
Sam Lantinga <slouken@libsdl.org>
parents:
297
diff
changeset
|
266 extern DECLSPEC int SDLCALL SDL_PollEvent(SDL_Event *event); |
0 | 267 |
268 /* Waits indefinitely for the next available event, returning 1, or 0 if there | |
269 was an error while waiting for events. If 'event' is not NULL, the next | |
270 event is removed from the queue and stored in that area. | |
271 */ | |
337
9154ec9ca3d2
Explicitly specify the SDL API calling convention (C by default)
Sam Lantinga <slouken@libsdl.org>
parents:
297
diff
changeset
|
272 extern DECLSPEC int SDLCALL SDL_WaitEvent(SDL_Event *event); |
0 | 273 |
274 /* Add an event to the event queue. | |
844
cd0c77df70a4
*** empty log message ***
Sam Lantinga <slouken@libsdl.org>
parents:
769
diff
changeset
|
275 This function returns 0 on success, or -1 if the event queue was full |
cd0c77df70a4
*** empty log message ***
Sam Lantinga <slouken@libsdl.org>
parents:
769
diff
changeset
|
276 or there was some other error. |
0 | 277 */ |
337
9154ec9ca3d2
Explicitly specify the SDL API calling convention (C by default)
Sam Lantinga <slouken@libsdl.org>
parents:
297
diff
changeset
|
278 extern DECLSPEC int SDLCALL SDL_PushEvent(SDL_Event *event); |
0 | 279 |
280 /* | |
281 This function sets up a filter to process all events before they | |
282 change internal state and are posted to the internal event queue. | |
283 | |
284 The filter is protypted as: | |
285 */ | |
930
02759105b989
Date: Fri, 20 Aug 2004 08:31:20 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
911
diff
changeset
|
286 typedef int (SDLCALL *SDL_EventFilter)(const SDL_Event *event); |
0 | 287 /* |
288 If the filter returns 1, then the event will be added to the internal queue. | |
289 If it returns 0, then the event will be dropped from the queue, but the | |
290 internal state will still be updated. This allows selective filtering of | |
291 dynamically arriving events. | |
292 | |
293 WARNING: Be very careful of what you do in the event filter function, as | |
294 it may run in a different thread! | |
295 | |
296 There is one caveat when dealing with the SDL_QUITEVENT event type. The | |
297 event filter is only called when the window manager desires to close the | |
298 application window. If the event filter returns 1, then the window will | |
299 be closed, otherwise the window will remain open if possible. | |
300 If the quit event is generated by an interrupt signal, it will bypass the | |
301 internal queue and be delivered to the application at the next event poll. | |
302 */ | |
337
9154ec9ca3d2
Explicitly specify the SDL API calling convention (C by default)
Sam Lantinga <slouken@libsdl.org>
parents:
297
diff
changeset
|
303 extern DECLSPEC void SDLCALL SDL_SetEventFilter(SDL_EventFilter filter); |
0 | 304 |
305 /* | |
306 Return the current event filter - can be used to "chain" filters. | |
307 If there is no event filter set, this function returns NULL. | |
308 */ | |
337
9154ec9ca3d2
Explicitly specify the SDL API calling convention (C by default)
Sam Lantinga <slouken@libsdl.org>
parents:
297
diff
changeset
|
309 extern DECLSPEC SDL_EventFilter SDLCALL SDL_GetEventFilter(void); |
0 | 310 |
311 /* | |
312 This function allows you to set the state of processing certain events. | |
313 If 'state' is set to SDL_IGNORE, that event will be automatically dropped | |
314 from the event queue and will not event be filtered. | |
315 If 'state' is set to SDL_ENABLE, that event will be processed normally. | |
316 If 'state' is set to SDL_QUERY, SDL_EventState() will return the | |
317 current processing state of the specified event. | |
318 */ | |
319 #define SDL_QUERY -1 | |
320 #define SDL_IGNORE 0 | |
321 #define SDL_DISABLE 0 | |
322 #define SDL_ENABLE 1 | |
337
9154ec9ca3d2
Explicitly specify the SDL API calling convention (C by default)
Sam Lantinga <slouken@libsdl.org>
parents:
297
diff
changeset
|
323 extern DECLSPEC Uint8 SDLCALL SDL_EventState(Uint8 type, int state); |
0 | 324 |
325 | |
326 /* Ends C function definitions when using C++ */ | |
327 #ifdef __cplusplus | |
328 } | |
329 #endif | |
330 #include "close_code.h" | |
331 | |
332 #endif /* _SDL_events_h */ |