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