comparison include/SDL_events.h @ 4678:f8431f66613d

Added SDL_TouchID, SDL_FingerID, SDL_GestureID types. Converted to integer cioordinates (<- not working).
author jimtla
date Sat, 31 Jul 2010 20:02:54 +0400
parents 99b4560b7aa1
children 15dfe42edbfd
comparison
equal deleted inserted replaced
4677:31607094315c 4678:f8431f66613d
286 typedef struct SDL_TouchFingerEvent 286 typedef struct SDL_TouchFingerEvent
287 { 287 {
288 Uint32 type; /**< ::SDL_FINGERMOTION OR 288 Uint32 type; /**< ::SDL_FINGERMOTION OR
289 SDL_FINGERDOWN OR SDL_FINGERUP*/ 289 SDL_FINGERDOWN OR SDL_FINGERUP*/
290 Uint32 windowID; /**< The window with mouse focus, if any */ 290 Uint32 windowID; /**< The window with mouse focus, if any */
291 long touchId; /**< The touch device id */ 291 SDL_TouchID touchId; /**< The touch device id */
292 long fingerId; 292 SDL_FingerID fingerId;
293 Uint8 state; /**< The current button state */ 293 Uint8 state; /**< The current button state */
294 Uint8 padding1; 294 Uint8 padding1;
295 Uint8 padding2; 295 Uint8 padding2;
296 Uint8 padding3; 296 Uint8 padding3;
297 float x; 297 Uint16 x;
298 float y; 298 Uint16 y;
299 int pressure; 299 Uint16 pressure;
300 } SDL_TouchFingerEvent; 300 } SDL_TouchFingerEvent;
301 301
302 302
303 /** 303 /**
304 * \brief Touch finger motion/finger event structure (event.tmotion.*) 304 * \brief Touch finger motion/finger event structure (event.tmotion.*)
305 */ 305 */
306 typedef struct SDL_TouchButtonEvent 306 typedef struct SDL_TouchButtonEvent
307 { 307 {
308 Uint32 type; /**< ::SDL_TOUCHBUTTONUP OR SDL_TOUCHBUTTONDOWN */ 308 Uint32 type; /**< ::SDL_TOUCHBUTTONUP OR SDL_TOUCHBUTTONDOWN */
309 Uint32 windowID; /**< The window with mouse focus, if any */ 309 Uint32 windowID; /**< The window with mouse focus, if any */
310 long touchId; /**< The touch device index */ 310 SDL_TouchID touchId; /**< The touch device index */
311 Uint8 state; /**< The current button state */ 311 Uint8 state; /**< The current button state */
312 Uint8 button; /**< The button changing state */ 312 Uint8 button; /**< The button changing state */
313 Uint8 padding1; 313 Uint8 padding1;
314 Uint8 padding2; 314 Uint8 padding2;
315 } SDL_TouchButtonEvent; 315 } SDL_TouchButtonEvent;
321 */ 321 */
322 typedef struct SDL_MultiGestureEvent 322 typedef struct SDL_MultiGestureEvent
323 { 323 {
324 Uint32 type; /**< ::SDL_MULTIGESTURE */ 324 Uint32 type; /**< ::SDL_MULTIGESTURE */
325 Uint32 windowID; /**< The window with mouse focus, if any */ 325 Uint32 windowID; /**< The window with mouse focus, if any */
326 long touchId; /**< The touch device index */ 326 SDL_TouchID touchId; /**< The touch device index */
327 float dTheta; 327 float dTheta;
328 float dDist; 328 float dDist;
329 float x; //currently 0...1. Change to screen coords? 329 float x; //currently 0...1. Change to screen coords?
330 float y; 330 float y;
331 331
333 333
334 typedef struct SDL_DollarGestureEvent 334 typedef struct SDL_DollarGestureEvent
335 { 335 {
336 Uint32 type; /**< ::SDL_DOLLARGESTURE */ 336 Uint32 type; /**< ::SDL_DOLLARGESTURE */
337 Uint32 windowID; /**< The window with mouse focus, if any */ 337 Uint32 windowID; /**< The window with mouse focus, if any */
338 long touchId; /**< The touch device index */ 338 SDL_TouchID touchId; /**< The touch device index */
339 unsigned long gestureId; 339 SDL_GestureID gestureId;
340 float error; 340 float error;
341 /* 341 /*
342 //TODO: Enable to give location? 342 //TODO: Enable to give location?
343 float x; //currently 0...1. Change to screen coords? 343 float x; //currently 0...1. Change to screen coords?
344 float y; 344 float y;