Mercurial > sdl-ios-xcode
diff include/SDL_touch.h @ 4678:f8431f66613d
Added SDL_TouchID, SDL_FingerID, SDL_GestureID types. Converted to integer cioordinates (<- not working).
author | jimtla |
---|---|
date | Sat, 31 Jul 2010 20:02:54 +0400 |
parents | 99b4560b7aa1 |
children | 5ee96ba0c01e |
line wrap: on
line diff
--- a/include/SDL_touch.h Sat Jul 31 01:24:50 2010 +0400 +++ b/include/SDL_touch.h Sat Jul 31 20:02:54 2010 +0400 @@ -42,15 +42,19 @@ #endif +typedef Uint64 SDL_TouchID; +typedef Uint64 SDL_FingerID; + + struct SDL_Finger { - long id; - float x; - float y; - float xdelta; - float ydelta; - float last_x, last_y,last_pressure; /* the last reported coordinates */ + SDL_FingerID id; + Uint16 x; + Uint16 y; + Uint16 xdelta; + Uint16 ydelta; + Uint16 last_x, last_y,last_pressure; /* the last reported coordinates */ SDL_bool down; - float pressure; + Uint16 pressure; }; typedef struct SDL_Touch SDL_Touch; @@ -66,12 +70,13 @@ float pressure_max, pressure_min; float x_max,x_min; float y_max,y_min; - float xres,yres,pressureres; + Uint16 xres,yres,pressureres; + float native_xres,native_yres,native_pressureres; float tilt; /* for future use */ float rotation; /* for future use */ /* Data common to all touch */ - long id; + SDL_TouchID id; SDL_Window *focus; char *name; @@ -95,7 +100,7 @@ * * */ - extern DECLSPEC SDL_Touch* SDLCALL SDL_GetTouch(long id); + extern DECLSPEC SDL_Touch* SDLCALL SDL_GetTouch(SDL_TouchID id); @@ -104,7 +109,8 @@ * * */ - extern DECLSPEC SDL_Finger* SDLCALL SDL_GetFinger(SDL_Touch *touch, long id); + extern + DECLSPEC SDL_Finger* SDLCALL SDL_GetFinger(SDL_Touch *touch, SDL_FingerID id); /* Ends C function definitions when using C++ */ #ifdef __cplusplus