include/SDL_events.h
changeset 4641 49a97daea6ec
parent 4435 e953700da4ca
child 4642 057e8762d2a1
     1.1 --- a/include/SDL_events.h	Tue May 25 23:23:23 2010 -0400
     1.2 +++ b/include/SDL_events.h	Thu May 27 01:21:37 2010 -0400
     1.3 @@ -86,11 +86,19 @@
     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 +    SDL_FINGERDOWN     = 0x700,
     1.9 +    SDL_FINGERUP,
    1.10 +    SDL_FINGERMOTION,
    1.11 +    SDL_TOUCHBUTTONDOWN,
    1.12 +    SDL_TOUCHBUTTONUP,    
    1.13 +
    1.14      /* Obsolete events */
    1.15      SDL_EVENT_COMPAT1 = 0x7000, /**< SDL 1.2 events for compatibility */
    1.16      SDL_EVENT_COMPAT2,
    1.17      SDL_EVENT_COMPAT3,
    1.18  
    1.19 +
    1.20      /** Events ::SDL_USEREVENT through ::SDL_LASTEVENT are for your use,
    1.21       *  and should be allocated with SDL_RegisterEvents()
    1.22       */
    1.23 @@ -289,6 +297,37 @@
    1.24      Uint8 padding1;
    1.25  } SDL_JoyButtonEvent;
    1.26  
    1.27 +
    1.28 +/**
    1.29 + *  \brief Touch finger motion/finger event structure (event.tmotion.*)
    1.30 + */
    1.31 +typedef struct SDL_TouchFingerEvent
    1.32 +{
    1.33 +    Uint32 type;        /**< ::SDL_FINGERMOTION OR 
    1.34 +			   SDL_FINGERDOWN OR SDL_FINGERUP*/
    1.35 +    Uint32 windowID;    /**< The window with mouse focus, if any */
    1.36 +    Uint8 touchId;        /**< The touch device id */
    1.37 +    Uint8 state;        /**< The current button state */
    1.38 +    Uint8 fingerId;
    1.39 +    Uint8 padding1;
    1.40 +} SDL_TouchFingerEvent;
    1.41 +
    1.42 +
    1.43 +/**
    1.44 + *  \brief Touch finger motion/finger event structure (event.tmotion.*)
    1.45 + */
    1.46 +typedef struct SDL_TouchButtonEvent
    1.47 +{
    1.48 +    Uint32 type;        /**< ::SDL_TOUCHBUTTONUP OR SDL_TOUCHBUTTONDOWN */
    1.49 +    Uint32 windowID;    /**< The window with mouse focus, if any */
    1.50 +    Uint8 touchId;        /**< The touch device index */
    1.51 +    Uint8 state;        /**< The current button state */
    1.52 +    Uint8 button;        /**< The button changing state */
    1.53 +    Uint8 padding1;
    1.54 +
    1.55 +} SDL_TouchButtonEvent;
    1.56 +
    1.57 +
    1.58  /**
    1.59   *  \brief The "quit requested" event
    1.60   */
    1.61 @@ -372,6 +411,8 @@
    1.62      SDL_UserEvent user;             /**< Custom event data */
    1.63      SDL_SysWMEvent syswm;           /**< System dependent window event data */
    1.64      SDL_ProximityEvent proximity;   /**< Proximity In or Out event */
    1.65 +    SDL_TouchFingerEvent tfinger;   /**< Touch finger event data */
    1.66 +    SDL_TouchButtonEvent tbutton;   /**< Touch button event data */
    1.67  
    1.68      /** Temporarily here for backwards compatibility */
    1.69      /*@{*/