include/SDL_touch.h
changeset 4678 f8431f66613d
parent 4676 99b4560b7aa1
child 4679 5ee96ba0c01e
     1.1 --- a/include/SDL_touch.h	Sat Jul 31 01:24:50 2010 +0400
     1.2 +++ b/include/SDL_touch.h	Sat Jul 31 20:02:54 2010 +0400
     1.3 @@ -42,15 +42,19 @@
     1.4  #endif
     1.5  
     1.6  
     1.7 +typedef Uint64 SDL_TouchID;
     1.8 +typedef Uint64 SDL_FingerID;
     1.9 +
    1.10 +
    1.11  struct SDL_Finger {
    1.12 -  long id;
    1.13 -  float x;
    1.14 -  float y;
    1.15 -  float xdelta;
    1.16 -  float ydelta;
    1.17 -  float last_x, last_y,last_pressure;  /* the last reported coordinates */
    1.18 +  SDL_FingerID id;
    1.19 +  Uint16 x;
    1.20 +  Uint16 y;
    1.21 +  Uint16 xdelta;
    1.22 +  Uint16 ydelta;
    1.23 +  Uint16 last_x, last_y,last_pressure;  /* the last reported coordinates */
    1.24    SDL_bool down;
    1.25 -  float pressure;
    1.26 +  Uint16 pressure;
    1.27  };
    1.28  
    1.29  typedef struct SDL_Touch SDL_Touch;
    1.30 @@ -66,12 +70,13 @@
    1.31    float pressure_max, pressure_min;
    1.32    float x_max,x_min;
    1.33    float y_max,y_min;
    1.34 -  float xres,yres,pressureres;
    1.35 +  Uint16 xres,yres,pressureres;
    1.36 +  float native_xres,native_yres,native_pressureres;
    1.37    float tilt;                   /* for future use */
    1.38    float rotation;               /* for future use */
    1.39    
    1.40    /* Data common to all touch */
    1.41 -  long id;
    1.42 +  SDL_TouchID id;
    1.43    SDL_Window *focus;
    1.44    
    1.45    char *name;
    1.46 @@ -95,7 +100,7 @@
    1.47   *
    1.48   *
    1.49   */
    1.50 -  extern DECLSPEC SDL_Touch* SDLCALL SDL_GetTouch(long id);
    1.51 +  extern DECLSPEC SDL_Touch* SDLCALL SDL_GetTouch(SDL_TouchID id);
    1.52  
    1.53  
    1.54  
    1.55 @@ -104,7 +109,8 @@
    1.56   *
    1.57   *
    1.58   */
    1.59 -  extern DECLSPEC SDL_Finger* SDLCALL SDL_GetFinger(SDL_Touch *touch, long id);
    1.60 +  extern 
    1.61 +  DECLSPEC SDL_Finger* SDLCALL SDL_GetFinger(SDL_Touch *touch, SDL_FingerID id);
    1.62  
    1.63  /* Ends C function definitions when using C++ */
    1.64  #ifdef __cplusplus