2 Simple DirectMedia Layer
3 Copyright (C) 1997-2012 Sam Lantinga <slouken@libsdl.org>
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.
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:
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.
25 * Include file for SDL touch event handling.
31 #include "SDL_stdinc.h"
32 #include "SDL_error.h"
33 #include "SDL_video.h"
35 #include "begin_code.h"
36 /* Set up for C function definitions, even when using C++ */
44 typedef Sint64 SDL_TouchID;
45 typedef Sint64 SDL_FingerID;
55 Uint16 last_x, last_y,last_pressure; /* the last reported coordinates */
59 typedef struct SDL_Touch SDL_Touch;
60 typedef struct SDL_Finger SDL_Finger;
65 /* Free the touch when it's time */
66 void (*FreeTouch) (SDL_Touch * touch);
68 /* data common for tablets */
69 float pressure_max, pressure_min;
72 Uint16 xres,yres,pressureres;
73 float native_xres,native_yres,native_pressureres;
74 float tilt; /* for future use */
75 float rotation; /* for future use */
77 /* Data common to all touch */
83 SDL_bool relative_mode;
84 SDL_bool flush_motion;
95 /* Function prototypes */
98 * \brief Get the touch object at the given id.
102 extern DECLSPEC SDL_Touch* SDLCALL SDL_GetTouch(SDL_TouchID id);
107 * \brief Get the finger object of the given touch, at the given id.
112 DECLSPEC SDL_Finger* SDLCALL SDL_GetFinger(SDL_Touch *touch, SDL_FingerID id);
114 /* Ends C function definitions when using C++ */
120 #include "close_code.h"
122 #endif /* _SDL_mouse_h */
124 /* vi: set ts=4 sw=4 expandtab: */