ruby2d 0.10.0 → 0.11.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (387) 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/build_config.rb +13 -0
  172. data/assets/wasm/libmruby.a +0 -0
  173. data/assets/wasm/template.html +17 -0
  174. data/assets/windows/glew/README.md +10 -0
  175. data/assets/windows/glew/glew.h +23686 -0
  176. data/assets/{mingw/lib → windows/glew}/libglew32.a +0 -0
  177. data/assets/windows/mingw-w64-x86_64/bin/mrbc.exe +0 -0
  178. data/assets/windows/mingw-w64-x86_64/lib/libFLAC.a +0 -0
  179. data/assets/windows/mingw-w64-x86_64/lib/libLerc.a +0 -0
  180. data/assets/windows/mingw-w64-x86_64/lib/libSDL2.a +0 -0
  181. data/assets/windows/mingw-w64-x86_64/lib/libSDL2_image.a +0 -0
  182. data/assets/windows/mingw-w64-x86_64/lib/libSDL2_mixer.a +0 -0
  183. data/assets/windows/mingw-w64-x86_64/lib/libSDL2_ttf.a +0 -0
  184. data/assets/windows/mingw-w64-x86_64/lib/libbrotlicommon.a +0 -0
  185. data/assets/windows/mingw-w64-x86_64/lib/libbrotlidec.a +0 -0
  186. data/assets/windows/mingw-w64-x86_64/lib/libbz2.a +0 -0
  187. data/assets/windows/mingw-w64-x86_64/lib/libdeflate.a +0 -0
  188. data/assets/windows/mingw-w64-x86_64/lib/libfreetype.a +0 -0
  189. data/assets/windows/mingw-w64-x86_64/lib/libglew32.a +0 -0
  190. data/assets/windows/mingw-w64-x86_64/lib/libgraphite2.a +0 -0
  191. data/assets/windows/mingw-w64-x86_64/lib/libharfbuzz.a +0 -0
  192. data/assets/windows/mingw-w64-x86_64/lib/libjbig.a +0 -0
  193. data/assets/windows/mingw-w64-x86_64/lib/libjpeg.a +0 -0
  194. data/assets/windows/mingw-w64-x86_64/lib/liblzma.a +0 -0
  195. data/assets/windows/mingw-w64-x86_64/lib/libmodplug.a +0 -0
  196. data/assets/windows/mingw-w64-x86_64/lib/libmpg123.a +0 -0
  197. data/assets/windows/mingw-w64-x86_64/lib/libmruby.a +0 -0
  198. data/assets/windows/mingw-w64-x86_64/lib/libogg.a +0 -0
  199. data/assets/windows/mingw-w64-x86_64/lib/libopus.a +0 -0
  200. data/assets/windows/mingw-w64-x86_64/lib/libopusfile.a +0 -0
  201. data/assets/windows/mingw-w64-x86_64/lib/libpng16.a +0 -0
  202. data/assets/windows/mingw-w64-x86_64/lib/libsndfile.a +0 -0
  203. data/assets/windows/mingw-w64-x86_64/lib/libssp.a +0 -0
  204. data/assets/windows/mingw-w64-x86_64/lib/libstdc++.a +0 -0
  205. data/assets/windows/mingw-w64-x86_64/lib/libtiff.a +0 -0
  206. data/assets/windows/mingw-w64-x86_64/lib/libvorbis.a +0 -0
  207. data/assets/windows/mingw-w64-x86_64/lib/libvorbisfile.a +0 -0
  208. data/assets/windows/mingw-w64-x86_64/lib/libwebp.a +0 -0
  209. data/assets/windows/mingw-w64-x86_64/lib/libz.a +0 -0
  210. data/assets/windows/mingw-w64-x86_64/lib/libzstd.a +0 -0
  211. data/assets/{ios → xcode/ios}/Assets.xcassets/AppIcon.appiconset/Contents.json +0 -0
  212. data/assets/{ios → xcode/ios}/Assets.xcassets/Contents.json +0 -0
  213. data/assets/{ios → xcode/ios}/Base.lproj/LaunchScreen.storyboard +0 -0
  214. data/assets/{ios → xcode/ios}/Info.plist +0 -0
  215. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mrbconf.h +0 -0
  216. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/array.h +0 -0
  217. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/boxing_nan.h +0 -0
  218. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/boxing_no.h +0 -0
  219. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/boxing_word.h +0 -0
  220. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/class.h +0 -0
  221. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/common.h +0 -0
  222. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/compile.h +0 -0
  223. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/data.h +0 -0
  224. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/debug.h +0 -0
  225. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/dump.h +0 -0
  226. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/error.h +0 -0
  227. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/gc.h +0 -0
  228. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/hash.h +0 -0
  229. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/irep.h +0 -0
  230. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/istruct.h +0 -0
  231. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/khash.h +0 -0
  232. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/numeric.h +0 -0
  233. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/object.h +0 -0
  234. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/opcode.h +0 -0
  235. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/ops.h +0 -0
  236. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/proc.h +0 -0
  237. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/range.h +0 -0
  238. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/re.h +0 -0
  239. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/string.h +0 -0
  240. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/throw.h +0 -0
  241. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/value.h +0 -0
  242. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/variable.h +0 -0
  243. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/version.h +0 -0
  244. data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby.h +0 -0
  245. data/assets/{ios → xcode/ios}/MRuby.framework/Info.plist +0 -0
  246. data/assets/{ios → xcode/ios}/MRuby.framework/MRuby +0 -0
  247. data/assets/{ios → xcode/ios}/MyApp.xcodeproj/project.pbxproj +0 -0
  248. data/assets/{ios → xcode/ios}/MyApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -0
  249. data/assets/{ios → xcode/ios}/MyApp.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -0
  250. data/assets/{ios → xcode/ios}/MyApp.xcodeproj/project.xcworkspace/xcshareddata/MyApp.xcscmblueprint +0 -0
  251. data/assets/{ios → xcode/ios}/main.c +0 -0
  252. 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
  253. data/assets/{tvos → xcode/tvos}/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Contents.json +0 -0
  254. data/assets/{tvos → xcode/tvos}/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Contents.json +0 -0
  255. 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
  256. data/assets/{tvos → xcode/tvos}/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Contents.json +0 -0
  257. 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
  258. data/assets/{tvos → xcode/tvos}/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Middle.imagestacklayer/Contents.json +0 -0
  259. 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
  260. data/assets/{tvos → xcode/tvos}/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Contents.json +0 -0
  261. data/assets/{tvos → xcode/tvos}/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Contents.json +0 -0
  262. 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
  263. data/assets/{tvos → xcode/tvos}/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Contents.json +0 -0
  264. 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
  265. data/assets/{tvos → xcode/tvos}/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Contents.json +0 -0
  266. data/assets/{tvos → xcode/tvos}/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Contents.json +0 -0
  267. data/assets/{tvos → xcode/tvos}/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image Wide.imageset/Contents.json +0 -0
  268. data/assets/{tvos → xcode/tvos}/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image.imageset/Contents.json +0 -0
  269. data/assets/{tvos → xcode/tvos}/Assets.xcassets/Contents.json +0 -0
  270. data/assets/{tvos → xcode/tvos}/Assets.xcassets/LaunchImage.launchimage/Contents.json +0 -0
  271. data/assets/{tvos → xcode/tvos}/Info.plist +0 -0
  272. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mrbconf.h +0 -0
  273. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/array.h +0 -0
  274. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/boxing_nan.h +0 -0
  275. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/boxing_no.h +0 -0
  276. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/boxing_word.h +0 -0
  277. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/class.h +0 -0
  278. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/common.h +0 -0
  279. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/compile.h +0 -0
  280. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/data.h +0 -0
  281. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/debug.h +0 -0
  282. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/dump.h +0 -0
  283. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/error.h +0 -0
  284. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/gc.h +0 -0
  285. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/hash.h +0 -0
  286. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/irep.h +0 -0
  287. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/istruct.h +0 -0
  288. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/khash.h +0 -0
  289. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/numeric.h +0 -0
  290. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/object.h +0 -0
  291. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/opcode.h +0 -0
  292. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/ops.h +0 -0
  293. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/proc.h +0 -0
  294. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/range.h +0 -0
  295. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/re.h +0 -0
  296. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/string.h +0 -0
  297. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/throw.h +0 -0
  298. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/value.h +0 -0
  299. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/variable.h +0 -0
  300. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/version.h +0 -0
  301. data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby.h +0 -0
  302. data/assets/{tvos → xcode/tvos}/MRuby.framework/Info.plist +0 -0
  303. data/assets/{tvos → xcode/tvos}/MRuby.framework/MRuby +0 -0
  304. data/assets/{tvos → xcode/tvos}/MyApp.xcodeproj/project.pbxproj +0 -0
  305. data/assets/{tvos → xcode/tvos}/MyApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -0
  306. data/assets/{tvos → xcode/tvos}/MyApp.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -0
  307. data/assets/{tvos → xcode/tvos}/MyApp.xcodeproj/project.xcworkspace/xcshareddata/MyApp.xcscmblueprint +0 -0
  308. data/assets/{tvos → xcode/tvos}/main.c +0 -0
  309. data/bin/ruby2d +3 -4
  310. data/ext/ruby2d/extconf.rb +68 -46
  311. data/ext/ruby2d/font.c +35 -0
  312. data/ext/ruby2d/gl.c +9 -58
  313. data/ext/ruby2d/gl2.c +8 -83
  314. data/ext/ruby2d/gl3.c +57 -116
  315. data/ext/ruby2d/gles.c +130 -151
  316. data/ext/ruby2d/image.c +16 -96
  317. data/ext/ruby2d/ruby2d.c +265 -298
  318. data/ext/ruby2d/ruby2d.h +69 -159
  319. data/ext/ruby2d/sound.c +1 -1
  320. data/ext/ruby2d/text.c +20 -114
  321. data/ext/ruby2d/window.c +257 -219
  322. data/lib/ruby2d/circle.rb +3 -1
  323. data/lib/ruby2d/cli/build.rb +239 -59
  324. data/lib/ruby2d/cli/colorize.rb +5 -4
  325. data/lib/ruby2d/cli/platform.rb +17 -0
  326. data/lib/ruby2d/font.rb +26 -1
  327. data/lib/ruby2d/image.rb +22 -17
  328. data/lib/ruby2d/line.rb +3 -1
  329. data/lib/ruby2d/quad.rb +3 -1
  330. data/lib/ruby2d/rectangle.rb +1 -1
  331. data/lib/ruby2d/renderable.rb +0 -12
  332. data/lib/ruby2d/sound.rb +25 -0
  333. data/lib/ruby2d/sprite.rb +44 -89
  334. data/lib/ruby2d/square.rb +1 -1
  335. data/lib/ruby2d/text.rb +40 -20
  336. data/lib/ruby2d/texture.rb +28 -0
  337. data/lib/ruby2d/tileset.rb +47 -28
  338. data/lib/ruby2d/triangle.rb +3 -1
  339. data/lib/ruby2d/version.rb +1 -1
  340. data/lib/ruby2d/vertices.rb +89 -0
  341. data/lib/ruby2d/window.rb +13 -3
  342. data/lib/ruby2d.rb +16 -20
  343. metadata +249 -153
  344. data/assets/README.md +0 -22
  345. data/assets/Rakefile +0 -85
  346. data/assets/macos/lib/libFLAC.a +0 -0
  347. data/assets/macos/lib/libSDL2.a +0 -0
  348. data/assets/macos/lib/libSDL2_image.a +0 -0
  349. data/assets/macos/lib/libSDL2_ttf.a +0 -0
  350. data/assets/macos/lib/libfreetype.a +0 -0
  351. data/assets/macos/lib/libjpeg.a +0 -0
  352. data/assets/macos/lib/libpng16.a +0 -0
  353. data/assets/macos/lib/libtiff.a +0 -0
  354. data/assets/macos/lib/libvorbis.a +0 -0
  355. data/assets/macos/lib/libvorbisfile.a +0 -0
  356. data/assets/macos/lib/libwebp.a +0 -0
  357. data/assets/mingw/bin/SDL2.dll +0 -0
  358. data/assets/mingw/bin/SDL2_image.dll +0 -0
  359. data/assets/mingw/bin/SDL2_mixer.dll +0 -0
  360. data/assets/mingw/bin/SDL2_ttf.dll +0 -0
  361. data/assets/mingw/bin/glew32.dll +0 -0
  362. data/assets/mingw/bin/libFLAC-8.dll +0 -0
  363. data/assets/mingw/bin/libfreetype-6.dll +0 -0
  364. data/assets/mingw/bin/libjpeg-9.dll +0 -0
  365. data/assets/mingw/bin/libmodplug-1.dll +0 -0
  366. data/assets/mingw/bin/libmpg123-0.dll +0 -0
  367. data/assets/mingw/bin/libogg-0.dll +0 -0
  368. data/assets/mingw/bin/libopus-0.dll +0 -0
  369. data/assets/mingw/bin/libopusfile-0.dll +0 -0
  370. data/assets/mingw/bin/libpng16-16.dll +0 -0
  371. data/assets/mingw/bin/libtiff-5.dll +0 -0
  372. data/assets/mingw/bin/libvorbis-0.dll +0 -0
  373. data/assets/mingw/bin/libvorbisfile-3.dll +0 -0
  374. data/assets/mingw/bin/libwebp-7.dll +0 -0
  375. data/assets/mingw/bin/zlib1.dll +0 -0
  376. data/assets/mingw/lib/libSDL2.dll.a +0 -0
  377. data/assets/mingw/lib/libSDL2_image.a +0 -0
  378. data/assets/mingw/lib/libSDL2_image.dll.a +0 -0
  379. data/assets/mingw/lib/libSDL2_mixer.a +0 -0
  380. data/assets/mingw/lib/libSDL2_mixer.dll.a +0 -0
  381. data/assets/mingw/lib/libSDL2_test.a +0 -0
  382. data/assets/mingw/lib/libSDL2_ttf.a +0 -0
  383. data/assets/mingw/lib/libSDL2_ttf.dll.a +0 -0
  384. data/assets/mingw/lib/libSDL2main.a +0 -0
  385. data/assets/mingw/lib/libglew32.dll.a +0 -0
  386. data/ext/ruby2d/sprite.c +0 -147
  387. data/ext/ruby2d/tileset.c +0 -30
@@ -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
@@ -112,90 +112,283 @@ typedef enum
112
112
 
113
113
 
114
114
  /**
115
- * \brief Set the priority of all log categories
115
+ * Set the priority of all log categories.
116
+ *
117
+ * \param priority the SDL_LogPriority to assign
118
+ *
119
+ * \since This function is available since SDL 2.0.0.
120
+ *
121
+ * \sa SDL_LogSetPriority
116
122
  */
117
123
  extern DECLSPEC void SDLCALL SDL_LogSetAllPriority(SDL_LogPriority priority);
118
124
 
119
125
  /**
120
- * \brief Set the priority of a particular log category
126
+ * Set the priority of a particular log category.
127
+ *
128
+ * \param category the category to assign a priority to
129
+ * \param priority the SDL_LogPriority to assign
130
+ *
131
+ * \since This function is available since SDL 2.0.0.
132
+ *
133
+ * \sa SDL_LogGetPriority
134
+ * \sa SDL_LogSetAllPriority
121
135
  */
122
136
  extern DECLSPEC void SDLCALL SDL_LogSetPriority(int category,
123
137
  SDL_LogPriority priority);
124
138
 
125
139
  /**
126
- * \brief Get the priority of a particular log category
140
+ * Get the priority of a particular log category.
141
+ *
142
+ * \param category the category to query
143
+ * \returns the SDL_LogPriority for the requested category
144
+ *
145
+ * \since This function is available since SDL 2.0.0.
146
+ *
147
+ * \sa SDL_LogSetPriority
127
148
  */
128
149
  extern DECLSPEC SDL_LogPriority SDLCALL SDL_LogGetPriority(int category);
129
150
 
130
151
  /**
131
- * \brief Reset all priorities to default.
152
+ * Reset all priorities to default.
132
153
  *
133
- * \note This is called in SDL_Quit().
154
+ * This is called by SDL_Quit().
155
+ *
156
+ * \since This function is available since SDL 2.0.0.
157
+ *
158
+ * \sa SDL_LogSetAllPriority
159
+ * \sa SDL_LogSetPriority
134
160
  */
135
161
  extern DECLSPEC void SDLCALL SDL_LogResetPriorities(void);
136
162
 
137
163
  /**
138
- * \brief Log a message with SDL_LOG_CATEGORY_APPLICATION and SDL_LOG_PRIORITY_INFO
164
+ * Log a message with SDL_LOG_CATEGORY_APPLICATION and SDL_LOG_PRIORITY_INFO.
165
+ *
166
+ * = * \param fmt a printf() style message format string
167
+ *
168
+ * \param ... additional parameters matching % tokens in the `fmt` string, if
169
+ * any
170
+ *
171
+ * \since This function is available since SDL 2.0.0.
172
+ *
173
+ * \sa SDL_LogCritical
174
+ * \sa SDL_LogDebug
175
+ * \sa SDL_LogError
176
+ * \sa SDL_LogInfo
177
+ * \sa SDL_LogMessage
178
+ * \sa SDL_LogMessageV
179
+ * \sa SDL_LogVerbose
180
+ * \sa SDL_LogWarn
139
181
  */
140
182
  extern DECLSPEC void SDLCALL SDL_Log(SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(1);
141
183
 
142
184
  /**
143
- * \brief Log a message with SDL_LOG_PRIORITY_VERBOSE
185
+ * Log a message with SDL_LOG_PRIORITY_VERBOSE.
186
+ *
187
+ * \param category the category of the message
188
+ * \param fmt a printf() style message format string
189
+ * \param ... additional parameters matching % tokens in the **fmt** string,
190
+ * if any
191
+ *
192
+ * \since This function is available since SDL 2.0.0.
193
+ *
194
+ * \sa SDL_Log
195
+ * \sa SDL_LogCritical
196
+ * \sa SDL_LogDebug
197
+ * \sa SDL_LogError
198
+ * \sa SDL_LogInfo
199
+ * \sa SDL_LogMessage
200
+ * \sa SDL_LogMessageV
201
+ * \sa SDL_LogWarn
144
202
  */
145
203
  extern DECLSPEC void SDLCALL SDL_LogVerbose(int category, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(2);
146
204
 
147
205
  /**
148
- * \brief Log a message with SDL_LOG_PRIORITY_DEBUG
206
+ * Log a message with SDL_LOG_PRIORITY_DEBUG.
207
+ *
208
+ * \param category the category of the message
209
+ * \param fmt a printf() style message format string
210
+ * \param ... additional parameters matching % tokens in the **fmt** string,
211
+ * if any
212
+ *
213
+ * \since This function is available since SDL 2.0.0.
214
+ *
215
+ * \sa SDL_Log
216
+ * \sa SDL_LogCritical
217
+ * \sa SDL_LogError
218
+ * \sa SDL_LogInfo
219
+ * \sa SDL_LogMessage
220
+ * \sa SDL_LogMessageV
221
+ * \sa SDL_LogVerbose
222
+ * \sa SDL_LogWarn
149
223
  */
150
224
  extern DECLSPEC void SDLCALL SDL_LogDebug(int category, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(2);
151
225
 
152
226
  /**
153
- * \brief Log a message with SDL_LOG_PRIORITY_INFO
227
+ * Log a message with SDL_LOG_PRIORITY_INFO.
228
+ *
229
+ * \param category the category of the message
230
+ * \param fmt a printf() style message format string
231
+ * \param ... additional parameters matching % tokens in the **fmt** string,
232
+ * if any
233
+ *
234
+ * \since This function is available since SDL 2.0.0.
235
+ *
236
+ * \sa SDL_Log
237
+ * \sa SDL_LogCritical
238
+ * \sa SDL_LogDebug
239
+ * \sa SDL_LogError
240
+ * \sa SDL_LogMessage
241
+ * \sa SDL_LogMessageV
242
+ * \sa SDL_LogVerbose
243
+ * \sa SDL_LogWarn
154
244
  */
155
245
  extern DECLSPEC void SDLCALL SDL_LogInfo(int category, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(2);
156
246
 
157
247
  /**
158
- * \brief Log a message with SDL_LOG_PRIORITY_WARN
248
+ * Log a message with SDL_LOG_PRIORITY_WARN.
249
+ *
250
+ * \param category the category of the message
251
+ * \param fmt a printf() style message format string
252
+ * \param ... additional parameters matching % tokens in the **fmt** string,
253
+ * if any
254
+ *
255
+ * \since This function is available since SDL 2.0.0.
256
+ *
257
+ * \sa SDL_Log
258
+ * \sa SDL_LogCritical
259
+ * \sa SDL_LogDebug
260
+ * \sa SDL_LogError
261
+ * \sa SDL_LogInfo
262
+ * \sa SDL_LogMessage
263
+ * \sa SDL_LogMessageV
264
+ * \sa SDL_LogVerbose
159
265
  */
160
266
  extern DECLSPEC void SDLCALL SDL_LogWarn(int category, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(2);
161
267
 
162
268
  /**
163
- * \brief Log a message with SDL_LOG_PRIORITY_ERROR
269
+ * Log a message with SDL_LOG_PRIORITY_ERROR.
270
+ *
271
+ * \param category the category of the message
272
+ * \param fmt a printf() style message format string
273
+ * \param ... additional parameters matching % tokens in the **fmt** string,
274
+ * if any
275
+ *
276
+ * \since This function is available since SDL 2.0.0.
277
+ *
278
+ * \sa SDL_Log
279
+ * \sa SDL_LogCritical
280
+ * \sa SDL_LogDebug
281
+ * \sa SDL_LogInfo
282
+ * \sa SDL_LogMessage
283
+ * \sa SDL_LogMessageV
284
+ * \sa SDL_LogVerbose
285
+ * \sa SDL_LogWarn
164
286
  */
165
287
  extern DECLSPEC void SDLCALL SDL_LogError(int category, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(2);
166
288
 
167
289
  /**
168
- * \brief Log a message with SDL_LOG_PRIORITY_CRITICAL
290
+ * Log a message with SDL_LOG_PRIORITY_CRITICAL.
291
+ *
292
+ * \param category the category of the message
293
+ * \param fmt a printf() style message format string
294
+ * \param ... additional parameters matching % tokens in the **fmt** string,
295
+ * if any
296
+ *
297
+ * \since This function is available since SDL 2.0.0.
298
+ *
299
+ * \sa SDL_Log
300
+ * \sa SDL_LogDebug
301
+ * \sa SDL_LogError
302
+ * \sa SDL_LogInfo
303
+ * \sa SDL_LogMessage
304
+ * \sa SDL_LogMessageV
305
+ * \sa SDL_LogVerbose
306
+ * \sa SDL_LogWarn
169
307
  */
170
308
  extern DECLSPEC void SDLCALL SDL_LogCritical(int category, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(2);
171
309
 
172
310
  /**
173
- * \brief Log a message with the specified category and priority.
311
+ * Log a message with the specified category and priority.
312
+ *
313
+ * \param category the category of the message
314
+ * \param priority the priority of the message
315
+ * \param fmt a printf() style message format string
316
+ * \param ... additional parameters matching % tokens in the **fmt** string,
317
+ * if any
318
+ *
319
+ * \since This function is available since SDL 2.0.0.
320
+ *
321
+ * \sa SDL_Log
322
+ * \sa SDL_LogCritical
323
+ * \sa SDL_LogDebug
324
+ * \sa SDL_LogError
325
+ * \sa SDL_LogInfo
326
+ * \sa SDL_LogMessageV
327
+ * \sa SDL_LogVerbose
328
+ * \sa SDL_LogWarn
174
329
  */
175
330
  extern DECLSPEC void SDLCALL SDL_LogMessage(int category,
176
331
  SDL_LogPriority priority,
177
332
  SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(3);
178
333
 
179
334
  /**
180
- * \brief Log a message with the specified category and priority.
335
+ * Log a message with the specified category and priority.
336
+ *
337
+ * \param category the category of the message
338
+ * \param priority the priority of the message
339
+ * \param fmt a printf() style message format string
340
+ * \param ap a variable argument list
341
+ *
342
+ * \since This function is available since SDL 2.0.0.
343
+ *
344
+ * \sa SDL_Log
345
+ * \sa SDL_LogCritical
346
+ * \sa SDL_LogDebug
347
+ * \sa SDL_LogError
348
+ * \sa SDL_LogInfo
349
+ * \sa SDL_LogMessage
350
+ * \sa SDL_LogVerbose
351
+ * \sa SDL_LogWarn
181
352
  */
182
353
  extern DECLSPEC void SDLCALL SDL_LogMessageV(int category,
183
354
  SDL_LogPriority priority,
184
355
  const char *fmt, va_list ap);
185
356
 
186
357
  /**
187
- * \brief The prototype for the log output function
358
+ * The prototype for the log output callback function.
359
+ *
360
+ * This function is called by SDL when there is new text to be logged.
361
+ *
362
+ * \param userdata what was passed as `userdata` to SDL_LogSetOutputFunction()
363
+ * \param category the category of the message
364
+ * \param priority the priority of the message
365
+ * \param message the message being output
188
366
  */
189
367
  typedef void (SDLCALL *SDL_LogOutputFunction)(void *userdata, int category, SDL_LogPriority priority, const char *message);
190
368
 
191
369
  /**
192
- * \brief Get the current log output function.
370
+ * Get the current log output function.
371
+ *
372
+ * \param callback an SDL_LogOutputFunction filled in with the current log
373
+ * callback
374
+ * \param userdata a pointer filled in with the pointer that is passed to
375
+ * `callback`
376
+ *
377
+ * \since This function is available since SDL 2.0.0.
378
+ *
379
+ * \sa SDL_LogSetOutputFunction
193
380
  */
194
381
  extern DECLSPEC void SDLCALL SDL_LogGetOutputFunction(SDL_LogOutputFunction *callback, void **userdata);
195
382
 
196
383
  /**
197
- * \brief This function allows you to replace the default log output
198
- * function with one of your own.
384
+ * Replace the default log output function with one of your own.
385
+ *
386
+ * \param callback an SDL_LogOutputFunction to call instead of the default
387
+ * \param userdata a pointer that is passed to `callback`
388
+ *
389
+ * \since This function is available since SDL 2.0.0.
390
+ *
391
+ * \sa SDL_LogGetOutputFunction
199
392
  */
200
393
  extern DECLSPEC void SDLCALL SDL_LogSetOutputFunction(SDL_LogOutputFunction callback, void *userdata);
201
394
 
@@ -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
@@ -83,6 +83,15 @@
83
83
  */
84
84
  #define SDL_MAIN_NEEDED
85
85
 
86
+ #elif defined(__PSP__)
87
+ /* On PSP SDL provides a main function that sets the module info,
88
+ activates the GPU and starts the thread required to be able to exit
89
+ the software.
90
+
91
+ If you provide this yourself, you may define SDL_MAIN_HANDLED
92
+ */
93
+ #define SDL_MAIN_AVAILABLE
94
+
86
95
  #endif
87
96
  #endif /* SDL_MAIN_HANDLED */
88
97
 
@@ -122,20 +131,62 @@ extern SDLMAIN_DECLSPEC int SDL_main(int argc, char *argv[]);
122
131
 
123
132
 
124
133
  /**
125
- * This is called by the real SDL main function to let the rest of the
126
- * library know that initialization was done properly.
134
+ * Circumvent failure of SDL_Init() when not using SDL_main() as an entry
135
+ * point.
136
+ *
137
+ * This function is defined in SDL_main.h, along with the preprocessor rule to
138
+ * redefine main() as SDL_main(). Thus to ensure that your main() function
139
+ * will not be changed it is necessary to define SDL_MAIN_HANDLED before
140
+ * including SDL.h.
127
141
  *
128
- * Calling this yourself without knowing what you're doing can cause
129
- * crashes and hard to diagnose problems with your application.
142
+ * \since This function is available since SDL 2.0.0.
143
+ *
144
+ * \sa SDL_Init
130
145
  */
131
146
  extern DECLSPEC void SDLCALL SDL_SetMainReady(void);
132
147
 
133
148
  #ifdef __WIN32__
134
149
 
135
150
  /**
136
- * This can be called to set the application class at startup
151
+ * Register a win32 window class for SDL's use.
152
+ *
153
+ * This can be called to set the application window class at startup. It is
154
+ * safe to call this multiple times, as long as every call is eventually
155
+ * paired with a call to SDL_UnregisterApp, but a second registration attempt
156
+ * while a previous registration is still active will be ignored, other than
157
+ * to increment a counter.
158
+ *
159
+ * Most applications do not need to, and should not, call this directly; SDL
160
+ * will call it when initializing the video subsystem.
161
+ *
162
+ * \param name the window class name, in UTF-8 encoding. If NULL, SDL
163
+ * currently uses "SDL_app" but this isn't guaranteed.
164
+ * \param style the value to use in WNDCLASSEX::style. If `name` is NULL, SDL
165
+ * currently uses `(CS_BYTEALIGNCLIENT | CS_OWNDC)` regardless of
166
+ * what is specified here.
167
+ * \param hInst the HINSTANCE to use in WNDCLASSEX::hInstance. If zero, SDL
168
+ * will use `GetModuleHandle(NULL)` instead.
169
+ * \returns 0 on success, -1 on error. SDL_GetError() may have details.
170
+ *
171
+ * \since This function is available since SDL 2.0.2.
172
+ */
173
+ extern DECLSPEC int SDLCALL SDL_RegisterApp(const char *name, Uint32 style, void *hInst);
174
+
175
+ /**
176
+ * Deregister the win32 window class from an SDL_RegisterApp call.
177
+ *
178
+ * This can be called to undo the effects of SDL_RegisterApp.
179
+ *
180
+ * Most applications do not need to, and should not, call this directly; SDL
181
+ * will call it when deinitializing the video subsystem.
182
+ *
183
+ * It is safe to call this multiple times, as long as every call is eventually
184
+ * paired with a prior call to SDL_RegisterApp. The window class will only be
185
+ * deregistered when the registration counter in SDL_RegisterApp decrements to
186
+ * zero through calls to this function.
187
+ *
188
+ * \since This function is available since SDL 2.0.2.
137
189
  */
138
- extern DECLSPEC int SDLCALL SDL_RegisterApp(char *name, Uint32 style, void *hInst);
139
190
  extern DECLSPEC void SDLCALL SDL_UnregisterApp(void);
140
191
 
141
192
  #endif /* __WIN32__ */
@@ -144,12 +195,14 @@ extern DECLSPEC void SDLCALL SDL_UnregisterApp(void);
144
195
  #ifdef __WINRT__
145
196
 
146
197
  /**
147
- * \brief Initializes and launches an SDL/WinRT application.
198
+ * Initialize and launch an SDL/WinRT application.
148
199
  *
149
- * \param mainFunction The SDL app's C-style main().
150
- * \param reserved Reserved for future use; should be NULL
151
- * \return 0 on success, -1 on failure. On failure, use SDL_GetError to retrieve more
152
- * information on the failure.
200
+ * \param mainFunction the SDL app's C-style main(), an SDL_main_func
201
+ * \param reserved reserved for future use; should be NULL
202
+ * \returns 0 on success or -1 on failure; call SDL_GetError() to retrieve
203
+ * more information on the failure.
204
+ *
205
+ * \since This function is available since SDL 2.0.3.
153
206
  */
154
207
  extern DECLSPEC int SDLCALL SDL_WinRTRunApp(SDL_main_func mainFunction, void * reserved);
155
208
 
@@ -158,12 +211,14 @@ extern DECLSPEC int SDLCALL SDL_WinRTRunApp(SDL_main_func mainFunction, void * r
158
211
  #if defined(__IPHONEOS__)
159
212
 
160
213
  /**
161
- * \brief Initializes and launches an SDL application.
214
+ * Initializes and launches an SDL application.
215
+ *
216
+ * \param argc The argc parameter from the application's main() function
217
+ * \param argv The argv parameter from the application's main() function
218
+ * \param mainFunction The SDL app's C-style main(), an SDL_main_func
219
+ * \return the return value from mainFunction
162
220
  *
163
- * \param argc The argc parameter from the application's main() function
164
- * \param argv The argv parameter from the application's main() function
165
- * \param mainFunction The SDL app's C-style main().
166
- * \return the return value from mainFunction
221
+ * \since This function is available since SDL 2.0.10.
167
222
  */
168
223
  extern DECLSPEC int SDLCALL SDL_UIKitRunApp(int argc, char *argv[], SDL_main_func mainFunction);
169
224
 
@@ -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
@@ -32,7 +32,7 @@ extern "C" {
32
32
  #endif
33
33
 
34
34
  /**
35
- * \brief SDL_MessageBox flags. If supported will display warning icon, etc.
35
+ * SDL_MessageBox flags. If supported will display warning icon, etc.
36
36
  */
37
37
  typedef enum
38
38
  {
@@ -44,7 +44,7 @@ typedef enum
44
44
  } SDL_MessageBoxFlags;
45
45
 
46
46
  /**
47
- * \brief Flags for SDL_MessageBoxButtonData.
47
+ * Flags for SDL_MessageBoxButtonData.
48
48
  */
49
49
  typedef enum
50
50
  {
@@ -53,7 +53,7 @@ typedef enum
53
53
  } SDL_MessageBoxButtonFlags;
54
54
 
55
55
  /**
56
- * \brief Individual button data.
56
+ * Individual button data.
57
57
  */
58
58
  typedef struct
59
59
  {
@@ -63,7 +63,7 @@ typedef struct
63
63
  } SDL_MessageBoxButtonData;
64
64
 
65
65
  /**
66
- * \brief RGB value used in a message box color scheme
66
+ * RGB value used in a message box color scheme
67
67
  */
68
68
  typedef struct
69
69
  {
@@ -81,7 +81,7 @@ typedef enum
81
81
  } SDL_MessageBoxColorType;
82
82
 
83
83
  /**
84
- * \brief A set of colors to use for message box dialogs
84
+ * A set of colors to use for message box dialogs
85
85
  */
86
86
  typedef struct
87
87
  {
@@ -89,7 +89,7 @@ typedef struct
89
89
  } SDL_MessageBoxColorScheme;
90
90
 
91
91
  /**
92
- * \brief MessageBox structure containing title, text, window, etc.
92
+ * MessageBox structure containing title, text, window, etc.
93
93
  */
94
94
  typedef struct
95
95
  {
@@ -105,32 +105,79 @@ typedef struct
105
105
  } SDL_MessageBoxData;
106
106
 
107
107
  /**
108
- * \brief Create a modal message box.
108
+ * Create a modal message box.
109
109
  *
110
- * \param messageboxdata The SDL_MessageBoxData structure with title, text, etc.
111
- * \param buttonid The pointer to which user id of hit button should be copied.
110
+ * If your needs aren't complex, it might be easier to use
111
+ * SDL_ShowSimpleMessageBox.
112
112
  *
113
- * \return -1 on error, otherwise 0 and buttonid contains user id of button
114
- * hit or -1 if dialog was closed.
113
+ * This function should be called on the thread that created the parent
114
+ * window, or on the main thread if the messagebox has no parent. It will
115
+ * block execution of that thread until the user clicks a button or closes the
116
+ * messagebox.
115
117
  *
116
- * \note This function should be called on the thread that created the parent
117
- * window, or on the main thread if the messagebox has no parent. It will
118
- * block execution of that thread until the user clicks a button or
119
- * closes the messagebox.
118
+ * This function may be called at any time, even before SDL_Init(). This makes
119
+ * it useful for reporting errors like a failure to create a renderer or
120
+ * OpenGL context.
121
+ *
122
+ * On X11, SDL rolls its own dialog box with X11 primitives instead of a
123
+ * formal toolkit like GTK+ or Qt.
124
+ *
125
+ * Note that if SDL_Init() would fail because there isn't any available video
126
+ * target, this function is likely to fail for the same reasons. If this is a
127
+ * concern, check the return value from this function and fall back to writing
128
+ * to stderr if you can.
129
+ *
130
+ * \param messageboxdata the SDL_MessageBoxData structure with title, text and
131
+ * other options
132
+ * \param buttonid the pointer to which user id of hit button should be copied
133
+ * \returns 0 on success or a negative error code on failure; call
134
+ * SDL_GetError() for more information.
135
+ *
136
+ * \since This function is available since SDL 2.0.0.
137
+ *
138
+ * \sa SDL_ShowSimpleMessageBox
120
139
  */
121
140
  extern DECLSPEC int SDLCALL SDL_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid);
122
141
 
123
142
  /**
124
- * \brief Create a simple modal message box
143
+ * Display a simple modal message box.
144
+ *
145
+ * If your needs aren't complex, this function is preferred over
146
+ * SDL_ShowMessageBox.
147
+ *
148
+ * `flags` may be any of the following:
149
+ *
150
+ * - `SDL_MESSAGEBOX_ERROR`: error dialog
151
+ * - `SDL_MESSAGEBOX_WARNING`: warning dialog
152
+ * - `SDL_MESSAGEBOX_INFORMATION`: informational dialog
153
+ *
154
+ * This function should be called on the thread that created the parent
155
+ * window, or on the main thread if the messagebox has no parent. It will
156
+ * block execution of that thread until the user clicks a button or closes the
157
+ * messagebox.
158
+ *
159
+ * This function may be called at any time, even before SDL_Init(). This makes
160
+ * it useful for reporting errors like a failure to create a renderer or
161
+ * OpenGL context.
162
+ *
163
+ * On X11, SDL rolls its own dialog box with X11 primitives instead of a
164
+ * formal toolkit like GTK+ or Qt.
165
+ *
166
+ * Note that if SDL_Init() would fail because there isn't any available video
167
+ * target, this function is likely to fail for the same reasons. If this is a
168
+ * concern, check the return value from this function and fall back to writing
169
+ * to stderr if you can.
125
170
  *
126
- * \param flags ::SDL_MessageBoxFlags
127
- * \param title UTF-8 title text
128
- * \param message UTF-8 message text
129
- * \param window The parent window, or NULL for no parent
171
+ * \param flags an SDL_MessageBoxFlags value
172
+ * \param title UTF-8 title text
173
+ * \param message UTF-8 message text
174
+ * \param window the parent window, or NULL for no parent
175
+ * \returns 0 on success or a negative error code on failure; call
176
+ * SDL_GetError() for more information.
130
177
  *
131
- * \return 0 on success, -1 on error
178
+ * \since This function is available since SDL 2.0.0.
132
179
  *
133
- * \sa SDL_ShowMessageBox
180
+ * \sa SDL_ShowMessageBox
134
181
  */
135
182
  extern DECLSPEC int SDLCALL SDL_ShowSimpleMessageBox(Uint32 flags, const char *title, const char *message, SDL_Window *window);
136
183