diff options
author | Jim Grandpre <jim.tla@gmail.com> | 2010-07-07 04:13:08 -0700 |
---|---|---|
committer | Jim Grandpre <jim.tla@gmail.com> | 2010-07-07 04:13:08 -0700 |
commit | 874300f89c5764cc7aa36d9afb8dcc1e1a1a9ad3 (patch) | |
tree | d62d5ef8ae2fca40b51d7c214ccf8cab1e5e09d7 /include/SDL_events.h | |
parent | af9c689b212f8256973e7a7c581c89330d9cc3cc (diff) |
Moved Multi finger gesture recognition into the library.
Diffstat (limited to 'include/SDL_events.h')
-rw-r--r-- | include/SDL_events.h | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/include/SDL_events.h b/include/SDL_events.h index 0e19359b..fe610927 100644 --- a/include/SDL_events.h +++ b/include/SDL_events.h @@ -86,13 +86,17 @@ typedef enum 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 @@ typedef struct SDL_TouchButtonEvent } 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 @@ typedef union SDL_Event 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 */ /*@{*/ |