zenilib  0.5.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
SDL_touch.c File Reference
#include "SDL_config.h"
#include "SDL_assert.h"
#include "SDL_events.h"
#include "SDL_events_c.h"

Go to the source code of this file.

Functions

static int SDL_AddFinger (SDL_Touch *touch, SDL_FingerID fingerid, float x, float y, float pressure)
 
int SDL_AddTouch (SDL_TouchID touchID, const char *name)
 
static int SDL_DelFinger (SDL_Touch *touch, SDL_FingerID fingerid)
 
void SDL_DelTouch (SDL_TouchID id)
 
SDL_FingerSDL_GetFinger (const SDL_Touch *touch, SDL_FingerID id)
 
static int SDL_GetFingerIndex (const SDL_Touch *touch, SDL_FingerID fingerid)
 
int SDL_GetNumTouchDevices (void)
 Get the number of registered touch devices. More...
 
int SDL_GetNumTouchFingers (SDL_TouchID touchID)
 Get the number of active fingers for a given touch device. More...
 
SDL_TouchSDL_GetTouch (SDL_TouchID id)
 
SDL_TouchID SDL_GetTouchDevice (int index)
 Get the touch ID with the given index, or 0 if the index is invalid. More...
 
SDL_FingerSDL_GetTouchFinger (SDL_TouchID touchID, int index)
 Get the finger object of the given touch, with the given index. More...
 
static int SDL_GetTouchIndex (SDL_TouchID id)
 
int SDL_SendTouch (SDL_TouchID id, SDL_FingerID fingerid, SDL_bool down, float x, float y, float pressure)
 
int SDL_SendTouchMotion (SDL_TouchID id, SDL_FingerID fingerid, float x, float y, float pressure)
 
int SDL_TouchInit (void)
 
void SDL_TouchQuit (void)
 

Variables

static int SDL_num_touch = 0
 
static SDL_Touch ** SDL_touchDevices = NULL
 

Function Documentation

static int SDL_AddFinger ( SDL_Touch touch,
SDL_FingerID  fingerid,
float  x,
float  y,
float  pressure 
)
static
static int SDL_DelFinger ( SDL_Touch touch,
SDL_FingerID  fingerid 
)
static

Definition at line 196 of file SDL_touch.c.

References SDL_Touch::fingers, SDL_Touch::num_fingers, and SDL_GetFingerIndex().

Referenced by SDL_SendTouch().

void SDL_DelTouch ( SDL_TouchID  id)
SDL_Finger* SDL_GetFinger ( const SDL_Touch touch,
SDL_FingerID  id 
)

Definition at line 96 of file SDL_touch.c.

References SDL_Touch::fingers, NULL, SDL_Touch::num_fingers, and SDL_GetFingerIndex().

Referenced by SDL_SendTouch(), and SDL_SendTouchMotion().

static int SDL_GetFingerIndex ( const SDL_Touch touch,
SDL_FingerID  fingerid 
)
static

Definition at line 84 of file SDL_touch.c.

References SDL_Touch::fingers, SDL_Finger::id, and SDL_Touch::num_fingers.

Referenced by SDL_DelFinger(), and SDL_GetFinger().

int SDL_GetNumTouchDevices ( void  )

Get the number of registered touch devices.

Definition at line 42 of file SDL_touch.c.

References SDL_num_touch.

int SDL_GetNumTouchFingers ( SDL_TouchID  touchID)

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

Definition at line 106 of file SDL_touch.c.

References SDL_Touch::num_fingers, and SDL_GetTouch().

SDL_TouchID SDL_GetTouchDevice ( int  index)

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

Definition at line 48 of file SDL_touch.c.

References SDL_Touch::id, and SDL_num_touch.

SDL_Finger* SDL_GetTouchFinger ( SDL_TouchID  touchID,
int  index 
)

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

Definition at line 116 of file SDL_touch.c.

References SDL_Touch::fingers, NULL, SDL_Touch::num_fingers, SDL_GetTouch(), and SDL_SetError().

static int SDL_GetTouchIndex ( SDL_TouchID  id)
static

Definition at line 58 of file SDL_touch.c.

References SDL_Touch::id, and SDL_num_touch.

Referenced by SDL_AddTouch(), SDL_DelTouch(), and SDL_GetTouch().

int SDL_SendTouch ( SDL_TouchID  id,
SDL_FingerID  fingerid,
SDL_bool  down,
float  x,
float  y,
float  pressure 
)
int SDL_SendTouchMotion ( SDL_TouchID  id,
SDL_FingerID  fingerid,
float  x,
float  y,
float  pressure 
)
int SDL_TouchInit ( void  )

Definition at line 36 of file SDL_touch.c.

Referenced by SDL_VideoInit().

void SDL_TouchQuit ( void  )

Definition at line 349 of file SDL_touch.c.

References i, NULL, SDL_assert, SDL_DelTouch(), SDL_free(), and SDL_num_touch.

Referenced by SDL_VideoQuit().

Variable Documentation

SDL_Touch** SDL_touchDevices = NULL
static

Definition at line 31 of file SDL_touch.c.