src/events/SDL_touch_c.h
author jimtla
Fri, 30 Jul 2010 23:18:35 +0400
changeset 4676 99b4560b7aa1
parent 4648 0350b634c044
child 4677 31607094315c
permissions -rw-r--r--
Upgraded touchId/fingerId to long. Changed position variables to floats.
     1 /*
     2     SDL - Simple DirectMedia Layer
     3     Copyright (C) 1997-2010 Sam Lantinga
     4 
     5     This library is free software; you can redistribute it and/or
     6     modify it under the terms of the GNU Lesser General Public
     7     License as published by the Free Software Foundation; either
     8     version 2.1 of the License, or (at your option) any later version.
     9 
    10     This library is distributed in the hope that it will be useful,
    11     but WITHOUT ANY WARRANTY; without even the implied warranty of
    12     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    13     Lesser General Public License for more details.
    14 
    15     You should have received a copy of the GNU Lesser General Public
    16     License along with this library; if not, write to the Free Software
    17     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
    18 
    19     Sam Lantinga
    20     slouken@libsdl.org
    21 */
    22 #include "SDL_config.h"
    23 #include "../../include/SDL_touch.h"
    24 
    25 #ifndef _SDL_touch_c_h
    26 #define _SDL_touch_c_h
    27 
    28 
    29 
    30 /* Initialize the touch subsystem */
    31 extern int SDL_TouchInit(void);
    32 
    33 /*Get the touch at an index */
    34 extern SDL_Touch *SDL_GetTouchIndex(int index);
    35 
    36 /* Get the touch with id = id */
    37 extern SDL_Touch *SDL_GetTouch(long id);
    38 
    39 /*Get the finger at an index */
    40 extern SDL_Finger *SDL_GetFingerIndex(SDL_Touch *touch, int index);
    41 
    42 /* Get the finger with id = id */
    43 extern SDL_Finger *SDL_GetFinger(SDL_Touch *touch,long id);
    44 
    45 
    46 /* Add a touch, possibly reattaching at a particular index (or -1),
    47    returning the index of the touch, or -1 if there was an error. */
    48 extern int SDL_AddTouch(const SDL_Touch * touch, char *name);
    49                      
    50 
    51 /* Remove a touch at an index, clearing the slot for later */
    52 extern void SDL_DelTouch(long id);
    53 
    54 /* Set the touch focus window */
    55 extern void SDL_SetTouchFocus(long id, SDL_Window * window);
    56 
    57 /* Send a touch motion event for a touch */
    58 extern int SDL_SendTouchMotion(long id, long fingerid,
    59 			       int relative, float x, float y, float z);
    60 
    61 /* Send a touch button event for a touch */
    62 extern int SDL_SendTouchButton(long id, Uint8 state, Uint8 button);
    63 
    64 /* Shutdown the touch subsystem */
    65 extern void SDL_TouchQuit(void);
    66 
    67 /* Get the index of a touch device */
    68 extern int SDL_GetTouchIndexId(long id);
    69 
    70 #endif /* _SDL_touch_c_h */
    71 
    72 /* vi: set ts=4 sw=4 expandtab: */