ruby2d 0.11.1 → 0.11.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (371) 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/{lib → 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 +39 -25
  311. data/ext/ruby2d/gl.c +1 -1
  312. data/ext/ruby2d/gl3.c +0 -1
  313. data/ext/ruby2d/gles.c +137 -84
  314. data/ext/ruby2d/ruby2d.c +126 -32
  315. data/ext/ruby2d/ruby2d.h +53 -6
  316. data/ext/ruby2d/text.c +14 -1
  317. data/ext/ruby2d/window.c +253 -215
  318. data/lib/ruby2d/cli/build.rb +237 -59
  319. data/lib/ruby2d/cli/colorize.rb +5 -4
  320. data/lib/ruby2d/cli/platform.rb +17 -0
  321. data/lib/ruby2d/font.rb +7 -1
  322. data/lib/ruby2d/sprite.rb +7 -2
  323. data/lib/ruby2d/text.rb +1 -3
  324. data/lib/ruby2d/texture.rb +21 -21
  325. data/lib/ruby2d/tileset.rb +34 -33
  326. data/lib/ruby2d/version.rb +1 -1
  327. data/lib/ruby2d/vertices.rb +11 -6
  328. data/lib/ruby2d.rb +14 -20
  329. metadata +246 -152
  330. data/assets/README.md +0 -22
  331. data/assets/Rakefile +0 -85
  332. data/assets/macos/lib/libFLAC.a +0 -0
  333. data/assets/macos/lib/libSDL2.a +0 -0
  334. data/assets/macos/lib/libSDL2_image.a +0 -0
  335. data/assets/macos/lib/libSDL2_ttf.a +0 -0
  336. data/assets/macos/lib/libfreetype.a +0 -0
  337. data/assets/macos/lib/libjpeg.a +0 -0
  338. data/assets/macos/lib/libpng16.a +0 -0
  339. data/assets/macos/lib/libtiff.a +0 -0
  340. data/assets/macos/lib/libvorbis.a +0 -0
  341. data/assets/macos/lib/libvorbisfile.a +0 -0
  342. data/assets/macos/lib/libwebp.a +0 -0
  343. data/assets/mingw/bin/SDL2.dll +0 -0
  344. data/assets/mingw/bin/SDL2_image.dll +0 -0
  345. data/assets/mingw/bin/SDL2_mixer.dll +0 -0
  346. data/assets/mingw/bin/SDL2_ttf.dll +0 -0
  347. data/assets/mingw/bin/glew32.dll +0 -0
  348. data/assets/mingw/bin/libFLAC-8.dll +0 -0
  349. data/assets/mingw/bin/libfreetype-6.dll +0 -0
  350. data/assets/mingw/bin/libjpeg-9.dll +0 -0
  351. data/assets/mingw/bin/libmodplug-1.dll +0 -0
  352. data/assets/mingw/bin/libmpg123-0.dll +0 -0
  353. data/assets/mingw/bin/libogg-0.dll +0 -0
  354. data/assets/mingw/bin/libopus-0.dll +0 -0
  355. data/assets/mingw/bin/libopusfile-0.dll +0 -0
  356. data/assets/mingw/bin/libpng16-16.dll +0 -0
  357. data/assets/mingw/bin/libtiff-5.dll +0 -0
  358. data/assets/mingw/bin/libvorbis-0.dll +0 -0
  359. data/assets/mingw/bin/libvorbisfile-3.dll +0 -0
  360. data/assets/mingw/bin/libwebp-7.dll +0 -0
  361. data/assets/mingw/bin/zlib1.dll +0 -0
  362. data/assets/mingw/lib/libSDL2.dll.a +0 -0
  363. data/assets/mingw/lib/libSDL2_image.a +0 -0
  364. data/assets/mingw/lib/libSDL2_image.dll.a +0 -0
  365. data/assets/mingw/lib/libSDL2_mixer.a +0 -0
  366. data/assets/mingw/lib/libSDL2_mixer.dll.a +0 -0
  367. data/assets/mingw/lib/libSDL2_test.a +0 -0
  368. data/assets/mingw/lib/libSDL2_ttf.a +0 -0
  369. data/assets/mingw/lib/libSDL2_ttf.dll.a +0 -0
  370. data/assets/mingw/lib/libSDL2main.a +0 -0
  371. 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
@@ -49,59 +49,54 @@ typedef void *SDL_MetalView;
49
49
  /* @{ */
50
50
 
51
51
  /**
52
- * \brief Create a CAMetalLayer-backed NSView/UIView and attach it to the
53
- * specified window.
52
+ * Create a CAMetalLayer-backed NSView/UIView and attach it to the specified
53
+ * window.
54
54
  *
55
- * On macOS, this does *not* associate a MTLDevice with the CAMetalLayer on its
56
- * own. It is up to user code to do that.
55
+ * On macOS, this does *not* associate a MTLDevice with the CAMetalLayer on
56
+ * its own. It is up to user code to do that.
57
57
  *
58
- * The returned handle can be casted directly to a NSView or UIView.
59
- * To access the backing CAMetalLayer, call SDL_Metal_GetLayer().
58
+ * The returned handle can be casted directly to a NSView or UIView. To access
59
+ * the backing CAMetalLayer, call SDL_Metal_GetLayer().
60
60
  *
61
- * \note \a window must be created with the SDL_WINDOW_METAL flag.
61
+ * \since This function is available since SDL 2.0.12.
62
62
  *
63
- * \sa SDL_Metal_DestroyView
64
- * \sa SDL_Metal_GetLayer
63
+ * \sa SDL_Metal_DestroyView
64
+ * \sa SDL_Metal_GetLayer
65
65
  */
66
66
  extern DECLSPEC SDL_MetalView SDLCALL SDL_Metal_CreateView(SDL_Window * window);
67
67
 
68
68
  /**
69
- * \brief Destroy an existing SDL_MetalView object.
69
+ * Destroy an existing SDL_MetalView object.
70
70
  *
71
- * This should be called before SDL_DestroyWindow, if SDL_Metal_CreateView was
72
- * called after SDL_CreateWindow.
71
+ * This should be called before SDL_DestroyWindow, if SDL_Metal_CreateView was
72
+ * called after SDL_CreateWindow.
73
73
  *
74
- * \sa SDL_Metal_CreateView
74
+ * \since This function is available since SDL 2.0.12.
75
+ *
76
+ * \sa SDL_Metal_CreateView
75
77
  */
76
78
  extern DECLSPEC void SDLCALL SDL_Metal_DestroyView(SDL_MetalView view);
77
79
 
78
80
  /**
79
- * \brief Get a pointer to the backing CAMetalLayer for the given view.
81
+ * Get a pointer to the backing CAMetalLayer for the given view.
82
+ *
83
+ * \since This function is available since SDL 2.0.14.
80
84
  *
81
- * \sa SDL_MetalCreateView
85
+ * \sa SDL_MetalCreateView
82
86
  */
83
87
  extern DECLSPEC void *SDLCALL SDL_Metal_GetLayer(SDL_MetalView view);
84
88
 
85
89
  /**
86
- * \brief Get the size of a window's underlying drawable in pixels (for use
87
- * with setting viewport, scissor & etc).
88
- *
89
- * \param window SDL_Window from which the drawable size should be queried
90
- * \param w Pointer to variable for storing the width in pixels,
91
- * may be NULL
92
- * \param h Pointer to variable for storing the height in pixels,
93
- * may be NULL
90
+ * Get the size of a window's underlying drawable in pixels (for use with
91
+ * setting viewport, scissor & etc).
94
92
  *
95
- * This may differ from SDL_GetWindowSize() if we're rendering to a high-DPI
96
- * drawable, i.e. the window was created with SDL_WINDOW_ALLOW_HIGHDPI on a
97
- * platform with high-DPI support (Apple calls this "Retina"), and not disabled
98
- * by the \c SDL_HINT_VIDEO_HIGHDPI_DISABLED hint.
93
+ * \param window SDL_Window from which the drawable size should be queried
94
+ * \param w Pointer to variable for storing the width in pixels, may be NULL
99
95
  *
100
- * \note On macOS high-DPI support must be enabled for an application by
101
- * setting NSHighResolutionCapable to true in its Info.plist.
96
+ * \since This function is available since SDL 2.0.14.
102
97
  *
103
- * \sa SDL_GetWindowSize()
104
- * \sa SDL_CreateWindow()
98
+ * \sa SDL_GetWindowSize
99
+ * \sa SDL_CreateWindow
105
100
  */
106
101
  extern DECLSPEC void SDLCALL SDL_Metal_GetDrawableSize(SDL_Window* window, int *w,
107
102
  int *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
@@ -38,29 +38,33 @@ extern "C" {
38
38
  #endif
39
39
 
40
40
  /**
41
- * \brief Open an URL / URI in the browser or other
41
+ * Open a URL/URI in the browser or other appropriate external application.
42
42
  *
43
43
  * Open a URL in a separate, system-provided application. How this works will
44
- * vary wildly depending on the platform. This will likely launch what
45
- * makes sense to handle a specific URL's protocol (a web browser for http://,
46
- * etc), but it might also be able to launch file managers for directories
47
- * and other things.
44
+ * vary wildly depending on the platform. This will likely launch what makes
45
+ * sense to handle a specific URL's protocol (a web browser for `http://`,
46
+ * etc), but it might also be able to launch file managers for directories and
47
+ * other things.
48
48
  *
49
49
  * What happens when you open a URL varies wildly as well: your game window
50
- * may lose focus (and may or may not lose focus if your game was fullscreen
51
- * or grabbing input at the time). On mobile devices, your app will likely
52
- * move to the background or your process might be paused. Any given platform
53
- * may or may not handle a given URL.
50
+ * may lose focus (and may or may not lose focus if your game was fullscreen
51
+ * or grabbing input at the time). On mobile devices, your app will likely
52
+ * move to the background or your process might be paused. Any given platform
53
+ * may or may not handle a given URL.
54
54
  *
55
55
  * If this is unimplemented (or simply unavailable) for a platform, this will
56
- * fail with an error. A successful result does not mean the URL loaded, just
57
- * that we launched something to handle it (or at least believe we did).
56
+ * fail with an error. A successful result does not mean the URL loaded, just
57
+ * that we launched _something_ to handle it (or at least believe we did).
58
58
  *
59
59
  * All this to say: this function can be useful, but you should definitely
60
- * test it on every platform you target.
60
+ * test it on every platform you target.
61
61
  *
62
- * \param url A valid URL to open.
63
- * \return 0 on success, or -1 on error.
62
+ * \param url A valid URL/URI to open. Use `file:///full/path/to/file` for
63
+ * local files, if supported.
64
+ * \returns 0 on success, or -1 on error; call SDL_GetError() for more
65
+ * information.
66
+ *
67
+ * \since This function is available since SDL 2.0.14.
64
68
  */
65
69
  extern DECLSPEC int SDLCALL SDL_OpenURL(const char *url);
66
70
 
@@ -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
@@ -72,150 +72,240 @@ typedef enum
72
72
  /* Function prototypes */
73
73
 
74
74
  /**
75
- * \brief Get the window which currently has mouse focus.
75
+ * Get the window which currently has mouse focus.
76
+ *
77
+ * \returns the window with mouse focus.
78
+ *
79
+ * \since This function is available since SDL 2.0.0.
76
80
  */
77
81
  extern DECLSPEC SDL_Window * SDLCALL SDL_GetMouseFocus(void);
78
82
 
79
83
  /**
80
- * \brief Retrieve the current state of the mouse.
84
+ * Retrieve the current state of the mouse.
85
+ *
86
+ * The current button state is returned as a button bitmask, which can be
87
+ * tested using the `SDL_BUTTON(X)` macros (where `X` is generally 1 for the
88
+ * left, 2 for middle, 3 for the right button), and `x` and `y` are set to the
89
+ * mouse cursor position relative to the focus window. You can pass NULL for
90
+ * either `x` or `y`.
91
+ *
92
+ * \param x the x coordinate of the mouse cursor position relative to the
93
+ * focus window
94
+ * \param y the y coordinate of the mouse cursor position relative to the
95
+ * focus window
96
+ * \returns a 32-bit button bitmask of the current button state.
81
97
  *
82
- * The current button state is returned as a button bitmask, which can
83
- * be tested using the SDL_BUTTON(X) macros, and x and y are set to the
84
- * mouse cursor position relative to the focus window for the currently
85
- * selected mouse. You can pass NULL for either x or y.
98
+ * \since This function is available since SDL 2.0.0.
99
+ *
100
+ * \sa SDL_GetGlobalMouseState
101
+ * \sa SDL_GetRelativeMouseState
102
+ * \sa SDL_PumpEvents
86
103
  */
87
104
  extern DECLSPEC Uint32 SDLCALL SDL_GetMouseState(int *x, int *y);
88
105
 
89
106
  /**
90
- * \brief Get the current state of the mouse, in relation to the desktop
91
- *
92
- * This works just like SDL_GetMouseState(), but the coordinates will be
93
- * reported relative to the top-left of the desktop. This can be useful if
94
- * you need to track the mouse outside of a specific window and
95
- * SDL_CaptureMouse() doesn't fit your needs. For example, it could be
96
- * useful if you need to track the mouse while dragging a window, where
97
- * coordinates relative to a window might not be in sync at all times.
98
- *
99
- * \note SDL_GetMouseState() returns the mouse position as SDL understands
100
- * it from the last pump of the event queue. This function, however,
101
- * queries the OS for the current mouse position, and as such, might
102
- * be a slightly less efficient function. Unless you know what you're
103
- * doing and have a good reason to use this function, you probably want
104
- * SDL_GetMouseState() instead.
105
- *
106
- * \param x Returns the current X coord, relative to the desktop. Can be NULL.
107
- * \param y Returns the current Y coord, relative to the desktop. Can be NULL.
108
- * \return The current button state as a bitmask, which can be tested using the SDL_BUTTON(X) macros.
109
- *
110
- * \sa SDL_GetMouseState
107
+ * Get the current state of the mouse in relation to the desktop.
108
+ *
109
+ * This works similarly to SDL_GetMouseState(), but the coordinates will be
110
+ * reported relative to the top-left of the desktop. This can be useful if you
111
+ * need to track the mouse outside of a specific window and SDL_CaptureMouse()
112
+ * doesn't fit your needs. For example, it could be useful if you need to
113
+ * track the mouse while dragging a window, where coordinates relative to a
114
+ * window might not be in sync at all times.
115
+ *
116
+ * Note: SDL_GetMouseState() returns the mouse position as SDL understands it
117
+ * from the last pump of the event queue. This function, however, queries the
118
+ * OS for the current mouse position, and as such, might be a slightly less
119
+ * efficient function. Unless you know what you're doing and have a good
120
+ * reason to use this function, you probably want SDL_GetMouseState() instead.
121
+ *
122
+ * \param x filled in with the current X coord relative to the desktop; can be
123
+ * NULL
124
+ * \param y filled in with the current Y coord relative to the desktop; can be
125
+ * NULL
126
+ * \returns the current button state as a bitmask which can be tested using
127
+ * the SDL_BUTTON(X) macros.
128
+ *
129
+ * \since This function is available since SDL 2.0.4.
130
+ *
131
+ * \sa SDL_CaptureMouse
111
132
  */
112
133
  extern DECLSPEC Uint32 SDLCALL SDL_GetGlobalMouseState(int *x, int *y);
113
134
 
114
135
  /**
115
- * \brief Retrieve the relative state of the mouse.
136
+ * Retrieve the relative state of the mouse.
137
+ *
138
+ * The current button state is returned as a button bitmask, which can be
139
+ * tested using the `SDL_BUTTON(X)` macros (where `X` is generally 1 for the
140
+ * left, 2 for middle, 3 for the right button), and `x` and `y` are set to the
141
+ * mouse deltas since the last call to SDL_GetRelativeMouseState() or since
142
+ * event initialization. You can pass NULL for either `x` or `y`.
143
+ *
144
+ * \param x a pointer filled with the last recorded x coordinate of the mouse
145
+ * \param y a pointer filled with the last recorded y coordinate of the mouse
146
+ * \returns a 32-bit button bitmask of the relative button state.
116
147
  *
117
- * The current button state is returned as a button bitmask, which can
118
- * be tested using the SDL_BUTTON(X) macros, and x and y are set to the
119
- * mouse deltas since the last call to SDL_GetRelativeMouseState().
148
+ * \since This function is available since SDL 2.0.0.
149
+ *
150
+ * \sa SDL_GetMouseState
120
151
  */
121
152
  extern DECLSPEC Uint32 SDLCALL SDL_GetRelativeMouseState(int *x, int *y);
122
153
 
123
154
  /**
124
- * \brief Moves the mouse to the given position within the window.
155
+ * Move the mouse cursor to the given position within the window.
156
+ *
157
+ * This function generates a mouse motion event.
158
+ *
159
+ * Note that this function will appear to succeed, but not actually move the
160
+ * mouse when used over Microsoft Remote Desktop.
125
161
  *
126
- * \param window The window to move the mouse into, or NULL for the current mouse focus
127
- * \param x The x coordinate within the window
128
- * \param y The y coordinate within the window
162
+ * \param window the window to move the mouse into, or NULL for the current
163
+ * mouse focus
164
+ * \param x the x coordinate within the window
165
+ * \param y the y coordinate within the window
129
166
  *
130
- * \note This function generates a mouse motion event
167
+ * \since This function is available since SDL 2.0.0.
168
+ *
169
+ * \sa SDL_WarpMouseGlobal
131
170
  */
132
171
  extern DECLSPEC void SDLCALL SDL_WarpMouseInWindow(SDL_Window * window,
133
172
  int x, int y);
134
173
 
135
174
  /**
136
- * \brief Moves the mouse to the given position in global screen space.
175
+ * Move the mouse to the given position in global screen space.
176
+ *
177
+ * This function generates a mouse motion event.
178
+ *
179
+ * A failure of this function usually means that it is unsupported by a
180
+ * platform.
181
+ *
182
+ * Note that this function will appear to succeed, but not actually move the
183
+ * mouse when used over Microsoft Remote Desktop.
137
184
  *
138
- * \param x The x coordinate
139
- * \param y The y coordinate
140
- * \return 0 on success, -1 on error (usually: unsupported by a platform).
185
+ * \param x the x coordinate
186
+ * \param y the y coordinate
187
+ * \returns 0 on success or a negative error code on failure; call
188
+ * SDL_GetError() for more information.
141
189
  *
142
- * \note This function generates a mouse motion event
190
+ * \since This function is available since SDL 2.0.4.
191
+ *
192
+ * \sa SDL_WarpMouseInWindow
143
193
  */
144
194
  extern DECLSPEC int SDLCALL SDL_WarpMouseGlobal(int x, int y);
145
195
 
146
196
  /**
147
- * \brief Set relative mouse mode.
197
+ * Set relative mouse mode.
198
+ *
199
+ * While the mouse is in relative mode, the cursor is hidden, and the driver
200
+ * will try to report continuous motion in the current window. Only relative
201
+ * motion events will be delivered, the mouse position will not change.
202
+ *
203
+ * Note that this function will not be able to provide continuous relative
204
+ * motion when used over Microsoft Remote Desktop, instead motion is limited
205
+ * to the bounds of the screen.
148
206
  *
149
- * \param enabled Whether or not to enable relative mode
207
+ * This function will flush any pending mouse motion.
150
208
  *
151
- * \return 0 on success, or -1 if relative mode is not supported.
209
+ * \param enabled SDL_TRUE to enable relative mode, SDL_FALSE to disable.
210
+ * \returns 0 on success or a negative error code on failure; call
211
+ * SDL_GetError() for more information.
152
212
  *
153
- * While the mouse is in relative mode, the cursor is hidden, and the
154
- * driver will try to report continuous motion in the current window.
155
- * Only relative motion events will be delivered, the mouse position
156
- * will not change.
213
+ * If relative mode is not supported, this returns -1.
157
214
  *
158
- * \note This function will flush any pending mouse motion.
215
+ * \since This function is available since SDL 2.0.0.
159
216
  *
160
- * \sa SDL_GetRelativeMouseMode()
217
+ * \sa SDL_GetRelativeMouseMode
161
218
  */
162
219
  extern DECLSPEC int SDLCALL SDL_SetRelativeMouseMode(SDL_bool enabled);
163
220
 
164
221
  /**
165
- * \brief Capture the mouse, to track input outside an SDL window.
222
+ * Capture the mouse and to track input outside an SDL window.
166
223
  *
167
- * \param enabled Whether or not to enable capturing
224
+ * Capturing enables your app to obtain mouse events globally, instead of just
225
+ * within your window. Not all video targets support this function. When
226
+ * capturing is enabled, the current window will get all mouse events, but
227
+ * unlike relative mode, no change is made to the cursor and it is not
228
+ * restrained to your window.
168
229
  *
169
- * Capturing enables your app to obtain mouse events globally, instead of
170
- * just within your window. Not all video targets support this function.
171
- * When capturing is enabled, the current window will get all mouse events,
172
- * but unlike relative mode, no change is made to the cursor and it is
173
- * not restrained to your window.
230
+ * This function may also deny mouse input to other windows--both those in
231
+ * your application and others on the system--so you should use this function
232
+ * sparingly, and in small bursts. For example, you might want to track the
233
+ * mouse while the user is dragging something, until the user releases a mouse
234
+ * button. It is not recommended that you capture the mouse for long periods
235
+ * of time, such as the entire time your app is running. For that, you should
236
+ * probably use SDL_SetRelativeMouseMode() or SDL_SetWindowGrab(), depending
237
+ * on your goals.
174
238
  *
175
- * This function may also deny mouse input to other windows--both those in
176
- * your application and others on the system--so you should use this
177
- * function sparingly, and in small bursts. For example, you might want to
178
- * track the mouse while the user is dragging something, until the user
179
- * releases a mouse button. It is not recommended that you capture the mouse
180
- * for long periods of time, such as the entire time your app is running.
239
+ * While captured, mouse events still report coordinates relative to the
240
+ * current (foreground) window, but those coordinates may be outside the
241
+ * bounds of the window (including negative values). Capturing is only allowed
242
+ * for the foreground window. If the window loses focus while capturing, the
243
+ * capture will be disabled automatically.
181
244
  *
182
- * While captured, mouse events still report coordinates relative to the
183
- * current (foreground) window, but those coordinates may be outside the
184
- * bounds of the window (including negative values). Capturing is only
185
- * allowed for the foreground window. If the window loses focus while
186
- * capturing, the capture will be disabled automatically.
245
+ * While capturing is enabled, the current window will have the
246
+ * `SDL_WINDOW_MOUSE_CAPTURE` flag set.
187
247
  *
188
- * While capturing is enabled, the current window will have the
189
- * SDL_WINDOW_MOUSE_CAPTURE flag set.
248
+ * \param enabled SDL_TRUE to enable capturing, SDL_FALSE to disable.
249
+ * \returns 0 on success or -1 if not supported; call SDL_GetError() for more
250
+ * information.
190
251
  *
191
- * \return 0 on success, or -1 if not supported.
252
+ * \since This function is available since SDL 2.0.4.
253
+ *
254
+ * \sa SDL_GetGlobalMouseState
192
255
  */
193
256
  extern DECLSPEC int SDLCALL SDL_CaptureMouse(SDL_bool enabled);
194
257
 
195
258
  /**
196
- * \brief Query whether relative mouse mode is enabled.
259
+ * Query whether relative mouse mode is enabled.
260
+ *
261
+ * \returns SDL_TRUE if relative mode is enabled or SDL_FALSE otherwise.
197
262
  *
198
- * \sa SDL_SetRelativeMouseMode()
263
+ * \since This function is available since SDL 2.0.0.
264
+ *
265
+ * \sa SDL_SetRelativeMouseMode
199
266
  */
200
267
  extern DECLSPEC SDL_bool SDLCALL SDL_GetRelativeMouseMode(void);
201
268
 
202
269
  /**
203
- * \brief Create a cursor, using the specified bitmap data and
204
- * mask (in MSB format).
205
- *
206
- * The cursor width must be a multiple of 8 bits.
207
- *
208
- * The cursor is created in black and white according to the following:
209
- * <table>
210
- * <tr><td> data </td><td> mask </td><td> resulting pixel on screen </td></tr>
211
- * <tr><td> 0 </td><td> 1 </td><td> White </td></tr>
212
- * <tr><td> 1 </td><td> 1 </td><td> Black </td></tr>
213
- * <tr><td> 0 </td><td> 0 </td><td> Transparent </td></tr>
214
- * <tr><td> 1 </td><td> 0 </td><td> Inverted color if possible, black
215
- * if not. </td></tr>
216
- * </table>
217
- *
218
- * \sa SDL_FreeCursor()
270
+ * Create a cursor using the specified bitmap data and mask (in MSB format).
271
+ *
272
+ * `mask` has to be in MSB (Most Significant Bit) format.
273
+ *
274
+ * The cursor width (`w`) must be a multiple of 8 bits.
275
+ *
276
+ * The cursor is created in black and white according to the following:
277
+ *
278
+ * - data=0, mask=1: white
279
+ * - data=1, mask=1: black
280
+ * - data=0, mask=0: transparent
281
+ * - data=1, mask=0: inverted color if possible, black if not.
282
+ *
283
+ * Cursors created with this function must be freed with SDL_FreeCursor().
284
+ *
285
+ * If you want to have a color cursor, or create your cursor from an
286
+ * SDL_Surface, you should use SDL_CreateColorCursor(). Alternately, you can
287
+ * hide the cursor and draw your own as part of your game's rendering, but it
288
+ * will be bound to the framerate.
289
+ *
290
+ * Also, since SDL 2.0.0, SDL_CreateSystemCursor() is available, which
291
+ * provides twelve readily available system cursors to pick from.
292
+ *
293
+ * \param data the color value for each pixel of the cursor
294
+ * \param mask the mask value for each pixel of the cursor
295
+ * \param w the width of the cursor
296
+ * \param h the height of the cursor
297
+ * \param hot_x the X-axis location of the upper left corner of the cursor
298
+ * relative to the actual mouse position
299
+ * \param hot_y the Y-axis location of the upper left corner of the cursor
300
+ * relative to the actual mouse position
301
+ * \returns a new cursor with the specified parameters on success or NULL on
302
+ * failure; call SDL_GetError() for more information.
303
+ *
304
+ * \since This function is available since SDL 2.0.0.
305
+ *
306
+ * \sa SDL_FreeCursor
307
+ * \sa SDL_SetCursor
308
+ * \sa SDL_ShowCursor
219
309
  */
220
310
  extern DECLSPEC SDL_Cursor *SDLCALL SDL_CreateCursor(const Uint8 * data,
221
311
  const Uint8 * mask,
@@ -223,60 +313,123 @@ extern DECLSPEC SDL_Cursor *SDLCALL SDL_CreateCursor(const Uint8 * data,
223
313
  int hot_y);
224
314
 
225
315
  /**
226
- * \brief Create a color cursor.
316
+ * Create a color cursor.
317
+ *
318
+ * \param surface an SDL_Surface structure representing the cursor image
319
+ * \param hot_x the x position of the cursor hot spot
320
+ * \param hot_y the y position of the cursor hot spot
321
+ * \returns the new cursor on success or NULL on failure; call SDL_GetError()
322
+ * for more information.
323
+ *
324
+ * \since This function is available since SDL 2.0.0.
227
325
  *
228
- * \sa SDL_FreeCursor()
326
+ * \sa SDL_CreateCursor
327
+ * \sa SDL_FreeCursor
229
328
  */
230
329
  extern DECLSPEC SDL_Cursor *SDLCALL SDL_CreateColorCursor(SDL_Surface *surface,
231
330
  int hot_x,
232
331
  int hot_y);
233
332
 
234
333
  /**
235
- * \brief Create a system cursor.
334
+ * Create a system cursor.
236
335
  *
237
- * \sa SDL_FreeCursor()
336
+ * \param id an SDL_SystemCursor enum value
337
+ * \returns a cursor on success or NULL on failure; call SDL_GetError() for
338
+ * more information.
339
+ *
340
+ * \since This function is available since SDL 2.0.0.
341
+ *
342
+ * \sa SDL_FreeCursor
238
343
  */
239
344
  extern DECLSPEC SDL_Cursor *SDLCALL SDL_CreateSystemCursor(SDL_SystemCursor id);
240
345
 
241
346
  /**
242
- * \brief Set the active cursor.
347
+ * Set the active cursor.
348
+ *
349
+ * This function sets the currently active cursor to the specified one. If the
350
+ * cursor is currently visible, the change will be immediately represented on
351
+ * the display. SDL_SetCursor(NULL) can be used to force cursor redraw, if
352
+ * this is desired for any reason.
353
+ *
354
+ * \param cursor a cursor to make active
355
+ *
356
+ * \since This function is available since SDL 2.0.0.
357
+ *
358
+ * \sa SDL_CreateCursor
359
+ * \sa SDL_GetCursor
360
+ * \sa SDL_ShowCursor
243
361
  */
244
362
  extern DECLSPEC void SDLCALL SDL_SetCursor(SDL_Cursor * cursor);
245
363
 
246
364
  /**
247
- * \brief Return the active cursor.
365
+ * Get the active cursor.
366
+ *
367
+ * This function returns a pointer to the current cursor which is owned by the
368
+ * library. It is not necessary to free the cursor with SDL_FreeCursor().
369
+ *
370
+ * \returns the active cursor or NULL if there is no mouse.
371
+ *
372
+ * \since This function is available since SDL 2.0.0.
373
+ *
374
+ * \sa SDL_SetCursor
248
375
  */
249
376
  extern DECLSPEC SDL_Cursor *SDLCALL SDL_GetCursor(void);
250
377
 
251
378
  /**
252
- * \brief Return the default cursor.
379
+ * Get the default cursor.
380
+ *
381
+ * \returns the default cursor on success or NULL on failure.
382
+ *
383
+ * \since This function is available since SDL 2.0.0.
384
+ *
385
+ * \sa SDL_CreateSystemCursor
253
386
  */
254
387
  extern DECLSPEC SDL_Cursor *SDLCALL SDL_GetDefaultCursor(void);
255
388
 
256
389
  /**
257
- * \brief Frees a cursor created with SDL_CreateCursor() or similar functions.
390
+ * Free a previously-created cursor.
391
+ *
392
+ * Use this function to free cursor resources created with SDL_CreateCursor(),
393
+ * SDL_CreateColorCursor() or SDL_CreateSystemCursor().
258
394
  *
259
- * \sa SDL_CreateCursor()
260
- * \sa SDL_CreateColorCursor()
261
- * \sa SDL_CreateSystemCursor()
395
+ * \param cursor the cursor to free
396
+ *
397
+ * \since This function is available since SDL 2.0.0.
398
+ *
399
+ * \sa SDL_CreateColorCursor
400
+ * \sa SDL_CreateCursor
401
+ * \sa SDL_CreateSystemCursor
262
402
  */
263
403
  extern DECLSPEC void SDLCALL SDL_FreeCursor(SDL_Cursor * cursor);
264
404
 
265
405
  /**
266
- * \brief Toggle whether or not the cursor is shown.
406
+ * Toggle whether or not the cursor is shown.
407
+ *
408
+ * The cursor starts off displayed but can be turned off. Passing `SDL_ENABLE`
409
+ * displays the cursor and passing `SDL_DISABLE` hides it.
410
+ *
411
+ * The current state of the mouse cursor can be queried by passing
412
+ * `SDL_QUERY`; either `SDL_DISABLE` or `SDL_ENABLE` will be returned.
267
413
  *
268
- * \param toggle 1 to show the cursor, 0 to hide it, -1 to query the current
269
- * state.
414
+ * \param toggle `SDL_ENABLE` to show the cursor, `SDL_DISABLE` to hide it,
415
+ * `SDL_QUERY` to query the current state without changing it.
416
+ * \returns `SDL_ENABLE` if the cursor is shown, or `SDL_DISABLE` if the
417
+ * cursor is hidden, or a negative error code on failure; call
418
+ * SDL_GetError() for more information.
270
419
  *
271
- * \return 1 if the cursor is shown, or 0 if the cursor is hidden.
420
+ * \since This function is available since SDL 2.0.0.
421
+ *
422
+ * \sa SDL_CreateCursor
423
+ * \sa SDL_SetCursor
272
424
  */
273
425
  extern DECLSPEC int SDLCALL SDL_ShowCursor(int toggle);
274
426
 
275
427
  /**
276
- * Used as a mask when testing buttons in buttonstate.
277
- * - Button 1: Left mouse button
278
- * - Button 2: Middle mouse button
279
- * - Button 3: Right mouse button
428
+ * Used as a mask when testing buttons in buttonstate.
429
+ *
430
+ * - Button 1: Left mouse button
431
+ * - Button 2: Middle mouse button
432
+ * - Button 3: Right mouse button
280
433
  */
281
434
  #define SDL_BUTTON(X) (1 << ((X)-1))
282
435
  #define SDL_BUTTON_LEFT 1
@@ -290,7 +443,6 @@ extern DECLSPEC int SDLCALL SDL_ShowCursor(int toggle);
290
443
  #define SDL_BUTTON_X1MASK SDL_BUTTON(SDL_BUTTON_X1)
291
444
  #define SDL_BUTTON_X2MASK SDL_BUTTON(SDL_BUTTON_X2)
292
445
 
293
-
294
446
  /* Ends C function definitions when using C++ */
295
447
  #ifdef __cplusplus
296
448
  }