ruby2d 0.11.0 → 0.11.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (404) hide show
  1. checksums.yaml +4 -4
  2. data/assets/include/SDL2/SDL.h +108 -14
  3. data/assets/include/SDL2/SDL_assert.h +81 -50
  4. data/assets/include/SDL2/SDL_atomic.h +135 -35
  5. data/assets/include/SDL2/SDL_audio.h +960 -355
  6. data/assets/include/SDL2/SDL_bits.h +11 -6
  7. data/assets/include/SDL2/SDL_blendmode.h +91 -14
  8. data/assets/include/SDL2/SDL_clipboard.h +30 -7
  9. data/assets/include/SDL2/SDL_config.h +3 -1
  10. data/assets/include/SDL2/SDL_config_android.h +11 -1
  11. data/assets/include/SDL2/SDL_config_emscripten.h +216 -0
  12. data/assets/include/SDL2/SDL_config_iphoneos.h +9 -1
  13. data/assets/include/SDL2/SDL_config_macosx.h +16 -2
  14. data/assets/include/SDL2/SDL_config_minimal.h +4 -1
  15. data/assets/include/SDL2/SDL_config_os2.h +37 -20
  16. data/assets/include/SDL2/SDL_config_pandora.h +6 -1
  17. data/assets/include/SDL2/SDL_config_psp.h +8 -8
  18. data/assets/include/SDL2/SDL_config_windows.h +39 -22
  19. data/assets/include/SDL2/SDL_config_winrt.h +23 -8
  20. data/assets/include/SDL2/SDL_config_wiz.h +6 -1
  21. data/assets/include/SDL2/SDL_copying.h +1 -1
  22. data/assets/include/SDL2/SDL_cpuinfo.h +331 -71
  23. data/assets/include/SDL2/SDL_egl.h +906 -280
  24. data/assets/include/SDL2/SDL_endian.h +101 -47
  25. data/assets/include/SDL2/SDL_error.h +70 -19
  26. data/assets/include/SDL2/SDL_events.h +387 -79
  27. data/assets/include/SDL2/SDL_filesystem.h +73 -64
  28. data/assets/include/SDL2/SDL_gamecontroller.h +585 -125
  29. data/assets/include/SDL2/SDL_gesture.h +36 -6
  30. data/assets/include/SDL2/SDL_haptic.h +304 -210
  31. data/assets/include/SDL2/SDL_hidapi.h +451 -0
  32. data/assets/include/SDL2/SDL_hints.h +1286 -897
  33. data/assets/include/SDL2/SDL_joystick.h +577 -130
  34. data/assets/include/SDL2/SDL_keyboard.h +162 -63
  35. data/assets/include/SDL2/SDL_keycode.h +7 -5
  36. data/assets/include/SDL2/SDL_loadso.h +42 -8
  37. data/assets/include/SDL2/SDL_locale.h +34 -32
  38. data/assets/include/SDL2/SDL_log.h +212 -19
  39. data/assets/include/SDL2/SDL_main.h +72 -17
  40. data/assets/include/SDL2/SDL_messagebox.h +70 -23
  41. data/assets/include/SDL2/SDL_metal.h +27 -32
  42. data/assets/include/SDL2/SDL_misc.h +19 -15
  43. data/assets/include/SDL2/SDL_mouse.h +262 -110
  44. data/assets/include/SDL2/SDL_mutex.h +286 -66
  45. data/assets/include/SDL2/SDL_name.h +1 -1
  46. data/assets/include/SDL2/SDL_opengl.h +1 -1
  47. data/assets/include/SDL2/SDL_opengles.h +1 -1
  48. data/assets/include/SDL2/SDL_opengles2.h +2 -2
  49. data/assets/include/SDL2/SDL_pixels.h +199 -34
  50. data/assets/include/SDL2/SDL_platform.h +39 -2
  51. data/assets/include/SDL2/SDL_power.h +23 -10
  52. data/assets/include/SDL2/SDL_quit.h +1 -1
  53. data/assets/include/SDL2/SDL_rect.h +78 -28
  54. data/assets/include/SDL2/SDL_render.h +1204 -472
  55. data/assets/include/SDL2/SDL_revision.h +2 -2
  56. data/assets/include/SDL2/SDL_rwops.h +605 -33
  57. data/assets/include/SDL2/SDL_scancode.h +1 -1
  58. data/assets/include/SDL2/SDL_sensor.h +76 -42
  59. data/assets/include/SDL2/SDL_shape.h +38 -27
  60. data/assets/include/SDL2/SDL_stdinc.h +96 -24
  61. data/assets/include/SDL2/SDL_surface.h +571 -139
  62. data/assets/include/SDL2/SDL_system.h +339 -101
  63. data/assets/include/SDL2/SDL_syswm.h +50 -20
  64. data/assets/include/SDL2/SDL_test.h +1 -1
  65. data/assets/include/SDL2/SDL_test_assert.h +2 -2
  66. data/assets/include/SDL2/SDL_test_common.h +23 -6
  67. data/assets/include/SDL2/SDL_test_compare.h +1 -1
  68. data/assets/include/SDL2/SDL_test_crc32.h +1 -1
  69. data/assets/include/SDL2/SDL_test_font.h +3 -3
  70. data/assets/include/SDL2/SDL_test_fuzzer.h +28 -26
  71. data/assets/include/SDL2/SDL_test_harness.h +6 -6
  72. data/assets/include/SDL2/SDL_test_images.h +1 -1
  73. data/assets/include/SDL2/SDL_test_log.h +1 -1
  74. data/assets/include/SDL2/SDL_test_md5.h +1 -1
  75. data/assets/include/SDL2/SDL_test_memory.h +1 -1
  76. data/assets/include/SDL2/SDL_test_random.h +2 -2
  77. data/assets/include/SDL2/SDL_thread.h +226 -128
  78. data/assets/include/SDL2/SDL_timer.h +129 -22
  79. data/assets/include/SDL2/SDL_touch.h +48 -8
  80. data/assets/include/SDL2/SDL_ttf.h +102 -9
  81. data/assets/include/SDL2/SDL_types.h +1 -1
  82. data/assets/include/SDL2/SDL_version.h +72 -46
  83. data/assets/include/SDL2/SDL_video.h +1266 -460
  84. data/assets/include/SDL2/SDL_vulkan.h +100 -161
  85. data/assets/include/SDL2/begin_code.h +22 -1
  86. data/assets/include/SDL2/close_code.h +1 -1
  87. data/assets/include/mrbconf.h +234 -0
  88. data/assets/include/mruby/array.h +317 -0
  89. data/assets/include/mruby/boxing_nan.h +130 -0
  90. data/assets/include/mruby/boxing_no.h +58 -0
  91. data/assets/include/mruby/boxing_word.h +205 -0
  92. data/assets/include/mruby/class.h +108 -0
  93. data/assets/include/mruby/common.h +92 -0
  94. data/assets/include/mruby/compile.h +210 -0
  95. data/assets/include/mruby/data.h +76 -0
  96. data/assets/include/mruby/debug.h +66 -0
  97. data/assets/include/mruby/dump.h +158 -0
  98. data/assets/include/mruby/endian.h +44 -0
  99. data/assets/include/mruby/error.h +137 -0
  100. data/assets/include/mruby/gc.h +92 -0
  101. data/assets/include/mruby/hash.h +242 -0
  102. data/assets/include/mruby/irep.h +147 -0
  103. data/assets/include/mruby/istruct.h +50 -0
  104. data/assets/include/mruby/khash.h +284 -0
  105. data/assets/include/mruby/numeric.h +169 -0
  106. data/assets/include/mruby/object.h +43 -0
  107. data/assets/include/mruby/opcode.h +43 -0
  108. data/assets/include/mruby/ops.h +122 -0
  109. data/assets/include/mruby/presym/disable.h +70 -0
  110. data/assets/include/mruby/presym/enable.h +37 -0
  111. data/assets/include/mruby/presym/scanning.h +73 -0
  112. data/assets/include/mruby/presym.h +40 -0
  113. data/assets/include/mruby/proc.h +209 -0
  114. data/assets/include/mruby/range.h +79 -0
  115. data/assets/include/mruby/re.h +16 -0
  116. data/assets/include/mruby/string.h +469 -0
  117. data/assets/include/mruby/throw.h +66 -0
  118. data/assets/include/mruby/value.h +400 -0
  119. data/assets/include/mruby/variable.h +140 -0
  120. data/assets/include/mruby/version.h +143 -0
  121. data/assets/include/mruby.h +1444 -0
  122. data/assets/macos/universal/bin/mrbc +0 -0
  123. data/assets/macos/universal/lib/libFLAC.a +0 -0
  124. data/assets/macos/universal/lib/libSDL2.a +0 -0
  125. data/assets/macos/universal/lib/libSDL2_image.a +0 -0
  126. data/assets/macos/{lib → universal/lib}/libSDL2_mixer.a +0 -0
  127. data/assets/macos/universal/lib/libSDL2_ttf.a +0 -0
  128. data/assets/macos/universal/lib/libfreetype.a +0 -0
  129. data/assets/macos/universal/lib/libgraphite2.a +0 -0
  130. data/assets/macos/universal/lib/libharfbuzz.a +0 -0
  131. data/assets/macos/universal/lib/libjpeg.a +0 -0
  132. data/assets/macos/universal/lib/libmodplug.a +0 -0
  133. data/assets/macos/{lib → universal/lib}/libmpg123.a +0 -0
  134. data/assets/{mingw/lib/libSDL2.a → macos/universal/lib/libmruby.a} +0 -0
  135. data/assets/macos/{lib → universal/lib}/libogg.a +0 -0
  136. data/assets/macos/universal/lib/libpng16.a +0 -0
  137. data/assets/macos/universal/lib/libtiff.a +0 -0
  138. data/assets/macos/universal/lib/libvorbis.a +0 -0
  139. data/assets/macos/universal/lib/libvorbisfile.a +0 -0
  140. data/assets/macos/universal/lib/libwebp.a +0 -0
  141. data/assets/test_media/README.md +3 -0
  142. data/assets/test_media/bitstream_vera/COPYRIGHT.txt +124 -0
  143. data/assets/test_media/bitstream_vera/vera.ttf +0 -0
  144. data/assets/test_media/boom.png +0 -0
  145. data/assets/test_media/coin.png +0 -0
  146. data/assets/test_media/colors.png +0 -0
  147. data/assets/test_media/controller.png +0 -0
  148. data/assets/test_media/dial.wav +0 -0
  149. data/assets/test_media/hero.png +0 -0
  150. data/assets/test_media/image.bmp +0 -0
  151. data/assets/test_media/image.jpg +0 -0
  152. data/assets/test_media/image.png +0 -0
  153. data/assets/test_media/music.flac +0 -0
  154. data/assets/test_media/music.mp3 +0 -0
  155. data/assets/test_media/music.ogg +0 -0
  156. data/assets/test_media/music.wav +0 -0
  157. data/assets/test_media/originals/boom.pxm +0 -0
  158. data/assets/test_media/originals/coin.pxm +0 -0
  159. data/assets/test_media/originals/controller.sketch +0 -0
  160. data/assets/test_media/originals/hero.pxm +0 -0
  161. data/assets/test_media/originals/image.pxm +0 -0
  162. data/assets/test_media/originals/music.caf +0 -0
  163. data/assets/test_media/originals/texture_atlas.pxm +0 -0
  164. data/assets/test_media/rondo_alla_turka.ogg +0 -0
  165. data/assets/test_media/sound.flac +0 -0
  166. data/assets/test_media/sound.mp3 +0 -0
  167. data/assets/test_media/sound.ogg +0 -0
  168. data/assets/test_media/sound.wav +0 -0
  169. data/assets/test_media/sprite_sheet.png +0 -0
  170. data/assets/test_media/texture_atlas.png +0 -0
  171. data/assets/wasm/libmruby.a +0 -0
  172. data/assets/wasm/template.html +64 -0
  173. data/assets/windows/glew/README.md +10 -0
  174. data/assets/windows/glew/glew.h +23686 -0
  175. data/assets/{mingw/lib → windows/glew}/libglew32.a +0 -0
  176. data/assets/windows/mingw-w64-ucrt-x86_64/bin/mrbc.exe +0 -0
  177. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libFLAC.a +0 -0
  178. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libLerc.a +0 -0
  179. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libSDL2.a +0 -0
  180. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libSDL2_image.a +0 -0
  181. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libSDL2_mixer.a +0 -0
  182. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libSDL2_ttf.a +0 -0
  183. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libbrotlicommon.a +0 -0
  184. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libbrotlidec.a +0 -0
  185. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libbz2.a +0 -0
  186. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libdeflate.a +0 -0
  187. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libfreetype.a +0 -0
  188. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libglew32.a +0 -0
  189. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libgraphite2.a +0 -0
  190. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libharfbuzz.a +0 -0
  191. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libjbig.a +0 -0
  192. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libjpeg.a +0 -0
  193. data/assets/windows/mingw-w64-ucrt-x86_64/lib/liblzma.a +0 -0
  194. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libmodplug.a +0 -0
  195. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libmpg123.a +0 -0
  196. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libmruby.a +0 -0
  197. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libogg.a +0 -0
  198. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libopus.a +0 -0
  199. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libopusfile.a +0 -0
  200. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libpng16.a +0 -0
  201. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libsndfile.a +0 -0
  202. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libssp.a +0 -0
  203. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libstdc++.a +0 -0
  204. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libtiff.a +0 -0
  205. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libvorbis.a +0 -0
  206. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libvorbisfile.a +0 -0
  207. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libwebp.a +0 -0
  208. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libz.a +0 -0
  209. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libzstd.a +0 -0
  210. data/assets/windows/mingw-w64-x86_64/bin/mrbc.exe +0 -0
  211. data/assets/windows/mingw-w64-x86_64/lib/libFLAC.a +0 -0
  212. data/assets/windows/mingw-w64-x86_64/lib/libLerc.a +0 -0
  213. data/assets/windows/mingw-w64-x86_64/lib/libSDL2.a +0 -0
  214. data/assets/windows/mingw-w64-x86_64/lib/libSDL2_image.a +0 -0
  215. data/assets/windows/mingw-w64-x86_64/lib/libSDL2_mixer.a +0 -0
  216. data/assets/windows/mingw-w64-x86_64/lib/libSDL2_ttf.a +0 -0
  217. data/assets/windows/mingw-w64-x86_64/lib/libbrotlicommon.a +0 -0
  218. data/assets/windows/mingw-w64-x86_64/lib/libbrotlidec.a +0 -0
  219. data/assets/windows/mingw-w64-x86_64/lib/libbz2.a +0 -0
  220. data/assets/windows/mingw-w64-x86_64/lib/libdeflate.a +0 -0
  221. data/assets/windows/mingw-w64-x86_64/lib/libfreetype.a +0 -0
  222. data/assets/windows/mingw-w64-x86_64/lib/libglew32.a +0 -0
  223. data/assets/windows/mingw-w64-x86_64/lib/libgraphite2.a +0 -0
  224. data/assets/windows/mingw-w64-x86_64/lib/libharfbuzz.a +0 -0
  225. data/assets/windows/mingw-w64-x86_64/lib/libjbig.a +0 -0
  226. data/assets/windows/mingw-w64-x86_64/lib/libjpeg.a +0 -0
  227. data/assets/windows/mingw-w64-x86_64/lib/liblzma.a +0 -0
  228. data/assets/windows/mingw-w64-x86_64/lib/libmodplug.a +0 -0
  229. data/assets/windows/mingw-w64-x86_64/lib/libmpg123.a +0 -0
  230. data/assets/windows/mingw-w64-x86_64/lib/libmruby.a +0 -0
  231. data/assets/windows/mingw-w64-x86_64/lib/libogg.a +0 -0
  232. data/assets/windows/mingw-w64-x86_64/lib/libopus.a +0 -0
  233. data/assets/windows/mingw-w64-x86_64/lib/libopusfile.a +0 -0
  234. data/assets/windows/mingw-w64-x86_64/lib/libpng16.a +0 -0
  235. data/assets/windows/mingw-w64-x86_64/lib/libsndfile.a +0 -0
  236. data/assets/windows/mingw-w64-x86_64/lib/libssp.a +0 -0
  237. data/assets/windows/mingw-w64-x86_64/lib/libstdc++.a +0 -0
  238. data/assets/windows/mingw-w64-x86_64/lib/libtiff.a +0 -0
  239. data/assets/windows/mingw-w64-x86_64/lib/libvorbis.a +0 -0
  240. data/assets/windows/mingw-w64-x86_64/lib/libvorbisfile.a +0 -0
  241. data/assets/windows/mingw-w64-x86_64/lib/libwebp.a +0 -0
  242. data/assets/windows/mingw-w64-x86_64/lib/libz.a +0 -0
  243. data/assets/windows/mingw-w64-x86_64/lib/libzstd.a +0 -0
  244. data/assets/{ios → xcode/ios}/Assets.xcassets/AppIcon.appiconset/Contents.json +0 -0
  245. data/assets/{ios → xcode/ios}/Assets.xcassets/Contents.json +0 -0
  246. data/assets/{ios → xcode/ios}/Base.lproj/LaunchScreen.storyboard +0 -0
  247. data/assets/{ios → xcode/ios}/Info.plist +0 -0
  248. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mrbconf.h +0 -0
  249. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/array.h +0 -0
  250. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/boxing_nan.h +0 -0
  251. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/boxing_no.h +0 -0
  252. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/boxing_word.h +0 -0
  253. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/class.h +0 -0
  254. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/common.h +0 -0
  255. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/compile.h +0 -0
  256. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/data.h +0 -0
  257. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/debug.h +0 -0
  258. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/dump.h +0 -0
  259. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/error.h +0 -0
  260. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/gc.h +0 -0
  261. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/hash.h +0 -0
  262. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/irep.h +0 -0
  263. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/istruct.h +0 -0
  264. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/khash.h +0 -0
  265. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/numeric.h +0 -0
  266. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/object.h +0 -0
  267. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/opcode.h +0 -0
  268. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/ops.h +0 -0
  269. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/proc.h +0 -0
  270. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/range.h +0 -0
  271. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/re.h +0 -0
  272. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/string.h +0 -0
  273. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/throw.h +0 -0
  274. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/value.h +0 -0
  275. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/variable.h +0 -0
  276. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/version.h +0 -0
  277. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby.h +0 -0
  278. data/assets/{ios → xcode/ios}/MRuby.framework/Info.plist +0 -0
  279. data/assets/{ios → xcode/ios}/MRuby.framework/MRuby +0 -0
  280. data/assets/{ios → xcode/ios}/MyApp.xcodeproj/project.pbxproj +0 -0
  281. data/assets/{ios → xcode/ios}/MyApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -0
  282. data/assets/{ios → xcode/ios}/MyApp.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -0
  283. data/assets/{ios → xcode/ios}/MyApp.xcodeproj/project.xcworkspace/xcshareddata/MyApp.xcscmblueprint +0 -0
  284. data/assets/{ios → xcode/ios}/main.c +0 -0
  285. data/assets/{tvos → xcode/tvos}/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Content.imageset/Contents.json +0 -0
  286. data/assets/{tvos → xcode/tvos}/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Contents.json +0 -0
  287. data/assets/{tvos → xcode/tvos}/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Contents.json +0 -0
  288. data/assets/{tvos → xcode/tvos}/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Content.imageset/Contents.json +0 -0
  289. data/assets/{tvos → xcode/tvos}/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Contents.json +0 -0
  290. data/assets/{tvos → xcode/tvos}/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json +0 -0
  291. data/assets/{tvos → xcode/tvos}/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Middle.imagestacklayer/Contents.json +0 -0
  292. data/assets/{tvos → xcode/tvos}/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Content.imageset/Contents.json +0 -0
  293. data/assets/{tvos → xcode/tvos}/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Contents.json +0 -0
  294. data/assets/{tvos → xcode/tvos}/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Contents.json +0 -0
  295. data/assets/{tvos → xcode/tvos}/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Content.imageset/Contents.json +0 -0
  296. data/assets/{tvos → xcode/tvos}/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Contents.json +0 -0
  297. data/assets/{tvos → xcode/tvos}/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json +0 -0
  298. data/assets/{tvos → xcode/tvos}/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Contents.json +0 -0
  299. data/assets/{tvos → xcode/tvos}/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Contents.json +0 -0
  300. data/assets/{tvos → xcode/tvos}/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image Wide.imageset/Contents.json +0 -0
  301. data/assets/{tvos → xcode/tvos}/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image.imageset/Contents.json +0 -0
  302. data/assets/{tvos → xcode/tvos}/Assets.xcassets/Contents.json +0 -0
  303. data/assets/{tvos → xcode/tvos}/Assets.xcassets/LaunchImage.launchimage/Contents.json +0 -0
  304. data/assets/{tvos → xcode/tvos}/Info.plist +0 -0
  305. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mrbconf.h +0 -0
  306. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/array.h +0 -0
  307. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/boxing_nan.h +0 -0
  308. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/boxing_no.h +0 -0
  309. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/boxing_word.h +0 -0
  310. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/class.h +0 -0
  311. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/common.h +0 -0
  312. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/compile.h +0 -0
  313. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/data.h +0 -0
  314. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/debug.h +0 -0
  315. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/dump.h +0 -0
  316. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/error.h +0 -0
  317. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/gc.h +0 -0
  318. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/hash.h +0 -0
  319. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/irep.h +0 -0
  320. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/istruct.h +0 -0
  321. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/khash.h +0 -0
  322. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/numeric.h +0 -0
  323. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/object.h +0 -0
  324. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/opcode.h +0 -0
  325. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/ops.h +0 -0
  326. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/proc.h +0 -0
  327. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/range.h +0 -0
  328. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/re.h +0 -0
  329. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/string.h +0 -0
  330. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/throw.h +0 -0
  331. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/value.h +0 -0
  332. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/variable.h +0 -0
  333. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/version.h +0 -0
  334. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby.h +0 -0
  335. data/assets/{tvos → xcode/tvos}/MRuby.framework/Info.plist +0 -0
  336. data/assets/{tvos → xcode/tvos}/MRuby.framework/MRuby +0 -0
  337. data/assets/{tvos → xcode/tvos}/MyApp.xcodeproj/project.pbxproj +0 -0
  338. data/assets/{tvos → xcode/tvos}/MyApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -0
  339. data/assets/{tvos → xcode/tvos}/MyApp.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -0
  340. data/assets/{tvos → xcode/tvos}/MyApp.xcodeproj/project.xcworkspace/xcshareddata/MyApp.xcscmblueprint +0 -0
  341. data/assets/{tvos → xcode/tvos}/main.c +0 -0
  342. data/bin/ruby2d +3 -4
  343. data/ext/ruby2d/extconf.rb +44 -25
  344. data/ext/ruby2d/gl.c +1 -1
  345. data/ext/ruby2d/gl3.c +0 -1
  346. data/ext/ruby2d/gles.c +137 -84
  347. data/ext/ruby2d/ruby2d.c +126 -32
  348. data/ext/ruby2d/ruby2d.h +53 -6
  349. data/ext/ruby2d/text.c +14 -1
  350. data/ext/ruby2d/window.c +253 -215
  351. data/lib/ruby2d/cli/build.rb +242 -59
  352. data/lib/ruby2d/cli/colorize.rb +5 -4
  353. data/lib/ruby2d/cli/platform.rb +17 -0
  354. data/lib/ruby2d/font.rb +7 -1
  355. data/lib/ruby2d/sprite.rb +7 -2
  356. data/lib/ruby2d/text.rb +1 -3
  357. data/lib/ruby2d/texture.rb +21 -21
  358. data/lib/ruby2d/tileset.rb +34 -33
  359. data/lib/ruby2d/version.rb +1 -1
  360. data/lib/ruby2d/vertices.rb +11 -6
  361. data/lib/ruby2d.rb +14 -20
  362. metadata +279 -151
  363. data/assets/README.md +0 -22
  364. data/assets/Rakefile +0 -85
  365. data/assets/macos/lib/libFLAC.a +0 -0
  366. data/assets/macos/lib/libSDL2.a +0 -0
  367. data/assets/macos/lib/libSDL2_image.a +0 -0
  368. data/assets/macos/lib/libSDL2_ttf.a +0 -0
  369. data/assets/macos/lib/libfreetype.a +0 -0
  370. data/assets/macos/lib/libjpeg.a +0 -0
  371. data/assets/macos/lib/libpng16.a +0 -0
  372. data/assets/macos/lib/libtiff.a +0 -0
  373. data/assets/macos/lib/libvorbis.a +0 -0
  374. data/assets/macos/lib/libvorbisfile.a +0 -0
  375. data/assets/macos/lib/libwebp.a +0 -0
  376. data/assets/mingw/bin/SDL2.dll +0 -0
  377. data/assets/mingw/bin/SDL2_image.dll +0 -0
  378. data/assets/mingw/bin/SDL2_mixer.dll +0 -0
  379. data/assets/mingw/bin/SDL2_ttf.dll +0 -0
  380. data/assets/mingw/bin/glew32.dll +0 -0
  381. data/assets/mingw/bin/libFLAC-8.dll +0 -0
  382. data/assets/mingw/bin/libfreetype-6.dll +0 -0
  383. data/assets/mingw/bin/libjpeg-9.dll +0 -0
  384. data/assets/mingw/bin/libmodplug-1.dll +0 -0
  385. data/assets/mingw/bin/libmpg123-0.dll +0 -0
  386. data/assets/mingw/bin/libogg-0.dll +0 -0
  387. data/assets/mingw/bin/libopus-0.dll +0 -0
  388. data/assets/mingw/bin/libopusfile-0.dll +0 -0
  389. data/assets/mingw/bin/libpng16-16.dll +0 -0
  390. data/assets/mingw/bin/libtiff-5.dll +0 -0
  391. data/assets/mingw/bin/libvorbis-0.dll +0 -0
  392. data/assets/mingw/bin/libvorbisfile-3.dll +0 -0
  393. data/assets/mingw/bin/libwebp-7.dll +0 -0
  394. data/assets/mingw/bin/zlib1.dll +0 -0
  395. data/assets/mingw/lib/libSDL2.dll.a +0 -0
  396. data/assets/mingw/lib/libSDL2_image.a +0 -0
  397. data/assets/mingw/lib/libSDL2_image.dll.a +0 -0
  398. data/assets/mingw/lib/libSDL2_mixer.a +0 -0
  399. data/assets/mingw/lib/libSDL2_mixer.dll.a +0 -0
  400. data/assets/mingw/lib/libSDL2_test.a +0 -0
  401. data/assets/mingw/lib/libSDL2_ttf.a +0 -0
  402. data/assets/mingw/lib/libSDL2_ttf.dll.a +0 -0
  403. data/assets/mingw/lib/libSDL2main.a +0 -0
  404. data/assets/mingw/lib/libglew32.dll.a +0 -0
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  Simple DirectMedia Layer
3
- Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
3
+ Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
4
4
 
5
5
  This software is provided 'as-is', without any express or implied
6
6
  warranty. In no event will the authors be held liable for any damages
@@ -55,154 +55,253 @@ typedef struct SDL_Keysym
55
55
  /* Function prototypes */
56
56
 
57
57
  /**
58
- * \brief Get the window which currently has keyboard focus.
58
+ * Query the window which currently has keyboard focus.
59
+ *
60
+ * \returns the window with keyboard focus.
61
+ *
62
+ * \since This function is available since SDL 2.0.0.
59
63
  */
60
64
  extern DECLSPEC SDL_Window * SDLCALL SDL_GetKeyboardFocus(void);
61
65
 
62
66
  /**
63
- * \brief Get a snapshot of the current state of the keyboard.
67
+ * Get a snapshot of the current state of the keyboard.
68
+ *
69
+ * The pointer returned is a pointer to an internal SDL array. It will be
70
+ * valid for the whole lifetime of the application and should not be freed by
71
+ * the caller.
72
+ *
73
+ * A array element with a value of 1 means that the key is pressed and a value
74
+ * of 0 means that it is not. Indexes into this array are obtained by using
75
+ * SDL_Scancode values.
76
+ *
77
+ * Use SDL_PumpEvents() to update the state array.
64
78
  *
65
- * \param numkeys if non-NULL, receives the length of the returned array.
79
+ * This function gives you the current state after all events have been
80
+ * processed, so if a key or button has been pressed and released before you
81
+ * process events, then the pressed state will never show up in the
82
+ * SDL_GetKeyboardState() calls.
66
83
  *
67
- * \return An array of key states. Indexes into this array are obtained by using ::SDL_Scancode values.
84
+ * Note: This function doesn't take into account whether shift has been
85
+ * pressed or not.
68
86
  *
69
- * \b Example:
70
- * \code
71
- * const Uint8 *state = SDL_GetKeyboardState(NULL);
72
- * if ( state[SDL_SCANCODE_RETURN] ) {
73
- * printf("<RETURN> is pressed.\n");
74
- * }
75
- * \endcode
87
+ * \param numkeys if non-NULL, receives the length of the returned array
88
+ * \returns a pointer to an array of key states.
89
+ *
90
+ * \since This function is available since SDL 2.0.0.
91
+ *
92
+ * \sa SDL_PumpEvents
76
93
  */
77
94
  extern DECLSPEC const Uint8 *SDLCALL SDL_GetKeyboardState(int *numkeys);
78
95
 
79
96
  /**
80
- * \brief Get the current key modifier state for the keyboard.
97
+ * Get the current key modifier state for the keyboard.
98
+ *
99
+ * \returns an OR'd combination of the modifier keys for the keyboard. See
100
+ * SDL_Keymod for details.
101
+ *
102
+ * \since This function is available since SDL 2.0.0.
103
+ *
104
+ * \sa SDL_GetKeyboardState
105
+ * \sa SDL_SetModState
81
106
  */
82
107
  extern DECLSPEC SDL_Keymod SDLCALL SDL_GetModState(void);
83
108
 
84
109
  /**
85
- * \brief Set the current key modifier state for the keyboard.
110
+ * Set the current key modifier state for the keyboard.
111
+ *
112
+ * The inverse of SDL_GetModState(), SDL_SetModState() allows you to impose
113
+ * modifier key states on your application. Simply pass your desired modifier
114
+ * states into `modstate`. This value may be a bitwise, OR'd combination of
115
+ * SDL_Keymod values.
116
+ *
117
+ * This does not change the keyboard state, only the key modifier flags that
118
+ * SDL reports.
119
+ *
120
+ * \param modstate the desired SDL_Keymod for the keyboard
86
121
  *
87
- * \note This does not change the keyboard state, only the key modifier flags.
122
+ * \since This function is available since SDL 2.0.0.
123
+ *
124
+ * \sa SDL_GetModState
88
125
  */
89
126
  extern DECLSPEC void SDLCALL SDL_SetModState(SDL_Keymod modstate);
90
127
 
91
128
  /**
92
- * \brief Get the key code corresponding to the given scancode according
93
- * to the current keyboard layout.
129
+ * Get the key code corresponding to the given scancode according to the
130
+ * current keyboard layout.
131
+ *
132
+ * See SDL_Keycode for details.
94
133
  *
95
- * See ::SDL_Keycode for details.
134
+ * \param scancode the desired SDL_Scancode to query
135
+ * \returns the SDL_Keycode that corresponds to the given SDL_Scancode.
96
136
  *
97
- * \sa SDL_GetKeyName()
137
+ * \since This function is available since SDL 2.0.0.
138
+ *
139
+ * \sa SDL_GetKeyName
140
+ * \sa SDL_GetScancodeFromKey
98
141
  */
99
142
  extern DECLSPEC SDL_Keycode SDLCALL SDL_GetKeyFromScancode(SDL_Scancode scancode);
100
143
 
101
144
  /**
102
- * \brief Get the scancode corresponding to the given key code according to the
103
- * current keyboard layout.
145
+ * Get the scancode corresponding to the given key code according to the
146
+ * current keyboard layout.
147
+ *
148
+ * See SDL_Scancode for details.
104
149
  *
105
- * See ::SDL_Scancode for details.
150
+ * \param key the desired SDL_Keycode to query
151
+ * \returns the SDL_Scancode that corresponds to the given SDL_Keycode.
106
152
  *
107
- * \sa SDL_GetScancodeName()
153
+ * \since This function is available since SDL 2.0.0.
154
+ *
155
+ * \sa SDL_GetKeyFromScancode
156
+ * \sa SDL_GetScancodeName
108
157
  */
109
158
  extern DECLSPEC SDL_Scancode SDLCALL SDL_GetScancodeFromKey(SDL_Keycode key);
110
159
 
111
160
  /**
112
- * \brief Get a human-readable name for a scancode.
161
+ * Get a human-readable name for a scancode.
162
+ *
163
+ * See SDL_Scancode for details.
164
+ *
165
+ * **Warning**: The returned name is by design not stable across platforms,
166
+ * e.g. the name for `SDL_SCANCODE_LGUI` is "Left GUI" under Linux but "Left
167
+ * Windows" under Microsoft Windows, and some scancodes like
168
+ * `SDL_SCANCODE_NONUSBACKSLASH` don't have any name at all. There are even
169
+ * scancodes that share names, e.g. `SDL_SCANCODE_RETURN` and
170
+ * `SDL_SCANCODE_RETURN2` (both called "Return"). This function is therefore
171
+ * unsuitable for creating a stable cross-platform two-way mapping between
172
+ * strings and scancodes.
173
+ *
174
+ * \param scancode the desired SDL_Scancode to query
175
+ * \returns a pointer to the name for the scancode. If the scancode doesn't
176
+ * have a name this function returns an empty string ("").
113
177
  *
114
- * \return A pointer to the name for the scancode.
115
- * If the scancode doesn't have a name, this function returns
116
- * an empty string ("").
178
+ * \since This function is available since SDL 2.0.0.
117
179
  *
118
- * \sa SDL_Scancode
180
+ * \sa SDL_GetScancodeFromKey
181
+ * \sa SDL_GetScancodeFromName
119
182
  */
120
183
  extern DECLSPEC const char *SDLCALL SDL_GetScancodeName(SDL_Scancode scancode);
121
184
 
122
185
  /**
123
- * \brief Get a scancode from a human-readable name
186
+ * Get a scancode from a human-readable name.
124
187
  *
125
- * \return scancode, or SDL_SCANCODE_UNKNOWN if the name wasn't recognized
188
+ * \param name the human-readable scancode name
189
+ * \returns the SDL_Scancode, or `SDL_SCANCODE_UNKNOWN` if the name wasn't
190
+ * recognized; call SDL_GetError() for more information.
126
191
  *
127
- * \sa SDL_Scancode
192
+ * \since This function is available since SDL 2.0.0.
193
+ *
194
+ * \sa SDL_GetKeyFromName
195
+ * \sa SDL_GetScancodeFromKey
196
+ * \sa SDL_GetScancodeName
128
197
  */
129
198
  extern DECLSPEC SDL_Scancode SDLCALL SDL_GetScancodeFromName(const char *name);
130
199
 
131
200
  /**
132
- * \brief Get a human-readable name for a key.
201
+ * Get a human-readable name for a key.
202
+ *
203
+ * See SDL_Scancode and SDL_Keycode for details.
133
204
  *
134
- * \return A pointer to a UTF-8 string that stays valid at least until the next
135
- * call to this function. If you need it around any longer, you must
136
- * copy it. If the key doesn't have a name, this function returns an
137
- * empty string ("").
205
+ * \param key the desired SDL_Keycode to query
206
+ * \returns a pointer to a UTF-8 string that stays valid at least until the
207
+ * next call to this function. If you need it around any longer, you
208
+ * must copy it. If the key doesn't have a name, this function
209
+ * returns an empty string ("").
138
210
  *
139
- * \sa SDL_Keycode
211
+ * \since This function is available since SDL 2.0.0.
212
+ *
213
+ * \sa SDL_GetKeyFromName
214
+ * \sa SDL_GetKeyFromScancode
215
+ * \sa SDL_GetScancodeFromKey
140
216
  */
141
217
  extern DECLSPEC const char *SDLCALL SDL_GetKeyName(SDL_Keycode key);
142
218
 
143
219
  /**
144
- * \brief Get a key code from a human-readable name
220
+ * Get a key code from a human-readable name.
221
+ *
222
+ * \param name the human-readable key name
223
+ * \returns key code, or `SDLK_UNKNOWN` if the name wasn't recognized; call
224
+ * SDL_GetError() for more information.
145
225
  *
146
- * \return key code, or SDLK_UNKNOWN if the name wasn't recognized
226
+ * \since This function is available since SDL 2.0.0.
147
227
  *
148
- * \sa SDL_Keycode
228
+ * \sa SDL_GetKeyFromScancode
229
+ * \sa SDL_GetKeyName
230
+ * \sa SDL_GetScancodeFromName
149
231
  */
150
232
  extern DECLSPEC SDL_Keycode SDLCALL SDL_GetKeyFromName(const char *name);
151
233
 
152
234
  /**
153
- * \brief Start accepting Unicode text input events.
154
- * This function will show the on-screen keyboard if supported.
235
+ * Start accepting Unicode text input events.
155
236
  *
156
- * \sa SDL_StopTextInput()
157
- * \sa SDL_SetTextInputRect()
158
- * \sa SDL_HasScreenKeyboardSupport()
237
+ * This function will start accepting Unicode text input events in the focused
238
+ * SDL window, and start emitting SDL_TextInputEvent (SDL_TEXTINPUT) and
239
+ * SDL_TextEditingEvent (SDL_TEXTEDITING) events. Please use this function in
240
+ * pair with SDL_StopTextInput().
241
+ *
242
+ * On some platforms using this function activates the screen keyboard.
243
+ *
244
+ * \since This function is available since SDL 2.0.0.
245
+ *
246
+ * \sa SDL_SetTextInputRect
247
+ * \sa SDL_StopTextInput
159
248
  */
160
249
  extern DECLSPEC void SDLCALL SDL_StartTextInput(void);
161
250
 
162
251
  /**
163
- * \brief Return whether or not Unicode text input events are enabled.
252
+ * Check whether or not Unicode text input events are enabled.
253
+ *
254
+ * \returns SDL_TRUE if text input events are enabled else SDL_FALSE.
164
255
  *
165
- * \sa SDL_StartTextInput()
166
- * \sa SDL_StopTextInput()
256
+ * \since This function is available since SDL 2.0.0.
257
+ *
258
+ * \sa SDL_StartTextInput
167
259
  */
168
260
  extern DECLSPEC SDL_bool SDLCALL SDL_IsTextInputActive(void);
169
261
 
170
262
  /**
171
- * \brief Stop receiving any text input events.
172
- * This function will hide the on-screen keyboard if supported.
263
+ * Stop receiving any text input events.
264
+ *
265
+ * \since This function is available since SDL 2.0.0.
173
266
  *
174
- * \sa SDL_StartTextInput()
175
- * \sa SDL_HasScreenKeyboardSupport()
267
+ * \sa SDL_StartTextInput
176
268
  */
177
269
  extern DECLSPEC void SDLCALL SDL_StopTextInput(void);
178
270
 
179
271
  /**
180
- * \brief Set the rectangle used to type Unicode text inputs.
181
- * This is used as a hint for IME and on-screen keyboard placement.
272
+ * Set the rectangle used to type Unicode text inputs.
273
+ *
274
+ * \param rect the SDL_Rect structure representing the rectangle to receive
275
+ * text (ignored if NULL)
276
+ *
277
+ * \since This function is available since SDL 2.0.0.
182
278
  *
183
- * \sa SDL_StartTextInput()
279
+ * \sa SDL_StartTextInput
184
280
  */
185
281
  extern DECLSPEC void SDLCALL SDL_SetTextInputRect(SDL_Rect *rect);
186
282
 
187
283
  /**
188
- * \brief Returns whether the platform has some screen keyboard support.
284
+ * Check whether the platform has screen keyboard support.
189
285
  *
190
- * \return SDL_TRUE if some keyboard support is available else SDL_FALSE.
286
+ * \returns SDL_TRUE if the platform has some screen keyboard support or
287
+ * SDL_FALSE if not.
191
288
  *
192
- * \note Not all screen keyboard functions are supported on all platforms.
289
+ * \since This function is available since SDL 2.0.0.
193
290
  *
194
- * \sa SDL_IsScreenKeyboardShown()
291
+ * \sa SDL_StartTextInput
292
+ * \sa SDL_IsScreenKeyboardShown
195
293
  */
196
294
  extern DECLSPEC SDL_bool SDLCALL SDL_HasScreenKeyboardSupport(void);
197
295
 
198
296
  /**
199
- * \brief Returns whether the screen keyboard is shown for given window.
297
+ * Check whether the screen keyboard is shown for given window.
200
298
  *
201
- * \param window The window for which screen keyboard should be queried.
299
+ * \param window the window for which screen keyboard should be queried
300
+ * \returns SDL_TRUE if screen keyboard is shown or SDL_FALSE if not.
202
301
  *
203
- * \return SDL_TRUE if screen keyboard is shown else SDL_FALSE.
302
+ * \since This function is available since SDL 2.0.0.
204
303
  *
205
- * \sa SDL_HasScreenKeyboardSupport()
304
+ * \sa SDL_HasScreenKeyboardSupport
206
305
  */
207
306
  extern DECLSPEC SDL_bool SDLCALL SDL_IsScreenKeyboardShown(SDL_Window *window);
208
307
 
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  Simple DirectMedia Layer
3
- Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
3
+ Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
4
4
 
5
5
  This software is provided 'as-is', without any express or implied
6
6
  warranty. In no event will the authors be held liable for any damages
@@ -52,7 +52,7 @@ typedef enum
52
52
  SDLK_UNKNOWN = 0,
53
53
 
54
54
  SDLK_RETURN = '\r',
55
- SDLK_ESCAPE = '\033',
55
+ SDLK_ESCAPE = '\x1B',
56
56
  SDLK_BACKSPACE = '\b',
57
57
  SDLK_TAB = '\t',
58
58
  SDLK_SPACE = ' ',
@@ -147,7 +147,7 @@ typedef enum
147
147
  SDLK_INSERT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_INSERT),
148
148
  SDLK_HOME = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_HOME),
149
149
  SDLK_PAGEUP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PAGEUP),
150
- SDLK_DELETE = '\177',
150
+ SDLK_DELETE = '\x7F',
151
151
  SDLK_END = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_END),
152
152
  SDLK_PAGEDOWN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PAGEDOWN),
153
153
  SDLK_RIGHT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RIGHT),
@@ -338,12 +338,14 @@ typedef enum
338
338
  KMOD_NUM = 0x1000,
339
339
  KMOD_CAPS = 0x2000,
340
340
  KMOD_MODE = 0x4000,
341
- KMOD_RESERVED = 0x8000,
341
+ KMOD_SCROLL = 0x8000,
342
342
 
343
343
  KMOD_CTRL = KMOD_LCTRL | KMOD_RCTRL,
344
344
  KMOD_SHIFT = KMOD_LSHIFT | KMOD_RSHIFT,
345
345
  KMOD_ALT = KMOD_LALT | KMOD_RALT,
346
- KMOD_GUI = KMOD_LGUI | KMOD_RGUI
346
+ KMOD_GUI = KMOD_LGUI | KMOD_RGUI,
347
+
348
+ KMOD_RESERVED = KMOD_SCROLL /* This is for source-level compatibility with SDL 2.0.0. */
347
349
  } SDL_Keymod;
348
350
 
349
351
  #endif /* SDL_keycode_h_ */
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  Simple DirectMedia Layer
3
- Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
3
+ Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
4
4
 
5
5
  This software is provided 'as-is', without any express or implied
6
6
  warranty. In no event will the authors be held liable for any damages
@@ -51,22 +51,56 @@ extern "C" {
51
51
  #endif
52
52
 
53
53
  /**
54
- * This function dynamically loads a shared object and returns a pointer
55
- * to the object handle (or NULL if there was an error).
56
- * The 'sofile' parameter is a system dependent name of the object file.
54
+ * Dynamically load a shared object.
55
+ *
56
+ * \param sofile a system-dependent name of the object file
57
+ * \returns an opaque pointer to the object handle or NULL if there was an
58
+ * error; call SDL_GetError() for more information.
59
+ *
60
+ * \since This function is available since SDL 2.0.0.
61
+ *
62
+ * \sa SDL_LoadFunction
63
+ * \sa SDL_UnloadObject
57
64
  */
58
65
  extern DECLSPEC void *SDLCALL SDL_LoadObject(const char *sofile);
59
66
 
60
67
  /**
61
- * Given an object handle, this function looks up the address of the
62
- * named function in the shared object and returns it. This address
63
- * is no longer valid after calling SDL_UnloadObject().
68
+ * Look up the address of the named function in a shared object.
69
+ *
70
+ * This function pointer is no longer valid after calling SDL_UnloadObject().
71
+ *
72
+ * This function can only look up C function names. Other languages may have
73
+ * name mangling and intrinsic language support that varies from compiler to
74
+ * compiler.
75
+ *
76
+ * Make sure you declare your function pointers with the same calling
77
+ * convention as the actual library function. Your code will crash
78
+ * mysteriously if you do not do this.
79
+ *
80
+ * If the requested function doesn't exist, NULL is returned.
81
+ *
82
+ * \param handle a valid shared object handle returned by SDL_LoadObject()
83
+ * \param name the name of the function to look up
84
+ * \returns a pointer to the function or NULL if there was an error; call
85
+ * SDL_GetError() for more information.
86
+ *
87
+ * \since This function is available since SDL 2.0.0.
88
+ *
89
+ * \sa SDL_LoadObject
90
+ * \sa SDL_UnloadObject
64
91
  */
65
92
  extern DECLSPEC void *SDLCALL SDL_LoadFunction(void *handle,
66
93
  const char *name);
67
94
 
68
95
  /**
69
- * Unload a shared object from memory.
96
+ * Unload a shared object from memory.
97
+ *
98
+ * \param handle a valid shared object handle returned by SDL_LoadObject()
99
+ *
100
+ * \since This function is available since SDL 2.0.0.
101
+ *
102
+ * \sa SDL_LoadFunction
103
+ * \sa SDL_LoadObject
70
104
  */
71
105
  extern DECLSPEC void SDLCALL SDL_UnloadObject(void *handle);
72
106
 
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  Simple DirectMedia Layer
3
- Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
3
+ Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
4
4
 
5
5
  This software is provided 'as-is', without any express or implied
6
6
  warranty. In no event will the authors be held liable for any damages
@@ -47,44 +47,46 @@ typedef struct SDL_Locale
47
47
  } SDL_Locale;
48
48
 
49
49
  /**
50
- * \brief Report the user's preferred locale.
50
+ * Report the user's preferred locale.
51
51
  *
52
- * This returns an array of SDL_Locale structs, the final item zeroed out.
53
- * When the caller is done with this array, it should call SDL_free() on
54
- * the returned value; all the memory involved is allocated in a single
55
- * block, so a single SDL_free() will suffice.
52
+ * This returns an array of SDL_Locale structs, the final item zeroed out.
53
+ * When the caller is done with this array, it should call SDL_free() on the
54
+ * returned value; all the memory involved is allocated in a single block, so
55
+ * a single SDL_free() will suffice.
56
56
  *
57
- * Returned language strings are in the format xx, where 'xx' is an ISO-639
58
- * language specifier (such as "en" for English, "de" for German, etc).
59
- * Country strings are in the format YY, where "YY" is an ISO-3166 country
60
- * code (such as "US" for the United States, "CA" for Canada, etc). Country
61
- * might be NULL if there's no specific guidance on them (so you might get
62
- * { "en", "US" } for American English, but { "en", NULL } means "English
63
- * language, generically"). Language strings are never NULL, except to
64
- * terminate the array.
57
+ * Returned language strings are in the format xx, where 'xx' is an ISO-639
58
+ * language specifier (such as "en" for English, "de" for German, etc).
59
+ * Country strings are in the format YY, where "YY" is an ISO-3166 country
60
+ * code (such as "US" for the United States, "CA" for Canada, etc). Country
61
+ * might be NULL if there's no specific guidance on them (so you might get {
62
+ * "en", "US" } for American English, but { "en", NULL } means "English
63
+ * language, generically"). Language strings are never NULL, except to
64
+ * terminate the array.
65
65
  *
66
- * Please note that not all of these strings are 2 characters; some are
67
- * three or more.
66
+ * Please note that not all of these strings are 2 characters; some are three
67
+ * or more.
68
68
  *
69
- * The returned list of locales are in the order of the user's preference.
70
- * For example, a German citizen that is fluent in US English and knows
71
- * enough Japanese to navigate around Tokyo might have a list like:
72
- * { "de", "en_US", "jp", NULL }. Someone from England might prefer British
73
- * English (where "color" is spelled "colour", etc), but will settle for
74
- * anything like it: { "en_GB", "en", NULL }.
69
+ * The returned list of locales are in the order of the user's preference. For
70
+ * example, a German citizen that is fluent in US English and knows enough
71
+ * Japanese to navigate around Tokyo might have a list like: { "de", "en_US",
72
+ * "jp", NULL }. Someone from England might prefer British English (where
73
+ * "color" is spelled "colour", etc), but will settle for anything like it: {
74
+ * "en_GB", "en", NULL }.
75
75
  *
76
- * This function returns NULL on error, including when the platform does not
77
- * supply this information at all.
76
+ * This function returns NULL on error, including when the platform does not
77
+ * supply this information at all.
78
78
  *
79
- * This might be a "slow" call that has to query the operating system. It's
80
- * best to ask for this once and save the results. However, this list can
81
- * change, usually because the user has changed a system preference outside
82
- * of your program; SDL will send an SDL_LOCALECHANGED event in this case,
83
- * if possible, and you can call this function again to get an updated copy
84
- * of preferred locales.
79
+ * This might be a "slow" call that has to query the operating system. It's
80
+ * best to ask for this once and save the results. However, this list can
81
+ * change, usually because the user has changed a system preference outside of
82
+ * your program; SDL will send an SDL_LOCALECHANGED event in this case, if
83
+ * possible, and you can call this function again to get an updated copy of
84
+ * preferred locales.
85
85
  *
86
- * \return array of locales, terminated with a locale with a NULL language
87
- * field. Will return NULL on error.
86
+ * \return array of locales, terminated with a locale with a NULL language
87
+ * field. Will return NULL on error.
88
+ *
89
+ * \since This function is available since SDL 2.0.14.
88
90
  */
89
91
  extern DECLSPEC SDL_Locale * SDLCALL SDL_GetPreferredLocales(void);
90
92