include/SDL_events.h
changeset 6951 7833f01322b3
parent 6950 1ddb72193079
child 6964 c8aa24f05042
     1.1 --- a/include/SDL_events.h	Sat Mar 02 20:44:16 2013 -0800
     1.2 +++ b/include/SDL_events.h	Sun Mar 03 01:01:33 2013 -0800
     1.3 @@ -105,8 +105,6 @@
     1.4      SDL_FINGERDOWN      = 0x700,
     1.5      SDL_FINGERUP,
     1.6      SDL_FINGERMOTION,
     1.7 -    SDL_TOUCHBUTTONDOWN,
     1.8 -    SDL_TOUCHBUTTONUP,    
     1.9  
    1.10      /* Gesture events */
    1.11      SDL_DOLLARGESTURE   = 0x800,
    1.12 @@ -367,75 +365,50 @@
    1.13  
    1.14  
    1.15  /**
    1.16 - *  \brief Touch finger motion/finger event structure (event.tfinger.*)
    1.17 + *  \brief Touch finger event structure (event.tfinger.*)
    1.18   */
    1.19  typedef struct SDL_TouchFingerEvent
    1.20  {
    1.21      Uint32 type;        /**< ::SDL_FINGERMOTION or ::SDL_FINGERDOWN or ::SDL_FINGERUP */
    1.22      Uint32 timestamp;
    1.23 -    Uint32 windowID;    /**< The window with mouse focus, if any */
    1.24      SDL_TouchID touchId; /**< The touch device id */
    1.25      SDL_FingerID fingerId;
    1.26 -    Uint8 state;        /**< The current button state */
    1.27 -    Uint8 padding1;
    1.28 -    Uint8 padding2;
    1.29 -    Uint8 padding3;
    1.30 -    Uint16 x;
    1.31 -    Uint16 y;
    1.32 -    Sint16 dx;
    1.33 -    Sint16 dy;
    1.34 -    Uint16 pressure;
    1.35 +    float x;            /**< Normalized in the range 0...1 */
    1.36 +    float y;            /**< Normalized in the range 0...1 */
    1.37 +    float dx;           /**< Normalized in the range 0...1 */
    1.38 +    float dy;           /**< Normalized in the range 0...1 */
    1.39 +    float pressure;     /**< Normalized in the range 0...1 */
    1.40  } SDL_TouchFingerEvent;
    1.41  
    1.42  
    1.43  /**
    1.44 - *  \brief Touch finger motion/finger event structure (event.tbutton.*)
    1.45 - */
    1.46 -typedef struct SDL_TouchButtonEvent
    1.47 -{
    1.48 -    Uint32 type;        /**< ::SDL_TOUCHBUTTONUP OR SDL_TOUCHBUTTONDOWN */
    1.49 -    Uint32 timestamp;
    1.50 -    Uint32 windowID;    /**< The window with mouse focus, if any */
    1.51 -    SDL_TouchID touchId;        /**< The touch device index */
    1.52 -    Uint8 state;        /**< The current button state */
    1.53 -    Uint8 button;        /**< The button changing state */
    1.54 -    Uint8 padding1;
    1.55 -    Uint8 padding2;
    1.56 -} SDL_TouchButtonEvent;
    1.57 -
    1.58 -
    1.59 -/**
    1.60   *  \brief Multiple Finger Gesture Event (event.mgesture.*)
    1.61   */
    1.62  typedef struct SDL_MultiGestureEvent
    1.63  {
    1.64      Uint32 type;        /**< ::SDL_MULTIGESTURE */
    1.65      Uint32 timestamp;
    1.66 -    Uint32 windowID;    /**< The window with mouse focus, if any */
    1.67 -    SDL_TouchID touchId;        /**< The touch device index */
    1.68 +    SDL_TouchID touchId; /**< The touch device index */
    1.69      float dTheta;
    1.70      float dDist;
    1.71 -    float x;  /* currently 0...1. Change to screen coords? */
    1.72 +    float x;
    1.73      float y;  
    1.74      Uint16 numFingers;
    1.75      Uint16 padding;
    1.76  } SDL_MultiGestureEvent;
    1.77  
    1.78 +
    1.79  /* (event.dgesture.*) */
    1.80  typedef struct SDL_DollarGestureEvent
    1.81  {
    1.82      Uint32 type;        /**< ::SDL_DOLLARGESTURE */
    1.83      Uint32 timestamp;
    1.84 -    Uint32 windowID;    /**< The window with mouse focus, if any */
    1.85 -    SDL_TouchID touchId;        /**< The touch device index */
    1.86 +    SDL_TouchID touchId; /**< The touch device id */
    1.87      SDL_GestureID gestureId;
    1.88      Uint32 numFingers;
    1.89      float error;
    1.90 -  /*
    1.91 -    //TODO: Enable to give location?
    1.92 -    float x;  //currently 0...1. Change to screen coords?
    1.93 -    float y;  
    1.94 -  */
    1.95 +    float x;            /**< Normalized center of gesture */
    1.96 +    float y;            /**< Normalized center of gesture */
    1.97  } SDL_DollarGestureEvent;
    1.98  
    1.99  
   1.100 @@ -518,9 +491,8 @@
   1.101      SDL_UserEvent user;             /**< Custom event data */
   1.102      SDL_SysWMEvent syswm;           /**< System dependent window event data */
   1.103      SDL_TouchFingerEvent tfinger;   /**< Touch finger event data */
   1.104 -    SDL_TouchButtonEvent tbutton;   /**< Touch button event data */
   1.105 -    SDL_MultiGestureEvent mgesture; /**< Multi Finger Gesture data */
   1.106 -    SDL_DollarGestureEvent dgesture; /**< Multi Finger Gesture data */
   1.107 +    SDL_MultiGestureEvent mgesture; /**< Gesture event data */
   1.108 +    SDL_DollarGestureEvent dgesture; /**< Gesture event data */
   1.109      SDL_DropEvent drop;             /**< Drag and drop event data */
   1.110  
   1.111      /* This is necessary for ABI compatibility between Visual C++ and GCC