annotate touchTest/Iphone Test/touchTestIPhone2/touchTestIPhone/include/SDL_joystick.h @ 4691:73f5c530afac

Fixed hgIgnore to ignore test/gesturetest
author Jim Grandpre <jim.tla@gmail.com>
date Thu, 19 Aug 2010 13:49:11 -0400
parents 31607094315c
children
rev   line source
4677
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
1 /*
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
2 SDL - Simple DirectMedia Layer
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
3 Copyright (C) 1997-2010 Sam Lantinga
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
4
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
5 This library is free software; you can redistribute it and/or
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
6 modify it under the terms of the GNU Lesser General Public
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
7 License as published by the Free Software Foundation; either
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
8 version 2.1 of the License, or (at your option) any later version.
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
9
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
10 This library is distributed in the hope that it will be useful,
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
13 Lesser General Public License for more details.
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
14
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
15 You should have received a copy of the GNU Lesser General Public
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
16 License along with this library; if not, write to the Free Software
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
17 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
18
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
19 Sam Lantinga
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
20 slouken@libsdl.org
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
21 */
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
22
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
23 /**
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
24 * \file SDL_joystick.h
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
25 *
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
26 * Include file for SDL joystick event handling
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
27 */
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
28
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
29 #ifndef _SDL_joystick_h
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
30 #define _SDL_joystick_h
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
31
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
32 #include "SDL_stdinc.h"
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
33 #include "SDL_error.h"
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
34
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
35 #include "begin_code.h"
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
36 /* Set up for C function definitions, even when using C++ */
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
37 #ifdef __cplusplus
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
38 /* *INDENT-OFF* */
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
39 extern "C" {
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
40 /* *INDENT-ON* */
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
41 #endif
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
42
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
43 /**
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
44 * \file SDL_joystick.h
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
45 *
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
46 * In order to use these functions, SDL_Init() must have been called
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
47 * with the ::SDL_INIT_JOYSTICK flag. This causes SDL to scan the system
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
48 * for joysticks, and load appropriate drivers.
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
49 */
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
50
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
51 /* The joystick structure used to identify an SDL joystick */
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
52 struct _SDL_Joystick;
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
53 typedef struct _SDL_Joystick SDL_Joystick;
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
54
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
55
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
56 /* Function prototypes */
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
57 /**
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
58 * Count the number of joysticks attached to the system
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
59 */
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
60 extern DECLSPEC int SDLCALL SDL_NumJoysticks(void);
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
61
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
62 /**
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
63 * Get the implementation dependent name of a joystick.
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
64 * This can be called before any joysticks are opened.
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
65 * If no name can be found, this function returns NULL.
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
66 */
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
67 extern DECLSPEC const char *SDLCALL SDL_JoystickName(int device_index);
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
68
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
69 /**
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
70 * Open a joystick for use.
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
71 * The index passed as an argument refers tothe N'th joystick on the system.
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
72 * This index is the value which will identify this joystick in future joystick
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
73 * events.
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
74 *
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
75 * \return A joystick identifier, or NULL if an error occurred.
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
76 */
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
77 extern DECLSPEC SDL_Joystick *SDLCALL SDL_JoystickOpen(int device_index);
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
78
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
79 /**
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
80 * Returns 1 if the joystick has been opened, or 0 if it has not.
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
81 */
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
82 extern DECLSPEC int SDLCALL SDL_JoystickOpened(int device_index);
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
83
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
84 /**
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
85 * Get the device index of an opened joystick.
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
86 */
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
87 extern DECLSPEC int SDLCALL SDL_JoystickIndex(SDL_Joystick * joystick);
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
88
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
89 /**
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
90 * Get the number of general axis controls on a joystick.
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
91 */
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
92 extern DECLSPEC int SDLCALL SDL_JoystickNumAxes(SDL_Joystick * joystick);
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
93
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
94 /**
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
95 * Get the number of trackballs on a joystick.
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
96 *
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
97 * Joystick trackballs have only relative motion events associated
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
98 * with them and their state cannot be polled.
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
99 */
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
100 extern DECLSPEC int SDLCALL SDL_JoystickNumBalls(SDL_Joystick * joystick);
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
101
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
102 /**
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
103 * Get the number of POV hats on a joystick.
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
104 */
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
105 extern DECLSPEC int SDLCALL SDL_JoystickNumHats(SDL_Joystick * joystick);
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
106
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
107 /**
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
108 * Get the number of buttons on a joystick.
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
109 */
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
110 extern DECLSPEC int SDLCALL SDL_JoystickNumButtons(SDL_Joystick * joystick);
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
111
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
112 /**
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
113 * Update the current state of the open joysticks.
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
114 *
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
115 * This is called automatically by the event loop if any joystick
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
116 * events are enabled.
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
117 */
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
118 extern DECLSPEC void SDLCALL SDL_JoystickUpdate(void);
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
119
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
120 /**
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
121 * Enable/disable joystick event polling.
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
122 *
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
123 * If joystick events are disabled, you must call SDL_JoystickUpdate()
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
124 * yourself and check the state of the joystick when you want joystick
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
125 * information.
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
126 *
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
127 * The state can be one of ::SDL_QUERY, ::SDL_ENABLE or ::SDL_IGNORE.
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
128 */
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
129 extern DECLSPEC int SDLCALL SDL_JoystickEventState(int state);
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
130
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
131 /**
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
132 * Get the current state of an axis control on a joystick.
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
133 *
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
134 * The state is a value ranging from -32768 to 32767.
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
135 *
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
136 * The axis indices start at index 0.
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
137 */
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
138 extern DECLSPEC Sint16 SDLCALL SDL_JoystickGetAxis(SDL_Joystick * joystick,
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
139 int axis);
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
140
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
141 /**
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
142 * \name Hat positions
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
143 */
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
144 /*@{*/
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
145 #define SDL_HAT_CENTERED 0x00
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
146 #define SDL_HAT_UP 0x01
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
147 #define SDL_HAT_RIGHT 0x02
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
148 #define SDL_HAT_DOWN 0x04
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
149 #define SDL_HAT_LEFT 0x08
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
150 #define SDL_HAT_RIGHTUP (SDL_HAT_RIGHT|SDL_HAT_UP)
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
151 #define SDL_HAT_RIGHTDOWN (SDL_HAT_RIGHT|SDL_HAT_DOWN)
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
152 #define SDL_HAT_LEFTUP (SDL_HAT_LEFT|SDL_HAT_UP)
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
153 #define SDL_HAT_LEFTDOWN (SDL_HAT_LEFT|SDL_HAT_DOWN)
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
154 /*@}*/
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
155
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
156 /**
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
157 * Get the current state of a POV hat on a joystick.
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
158 *
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
159 * The hat indices start at index 0.
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
160 *
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
161 * \return The return value is one of the following positions:
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
162 * - ::SDL_HAT_CENTERED
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
163 * - ::SDL_HAT_UP
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
164 * - ::SDL_HAT_RIGHT
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
165 * - ::SDL_HAT_DOWN
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
166 * - ::SDL_HAT_LEFT
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
167 * - ::SDL_HAT_RIGHTUP
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
168 * - ::SDL_HAT_RIGHTDOWN
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
169 * - ::SDL_HAT_LEFTUP
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
170 * - ::SDL_HAT_LEFTDOWN
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
171 */
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
172 extern DECLSPEC Uint8 SDLCALL SDL_JoystickGetHat(SDL_Joystick * joystick,
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
173 int hat);
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
174
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
175 /**
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
176 * Get the ball axis change since the last poll.
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
177 *
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
178 * \return 0, or -1 if you passed it invalid parameters.
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
179 *
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
180 * The ball indices start at index 0.
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
181 */
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
182 extern DECLSPEC int SDLCALL SDL_JoystickGetBall(SDL_Joystick * joystick,
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
183 int ball, int *dx, int *dy);
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
184
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
185 /**
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
186 * Get the current state of a button on a joystick.
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
187 *
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
188 * The button indices start at index 0.
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
189 */
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
190 extern DECLSPEC Uint8 SDLCALL SDL_JoystickGetButton(SDL_Joystick * joystick,
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
191 int button);
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
192
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
193 /**
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
194 * Close a joystick previously opened with SDL_JoystickOpen().
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
195 */
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
196 extern DECLSPEC void SDLCALL SDL_JoystickClose(SDL_Joystick * joystick);
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
197
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
198
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
199 /* Ends C function definitions when using C++ */
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
200 #ifdef __cplusplus
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
201 /* *INDENT-OFF* */
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
202 }
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
203 /* *INDENT-ON* */
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
204 #endif
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
205 #include "close_code.h"
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
206
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
207 #endif /* _SDL_joystick_h */
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
208
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
209 /* vi: set ts=4 sw=4 expandtab: */