src/events/SDL_touch_c.h
author Sam Lantinga <slouken@libsdl.org>
Sat, 31 Dec 2011 09:28:07 -0500
changeset 6138 4c64952a58fb
parent 5535 96594ac5fd1a
child 6885 700f1b25f77f
permissions -rwxr-xr-x
Happy New Year!
     1 /*
     2   Simple DirectMedia Layer
     3   Copyright (C) 1997-2012 Sam Lantinga <slouken@libsdl.org>
     4 
     5   This software is provided 'as-is', without any express or implied
     6   warranty.  In no event will the authors be held liable for any damages
     7   arising from the use of this software.
     8 
     9   Permission is granted to anyone to use this software for any purpose,
    10   including commercial applications, and to alter it and redistribute it
    11   freely, subject to the following restrictions:
    12 
    13   1. The origin of this software must not be misrepresented; you must not
    14      claim that you wrote the original software. If you use this software
    15      in a product, an acknowledgment in the product documentation would be
    16      appreciated but is not required.
    17   2. Altered source versions must be plainly marked as such, and must not be
    18      misrepresented as being the original software.
    19   3. This notice may not be removed or altered from any source distribution.
    20 */
    21 #include "SDL_config.h"
    22 #include "../../include/SDL_touch.h"
    23 
    24 #ifndef _SDL_touch_c_h
    25 #define _SDL_touch_c_h
    26 
    27 
    28 
    29 /* Initialize the touch subsystem */
    30 extern int SDL_TouchInit(void);
    31 
    32 /*Get the touch at an index */
    33 extern SDL_Touch *SDL_GetTouchIndex(int index);
    34 
    35 /* Get the touch with id = id */
    36 extern SDL_Touch *SDL_GetTouch(SDL_TouchID id);
    37 
    38 /*Get the finger at an index */
    39 extern SDL_Finger *SDL_GetFingerIndex(SDL_Touch *touch, int index);
    40 
    41 /* Get the finger with id = id */
    42 extern SDL_Finger *SDL_GetFinger(SDL_Touch *touch,SDL_FingerID id);
    43 
    44 
    45 /* Add a touch, possibly reattaching at a particular index (or -1),
    46    returning the index of the touch, or -1 if there was an error. */
    47 extern int SDL_AddTouch(const SDL_Touch * touch, char *name);
    48                      
    49 
    50 /* Remove a touch at an index, clearing the slot for later */
    51 extern void SDL_DelTouch(SDL_TouchID id);
    52 
    53 /* Set the touch focus window */
    54 extern void SDL_SetTouchFocus(SDL_TouchID id, SDL_Window * window);
    55 
    56 /* Send a touch motion event for a touch */
    57 extern int SDL_SendTouchMotion(SDL_TouchID id, SDL_FingerID fingerid,
    58 			       int relative, float x, float y, float z);
    59 
    60 /* Send a touch down/up event for a touch */
    61 extern int SDL_SendFingerDown(SDL_TouchID id, SDL_FingerID fingerid, 
    62 			      SDL_bool down, float x, float y, float pressure);
    63 
    64 /* Send a touch button event for a touch */
    65 extern int SDL_SendTouchButton(SDL_TouchID id, Uint8 state, Uint8 button);
    66 
    67 /* Shutdown the touch subsystem */
    68 extern void SDL_TouchQuit(void);
    69 
    70 /* Get the index of a touch device */
    71 extern int SDL_GetTouchIndexId(SDL_TouchID id);
    72 
    73 /* Print a debug message for a nonexistent touch */
    74 extern int SDL_TouchNotFoundError(SDL_TouchID id);
    75 
    76 #endif /* _SDL_touch_c_h */
    77 
    78 /* vi: set ts=4 sw=4 expandtab: */