jim@4640: /* jim@4640: SDL - Simple DirectMedia Layer jim@4640: Copyright (C) 1997-2010 Sam Lantinga jim@4640: jim@4640: This library is free software; you can redistribute it and/or jim@4640: modify it under the terms of the GNU Lesser General Public jim@4640: License as published by the Free Software Foundation; either jim@4640: version 2.1 of the License, or (at your option) any later version. jim@4640: jim@4640: This library is distributed in the hope that it will be useful, jim@4640: but WITHOUT ANY WARRANTY; without even the implied warranty of jim@4640: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU jim@4640: Lesser General Public License for more details. jim@4640: jim@4640: You should have received a copy of the GNU Lesser General Public jim@4640: License along with this library; if not, write to the Free Software jim@4640: Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA jim@4640: jim@4640: Sam Lantinga jim@4640: slouken@libsdl.org jim@4640: */ jim@4640: #include "SDL_config.h" jim@4646: #include "../../include/SDL_touch.h" jim@4640: jim@4640: #ifndef _SDL_touch_c_h jim@4640: #define _SDL_touch_c_h jim@4640: jim@4640: jim@4640: jim@4640: /* Initialize the touch subsystem */ jim@4640: extern int SDL_TouchInit(void); jim@4640: jim@4642: /*Get the touch at an index */ jim@4642: extern SDL_Touch *SDL_GetTouchIndex(int index); jim@4642: jim@4642: /* Get the touch with id = id */ jim@4642: extern SDL_Touch *SDL_GetTouch(int id); jim@4642: jim@4642: /*Get the finger at an index */ jim@4642: extern SDL_Finger *SDL_GetFingerIndex(SDL_Touch *touch, int index); jim@4642: jim@4642: /* Get the finger with id = id */ jim@4642: extern SDL_Finger *SDL_GetFinger(SDL_Touch *touch,int id); jim@4642: jim@4640: jim@4640: /* Add a touch, possibly reattaching at a particular index (or -1), jim@4642: returning the index of the touch, or -1 if there was an error. */ jim@4642: extern int SDL_AddTouch(const SDL_Touch * touch, char *name); jim@4642: jim@4640: jim@4640: /* Remove a touch at an index, clearing the slot for later */ jim@4640: extern void SDL_DelTouch(int index); jim@4640: jim@4640: /* Set the touch focus window */ jim@4640: extern void SDL_SetTouchFocus(int id, SDL_Window * window); jim@4640: jim@4640: /* Send a touch motion event for a touch */ jim@4641: extern int SDL_SendTouchMotion(int id, int fingerid, jim@4641: int relative, int x, int y, int z); jim@4640: jim@4640: /* Send a touch button event for a touch */ jim@4640: extern int SDL_SendTouchButton(int id, Uint8 state, Uint8 button); jim@4640: jim@4640: /* Shutdown the touch subsystem */ jim@4640: extern void SDL_TouchQuit(void); jim@4640: jimtla@4647: /* Get the index of a touch device */ jimtla@4647: extern int SDL_GetTouchIndexId(int id) jimtla@4647: jimtla@4647: jimtla@4647: jim@4640: jim@4640: #endif /* _SDL_touch_c_h */ jim@4640: jim@4640: /* vi: set ts=4 sw=4 expandtab: */