diff include/SDL_events.h @ 4657:eed063a0bf5b

Moved Multi finger gesture recognition into the library.
author Jim Grandpre <jim.tla@gmail.com>
date Wed, 07 Jul 2010 04:13:08 -0700
parents fb500b3e1717
children 454385d76845
line wrap: on
line diff
--- a/include/SDL_events.h	Tue Jul 06 02:05:27 2010 -0700
+++ b/include/SDL_events.h	Wed Jul 07 04:13:08 2010 -0700
@@ -86,13 +86,17 @@
     SDL_JOYBUTTONDOWN,          /**< Joystick button pressed */
     SDL_JOYBUTTONUP,            /**< Joystick button released */
 
-    /*Touch events - is 0x700 the correct place?*/
+    /*Touch events*/
     SDL_FINGERDOWN     = 0x700,
     SDL_FINGERUP,
     SDL_FINGERMOTION,
     SDL_TOUCHBUTTONDOWN,
     SDL_TOUCHBUTTONUP,    
 
+    /*Gesture events*/
+    SDL_DOLLARGESTURE     = 0x800,
+    SDL_MULTIGESTURE,
+
     /* Obsolete events */
     SDL_EVENT_COMPAT1 = 0x7000, /**< SDL 1.2 events for compatibility */
     SDL_EVENT_COMPAT2,
@@ -331,6 +335,28 @@
 } SDL_TouchButtonEvent;
 
 
+
+/**
+ *  \brief Multiple Finger Gesture Event
+ */
+typedef struct SDL_MultiGestureEvent
+{
+    Uint32 type;        /**< ::SDL_MULTIGESTURE */
+    Uint32 windowID;    /**< The window with mouse focus, if any */
+    Uint8 touchId;        /**< The touch device index */
+    Uint8 padding1;
+    Uint8 padding2;
+    Uint8 padding3;
+    float dTheta;
+    float dDist;
+    float x;  //currently 0...1. Change to screen coords?
+    float y;  
+
+} SDL_MultiGestureEvent;
+
+
+
+
 /**
  *  \brief The "quit requested" event
  */
@@ -416,6 +442,7 @@
     SDL_ProximityEvent proximity;   /**< Proximity In or Out event */
     SDL_TouchFingerEvent tfinger;   /**< Touch finger event data */
     SDL_TouchButtonEvent tbutton;   /**< Touch button event data */
+    SDL_MultiGestureEvent mgesture; /**< Multi Finger Gesture data*/
 
     /** Temporarily here for backwards compatibility */
     /*@{*/