Mercurial > sdl-ios-xcode
comparison include/SDL_events.h @ 2678:3895761db26a gsoc2008_nds
Removed old touchscreen system, starting to implement mouse-based touchscreen. Also, more work on a non-software-rendering video driver
author | Darren Alton <dalton@stevens.edu> |
---|---|
date | Thu, 10 Jul 2008 23:35:01 +0000 |
parents | f1d07ba2e275 |
children |
comparison
equal
deleted
inserted
replaced
2677:6386764eb222 | 2678:3895761db26a |
---|---|
33 #include "SDL_error.h" | 33 #include "SDL_error.h" |
34 #include "SDL_video.h" | 34 #include "SDL_video.h" |
35 #include "SDL_keyboard.h" | 35 #include "SDL_keyboard.h" |
36 #include "SDL_mouse.h" | 36 #include "SDL_mouse.h" |
37 #include "SDL_joystick.h" | 37 #include "SDL_joystick.h" |
38 #include "SDL_touchscreen.h" | |
39 #include "SDL_quit.h" | 38 #include "SDL_quit.h" |
40 | 39 |
41 #include "begin_code.h" | 40 #include "begin_code.h" |
42 /* Set up for C function definitions, even when using C++ */ | 41 /* Set up for C function definitions, even when using C++ */ |
43 #ifdef __cplusplus | 42 #ifdef __cplusplus |
69 SDL_JOYAXISMOTION, /**< Joystick axis motion */ | 68 SDL_JOYAXISMOTION, /**< Joystick axis motion */ |
70 SDL_JOYBALLMOTION, /**< Joystick trackball motion */ | 69 SDL_JOYBALLMOTION, /**< Joystick trackball motion */ |
71 SDL_JOYHATMOTION, /**< Joystick hat position change */ | 70 SDL_JOYHATMOTION, /**< Joystick hat position change */ |
72 SDL_JOYBUTTONDOWN, /**< Joystick button pressed */ | 71 SDL_JOYBUTTONDOWN, /**< Joystick button pressed */ |
73 SDL_JOYBUTTONUP, /**< Joystick button released */ | 72 SDL_JOYBUTTONUP, /**< Joystick button released */ |
74 SDL_TOUCHPRESSED, /**< Touchscreen pressed */ | |
75 SDL_TOUCHRELEASED, /**< Touchscreen no longer pressed */ | |
76 SDL_TOUCHMOTION, /**< Touchscreen point motion */ | |
77 SDL_QUIT, /**< User-requested quit */ | 73 SDL_QUIT, /**< User-requested quit */ |
78 SDL_SYSWMEVENT, /**< System specific event */ | 74 SDL_SYSWMEVENT, /**< System specific event */ |
79 SDL_EVENT_RESERVED1, /**< Reserved for future use... */ | 75 SDL_EVENT_RESERVED1, /**< Reserved for future use... */ |
80 SDL_EVENT_RESERVED2, /**< Reserved for future use... */ | 76 SDL_EVENT_RESERVED2, /**< Reserved for future use... */ |
81 SDL_EVENT_RESERVED3, /**< Reserved for future use... */ | 77 SDL_EVENT_RESERVED3, /**< Reserved for future use... */ |
113 SDL_JOYBUTTONUPMASK = SDL_EVENTMASK(SDL_JOYBUTTONUP), | 109 SDL_JOYBUTTONUPMASK = SDL_EVENTMASK(SDL_JOYBUTTONUP), |
114 SDL_JOYEVENTMASK = SDL_EVENTMASK(SDL_JOYAXISMOTION) | | 110 SDL_JOYEVENTMASK = SDL_EVENTMASK(SDL_JOYAXISMOTION) | |
115 SDL_EVENTMASK(SDL_JOYBALLMOTION) | | 111 SDL_EVENTMASK(SDL_JOYBALLMOTION) | |
116 SDL_EVENTMASK(SDL_JOYHATMOTION) | | 112 SDL_EVENTMASK(SDL_JOYHATMOTION) | |
117 SDL_EVENTMASK(SDL_JOYBUTTONDOWN) | SDL_EVENTMASK(SDL_JOYBUTTONUP), | 113 SDL_EVENTMASK(SDL_JOYBUTTONDOWN) | SDL_EVENTMASK(SDL_JOYBUTTONUP), |
118 SDL_TOUCHPRESSEDMASK = SDL_EVENTMASK(SDL_TOUCHPRESSED), | |
119 SDL_TOUCHRELEASEDMASK = SDL_EVENTMASK(SDL_TOUCHRELEASED), | |
120 SDL_TOUCHMOTIONMASK = SDL_EVENTMASK(SDL_TOUCHMOTION), | |
121 SDL_TOUCHEVENTMASK = SDL_EVENTMASK(SDL_TOUCHPRESSED) | | |
122 SDL_EVENTMASK(SDL_TOUCHRELEASED) | SDL_EVENTMASK(SDL_TOUCHMOTION), | |
123 SDL_QUITMASK = SDL_EVENTMASK(SDL_QUIT), | 114 SDL_QUITMASK = SDL_EVENTMASK(SDL_QUIT), |
124 SDL_SYSWMEVENTMASK = SDL_EVENTMASK(SDL_SYSWMEVENT) | 115 SDL_SYSWMEVENTMASK = SDL_EVENTMASK(SDL_SYSWMEVENT) |
125 } SDL_EventMask; | 116 } SDL_EventMask; |
126 #define SDL_ALLEVENTS 0xFFFFFFFF | 117 #define SDL_ALLEVENTS 0xFFFFFFFF |
127 | 118 |
269 Uint8 type; /**< SDL_JOYBUTTONDOWN or SDL_JOYBUTTONUP */ | 260 Uint8 type; /**< SDL_JOYBUTTONDOWN or SDL_JOYBUTTONUP */ |
270 Uint8 which; /**< The joystick device index */ | 261 Uint8 which; /**< The joystick device index */ |
271 Uint8 button; /**< The joystick button index */ | 262 Uint8 button; /**< The joystick button index */ |
272 Uint8 state; /**< SDL_PRESSED or SDL_RELEASED */ | 263 Uint8 state; /**< SDL_PRESSED or SDL_RELEASED */ |
273 } SDL_JoyButtonEvent; | 264 } SDL_JoyButtonEvent; |
274 | |
275 /** | |
276 * \struct SDL_TouchEvent | |
277 * | |
278 * \brief Touchscreen motion event structure (event.touch.*) | |
279 */ | |
280 typedef struct SDL_TouchEvent | |
281 { | |
282 Uint8 type; /**< SDL_TOUCHMOTION, SDL_TOUCHPRESS, SDL_TOUCHRELEASED */ | |
283 Uint8 which; /**< The touchscreen device index */ | |
284 int point; /**< The touch point index, relevant for multitouch. */ | |
285 int xpos; /**< The X coordinate of the touch point. */ | |
286 int ypos; /**< The Y coordinate of the touch point. */ | |
287 int pressure; /**< The pressure of the touch */ | |
288 } SDL_TouchEvent; | |
289 | 265 |
290 /** | 266 /** |
291 * \struct SDL_QuitEvent | 267 * \struct SDL_QuitEvent |
292 * | 268 * |
293 * \brief The "quit requested" event | 269 * \brief The "quit requested" event |
356 SDL_MouseWheelEvent wheel; /**< Mouse wheel event data */ | 332 SDL_MouseWheelEvent wheel; /**< Mouse wheel event data */ |
357 SDL_JoyAxisEvent jaxis; /**< Joystick axis event data */ | 333 SDL_JoyAxisEvent jaxis; /**< Joystick axis event data */ |
358 SDL_JoyBallEvent jball; /**< Joystick ball event data */ | 334 SDL_JoyBallEvent jball; /**< Joystick ball event data */ |
359 SDL_JoyHatEvent jhat; /**< Joystick hat event data */ | 335 SDL_JoyHatEvent jhat; /**< Joystick hat event data */ |
360 SDL_JoyButtonEvent jbutton; /**< Joystick button event data */ | 336 SDL_JoyButtonEvent jbutton; /**< Joystick button event data */ |
361 SDL_TouchEvent touch; /**< Touchscreen event data */ | |
362 SDL_QuitEvent quit; /**< Quit request event data */ | 337 SDL_QuitEvent quit; /**< Quit request event data */ |
363 SDL_UserEvent user; /**< Custom event data */ | 338 SDL_UserEvent user; /**< Custom event data */ |
364 SDL_SysWMEvent syswm; /**< System dependent window event data */ | 339 SDL_SysWMEvent syswm; /**< System dependent window event data */ |
365 | 340 |
366 /* Temporarily here for backwards compatibility */ | 341 /* Temporarily here for backwards compatibility */ |