SDL  2.0
SDL_touch.h File Reference
#include "SDL_stdinc.h"
#include "SDL_error.h"
#include "SDL_video.h"
#include "begin_code.h"
#include "close_code.h"
+ Include dependency graph for SDL_touch.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  SDL_Finger
 

Macros

#define SDL_TOUCH_MOUSEID   ((Uint32)-1)
 
#define SDL_MOUSE_TOUCHID   ((Sint64)-1)
 

Typedefs

typedef Sint64 SDL_TouchID
 
typedef Sint64 SDL_FingerID
 

Enumerations

enum  SDL_TouchDeviceType {
  SDL_TOUCH_DEVICE_INVALID = -1 ,
  SDL_TOUCH_DEVICE_DIRECT ,
  SDL_TOUCH_DEVICE_INDIRECT_ABSOLUTE ,
  SDL_TOUCH_DEVICE_INDIRECT_RELATIVE
}
 

Functions

int SDL_GetNumTouchDevices (void)
 Get the number of registered touch devices. More...
 
SDL_TouchID SDL_GetTouchDevice (int index)
 Get the touch ID with the given index, or 0 if the index is invalid. More...
 
SDL_TouchDeviceType SDL_GetTouchDeviceType (SDL_TouchID touchID)
 Get the type of the given touch device. More...
 
int SDL_GetNumTouchFingers (SDL_TouchID touchID)
 Get the number of active fingers for a given touch device. More...
 
SDL_FingerSDL_GetTouchFinger (SDL_TouchID touchID, int index)
 Get the finger object of the given touch, with the given index. More...
 

Detailed Description

Include file for SDL touch event handling.

Definition in file SDL_touch.h.

Macro Definition Documentation

◆ SDL_MOUSE_TOUCHID

#define SDL_MOUSE_TOUCHID   ((Sint64)-1)

Definition at line 64 of file SDL_touch.h.

◆ SDL_TOUCH_MOUSEID

#define SDL_TOUCH_MOUSEID   ((Uint32)-1)

Definition at line 61 of file SDL_touch.h.

Typedef Documentation

◆ SDL_FingerID

Definition at line 42 of file SDL_touch.h.

◆ SDL_TouchID

Definition at line 41 of file SDL_touch.h.

Enumeration Type Documentation

◆ SDL_TouchDeviceType

Enumerator
SDL_TOUCH_DEVICE_INVALID 
SDL_TOUCH_DEVICE_DIRECT 
SDL_TOUCH_DEVICE_INDIRECT_ABSOLUTE 
SDL_TOUCH_DEVICE_INDIRECT_RELATIVE 

Definition at line 44 of file SDL_touch.h.

45 {
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 */
SDL_TouchDeviceType
Definition: SDL_touch.h:45
@ SDL_TOUCH_DEVICE_INDIRECT_ABSOLUTE
Definition: SDL_touch.h:48
@ SDL_TOUCH_DEVICE_DIRECT
Definition: SDL_touch.h:47
@ SDL_TOUCH_DEVICE_INDIRECT_RELATIVE
Definition: SDL_touch.h:49
@ SDL_TOUCH_DEVICE_INVALID
Definition: SDL_touch.h:46

Function Documentation

◆ SDL_GetNumTouchDevices()

int SDL_GetNumTouchDevices ( void  )

Get the number of registered touch devices.

◆ SDL_GetNumTouchFingers()

int SDL_GetNumTouchFingers ( SDL_TouchID  touchID)

Get the number of active fingers for a given touch device.

◆ SDL_GetTouchDevice()

SDL_TouchID SDL_GetTouchDevice ( int  index)

Get the touch ID with the given index, or 0 if the index is invalid.

◆ SDL_GetTouchDeviceType()

SDL_TouchDeviceType SDL_GetTouchDeviceType ( SDL_TouchID  touchID)

Get the type of the given touch device.

◆ SDL_GetTouchFinger()

SDL_Finger* SDL_GetTouchFinger ( SDL_TouchID  touchID,
int  index 
)

Get the finger object of the given touch, with the given index.