comparison src/events/SDL_touch_c.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 31607094315c
children b530ef003506
comparison
equal deleted inserted replaced
4677:31607094315c 4678:f8431f66613d
32 32
33 /*Get the touch at an index */ 33 /*Get the touch at an index */
34 extern SDL_Touch *SDL_GetTouchIndex(int index); 34 extern SDL_Touch *SDL_GetTouchIndex(int index);
35 35
36 /* Get the touch with id = id */ 36 /* Get the touch with id = id */
37 extern SDL_Touch *SDL_GetTouch(long id); 37 extern SDL_Touch *SDL_GetTouch(SDL_TouchID id);
38 38
39 /*Get the finger at an index */ 39 /*Get the finger at an index */
40 extern SDL_Finger *SDL_GetFingerIndex(SDL_Touch *touch, int index); 40 extern SDL_Finger *SDL_GetFingerIndex(SDL_Touch *touch, int index);
41 41
42 /* Get the finger with id = id */ 42 /* Get the finger with id = id */
43 extern SDL_Finger *SDL_GetFinger(SDL_Touch *touch,long id); 43 extern SDL_Finger *SDL_GetFinger(SDL_Touch *touch,SDL_FingerID id);
44 44
45 45
46 /* Add a touch, possibly reattaching at a particular index (or -1), 46 /* Add a touch, possibly reattaching at a particular index (or -1),
47 returning the index of the touch, or -1 if there was an error. */ 47 returning the index of the touch, or -1 if there was an error. */
48 extern int SDL_AddTouch(const SDL_Touch * touch, char *name); 48 extern int SDL_AddTouch(const SDL_Touch * touch, char *name);
49 49
50 50
51 /* Remove a touch at an index, clearing the slot for later */ 51 /* Remove a touch at an index, clearing the slot for later */
52 extern void SDL_DelTouch(long id); 52 extern void SDL_DelTouch(SDL_TouchID id);
53 53
54 /* Set the touch focus window */ 54 /* Set the touch focus window */
55 extern void SDL_SetTouchFocus(long id, SDL_Window * window); 55 extern void SDL_SetTouchFocus(SDL_TouchID id, SDL_Window * window);
56 56
57 /* Send a touch motion event for a touch */ 57 /* Send a touch motion event for a touch */
58 extern int SDL_SendTouchMotion(long id, long fingerid, 58 extern int SDL_SendTouchMotion(SDL_TouchID id, SDL_FingerID fingerid,
59 int relative, float x, float y, float z); 59 int relative, float x, float y, float z);
60 60
61 /* Send a touch down/up event for a touch */ 61 /* Send a touch down/up event for a touch */
62 extern int SDL_SendFingerDown(long id, long fingerid, SDL_bool down, 62 extern int SDL_SendFingerDown(SDL_TouchID id, SDL_FingerID fingerid,
63 float x, float y, float pressure); 63 SDL_bool down, float x, float y, float pressure);
64 64
65 /* Send a touch button event for a touch */ 65 /* Send a touch button event for a touch */
66 extern int SDL_SendTouchButton(long id, Uint8 state, Uint8 button); 66 extern int SDL_SendTouchButton(SDL_TouchID id, Uint8 state, Uint8 button);
67 67
68 /* Shutdown the touch subsystem */ 68 /* Shutdown the touch subsystem */
69 extern void SDL_TouchQuit(void); 69 extern void SDL_TouchQuit(void);
70 70
71 /* Get the index of a touch device */ 71 /* Get the index of a touch device */
72 extern int SDL_GetTouchIndexId(long id); 72 extern int SDL_GetTouchIndexId(SDL_TouchID id);
73 73
74 /* Print a debug message for a nonexistent touch */ 74 /* Print a debug message for a nonexistent touch */
75 extern int SDL_TouchNotFoundError(long id); 75 extern int SDL_TouchNotFoundError(SDL_TouchID id);
76 76
77 #endif /* _SDL_touch_c_h */ 77 #endif /* _SDL_touch_c_h */
78 78
79 /* vi: set ts=4 sw=4 expandtab: */ 79 /* vi: set ts=4 sw=4 expandtab: */