Mercurial > sdl-ios-xcode
comparison include/SDL_events.h @ 3685:64ce267332c6
Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Thu, 21 Jan 2010 06:21:52 +0000 |
parents | 6bb9952d5029 |
children | f7b03b6838cb |
comparison
equal
deleted
inserted
replaced
3684:cc564f08884f | 3685:64ce267332c6 |
---|---|
125 * \brief Window state change event data (event.window.*) | 125 * \brief Window state change event data (event.window.*) |
126 */ | 126 */ |
127 typedef struct SDL_WindowEvent | 127 typedef struct SDL_WindowEvent |
128 { | 128 { |
129 Uint8 type; /**< ::SDL_WINDOWEVENT */ | 129 Uint8 type; /**< ::SDL_WINDOWEVENT */ |
130 SDL_WindowID windowID; /**< The associated window */ | 130 Uint32 windowID; /**< The associated window */ |
131 Uint8 event; /**< ::SDL_WindowEventID */ | 131 Uint8 event; /**< ::SDL_WindowEventID */ |
132 int data1; /**< event dependent data */ | 132 int data1; /**< event dependent data */ |
133 int data2; /**< event dependent data */ | 133 int data2; /**< event dependent data */ |
134 } SDL_WindowEvent; | 134 } SDL_WindowEvent; |
135 | 135 |
137 * \brief Keyboard button event structure (event.key.*) | 137 * \brief Keyboard button event structure (event.key.*) |
138 */ | 138 */ |
139 typedef struct SDL_KeyboardEvent | 139 typedef struct SDL_KeyboardEvent |
140 { | 140 { |
141 Uint8 type; /**< ::SDL_KEYDOWN or ::SDL_KEYUP */ | 141 Uint8 type; /**< ::SDL_KEYDOWN or ::SDL_KEYUP */ |
142 SDL_WindowID windowID; /**< The window with keyboard focus, if any */ | 142 Uint32 windowID; /**< The window with keyboard focus, if any */ |
143 Uint8 which; /**< The keyboard device index */ | 143 Uint8 which; /**< The keyboard device index */ |
144 Uint8 state; /**< ::SDL_PRESSED or ::SDL_RELEASED */ | 144 Uint8 state; /**< ::SDL_PRESSED or ::SDL_RELEASED */ |
145 SDL_keysym keysym; /**< The key that was pressed or released */ | 145 SDL_keysym keysym; /**< The key that was pressed or released */ |
146 } SDL_KeyboardEvent; | 146 } SDL_KeyboardEvent; |
147 | 147 |
163 * \brief Keyboard text input event structure (event.text.*) | 163 * \brief Keyboard text input event structure (event.text.*) |
164 */ | 164 */ |
165 typedef struct SDL_TextInputEvent | 165 typedef struct SDL_TextInputEvent |
166 { | 166 { |
167 Uint8 type; /**< ::SDL_TEXTINPUT */ | 167 Uint8 type; /**< ::SDL_TEXTINPUT */ |
168 SDL_WindowID windowID; /**< The window with keyboard focus, if any */ | 168 Uint32 windowID; /**< The window with keyboard focus, if any */ |
169 Uint8 which; /**< The keyboard device index */ | 169 Uint8 which; /**< The keyboard device index */ |
170 char text[SDL_TEXTINPUTEVENT_TEXT_SIZE]; /**< The input text */ | 170 char text[SDL_TEXTINPUTEVENT_TEXT_SIZE]; /**< The input text */ |
171 } SDL_TextInputEvent; | 171 } SDL_TextInputEvent; |
172 | 172 |
173 /** | 173 /** |
174 * \brief Mouse motion event structure (event.motion.*) | 174 * \brief Mouse motion event structure (event.motion.*) |
175 */ | 175 */ |
176 typedef struct SDL_MouseMotionEvent | 176 typedef struct SDL_MouseMotionEvent |
177 { | 177 { |
178 Uint8 type; /**< ::SDL_MOUSEMOTION */ | 178 Uint8 type; /**< ::SDL_MOUSEMOTION */ |
179 SDL_WindowID windowID; /**< The window with mouse focus, if any */ | 179 Uint32 windowID; /**< The window with mouse focus, if any */ |
180 Uint8 which; /**< The mouse device index */ | 180 Uint8 which; /**< The mouse device index */ |
181 Uint8 state; /**< The current button state */ | 181 Uint8 state; /**< The current button state */ |
182 int x; /**< X coordinate, relative to window */ | 182 int x; /**< X coordinate, relative to window */ |
183 int y; /**< Y coordinate, relative to window */ | 183 int y; /**< Y coordinate, relative to window */ |
184 int z; /**< Z coordinate, for future use */ | 184 int z; /**< Z coordinate, for future use */ |
197 * \brief Mouse button event structure (event.button.*) | 197 * \brief Mouse button event structure (event.button.*) |
198 */ | 198 */ |
199 typedef struct SDL_MouseButtonEvent | 199 typedef struct SDL_MouseButtonEvent |
200 { | 200 { |
201 Uint8 type; /**< ::SDL_MOUSEBUTTONDOWN or ::SDL_MOUSEBUTTONUP */ | 201 Uint8 type; /**< ::SDL_MOUSEBUTTONDOWN or ::SDL_MOUSEBUTTONUP */ |
202 SDL_WindowID windowID; /**< The window with mouse focus, if any */ | 202 Uint32 windowID; /**< The window with mouse focus, if any */ |
203 Uint8 which; /**< The mouse device index */ | 203 Uint8 which; /**< The mouse device index */ |
204 Uint8 button; /**< The mouse button index */ | 204 Uint8 button; /**< The mouse button index */ |
205 Uint8 state; /**< ::SDL_PRESSED or ::SDL_RELEASED */ | 205 Uint8 state; /**< ::SDL_PRESSED or ::SDL_RELEASED */ |
206 int x; /**< X coordinate, relative to window */ | 206 int x; /**< X coordinate, relative to window */ |
207 int y; /**< Y coordinate, relative to window */ | 207 int y; /**< Y coordinate, relative to window */ |
211 * \brief Mouse wheel event structure (event.wheel.*) | 211 * \brief Mouse wheel event structure (event.wheel.*) |
212 */ | 212 */ |
213 typedef struct SDL_MouseWheelEvent | 213 typedef struct SDL_MouseWheelEvent |
214 { | 214 { |
215 Uint8 type; /**< ::SDL_MOUSEWHEEL */ | 215 Uint8 type; /**< ::SDL_MOUSEWHEEL */ |
216 SDL_WindowID windowID; /**< The window with mouse focus, if any */ | 216 Uint32 windowID; /**< The window with mouse focus, if any */ |
217 Uint8 which; /**< The mouse device index */ | 217 Uint8 which; /**< The mouse device index */ |
218 int x; /**< The amount scrolled horizontally */ | 218 int x; /**< The amount scrolled horizontally */ |
219 int y; /**< The amount scrolled vertically */ | 219 int y; /**< The amount scrolled vertically */ |
220 } SDL_MouseWheelEvent; | 220 } SDL_MouseWheelEvent; |
221 | 221 |
282 * \brief A user-defined event type (event.user.*) | 282 * \brief A user-defined event type (event.user.*) |
283 */ | 283 */ |
284 typedef struct SDL_UserEvent | 284 typedef struct SDL_UserEvent |
285 { | 285 { |
286 Uint8 type; /**< ::SDL_USEREVENT through ::SDL_NUMEVENTS-1 */ | 286 Uint8 type; /**< ::SDL_USEREVENT through ::SDL_NUMEVENTS-1 */ |
287 SDL_WindowID windowID; /**< The associated window if any*/ | 287 Uint32 windowID; /**< The associated window if any*/ |
288 int code; /**< User defined event code */ | 288 int code; /**< User defined event code */ |
289 void *data1; /**< User defined data pointer */ | 289 void *data1; /**< User defined data pointer */ |
290 void *data2; /**< User defined data pointer */ | 290 void *data2; /**< User defined data pointer */ |
291 } SDL_UserEvent; | 291 } SDL_UserEvent; |
292 | 292 |
305 } SDL_SysWMEvent; | 305 } SDL_SysWMEvent; |
306 | 306 |
307 typedef struct SDL_ProximityEvent | 307 typedef struct SDL_ProximityEvent |
308 { | 308 { |
309 Uint8 type; | 309 Uint8 type; |
310 SDL_WindowID windowID; /**< The associated window */ | 310 Uint32 windowID; /**< The associated window */ |
311 Uint8 which; | 311 Uint8 which; |
312 int cursor; | 312 int cursor; |
313 int x; | 313 int x; |
314 int y; | 314 int y; |
315 } SDL_ProximityEvent; | 315 } SDL_ProximityEvent; |