src/events/SDL_touch_c.h
author Andreas Schiffler <aschiffler@ferzkopp.net>
Mon, 23 Aug 2010 23:44:28 -0700
changeset 4865 fff50e86c891
parent 4678 f8431f66613d
child 5262 b530ef003506
permissions -rw-r--r--
Update VS2010 project to add new files; update new files so code builds on Win32/Win64
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@4678
    37
extern SDL_Touch *SDL_GetTouch(SDL_TouchID 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@4678
    43
extern SDL_Finger *SDL_GetFinger(SDL_Touch *touch,SDL_FingerID 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@4678
    52
extern void SDL_DelTouch(SDL_TouchID id);
jim@4640
    53
jim@4640
    54
/* Set the touch focus window */
jimtla@4678
    55
extern void SDL_SetTouchFocus(SDL_TouchID id, SDL_Window * window);
jim@4640
    56
jim@4640
    57
/* Send a touch motion event for a touch */
jimtla@4678
    58
extern int SDL_SendTouchMotion(SDL_TouchID id, SDL_FingerID fingerid,
jimtla@4676
    59
			       int relative, float x, float y, float z);
jim@4640
    60
jimtla@4677
    61
/* Send a touch down/up event for a touch */
jimtla@4678
    62
extern int SDL_SendFingerDown(SDL_TouchID id, SDL_FingerID fingerid, 
jimtla@4678
    63
			      SDL_bool down, float x, float y, float pressure);
jimtla@4677
    64
jim@4640
    65
/* Send a touch button event for a touch */
jimtla@4678
    66
extern int SDL_SendTouchButton(SDL_TouchID id, Uint8 state, Uint8 button);
jim@4640
    67
jim@4640
    68
/* Shutdown the touch subsystem */
jim@4640
    69
extern void SDL_TouchQuit(void);
jim@4640
    70
jimtla@4647
    71
/* Get the index of a touch device */
jimtla@4678
    72
extern int SDL_GetTouchIndexId(SDL_TouchID id);
jim@4640
    73
jimtla@4677
    74
/* Print a debug message for a nonexistent touch */
jimtla@4678
    75
extern int SDL_TouchNotFoundError(SDL_TouchID id);
jimtla@4677
    76
jim@4640
    77
#endif /* _SDL_touch_c_h */
jim@4640
    78
jim@4640
    79
/* vi: set ts=4 sw=4 expandtab: */