src/events/SDL_touch_c.h
changeset 4641 49a97daea6ec
parent 4640 f068a6dfc858
child 4642 057e8762d2a1
     1.1 --- a/src/events/SDL_touch_c.h	Tue May 25 23:23:23 2010 -0400
     1.2 +++ b/src/events/SDL_touch_c.h	Thu May 27 01:21:37 2010 -0400
     1.3 @@ -25,49 +25,50 @@
     1.4  #define _SDL_touch_c_h
     1.5  
     1.6  typedef struct SDL_Touch SDL_Touch;
     1.7 +typedef struct SDL_Finger SDL_Finger;
     1.8 +
     1.9 +struct SDL_Finger {
    1.10 +  int id;
    1.11 +  int x;
    1.12 +  int y;
    1.13 +  int z;                      /* for future use */
    1.14 +  int xdelta;
    1.15 +  int ydelta;
    1.16 +  int last_x, last_y;         /* the last reported x and y coordinates */
    1.17 +  int pressure;
    1.18 +};
    1.19  
    1.20  
    1.21  struct SDL_Touch
    1.22  {
    1.23 -    /* Warp the touch to (x,y) */
    1.24 -    void (*WarpTouch) (SDL_Touch * touch, SDL_Window * window, int x,
    1.25 -                       int y);
    1.26 -
    1.27 -    /* Free the touch when it's time */
    1.28 -    void (*FreeTouch) (SDL_Touch * touch);
    1.29 -
    1.30 -    /* data common for tablets */
    1.31 -    int pressure;
    1.32 -    int pressure_max;
    1.33 -    int pressure_min;
    1.34 -    int tilt;                   /* for future use */
    1.35 -    int rotation;               /* for future use */
    1.36 -    int total_ends;
    1.37 -    int current_end;
    1.38 +  
    1.39 +  /* Free the touch when it's time */
    1.40 +  void (*FreeTouch) (SDL_Touch * touch);
    1.41 +  
    1.42 +  /* data common for tablets */
    1.43 +  int pressure_max;
    1.44 +  int pressure_min;
    1.45 +  int tilt;                   /* for future use */
    1.46 +  int rotation;               /* for future use */
    1.47 +  
    1.48 +  int total_ends;
    1.49 +  int current_end;
    1.50 +  
    1.51 +  /* Data common to all touch */
    1.52 +  int id;
    1.53 +  SDL_Window *focus;
    1.54 +  
    1.55 +  char *name;
    1.56 +  Uint8 buttonstate;
    1.57 +  SDL_bool relative_mode;
    1.58 +  SDL_bool flush_motion;
    1.59  
    1.60 -    /* Data common to all touch */
    1.61 -    int id;
    1.62 -    SDL_Window *focus;
    1.63 -    int which;
    1.64 -    int x;
    1.65 -    int y;
    1.66 -    int z;                      /* for future use */
    1.67 -    int xdelta;
    1.68 -    int ydelta;
    1.69 -    int last_x, last_y;         /* the last reported x and y coordinates */
    1.70 -    char *name;
    1.71 -    Uint8 buttonstate;
    1.72 -    SDL_bool relative_mode;
    1.73 -    SDL_bool proximity;
    1.74 -    SDL_bool flush_motion;
    1.75 +  int num_fingers;
    1.76 +  SDL_Finger** fingers;
    1.77 +    
    1.78 +  void *driverdata;
    1.79 +};
    1.80  
    1.81 -    SDL_Cursor *cursors;
    1.82 -    SDL_Cursor *def_cursor;
    1.83 -    SDL_Cursor *cur_cursor;
    1.84 -    SDL_bool cursor_shown;
    1.85 -
    1.86 -    void *driverdata;
    1.87 -};
    1.88  
    1.89  /* Initialize the touch subsystem */
    1.90  extern int SDL_TouchInit(void);
    1.91 @@ -84,24 +85,16 @@
    1.92  /* Remove a touch at an index, clearing the slot for later */
    1.93  extern void SDL_DelTouch(int index);
    1.94  
    1.95 -/* Clear the button state of a touch at an index */
    1.96 -extern void SDL_ResetTouch(int index);
    1.97 -
    1.98  /* Set the touch focus window */
    1.99  extern void SDL_SetTouchFocus(int id, SDL_Window * window);
   1.100  
   1.101  /* Send a touch motion event for a touch */
   1.102 -extern int SDL_SendTouchMotion(int id, int relative, int x, int y, int z);
   1.103 +extern int SDL_SendTouchMotion(int id, int fingerid,
   1.104 +			       int relative, int x, int y, int z);
   1.105  
   1.106  /* Send a touch button event for a touch */
   1.107  extern int SDL_SendTouchButton(int id, Uint8 state, Uint8 button);
   1.108  
   1.109 -/* Send a touch wheel event for a touch */
   1.110 -extern int SDL_SendTouchWheel(int id, int x, int y);
   1.111 -
   1.112 -/* Send a proximity event for a touch */
   1.113 -extern int SDL_SendProximity(int id, int x, int y, int type);
   1.114 -
   1.115  /* Shutdown the touch subsystem */
   1.116  extern void SDL_TouchQuit(void);
   1.117