include/SDL_events.h
changeset 4657 eed063a0bf5b
parent 4644 fb500b3e1717
child 4658 454385d76845
     1.1 --- a/include/SDL_events.h	Tue Jul 06 02:05:27 2010 -0700
     1.2 +++ b/include/SDL_events.h	Wed Jul 07 04:13:08 2010 -0700
     1.3 @@ -86,13 +86,17 @@
     1.4      SDL_JOYBUTTONDOWN,          /**< Joystick button pressed */
     1.5      SDL_JOYBUTTONUP,            /**< Joystick button released */
     1.6  
     1.7 -    /*Touch events - is 0x700 the correct place?*/
     1.8 +    /*Touch events*/
     1.9      SDL_FINGERDOWN     = 0x700,
    1.10      SDL_FINGERUP,
    1.11      SDL_FINGERMOTION,
    1.12      SDL_TOUCHBUTTONDOWN,
    1.13      SDL_TOUCHBUTTONUP,    
    1.14  
    1.15 +    /*Gesture events*/
    1.16 +    SDL_DOLLARGESTURE     = 0x800,
    1.17 +    SDL_MULTIGESTURE,
    1.18 +
    1.19      /* Obsolete events */
    1.20      SDL_EVENT_COMPAT1 = 0x7000, /**< SDL 1.2 events for compatibility */
    1.21      SDL_EVENT_COMPAT2,
    1.22 @@ -331,6 +335,28 @@
    1.23  } SDL_TouchButtonEvent;
    1.24  
    1.25  
    1.26 +
    1.27 +/**
    1.28 + *  \brief Multiple Finger Gesture Event
    1.29 + */
    1.30 +typedef struct SDL_MultiGestureEvent
    1.31 +{
    1.32 +    Uint32 type;        /**< ::SDL_MULTIGESTURE */
    1.33 +    Uint32 windowID;    /**< The window with mouse focus, if any */
    1.34 +    Uint8 touchId;        /**< The touch device index */
    1.35 +    Uint8 padding1;
    1.36 +    Uint8 padding2;
    1.37 +    Uint8 padding3;
    1.38 +    float dTheta;
    1.39 +    float dDist;
    1.40 +    float x;  //currently 0...1. Change to screen coords?
    1.41 +    float y;  
    1.42 +
    1.43 +} SDL_MultiGestureEvent;
    1.44 +
    1.45 +
    1.46 +
    1.47 +
    1.48  /**
    1.49   *  \brief The "quit requested" event
    1.50   */
    1.51 @@ -416,6 +442,7 @@
    1.52      SDL_ProximityEvent proximity;   /**< Proximity In or Out event */
    1.53      SDL_TouchFingerEvent tfinger;   /**< Touch finger event data */
    1.54      SDL_TouchButtonEvent tbutton;   /**< Touch button event data */
    1.55 +    SDL_MultiGestureEvent mgesture; /**< Multi Finger Gesture data*/
    1.56  
    1.57      /** Temporarily here for backwards compatibility */
    1.58      /*@{*/