gosu 0.15.2 → 1.0.0.pre1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (234) hide show
  1. checksums.yaml +4 -4
  2. data/dependencies/SDL/include/SDL.h +138 -0
  3. data/dependencies/SDL/include/SDL_assert.h +293 -0
  4. data/dependencies/SDL/include/SDL_atomic.h +295 -0
  5. data/dependencies/SDL/include/SDL_audio.h +859 -0
  6. data/dependencies/SDL/include/SDL_bits.h +121 -0
  7. data/dependencies/SDL/include/SDL_blendmode.h +123 -0
  8. data/dependencies/SDL/include/SDL_clipboard.h +71 -0
  9. data/dependencies/SDL/include/SDL_config.h +55 -0
  10. data/dependencies/SDL/include/SDL_config_android.h +182 -0
  11. data/dependencies/SDL/include/SDL_config_iphoneos.h +207 -0
  12. data/dependencies/SDL/include/SDL_config_macosx.h +266 -0
  13. data/dependencies/SDL/include/SDL_config_minimal.h +85 -0
  14. data/dependencies/SDL/include/SDL_config_os2.h +188 -0
  15. data/dependencies/SDL/include/SDL_config_pandora.h +135 -0
  16. data/dependencies/SDL/include/SDL_config_psp.h +165 -0
  17. data/dependencies/SDL/include/SDL_config_windows.h +288 -0
  18. data/dependencies/SDL/include/SDL_config_winrt.h +243 -0
  19. data/dependencies/SDL/include/SDL_config_wiz.h +149 -0
  20. data/dependencies/SDL/include/SDL_copying.h +20 -0
  21. data/dependencies/SDL/include/SDL_cpuinfo.h +299 -0
  22. data/dependencies/SDL/include/SDL_egl.h +1676 -0
  23. data/dependencies/SDL/include/SDL_endian.h +263 -0
  24. data/dependencies/SDL/include/SDL_error.h +112 -0
  25. data/dependencies/SDL/include/SDL_events.h +827 -0
  26. data/dependencies/SDL/include/SDL_filesystem.h +136 -0
  27. data/dependencies/SDL/include/SDL_gamecontroller.h +541 -0
  28. data/dependencies/SDL/include/SDL_gesture.h +87 -0
  29. data/dependencies/SDL/include/SDL_haptic.h +1247 -0
  30. data/dependencies/SDL/include/SDL_hints.h +1578 -0
  31. data/dependencies/SDL/include/SDL_joystick.h +499 -0
  32. data/dependencies/SDL/include/SDL_keyboard.h +217 -0
  33. data/dependencies/SDL/include/SDL_keycode.h +351 -0
  34. data/dependencies/SDL/include/SDL_loadso.h +81 -0
  35. data/dependencies/SDL/include/SDL_locale.h +101 -0
  36. data/dependencies/SDL/include/SDL_log.h +211 -0
  37. data/dependencies/SDL/include/SDL_main.h +180 -0
  38. data/dependencies/SDL/include/SDL_messagebox.h +146 -0
  39. data/dependencies/SDL/include/SDL_metal.h +117 -0
  40. data/dependencies/SDL/include/SDL_misc.h +75 -0
  41. data/dependencies/SDL/include/SDL_mouse.h +302 -0
  42. data/dependencies/SDL/include/SDL_mutex.h +251 -0
  43. data/dependencies/SDL/include/SDL_name.h +33 -0
  44. data/dependencies/SDL/include/SDL_opengl.h +2183 -0
  45. data/dependencies/SDL/include/SDL_opengl_glext.h +11180 -0
  46. data/dependencies/SDL/include/SDL_opengles.h +39 -0
  47. data/dependencies/SDL/include/SDL_opengles2.h +52 -0
  48. data/dependencies/SDL/include/SDL_opengles2_gl2.h +621 -0
  49. data/dependencies/SDL/include/SDL_opengles2_gl2ext.h +2050 -0
  50. data/dependencies/SDL/include/SDL_opengles2_gl2platform.h +30 -0
  51. data/dependencies/SDL/include/SDL_opengles2_khrplatform.h +282 -0
  52. data/dependencies/SDL/include/SDL_pixels.h +479 -0
  53. data/dependencies/SDL/include/SDL_platform.h +198 -0
  54. data/dependencies/SDL/include/SDL_power.h +75 -0
  55. data/dependencies/SDL/include/SDL_quit.h +58 -0
  56. data/dependencies/SDL/include/SDL_rect.h +174 -0
  57. data/dependencies/SDL/include/SDL_render.h +1158 -0
  58. data/dependencies/SDL/include/SDL_revision.h +2 -0
  59. data/dependencies/SDL/include/SDL_rwops.h +283 -0
  60. data/dependencies/SDL/include/SDL_scancode.h +413 -0
  61. data/dependencies/SDL/include/SDL_sensor.h +267 -0
  62. data/dependencies/SDL/include/SDL_shape.h +144 -0
  63. data/dependencies/SDL/include/SDL_stdinc.h +647 -0
  64. data/dependencies/SDL/include/SDL_surface.h +563 -0
  65. data/dependencies/SDL/include/SDL_system.h +325 -0
  66. data/dependencies/SDL/include/SDL_syswm.h +354 -0
  67. data/dependencies/SDL/include/SDL_test.h +69 -0
  68. data/dependencies/SDL/include/SDL_test_assert.h +105 -0
  69. data/dependencies/SDL/include/SDL_test_common.h +218 -0
  70. data/dependencies/SDL/include/SDL_test_compare.h +69 -0
  71. data/dependencies/SDL/include/SDL_test_crc32.h +124 -0
  72. data/dependencies/SDL/include/SDL_test_font.h +81 -0
  73. data/dependencies/SDL/include/SDL_test_fuzzer.h +384 -0
  74. data/dependencies/SDL/include/SDL_test_harness.h +134 -0
  75. data/dependencies/SDL/include/SDL_test_images.h +78 -0
  76. data/dependencies/SDL/include/SDL_test_log.h +67 -0
  77. data/dependencies/SDL/include/SDL_test_md5.h +129 -0
  78. data/dependencies/SDL/include/SDL_test_memory.h +63 -0
  79. data/dependencies/SDL/include/SDL_test_random.h +115 -0
  80. data/dependencies/SDL/include/SDL_thread.h +366 -0
  81. data/dependencies/SDL/include/SDL_timer.h +115 -0
  82. data/dependencies/SDL/include/SDL_touch.h +102 -0
  83. data/dependencies/SDL/include/SDL_types.h +29 -0
  84. data/dependencies/SDL/include/SDL_version.h +162 -0
  85. data/dependencies/SDL/include/SDL_video.h +1282 -0
  86. data/dependencies/SDL/include/SDL_vulkan.h +276 -0
  87. data/dependencies/SDL/include/begin_code.h +166 -0
  88. data/dependencies/SDL/include/close_code.h +40 -0
  89. data/dependencies/SDL/lib/x64/libSDL2.dll.a +0 -0
  90. data/dependencies/SDL/lib/x86/libSDL2.dll.a +0 -0
  91. data/dependencies/SDL_sound/SDL_sound.c +795 -0
  92. data/dependencies/SDL_sound/SDL_sound.h +725 -0
  93. data/dependencies/SDL_sound/SDL_sound_aiff.c +537 -0
  94. data/dependencies/SDL_sound/SDL_sound_au.c +352 -0
  95. data/dependencies/SDL_sound/SDL_sound_coreaudio.c +747 -0
  96. data/dependencies/SDL_sound/SDL_sound_flac.c +182 -0
  97. data/dependencies/SDL_sound/SDL_sound_internal.h +304 -0
  98. data/dependencies/SDL_sound/SDL_sound_modplug.c +228 -0
  99. data/dependencies/SDL_sound/SDL_sound_mp3.c +184 -0
  100. data/dependencies/SDL_sound/SDL_sound_raw.c +164 -0
  101. data/dependencies/SDL_sound/SDL_sound_shn.c +1309 -0
  102. data/dependencies/SDL_sound/SDL_sound_voc.c +550 -0
  103. data/dependencies/SDL_sound/SDL_sound_vorbis.c +223 -0
  104. data/dependencies/SDL_sound/SDL_sound_wav.c +783 -0
  105. data/dependencies/SDL_sound/dr_flac.h +5906 -0
  106. data/dependencies/SDL_sound/dr_mp3.h +2832 -0
  107. data/dependencies/SDL_sound/libmodplug/fastmix.c +1748 -0
  108. data/dependencies/SDL_sound/libmodplug/libmodplug.h +1001 -0
  109. data/dependencies/SDL_sound/libmodplug/load_669.c +188 -0
  110. data/dependencies/SDL_sound/libmodplug/load_abc.c +4725 -0
  111. data/dependencies/SDL_sound/libmodplug/load_amf.c +403 -0
  112. data/dependencies/SDL_sound/libmodplug/load_ams.c +587 -0
  113. data/dependencies/SDL_sound/libmodplug/load_dbm.c +357 -0
  114. data/dependencies/SDL_sound/libmodplug/load_dmf.c +531 -0
  115. data/dependencies/SDL_sound/libmodplug/load_dsm.c +232 -0
  116. data/dependencies/SDL_sound/libmodplug/load_far.c +253 -0
  117. data/dependencies/SDL_sound/libmodplug/load_it.c +796 -0
  118. data/dependencies/SDL_sound/libmodplug/load_mdl.c +488 -0
  119. data/dependencies/SDL_sound/libmodplug/load_med.c +757 -0
  120. data/dependencies/SDL_sound/libmodplug/load_mid.c +1405 -0
  121. data/dependencies/SDL_sound/libmodplug/load_mod.c +269 -0
  122. data/dependencies/SDL_sound/libmodplug/load_mt2.c +546 -0
  123. data/dependencies/SDL_sound/libmodplug/load_mtm.c +142 -0
  124. data/dependencies/SDL_sound/libmodplug/load_okt.c +192 -0
  125. data/dependencies/SDL_sound/libmodplug/load_pat.c +1143 -0
  126. data/dependencies/SDL_sound/libmodplug/load_pat.h +25 -0
  127. data/dependencies/SDL_sound/libmodplug/load_psm.c +350 -0
  128. data/dependencies/SDL_sound/libmodplug/load_ptm.c +204 -0
  129. data/dependencies/SDL_sound/libmodplug/load_s3m.c +325 -0
  130. data/dependencies/SDL_sound/libmodplug/load_stm.c +180 -0
  131. data/dependencies/SDL_sound/libmodplug/load_ult.c +206 -0
  132. data/dependencies/SDL_sound/libmodplug/load_umx.c +51 -0
  133. data/dependencies/SDL_sound/libmodplug/load_xm.c +554 -0
  134. data/dependencies/SDL_sound/libmodplug/mmcmp.c +382 -0
  135. data/dependencies/SDL_sound/libmodplug/modplug.c +170 -0
  136. data/dependencies/SDL_sound/libmodplug/modplug.h +90 -0
  137. data/dependencies/SDL_sound/libmodplug/snd_dsp.c +301 -0
  138. data/dependencies/SDL_sound/libmodplug/snd_flt.c +63 -0
  139. data/dependencies/SDL_sound/libmodplug/snd_fx.c +2350 -0
  140. data/dependencies/SDL_sound/libmodplug/sndfile.c +1169 -0
  141. data/dependencies/SDL_sound/libmodplug/sndmix.c +1034 -0
  142. data/dependencies/SDL_sound/libmodplug/tables.h +371 -0
  143. data/{src/stb_vorbis.c → dependencies/SDL_sound/stb_vorbis.h} +143 -78
  144. data/dependencies/al_soft/AL/al.h +655 -0
  145. data/dependencies/al_soft/AL/alc.h +270 -0
  146. data/dependencies/al_soft/AL/alext.h +585 -0
  147. data/dependencies/al_soft/AL/efx-creative.h +3 -0
  148. data/dependencies/al_soft/AL/efx-presets.h +402 -0
  149. data/dependencies/al_soft/AL/efx.h +762 -0
  150. data/dependencies/al_soft/x64/libOpenAL32.dll.a +0 -0
  151. data/dependencies/al_soft/x86/libOpenAL32.dll.a +0 -0
  152. data/{src → dependencies/stb}/stb_image.h +330 -127
  153. data/{src → dependencies/stb}/stb_image_write.h +156 -85
  154. data/{src → dependencies/stb}/stb_truetype.h +192 -69
  155. data/{src → dependencies/utf8proc}/utf8proc.c +0 -0
  156. data/{src → dependencies/utf8proc}/utf8proc.h +0 -0
  157. data/{src → dependencies/utf8proc}/utf8proc_data.h +0 -0
  158. data/ext/gosu/extconf.rb +56 -22
  159. data/{Gosu → include/Gosu}/Audio.hpp +6 -8
  160. data/{Gosu → include/Gosu}/AutoLink.hpp +0 -0
  161. data/include/Gosu/Bitmap.hpp +100 -0
  162. data/{Gosu → include/Gosu}/Buttons.hpp +94 -35
  163. data/{Gosu → include/Gosu}/Channel.h +0 -0
  164. data/{Gosu → include/Gosu}/Color.h +0 -0
  165. data/{Gosu → include/Gosu}/Color.hpp +0 -0
  166. data/{Gosu → include/Gosu}/Directories.hpp +0 -0
  167. data/{Gosu → include/Gosu}/Font.h +0 -0
  168. data/{Gosu → include/Gosu}/Font.hpp +0 -0
  169. data/{Gosu → include/Gosu}/Fwd.hpp +0 -0
  170. data/{Gosu → include/Gosu}/Gosu.h +3 -0
  171. data/{Gosu → include/Gosu}/Gosu.hpp +0 -0
  172. data/{Gosu → include/Gosu}/Graphics.hpp +0 -0
  173. data/{Gosu → include/Gosu}/GraphicsBase.hpp +0 -0
  174. data/{Gosu → include/Gosu}/IO.hpp +0 -0
  175. data/{Gosu → include/Gosu}/Image.h +0 -0
  176. data/{Gosu → include/Gosu}/Image.hpp +7 -6
  177. data/{Gosu → include/Gosu}/ImageData.hpp +0 -0
  178. data/{Gosu → include/Gosu}/Input.hpp +30 -15
  179. data/{Gosu → include/Gosu}/Inspection.hpp +0 -0
  180. data/{Gosu → include/Gosu}/Math.hpp +0 -0
  181. data/{Gosu → include/Gosu}/Platform.hpp +0 -0
  182. data/{Gosu → include/Gosu}/Sample.h +0 -0
  183. data/{Gosu → include/Gosu}/Song.h +0 -0
  184. data/{Gosu → include/Gosu}/Text.hpp +0 -0
  185. data/{Gosu → include/Gosu}/TextInput.h +0 -0
  186. data/{Gosu → include/Gosu}/TextInput.hpp +0 -0
  187. data/{Gosu → include/Gosu}/Timing.hpp +0 -0
  188. data/{Gosu → include/Gosu}/Utility.hpp +1 -1
  189. data/{Gosu → include/Gosu}/Version.hpp +0 -0
  190. data/{Gosu → include/Gosu}/Window.h +2 -0
  191. data/{Gosu → include/Gosu}/Window.hpp +21 -13
  192. data/lib/OpenAL32.dll +0 -0
  193. data/lib/SDL2.dll +0 -0
  194. data/lib/gosu.rb +0 -3
  195. data/lib/gosu/patches.rb +0 -9
  196. data/lib/gosu/swig_patches.rb +3 -2
  197. data/lib/libmpg123.dll +0 -0
  198. data/lib/libsndfile.dll +0 -0
  199. data/lib64/OpenAL32.dll +0 -0
  200. data/lib64/SDL2.dll +0 -0
  201. data/lib64/libmpg123.dll +0 -0
  202. data/lib64/libsndfile.dll +0 -0
  203. data/rdoc/gosu.rb +95 -20
  204. data/src/Audio.cpp +50 -224
  205. data/src/AudioFile.hpp +17 -37
  206. data/src/AudioFileAudioToolbox.cpp +237 -0
  207. data/src/AudioFileSDLSound.cpp +147 -0
  208. data/src/AudioImpl.cpp +3 -12
  209. data/src/AudioImpl.hpp +3 -1
  210. data/src/Bitmap.cpp +85 -83
  211. data/src/BitmapIO.cpp +52 -58
  212. data/src/Constants.cpp +80 -33
  213. data/src/Font.cpp +3 -1
  214. data/src/GosuWrapper.cpp +19 -0
  215. data/src/Graphics.cpp +7 -4
  216. data/src/Image.cpp +13 -16
  217. data/src/Input.cpp +408 -159
  218. data/src/LargeImageData.cpp +1 -1
  219. data/src/MarkupParser.cpp +2 -1
  220. data/src/RubyGosu.cxx +349 -83
  221. data/src/RubyGosu.h +4 -2
  222. data/src/TexChunk.cpp +1 -1
  223. data/src/TextBuilder.cpp +3 -1
  224. data/src/Texture.cpp +1 -1
  225. data/src/TrueTypeFont.cpp +1 -1
  226. data/src/Utility.cpp +11 -7
  227. data/src/Window.cpp +30 -39
  228. data/src/WindowWrapper.cpp +28 -0
  229. metadata +207 -52
  230. data/Gosu/Bitmap.hpp +0 -113
  231. data/src/AudioToolboxFile.hpp +0 -210
  232. data/src/OggFile.hpp +0 -92
  233. data/src/SndFile.hpp +0 -174
  234. data/src/WinMain.cpp +0 -64
@@ -0,0 +1,2 @@
1
+ #define SDL_REVISION "hg-14525:e52d96ea04fc"
2
+ #define SDL_REVISION_NUMBER 14525
@@ -0,0 +1,283 @@
1
+ /*
2
+ Simple DirectMedia Layer
3
+ Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
4
+
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.
8
+
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:
12
+
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.
20
+ */
21
+
22
+ /**
23
+ * \file SDL_rwops.h
24
+ *
25
+ * This file provides a general interface for SDL to read and write
26
+ * data streams. It can easily be extended to files, memory, etc.
27
+ */
28
+
29
+ #ifndef SDL_rwops_h_
30
+ #define SDL_rwops_h_
31
+
32
+ #include "SDL_stdinc.h"
33
+ #include "SDL_error.h"
34
+
35
+ #include "begin_code.h"
36
+ /* Set up for C function definitions, even when using C++ */
37
+ #ifdef __cplusplus
38
+ extern "C" {
39
+ #endif
40
+
41
+ /* RWops Types */
42
+ #define SDL_RWOPS_UNKNOWN 0U /**< Unknown stream type */
43
+ #define SDL_RWOPS_WINFILE 1U /**< Win32 file */
44
+ #define SDL_RWOPS_STDFILE 2U /**< Stdio file */
45
+ #define SDL_RWOPS_JNIFILE 3U /**< Android asset */
46
+ #define SDL_RWOPS_MEMORY 4U /**< Memory stream */
47
+ #define SDL_RWOPS_MEMORY_RO 5U /**< Read-Only memory stream */
48
+
49
+ /**
50
+ * This is the read/write operation structure -- very basic.
51
+ */
52
+ typedef struct SDL_RWops
53
+ {
54
+ /**
55
+ * Return the size of the file in this rwops, or -1 if unknown
56
+ */
57
+ Sint64 (SDLCALL * size) (struct SDL_RWops * context);
58
+
59
+ /**
60
+ * Seek to \c offset relative to \c whence, one of stdio's whence values:
61
+ * RW_SEEK_SET, RW_SEEK_CUR, RW_SEEK_END
62
+ *
63
+ * \return the final offset in the data stream, or -1 on error.
64
+ */
65
+ Sint64 (SDLCALL * seek) (struct SDL_RWops * context, Sint64 offset,
66
+ int whence);
67
+
68
+ /**
69
+ * Read up to \c maxnum objects each of size \c size from the data
70
+ * stream to the area pointed at by \c ptr.
71
+ *
72
+ * \return the number of objects read, or 0 at error or end of file.
73
+ */
74
+ size_t (SDLCALL * read) (struct SDL_RWops * context, void *ptr,
75
+ size_t size, size_t maxnum);
76
+
77
+ /**
78
+ * Write exactly \c num objects each of size \c size from the area
79
+ * pointed at by \c ptr to data stream.
80
+ *
81
+ * \return the number of objects written, or 0 at error or end of file.
82
+ */
83
+ size_t (SDLCALL * write) (struct SDL_RWops * context, const void *ptr,
84
+ size_t size, size_t num);
85
+
86
+ /**
87
+ * Close and free an allocated SDL_RWops structure.
88
+ *
89
+ * \return 0 if successful or -1 on write error when flushing data.
90
+ */
91
+ int (SDLCALL * close) (struct SDL_RWops * context);
92
+
93
+ Uint32 type;
94
+ union
95
+ {
96
+ #if defined(__ANDROID__)
97
+ struct
98
+ {
99
+ void *asset;
100
+ } androidio;
101
+ #elif defined(__WIN32__)
102
+ struct
103
+ {
104
+ SDL_bool append;
105
+ void *h;
106
+ struct
107
+ {
108
+ void *data;
109
+ size_t size;
110
+ size_t left;
111
+ } buffer;
112
+ } windowsio;
113
+ #endif
114
+
115
+ #ifdef HAVE_STDIO_H
116
+ struct
117
+ {
118
+ SDL_bool autoclose;
119
+ FILE *fp;
120
+ } stdio;
121
+ #endif
122
+ struct
123
+ {
124
+ Uint8 *base;
125
+ Uint8 *here;
126
+ Uint8 *stop;
127
+ } mem;
128
+ struct
129
+ {
130
+ void *data1;
131
+ void *data2;
132
+ } unknown;
133
+ } hidden;
134
+
135
+ } SDL_RWops;
136
+
137
+
138
+ /**
139
+ * \name RWFrom functions
140
+ *
141
+ * Functions to create SDL_RWops structures from various data streams.
142
+ */
143
+ /* @{ */
144
+
145
+ extern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromFile(const char *file,
146
+ const char *mode);
147
+
148
+ #ifdef HAVE_STDIO_H
149
+ extern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromFP(FILE * fp,
150
+ SDL_bool autoclose);
151
+ #else
152
+ extern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromFP(void * fp,
153
+ SDL_bool autoclose);
154
+ #endif
155
+
156
+ extern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromMem(void *mem, int size);
157
+ extern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromConstMem(const void *mem,
158
+ int size);
159
+
160
+ /* @} *//* RWFrom functions */
161
+
162
+
163
+ extern DECLSPEC SDL_RWops *SDLCALL SDL_AllocRW(void);
164
+ extern DECLSPEC void SDLCALL SDL_FreeRW(SDL_RWops * area);
165
+
166
+ #define RW_SEEK_SET 0 /**< Seek from the beginning of data */
167
+ #define RW_SEEK_CUR 1 /**< Seek relative to current read point */
168
+ #define RW_SEEK_END 2 /**< Seek relative to the end of data */
169
+
170
+ /**
171
+ * Return the size of the file in this rwops, or -1 if unknown
172
+ */
173
+ extern DECLSPEC Sint64 SDLCALL SDL_RWsize(SDL_RWops *context);
174
+
175
+ /**
176
+ * Seek to \c offset relative to \c whence, one of stdio's whence values:
177
+ * RW_SEEK_SET, RW_SEEK_CUR, RW_SEEK_END
178
+ *
179
+ * \return the final offset in the data stream, or -1 on error.
180
+ */
181
+ extern DECLSPEC Sint64 SDLCALL SDL_RWseek(SDL_RWops *context,
182
+ Sint64 offset, int whence);
183
+
184
+ /**
185
+ * Return the current offset in the data stream, or -1 on error.
186
+ */
187
+ extern DECLSPEC Sint64 SDLCALL SDL_RWtell(SDL_RWops *context);
188
+
189
+ /**
190
+ * Read up to \c maxnum objects each of size \c size from the data
191
+ * stream to the area pointed at by \c ptr.
192
+ *
193
+ * \return the number of objects read, or 0 at error or end of file.
194
+ */
195
+ extern DECLSPEC size_t SDLCALL SDL_RWread(SDL_RWops *context,
196
+ void *ptr, size_t size, size_t maxnum);
197
+
198
+ /**
199
+ * Write exactly \c num objects each of size \c size from the area
200
+ * pointed at by \c ptr to data stream.
201
+ *
202
+ * \return the number of objects written, or 0 at error or end of file.
203
+ */
204
+ extern DECLSPEC size_t SDLCALL SDL_RWwrite(SDL_RWops *context,
205
+ const void *ptr, size_t size, size_t num);
206
+
207
+ /**
208
+ * Close and free an allocated SDL_RWops structure.
209
+ *
210
+ * \return 0 if successful or -1 on write error when flushing data.
211
+ */
212
+ extern DECLSPEC int SDLCALL SDL_RWclose(SDL_RWops *context);
213
+
214
+ /**
215
+ * Load all the data from an SDL data stream.
216
+ *
217
+ * The data is allocated with a zero byte at the end (null terminated)
218
+ *
219
+ * If \c datasize is not NULL, it is filled with the size of the data read.
220
+ *
221
+ * If \c freesrc is non-zero, the stream will be closed after being read.
222
+ *
223
+ * The data should be freed with SDL_free().
224
+ *
225
+ * \return the data, or NULL if there was an error.
226
+ */
227
+ extern DECLSPEC void *SDLCALL SDL_LoadFile_RW(SDL_RWops * src, size_t *datasize,
228
+ int freesrc);
229
+
230
+ /**
231
+ * Load an entire file.
232
+ *
233
+ * The data is allocated with a zero byte at the end (null terminated)
234
+ *
235
+ * If \c datasize is not NULL, it is filled with the size of the data read.
236
+ *
237
+ * If \c freesrc is non-zero, the stream will be closed after being read.
238
+ *
239
+ * The data should be freed with SDL_free().
240
+ *
241
+ * \return the data, or NULL if there was an error.
242
+ */
243
+ extern DECLSPEC void *SDLCALL SDL_LoadFile(const char *file, size_t *datasize);
244
+
245
+ /**
246
+ * \name Read endian functions
247
+ *
248
+ * Read an item of the specified endianness and return in native format.
249
+ */
250
+ /* @{ */
251
+ extern DECLSPEC Uint8 SDLCALL SDL_ReadU8(SDL_RWops * src);
252
+ extern DECLSPEC Uint16 SDLCALL SDL_ReadLE16(SDL_RWops * src);
253
+ extern DECLSPEC Uint16 SDLCALL SDL_ReadBE16(SDL_RWops * src);
254
+ extern DECLSPEC Uint32 SDLCALL SDL_ReadLE32(SDL_RWops * src);
255
+ extern DECLSPEC Uint32 SDLCALL SDL_ReadBE32(SDL_RWops * src);
256
+ extern DECLSPEC Uint64 SDLCALL SDL_ReadLE64(SDL_RWops * src);
257
+ extern DECLSPEC Uint64 SDLCALL SDL_ReadBE64(SDL_RWops * src);
258
+ /* @} *//* Read endian functions */
259
+
260
+ /**
261
+ * \name Write endian functions
262
+ *
263
+ * Write an item of native format to the specified endianness.
264
+ */
265
+ /* @{ */
266
+ extern DECLSPEC size_t SDLCALL SDL_WriteU8(SDL_RWops * dst, Uint8 value);
267
+ extern DECLSPEC size_t SDLCALL SDL_WriteLE16(SDL_RWops * dst, Uint16 value);
268
+ extern DECLSPEC size_t SDLCALL SDL_WriteBE16(SDL_RWops * dst, Uint16 value);
269
+ extern DECLSPEC size_t SDLCALL SDL_WriteLE32(SDL_RWops * dst, Uint32 value);
270
+ extern DECLSPEC size_t SDLCALL SDL_WriteBE32(SDL_RWops * dst, Uint32 value);
271
+ extern DECLSPEC size_t SDLCALL SDL_WriteLE64(SDL_RWops * dst, Uint64 value);
272
+ extern DECLSPEC size_t SDLCALL SDL_WriteBE64(SDL_RWops * dst, Uint64 value);
273
+ /* @} *//* Write endian functions */
274
+
275
+ /* Ends C function definitions when using C++ */
276
+ #ifdef __cplusplus
277
+ }
278
+ #endif
279
+ #include "close_code.h"
280
+
281
+ #endif /* SDL_rwops_h_ */
282
+
283
+ /* vi: set ts=4 sw=4 expandtab: */
@@ -0,0 +1,413 @@
1
+ /*
2
+ Simple DirectMedia Layer
3
+ Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
4
+
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.
8
+
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:
12
+
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.
20
+ */
21
+
22
+ /**
23
+ * \file SDL_scancode.h
24
+ *
25
+ * Defines keyboard scancodes.
26
+ */
27
+
28
+ #ifndef SDL_scancode_h_
29
+ #define SDL_scancode_h_
30
+
31
+ #include "SDL_stdinc.h"
32
+
33
+ /**
34
+ * \brief The SDL keyboard scancode representation.
35
+ *
36
+ * Values of this type are used to represent keyboard keys, among other places
37
+ * in the \link SDL_Keysym::scancode key.keysym.scancode \endlink field of the
38
+ * SDL_Event structure.
39
+ *
40
+ * The values in this enumeration are based on the USB usage page standard:
41
+ * https://www.usb.org/sites/default/files/documents/hut1_12v2.pdf
42
+ */
43
+ typedef enum
44
+ {
45
+ SDL_SCANCODE_UNKNOWN = 0,
46
+
47
+ /**
48
+ * \name Usage page 0x07
49
+ *
50
+ * These values are from usage page 0x07 (USB keyboard page).
51
+ */
52
+ /* @{ */
53
+
54
+ SDL_SCANCODE_A = 4,
55
+ SDL_SCANCODE_B = 5,
56
+ SDL_SCANCODE_C = 6,
57
+ SDL_SCANCODE_D = 7,
58
+ SDL_SCANCODE_E = 8,
59
+ SDL_SCANCODE_F = 9,
60
+ SDL_SCANCODE_G = 10,
61
+ SDL_SCANCODE_H = 11,
62
+ SDL_SCANCODE_I = 12,
63
+ SDL_SCANCODE_J = 13,
64
+ SDL_SCANCODE_K = 14,
65
+ SDL_SCANCODE_L = 15,
66
+ SDL_SCANCODE_M = 16,
67
+ SDL_SCANCODE_N = 17,
68
+ SDL_SCANCODE_O = 18,
69
+ SDL_SCANCODE_P = 19,
70
+ SDL_SCANCODE_Q = 20,
71
+ SDL_SCANCODE_R = 21,
72
+ SDL_SCANCODE_S = 22,
73
+ SDL_SCANCODE_T = 23,
74
+ SDL_SCANCODE_U = 24,
75
+ SDL_SCANCODE_V = 25,
76
+ SDL_SCANCODE_W = 26,
77
+ SDL_SCANCODE_X = 27,
78
+ SDL_SCANCODE_Y = 28,
79
+ SDL_SCANCODE_Z = 29,
80
+
81
+ SDL_SCANCODE_1 = 30,
82
+ SDL_SCANCODE_2 = 31,
83
+ SDL_SCANCODE_3 = 32,
84
+ SDL_SCANCODE_4 = 33,
85
+ SDL_SCANCODE_5 = 34,
86
+ SDL_SCANCODE_6 = 35,
87
+ SDL_SCANCODE_7 = 36,
88
+ SDL_SCANCODE_8 = 37,
89
+ SDL_SCANCODE_9 = 38,
90
+ SDL_SCANCODE_0 = 39,
91
+
92
+ SDL_SCANCODE_RETURN = 40,
93
+ SDL_SCANCODE_ESCAPE = 41,
94
+ SDL_SCANCODE_BACKSPACE = 42,
95
+ SDL_SCANCODE_TAB = 43,
96
+ SDL_SCANCODE_SPACE = 44,
97
+
98
+ SDL_SCANCODE_MINUS = 45,
99
+ SDL_SCANCODE_EQUALS = 46,
100
+ SDL_SCANCODE_LEFTBRACKET = 47,
101
+ SDL_SCANCODE_RIGHTBRACKET = 48,
102
+ SDL_SCANCODE_BACKSLASH = 49, /**< Located at the lower left of the return
103
+ * key on ISO keyboards and at the right end
104
+ * of the QWERTY row on ANSI keyboards.
105
+ * Produces REVERSE SOLIDUS (backslash) and
106
+ * VERTICAL LINE in a US layout, REVERSE
107
+ * SOLIDUS and VERTICAL LINE in a UK Mac
108
+ * layout, NUMBER SIGN and TILDE in a UK
109
+ * Windows layout, DOLLAR SIGN and POUND SIGN
110
+ * in a Swiss German layout, NUMBER SIGN and
111
+ * APOSTROPHE in a German layout, GRAVE
112
+ * ACCENT and POUND SIGN in a French Mac
113
+ * layout, and ASTERISK and MICRO SIGN in a
114
+ * French Windows layout.
115
+ */
116
+ SDL_SCANCODE_NONUSHASH = 50, /**< ISO USB keyboards actually use this code
117
+ * instead of 49 for the same key, but all
118
+ * OSes I've seen treat the two codes
119
+ * identically. So, as an implementor, unless
120
+ * your keyboard generates both of those
121
+ * codes and your OS treats them differently,
122
+ * you should generate SDL_SCANCODE_BACKSLASH
123
+ * instead of this code. As a user, you
124
+ * should not rely on this code because SDL
125
+ * will never generate it with most (all?)
126
+ * keyboards.
127
+ */
128
+ SDL_SCANCODE_SEMICOLON = 51,
129
+ SDL_SCANCODE_APOSTROPHE = 52,
130
+ SDL_SCANCODE_GRAVE = 53, /**< Located in the top left corner (on both ANSI
131
+ * and ISO keyboards). Produces GRAVE ACCENT and
132
+ * TILDE in a US Windows layout and in US and UK
133
+ * Mac layouts on ANSI keyboards, GRAVE ACCENT
134
+ * and NOT SIGN in a UK Windows layout, SECTION
135
+ * SIGN and PLUS-MINUS SIGN in US and UK Mac
136
+ * layouts on ISO keyboards, SECTION SIGN and
137
+ * DEGREE SIGN in a Swiss German layout (Mac:
138
+ * only on ISO keyboards), CIRCUMFLEX ACCENT and
139
+ * DEGREE SIGN in a German layout (Mac: only on
140
+ * ISO keyboards), SUPERSCRIPT TWO and TILDE in a
141
+ * French Windows layout, COMMERCIAL AT and
142
+ * NUMBER SIGN in a French Mac layout on ISO
143
+ * keyboards, and LESS-THAN SIGN and GREATER-THAN
144
+ * SIGN in a Swiss German, German, or French Mac
145
+ * layout on ANSI keyboards.
146
+ */
147
+ SDL_SCANCODE_COMMA = 54,
148
+ SDL_SCANCODE_PERIOD = 55,
149
+ SDL_SCANCODE_SLASH = 56,
150
+
151
+ SDL_SCANCODE_CAPSLOCK = 57,
152
+
153
+ SDL_SCANCODE_F1 = 58,
154
+ SDL_SCANCODE_F2 = 59,
155
+ SDL_SCANCODE_F3 = 60,
156
+ SDL_SCANCODE_F4 = 61,
157
+ SDL_SCANCODE_F5 = 62,
158
+ SDL_SCANCODE_F6 = 63,
159
+ SDL_SCANCODE_F7 = 64,
160
+ SDL_SCANCODE_F8 = 65,
161
+ SDL_SCANCODE_F9 = 66,
162
+ SDL_SCANCODE_F10 = 67,
163
+ SDL_SCANCODE_F11 = 68,
164
+ SDL_SCANCODE_F12 = 69,
165
+
166
+ SDL_SCANCODE_PRINTSCREEN = 70,
167
+ SDL_SCANCODE_SCROLLLOCK = 71,
168
+ SDL_SCANCODE_PAUSE = 72,
169
+ SDL_SCANCODE_INSERT = 73, /**< insert on PC, help on some Mac keyboards (but
170
+ does send code 73, not 117) */
171
+ SDL_SCANCODE_HOME = 74,
172
+ SDL_SCANCODE_PAGEUP = 75,
173
+ SDL_SCANCODE_DELETE = 76,
174
+ SDL_SCANCODE_END = 77,
175
+ SDL_SCANCODE_PAGEDOWN = 78,
176
+ SDL_SCANCODE_RIGHT = 79,
177
+ SDL_SCANCODE_LEFT = 80,
178
+ SDL_SCANCODE_DOWN = 81,
179
+ SDL_SCANCODE_UP = 82,
180
+
181
+ SDL_SCANCODE_NUMLOCKCLEAR = 83, /**< num lock on PC, clear on Mac keyboards
182
+ */
183
+ SDL_SCANCODE_KP_DIVIDE = 84,
184
+ SDL_SCANCODE_KP_MULTIPLY = 85,
185
+ SDL_SCANCODE_KP_MINUS = 86,
186
+ SDL_SCANCODE_KP_PLUS = 87,
187
+ SDL_SCANCODE_KP_ENTER = 88,
188
+ SDL_SCANCODE_KP_1 = 89,
189
+ SDL_SCANCODE_KP_2 = 90,
190
+ SDL_SCANCODE_KP_3 = 91,
191
+ SDL_SCANCODE_KP_4 = 92,
192
+ SDL_SCANCODE_KP_5 = 93,
193
+ SDL_SCANCODE_KP_6 = 94,
194
+ SDL_SCANCODE_KP_7 = 95,
195
+ SDL_SCANCODE_KP_8 = 96,
196
+ SDL_SCANCODE_KP_9 = 97,
197
+ SDL_SCANCODE_KP_0 = 98,
198
+ SDL_SCANCODE_KP_PERIOD = 99,
199
+
200
+ SDL_SCANCODE_NONUSBACKSLASH = 100, /**< This is the additional key that ISO
201
+ * keyboards have over ANSI ones,
202
+ * located between left shift and Y.
203
+ * Produces GRAVE ACCENT and TILDE in a
204
+ * US or UK Mac layout, REVERSE SOLIDUS
205
+ * (backslash) and VERTICAL LINE in a
206
+ * US or UK Windows layout, and
207
+ * LESS-THAN SIGN and GREATER-THAN SIGN
208
+ * in a Swiss German, German, or French
209
+ * layout. */
210
+ SDL_SCANCODE_APPLICATION = 101, /**< windows contextual menu, compose */
211
+ SDL_SCANCODE_POWER = 102, /**< The USB document says this is a status flag,
212
+ * not a physical key - but some Mac keyboards
213
+ * do have a power key. */
214
+ SDL_SCANCODE_KP_EQUALS = 103,
215
+ SDL_SCANCODE_F13 = 104,
216
+ SDL_SCANCODE_F14 = 105,
217
+ SDL_SCANCODE_F15 = 106,
218
+ SDL_SCANCODE_F16 = 107,
219
+ SDL_SCANCODE_F17 = 108,
220
+ SDL_SCANCODE_F18 = 109,
221
+ SDL_SCANCODE_F19 = 110,
222
+ SDL_SCANCODE_F20 = 111,
223
+ SDL_SCANCODE_F21 = 112,
224
+ SDL_SCANCODE_F22 = 113,
225
+ SDL_SCANCODE_F23 = 114,
226
+ SDL_SCANCODE_F24 = 115,
227
+ SDL_SCANCODE_EXECUTE = 116,
228
+ SDL_SCANCODE_HELP = 117,
229
+ SDL_SCANCODE_MENU = 118,
230
+ SDL_SCANCODE_SELECT = 119,
231
+ SDL_SCANCODE_STOP = 120,
232
+ SDL_SCANCODE_AGAIN = 121, /**< redo */
233
+ SDL_SCANCODE_UNDO = 122,
234
+ SDL_SCANCODE_CUT = 123,
235
+ SDL_SCANCODE_COPY = 124,
236
+ SDL_SCANCODE_PASTE = 125,
237
+ SDL_SCANCODE_FIND = 126,
238
+ SDL_SCANCODE_MUTE = 127,
239
+ SDL_SCANCODE_VOLUMEUP = 128,
240
+ SDL_SCANCODE_VOLUMEDOWN = 129,
241
+ /* not sure whether there's a reason to enable these */
242
+ /* SDL_SCANCODE_LOCKINGCAPSLOCK = 130, */
243
+ /* SDL_SCANCODE_LOCKINGNUMLOCK = 131, */
244
+ /* SDL_SCANCODE_LOCKINGSCROLLLOCK = 132, */
245
+ SDL_SCANCODE_KP_COMMA = 133,
246
+ SDL_SCANCODE_KP_EQUALSAS400 = 134,
247
+
248
+ SDL_SCANCODE_INTERNATIONAL1 = 135, /**< used on Asian keyboards, see
249
+ footnotes in USB doc */
250
+ SDL_SCANCODE_INTERNATIONAL2 = 136,
251
+ SDL_SCANCODE_INTERNATIONAL3 = 137, /**< Yen */
252
+ SDL_SCANCODE_INTERNATIONAL4 = 138,
253
+ SDL_SCANCODE_INTERNATIONAL5 = 139,
254
+ SDL_SCANCODE_INTERNATIONAL6 = 140,
255
+ SDL_SCANCODE_INTERNATIONAL7 = 141,
256
+ SDL_SCANCODE_INTERNATIONAL8 = 142,
257
+ SDL_SCANCODE_INTERNATIONAL9 = 143,
258
+ SDL_SCANCODE_LANG1 = 144, /**< Hangul/English toggle */
259
+ SDL_SCANCODE_LANG2 = 145, /**< Hanja conversion */
260
+ SDL_SCANCODE_LANG3 = 146, /**< Katakana */
261
+ SDL_SCANCODE_LANG4 = 147, /**< Hiragana */
262
+ SDL_SCANCODE_LANG5 = 148, /**< Zenkaku/Hankaku */
263
+ SDL_SCANCODE_LANG6 = 149, /**< reserved */
264
+ SDL_SCANCODE_LANG7 = 150, /**< reserved */
265
+ SDL_SCANCODE_LANG8 = 151, /**< reserved */
266
+ SDL_SCANCODE_LANG9 = 152, /**< reserved */
267
+
268
+ SDL_SCANCODE_ALTERASE = 153, /**< Erase-Eaze */
269
+ SDL_SCANCODE_SYSREQ = 154,
270
+ SDL_SCANCODE_CANCEL = 155,
271
+ SDL_SCANCODE_CLEAR = 156,
272
+ SDL_SCANCODE_PRIOR = 157,
273
+ SDL_SCANCODE_RETURN2 = 158,
274
+ SDL_SCANCODE_SEPARATOR = 159,
275
+ SDL_SCANCODE_OUT = 160,
276
+ SDL_SCANCODE_OPER = 161,
277
+ SDL_SCANCODE_CLEARAGAIN = 162,
278
+ SDL_SCANCODE_CRSEL = 163,
279
+ SDL_SCANCODE_EXSEL = 164,
280
+
281
+ SDL_SCANCODE_KP_00 = 176,
282
+ SDL_SCANCODE_KP_000 = 177,
283
+ SDL_SCANCODE_THOUSANDSSEPARATOR = 178,
284
+ SDL_SCANCODE_DECIMALSEPARATOR = 179,
285
+ SDL_SCANCODE_CURRENCYUNIT = 180,
286
+ SDL_SCANCODE_CURRENCYSUBUNIT = 181,
287
+ SDL_SCANCODE_KP_LEFTPAREN = 182,
288
+ SDL_SCANCODE_KP_RIGHTPAREN = 183,
289
+ SDL_SCANCODE_KP_LEFTBRACE = 184,
290
+ SDL_SCANCODE_KP_RIGHTBRACE = 185,
291
+ SDL_SCANCODE_KP_TAB = 186,
292
+ SDL_SCANCODE_KP_BACKSPACE = 187,
293
+ SDL_SCANCODE_KP_A = 188,
294
+ SDL_SCANCODE_KP_B = 189,
295
+ SDL_SCANCODE_KP_C = 190,
296
+ SDL_SCANCODE_KP_D = 191,
297
+ SDL_SCANCODE_KP_E = 192,
298
+ SDL_SCANCODE_KP_F = 193,
299
+ SDL_SCANCODE_KP_XOR = 194,
300
+ SDL_SCANCODE_KP_POWER = 195,
301
+ SDL_SCANCODE_KP_PERCENT = 196,
302
+ SDL_SCANCODE_KP_LESS = 197,
303
+ SDL_SCANCODE_KP_GREATER = 198,
304
+ SDL_SCANCODE_KP_AMPERSAND = 199,
305
+ SDL_SCANCODE_KP_DBLAMPERSAND = 200,
306
+ SDL_SCANCODE_KP_VERTICALBAR = 201,
307
+ SDL_SCANCODE_KP_DBLVERTICALBAR = 202,
308
+ SDL_SCANCODE_KP_COLON = 203,
309
+ SDL_SCANCODE_KP_HASH = 204,
310
+ SDL_SCANCODE_KP_SPACE = 205,
311
+ SDL_SCANCODE_KP_AT = 206,
312
+ SDL_SCANCODE_KP_EXCLAM = 207,
313
+ SDL_SCANCODE_KP_MEMSTORE = 208,
314
+ SDL_SCANCODE_KP_MEMRECALL = 209,
315
+ SDL_SCANCODE_KP_MEMCLEAR = 210,
316
+ SDL_SCANCODE_KP_MEMADD = 211,
317
+ SDL_SCANCODE_KP_MEMSUBTRACT = 212,
318
+ SDL_SCANCODE_KP_MEMMULTIPLY = 213,
319
+ SDL_SCANCODE_KP_MEMDIVIDE = 214,
320
+ SDL_SCANCODE_KP_PLUSMINUS = 215,
321
+ SDL_SCANCODE_KP_CLEAR = 216,
322
+ SDL_SCANCODE_KP_CLEARENTRY = 217,
323
+ SDL_SCANCODE_KP_BINARY = 218,
324
+ SDL_SCANCODE_KP_OCTAL = 219,
325
+ SDL_SCANCODE_KP_DECIMAL = 220,
326
+ SDL_SCANCODE_KP_HEXADECIMAL = 221,
327
+
328
+ SDL_SCANCODE_LCTRL = 224,
329
+ SDL_SCANCODE_LSHIFT = 225,
330
+ SDL_SCANCODE_LALT = 226, /**< alt, option */
331
+ SDL_SCANCODE_LGUI = 227, /**< windows, command (apple), meta */
332
+ SDL_SCANCODE_RCTRL = 228,
333
+ SDL_SCANCODE_RSHIFT = 229,
334
+ SDL_SCANCODE_RALT = 230, /**< alt gr, option */
335
+ SDL_SCANCODE_RGUI = 231, /**< windows, command (apple), meta */
336
+
337
+ SDL_SCANCODE_MODE = 257, /**< I'm not sure if this is really not covered
338
+ * by any of the above, but since there's a
339
+ * special KMOD_MODE for it I'm adding it here
340
+ */
341
+
342
+ /* @} *//* Usage page 0x07 */
343
+
344
+ /**
345
+ * \name Usage page 0x0C
346
+ *
347
+ * These values are mapped from usage page 0x0C (USB consumer page).
348
+ */
349
+ /* @{ */
350
+
351
+ SDL_SCANCODE_AUDIONEXT = 258,
352
+ SDL_SCANCODE_AUDIOPREV = 259,
353
+ SDL_SCANCODE_AUDIOSTOP = 260,
354
+ SDL_SCANCODE_AUDIOPLAY = 261,
355
+ SDL_SCANCODE_AUDIOMUTE = 262,
356
+ SDL_SCANCODE_MEDIASELECT = 263,
357
+ SDL_SCANCODE_WWW = 264,
358
+ SDL_SCANCODE_MAIL = 265,
359
+ SDL_SCANCODE_CALCULATOR = 266,
360
+ SDL_SCANCODE_COMPUTER = 267,
361
+ SDL_SCANCODE_AC_SEARCH = 268,
362
+ SDL_SCANCODE_AC_HOME = 269,
363
+ SDL_SCANCODE_AC_BACK = 270,
364
+ SDL_SCANCODE_AC_FORWARD = 271,
365
+ SDL_SCANCODE_AC_STOP = 272,
366
+ SDL_SCANCODE_AC_REFRESH = 273,
367
+ SDL_SCANCODE_AC_BOOKMARKS = 274,
368
+
369
+ /* @} *//* Usage page 0x0C */
370
+
371
+ /**
372
+ * \name Walther keys
373
+ *
374
+ * These are values that Christian Walther added (for mac keyboard?).
375
+ */
376
+ /* @{ */
377
+
378
+ SDL_SCANCODE_BRIGHTNESSDOWN = 275,
379
+ SDL_SCANCODE_BRIGHTNESSUP = 276,
380
+ SDL_SCANCODE_DISPLAYSWITCH = 277, /**< display mirroring/dual display
381
+ switch, video mode switch */
382
+ SDL_SCANCODE_KBDILLUMTOGGLE = 278,
383
+ SDL_SCANCODE_KBDILLUMDOWN = 279,
384
+ SDL_SCANCODE_KBDILLUMUP = 280,
385
+ SDL_SCANCODE_EJECT = 281,
386
+ SDL_SCANCODE_SLEEP = 282,
387
+
388
+ SDL_SCANCODE_APP1 = 283,
389
+ SDL_SCANCODE_APP2 = 284,
390
+
391
+ /* @} *//* Walther keys */
392
+
393
+ /**
394
+ * \name Usage page 0x0C (additional media keys)
395
+ *
396
+ * These values are mapped from usage page 0x0C (USB consumer page).
397
+ */
398
+ /* @{ */
399
+
400
+ SDL_SCANCODE_AUDIOREWIND = 285,
401
+ SDL_SCANCODE_AUDIOFASTFORWARD = 286,
402
+
403
+ /* @} *//* Usage page 0x0C (additional media keys) */
404
+
405
+ /* Add any other keys here. */
406
+
407
+ SDL_NUM_SCANCODES = 512 /**< not a key, just marks the number of scancodes
408
+ for array bounds */
409
+ } SDL_Scancode;
410
+
411
+ #endif /* SDL_scancode_h_ */
412
+
413
+ /* vi: set ts=4 sw=4 expandtab: */