Mercurial > sdl-ios-xcode
comparison include/SDL_keyboard.h @ 4465:3e69e077cb95
Removed multi-mouse / multi-keyboard support in anticipation of a real multi-mouse and multi-touch API.
Plus, this lets me start implementing cursor support.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sun, 09 May 2010 20:47:22 -0700 |
parents | f7b03b6838cb |
children | 22aa6a631d34 |
comparison
equal
deleted
inserted
replaced
4464:fa77a6429698 | 4465:3e69e077cb95 |
---|---|
30 #define _SDL_keyboard_h | 30 #define _SDL_keyboard_h |
31 | 31 |
32 #include "SDL_stdinc.h" | 32 #include "SDL_stdinc.h" |
33 #include "SDL_error.h" | 33 #include "SDL_error.h" |
34 #include "SDL_keysym.h" | 34 #include "SDL_keysym.h" |
35 #include "SDL_video.h" | |
35 | 36 |
36 #include "begin_code.h" | 37 #include "begin_code.h" |
37 /* Set up for C function definitions, even when using C++ */ | 38 /* Set up for C function definitions, even when using C++ */ |
38 #ifdef __cplusplus | 39 #ifdef __cplusplus |
39 /* *INDENT-OFF* */ | 40 /* *INDENT-OFF* */ |
53 } SDL_keysym; | 54 } SDL_keysym; |
54 | 55 |
55 /* Function prototypes */ | 56 /* Function prototypes */ |
56 | 57 |
57 /** | 58 /** |
58 * \brief Get the number of keyboard input devices available. | 59 * \brief Get the window which currently has keyboard focus. |
59 * | |
60 * \sa SDL_SelectKeyboard() | |
61 */ | 60 */ |
62 extern DECLSPEC int SDLCALL SDL_GetNumKeyboards(void); | 61 extern DECLSPEC SDL_Window * SDLCALL SDL_GetKeyboardFocus(void); |
63 | 62 |
64 /** | 63 /** |
65 * \brief Set the index of the currently selected keyboard. | 64 * \brief Get a snapshot of the current state of the keyboard. |
66 * | |
67 * \return The index of the previously selected keyboard. | |
68 * | |
69 * \note You can query the currently selected keyboard by passing an index of -1. | |
70 * | |
71 * \sa SDL_GetNumKeyboards() | |
72 */ | |
73 extern DECLSPEC int SDLCALL SDL_SelectKeyboard(int index); | |
74 | |
75 /** | |
76 * \brief Get a snapshot of the current state of the selected keyboard. | |
77 * | 65 * |
78 * \param numkeys if non-NULL, receives the length of the returned array. | 66 * \param numkeys if non-NULL, receives the length of the returned array. |
79 * | 67 * |
80 * \return An array of key states. Indexes into this array are obtained by using ::SDL_scancode values. | 68 * \return An array of key states. Indexes into this array are obtained by using ::SDL_scancode values. |
81 * | 69 * |
88 * \endcode | 76 * \endcode |
89 */ | 77 */ |
90 extern DECLSPEC Uint8 *SDLCALL SDL_GetKeyboardState(int *numkeys); | 78 extern DECLSPEC Uint8 *SDLCALL SDL_GetKeyboardState(int *numkeys); |
91 | 79 |
92 /** | 80 /** |
93 * \brief Get the current key modifier state for the selected keyboard. | 81 * \brief Get the current key modifier state for the keyboard. |
94 */ | 82 */ |
95 extern DECLSPEC SDLMod SDLCALL SDL_GetModState(void); | 83 extern DECLSPEC SDLMod SDLCALL SDL_GetModState(void); |
96 | 84 |
97 /** | 85 /** |
98 * \brief Set the current key modifier state for the selected keyboard. | 86 * \brief Set the current key modifier state for the keyboard. |
99 * | 87 * |
100 * \note This does not change the keyboard state, only the key modifier flags. | 88 * \note This does not change the keyboard state, only the key modifier flags. |
101 */ | 89 */ |
102 extern DECLSPEC void SDLCALL SDL_SetModState(SDLMod modstate); | 90 extern DECLSPEC void SDLCALL SDL_SetModState(SDLMod modstate); |
103 | 91 |
104 /** | 92 /** |
105 * \brief Get the key code corresponding to the given scancode according to the | 93 * \brief Get the key code corresponding to the given scancode according |
106 * current keyboard layout. | 94 * to the current keyboard layout. |
107 * | 95 * |
108 * See ::SDLKey for details. | 96 * See ::SDLKey for details. |
109 * | 97 * |
110 * \sa SDL_GetKeyName() | 98 * \sa SDL_GetKeyName() |
111 */ | 99 */ |