Mercurial > sdl-ios-xcode
annotate include/SDL_keyboard.h @ 2960:91708bc14aab
It's probably not worth pushing palettized textures. The memory optimization
isn't worth the effort on modern hardware with the sorts of games that would
be using the SDL 1.3 texture API.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Fri, 02 Jan 2009 09:27:36 +0000 |
parents | 99210400e8b9 |
children | 00cace2d9080 |
rev | line source |
---|---|
0 | 1 /* |
2 SDL - Simple DirectMedia Layer | |
2859 | 3 Copyright (C) 1997-2009 Sam Lantinga |
0 | 4 |
5 This library is free software; you can redistribute it and/or | |
1312
c9b51268668f
Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents:
911
diff
changeset
|
6 modify it under the terms of the GNU Lesser General Public |
0 | 7 License as published by the Free Software Foundation; either |
1312
c9b51268668f
Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents:
911
diff
changeset
|
8 version 2.1 of the License, or (at your option) any later version. |
0 | 9 |
10 This library is distributed in the hope that it will be useful, | |
11 but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
1312
c9b51268668f
Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents:
911
diff
changeset
|
13 Lesser General Public License for more details. |
0 | 14 |
1312
c9b51268668f
Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents:
911
diff
changeset
|
15 You should have received a copy of the GNU Lesser General Public |
c9b51268668f
Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents:
911
diff
changeset
|
16 License along with this library; if not, write to the Free Software |
c9b51268668f
Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents:
911
diff
changeset
|
17 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
0 | 18 |
19 Sam Lantinga | |
251
b8688cfdc232
Updated the headers with the correct e-mail address
Sam Lantinga <slouken@libsdl.org>
parents:
0
diff
changeset
|
20 slouken@libsdl.org |
0 | 21 */ |
22 | |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1507
diff
changeset
|
23 /** |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1507
diff
changeset
|
24 * \file SDL_keyboard.h |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1507
diff
changeset
|
25 * |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1507
diff
changeset
|
26 * Include file for SDL keyboard event handling |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1507
diff
changeset
|
27 */ |
0 | 28 |
29 #ifndef _SDL_keyboard_h | |
30 #define _SDL_keyboard_h | |
31 | |
1356
67114343400d
*** empty log message ***
Sam Lantinga <slouken@libsdl.org>
parents:
1312
diff
changeset
|
32 #include "SDL_stdinc.h" |
1358
c71e05b4dc2e
More header massaging... works great on Windows. ;-)
Sam Lantinga <slouken@libsdl.org>
parents:
1356
diff
changeset
|
33 #include "SDL_error.h" |
0 | 34 #include "SDL_keysym.h" |
35 | |
36 #include "begin_code.h" | |
37 /* Set up for C function definitions, even when using C++ */ | |
38 #ifdef __cplusplus | |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1507
diff
changeset
|
39 /* *INDENT-OFF* */ |
0 | 40 extern "C" { |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1507
diff
changeset
|
41 /* *INDENT-ON* */ |
0 | 42 #endif |
43 | |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1507
diff
changeset
|
44 /** |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1507
diff
changeset
|
45 * \struct SDL_keysym |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1507
diff
changeset
|
46 * |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1507
diff
changeset
|
47 * \brief The SDL keysym structure, used in key events. |
0 | 48 */ |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1507
diff
changeset
|
49 typedef struct SDL_keysym |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1507
diff
changeset
|
50 { |
2303
d87417504c75
First pass implementation of new SDL scancode concept, as discussed with
Sam Lantinga <slouken@libsdl.org>
parents:
2268
diff
changeset
|
51 SDL_scancode scancode; /**< SDL physical key code - see ::SDL_scancode for details */ |
2268
4baee598306d
Date: Thu, 05 Jul 2007 14:02:33 -0700
Sam Lantinga <slouken@libsdl.org>
parents:
2129
diff
changeset
|
52 SDLKey sym; /**< SDL virtual key code - see ::SDLKey for details */ |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1507
diff
changeset
|
53 Uint16 mod; /**< current key modifiers */ |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1507
diff
changeset
|
54 Uint32 unicode; /**< OBSOLETE, use SDL_TextInputEvent instead */ |
0 | 55 } SDL_keysym; |
56 | |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1507
diff
changeset
|
57 /* Function prototypes */ |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1507
diff
changeset
|
58 |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1507
diff
changeset
|
59 /** |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1507
diff
changeset
|
60 * \fn int SDL_GetNumKeyboards(void) |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1507
diff
changeset
|
61 * |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1507
diff
changeset
|
62 * \brief Get the number of keyboard input devices available. |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1507
diff
changeset
|
63 * |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1507
diff
changeset
|
64 * \sa SDL_SelectKeyboard() |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1507
diff
changeset
|
65 */ |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1507
diff
changeset
|
66 extern DECLSPEC int SDLCALL SDL_GetNumKeyboards(void); |
0 | 67 |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1507
diff
changeset
|
68 /** |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1507
diff
changeset
|
69 * \fn int SDL_SelectKeyboard(int index) |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1507
diff
changeset
|
70 * |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1507
diff
changeset
|
71 * \brief Set the index of the currently selected keyboard. |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1507
diff
changeset
|
72 * |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1507
diff
changeset
|
73 * \return The index of the previously selected keyboard. |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1507
diff
changeset
|
74 * |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1507
diff
changeset
|
75 * \note You can query the currently selected keyboard by passing an index of -1. |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1507
diff
changeset
|
76 * |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1507
diff
changeset
|
77 * \sa SDL_GetNumKeyboards() |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1507
diff
changeset
|
78 */ |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1507
diff
changeset
|
79 extern DECLSPEC int SDLCALL SDL_SelectKeyboard(int index); |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1507
diff
changeset
|
80 |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1507
diff
changeset
|
81 /** |
2303
d87417504c75
First pass implementation of new SDL scancode concept, as discussed with
Sam Lantinga <slouken@libsdl.org>
parents:
2268
diff
changeset
|
82 * \fn Uint8 *SDL_GetKeyboardState(int *numkeys) |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1507
diff
changeset
|
83 * |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1507
diff
changeset
|
84 * \brief Get a snapshot of the current state of the selected keyboard. |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1507
diff
changeset
|
85 * |
2268
4baee598306d
Date: Thu, 05 Jul 2007 14:02:33 -0700
Sam Lantinga <slouken@libsdl.org>
parents:
2129
diff
changeset
|
86 * \param numkeys if non-NULL, receives the length of the returned array. |
4baee598306d
Date: Thu, 05 Jul 2007 14:02:33 -0700
Sam Lantinga <slouken@libsdl.org>
parents:
2129
diff
changeset
|
87 * |
2303
d87417504c75
First pass implementation of new SDL scancode concept, as discussed with
Sam Lantinga <slouken@libsdl.org>
parents:
2268
diff
changeset
|
88 * \return An array of key states. Indexes into this array are obtained by using ::SDL_scancode values. |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1507
diff
changeset
|
89 * |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1507
diff
changeset
|
90 * Example: |
2303
d87417504c75
First pass implementation of new SDL scancode concept, as discussed with
Sam Lantinga <slouken@libsdl.org>
parents:
2268
diff
changeset
|
91 * Uint8 *state = SDL_GetKeyboardState(NULL); |
d87417504c75
First pass implementation of new SDL scancode concept, as discussed with
Sam Lantinga <slouken@libsdl.org>
parents:
2268
diff
changeset
|
92 * if ( state[SDL_SCANCODE_RETURN)] ) ... <RETURN> is pressed. |
0 | 93 */ |
2303
d87417504c75
First pass implementation of new SDL scancode concept, as discussed with
Sam Lantinga <slouken@libsdl.org>
parents:
2268
diff
changeset
|
94 extern DECLSPEC Uint8 *SDLCALL SDL_GetKeyboardState(int *numkeys); |
0 | 95 |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1507
diff
changeset
|
96 /** |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1507
diff
changeset
|
97 * \fn SDLMod SDL_GetModState(void) |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1507
diff
changeset
|
98 * |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1507
diff
changeset
|
99 * \brief Get the current key modifier state for the selected keyboard. |
0 | 100 */ |
337
9154ec9ca3d2
Explicitly specify the SDL API calling convention (C by default)
Sam Lantinga <slouken@libsdl.org>
parents:
297
diff
changeset
|
101 extern DECLSPEC SDLMod SDLCALL SDL_GetModState(void); |
0 | 102 |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1507
diff
changeset
|
103 /** |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1507
diff
changeset
|
104 * \fn void SDL_SetModState(SDLMod modstate) |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1507
diff
changeset
|
105 * |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1507
diff
changeset
|
106 * \brief Set the current key modifier state for the selected keyboard. |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1507
diff
changeset
|
107 * |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1507
diff
changeset
|
108 * \note This does not change the keyboard state, only the key modifier flags. |
0 | 109 */ |
337
9154ec9ca3d2
Explicitly specify the SDL API calling convention (C by default)
Sam Lantinga <slouken@libsdl.org>
parents:
297
diff
changeset
|
110 extern DECLSPEC void SDLCALL SDL_SetModState(SDLMod modstate); |
0 | 111 |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1507
diff
changeset
|
112 /** |
2303
d87417504c75
First pass implementation of new SDL scancode concept, as discussed with
Sam Lantinga <slouken@libsdl.org>
parents:
2268
diff
changeset
|
113 * \fn SDLKey SDL_GetKeyFromScancode(SDL_scancode scancode) |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1507
diff
changeset
|
114 * |
2303
d87417504c75
First pass implementation of new SDL scancode concept, as discussed with
Sam Lantinga <slouken@libsdl.org>
parents:
2268
diff
changeset
|
115 * \brief Get the key code corresponding to the given scancode according to the current keyboard layout. |
2268
4baee598306d
Date: Thu, 05 Jul 2007 14:02:33 -0700
Sam Lantinga <slouken@libsdl.org>
parents:
2129
diff
changeset
|
116 * |
4baee598306d
Date: Thu, 05 Jul 2007 14:02:33 -0700
Sam Lantinga <slouken@libsdl.org>
parents:
2129
diff
changeset
|
117 * See ::SDLKey for details. |
4baee598306d
Date: Thu, 05 Jul 2007 14:02:33 -0700
Sam Lantinga <slouken@libsdl.org>
parents:
2129
diff
changeset
|
118 * |
4baee598306d
Date: Thu, 05 Jul 2007 14:02:33 -0700
Sam Lantinga <slouken@libsdl.org>
parents:
2129
diff
changeset
|
119 * \sa SDL_GetKeyName() |
0 | 120 */ |
2303
d87417504c75
First pass implementation of new SDL scancode concept, as discussed with
Sam Lantinga <slouken@libsdl.org>
parents:
2268
diff
changeset
|
121 extern DECLSPEC SDLKey SDLCALL SDL_GetKeyFromScancode(SDL_scancode scancode); |
d87417504c75
First pass implementation of new SDL scancode concept, as discussed with
Sam Lantinga <slouken@libsdl.org>
parents:
2268
diff
changeset
|
122 |
d87417504c75
First pass implementation of new SDL scancode concept, as discussed with
Sam Lantinga <slouken@libsdl.org>
parents:
2268
diff
changeset
|
123 /** |
d87417504c75
First pass implementation of new SDL scancode concept, as discussed with
Sam Lantinga <slouken@libsdl.org>
parents:
2268
diff
changeset
|
124 * \fn SDL_scancode SDL_GetScancodeFromKey(SDLKey key) |
d87417504c75
First pass implementation of new SDL scancode concept, as discussed with
Sam Lantinga <slouken@libsdl.org>
parents:
2268
diff
changeset
|
125 * |
d87417504c75
First pass implementation of new SDL scancode concept, as discussed with
Sam Lantinga <slouken@libsdl.org>
parents:
2268
diff
changeset
|
126 * \brief Get the scancode corresponding to the given key code according to the current keyboard layout. |
d87417504c75
First pass implementation of new SDL scancode concept, as discussed with
Sam Lantinga <slouken@libsdl.org>
parents:
2268
diff
changeset
|
127 * |
d87417504c75
First pass implementation of new SDL scancode concept, as discussed with
Sam Lantinga <slouken@libsdl.org>
parents:
2268
diff
changeset
|
128 * See ::SDL_scancode for details. |
d87417504c75
First pass implementation of new SDL scancode concept, as discussed with
Sam Lantinga <slouken@libsdl.org>
parents:
2268
diff
changeset
|
129 * |
d87417504c75
First pass implementation of new SDL scancode concept, as discussed with
Sam Lantinga <slouken@libsdl.org>
parents:
2268
diff
changeset
|
130 * \sa SDL_GetScancodeName() |
d87417504c75
First pass implementation of new SDL scancode concept, as discussed with
Sam Lantinga <slouken@libsdl.org>
parents:
2268
diff
changeset
|
131 */ |
d87417504c75
First pass implementation of new SDL scancode concept, as discussed with
Sam Lantinga <slouken@libsdl.org>
parents:
2268
diff
changeset
|
132 extern DECLSPEC SDL_scancode SDLCALL SDL_GetScancodeFromKey(SDLKey key); |
2268
4baee598306d
Date: Thu, 05 Jul 2007 14:02:33 -0700
Sam Lantinga <slouken@libsdl.org>
parents:
2129
diff
changeset
|
133 |
4baee598306d
Date: Thu, 05 Jul 2007 14:02:33 -0700
Sam Lantinga <slouken@libsdl.org>
parents:
2129
diff
changeset
|
134 /** |
2303
d87417504c75
First pass implementation of new SDL scancode concept, as discussed with
Sam Lantinga <slouken@libsdl.org>
parents:
2268
diff
changeset
|
135 * \fn const char *SDL_GetScancodeName(SDL_scancode scancode) |
d87417504c75
First pass implementation of new SDL scancode concept, as discussed with
Sam Lantinga <slouken@libsdl.org>
parents:
2268
diff
changeset
|
136 * |
d87417504c75
First pass implementation of new SDL scancode concept, as discussed with
Sam Lantinga <slouken@libsdl.org>
parents:
2268
diff
changeset
|
137 * \brief Get a human-readable name for a scancode. |
d87417504c75
First pass implementation of new SDL scancode concept, as discussed with
Sam Lantinga <slouken@libsdl.org>
parents:
2268
diff
changeset
|
138 * |
d87417504c75
First pass implementation of new SDL scancode concept, as discussed with
Sam Lantinga <slouken@libsdl.org>
parents:
2268
diff
changeset
|
139 * \return A pointer to a UTF-8 string that stays valid at least until the next call to this function. If you need it around any longer, you must copy it. If the scancode doesn't have a name, this function returns "". |
d87417504c75
First pass implementation of new SDL scancode concept, as discussed with
Sam Lantinga <slouken@libsdl.org>
parents:
2268
diff
changeset
|
140 * |
d87417504c75
First pass implementation of new SDL scancode concept, as discussed with
Sam Lantinga <slouken@libsdl.org>
parents:
2268
diff
changeset
|
141 * \sa SDL_scancode |
d87417504c75
First pass implementation of new SDL scancode concept, as discussed with
Sam Lantinga <slouken@libsdl.org>
parents:
2268
diff
changeset
|
142 */ |
d87417504c75
First pass implementation of new SDL scancode concept, as discussed with
Sam Lantinga <slouken@libsdl.org>
parents:
2268
diff
changeset
|
143 extern DECLSPEC const char *SDLCALL SDL_GetScancodeName(SDL_scancode |
d87417504c75
First pass implementation of new SDL scancode concept, as discussed with
Sam Lantinga <slouken@libsdl.org>
parents:
2268
diff
changeset
|
144 scancode); |
d87417504c75
First pass implementation of new SDL scancode concept, as discussed with
Sam Lantinga <slouken@libsdl.org>
parents:
2268
diff
changeset
|
145 |
d87417504c75
First pass implementation of new SDL scancode concept, as discussed with
Sam Lantinga <slouken@libsdl.org>
parents:
2268
diff
changeset
|
146 /** |
d87417504c75
First pass implementation of new SDL scancode concept, as discussed with
Sam Lantinga <slouken@libsdl.org>
parents:
2268
diff
changeset
|
147 * \fn const char *SDL_GetKeyName(SDLKey key) |
2268
4baee598306d
Date: Thu, 05 Jul 2007 14:02:33 -0700
Sam Lantinga <slouken@libsdl.org>
parents:
2129
diff
changeset
|
148 * |
4baee598306d
Date: Thu, 05 Jul 2007 14:02:33 -0700
Sam Lantinga <slouken@libsdl.org>
parents:
2129
diff
changeset
|
149 * \brief Get a human-readable name for a key. |
4baee598306d
Date: Thu, 05 Jul 2007 14:02:33 -0700
Sam Lantinga <slouken@libsdl.org>
parents:
2129
diff
changeset
|
150 * |
2303
d87417504c75
First pass implementation of new SDL scancode concept, as discussed with
Sam Lantinga <slouken@libsdl.org>
parents:
2268
diff
changeset
|
151 * \return A pointer to a UTF-8 string that stays valid at least until the next call to this function. If you need it around any longer, you must copy it. If the key doesn't have a name, this function returns "". |
2268
4baee598306d
Date: Thu, 05 Jul 2007 14:02:33 -0700
Sam Lantinga <slouken@libsdl.org>
parents:
2129
diff
changeset
|
152 * |
4baee598306d
Date: Thu, 05 Jul 2007 14:02:33 -0700
Sam Lantinga <slouken@libsdl.org>
parents:
2129
diff
changeset
|
153 * \sa SDLKey |
4baee598306d
Date: Thu, 05 Jul 2007 14:02:33 -0700
Sam Lantinga <slouken@libsdl.org>
parents:
2129
diff
changeset
|
154 */ |
2303
d87417504c75
First pass implementation of new SDL scancode concept, as discussed with
Sam Lantinga <slouken@libsdl.org>
parents:
2268
diff
changeset
|
155 extern DECLSPEC const char *SDLCALL SDL_GetKeyName(SDLKey key); |
0 | 156 |
157 | |
158 /* Ends C function definitions when using C++ */ | |
159 #ifdef __cplusplus | |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1507
diff
changeset
|
160 /* *INDENT-OFF* */ |
0 | 161 } |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1507
diff
changeset
|
162 /* *INDENT-ON* */ |
0 | 163 #endif |
164 #include "close_code.h" | |
165 | |
166 #endif /* _SDL_keyboard_h */ | |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1507
diff
changeset
|
167 |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1507
diff
changeset
|
168 /* vi: set ts=4 sw=4 expandtab: */ |