include/SDL_touch.h
changeset 12404 eb60e952b13f
parent 11811 5d94cb6b24d3
child 12432 defbd51902c3
equal deleted inserted replaced
12403:a4d730631698 12404:eb60e952b13f
    39 #endif
    39 #endif
    40 
    40 
    41 typedef Sint64 SDL_TouchID;
    41 typedef Sint64 SDL_TouchID;
    42 typedef Sint64 SDL_FingerID;
    42 typedef Sint64 SDL_FingerID;
    43 
    43 
       
    44 typedef enum
       
    45 {
       
    46     SDL_TOUCH_DEVICE_INVALID = -1,
       
    47     SDL_TOUCH_DEVICE_DIRECT,            /* touch screen with window-relative coordinates */
       
    48     SDL_TOUCH_DEVICE_INDIRECT_ABSOLUTE, /* trackpad with absolute device coordinates */
       
    49     SDL_TOUCH_DEVICE_INDIRECT_RELATIVE, /* trackpad with screen cursor-relative coordinates */
       
    50 } SDL_TouchDeviceType;
       
    51 
    44 typedef struct SDL_Finger
    52 typedef struct SDL_Finger
    45 {
    53 {
    46     SDL_FingerID id;
    54     SDL_FingerID id;
    47     float x;
    55     float x;
    48     float y;
    56     float y;
    64  *  \brief Get the touch ID with the given index, or 0 if the index is invalid.
    72  *  \brief Get the touch ID with the given index, or 0 if the index is invalid.
    65  */
    73  */
    66 extern DECLSPEC SDL_TouchID SDLCALL SDL_GetTouchDevice(int index);
    74 extern DECLSPEC SDL_TouchID SDLCALL SDL_GetTouchDevice(int index);
    67 
    75 
    68 /**
    76 /**
       
    77  * \brief Get the type of the given touch device.
       
    78  */
       
    79 extern DECLSPEC SDL_TouchDeviceType SDLCALL SDL_GetTouchDeviceType(SDL_TouchID touchID);
       
    80 
       
    81 /**
    69  *  \brief Get the number of active fingers for a given touch device.
    82  *  \brief Get the number of active fingers for a given touch device.
    70  */
    83  */
    71 extern DECLSPEC int SDLCALL SDL_GetNumTouchFingers(SDL_TouchID touchID);
    84 extern DECLSPEC int SDLCALL SDL_GetNumTouchFingers(SDL_TouchID touchID);
    72 
    85 
    73 /**
    86 /**