Mercurial > sdl-ios-xcode
comparison src/events/SDL_events.c @ 2674:f1d07ba2e275 gsoc2008_nds
Started adding framework for Touchscreen API, based on and (consistent with) the existing Joystick API.
author | Darren Alton <dalton@stevens.edu> |
---|---|
date | Mon, 23 Jun 2008 11:55:26 +0000 |
parents | 047245361002 |
children | 3895761db26a |
comparison
equal
deleted
inserted
replaced
2673:24a6b3588eac | 2674:f1d07ba2e275 |
---|---|
28 #include "SDL_sysevents.h" | 28 #include "SDL_sysevents.h" |
29 #include "SDL_events_c.h" | 29 #include "SDL_events_c.h" |
30 #include "../timer/SDL_timer_c.h" | 30 #include "../timer/SDL_timer_c.h" |
31 #if !SDL_JOYSTICK_DISABLED | 31 #if !SDL_JOYSTICK_DISABLED |
32 #include "../joystick/SDL_joystick_c.h" | 32 #include "../joystick/SDL_joystick_c.h" |
33 #endif | |
34 #if !SDL_TOUCHSCREEN_DISABLED | |
35 #include "../touchscreen/SDL_touchscreen_c.h" | |
33 #endif | 36 #endif |
34 | 37 |
35 /* Public data -- the event filter */ | 38 /* Public data -- the event filter */ |
36 SDL_EventFilter SDL_EventOK = NULL; | 39 SDL_EventFilter SDL_EventOK = NULL; |
37 void *SDL_EventOKParam; | 40 void *SDL_EventOKParam; |
113 } | 116 } |
114 #if !SDL_JOYSTICK_DISABLED | 117 #if !SDL_JOYSTICK_DISABLED |
115 /* Check for joystick state change */ | 118 /* Check for joystick state change */ |
116 if (SDL_numjoysticks && (SDL_eventstate & SDL_JOYEVENTMASK)) { | 119 if (SDL_numjoysticks && (SDL_eventstate & SDL_JOYEVENTMASK)) { |
117 SDL_JoystickUpdate(); | 120 SDL_JoystickUpdate(); |
121 } | |
122 #endif | |
123 #if !SDL_TOUCHSCREEN_DISABLED | |
124 /* Similarly, check for touchscreen state change */ | |
125 if (SDL_numtouchscreens && (SDL_eventstate & SDL_TOUCHEVENTMASK)) { | |
126 SDL_TouchscreenUpdate(); | |
118 } | 127 } |
119 #endif | 128 #endif |
120 | 129 |
121 /* Give up the CPU for the rest of our timeslice */ | 130 /* Give up the CPU for the rest of our timeslice */ |
122 SDL_EventLock.safe = 1; | 131 SDL_EventLock.safe = 1; |
386 /* Check for joystick state change */ | 395 /* Check for joystick state change */ |
387 if (SDL_numjoysticks && (SDL_eventstate & SDL_JOYEVENTMASK)) { | 396 if (SDL_numjoysticks && (SDL_eventstate & SDL_JOYEVENTMASK)) { |
388 SDL_JoystickUpdate(); | 397 SDL_JoystickUpdate(); |
389 } | 398 } |
390 #endif | 399 #endif |
400 #if !SDL_TOUCHSCREEN_DISABLED | |
401 /* Check for touchscreen state change */ | |
402 if (SDL_numtouchscreens && (SDL_eventstate & SDL_TOUCHEVENTMASK)) { | |
403 SDL_TouchscreenUpdate(); | |
404 } | |
405 #endif | |
391 } | 406 } |
392 } | 407 } |
393 | 408 |
394 /* Public functions */ | 409 /* Public functions */ |
395 | 410 |