Mercurial > sdl-ios-xcode
comparison src/events/SDL_touch_c.h @ 4646:eea1bf53effa
Added include/touch.h Now reading in resolution of touch pad.
author | Jim Grandpre <jim.tla@gmail.com> |
---|---|
date | Tue, 01 Jun 2010 02:54:33 -0400 |
parents | 0375d020e7e3 |
children | be2250bb482b |
comparison
equal
deleted
inserted
replaced
4645:0375d020e7e3 | 4646:eea1bf53effa |
---|---|
18 | 18 |
19 Sam Lantinga | 19 Sam Lantinga |
20 slouken@libsdl.org | 20 slouken@libsdl.org |
21 */ | 21 */ |
22 #include "SDL_config.h" | 22 #include "SDL_config.h" |
23 #include "../../include/SDL_touch.h" | |
23 | 24 |
24 #ifndef _SDL_touch_c_h | 25 #ifndef _SDL_touch_c_h |
25 #define _SDL_touch_c_h | 26 #define _SDL_touch_c_h |
26 | 27 |
27 typedef struct SDL_Touch SDL_Touch; | |
28 typedef struct SDL_Finger SDL_Finger; | |
29 | |
30 struct SDL_Finger { | |
31 int id; | |
32 int x; | |
33 int y; | |
34 int z; /* for future use */ | |
35 int xdelta; | |
36 int ydelta; | |
37 int last_x, last_y; /* the last reported x and y coordinates */ | |
38 int pressure; | |
39 }; | |
40 | |
41 | |
42 struct SDL_Touch | |
43 { | |
44 | |
45 /* Free the touch when it's time */ | |
46 void (*FreeTouch) (SDL_Touch * touch); | |
47 | |
48 /* data common for tablets */ | |
49 int pressure_max; | |
50 int pressure_min; | |
51 int tilt; /* for future use */ | |
52 int rotation; /* for future use */ | |
53 | |
54 /* Data common to all touch */ | |
55 int id; | |
56 SDL_Window *focus; | |
57 | |
58 char *name; | |
59 Uint8 buttonstate; | |
60 SDL_bool relative_mode; | |
61 SDL_bool flush_motion; | |
62 | |
63 int num_fingers; | |
64 int max_fingers; | |
65 SDL_Finger** fingers; | |
66 | |
67 void *driverdata; | |
68 }; | |
69 | 28 |
70 | 29 |
71 /* Initialize the touch subsystem */ | 30 /* Initialize the touch subsystem */ |
72 extern int SDL_TouchInit(void); | 31 extern int SDL_TouchInit(void); |
73 | 32 |