src/events/SDL_touch_c.h
changeset 6951 7833f01322b3
parent 6885 700f1b25f77f
child 7191 75360622e65f
     1.1 --- a/src/events/SDL_touch_c.h	Sat Mar 02 20:44:16 2013 -0800
     1.2 +++ b/src/events/SDL_touch_c.h	Sun Mar 03 01:01:33 2013 -0800
     1.3 @@ -24,55 +24,38 @@
     1.4  #ifndef _SDL_touch_c_h
     1.5  #define _SDL_touch_c_h
     1.6  
     1.7 +typedef struct SDL_Touch
     1.8 +{
     1.9 +    SDL_TouchID id;
    1.10 +    int num_fingers;
    1.11 +    int max_fingers;
    1.12 +    SDL_Finger** fingers;
    1.13 +} SDL_Touch;
    1.14  
    1.15  
    1.16  /* Initialize the touch subsystem */
    1.17  extern int SDL_TouchInit(void);
    1.18  
    1.19 -/*Get the touch at an index */
    1.20 -extern SDL_Touch *SDL_GetTouchIndex(int index);
    1.21 -
    1.22 -/* Get the touch with id = id */
    1.23 +/* Add a touch, returning the index of the touch, or -1 if there was an error. */
    1.24 +extern int SDL_AddTouch(SDL_TouchID id, const char *name);
    1.25 +                     
    1.26 +/* Get the touch with a given id */
    1.27  extern SDL_Touch *SDL_GetTouch(SDL_TouchID id);
    1.28  
    1.29 -/*Get the finger at an index */
    1.30 -extern SDL_Finger *SDL_GetFingerIndex(SDL_Touch *touch, int index);
    1.31 -
    1.32 -/* Get the finger with id = id */
    1.33 -extern SDL_Finger *SDL_GetFinger(SDL_Touch *touch,SDL_FingerID id);
    1.34 -
    1.35 -
    1.36 -/* Add a touch, possibly reattaching at a particular index (or -1),
    1.37 -   returning the index of the touch, or -1 if there was an error. */
    1.38 -extern int SDL_AddTouch(const SDL_Touch * touch, char *name);
    1.39 -                     
    1.40 -
    1.41 -/* Remove a touch at an index, clearing the slot for later */
    1.42 -extern void SDL_DelTouch(SDL_TouchID id);
    1.43 -
    1.44 -/* Set the touch focus window */
    1.45 -extern void SDL_SetTouchFocus(SDL_TouchID id, SDL_Window * window);
    1.46 +/* Send a touch down/up event for a touch */
    1.47 +extern int SDL_SendTouch(SDL_TouchID id, SDL_FingerID fingerid, 
    1.48 +			             SDL_bool down, float x, float y, float pressure);
    1.49  
    1.50  /* Send a touch motion event for a touch */
    1.51  extern int SDL_SendTouchMotion(SDL_TouchID id, SDL_FingerID fingerid,
    1.52 -			       int relative, float x, float y, float z);
    1.53 +			                   float x, float y, float pressure);
    1.54  
    1.55 -/* Send a touch down/up event for a touch */
    1.56 -extern int SDL_SendFingerDown(SDL_TouchID id, SDL_FingerID fingerid, 
    1.57 -			      SDL_bool down, float x, float y, float pressure);
    1.58 -
    1.59 -/* Send a touch button event for a touch */
    1.60 -extern int SDL_SendTouchButton(SDL_TouchID id, Uint8 state, Uint8 button);
    1.61 +/* Remove a touch */
    1.62 +extern void SDL_DelTouch(SDL_TouchID id);
    1.63  
    1.64  /* Shutdown the touch subsystem */
    1.65  extern void SDL_TouchQuit(void);
    1.66  
    1.67 -/* Get the index of a touch device */
    1.68 -extern int SDL_GetTouchIndexId(SDL_TouchID id);
    1.69 -
    1.70 -/* Print a debug message for a nonexistent touch */
    1.71 -extern int SDL_TouchNotFoundError(SDL_TouchID id);
    1.72 -
    1.73  #endif /* _SDL_touch_c_h */
    1.74  
    1.75  /* vi: set ts=4 sw=4 expandtab: */