comparison include/SDL_events.h @ 4641:49a97daea6ec

Added touch event definitions. Heavily modified events/SDL_touch*.
author Jim Grandpre <jim.tla@gmail.com>
date Thu, 27 May 2010 01:21:37 -0400
parents e953700da4ca
children 057e8762d2a1
comparison
equal deleted inserted replaced
4640:f068a6dfc858 4641:49a97daea6ec
84 SDL_JOYBALLMOTION, /**< Joystick trackball motion */ 84 SDL_JOYBALLMOTION, /**< Joystick trackball motion */
85 SDL_JOYHATMOTION, /**< Joystick hat position change */ 85 SDL_JOYHATMOTION, /**< Joystick hat position change */
86 SDL_JOYBUTTONDOWN, /**< Joystick button pressed */ 86 SDL_JOYBUTTONDOWN, /**< Joystick button pressed */
87 SDL_JOYBUTTONUP, /**< Joystick button released */ 87 SDL_JOYBUTTONUP, /**< Joystick button released */
88 88
89 /*Touch events - is 0x700 the correct place?*/
90 SDL_FINGERDOWN = 0x700,
91 SDL_FINGERUP,
92 SDL_FINGERMOTION,
93 SDL_TOUCHBUTTONDOWN,
94 SDL_TOUCHBUTTONUP,
95
89 /* Obsolete events */ 96 /* Obsolete events */
90 SDL_EVENT_COMPAT1 = 0x7000, /**< SDL 1.2 events for compatibility */ 97 SDL_EVENT_COMPAT1 = 0x7000, /**< SDL 1.2 events for compatibility */
91 SDL_EVENT_COMPAT2, 98 SDL_EVENT_COMPAT2,
92 SDL_EVENT_COMPAT3, 99 SDL_EVENT_COMPAT3,
100
93 101
94 /** Events ::SDL_USEREVENT through ::SDL_LASTEVENT are for your use, 102 /** Events ::SDL_USEREVENT through ::SDL_LASTEVENT are for your use,
95 * and should be allocated with SDL_RegisterEvents() 103 * and should be allocated with SDL_RegisterEvents()
96 */ 104 */
97 SDL_USEREVENT = 0x8000, 105 SDL_USEREVENT = 0x8000,
286 Uint8 which; /**< The joystick device index */ 294 Uint8 which; /**< The joystick device index */
287 Uint8 button; /**< The joystick button index */ 295 Uint8 button; /**< The joystick button index */
288 Uint8 state; /**< ::SDL_PRESSED or ::SDL_RELEASED */ 296 Uint8 state; /**< ::SDL_PRESSED or ::SDL_RELEASED */
289 Uint8 padding1; 297 Uint8 padding1;
290 } SDL_JoyButtonEvent; 298 } SDL_JoyButtonEvent;
299
300
301 /**
302 * \brief Touch finger motion/finger event structure (event.tmotion.*)
303 */
304 typedef struct SDL_TouchFingerEvent
305 {
306 Uint32 type; /**< ::SDL_FINGERMOTION OR
307 SDL_FINGERDOWN OR SDL_FINGERUP*/
308 Uint32 windowID; /**< The window with mouse focus, if any */
309 Uint8 touchId; /**< The touch device id */
310 Uint8 state; /**< The current button state */
311 Uint8 fingerId;
312 Uint8 padding1;
313 } SDL_TouchFingerEvent;
314
315
316 /**
317 * \brief Touch finger motion/finger event structure (event.tmotion.*)
318 */
319 typedef struct SDL_TouchButtonEvent
320 {
321 Uint32 type; /**< ::SDL_TOUCHBUTTONUP OR SDL_TOUCHBUTTONDOWN */
322 Uint32 windowID; /**< The window with mouse focus, if any */
323 Uint8 touchId; /**< The touch device index */
324 Uint8 state; /**< The current button state */
325 Uint8 button; /**< The button changing state */
326 Uint8 padding1;
327
328 } SDL_TouchButtonEvent;
329
291 330
292 /** 331 /**
293 * \brief The "quit requested" event 332 * \brief The "quit requested" event
294 */ 333 */
295 typedef struct SDL_QuitEvent 334 typedef struct SDL_QuitEvent
370 SDL_JoyButtonEvent jbutton; /**< Joystick button event data */ 409 SDL_JoyButtonEvent jbutton; /**< Joystick button event data */
371 SDL_QuitEvent quit; /**< Quit request event data */ 410 SDL_QuitEvent quit; /**< Quit request event data */
372 SDL_UserEvent user; /**< Custom event data */ 411 SDL_UserEvent user; /**< Custom event data */
373 SDL_SysWMEvent syswm; /**< System dependent window event data */ 412 SDL_SysWMEvent syswm; /**< System dependent window event data */
374 SDL_ProximityEvent proximity; /**< Proximity In or Out event */ 413 SDL_ProximityEvent proximity; /**< Proximity In or Out event */
414 SDL_TouchFingerEvent tfinger; /**< Touch finger event data */
415 SDL_TouchButtonEvent tbutton; /**< Touch button event data */
375 416
376 /** Temporarily here for backwards compatibility */ 417 /** Temporarily here for backwards compatibility */
377 /*@{*/ 418 /*@{*/
378 #ifndef SDL_NO_COMPAT 419 #ifndef SDL_NO_COMPAT
379 SDL_ActiveEvent active; 420 SDL_ActiveEvent active;