Mercurial > sdl-ios-xcode
comparison include/SDL_touch.h @ 4676:99b4560b7aa1
Upgraded touchId/fingerId to long. Changed position variables to floats.
author | jimtla |
---|---|
date | Fri, 30 Jul 2010 23:18:35 +0400 |
parents | 063b9455bd1a |
children | f8431f66613d |
comparison
equal
deleted
inserted
replaced
4675:641c13b0ce5f | 4676:99b4560b7aa1 |
---|---|
41 /* *INDENT-ON* */ | 41 /* *INDENT-ON* */ |
42 #endif | 42 #endif |
43 | 43 |
44 | 44 |
45 struct SDL_Finger { | 45 struct SDL_Finger { |
46 int id; | 46 long id; |
47 int x; | 47 float x; |
48 int y; | 48 float y; |
49 int z; /* for future use */ | 49 float xdelta; |
50 int xdelta; | 50 float ydelta; |
51 int ydelta; | 51 float last_x, last_y,last_pressure; /* the last reported coordinates */ |
52 int last_x, last_y,last_pressure; /* the last reported coordinates */ | |
53 SDL_bool down; | 52 SDL_bool down; |
54 int pressure; | 53 float pressure; |
55 }; | 54 }; |
56 | 55 |
57 typedef struct SDL_Touch SDL_Touch; | 56 typedef struct SDL_Touch SDL_Touch; |
58 typedef struct SDL_Finger SDL_Finger; | 57 typedef struct SDL_Finger SDL_Finger; |
59 | 58 |
62 | 61 |
63 /* Free the touch when it's time */ | 62 /* Free the touch when it's time */ |
64 void (*FreeTouch) (SDL_Touch * touch); | 63 void (*FreeTouch) (SDL_Touch * touch); |
65 | 64 |
66 /* data common for tablets */ | 65 /* data common for tablets */ |
67 int pressure_max, pressure_min; | 66 float pressure_max, pressure_min; |
68 int x_max,x_min; | 67 float x_max,x_min; |
69 int y_max,y_min; | 68 float y_max,y_min; |
70 int xres,yres,pressureres; | 69 float xres,yres,pressureres; |
71 int tilt; /* for future use */ | 70 float tilt; /* for future use */ |
72 int rotation; /* for future use */ | 71 float rotation; /* for future use */ |
73 | 72 |
74 /* Data common to all touch */ | 73 /* Data common to all touch */ |
75 int id; | 74 long id; |
76 SDL_Window *focus; | 75 SDL_Window *focus; |
77 | 76 |
78 char *name; | 77 char *name; |
79 Uint8 buttonstate; | 78 Uint8 buttonstate; |
80 SDL_bool relative_mode; | 79 SDL_bool relative_mode; |
94 /** | 93 /** |
95 * \brief Get the touch object at the given id. | 94 * \brief Get the touch object at the given id. |
96 * | 95 * |
97 * | 96 * |
98 */ | 97 */ |
99 extern DECLSPEC SDL_Touch* SDLCALL SDL_GetTouch(int id); | 98 extern DECLSPEC SDL_Touch* SDLCALL SDL_GetTouch(long id); |
100 | 99 |
101 | 100 |
102 | 101 |
103 /** | 102 /** |
104 * \brief Get the finger object of the given touch, at the given id. | 103 * \brief Get the finger object of the given touch, at the given id. |
105 * | 104 * |
106 * | 105 * |
107 */ | 106 */ |
108 extern DECLSPEC SDL_Finger* SDLCALL SDL_GetFinger(SDL_Touch *touch, int id); | 107 extern DECLSPEC SDL_Finger* SDLCALL SDL_GetFinger(SDL_Touch *touch, long id); |
109 | 108 |
110 /* Ends C function definitions when using C++ */ | 109 /* Ends C function definitions when using C++ */ |
111 #ifdef __cplusplus | 110 #ifdef __cplusplus |
112 /* *INDENT-OFF* */ | 111 /* *INDENT-OFF* */ |
113 } | 112 } |