ruby2d 0.12.1 → 1.0.0

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 (620) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE.md +7 -0
  3. data/README.md +141 -0
  4. data/USAGE.md +2435 -0
  5. data/assets/Rakefile +637 -0
  6. data/assets/build_support/CMakeLists.txt +94 -0
  7. data/assets/build_support/mruby/build_config.rb +34 -0
  8. data/assets/build_support/mruby/build_config_wasm.rb +30 -0
  9. data/assets/build_support/sdl_test.c +174 -0
  10. data/assets/deps.yaml +16 -0
  11. data/assets/platform/include/SDL3/SDL.h +91 -0
  12. data/assets/platform/include/SDL3/SDL_assert.h +705 -0
  13. data/assets/platform/include/SDL3/SDL_asyncio.h +550 -0
  14. data/assets/platform/include/SDL3/SDL_atomic.h +692 -0
  15. data/assets/platform/include/SDL3/SDL_audio.h +2370 -0
  16. data/assets/platform/include/SDL3/SDL_begin_code.h +553 -0
  17. data/assets/{include/SDL2 → platform/include/SDL3}/SDL_bits.h +47 -27
  18. data/assets/{include/SDL2 → platform/include/SDL3}/SDL_blendmode.h +59 -55
  19. data/assets/platform/include/SDL3/SDL_camera.h +535 -0
  20. data/assets/platform/include/SDL3/SDL_clipboard.h +331 -0
  21. data/assets/{include/SDL2/close_code.h → platform/include/SDL3/SDL_close_code.h} +9 -8
  22. data/assets/{include/SDL2 → platform/include/SDL3}/SDL_copying.h +3 -1
  23. data/assets/platform/include/SDL3/SDL_cpuinfo.h +374 -0
  24. data/assets/platform/include/SDL3/SDL_dialog.h +343 -0
  25. data/assets/platform/include/SDL3/SDL_dlopennote.h +234 -0
  26. data/assets/{include/SDL2 → platform/include/SDL3}/SDL_egl.h +11 -8
  27. data/assets/platform/include/SDL3/SDL_endian.h +645 -0
  28. data/assets/platform/include/SDL3/SDL_error.h +226 -0
  29. data/assets/platform/include/SDL3/SDL_events.h +1645 -0
  30. data/assets/platform/include/SDL3/SDL_filesystem.h +537 -0
  31. data/assets/platform/include/SDL3/SDL_gamepad.h +1656 -0
  32. data/assets/platform/include/SDL3/SDL_gpu.h +4608 -0
  33. data/assets/platform/include/SDL3/SDL_guid.h +106 -0
  34. data/assets/platform/include/SDL3/SDL_haptic.h +1461 -0
  35. data/assets/platform/include/SDL3/SDL_hidapi.h +571 -0
  36. data/assets/platform/include/SDL3/SDL_hints.h +5001 -0
  37. data/assets/platform/include/SDL3/SDL_init.h +507 -0
  38. data/assets/platform/include/SDL3/SDL_intrin.h +410 -0
  39. data/assets/platform/include/SDL3/SDL_iostream.h +1379 -0
  40. data/assets/platform/include/SDL3/SDL_joystick.h +1385 -0
  41. data/assets/platform/include/SDL3/SDL_keyboard.h +608 -0
  42. data/assets/platform/include/SDL3/SDL_keycode.h +347 -0
  43. data/assets/platform/include/SDL3/SDL_loadso.h +145 -0
  44. data/assets/{include/SDL2 → platform/include/SDL3}/SDL_locale.h +40 -24
  45. data/assets/platform/include/SDL3/SDL_log.h +541 -0
  46. data/assets/platform/include/SDL3/SDL_main.h +704 -0
  47. data/assets/platform/include/SDL3/SDL_main_impl.h +151 -0
  48. data/assets/{include/SDL2 → platform/include/SDL3}/SDL_messagebox.h +85 -48
  49. data/assets/{include/SDL2 → platform/include/SDL3}/SDL_metal.h +29 -29
  50. data/assets/{include/SDL2 → platform/include/SDL3}/SDL_misc.h +13 -12
  51. data/assets/platform/include/SDL3/SDL_mouse.h +813 -0
  52. data/assets/platform/include/SDL3/SDL_mutex.h +1117 -0
  53. data/assets/platform/include/SDL3/SDL_oldnames.h +1339 -0
  54. data/assets/{include/SDL2 → platform/include/SDL3}/SDL_opengl.h +1247 -278
  55. data/assets/{include/SDL2 → platform/include/SDL3}/SDL_opengl_glext.h +5 -1
  56. data/assets/{include/SDL2 → platform/include/SDL3}/SDL_opengles.h +6 -7
  57. data/assets/{include/SDL2 → platform/include/SDL3}/SDL_opengles2.h +10 -11
  58. data/assets/platform/include/SDL3/SDL_pen.h +198 -0
  59. data/assets/platform/include/SDL3/SDL_pixels.h +1441 -0
  60. data/assets/{include/SDL2/SDL_test_log.h → platform/include/SDL3/SDL_platform.h} +25 -26
  61. data/assets/platform/include/SDL3/SDL_platform_defines.h +497 -0
  62. data/assets/{include/SDL2 → platform/include/SDL3}/SDL_power.h +40 -20
  63. data/assets/platform/include/SDL3/SDL_process.h +441 -0
  64. data/assets/platform/include/SDL3/SDL_properties.h +572 -0
  65. data/assets/platform/include/SDL3/SDL_rect.h +528 -0
  66. data/assets/platform/include/SDL3/SDL_render.h +3028 -0
  67. data/assets/platform/include/SDL3/SDL_revision.h +59 -0
  68. data/assets/{include/SDL2 → platform/include/SDL3}/SDL_scancode.h +59 -68
  69. data/assets/platform/include/SDL3/SDL_sensor.h +321 -0
  70. data/assets/platform/include/SDL3/SDL_stdinc.h +6186 -0
  71. data/assets/platform/include/SDL3/SDL_storage.h +686 -0
  72. data/assets/platform/include/SDL3/SDL_surface.h +1769 -0
  73. data/assets/platform/include/SDL3/SDL_system.h +840 -0
  74. data/assets/{include/SDL2 → platform/include/SDL3}/SDL_test.h +16 -22
  75. data/assets/{include/SDL2 → platform/include/SDL3}/SDL_test_assert.h +27 -34
  76. data/assets/{include/SDL2 → platform/include/SDL3}/SDL_test_common.h +109 -52
  77. data/assets/{include/SDL2 → platform/include/SDL3}/SDL_test_compare.h +22 -14
  78. data/assets/{include/SDL2 → platform/include/SDL3}/SDL_test_crc32.h +27 -30
  79. data/assets/{include/SDL2 → platform/include/SDL3}/SDL_test_font.h +50 -49
  80. data/assets/{include/SDL2 → platform/include/SDL3}/SDL_test_fuzzer.h +64 -79
  81. data/assets/{include/SDL2 → platform/include/SDL3}/SDL_test_harness.h +47 -30
  82. data/assets/platform/include/SDL3/SDL_test_log.h +83 -0
  83. data/assets/{include/SDL2 → platform/include/SDL3}/SDL_test_md5.h +21 -28
  84. data/assets/{include/SDL2 → platform/include/SDL3}/SDL_test_memory.h +19 -16
  85. data/assets/platform/include/SDL3/SDL_thread.h +602 -0
  86. data/assets/platform/include/SDL3/SDL_time.h +249 -0
  87. data/assets/platform/include/SDL3/SDL_timer.h +454 -0
  88. data/assets/platform/include/SDL3/SDL_touch.h +184 -0
  89. data/assets/platform/include/SDL3/SDL_tray.h +544 -0
  90. data/assets/platform/include/SDL3/SDL_version.h +198 -0
  91. data/assets/platform/include/SDL3/SDL_video.h +3497 -0
  92. data/assets/platform/include/SDL3/SDL_vulkan.h +287 -0
  93. data/assets/platform/include/SDL3_image/SDL_image.h +3328 -0
  94. data/assets/platform/include/SDL3_mixer/SDL_mixer.h +3369 -0
  95. data/assets/platform/include/SDL3_ttf/SDL_textengine.h +181 -0
  96. data/assets/platform/include/SDL3_ttf/SDL_ttf.h +2833 -0
  97. data/assets/{include → platform/include}/mrbconf.h +42 -31
  98. data/assets/{include → platform/include}/mruby/array.h +3 -4
  99. data/assets/{include → platform/include}/mruby/boxing_nan.h +10 -0
  100. data/assets/platform/include/mruby/boxing_no.h +59 -0
  101. data/assets/{include → platform/include}/mruby/boxing_word.h +72 -26
  102. data/assets/platform/include/mruby/class.h +157 -0
  103. data/assets/{include → platform/include}/mruby/common.h +30 -1
  104. data/assets/{include → platform/include}/mruby/compile.h +52 -74
  105. data/assets/{include → platform/include}/mruby/data.h +2 -2
  106. data/assets/{include → platform/include}/mruby/debug.h +12 -5
  107. data/assets/{include → platform/include}/mruby/dump.h +7 -9
  108. data/assets/{include → platform/include}/mruby/endian.h +1 -1
  109. data/assets/platform/include/mruby/error.h +173 -0
  110. data/assets/platform/include/mruby/gc.h +79 -0
  111. data/assets/{include → platform/include}/mruby/hash.h +1 -7
  112. data/assets/platform/include/mruby/internal.h +282 -0
  113. data/assets/platform/include/mruby/irep.h +143 -0
  114. data/assets/{include → platform/include}/mruby/istruct.h +1 -1
  115. data/assets/platform/include/mruby/khash.h +455 -0
  116. data/assets/platform/include/mruby/mempool.h +19 -0
  117. data/assets/{include → platform/include}/mruby/numeric.h +7 -10
  118. data/assets/platform/include/mruby/object.h +51 -0
  119. data/assets/{include → platform/include}/mruby/opcode.h +5 -5
  120. data/assets/{include → platform/include}/mruby/ops.h +19 -6
  121. data/assets/platform/include/mruby/presym/id.h +1447 -0
  122. data/assets/{include → platform/include}/mruby/presym/scanning.h +10 -7
  123. data/assets/platform/include/mruby/presym/table.h +2893 -0
  124. data/assets/platform/include/mruby/presym.h +65 -0
  125. data/assets/platform/include/mruby/proc.h +184 -0
  126. data/assets/{include → platform/include}/mruby/range.h +0 -2
  127. data/assets/{include → platform/include}/mruby/string.h +33 -53
  128. data/assets/platform/include/mruby/throw.h +81 -0
  129. data/assets/{include → platform/include}/mruby/value.h +64 -29
  130. data/assets/{include → platform/include}/mruby/variable.h +6 -23
  131. data/assets/{include → platform/include}/mruby/version.h +7 -7
  132. data/assets/{include → platform/include}/mruby.h +238 -116
  133. data/assets/platform/macos-arm64/bin/mrbc +0 -0
  134. data/assets/platform/macos-arm64/lib/libSDL3.a +0 -0
  135. data/assets/platform/macos-arm64/lib/libSDL3_image.a +0 -0
  136. data/assets/platform/macos-arm64/lib/libSDL3_mixer.a +0 -0
  137. data/assets/platform/macos-arm64/lib/libSDL3_ttf.a +0 -0
  138. data/assets/platform/macos-arm64/lib/libmruby.a +0 -0
  139. data/assets/platform/wasm/lib/libFLAC.a +0 -0
  140. data/assets/platform/wasm/lib/libSDL3.a +0 -0
  141. data/assets/platform/wasm/lib/libSDL3_image.a +0 -0
  142. data/assets/platform/wasm/lib/libSDL3_mixer.a +0 -0
  143. data/assets/platform/wasm/lib/libSDL3_ttf.a +0 -0
  144. data/assets/platform/wasm/lib/libfreetype.a +0 -0
  145. data/assets/platform/wasm/lib/libharfbuzz.a +0 -0
  146. data/assets/platform/wasm/lib/libmruby.a +0 -0
  147. data/assets/platform/wasm/lib/libogg.a +0 -0
  148. data/assets/platform/wasm/lib/libplutosvg.a +0 -0
  149. data/assets/platform/wasm/lib/libplutovg.a +0 -0
  150. data/assets/platform/wasm/lib/libpng.a +0 -0
  151. data/assets/platform/wasm/lib/libpng16.a +0 -0
  152. data/assets/platform/wasm/lib/libvorbis.a +0 -0
  153. data/assets/platform/wasm/lib/libvorbisfile.a +0 -0
  154. data/assets/platform/wasm/lib/libzlibstatic.a +0 -0
  155. data/assets/platform/windows-arm64-mingw-ucrt/bin/mrbc.exe +0 -0
  156. data/assets/platform/windows-arm64-mingw-ucrt/lib/libSDL3.a +0 -0
  157. data/assets/platform/windows-arm64-mingw-ucrt/lib/libSDL3_image.a +0 -0
  158. data/assets/platform/windows-arm64-mingw-ucrt/lib/libSDL3_mixer.a +0 -0
  159. data/assets/platform/windows-arm64-mingw-ucrt/lib/libSDL3_ttf.a +0 -0
  160. data/assets/platform/windows-arm64-mingw-ucrt/lib/libmruby.a +0 -0
  161. data/assets/platform/windows-x86_64-mingw-ucrt/bin/mrbc.exe +0 -0
  162. data/assets/platform/windows-x86_64-mingw-ucrt/lib/libSDL3.a +0 -0
  163. data/assets/platform/windows-x86_64-mingw-ucrt/lib/libSDL3_image.a +0 -0
  164. data/assets/platform/windows-x86_64-mingw-ucrt/lib/libSDL3_mixer.a +0 -0
  165. data/assets/platform/windows-x86_64-mingw-ucrt/lib/libSDL3_ttf.a +0 -0
  166. data/assets/platform/windows-x86_64-mingw-ucrt/lib/libmruby.a +0 -0
  167. data/assets/resources/fonts/outfit/OFL.txt +93 -0
  168. data/assets/resources/fonts/outfit/outfit.ttf +0 -0
  169. data/assets/resources/fonts/roboto_mono/OFL.txt +91 -0
  170. data/assets/resources/fonts/roboto_mono/roboto_mono.ttf +0 -0
  171. data/assets/resources/icons/icon.icns +0 -0
  172. data/assets/resources/icons/icon.png +0 -0
  173. data/assets/resources/spritesheets/License.txt +28 -0
  174. data/assets/resources/spritesheets/spritesheet-backgrounds.png +0 -0
  175. data/assets/resources/spritesheets/spritesheet-backgrounds.xml +16 -0
  176. data/assets/resources/spritesheets/spritesheet-characters.png +0 -0
  177. data/assets/resources/spritesheets/spritesheet-characters.xml +47 -0
  178. data/assets/resources/spritesheets/spritesheet-enemies.png +0 -0
  179. data/assets/resources/spritesheets/spritesheet-enemies.xml +62 -0
  180. data/assets/resources/spritesheets/spritesheet-tiles.png +0 -0
  181. data/assets/resources/spritesheets/spritesheet-tiles.xml +316 -0
  182. data/assets/{wasm → resources/web}/template.html +1 -1
  183. data/assets/target.rb +131 -0
  184. data/bin/ruby2d +281 -82
  185. data/examples/astar.rb +269 -0
  186. data/examples/asteroids.rb +403 -0
  187. data/examples/bezier_editor.rb +96 -0
  188. data/examples/boids.rb +191 -0
  189. data/examples/bouncing_balls.rb +119 -0
  190. data/examples/breakout.rb +186 -0
  191. data/examples/constellations.rb +100 -0
  192. data/examples/dashboard.rb +133 -0
  193. data/examples/double_pendulum.rb +254 -0
  194. data/examples/falling_sand.rb +291 -0
  195. data/examples/fireworks.rb +110 -0
  196. data/examples/fluid_dynamics.rb +340 -0
  197. data/examples/fourier_epicycles.rb +142 -0
  198. data/examples/fractal_tree.rb +326 -0
  199. data/examples/game_of_life.rb +148 -0
  200. data/examples/gamepads.rb +333 -0
  201. data/examples/hill_driver.rb +613 -0
  202. data/examples/logo_animation.rb +251 -0
  203. data/examples/lorenz_attractor.rb +115 -0
  204. data/examples/mandelbrot.rb +207 -0
  205. data/examples/marching_squares.rb +200 -0
  206. data/examples/maze.rb +323 -0
  207. data/examples/nbody.rb +338 -0
  208. data/examples/outrun.rb +391 -0
  209. data/examples/pixel_paint.rb +313 -0
  210. data/examples/platformer.rb +335 -0
  211. data/examples/ray_casting_maze.rb +175 -0
  212. data/examples/shadow_casting.rb +151 -0
  213. data/examples/shape_recognizer.rb +908 -0
  214. data/examples/snake.rb +144 -0
  215. data/examples/sprite_sheets.rb +246 -0
  216. data/examples/swarm.rb +206 -0
  217. data/examples/tsp_annealing.rb +104 -0
  218. data/examples/ui_controls.rb +163 -0
  219. data/examples/wireframe_3d.rb +139 -0
  220. data/ext/ruby2d/audio.c +324 -0
  221. data/ext/ruby2d/canvas.c +1715 -494
  222. data/ext/ruby2d/ext.c +541 -0
  223. data/ext/ruby2d/extconf.rb +122 -145
  224. data/ext/ruby2d/font.c +566 -20
  225. data/ext/ruby2d/fps.c +92 -0
  226. data/ext/ruby2d/image.c +466 -41
  227. data/ext/ruby2d/ruby2d.c +374 -1890
  228. data/ext/ruby2d/ruby2d.h +840 -460
  229. data/ext/ruby2d/shapes.c +931 -101
  230. data/ext/ruby2d/text.c +586 -21
  231. data/ext/ruby2d/window.c +1693 -283
  232. data/lib/ruby2d/atlas_parser.rb +194 -0
  233. data/lib/ruby2d/audio.rb +73 -0
  234. data/lib/ruby2d/benchmark.rb +259 -0
  235. data/lib/ruby2d/bitmap_text.rb +155 -0
  236. data/lib/ruby2d/button.rb +402 -0
  237. data/lib/ruby2d/canvas.rb +703 -279
  238. data/lib/ruby2d/circle.rb +206 -29
  239. data/lib/ruby2d/cli/browser.rb +314 -0
  240. data/lib/ruby2d/cli/build.rb +471 -257
  241. data/lib/ruby2d/cli/colorize.rb +7 -5
  242. data/lib/ruby2d/cli/examples.rb +127 -0
  243. data/lib/ruby2d/cli/launch.rb +24 -39
  244. data/lib/ruby2d/cli/lib_files.rb +48 -0
  245. data/lib/ruby2d/cli/messages.rb +40 -0
  246. data/lib/ruby2d/cli/setup.rb +273 -0
  247. data/lib/ruby2d/cli/static_server.rb +160 -0
  248. data/lib/ruby2d/cli/usage.rb +255 -0
  249. data/lib/ruby2d/color.rb +191 -69
  250. data/lib/ruby2d/core.rb +37 -19
  251. data/lib/ruby2d/deps_help.rb +89 -0
  252. data/lib/ruby2d/dsl.rb +51 -12
  253. data/lib/ruby2d/ellipse.rb +228 -0
  254. data/lib/ruby2d/exceptions.rb +0 -2
  255. data/lib/ruby2d/font.rb +34 -74
  256. data/lib/ruby2d/gamepad.rb +323 -0
  257. data/lib/ruby2d/gem_paths.rb +19 -0
  258. data/lib/ruby2d/image.rb +155 -52
  259. data/lib/ruby2d/interactive.rb +103 -0
  260. data/lib/ruby2d/json_parser.rb +268 -0
  261. data/lib/ruby2d/line.rb +194 -85
  262. data/lib/ruby2d/mruby_compat.rb +12 -0
  263. data/lib/ruby2d/polygon.rb +297 -0
  264. data/lib/ruby2d/polyline.rb +368 -0
  265. data/lib/ruby2d/quad.rb +358 -94
  266. data/lib/ruby2d/rectangle.rb +77 -19
  267. data/lib/ruby2d/renderable.rb +411 -11
  268. data/lib/ruby2d/sprite.rb +471 -180
  269. data/lib/ruby2d/sprite_sheet.rb +64 -0
  270. data/lib/ruby2d/square.rb +29 -17
  271. data/lib/ruby2d/text.rb +196 -65
  272. data/lib/ruby2d/tileset.rb +139 -81
  273. data/lib/ruby2d/triangle.rb +324 -89
  274. data/lib/ruby2d/version.rb +1 -3
  275. data/lib/ruby2d/vertices.rb +62 -85
  276. data/lib/ruby2d/warnings.rb +29 -0
  277. data/lib/ruby2d/window/class_methods.rb +218 -0
  278. data/lib/ruby2d/window/gamepad_events.rb +141 -0
  279. data/lib/ruby2d/window/key_events.rb +74 -0
  280. data/lib/ruby2d/window/mouse_events.rb +171 -0
  281. data/lib/ruby2d/window/object_events.rb +168 -0
  282. data/lib/ruby2d/window.rb +632 -585
  283. data/lib/ruby2d.rb +14 -19
  284. metadata +275 -443
  285. data/assets/app.icns +0 -0
  286. data/assets/include/GL/glew.h +0 -26427
  287. data/assets/include/GLES2/gl2.h +0 -656
  288. data/assets/include/GLES2/gl2ext.h +0 -3949
  289. data/assets/include/GLES2/gl2ext_angle.h +0 -701
  290. data/assets/include/GLES2/gl2platform.h +0 -27
  291. data/assets/include/GLES3/gl3.h +0 -1192
  292. data/assets/include/GLES3/gl31.h +0 -1507
  293. data/assets/include/GLES3/gl32.h +0 -1808
  294. data/assets/include/GLES3/gl3platform.h +0 -27
  295. data/assets/include/KHR/khrplatform.h +0 -290
  296. data/assets/include/SDL2/SDL.h +0 -233
  297. data/assets/include/SDL2/SDL_assert.h +0 -326
  298. data/assets/include/SDL2/SDL_atomic.h +0 -415
  299. data/assets/include/SDL2/SDL_audio.h +0 -1500
  300. data/assets/include/SDL2/SDL_clipboard.h +0 -141
  301. data/assets/include/SDL2/SDL_config.h +0 -61
  302. data/assets/include/SDL2/SDL_config_android.h +0 -194
  303. data/assets/include/SDL2/SDL_config_emscripten.h +0 -218
  304. data/assets/include/SDL2/SDL_config_iphoneos.h +0 -217
  305. data/assets/include/SDL2/SDL_config_macosx.h +0 -277
  306. data/assets/include/SDL2/SDL_config_minimal.h +0 -95
  307. data/assets/include/SDL2/SDL_config_ngage.h +0 -89
  308. data/assets/include/SDL2/SDL_config_os2.h +0 -207
  309. data/assets/include/SDL2/SDL_config_pandora.h +0 -141
  310. data/assets/include/SDL2/SDL_config_windows.h +0 -331
  311. data/assets/include/SDL2/SDL_config_wingdk.h +0 -253
  312. data/assets/include/SDL2/SDL_config_winrt.h +0 -220
  313. data/assets/include/SDL2/SDL_config_xbox.h +0 -235
  314. data/assets/include/SDL2/SDL_cpuinfo.h +0 -594
  315. data/assets/include/SDL2/SDL_endian.h +0 -348
  316. data/assets/include/SDL2/SDL_error.h +0 -163
  317. data/assets/include/SDL2/SDL_events.h +0 -1166
  318. data/assets/include/SDL2/SDL_filesystem.h +0 -149
  319. data/assets/include/SDL2/SDL_gamecontroller.h +0 -1074
  320. data/assets/include/SDL2/SDL_gesture.h +0 -117
  321. data/assets/include/SDL2/SDL_guid.h +0 -100
  322. data/assets/include/SDL2/SDL_haptic.h +0 -1341
  323. data/assets/include/SDL2/SDL_hidapi.h +0 -451
  324. data/assets/include/SDL2/SDL_hints.h +0 -2569
  325. data/assets/include/SDL2/SDL_image.h +0 -2173
  326. data/assets/include/SDL2/SDL_joystick.h +0 -1066
  327. data/assets/include/SDL2/SDL_keyboard.h +0 -353
  328. data/assets/include/SDL2/SDL_keycode.h +0 -358
  329. data/assets/include/SDL2/SDL_loadso.h +0 -115
  330. data/assets/include/SDL2/SDL_log.h +0 -404
  331. data/assets/include/SDL2/SDL_main.h +0 -275
  332. data/assets/include/SDL2/SDL_mixer.h +0 -2784
  333. data/assets/include/SDL2/SDL_mouse.h +0 -465
  334. data/assets/include/SDL2/SDL_mutex.h +0 -471
  335. data/assets/include/SDL2/SDL_name.h +0 -33
  336. data/assets/include/SDL2/SDL_pixels.h +0 -644
  337. data/assets/include/SDL2/SDL_platform.h +0 -261
  338. data/assets/include/SDL2/SDL_quit.h +0 -58
  339. data/assets/include/SDL2/SDL_rect.h +0 -376
  340. data/assets/include/SDL2/SDL_render.h +0 -1919
  341. data/assets/include/SDL2/SDL_revision.h +0 -6
  342. data/assets/include/SDL2/SDL_rwops.h +0 -841
  343. data/assets/include/SDL2/SDL_sensor.h +0 -322
  344. data/assets/include/SDL2/SDL_shape.h +0 -155
  345. data/assets/include/SDL2/SDL_stdinc.h +0 -830
  346. data/assets/include/SDL2/SDL_surface.h +0 -997
  347. data/assets/include/SDL2/SDL_system.h +0 -623
  348. data/assets/include/SDL2/SDL_syswm.h +0 -386
  349. data/assets/include/SDL2/SDL_test_images.h +0 -78
  350. data/assets/include/SDL2/SDL_test_random.h +0 -115
  351. data/assets/include/SDL2/SDL_thread.h +0 -464
  352. data/assets/include/SDL2/SDL_timer.h +0 -222
  353. data/assets/include/SDL2/SDL_touch.h +0 -150
  354. data/assets/include/SDL2/SDL_ttf.h +0 -2316
  355. data/assets/include/SDL2/SDL_types.h +0 -29
  356. data/assets/include/SDL2/SDL_version.h +0 -204
  357. data/assets/include/SDL2/SDL_video.h +0 -2150
  358. data/assets/include/SDL2/SDL_vulkan.h +0 -215
  359. data/assets/include/SDL2/begin_code.h +0 -187
  360. data/assets/include/mruby/boxing_no.h +0 -58
  361. data/assets/include/mruby/class.h +0 -108
  362. data/assets/include/mruby/error.h +0 -147
  363. data/assets/include/mruby/gc.h +0 -94
  364. data/assets/include/mruby/irep.h +0 -147
  365. data/assets/include/mruby/khash.h +0 -284
  366. data/assets/include/mruby/object.h +0 -43
  367. data/assets/include/mruby/presym/disable.h +0 -70
  368. data/assets/include/mruby/presym/enable.h +0 -37
  369. data/assets/include/mruby/presym.h +0 -40
  370. data/assets/include/mruby/proc.h +0 -211
  371. data/assets/include/mruby/throw.h +0 -66
  372. data/assets/macos/universal/bin/mrbc +0 -0
  373. data/assets/macos/universal/lib/libFLAC.a +0 -0
  374. data/assets/macos/universal/lib/libSDL2.a +0 -0
  375. data/assets/macos/universal/lib/libSDL2_image.a +0 -0
  376. data/assets/macos/universal/lib/libSDL2_mixer.a +0 -0
  377. data/assets/macos/universal/lib/libSDL2_ttf.a +0 -0
  378. data/assets/macos/universal/lib/libavif.a +0 -0
  379. data/assets/macos/universal/lib/libbrotlicommon-static.a +0 -0
  380. data/assets/macos/universal/lib/libbrotlidec-static.a +0 -0
  381. data/assets/macos/universal/lib/libfreetype.a +0 -0
  382. data/assets/macos/universal/lib/libgraphite2.a +0 -0
  383. data/assets/macos/universal/lib/libharfbuzz.a +0 -0
  384. data/assets/macos/universal/lib/libhwy.a +0 -0
  385. data/assets/macos/universal/lib/libjpeg.a +0 -0
  386. data/assets/macos/universal/lib/libjxl.a +0 -0
  387. data/assets/macos/universal/lib/libmodplug.a +0 -0
  388. data/assets/macos/universal/lib/libmpg123.a +0 -0
  389. data/assets/macos/universal/lib/libmruby.a +0 -0
  390. data/assets/macos/universal/lib/libogg.a +0 -0
  391. data/assets/macos/universal/lib/libpng.a +0 -0
  392. data/assets/macos/universal/lib/libtiff.a +0 -0
  393. data/assets/macos/universal/lib/libvorbis.a +0 -0
  394. data/assets/macos/universal/lib/libvorbisfile.a +0 -0
  395. data/assets/macos/universal/lib/libwebp.a +0 -0
  396. data/assets/macos/universal/lib/libzstd.a +0 -0
  397. data/assets/test_media/README.md +0 -3
  398. data/assets/test_media/bitstream_vera/COPYRIGHT.txt +0 -124
  399. data/assets/test_media/bitstream_vera/vera.ttf +0 -0
  400. data/assets/test_media/boom.png +0 -0
  401. data/assets/test_media/coin.png +0 -0
  402. data/assets/test_media/colors.png +0 -0
  403. data/assets/test_media/controller.png +0 -0
  404. data/assets/test_media/dial.wav +0 -0
  405. data/assets/test_media/hero.png +0 -0
  406. data/assets/test_media/image.bmp +0 -0
  407. data/assets/test_media/image.jpg +0 -0
  408. data/assets/test_media/image.png +0 -0
  409. data/assets/test_media/music.flac +0 -0
  410. data/assets/test_media/music.mp3 +0 -0
  411. data/assets/test_media/music.ogg +0 -0
  412. data/assets/test_media/music.wav +0 -0
  413. data/assets/test_media/originals/boom.pxm +0 -0
  414. data/assets/test_media/originals/coin.pxm +0 -0
  415. data/assets/test_media/originals/controller.sketch +0 -0
  416. data/assets/test_media/originals/hero.pxm +0 -0
  417. data/assets/test_media/originals/image.pxm +0 -0
  418. data/assets/test_media/originals/music.caf +0 -0
  419. data/assets/test_media/originals/texture_atlas.pxm +0 -0
  420. data/assets/test_media/rondo_alla_turka.ogg +0 -0
  421. data/assets/test_media/sound.flac +0 -0
  422. data/assets/test_media/sound.mp3 +0 -0
  423. data/assets/test_media/sound.ogg +0 -0
  424. data/assets/test_media/sound.wav +0 -0
  425. data/assets/test_media/sprite_sheet.png +0 -0
  426. data/assets/test_media/texture_atlas.png +0 -0
  427. data/assets/wasm/libmruby.a +0 -0
  428. data/assets/windows/mingw-w64-ucrt-x86_64/bin/mrbc.exe +0 -0
  429. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libFLAC.a +0 -0
  430. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libLerc.a +0 -0
  431. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libSDL2.a +0 -0
  432. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libSDL2_image.a +0 -0
  433. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libSDL2_mixer.a +0 -0
  434. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libSDL2_ttf.a +0 -0
  435. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libbrotlicommon.a +0 -0
  436. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libbrotlidec.a +0 -0
  437. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libbz2.a +0 -0
  438. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libdeflate.a +0 -0
  439. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libfreetype.a +0 -0
  440. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libglew32.a +0 -0
  441. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libgraphite2.a +0 -0
  442. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libharfbuzz.a +0 -0
  443. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libhwy.a +0 -0
  444. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libjbig.a +0 -0
  445. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libjpeg.a +0 -0
  446. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libjxl.a +0 -0
  447. data/assets/windows/mingw-w64-ucrt-x86_64/lib/liblzma.a +0 -0
  448. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libmodplug.a +0 -0
  449. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libmpg123.a +0 -0
  450. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libmruby.a +0 -0
  451. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libogg.a +0 -0
  452. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libopus.a +0 -0
  453. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libopusfile.a +0 -0
  454. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libpng.a +0 -0
  455. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libsndfile.a +0 -0
  456. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libssp.a +0 -1
  457. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libstdc++.a +0 -0
  458. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libtiff.a +0 -0
  459. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libvorbis.a +0 -0
  460. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libvorbisfile.a +0 -0
  461. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libwebp.a +0 -0
  462. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libz.a +0 -0
  463. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libzstd.a +0 -0
  464. data/assets/windows/mingw-w64-x86_64/bin/mrbc.exe +0 -0
  465. data/assets/windows/mingw-w64-x86_64/lib/libFLAC.a +0 -0
  466. data/assets/windows/mingw-w64-x86_64/lib/libLerc.a +0 -0
  467. data/assets/windows/mingw-w64-x86_64/lib/libSDL2.a +0 -0
  468. data/assets/windows/mingw-w64-x86_64/lib/libSDL2_image.a +0 -0
  469. data/assets/windows/mingw-w64-x86_64/lib/libSDL2_mixer.a +0 -0
  470. data/assets/windows/mingw-w64-x86_64/lib/libSDL2_ttf.a +0 -0
  471. data/assets/windows/mingw-w64-x86_64/lib/libbrotlicommon.a +0 -0
  472. data/assets/windows/mingw-w64-x86_64/lib/libbrotlidec.a +0 -0
  473. data/assets/windows/mingw-w64-x86_64/lib/libbz2.a +0 -0
  474. data/assets/windows/mingw-w64-x86_64/lib/libdeflate.a +0 -0
  475. data/assets/windows/mingw-w64-x86_64/lib/libfreetype.a +0 -0
  476. data/assets/windows/mingw-w64-x86_64/lib/libglew32.a +0 -0
  477. data/assets/windows/mingw-w64-x86_64/lib/libgraphite2.a +0 -0
  478. data/assets/windows/mingw-w64-x86_64/lib/libharfbuzz.a +0 -0
  479. data/assets/windows/mingw-w64-x86_64/lib/libhwy.a +0 -0
  480. data/assets/windows/mingw-w64-x86_64/lib/libjbig.a +0 -0
  481. data/assets/windows/mingw-w64-x86_64/lib/libjpeg.a +0 -0
  482. data/assets/windows/mingw-w64-x86_64/lib/libjxl.a +0 -0
  483. data/assets/windows/mingw-w64-x86_64/lib/liblzma.a +0 -0
  484. data/assets/windows/mingw-w64-x86_64/lib/libmodplug.a +0 -0
  485. data/assets/windows/mingw-w64-x86_64/lib/libmpg123.a +0 -0
  486. data/assets/windows/mingw-w64-x86_64/lib/libmruby.a +0 -0
  487. data/assets/windows/mingw-w64-x86_64/lib/libogg.a +0 -0
  488. data/assets/windows/mingw-w64-x86_64/lib/libopus.a +0 -0
  489. data/assets/windows/mingw-w64-x86_64/lib/libopusfile.a +0 -0
  490. data/assets/windows/mingw-w64-x86_64/lib/libpng.a +0 -0
  491. data/assets/windows/mingw-w64-x86_64/lib/libsndfile.a +0 -0
  492. data/assets/windows/mingw-w64-x86_64/lib/libssp.a +0 -1
  493. data/assets/windows/mingw-w64-x86_64/lib/libstdc++.a +0 -0
  494. data/assets/windows/mingw-w64-x86_64/lib/libtiff.a +0 -0
  495. data/assets/windows/mingw-w64-x86_64/lib/libvorbis.a +0 -0
  496. data/assets/windows/mingw-w64-x86_64/lib/libvorbisfile.a +0 -0
  497. data/assets/windows/mingw-w64-x86_64/lib/libwebp.a +0 -0
  498. data/assets/windows/mingw-w64-x86_64/lib/libz.a +0 -0
  499. data/assets/windows/mingw-w64-x86_64/lib/libzstd.a +0 -0
  500. data/assets/xcode/ios/Assets.xcassets/AppIcon.appiconset/Contents.json +0 -98
  501. data/assets/xcode/ios/Assets.xcassets/Contents.json +0 -6
  502. data/assets/xcode/ios/Base.lproj/LaunchScreen.storyboard +0 -27
  503. data/assets/xcode/ios/Info.plist +0 -43
  504. data/assets/xcode/ios/MRuby.framework/Headers/mrbconf.h +0 -143
  505. data/assets/xcode/ios/MRuby.framework/Headers/mruby/array.h +0 -280
  506. data/assets/xcode/ios/MRuby.framework/Headers/mruby/boxing_nan.h +0 -102
  507. data/assets/xcode/ios/MRuby.framework/Headers/mruby/boxing_no.h +0 -56
  508. data/assets/xcode/ios/MRuby.framework/Headers/mruby/boxing_word.h +0 -144
  509. data/assets/xcode/ios/MRuby.framework/Headers/mruby/class.h +0 -97
  510. data/assets/xcode/ios/MRuby.framework/Headers/mruby/common.h +0 -77
  511. data/assets/xcode/ios/MRuby.framework/Headers/mruby/compile.h +0 -195
  512. data/assets/xcode/ios/MRuby.framework/Headers/mruby/data.h +0 -75
  513. data/assets/xcode/ios/MRuby.framework/Headers/mruby/debug.h +0 -67
  514. data/assets/xcode/ios/MRuby.framework/Headers/mruby/dump.h +0 -196
  515. data/assets/xcode/ios/MRuby.framework/Headers/mruby/error.h +0 -75
  516. data/assets/xcode/ios/MRuby.framework/Headers/mruby/gc.h +0 -91
  517. data/assets/xcode/ios/MRuby.framework/Headers/mruby/hash.h +0 -215
  518. data/assets/xcode/ios/MRuby.framework/Headers/mruby/irep.h +0 -75
  519. data/assets/xcode/ios/MRuby.framework/Headers/mruby/istruct.h +0 -47
  520. data/assets/xcode/ios/MRuby.framework/Headers/mruby/khash.h +0 -274
  521. data/assets/xcode/ios/MRuby.framework/Headers/mruby/numeric.h +0 -161
  522. data/assets/xcode/ios/MRuby.framework/Headers/mruby/object.h +0 -44
  523. data/assets/xcode/ios/MRuby.framework/Headers/mruby/opcode.h +0 -69
  524. data/assets/xcode/ios/MRuby.framework/Headers/mruby/ops.h +0 -117
  525. data/assets/xcode/ios/MRuby.framework/Headers/mruby/proc.h +0 -131
  526. data/assets/xcode/ios/MRuby.framework/Headers/mruby/range.h +0 -49
  527. data/assets/xcode/ios/MRuby.framework/Headers/mruby/re.h +0 -16
  528. data/assets/xcode/ios/MRuby.framework/Headers/mruby/string.h +0 -444
  529. data/assets/xcode/ios/MRuby.framework/Headers/mruby/throw.h +0 -55
  530. data/assets/xcode/ios/MRuby.framework/Headers/mruby/value.h +0 -309
  531. data/assets/xcode/ios/MRuby.framework/Headers/mruby/variable.h +0 -136
  532. data/assets/xcode/ios/MRuby.framework/Headers/mruby/version.h +0 -110
  533. data/assets/xcode/ios/MRuby.framework/Headers/mruby.h +0 -1282
  534. data/assets/xcode/ios/MRuby.framework/Info.plist +0 -20
  535. data/assets/xcode/ios/MRuby.framework/MRuby +0 -0
  536. data/assets/xcode/ios/MyApp.xcodeproj/project.pbxproj +0 -368
  537. data/assets/xcode/ios/MyApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -7
  538. data/assets/xcode/ios/MyApp.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
  539. data/assets/xcode/ios/MyApp.xcodeproj/project.xcworkspace/xcshareddata/MyApp.xcscmblueprint +0 -30
  540. data/assets/xcode/ios/main.c +0 -1
  541. data/assets/xcode/tvos/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Content.imageset/Contents.json +0 -16
  542. data/assets/xcode/tvos/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Contents.json +0 -6
  543. data/assets/xcode/tvos/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Contents.json +0 -17
  544. data/assets/xcode/tvos/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Content.imageset/Contents.json +0 -16
  545. data/assets/xcode/tvos/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Contents.json +0 -6
  546. data/assets/xcode/tvos/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json +0 -16
  547. data/assets/xcode/tvos/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Middle.imagestacklayer/Contents.json +0 -6
  548. data/assets/xcode/tvos/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Content.imageset/Contents.json +0 -16
  549. data/assets/xcode/tvos/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Contents.json +0 -6
  550. data/assets/xcode/tvos/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Contents.json +0 -17
  551. data/assets/xcode/tvos/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Content.imageset/Contents.json +0 -16
  552. data/assets/xcode/tvos/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Contents.json +0 -6
  553. data/assets/xcode/tvos/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json +0 -16
  554. data/assets/xcode/tvos/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Contents.json +0 -6
  555. data/assets/xcode/tvos/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Contents.json +0 -32
  556. data/assets/xcode/tvos/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image Wide.imageset/Contents.json +0 -16
  557. data/assets/xcode/tvos/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image.imageset/Contents.json +0 -16
  558. data/assets/xcode/tvos/Assets.xcassets/Contents.json +0 -6
  559. data/assets/xcode/tvos/Assets.xcassets/LaunchImage.launchimage/Contents.json +0 -22
  560. data/assets/xcode/tvos/Info.plist +0 -30
  561. data/assets/xcode/tvos/MRuby.framework/Headers/mrbconf.h +0 -143
  562. data/assets/xcode/tvos/MRuby.framework/Headers/mruby/array.h +0 -280
  563. data/assets/xcode/tvos/MRuby.framework/Headers/mruby/boxing_nan.h +0 -102
  564. data/assets/xcode/tvos/MRuby.framework/Headers/mruby/boxing_no.h +0 -56
  565. data/assets/xcode/tvos/MRuby.framework/Headers/mruby/boxing_word.h +0 -144
  566. data/assets/xcode/tvos/MRuby.framework/Headers/mruby/class.h +0 -97
  567. data/assets/xcode/tvos/MRuby.framework/Headers/mruby/common.h +0 -77
  568. data/assets/xcode/tvos/MRuby.framework/Headers/mruby/compile.h +0 -195
  569. data/assets/xcode/tvos/MRuby.framework/Headers/mruby/data.h +0 -75
  570. data/assets/xcode/tvos/MRuby.framework/Headers/mruby/debug.h +0 -67
  571. data/assets/xcode/tvos/MRuby.framework/Headers/mruby/dump.h +0 -196
  572. data/assets/xcode/tvos/MRuby.framework/Headers/mruby/error.h +0 -75
  573. data/assets/xcode/tvos/MRuby.framework/Headers/mruby/gc.h +0 -91
  574. data/assets/xcode/tvos/MRuby.framework/Headers/mruby/hash.h +0 -215
  575. data/assets/xcode/tvos/MRuby.framework/Headers/mruby/irep.h +0 -75
  576. data/assets/xcode/tvos/MRuby.framework/Headers/mruby/istruct.h +0 -47
  577. data/assets/xcode/tvos/MRuby.framework/Headers/mruby/khash.h +0 -274
  578. data/assets/xcode/tvos/MRuby.framework/Headers/mruby/numeric.h +0 -161
  579. data/assets/xcode/tvos/MRuby.framework/Headers/mruby/object.h +0 -44
  580. data/assets/xcode/tvos/MRuby.framework/Headers/mruby/opcode.h +0 -69
  581. data/assets/xcode/tvos/MRuby.framework/Headers/mruby/ops.h +0 -117
  582. data/assets/xcode/tvos/MRuby.framework/Headers/mruby/proc.h +0 -131
  583. data/assets/xcode/tvos/MRuby.framework/Headers/mruby/range.h +0 -49
  584. data/assets/xcode/tvos/MRuby.framework/Headers/mruby/re.h +0 -16
  585. data/assets/xcode/tvos/MRuby.framework/Headers/mruby/string.h +0 -444
  586. data/assets/xcode/tvos/MRuby.framework/Headers/mruby/throw.h +0 -55
  587. data/assets/xcode/tvos/MRuby.framework/Headers/mruby/value.h +0 -309
  588. data/assets/xcode/tvos/MRuby.framework/Headers/mruby/variable.h +0 -136
  589. data/assets/xcode/tvos/MRuby.framework/Headers/mruby/version.h +0 -110
  590. data/assets/xcode/tvos/MRuby.framework/Headers/mruby.h +0 -1282
  591. data/assets/xcode/tvos/MRuby.framework/Info.plist +0 -20
  592. data/assets/xcode/tvos/MRuby.framework/MRuby +0 -0
  593. data/assets/xcode/tvos/MyApp.xcodeproj/project.pbxproj +0 -350
  594. data/assets/xcode/tvos/MyApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -7
  595. data/assets/xcode/tvos/MyApp.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
  596. data/assets/xcode/tvos/MyApp.xcodeproj/project.xcworkspace/xcshareddata/MyApp.xcscmblueprint +0 -30
  597. data/assets/xcode/tvos/main.c +0 -1
  598. data/ext/ruby2d/common.c +0 -185
  599. data/ext/ruby2d/controllers.c +0 -110
  600. data/ext/ruby2d/gl.c +0 -398
  601. data/ext/ruby2d/gl2.c +0 -86
  602. data/ext/ruby2d/gl3.c +0 -304
  603. data/ext/ruby2d/gles.c +0 -302
  604. data/ext/ruby2d/input.c +0 -48
  605. data/ext/ruby2d/music.c +0 -127
  606. data/ext/ruby2d/sound.c +0 -132
  607. data/lib/ruby2d/cli/console.rb +0 -65
  608. data/lib/ruby2d/cli/enable_console.rb +0 -7
  609. data/lib/ruby2d/cli/platform.rb +0 -17
  610. data/lib/ruby2d/music.rb +0 -77
  611. data/lib/ruby2d/pixel.rb +0 -18
  612. data/lib/ruby2d/pixmap.rb +0 -39
  613. data/lib/ruby2d/pixmap_atlas.rb +0 -56
  614. data/lib/ruby2d/sound.rb +0 -61
  615. data/lib/ruby2d/texture.rb +0 -38
  616. /data/assets/{include/SDL2 → platform/include/SDL3}/SDL_opengles2_gl2.h +0 -0
  617. /data/assets/{include/SDL2 → platform/include/SDL3}/SDL_opengles2_gl2ext.h +0 -0
  618. /data/assets/{include/SDL2 → platform/include/SDL3}/SDL_opengles2_gl2platform.h +0 -0
  619. /data/assets/{include/SDL2 → platform/include/SDL3}/SDL_opengles2_khrplatform.h +0 -0
  620. /data/assets/{include → platform/include}/mruby/re.h +0 -0
@@ -0,0 +1,3328 @@
1
+ /*
2
+ SDL_image: An example image loading library for use with SDL
3
+ Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>
4
+
5
+ This software is provided 'as-is', without any express or implied
6
+ warranty. In no event will the authors be held liable for any damages
7
+ arising from the use of this software.
8
+
9
+ Permission is granted to anyone to use this software for any purpose,
10
+ including commercial applications, and to alter it and redistribute it
11
+ freely, subject to the following restrictions:
12
+
13
+ 1. The origin of this software must not be misrepresented; you must not
14
+ claim that you wrote the original software. If you use this software
15
+ in a product, an acknowledgment in the product documentation would be
16
+ appreciated but is not required.
17
+ 2. Altered source versions must be plainly marked as such, and must not be
18
+ misrepresented as being the original software.
19
+ 3. This notice may not be removed or altered from any source distribution.
20
+ */
21
+
22
+ /* WIKI CATEGORY: SDLImage */
23
+
24
+ /**
25
+ * # CategorySDLImage
26
+ *
27
+ * Header file for SDL_image library
28
+ *
29
+ * A simple library to load images of various formats as SDL surfaces
30
+ */
31
+
32
+ #ifndef SDL_IMAGE_H_
33
+ #define SDL_IMAGE_H_
34
+
35
+ #include <SDL3/SDL.h>
36
+ #include <SDL3/SDL_begin_code.h>
37
+
38
+ /* Set up for C function definitions, even when using C++ */
39
+ #ifdef __cplusplus
40
+ extern "C" {
41
+ #endif
42
+
43
+ /**
44
+ * Printable format: "%d.%d.%d", MAJOR, MINOR, MICRO
45
+ */
46
+ #define SDL_IMAGE_MAJOR_VERSION 3
47
+ #define SDL_IMAGE_MINOR_VERSION 4
48
+ #define SDL_IMAGE_MICRO_VERSION 4
49
+
50
+ /**
51
+ * This is the version number macro for the current SDL_image version.
52
+ */
53
+ #define SDL_IMAGE_VERSION \
54
+ SDL_VERSIONNUM(SDL_IMAGE_MAJOR_VERSION, SDL_IMAGE_MINOR_VERSION, SDL_IMAGE_MICRO_VERSION)
55
+
56
+ /**
57
+ * This macro will evaluate to true if compiled with SDL_image at least X.Y.Z.
58
+ */
59
+ #define SDL_IMAGE_VERSION_ATLEAST(X, Y, Z) \
60
+ ((SDL_IMAGE_MAJOR_VERSION >= X) && \
61
+ (SDL_IMAGE_MAJOR_VERSION > X || SDL_IMAGE_MINOR_VERSION >= Y) && \
62
+ (SDL_IMAGE_MAJOR_VERSION > X || SDL_IMAGE_MINOR_VERSION > Y || SDL_IMAGE_MICRO_VERSION >= Z))
63
+
64
+ /**
65
+ * This function gets the version of the dynamically linked SDL_image library.
66
+ *
67
+ * \returns SDL_image version.
68
+ *
69
+ * \since This function is available since SDL_image 3.0.0.
70
+ */
71
+ extern SDL_DECLSPEC int SDLCALL IMG_Version(void);
72
+
73
+ /**
74
+ * Load an image from a filesystem path into a software surface.
75
+ *
76
+ * An SDL_Surface is a buffer of pixels in memory accessible by the CPU. Use
77
+ * this if you plan to hand the data to something else or manipulate it
78
+ * further in code.
79
+ *
80
+ * There are no guarantees about what format the new SDL_Surface data will be;
81
+ * in many cases, SDL_image will attempt to supply a surface that exactly
82
+ * matches the provided image, but in others it might have to convert (either
83
+ * because the image is in a format that SDL doesn't directly support or
84
+ * because it's compressed data that could reasonably uncompress to various
85
+ * formats and SDL_image had to pick one). You can inspect an SDL_Surface for
86
+ * its specifics, and use SDL_ConvertSurface to then migrate to any supported
87
+ * format.
88
+ *
89
+ * If the image format supports a transparent pixel, SDL will set the colorkey
90
+ * for the surface. You can enable RLE acceleration on the surface afterwards
91
+ * by calling: SDL_SetSurfaceColorKey(image, SDL_RLEACCEL,
92
+ * image->format->colorkey);
93
+ *
94
+ * There is a separate function to read files from an SDL_IOStream, if you
95
+ * need an i/o abstraction to provide data from anywhere instead of a simple
96
+ * filesystem read; that function is IMG_Load_IO().
97
+ *
98
+ * If you are using SDL's 2D rendering API, there is an equivalent call to
99
+ * load images directly into an SDL_Texture for use by the GPU without using a
100
+ * software surface: call IMG_LoadTexture() instead.
101
+ *
102
+ * When done with the returned surface, the app should dispose of it with a
103
+ * call to
104
+ * [SDL_DestroySurface](https://wiki.libsdl.org/SDL3/SDL_DestroySurface)
105
+ * ().
106
+ *
107
+ * \param file a path on the filesystem to load an image from.
108
+ * \returns a new SDL surface, or NULL on error.
109
+ *
110
+ * \since This function is available since SDL_image 3.0.0.
111
+ *
112
+ * \sa IMG_LoadTyped_IO
113
+ * \sa IMG_Load_IO
114
+ */
115
+ extern SDL_DECLSPEC SDL_Surface * SDLCALL IMG_Load(const char *file);
116
+
117
+ /**
118
+ * Load an image from an SDL data source into a software surface.
119
+ *
120
+ * An SDL_Surface is a buffer of pixels in memory accessible by the CPU. Use
121
+ * this if you plan to hand the data to something else or manipulate it
122
+ * further in code.
123
+ *
124
+ * There are no guarantees about what format the new SDL_Surface data will be;
125
+ * in many cases, SDL_image will attempt to supply a surface that exactly
126
+ * matches the provided image, but in others it might have to convert (either
127
+ * because the image is in a format that SDL doesn't directly support or
128
+ * because it's compressed data that could reasonably uncompress to various
129
+ * formats and SDL_image had to pick one). You can inspect an SDL_Surface for
130
+ * its specifics, and use SDL_ConvertSurface to then migrate to any supported
131
+ * format.
132
+ *
133
+ * If the image format supports a transparent pixel, SDL will set the colorkey
134
+ * for the surface. You can enable RLE acceleration on the surface afterwards
135
+ * by calling: SDL_SetSurfaceColorKey(image, SDL_RLEACCEL,
136
+ * image->format->colorkey);
137
+ *
138
+ * If `closeio` is true, `src` will be closed before returning, whether this
139
+ * function succeeds or not. SDL_image reads everything it needs from `src`
140
+ * during this call in any case.
141
+ *
142
+ * There is a separate function to read files from disk without having to deal
143
+ * with SDL_IOStream: `IMG_Load("filename.jpg")` will call this function and
144
+ * manage those details for you, determining the file type from the filename's
145
+ * extension.
146
+ *
147
+ * There is also IMG_LoadTyped_IO(), which is equivalent to this function
148
+ * except a file extension (like "BMP", "JPG", etc) can be specified, in case
149
+ * SDL_image cannot autodetect the file format.
150
+ *
151
+ * If you are using SDL's 2D rendering API, there is an equivalent call to
152
+ * load images directly into an SDL_Texture for use by the GPU without using a
153
+ * software surface: call IMG_LoadTexture_IO() instead.
154
+ *
155
+ * When done with the returned surface, the app should dispose of it with a
156
+ * call to SDL_DestroySurface().
157
+ *
158
+ * \param src an SDL_IOStream that data will be read from.
159
+ * \param closeio true to close/free the SDL_IOStream before returning, false
160
+ * to leave it open.
161
+ * \returns a new SDL surface, or NULL on error.
162
+ *
163
+ * \since This function is available since SDL_image 3.0.0.
164
+ *
165
+ * \sa IMG_Load
166
+ * \sa IMG_LoadTyped_IO
167
+ */
168
+ extern SDL_DECLSPEC SDL_Surface * SDLCALL IMG_Load_IO(SDL_IOStream *src, bool closeio);
169
+
170
+ /**
171
+ * Load an image from an SDL data source into a software surface.
172
+ *
173
+ * An SDL_Surface is a buffer of pixels in memory accessible by the CPU. Use
174
+ * this if you plan to hand the data to something else or manipulate it
175
+ * further in code.
176
+ *
177
+ * There are no guarantees about what format the new SDL_Surface data will be;
178
+ * in many cases, SDL_image will attempt to supply a surface that exactly
179
+ * matches the provided image, but in others it might have to convert (either
180
+ * because the image is in a format that SDL doesn't directly support or
181
+ * because it's compressed data that could reasonably uncompress to various
182
+ * formats and SDL_image had to pick one). You can inspect an SDL_Surface for
183
+ * its specifics, and use SDL_ConvertSurface to then migrate to any supported
184
+ * format.
185
+ *
186
+ * If the image format supports a transparent pixel, SDL will set the colorkey
187
+ * for the surface. You can enable RLE acceleration on the surface afterwards
188
+ * by calling: SDL_SetSurfaceColorKey(image, SDL_RLEACCEL,
189
+ * image->format->colorkey);
190
+ *
191
+ * If `closeio` is true, `src` will be closed before returning, whether this
192
+ * function succeeds or not. SDL_image reads everything it needs from `src`
193
+ * during this call in any case.
194
+ *
195
+ * Even though this function accepts a file type, SDL_image may still try
196
+ * other decoders that are capable of detecting file type from the contents of
197
+ * the image data, but may rely on the caller-provided type string for formats
198
+ * that it cannot autodetect. If `type` is NULL, SDL_image will rely solely on
199
+ * its ability to guess the format.
200
+ *
201
+ * There is a separate function to read files from disk without having to deal
202
+ * with SDL_IOStream: `IMG_Load("filename.jpg")` will call this function and
203
+ * manage those details for you, determining the file type from the filename's
204
+ * extension.
205
+ *
206
+ * There is also IMG_Load_IO(), which is equivalent to this function except
207
+ * that it will rely on SDL_image to determine what type of data it is
208
+ * loading, much like passing a NULL for type.
209
+ *
210
+ * If you are using SDL's 2D rendering API, there is an equivalent call to
211
+ * load images directly into an SDL_Texture for use by the GPU without using a
212
+ * software surface: call IMG_LoadTextureTyped_IO() instead.
213
+ *
214
+ * When done with the returned surface, the app should dispose of it with a
215
+ * call to SDL_DestroySurface().
216
+ *
217
+ * \param src an SDL_IOStream that data will be read from.
218
+ * \param closeio true to close/free the SDL_IOStream before returning, false
219
+ * to leave it open.
220
+ * \param type a filename extension that represent this data ("BMP", "GIF",
221
+ * "PNG", etc).
222
+ * \returns a new SDL surface, or NULL on error.
223
+ *
224
+ * \since This function is available since SDL_image 3.0.0.
225
+ *
226
+ * \sa IMG_Load
227
+ * \sa IMG_Load_IO
228
+ */
229
+ extern SDL_DECLSPEC SDL_Surface * SDLCALL IMG_LoadTyped_IO(SDL_IOStream *src, bool closeio, const char *type);
230
+
231
+ /**
232
+ * Load an image from a filesystem path into a texture.
233
+ *
234
+ * An SDL_Texture represents an image in GPU memory, usable by SDL's 2D Render
235
+ * API. This can be significantly more efficient than using a CPU-bound
236
+ * SDL_Surface if you don't need to manipulate the image directly after
237
+ * loading it.
238
+ *
239
+ * If the loaded image has transparency or a colorkey, a texture with an alpha
240
+ * channel will be created. Otherwise, SDL_image will attempt to create an
241
+ * SDL_Texture in the most format that most reasonably represents the image
242
+ * data (but in many cases, this will just end up being 32-bit RGB or 32-bit
243
+ * RGBA).
244
+ *
245
+ * There is a separate function to read files from an SDL_IOStream, if you
246
+ * need an i/o abstraction to provide data from anywhere instead of a simple
247
+ * filesystem read; that function is IMG_LoadTexture_IO().
248
+ *
249
+ * If you would rather decode an image to an SDL_Surface (a buffer of pixels
250
+ * in CPU memory), call IMG_Load() instead.
251
+ *
252
+ * When done with the returned texture, the app should dispose of it with a
253
+ * call to SDL_DestroyTexture().
254
+ *
255
+ * \param renderer the SDL_Renderer to use to create the texture.
256
+ * \param file a path on the filesystem to load an image from.
257
+ * \returns a new texture, or NULL on error.
258
+ *
259
+ * \since This function is available since SDL_image 3.0.0.
260
+ *
261
+ * \sa IMG_LoadTextureTyped_IO
262
+ * \sa IMG_LoadTexture_IO
263
+ */
264
+ extern SDL_DECLSPEC SDL_Texture * SDLCALL IMG_LoadTexture(SDL_Renderer *renderer, const char *file);
265
+
266
+ /**
267
+ * Load an image from an SDL data source into a texture.
268
+ *
269
+ * An SDL_Texture represents an image in GPU memory, usable by SDL's 2D Render
270
+ * API. This can be significantly more efficient than using a CPU-bound
271
+ * SDL_Surface if you don't need to manipulate the image directly after
272
+ * loading it.
273
+ *
274
+ * If the loaded image has transparency or a colorkey, a texture with an alpha
275
+ * channel will be created. Otherwise, SDL_image will attempt to create an
276
+ * SDL_Texture in the most format that most reasonably represents the image
277
+ * data (but in many cases, this will just end up being 32-bit RGB or 32-bit
278
+ * RGBA).
279
+ *
280
+ * If `closeio` is true, `src` will be closed before returning, whether this
281
+ * function succeeds or not. SDL_image reads everything it needs from `src`
282
+ * during this call in any case.
283
+ *
284
+ * There is a separate function to read files from disk without having to deal
285
+ * with SDL_IOStream: `IMG_LoadTexture(renderer, "filename.jpg")` will call
286
+ * this function and manage those details for you, determining the file type
287
+ * from the filename's extension.
288
+ *
289
+ * There is also IMG_LoadTextureTyped_IO(), which is equivalent to this
290
+ * function except a file extension (like "BMP", "JPG", etc) can be specified,
291
+ * in case SDL_image cannot autodetect the file format.
292
+ *
293
+ * If you would rather decode an image to an SDL_Surface (a buffer of pixels
294
+ * in CPU memory), call IMG_Load() instead.
295
+ *
296
+ * When done with the returned texture, the app should dispose of it with a
297
+ * call to SDL_DestroyTexture().
298
+ *
299
+ * \param renderer the SDL_Renderer to use to create the texture.
300
+ * \param src an SDL_IOStream that data will be read from.
301
+ * \param closeio true to close/free the SDL_IOStream before returning, false
302
+ * to leave it open.
303
+ * \returns a new texture, or NULL on error.
304
+ *
305
+ * \since This function is available since SDL_image 3.0.0.
306
+ *
307
+ * \sa IMG_LoadTexture
308
+ * \sa IMG_LoadTextureTyped_IO
309
+ */
310
+ extern SDL_DECLSPEC SDL_Texture * SDLCALL IMG_LoadTexture_IO(SDL_Renderer *renderer, SDL_IOStream *src, bool closeio);
311
+
312
+ /**
313
+ * Load an image from an SDL data source into a texture.
314
+ *
315
+ * An SDL_Texture represents an image in GPU memory, usable by SDL's 2D Render
316
+ * API. This can be significantly more efficient than using a CPU-bound
317
+ * SDL_Surface if you don't need to manipulate the image directly after
318
+ * loading it.
319
+ *
320
+ * If the loaded image has transparency or a colorkey, a texture with an alpha
321
+ * channel will be created. Otherwise, SDL_image will attempt to create an
322
+ * SDL_Texture in the most format that most reasonably represents the image
323
+ * data (but in many cases, this will just end up being 32-bit RGB or 32-bit
324
+ * RGBA).
325
+ *
326
+ * If `closeio` is true, `src` will be closed before returning, whether this
327
+ * function succeeds or not. SDL_image reads everything it needs from `src`
328
+ * during this call in any case.
329
+ *
330
+ * Even though this function accepts a file type, SDL_image may still try
331
+ * other decoders that are capable of detecting file type from the contents of
332
+ * the image data, but may rely on the caller-provided type string for formats
333
+ * that it cannot autodetect. If `type` is NULL, SDL_image will rely solely on
334
+ * its ability to guess the format.
335
+ *
336
+ * There is a separate function to read files from disk without having to deal
337
+ * with SDL_IOStream: `IMG_LoadTexture("filename.jpg")` will call this
338
+ * function and manage those details for you, determining the file type from
339
+ * the filename's extension.
340
+ *
341
+ * There is also IMG_LoadTexture_IO(), which is equivalent to this function
342
+ * except that it will rely on SDL_image to determine what type of data it is
343
+ * loading, much like passing a NULL for type.
344
+ *
345
+ * If you would rather decode an image to an SDL_Surface (a buffer of pixels
346
+ * in CPU memory), call IMG_LoadTyped_IO() instead.
347
+ *
348
+ * When done with the returned texture, the app should dispose of it with a
349
+ * call to SDL_DestroyTexture().
350
+ *
351
+ * \param renderer the SDL_Renderer to use to create the texture.
352
+ * \param src an SDL_IOStream that data will be read from.
353
+ * \param closeio true to close/free the SDL_IOStream before returning, false
354
+ * to leave it open.
355
+ * \param type a filename extension that represent this data ("BMP", "GIF",
356
+ * "PNG", etc).
357
+ * \returns a new texture, or NULL on error.
358
+ *
359
+ * \since This function is available since SDL_image 3.0.0.
360
+ *
361
+ * \sa IMG_LoadTexture
362
+ * \sa IMG_LoadTexture_IO
363
+ */
364
+ extern SDL_DECLSPEC SDL_Texture * SDLCALL IMG_LoadTextureTyped_IO(SDL_Renderer *renderer, SDL_IOStream *src, bool closeio, const char *type);
365
+
366
+ /**
367
+ * Load an image from a filesystem path into a GPU texture.
368
+ *
369
+ * An SDL_GPUTexture represents an image in GPU memory, usable by SDL's GPU
370
+ * API. Regardless of the source format of the image, this function will
371
+ * create a GPU texture with the format SDL_GPU_TEXTUREFORMAT_R8G8B8A8_UNORM
372
+ * with no mip levels. It can be bound as a sampled texture from a graphics or
373
+ * compute pipeline and as a a readonly storage texture in a compute pipeline.
374
+ *
375
+ * There is a separate function to read files from an SDL_IOStream, if you
376
+ * need an i/o abstraction to provide data from anywhere instead of a simple
377
+ * filesystem read; that function is IMG_LoadGPUTexture_IO().
378
+ *
379
+ * When done with the returned texture, the app should dispose of it with a
380
+ * call to SDL_ReleaseGPUTexture().
381
+ *
382
+ * \param device the SDL_GPUDevice to use to create the GPU texture.
383
+ * \param copy_pass the SDL_GPUCopyPass to use to upload the loaded image to
384
+ * the GPU texture.
385
+ * \param file a path on the filesystem to load an image from.
386
+ * \param width a pointer filled in with the width of the GPU texture. may be
387
+ * NULL.
388
+ * \param height a pointer filled in with the width of the GPU texture. may be
389
+ * NULL.
390
+ * \returns a new GPU texture, or NULL on error.
391
+ *
392
+ * \since This function is available since SDL_image 3.4.0.
393
+ *
394
+ * \sa IMG_LoadGPUTextureTyped_IO
395
+ * \sa IMG_LoadGPUTexture_IO
396
+ */
397
+ extern SDL_DECLSPEC SDL_GPUTexture * SDLCALL IMG_LoadGPUTexture(SDL_GPUDevice *device, SDL_GPUCopyPass *copy_pass, const char *file, int *width, int *height);
398
+
399
+ /**
400
+ * Load an image from an SDL data source into a GPU texture.
401
+ *
402
+ * An SDL_GPUTexture represents an image in GPU memory, usable by SDL's GPU
403
+ * API. Regardless of the source format of the image, this function will
404
+ * create a GPU texture with the format SDL_GPU_TEXTUREFORMAT_R8G8B8A8_UNORM
405
+ * with no mip levels. It can be bound as a sampled texture from a graphics or
406
+ * compute pipeline and as a a readonly storage texture in a compute pipeline.
407
+ *
408
+ * If `closeio` is true, `src` will be closed before returning, whether this
409
+ * function succeeds or not. SDL_image reads everything it needs from `src`
410
+ * during this call in any case.
411
+ *
412
+ * There is a separate function to read files from disk without having to deal
413
+ * with SDL_IOStream: `IMG_LoadGPUTexture(device, copy_pass, "filename.jpg",
414
+ * width, height) will call this function and manage those details for you,
415
+ * determining the file type from the filename's extension.
416
+ *
417
+ * There is also IMG_LoadGPUTextureTyped_IO(), which is equivalent to this
418
+ * function except a file extension (like "BMP", "JPG", etc) can be specified,
419
+ * in case SDL_image cannot autodetect the file format.
420
+ *
421
+ * When done with the returned texture, the app should dispose of it with a
422
+ * call to SDL_ReleaseGPUTexture().
423
+ *
424
+ * \param device the SDL_GPUDevice to use to create the GPU texture.
425
+ * \param copy_pass the SDL_GPUCopyPass to use to upload the loaded image to
426
+ * the GPU texture.
427
+ * \param src an SDL_IOStream that data will be read from.
428
+ * \param closeio true to close/free the SDL_IOStream before returning, false
429
+ * to leave it open.
430
+ * \param width a pointer filled in with the width of the GPU texture. may be
431
+ * NULL.
432
+ * \param height a pointer filled in with the width of the GPU texture. may be
433
+ * NULL.
434
+ * \returns a new GPU texture, or NULL on error.
435
+ *
436
+ * \since This function is available since SDL_image 3.4.0.
437
+ *
438
+ * \sa IMG_LoadGPUTexture
439
+ * \sa IMG_LoadGPUTextureTyped_IO
440
+ */
441
+ extern SDL_DECLSPEC SDL_GPUTexture * SDLCALL IMG_LoadGPUTexture_IO(SDL_GPUDevice *device, SDL_GPUCopyPass *copy_pass, SDL_IOStream *src, bool closeio, int *width, int *height);
442
+
443
+ /**
444
+ * Load an image from an SDL data source into a GPU texture.
445
+ *
446
+ * An SDL_GPUTexture represents an image in GPU memory, usable by SDL's GPU
447
+ * API. Regardless of the source format of the image, this function will
448
+ * create a GPU texture with the format SDL_GPU_TEXTUREFORMAT_R8G8B8A8_UNORM
449
+ * with no mip levels. It can be bound as a sampled texture from a graphics or
450
+ * compute pipeline and as a a readonly storage texture in a compute pipeline.
451
+ *
452
+ * If `closeio` is true, `src` will be closed before returning, whether this
453
+ * function succeeds or not. SDL_image reads everything it needs from `src`
454
+ * during this call in any case.
455
+ *
456
+ * Even though this function accepts a file type, SDL_image may still try
457
+ * other decoders that are capable of detecting file type from the contents of
458
+ * the image data, but may rely on the caller-provided type string for formats
459
+ * that it cannot autodetect. If `type` is NULL, SDL_image will rely solely on
460
+ * its ability to guess the format.
461
+ *
462
+ * There is a separate function to read files from disk without having to deal
463
+ * with SDL_IOStream: `IMG_LoadGPUTexture(device, copy_pass, "filename.jpg",
464
+ * width, height) will call this function and manage those details for you,
465
+ * determining the file type from the filename's extension.
466
+ *
467
+ * There is also IMG_LoadGPUTexture_IO(), which is equivalent to this function
468
+ * except that it will rely on SDL_image to determine what type of data it is
469
+ * loading, much like passing a NULL for type.
470
+ *
471
+ * When done with the returned texture, the app should dispose of it with a
472
+ * call to SDL_ReleaseGPUTexture().
473
+ *
474
+ * \param device the SDL_GPUDevice to use to create the GPU texture.
475
+ * \param copy_pass the SDL_GPUCopyPass to use to upload the loaded image to
476
+ * the GPU texture.
477
+ * \param src an SDL_IOStream that data will be read from.
478
+ * \param closeio true to close/free the SDL_IOStream before returning, false
479
+ * to leave it open.
480
+ * \param type a filename extension that represent this data ("BMP", "GIF",
481
+ * "PNG", etc).
482
+ * \param width a pointer filled in with the width of the GPU texture. may be
483
+ * NULL.
484
+ * \param height a pointer filled in with the width of the GPU texture. may be
485
+ * NULL.
486
+ * \returns a new GPU texture, or NULL on error.
487
+ *
488
+ * \since This function is available since SDL_image 3.4.0.
489
+ *
490
+ * \sa IMG_LoadGPUTexture
491
+ * \sa IMG_LoadGPUTexture_IO
492
+ */
493
+ extern SDL_DECLSPEC SDL_GPUTexture * SDLCALL IMG_LoadGPUTextureTyped_IO(SDL_GPUDevice *device, SDL_GPUCopyPass *copy_pass, SDL_IOStream *src, bool closeio, const char *type, int *width, int *height);
494
+
495
+ /**
496
+ * Get the image currently in the clipboard.
497
+ *
498
+ * When done with the returned surface, the app should dispose of it with a
499
+ * call to SDL_DestroySurface().
500
+ *
501
+ * \returns a new SDL surface, or NULL if no supported image is available.
502
+ *
503
+ * \since This function is available since SDL_image 3.4.0.
504
+ */
505
+ extern SDL_DECLSPEC SDL_Surface * SDLCALL IMG_GetClipboardImage(void);
506
+
507
+ /**
508
+ * Detect ANI animated cursor data on a readable/seekable SDL_IOStream.
509
+ *
510
+ * This function attempts to determine if a file is a given filetype, reading
511
+ * the least amount possible from the SDL_IOStream (usually a few bytes).
512
+ *
513
+ * There is no distinction made between "not the filetype in question" and
514
+ * basic i/o errors.
515
+ *
516
+ * This function will always attempt to seek `src` back to where it started
517
+ * when this function was called, but it will not report any errors in doing
518
+ * so, but assuming seeking works, this means you can immediately use this
519
+ * with a different IMG_isTYPE function, or load the image without further
520
+ * seeking.
521
+ *
522
+ * You do not need to call this function to load data; SDL_image can work to
523
+ * determine file type in many cases in its standard load functions.
524
+ *
525
+ * \param src a seekable/readable SDL_IOStream to provide image data.
526
+ * \returns true if this is ANI animated cursor data, false otherwise.
527
+ *
528
+ * \since This function is available since SDL_image 3.0.0.
529
+ *
530
+ * \sa IMG_isAVIF
531
+ * \sa IMG_isBMP
532
+ * \sa IMG_isCUR
533
+ * \sa IMG_isGIF
534
+ * \sa IMG_isICO
535
+ * \sa IMG_isJPG
536
+ * \sa IMG_isJXL
537
+ * \sa IMG_isLBM
538
+ * \sa IMG_isPCX
539
+ * \sa IMG_isPNG
540
+ * \sa IMG_isPNM
541
+ * \sa IMG_isQOI
542
+ * \sa IMG_isSVG
543
+ * \sa IMG_isTIF
544
+ * \sa IMG_isWEBP
545
+ * \sa IMG_isXCF
546
+ * \sa IMG_isXPM
547
+ * \sa IMG_isXV
548
+ */
549
+ extern SDL_DECLSPEC bool SDLCALL IMG_isANI(SDL_IOStream *src);
550
+
551
+ /**
552
+ * Detect AVIF image data on a readable/seekable SDL_IOStream.
553
+ *
554
+ * This function attempts to determine if a file is a given filetype, reading
555
+ * the least amount possible from the SDL_IOStream (usually a few bytes).
556
+ *
557
+ * There is no distinction made between "not the filetype in question" and
558
+ * basic i/o errors.
559
+ *
560
+ * This function will always attempt to seek `src` back to where it started
561
+ * when this function was called, but it will not report any errors in doing
562
+ * so, but assuming seeking works, this means you can immediately use this
563
+ * with a different IMG_isTYPE function, or load the image without further
564
+ * seeking.
565
+ *
566
+ * You do not need to call this function to load data; SDL_image can work to
567
+ * determine file type in many cases in its standard load functions.
568
+ *
569
+ * \param src a seekable/readable SDL_IOStream to provide image data.
570
+ * \returns true if this is AVIF data, false otherwise.
571
+ *
572
+ * \since This function is available since SDL_image 3.0.0.
573
+ *
574
+ * \sa IMG_isANI
575
+ * \sa IMG_isBMP
576
+ * \sa IMG_isCUR
577
+ * \sa IMG_isGIF
578
+ * \sa IMG_isICO
579
+ * \sa IMG_isJPG
580
+ * \sa IMG_isJXL
581
+ * \sa IMG_isLBM
582
+ * \sa IMG_isPCX
583
+ * \sa IMG_isPNG
584
+ * \sa IMG_isPNM
585
+ * \sa IMG_isQOI
586
+ * \sa IMG_isSVG
587
+ * \sa IMG_isTIF
588
+ * \sa IMG_isWEBP
589
+ * \sa IMG_isXCF
590
+ * \sa IMG_isXPM
591
+ * \sa IMG_isXV
592
+ */
593
+ extern SDL_DECLSPEC bool SDLCALL IMG_isAVIF(SDL_IOStream *src);
594
+
595
+ /**
596
+ * Detect CUR image data on a readable/seekable SDL_IOStream.
597
+ *
598
+ * This function attempts to determine if a file is a given filetype, reading
599
+ * the least amount possible from the SDL_IOStream (usually a few bytes).
600
+ *
601
+ * There is no distinction made between "not the filetype in question" and
602
+ * basic i/o errors.
603
+ *
604
+ * This function will always attempt to seek `src` back to where it started
605
+ * when this function was called, but it will not report any errors in doing
606
+ * so, but assuming seeking works, this means you can immediately use this
607
+ * with a different IMG_isTYPE function, or load the image without further
608
+ * seeking.
609
+ *
610
+ * You do not need to call this function to load data; SDL_image can work to
611
+ * determine file type in many cases in its standard load functions.
612
+ *
613
+ * \param src a seekable/readable SDL_IOStream to provide image data.
614
+ * \returns true if this is CUR data, false otherwise.
615
+ *
616
+ * \since This function is available since SDL_image 3.0.0.
617
+ *
618
+ * \sa IMG_isANI
619
+ * \sa IMG_isAVIF
620
+ * \sa IMG_isBMP
621
+ * \sa IMG_isGIF
622
+ * \sa IMG_isICO
623
+ * \sa IMG_isJPG
624
+ * \sa IMG_isJXL
625
+ * \sa IMG_isLBM
626
+ * \sa IMG_isPCX
627
+ * \sa IMG_isPNG
628
+ * \sa IMG_isPNM
629
+ * \sa IMG_isQOI
630
+ * \sa IMG_isSVG
631
+ * \sa IMG_isTIF
632
+ * \sa IMG_isWEBP
633
+ * \sa IMG_isXCF
634
+ * \sa IMG_isXPM
635
+ * \sa IMG_isXV
636
+ */
637
+ extern SDL_DECLSPEC bool SDLCALL IMG_isCUR(SDL_IOStream *src);
638
+
639
+ /**
640
+ * Detect BMP image data on a readable/seekable SDL_IOStream.
641
+ *
642
+ * This function attempts to determine if a file is a given filetype, reading
643
+ * the least amount possible from the SDL_IOStream (usually a few bytes).
644
+ *
645
+ * There is no distinction made between "not the filetype in question" and
646
+ * basic i/o errors.
647
+ *
648
+ * This function will always attempt to seek `src` back to where it started
649
+ * when this function was called, but it will not report any errors in doing
650
+ * so, but assuming seeking works, this means you can immediately use this
651
+ * with a different IMG_isTYPE function, or load the image without further
652
+ * seeking.
653
+ *
654
+ * You do not need to call this function to load data; SDL_image can work to
655
+ * determine file type in many cases in its standard load functions.
656
+ *
657
+ * \param src a seekable/readable SDL_IOStream to provide image data.
658
+ * \returns true if this is BMP data, false otherwise.
659
+ *
660
+ * \since This function is available since SDL_image 3.0.0.
661
+ *
662
+ * \sa IMG_isANI
663
+ * \sa IMG_isAVIF
664
+ * \sa IMG_isCUR
665
+ * \sa IMG_isGIF
666
+ * \sa IMG_isICO
667
+ * \sa IMG_isJPG
668
+ * \sa IMG_isJXL
669
+ * \sa IMG_isLBM
670
+ * \sa IMG_isPCX
671
+ * \sa IMG_isPNG
672
+ * \sa IMG_isPNM
673
+ * \sa IMG_isQOI
674
+ * \sa IMG_isSVG
675
+ * \sa IMG_isTIF
676
+ * \sa IMG_isWEBP
677
+ * \sa IMG_isXCF
678
+ * \sa IMG_isXPM
679
+ * \sa IMG_isXV
680
+ */
681
+ extern SDL_DECLSPEC bool SDLCALL IMG_isBMP(SDL_IOStream *src);
682
+
683
+ /**
684
+ * Detect GIF image data on a readable/seekable SDL_IOStream.
685
+ *
686
+ * This function attempts to determine if a file is a given filetype, reading
687
+ * the least amount possible from the SDL_IOStream (usually a few bytes).
688
+ *
689
+ * There is no distinction made between "not the filetype in question" and
690
+ * basic i/o errors.
691
+ *
692
+ * This function will always attempt to seek `src` back to where it started
693
+ * when this function was called, but it will not report any errors in doing
694
+ * so, but assuming seeking works, this means you can immediately use this
695
+ * with a different IMG_isTYPE function, or load the image without further
696
+ * seeking.
697
+ *
698
+ * You do not need to call this function to load data; SDL_image can work to
699
+ * determine file type in many cases in its standard load functions.
700
+ *
701
+ * \param src a seekable/readable SDL_IOStream to provide image data.
702
+ * \returns true if this is GIF data, false otherwise.
703
+ *
704
+ * \since This function is available since SDL_image 3.0.0.
705
+ *
706
+ * \sa IMG_isANI
707
+ * \sa IMG_isAVIF
708
+ * \sa IMG_isBMP
709
+ * \sa IMG_isCUR
710
+ * \sa IMG_isICO
711
+ * \sa IMG_isJPG
712
+ * \sa IMG_isJXL
713
+ * \sa IMG_isLBM
714
+ * \sa IMG_isPCX
715
+ * \sa IMG_isPNG
716
+ * \sa IMG_isPNM
717
+ * \sa IMG_isQOI
718
+ * \sa IMG_isSVG
719
+ * \sa IMG_isTIF
720
+ * \sa IMG_isWEBP
721
+ * \sa IMG_isXCF
722
+ * \sa IMG_isXPM
723
+ * \sa IMG_isXV
724
+ */
725
+ extern SDL_DECLSPEC bool SDLCALL IMG_isGIF(SDL_IOStream *src);
726
+
727
+ /**
728
+ * Detect ICO image data on a readable/seekable SDL_IOStream.
729
+ *
730
+ * This function attempts to determine if a file is a given filetype, reading
731
+ * the least amount possible from the SDL_IOStream (usually a few bytes).
732
+ *
733
+ * There is no distinction made between "not the filetype in question" and
734
+ * basic i/o errors.
735
+ *
736
+ * This function will always attempt to seek `src` back to where it started
737
+ * when this function was called, but it will not report any errors in doing
738
+ * so, but assuming seeking works, this means you can immediately use this
739
+ * with a different IMG_isTYPE function, or load the image without further
740
+ * seeking.
741
+ *
742
+ * You do not need to call this function to load data; SDL_image can work to
743
+ * determine file type in many cases in its standard load functions.
744
+ *
745
+ * \param src a seekable/readable SDL_IOStream to provide image data.
746
+ * \returns true if this is ICO data, false otherwise.
747
+ *
748
+ * \since This function is available since SDL_image 3.0.0.
749
+ *
750
+ * \sa IMG_isANI
751
+ * \sa IMG_isAVIF
752
+ * \sa IMG_isBMP
753
+ * \sa IMG_isCUR
754
+ * \sa IMG_isGIF
755
+ * \sa IMG_isJPG
756
+ * \sa IMG_isJXL
757
+ * \sa IMG_isLBM
758
+ * \sa IMG_isPCX
759
+ * \sa IMG_isPNG
760
+ * \sa IMG_isPNM
761
+ * \sa IMG_isQOI
762
+ * \sa IMG_isSVG
763
+ * \sa IMG_isTIF
764
+ * \sa IMG_isWEBP
765
+ * \sa IMG_isXCF
766
+ * \sa IMG_isXPM
767
+ * \sa IMG_isXV
768
+ */
769
+ extern SDL_DECLSPEC bool SDLCALL IMG_isICO(SDL_IOStream *src);
770
+
771
+ /**
772
+ * Detect JPG image data on a readable/seekable SDL_IOStream.
773
+ *
774
+ * This function attempts to determine if a file is a given filetype, reading
775
+ * the least amount possible from the SDL_IOStream (usually a few bytes).
776
+ *
777
+ * There is no distinction made between "not the filetype in question" and
778
+ * basic i/o errors.
779
+ *
780
+ * This function will always attempt to seek `src` back to where it started
781
+ * when this function was called, but it will not report any errors in doing
782
+ * so, but assuming seeking works, this means you can immediately use this
783
+ * with a different IMG_isTYPE function, or load the image without further
784
+ * seeking.
785
+ *
786
+ * You do not need to call this function to load data; SDL_image can work to
787
+ * determine file type in many cases in its standard load functions.
788
+ *
789
+ * \param src a seekable/readable SDL_IOStream to provide image data.
790
+ * \returns true if this is JPG data, false otherwise.
791
+ *
792
+ * \since This function is available since SDL_image 3.0.0.
793
+ *
794
+ * \sa IMG_isANI
795
+ * \sa IMG_isAVIF
796
+ * \sa IMG_isBMP
797
+ * \sa IMG_isCUR
798
+ * \sa IMG_isGIF
799
+ * \sa IMG_isICO
800
+ * \sa IMG_isJXL
801
+ * \sa IMG_isLBM
802
+ * \sa IMG_isPCX
803
+ * \sa IMG_isPNG
804
+ * \sa IMG_isPNM
805
+ * \sa IMG_isQOI
806
+ * \sa IMG_isSVG
807
+ * \sa IMG_isTIF
808
+ * \sa IMG_isWEBP
809
+ * \sa IMG_isXCF
810
+ * \sa IMG_isXPM
811
+ * \sa IMG_isXV
812
+ */
813
+ extern SDL_DECLSPEC bool SDLCALL IMG_isJPG(SDL_IOStream *src);
814
+
815
+ /**
816
+ * Detect JXL image data on a readable/seekable SDL_IOStream.
817
+ *
818
+ * This function attempts to determine if a file is a given filetype, reading
819
+ * the least amount possible from the SDL_IOStream (usually a few bytes).
820
+ *
821
+ * There is no distinction made between "not the filetype in question" and
822
+ * basic i/o errors.
823
+ *
824
+ * This function will always attempt to seek `src` back to where it started
825
+ * when this function was called, but it will not report any errors in doing
826
+ * so, but assuming seeking works, this means you can immediately use this
827
+ * with a different IMG_isTYPE function, or load the image without further
828
+ * seeking.
829
+ *
830
+ * You do not need to call this function to load data; SDL_image can work to
831
+ * determine file type in many cases in its standard load functions.
832
+ *
833
+ * \param src a seekable/readable SDL_IOStream to provide image data.
834
+ * \returns true if this is JXL data, false otherwise.
835
+ *
836
+ * \since This function is available since SDL_image 3.0.0.
837
+ *
838
+ * \sa IMG_isANI
839
+ * \sa IMG_isAVIF
840
+ * \sa IMG_isBMP
841
+ * \sa IMG_isCUR
842
+ * \sa IMG_isGIF
843
+ * \sa IMG_isICO
844
+ * \sa IMG_isJPG
845
+ * \sa IMG_isLBM
846
+ * \sa IMG_isPCX
847
+ * \sa IMG_isPNG
848
+ * \sa IMG_isPNM
849
+ * \sa IMG_isQOI
850
+ * \sa IMG_isSVG
851
+ * \sa IMG_isTIF
852
+ * \sa IMG_isWEBP
853
+ * \sa IMG_isXCF
854
+ * \sa IMG_isXPM
855
+ * \sa IMG_isXV
856
+ */
857
+ extern SDL_DECLSPEC bool SDLCALL IMG_isJXL(SDL_IOStream *src);
858
+
859
+ /**
860
+ * Detect LBM image data on a readable/seekable SDL_IOStream.
861
+ *
862
+ * This function attempts to determine if a file is a given filetype, reading
863
+ * the least amount possible from the SDL_IOStream (usually a few bytes).
864
+ *
865
+ * There is no distinction made between "not the filetype in question" and
866
+ * basic i/o errors.
867
+ *
868
+ * This function will always attempt to seek `src` back to where it started
869
+ * when this function was called, but it will not report any errors in doing
870
+ * so, but assuming seeking works, this means you can immediately use this
871
+ * with a different IMG_isTYPE function, or load the image without further
872
+ * seeking.
873
+ *
874
+ * You do not need to call this function to load data; SDL_image can work to
875
+ * determine file type in many cases in its standard load functions.
876
+ *
877
+ * \param src a seekable/readable SDL_IOStream to provide image data.
878
+ * \returns true if this is LBM data, false otherwise.
879
+ *
880
+ * \since This function is available since SDL_image 3.0.0.
881
+ *
882
+ * \sa IMG_isANI
883
+ * \sa IMG_isAVIF
884
+ * \sa IMG_isBMP
885
+ * \sa IMG_isCUR
886
+ * \sa IMG_isGIF
887
+ * \sa IMG_isICO
888
+ * \sa IMG_isJPG
889
+ * \sa IMG_isJXL
890
+ * \sa IMG_isPCX
891
+ * \sa IMG_isPNG
892
+ * \sa IMG_isPNM
893
+ * \sa IMG_isQOI
894
+ * \sa IMG_isSVG
895
+ * \sa IMG_isTIF
896
+ * \sa IMG_isWEBP
897
+ * \sa IMG_isXCF
898
+ * \sa IMG_isXPM
899
+ * \sa IMG_isXV
900
+ */
901
+ extern SDL_DECLSPEC bool SDLCALL IMG_isLBM(SDL_IOStream *src);
902
+
903
+ /**
904
+ * Detect PCX image data on a readable/seekable SDL_IOStream.
905
+ *
906
+ * This function attempts to determine if a file is a given filetype, reading
907
+ * the least amount possible from the SDL_IOStream (usually a few bytes).
908
+ *
909
+ * There is no distinction made between "not the filetype in question" and
910
+ * basic i/o errors.
911
+ *
912
+ * This function will always attempt to seek `src` back to where it started
913
+ * when this function was called, but it will not report any errors in doing
914
+ * so, but assuming seeking works, this means you can immediately use this
915
+ * with a different IMG_isTYPE function, or load the image without further
916
+ * seeking.
917
+ *
918
+ * You do not need to call this function to load data; SDL_image can work to
919
+ * determine file type in many cases in its standard load functions.
920
+ *
921
+ * \param src a seekable/readable SDL_IOStream to provide image data.
922
+ * \returns true if this is PCX data, false otherwise.
923
+ *
924
+ * \since This function is available since SDL_image 3.0.0.
925
+ *
926
+ * \sa IMG_isANI
927
+ * \sa IMG_isAVIF
928
+ * \sa IMG_isBMP
929
+ * \sa IMG_isCUR
930
+ * \sa IMG_isGIF
931
+ * \sa IMG_isICO
932
+ * \sa IMG_isJPG
933
+ * \sa IMG_isJXL
934
+ * \sa IMG_isLBM
935
+ * \sa IMG_isPNG
936
+ * \sa IMG_isPNM
937
+ * \sa IMG_isQOI
938
+ * \sa IMG_isSVG
939
+ * \sa IMG_isTIF
940
+ * \sa IMG_isWEBP
941
+ * \sa IMG_isXCF
942
+ * \sa IMG_isXPM
943
+ * \sa IMG_isXV
944
+ */
945
+ extern SDL_DECLSPEC bool SDLCALL IMG_isPCX(SDL_IOStream *src);
946
+
947
+ /**
948
+ * Detect PNG image data on a readable/seekable SDL_IOStream.
949
+ *
950
+ * This function attempts to determine if a file is a given filetype, reading
951
+ * the least amount possible from the SDL_IOStream (usually a few bytes).
952
+ *
953
+ * There is no distinction made between "not the filetype in question" and
954
+ * basic i/o errors.
955
+ *
956
+ * This function will always attempt to seek `src` back to where it started
957
+ * when this function was called, but it will not report any errors in doing
958
+ * so, but assuming seeking works, this means you can immediately use this
959
+ * with a different IMG_isTYPE function, or load the image without further
960
+ * seeking.
961
+ *
962
+ * You do not need to call this function to load data; SDL_image can work to
963
+ * determine file type in many cases in its standard load functions.
964
+ *
965
+ * \param src a seekable/readable SDL_IOStream to provide image data.
966
+ * \returns true if this is PNG data, false otherwise.
967
+ *
968
+ * \since This function is available since SDL_image 3.0.0.
969
+ *
970
+ * \sa IMG_isANI
971
+ * \sa IMG_isAVIF
972
+ * \sa IMG_isBMP
973
+ * \sa IMG_isCUR
974
+ * \sa IMG_isGIF
975
+ * \sa IMG_isICO
976
+ * \sa IMG_isJPG
977
+ * \sa IMG_isJXL
978
+ * \sa IMG_isLBM
979
+ * \sa IMG_isPCX
980
+ * \sa IMG_isPNM
981
+ * \sa IMG_isQOI
982
+ * \sa IMG_isSVG
983
+ * \sa IMG_isTIF
984
+ * \sa IMG_isWEBP
985
+ * \sa IMG_isXCF
986
+ * \sa IMG_isXPM
987
+ * \sa IMG_isXV
988
+ */
989
+ extern SDL_DECLSPEC bool SDLCALL IMG_isPNG(SDL_IOStream *src);
990
+
991
+ /**
992
+ * Detect PNM image data on a readable/seekable SDL_IOStream.
993
+ *
994
+ * This function attempts to determine if a file is a given filetype, reading
995
+ * the least amount possible from the SDL_IOStream (usually a few bytes).
996
+ *
997
+ * There is no distinction made between "not the filetype in question" and
998
+ * basic i/o errors.
999
+ *
1000
+ * This function will always attempt to seek `src` back to where it started
1001
+ * when this function was called, but it will not report any errors in doing
1002
+ * so, but assuming seeking works, this means you can immediately use this
1003
+ * with a different IMG_isTYPE function, or load the image without further
1004
+ * seeking.
1005
+ *
1006
+ * You do not need to call this function to load data; SDL_image can work to
1007
+ * determine file type in many cases in its standard load functions.
1008
+ *
1009
+ * \param src a seekable/readable SDL_IOStream to provide image data.
1010
+ * \returns true if this is PNM data, false otherwise.
1011
+ *
1012
+ * \since This function is available since SDL_image 3.0.0.
1013
+ *
1014
+ * \sa IMG_isANI
1015
+ * \sa IMG_isAVIF
1016
+ * \sa IMG_isBMP
1017
+ * \sa IMG_isCUR
1018
+ * \sa IMG_isGIF
1019
+ * \sa IMG_isICO
1020
+ * \sa IMG_isJPG
1021
+ * \sa IMG_isJXL
1022
+ * \sa IMG_isLBM
1023
+ * \sa IMG_isPCX
1024
+ * \sa IMG_isPNG
1025
+ * \sa IMG_isQOI
1026
+ * \sa IMG_isSVG
1027
+ * \sa IMG_isTIF
1028
+ * \sa IMG_isWEBP
1029
+ * \sa IMG_isXCF
1030
+ * \sa IMG_isXPM
1031
+ * \sa IMG_isXV
1032
+ */
1033
+ extern SDL_DECLSPEC bool SDLCALL IMG_isPNM(SDL_IOStream *src);
1034
+
1035
+ /**
1036
+ * Detect QOI image data on a readable/seekable SDL_IOStream.
1037
+ *
1038
+ * This function attempts to determine if a file is a given filetype, reading
1039
+ * the least amount possible from the SDL_IOStream (usually a few bytes).
1040
+ *
1041
+ * There is no distinction made between "not the filetype in question" and
1042
+ * basic i/o errors.
1043
+ *
1044
+ * This function will always attempt to seek `src` back to where it started
1045
+ * when this function was called, but it will not report any errors in doing
1046
+ * so, but assuming seeking works, this means you can immediately use this
1047
+ * with a different IMG_isTYPE function, or load the image without further
1048
+ * seeking.
1049
+ *
1050
+ * You do not need to call this function to load data; SDL_image can work to
1051
+ * determine file type in many cases in its standard load functions.
1052
+ *
1053
+ * \param src a seekable/readable SDL_IOStream to provide image data.
1054
+ * \returns true if this is QOI data, false otherwise.
1055
+ *
1056
+ * \since This function is available since SDL_image 3.0.0.
1057
+ *
1058
+ * \sa IMG_isANI
1059
+ * \sa IMG_isAVIF
1060
+ * \sa IMG_isBMP
1061
+ * \sa IMG_isCUR
1062
+ * \sa IMG_isGIF
1063
+ * \sa IMG_isICO
1064
+ * \sa IMG_isJPG
1065
+ * \sa IMG_isJXL
1066
+ * \sa IMG_isLBM
1067
+ * \sa IMG_isPCX
1068
+ * \sa IMG_isPNG
1069
+ * \sa IMG_isPNM
1070
+ * \sa IMG_isSVG
1071
+ * \sa IMG_isTIF
1072
+ * \sa IMG_isWEBP
1073
+ * \sa IMG_isXCF
1074
+ * \sa IMG_isXPM
1075
+ * \sa IMG_isXV
1076
+ */
1077
+ extern SDL_DECLSPEC bool SDLCALL IMG_isQOI(SDL_IOStream *src);
1078
+
1079
+ /**
1080
+ * Detect SVG image data on a readable/seekable SDL_IOStream.
1081
+ *
1082
+ * This function attempts to determine if a file is a given filetype, reading
1083
+ * the least amount possible from the SDL_IOStream (usually a few bytes).
1084
+ *
1085
+ * There is no distinction made between "not the filetype in question" and
1086
+ * basic i/o errors.
1087
+ *
1088
+ * This function will always attempt to seek `src` back to where it started
1089
+ * when this function was called, but it will not report any errors in doing
1090
+ * so, but assuming seeking works, this means you can immediately use this
1091
+ * with a different IMG_isTYPE function, or load the image without further
1092
+ * seeking.
1093
+ *
1094
+ * You do not need to call this function to load data; SDL_image can work to
1095
+ * determine file type in many cases in its standard load functions.
1096
+ *
1097
+ * \param src a seekable/readable SDL_IOStream to provide image data.
1098
+ * \returns true if this is SVG data, false otherwise.
1099
+ *
1100
+ * \since This function is available since SDL_image 3.0.0.
1101
+ *
1102
+ * \sa IMG_isANI
1103
+ * \sa IMG_isAVIF
1104
+ * \sa IMG_isBMP
1105
+ * \sa IMG_isCUR
1106
+ * \sa IMG_isGIF
1107
+ * \sa IMG_isICO
1108
+ * \sa IMG_isJPG
1109
+ * \sa IMG_isJXL
1110
+ * \sa IMG_isLBM
1111
+ * \sa IMG_isPCX
1112
+ * \sa IMG_isPNG
1113
+ * \sa IMG_isPNM
1114
+ * \sa IMG_isQOI
1115
+ * \sa IMG_isTIF
1116
+ * \sa IMG_isWEBP
1117
+ * \sa IMG_isXCF
1118
+ * \sa IMG_isXPM
1119
+ * \sa IMG_isXV
1120
+ */
1121
+ extern SDL_DECLSPEC bool SDLCALL IMG_isSVG(SDL_IOStream *src);
1122
+
1123
+ /**
1124
+ * Detect TIFF image data on a readable/seekable SDL_IOStream.
1125
+ *
1126
+ * This function attempts to determine if a file is a given filetype, reading
1127
+ * the least amount possible from the SDL_IOStream (usually a few bytes).
1128
+ *
1129
+ * There is no distinction made between "not the filetype in question" and
1130
+ * basic i/o errors.
1131
+ *
1132
+ * This function will always attempt to seek `src` back to where it started
1133
+ * when this function was called, but it will not report any errors in doing
1134
+ * so, but assuming seeking works, this means you can immediately use this
1135
+ * with a different IMG_isTYPE function, or load the image without further
1136
+ * seeking.
1137
+ *
1138
+ * You do not need to call this function to load data; SDL_image can work to
1139
+ * determine file type in many cases in its standard load functions.
1140
+ *
1141
+ * \param src a seekable/readable SDL_IOStream to provide image data.
1142
+ * \returns true if this is TIFF data, false otherwise.
1143
+ *
1144
+ * \since This function is available since SDL_image 3.0.0.
1145
+ *
1146
+ * \sa IMG_isANI
1147
+ * \sa IMG_isAVIF
1148
+ * \sa IMG_isBMP
1149
+ * \sa IMG_isCUR
1150
+ * \sa IMG_isGIF
1151
+ * \sa IMG_isICO
1152
+ * \sa IMG_isJPG
1153
+ * \sa IMG_isJXL
1154
+ * \sa IMG_isLBM
1155
+ * \sa IMG_isPCX
1156
+ * \sa IMG_isPNG
1157
+ * \sa IMG_isPNM
1158
+ * \sa IMG_isQOI
1159
+ * \sa IMG_isSVG
1160
+ * \sa IMG_isWEBP
1161
+ * \sa IMG_isXCF
1162
+ * \sa IMG_isXPM
1163
+ * \sa IMG_isXV
1164
+ */
1165
+ extern SDL_DECLSPEC bool SDLCALL IMG_isTIF(SDL_IOStream *src);
1166
+
1167
+ /**
1168
+ * Detect WEBP image data on a readable/seekable SDL_IOStream.
1169
+ *
1170
+ * This function attempts to determine if a file is a given filetype, reading
1171
+ * the least amount possible from the SDL_IOStream (usually a few bytes).
1172
+ *
1173
+ * There is no distinction made between "not the filetype in question" and
1174
+ * basic i/o errors.
1175
+ *
1176
+ * This function will always attempt to seek `src` back to where it started
1177
+ * when this function was called, but it will not report any errors in doing
1178
+ * so, but assuming seeking works, this means you can immediately use this
1179
+ * with a different IMG_isTYPE function, or load the image without further
1180
+ * seeking.
1181
+ *
1182
+ * You do not need to call this function to load data; SDL_image can work to
1183
+ * determine file type in many cases in its standard load functions.
1184
+ *
1185
+ * \param src a seekable/readable SDL_IOStream to provide image data.
1186
+ * \returns true if this is WEBP data, false otherwise.
1187
+ *
1188
+ * \since This function is available since SDL_image 3.0.0.
1189
+ *
1190
+ * \sa IMG_isANI
1191
+ * \sa IMG_isAVIF
1192
+ * \sa IMG_isBMP
1193
+ * \sa IMG_isCUR
1194
+ * \sa IMG_isGIF
1195
+ * \sa IMG_isICO
1196
+ * \sa IMG_isJPG
1197
+ * \sa IMG_isJXL
1198
+ * \sa IMG_isLBM
1199
+ * \sa IMG_isPCX
1200
+ * \sa IMG_isPNG
1201
+ * \sa IMG_isPNM
1202
+ * \sa IMG_isQOI
1203
+ * \sa IMG_isSVG
1204
+ * \sa IMG_isTIF
1205
+ * \sa IMG_isXCF
1206
+ * \sa IMG_isXPM
1207
+ * \sa IMG_isXV
1208
+ */
1209
+ extern SDL_DECLSPEC bool SDLCALL IMG_isWEBP(SDL_IOStream *src);
1210
+
1211
+ /**
1212
+ * Detect XCF image data on a readable/seekable SDL_IOStream.
1213
+ *
1214
+ * This function attempts to determine if a file is a given filetype, reading
1215
+ * the least amount possible from the SDL_IOStream (usually a few bytes).
1216
+ *
1217
+ * There is no distinction made between "not the filetype in question" and
1218
+ * basic i/o errors.
1219
+ *
1220
+ * This function will always attempt to seek `src` back to where it started
1221
+ * when this function was called, but it will not report any errors in doing
1222
+ * so, but assuming seeking works, this means you can immediately use this
1223
+ * with a different IMG_isTYPE function, or load the image without further
1224
+ * seeking.
1225
+ *
1226
+ * You do not need to call this function to load data; SDL_image can work to
1227
+ * determine file type in many cases in its standard load functions.
1228
+ *
1229
+ * \param src a seekable/readable SDL_IOStream to provide image data.
1230
+ * \returns true if this is XCF data, false otherwise.
1231
+ *
1232
+ * \since This function is available since SDL_image 3.0.0.
1233
+ *
1234
+ * \sa IMG_isANI
1235
+ * \sa IMG_isAVIF
1236
+ * \sa IMG_isBMP
1237
+ * \sa IMG_isCUR
1238
+ * \sa IMG_isGIF
1239
+ * \sa IMG_isICO
1240
+ * \sa IMG_isJPG
1241
+ * \sa IMG_isJXL
1242
+ * \sa IMG_isLBM
1243
+ * \sa IMG_isPCX
1244
+ * \sa IMG_isPNG
1245
+ * \sa IMG_isPNM
1246
+ * \sa IMG_isQOI
1247
+ * \sa IMG_isSVG
1248
+ * \sa IMG_isTIF
1249
+ * \sa IMG_isWEBP
1250
+ * \sa IMG_isXPM
1251
+ * \sa IMG_isXV
1252
+ */
1253
+ extern SDL_DECLSPEC bool SDLCALL IMG_isXCF(SDL_IOStream *src);
1254
+
1255
+ /**
1256
+ * Detect XPM image data on a readable/seekable SDL_IOStream.
1257
+ *
1258
+ * This function attempts to determine if a file is a given filetype, reading
1259
+ * the least amount possible from the SDL_IOStream (usually a few bytes).
1260
+ *
1261
+ * There is no distinction made between "not the filetype in question" and
1262
+ * basic i/o errors.
1263
+ *
1264
+ * This function will always attempt to seek `src` back to where it started
1265
+ * when this function was called, but it will not report any errors in doing
1266
+ * so, but assuming seeking works, this means you can immediately use this
1267
+ * with a different IMG_isTYPE function, or load the image without further
1268
+ * seeking.
1269
+ *
1270
+ * You do not need to call this function to load data; SDL_image can work to
1271
+ * determine file type in many cases in its standard load functions.
1272
+ *
1273
+ * \param src a seekable/readable SDL_IOStream to provide image data.
1274
+ * \returns true if this is XPM data, false otherwise.
1275
+ *
1276
+ * \since This function is available since SDL_image 3.0.0.
1277
+ *
1278
+ * \sa IMG_isANI
1279
+ * \sa IMG_isAVIF
1280
+ * \sa IMG_isBMP
1281
+ * \sa IMG_isCUR
1282
+ * \sa IMG_isGIF
1283
+ * \sa IMG_isICO
1284
+ * \sa IMG_isJPG
1285
+ * \sa IMG_isJXL
1286
+ * \sa IMG_isLBM
1287
+ * \sa IMG_isPCX
1288
+ * \sa IMG_isPNG
1289
+ * \sa IMG_isPNM
1290
+ * \sa IMG_isQOI
1291
+ * \sa IMG_isSVG
1292
+ * \sa IMG_isTIF
1293
+ * \sa IMG_isWEBP
1294
+ * \sa IMG_isXCF
1295
+ * \sa IMG_isXV
1296
+ */
1297
+ extern SDL_DECLSPEC bool SDLCALL IMG_isXPM(SDL_IOStream *src);
1298
+
1299
+ /**
1300
+ * Detect XV image data on a readable/seekable SDL_IOStream.
1301
+ *
1302
+ * This function attempts to determine if a file is a given filetype, reading
1303
+ * the least amount possible from the SDL_IOStream (usually a few bytes).
1304
+ *
1305
+ * There is no distinction made between "not the filetype in question" and
1306
+ * basic i/o errors.
1307
+ *
1308
+ * This function will always attempt to seek `src` back to where it started
1309
+ * when this function was called, but it will not report any errors in doing
1310
+ * so, but assuming seeking works, this means you can immediately use this
1311
+ * with a different IMG_isTYPE function, or load the image without further
1312
+ * seeking.
1313
+ *
1314
+ * You do not need to call this function to load data; SDL_image can work to
1315
+ * determine file type in many cases in its standard load functions.
1316
+ *
1317
+ * \param src a seekable/readable SDL_IOStream to provide image data.
1318
+ * \returns true if this is XV data, false otherwise.
1319
+ *
1320
+ * \since This function is available since SDL_image 3.0.0.
1321
+ *
1322
+ * \sa IMG_isANI
1323
+ * \sa IMG_isAVIF
1324
+ * \sa IMG_isBMP
1325
+ * \sa IMG_isCUR
1326
+ * \sa IMG_isGIF
1327
+ * \sa IMG_isICO
1328
+ * \sa IMG_isJPG
1329
+ * \sa IMG_isJXL
1330
+ * \sa IMG_isLBM
1331
+ * \sa IMG_isPCX
1332
+ * \sa IMG_isPNG
1333
+ * \sa IMG_isPNM
1334
+ * \sa IMG_isQOI
1335
+ * \sa IMG_isSVG
1336
+ * \sa IMG_isTIF
1337
+ * \sa IMG_isWEBP
1338
+ * \sa IMG_isXCF
1339
+ * \sa IMG_isXPM
1340
+ */
1341
+ extern SDL_DECLSPEC bool SDLCALL IMG_isXV(SDL_IOStream *src);
1342
+
1343
+ /**
1344
+ * Load a AVIF image directly.
1345
+ *
1346
+ * If you know you definitely have a AVIF image, you can call this function,
1347
+ * which will skip SDL_image's file format detection routines. Generally it's
1348
+ * better to use the abstract interfaces; also, there is only an SDL_IOStream
1349
+ * interface available here.
1350
+ *
1351
+ * \param src an SDL_IOStream to load image data from.
1352
+ * \returns SDL surface, or NULL on error.
1353
+ *
1354
+ * \since This function is available since SDL_image 3.0.0.
1355
+ *
1356
+ * \sa IMG_LoadBMP_IO
1357
+ * \sa IMG_LoadCUR_IO
1358
+ * \sa IMG_LoadGIF_IO
1359
+ * \sa IMG_LoadICO_IO
1360
+ * \sa IMG_LoadJPG_IO
1361
+ * \sa IMG_LoadJXL_IO
1362
+ * \sa IMG_LoadLBM_IO
1363
+ * \sa IMG_LoadPCX_IO
1364
+ * \sa IMG_LoadPNG_IO
1365
+ * \sa IMG_LoadPNM_IO
1366
+ * \sa IMG_LoadQOI_IO
1367
+ * \sa IMG_LoadSVG_IO
1368
+ * \sa IMG_LoadTGA_IO
1369
+ * \sa IMG_LoadTIF_IO
1370
+ * \sa IMG_LoadWEBP_IO
1371
+ * \sa IMG_LoadXCF_IO
1372
+ * \sa IMG_LoadXPM_IO
1373
+ * \sa IMG_LoadXV_IO
1374
+ */
1375
+ extern SDL_DECLSPEC SDL_Surface * SDLCALL IMG_LoadAVIF_IO(SDL_IOStream *src);
1376
+
1377
+ /**
1378
+ * Load a BMP image directly.
1379
+ *
1380
+ * If you know you definitely have a BMP image, you can call this function,
1381
+ * which will skip SDL_image's file format detection routines. Generally it's
1382
+ * better to use the abstract interfaces; also, there is only an SDL_IOStream
1383
+ * interface available here.
1384
+ *
1385
+ * \param src an SDL_IOStream to load image data from.
1386
+ * \returns SDL surface, or NULL on error.
1387
+ *
1388
+ * \since This function is available since SDL_image 3.0.0.
1389
+ *
1390
+ * \sa IMG_LoadAVIF_IO
1391
+ * \sa IMG_LoadCUR_IO
1392
+ * \sa IMG_LoadGIF_IO
1393
+ * \sa IMG_LoadICO_IO
1394
+ * \sa IMG_LoadJPG_IO
1395
+ * \sa IMG_LoadJXL_IO
1396
+ * \sa IMG_LoadLBM_IO
1397
+ * \sa IMG_LoadPCX_IO
1398
+ * \sa IMG_LoadPNG_IO
1399
+ * \sa IMG_LoadPNM_IO
1400
+ * \sa IMG_LoadQOI_IO
1401
+ * \sa IMG_LoadSVG_IO
1402
+ * \sa IMG_LoadTGA_IO
1403
+ * \sa IMG_LoadTIF_IO
1404
+ * \sa IMG_LoadWEBP_IO
1405
+ * \sa IMG_LoadXCF_IO
1406
+ * \sa IMG_LoadXPM_IO
1407
+ * \sa IMG_LoadXV_IO
1408
+ */
1409
+ extern SDL_DECLSPEC SDL_Surface * SDLCALL IMG_LoadBMP_IO(SDL_IOStream *src);
1410
+
1411
+ /**
1412
+ * Load a CUR image directly.
1413
+ *
1414
+ * If you know you definitely have a CUR image, you can call this function,
1415
+ * which will skip SDL_image's file format detection routines. Generally it's
1416
+ * better to use the abstract interfaces; also, there is only an SDL_IOStream
1417
+ * interface available here.
1418
+ *
1419
+ * \param src an SDL_IOStream to load image data from.
1420
+ * \returns SDL surface, or NULL on error.
1421
+ *
1422
+ * \since This function is available since SDL_image 3.0.0.
1423
+ *
1424
+ * \sa IMG_LoadAVIF_IO
1425
+ * \sa IMG_LoadBMP_IO
1426
+ * \sa IMG_LoadGIF_IO
1427
+ * \sa IMG_LoadICO_IO
1428
+ * \sa IMG_LoadJPG_IO
1429
+ * \sa IMG_LoadJXL_IO
1430
+ * \sa IMG_LoadLBM_IO
1431
+ * \sa IMG_LoadPCX_IO
1432
+ * \sa IMG_LoadPNG_IO
1433
+ * \sa IMG_LoadPNM_IO
1434
+ * \sa IMG_LoadQOI_IO
1435
+ * \sa IMG_LoadSVG_IO
1436
+ * \sa IMG_LoadTGA_IO
1437
+ * \sa IMG_LoadTIF_IO
1438
+ * \sa IMG_LoadWEBP_IO
1439
+ * \sa IMG_LoadXCF_IO
1440
+ * \sa IMG_LoadXPM_IO
1441
+ * \sa IMG_LoadXV_IO
1442
+ */
1443
+ extern SDL_DECLSPEC SDL_Surface * SDLCALL IMG_LoadCUR_IO(SDL_IOStream *src);
1444
+
1445
+ /**
1446
+ * Load a GIF image directly.
1447
+ *
1448
+ * If you know you definitely have a GIF image, you can call this function,
1449
+ * which will skip SDL_image's file format detection routines. Generally it's
1450
+ * better to use the abstract interfaces; also, there is only an SDL_IOStream
1451
+ * interface available here.
1452
+ *
1453
+ * \param src an SDL_IOStream to load image data from.
1454
+ * \returns SDL surface, or NULL on error.
1455
+ *
1456
+ * \since This function is available since SDL_image 3.0.0.
1457
+ *
1458
+ * \sa IMG_LoadAVIF_IO
1459
+ * \sa IMG_LoadBMP_IO
1460
+ * \sa IMG_LoadCUR_IO
1461
+ * \sa IMG_LoadICO_IO
1462
+ * \sa IMG_LoadJPG_IO
1463
+ * \sa IMG_LoadJXL_IO
1464
+ * \sa IMG_LoadLBM_IO
1465
+ * \sa IMG_LoadPCX_IO
1466
+ * \sa IMG_LoadPNG_IO
1467
+ * \sa IMG_LoadPNM_IO
1468
+ * \sa IMG_LoadQOI_IO
1469
+ * \sa IMG_LoadSVG_IO
1470
+ * \sa IMG_LoadTGA_IO
1471
+ * \sa IMG_LoadTIF_IO
1472
+ * \sa IMG_LoadWEBP_IO
1473
+ * \sa IMG_LoadXCF_IO
1474
+ * \sa IMG_LoadXPM_IO
1475
+ * \sa IMG_LoadXV_IO
1476
+ */
1477
+ extern SDL_DECLSPEC SDL_Surface * SDLCALL IMG_LoadGIF_IO(SDL_IOStream *src);
1478
+
1479
+ /**
1480
+ * Load a ICO image directly.
1481
+ *
1482
+ * If you know you definitely have a ICO image, you can call this function,
1483
+ * which will skip SDL_image's file format detection routines. Generally it's
1484
+ * better to use the abstract interfaces; also, there is only an SDL_IOStream
1485
+ * interface available here.
1486
+ *
1487
+ * \param src an SDL_IOStream to load image data from.
1488
+ * \returns SDL surface, or NULL on error.
1489
+ *
1490
+ * \since This function is available since SDL_image 3.0.0.
1491
+ *
1492
+ * \sa IMG_LoadAVIF_IO
1493
+ * \sa IMG_LoadBMP_IO
1494
+ * \sa IMG_LoadCUR_IO
1495
+ * \sa IMG_LoadGIF_IO
1496
+ * \sa IMG_LoadJPG_IO
1497
+ * \sa IMG_LoadJXL_IO
1498
+ * \sa IMG_LoadLBM_IO
1499
+ * \sa IMG_LoadPCX_IO
1500
+ * \sa IMG_LoadPNG_IO
1501
+ * \sa IMG_LoadPNM_IO
1502
+ * \sa IMG_LoadQOI_IO
1503
+ * \sa IMG_LoadSVG_IO
1504
+ * \sa IMG_LoadTGA_IO
1505
+ * \sa IMG_LoadTIF_IO
1506
+ * \sa IMG_LoadWEBP_IO
1507
+ * \sa IMG_LoadXCF_IO
1508
+ * \sa IMG_LoadXPM_IO
1509
+ * \sa IMG_LoadXV_IO
1510
+ */
1511
+ extern SDL_DECLSPEC SDL_Surface * SDLCALL IMG_LoadICO_IO(SDL_IOStream *src);
1512
+
1513
+ /**
1514
+ * Load a JPG image directly.
1515
+ *
1516
+ * If you know you definitely have a JPG image, you can call this function,
1517
+ * which will skip SDL_image's file format detection routines. Generally it's
1518
+ * better to use the abstract interfaces; also, there is only an SDL_IOStream
1519
+ * interface available here.
1520
+ *
1521
+ * \param src an SDL_IOStream to load image data from.
1522
+ * \returns SDL surface, or NULL on error.
1523
+ *
1524
+ * \since This function is available since SDL_image 3.0.0.
1525
+ *
1526
+ * \sa IMG_LoadAVIF_IO
1527
+ * \sa IMG_LoadBMP_IO
1528
+ * \sa IMG_LoadCUR_IO
1529
+ * \sa IMG_LoadGIF_IO
1530
+ * \sa IMG_LoadICO_IO
1531
+ * \sa IMG_LoadJXL_IO
1532
+ * \sa IMG_LoadLBM_IO
1533
+ * \sa IMG_LoadPCX_IO
1534
+ * \sa IMG_LoadPNG_IO
1535
+ * \sa IMG_LoadPNM_IO
1536
+ * \sa IMG_LoadQOI_IO
1537
+ * \sa IMG_LoadSVG_IO
1538
+ * \sa IMG_LoadTGA_IO
1539
+ * \sa IMG_LoadTIF_IO
1540
+ * \sa IMG_LoadWEBP_IO
1541
+ * \sa IMG_LoadXCF_IO
1542
+ * \sa IMG_LoadXPM_IO
1543
+ * \sa IMG_LoadXV_IO
1544
+ */
1545
+ extern SDL_DECLSPEC SDL_Surface * SDLCALL IMG_LoadJPG_IO(SDL_IOStream *src);
1546
+
1547
+ /**
1548
+ * Load a JXL image directly.
1549
+ *
1550
+ * If you know you definitely have a JXL image, you can call this function,
1551
+ * which will skip SDL_image's file format detection routines. Generally it's
1552
+ * better to use the abstract interfaces; also, there is only an SDL_IOStream
1553
+ * interface available here.
1554
+ *
1555
+ * \param src an SDL_IOStream to load image data from.
1556
+ * \returns SDL surface, or NULL on error.
1557
+ *
1558
+ * \since This function is available since SDL_image 3.0.0.
1559
+ *
1560
+ * \sa IMG_LoadAVIF_IO
1561
+ * \sa IMG_LoadBMP_IO
1562
+ * \sa IMG_LoadCUR_IO
1563
+ * \sa IMG_LoadGIF_IO
1564
+ * \sa IMG_LoadICO_IO
1565
+ * \sa IMG_LoadJPG_IO
1566
+ * \sa IMG_LoadLBM_IO
1567
+ * \sa IMG_LoadPCX_IO
1568
+ * \sa IMG_LoadPNG_IO
1569
+ * \sa IMG_LoadPNM_IO
1570
+ * \sa IMG_LoadQOI_IO
1571
+ * \sa IMG_LoadSVG_IO
1572
+ * \sa IMG_LoadTGA_IO
1573
+ * \sa IMG_LoadTIF_IO
1574
+ * \sa IMG_LoadWEBP_IO
1575
+ * \sa IMG_LoadXCF_IO
1576
+ * \sa IMG_LoadXPM_IO
1577
+ * \sa IMG_LoadXV_IO
1578
+ */
1579
+ extern SDL_DECLSPEC SDL_Surface * SDLCALL IMG_LoadJXL_IO(SDL_IOStream *src);
1580
+
1581
+ /**
1582
+ * Load a LBM image directly.
1583
+ *
1584
+ * If you know you definitely have a LBM image, you can call this function,
1585
+ * which will skip SDL_image's file format detection routines. Generally it's
1586
+ * better to use the abstract interfaces; also, there is only an SDL_IOStream
1587
+ * interface available here.
1588
+ *
1589
+ * \param src an SDL_IOStream to load image data from.
1590
+ * \returns SDL surface, or NULL on error.
1591
+ *
1592
+ * \since This function is available since SDL_image 3.0.0.
1593
+ *
1594
+ * \sa IMG_LoadAVIF_IO
1595
+ * \sa IMG_LoadBMP_IO
1596
+ * \sa IMG_LoadCUR_IO
1597
+ * \sa IMG_LoadGIF_IO
1598
+ * \sa IMG_LoadICO_IO
1599
+ * \sa IMG_LoadJPG_IO
1600
+ * \sa IMG_LoadJXL_IO
1601
+ * \sa IMG_LoadPCX_IO
1602
+ * \sa IMG_LoadPNG_IO
1603
+ * \sa IMG_LoadPNM_IO
1604
+ * \sa IMG_LoadQOI_IO
1605
+ * \sa IMG_LoadSVG_IO
1606
+ * \sa IMG_LoadTGA_IO
1607
+ * \sa IMG_LoadTIF_IO
1608
+ * \sa IMG_LoadWEBP_IO
1609
+ * \sa IMG_LoadXCF_IO
1610
+ * \sa IMG_LoadXPM_IO
1611
+ * \sa IMG_LoadXV_IO
1612
+ */
1613
+ extern SDL_DECLSPEC SDL_Surface * SDLCALL IMG_LoadLBM_IO(SDL_IOStream *src);
1614
+
1615
+ /**
1616
+ * Load a PCX image directly.
1617
+ *
1618
+ * If you know you definitely have a PCX image, you can call this function,
1619
+ * which will skip SDL_image's file format detection routines. Generally it's
1620
+ * better to use the abstract interfaces; also, there is only an SDL_IOStream
1621
+ * interface available here.
1622
+ *
1623
+ * \param src an SDL_IOStream to load image data from.
1624
+ * \returns SDL surface, or NULL on error.
1625
+ *
1626
+ * \since This function is available since SDL_image 3.0.0.
1627
+ *
1628
+ * \sa IMG_LoadAVIF_IO
1629
+ * \sa IMG_LoadBMP_IO
1630
+ * \sa IMG_LoadCUR_IO
1631
+ * \sa IMG_LoadGIF_IO
1632
+ * \sa IMG_LoadICO_IO
1633
+ * \sa IMG_LoadJPG_IO
1634
+ * \sa IMG_LoadJXL_IO
1635
+ * \sa IMG_LoadLBM_IO
1636
+ * \sa IMG_LoadPNG_IO
1637
+ * \sa IMG_LoadPNM_IO
1638
+ * \sa IMG_LoadQOI_IO
1639
+ * \sa IMG_LoadSVG_IO
1640
+ * \sa IMG_LoadTGA_IO
1641
+ * \sa IMG_LoadTIF_IO
1642
+ * \sa IMG_LoadWEBP_IO
1643
+ * \sa IMG_LoadXCF_IO
1644
+ * \sa IMG_LoadXPM_IO
1645
+ * \sa IMG_LoadXV_IO
1646
+ */
1647
+ extern SDL_DECLSPEC SDL_Surface * SDLCALL IMG_LoadPCX_IO(SDL_IOStream *src);
1648
+
1649
+ /**
1650
+ * Load a PNG image directly.
1651
+ *
1652
+ * If you know you definitely have a PNG image, you can call this function,
1653
+ * which will skip SDL_image's file format detection routines. Generally it's
1654
+ * better to use the abstract interfaces; also, there is only an SDL_IOStream
1655
+ * interface available here.
1656
+ *
1657
+ * \param src an SDL_IOStream to load image data from.
1658
+ * \returns SDL surface, or NULL on error.
1659
+ *
1660
+ * \since This function is available since SDL_image 3.0.0.
1661
+ *
1662
+ * \sa IMG_LoadAVIF_IO
1663
+ * \sa IMG_LoadBMP_IO
1664
+ * \sa IMG_LoadCUR_IO
1665
+ * \sa IMG_LoadGIF_IO
1666
+ * \sa IMG_LoadICO_IO
1667
+ * \sa IMG_LoadJPG_IO
1668
+ * \sa IMG_LoadJXL_IO
1669
+ * \sa IMG_LoadLBM_IO
1670
+ * \sa IMG_LoadPCX_IO
1671
+ * \sa IMG_LoadPNM_IO
1672
+ * \sa IMG_LoadQOI_IO
1673
+ * \sa IMG_LoadSVG_IO
1674
+ * \sa IMG_LoadTGA_IO
1675
+ * \sa IMG_LoadTIF_IO
1676
+ * \sa IMG_LoadWEBP_IO
1677
+ * \sa IMG_LoadXCF_IO
1678
+ * \sa IMG_LoadXPM_IO
1679
+ * \sa IMG_LoadXV_IO
1680
+ */
1681
+ extern SDL_DECLSPEC SDL_Surface * SDLCALL IMG_LoadPNG_IO(SDL_IOStream *src);
1682
+
1683
+ /**
1684
+ * Load a PNM image directly.
1685
+ *
1686
+ * If you know you definitely have a PNM image, you can call this function,
1687
+ * which will skip SDL_image's file format detection routines. Generally it's
1688
+ * better to use the abstract interfaces; also, there is only an SDL_IOStream
1689
+ * interface available here.
1690
+ *
1691
+ * \param src an SDL_IOStream to load image data from.
1692
+ * \returns SDL surface, or NULL on error.
1693
+ *
1694
+ * \since This function is available since SDL_image 3.0.0.
1695
+ *
1696
+ * \sa IMG_LoadAVIF_IO
1697
+ * \sa IMG_LoadBMP_IO
1698
+ * \sa IMG_LoadCUR_IO
1699
+ * \sa IMG_LoadGIF_IO
1700
+ * \sa IMG_LoadICO_IO
1701
+ * \sa IMG_LoadJPG_IO
1702
+ * \sa IMG_LoadJXL_IO
1703
+ * \sa IMG_LoadLBM_IO
1704
+ * \sa IMG_LoadPCX_IO
1705
+ * \sa IMG_LoadPNG_IO
1706
+ * \sa IMG_LoadQOI_IO
1707
+ * \sa IMG_LoadSVG_IO
1708
+ * \sa IMG_LoadTGA_IO
1709
+ * \sa IMG_LoadTIF_IO
1710
+ * \sa IMG_LoadWEBP_IO
1711
+ * \sa IMG_LoadXCF_IO
1712
+ * \sa IMG_LoadXPM_IO
1713
+ * \sa IMG_LoadXV_IO
1714
+ */
1715
+ extern SDL_DECLSPEC SDL_Surface * SDLCALL IMG_LoadPNM_IO(SDL_IOStream *src);
1716
+
1717
+ /**
1718
+ * Load a SVG image directly.
1719
+ *
1720
+ * If you know you definitely have a SVG image, you can call this function,
1721
+ * which will skip SDL_image's file format detection routines. Generally it's
1722
+ * better to use the abstract interfaces; also, there is only an SDL_IOStream
1723
+ * interface available here.
1724
+ *
1725
+ * \param src an SDL_IOStream to load image data from.
1726
+ * \returns SDL surface, or NULL on error.
1727
+ *
1728
+ * \since This function is available since SDL_image 3.0.0.
1729
+ *
1730
+ * \sa IMG_LoadAVIF_IO
1731
+ * \sa IMG_LoadBMP_IO
1732
+ * \sa IMG_LoadCUR_IO
1733
+ * \sa IMG_LoadGIF_IO
1734
+ * \sa IMG_LoadICO_IO
1735
+ * \sa IMG_LoadJPG_IO
1736
+ * \sa IMG_LoadJXL_IO
1737
+ * \sa IMG_LoadLBM_IO
1738
+ * \sa IMG_LoadPCX_IO
1739
+ * \sa IMG_LoadPNG_IO
1740
+ * \sa IMG_LoadPNM_IO
1741
+ * \sa IMG_LoadQOI_IO
1742
+ * \sa IMG_LoadSizedSVG_IO
1743
+ * \sa IMG_LoadTGA_IO
1744
+ * \sa IMG_LoadTIF_IO
1745
+ * \sa IMG_LoadWEBP_IO
1746
+ * \sa IMG_LoadXCF_IO
1747
+ * \sa IMG_LoadXPM_IO
1748
+ * \sa IMG_LoadXV_IO
1749
+ */
1750
+ extern SDL_DECLSPEC SDL_Surface * SDLCALL IMG_LoadSVG_IO(SDL_IOStream *src);
1751
+
1752
+ /**
1753
+ * Load an SVG image, scaled to a specific size.
1754
+ *
1755
+ * Since SVG files are resolution-independent, you specify the size you would
1756
+ * like the output image to be and it will be generated at those dimensions.
1757
+ *
1758
+ * Either width or height may be 0 and the image will be auto-sized to
1759
+ * preserve aspect ratio.
1760
+ *
1761
+ * When done with the returned surface, the app should dispose of it with a
1762
+ * call to SDL_DestroySurface().
1763
+ *
1764
+ * \param src an SDL_IOStream to load SVG data from.
1765
+ * \param width desired width of the generated surface, in pixels.
1766
+ * \param height desired height of the generated surface, in pixels.
1767
+ * \returns a new SDL surface, or NULL on error.
1768
+ *
1769
+ * \since This function is available since SDL_image 3.0.0.
1770
+ *
1771
+ * \sa IMG_LoadSVG_IO
1772
+ */
1773
+ extern SDL_DECLSPEC SDL_Surface * SDLCALL IMG_LoadSizedSVG_IO(SDL_IOStream *src, int width, int height);
1774
+
1775
+ /**
1776
+ * Load a QOI image directly.
1777
+ *
1778
+ * If you know you definitely have a QOI image, you can call this function,
1779
+ * which will skip SDL_image's file format detection routines. Generally it's
1780
+ * better to use the abstract interfaces; also, there is only an SDL_IOStream
1781
+ * interface available here.
1782
+ *
1783
+ * \param src an SDL_IOStream to load image data from.
1784
+ * \returns SDL surface, or NULL on error.
1785
+ *
1786
+ * \since This function is available since SDL_image 3.0.0.
1787
+ *
1788
+ * \sa IMG_LoadAVIF_IO
1789
+ * \sa IMG_LoadBMP_IO
1790
+ * \sa IMG_LoadCUR_IO
1791
+ * \sa IMG_LoadGIF_IO
1792
+ * \sa IMG_LoadICO_IO
1793
+ * \sa IMG_LoadJPG_IO
1794
+ * \sa IMG_LoadJXL_IO
1795
+ * \sa IMG_LoadLBM_IO
1796
+ * \sa IMG_LoadPCX_IO
1797
+ * \sa IMG_LoadPNG_IO
1798
+ * \sa IMG_LoadPNM_IO
1799
+ * \sa IMG_LoadSVG_IO
1800
+ * \sa IMG_LoadTGA_IO
1801
+ * \sa IMG_LoadTIF_IO
1802
+ * \sa IMG_LoadWEBP_IO
1803
+ * \sa IMG_LoadXCF_IO
1804
+ * \sa IMG_LoadXPM_IO
1805
+ * \sa IMG_LoadXV_IO
1806
+ */
1807
+ extern SDL_DECLSPEC SDL_Surface * SDLCALL IMG_LoadQOI_IO(SDL_IOStream *src);
1808
+
1809
+ /**
1810
+ * Load a TGA image directly.
1811
+ *
1812
+ * If you know you definitely have a TGA image, you can call this function,
1813
+ * which will skip SDL_image's file format detection routines. Generally it's
1814
+ * better to use the abstract interfaces; also, there is only an SDL_IOStream
1815
+ * interface available here.
1816
+ *
1817
+ * \param src an SDL_IOStream to load image data from.
1818
+ * \returns SDL surface, or NULL on error.
1819
+ *
1820
+ * \since This function is available since SDL_image 3.0.0.
1821
+ *
1822
+ * \sa IMG_LoadAVIF_IO
1823
+ * \sa IMG_LoadBMP_IO
1824
+ * \sa IMG_LoadCUR_IO
1825
+ * \sa IMG_LoadGIF_IO
1826
+ * \sa IMG_LoadICO_IO
1827
+ * \sa IMG_LoadJPG_IO
1828
+ * \sa IMG_LoadJXL_IO
1829
+ * \sa IMG_LoadLBM_IO
1830
+ * \sa IMG_LoadPCX_IO
1831
+ * \sa IMG_LoadPNG_IO
1832
+ * \sa IMG_LoadPNM_IO
1833
+ * \sa IMG_LoadQOI_IO
1834
+ * \sa IMG_LoadSVG_IO
1835
+ * \sa IMG_LoadTIF_IO
1836
+ * \sa IMG_LoadWEBP_IO
1837
+ * \sa IMG_LoadXCF_IO
1838
+ * \sa IMG_LoadXPM_IO
1839
+ * \sa IMG_LoadXV_IO
1840
+ */
1841
+ extern SDL_DECLSPEC SDL_Surface * SDLCALL IMG_LoadTGA_IO(SDL_IOStream *src);
1842
+
1843
+ /**
1844
+ * Load a TIFF image directly.
1845
+ *
1846
+ * If you know you definitely have a TIFF image, you can call this function,
1847
+ * which will skip SDL_image's file format detection routines. Generally it's
1848
+ * better to use the abstract interfaces; also, there is only an SDL_IOStream
1849
+ * interface available here.
1850
+ *
1851
+ * \param src an SDL_IOStream to load image data from.
1852
+ * \returns SDL surface, or NULL on error.
1853
+ *
1854
+ * \since This function is available since SDL_image 3.0.0.
1855
+ *
1856
+ * \sa IMG_LoadAVIF_IO
1857
+ * \sa IMG_LoadBMP_IO
1858
+ * \sa IMG_LoadCUR_IO
1859
+ * \sa IMG_LoadGIF_IO
1860
+ * \sa IMG_LoadICO_IO
1861
+ * \sa IMG_LoadJPG_IO
1862
+ * \sa IMG_LoadJXL_IO
1863
+ * \sa IMG_LoadLBM_IO
1864
+ * \sa IMG_LoadPCX_IO
1865
+ * \sa IMG_LoadPNG_IO
1866
+ * \sa IMG_LoadPNM_IO
1867
+ * \sa IMG_LoadQOI_IO
1868
+ * \sa IMG_LoadSVG_IO
1869
+ * \sa IMG_LoadTGA_IO
1870
+ * \sa IMG_LoadWEBP_IO
1871
+ * \sa IMG_LoadXCF_IO
1872
+ * \sa IMG_LoadXPM_IO
1873
+ * \sa IMG_LoadXV_IO
1874
+ */
1875
+ extern SDL_DECLSPEC SDL_Surface * SDLCALL IMG_LoadTIF_IO(SDL_IOStream *src);
1876
+
1877
+ /**
1878
+ * Load a WEBP image directly.
1879
+ *
1880
+ * If you know you definitely have a WEBP image, you can call this function,
1881
+ * which will skip SDL_image's file format detection routines. Generally it's
1882
+ * better to use the abstract interfaces; also, there is only an SDL_IOStream
1883
+ * interface available here.
1884
+ *
1885
+ * \param src an SDL_IOStream to load image data from.
1886
+ * \returns SDL surface, or NULL on error.
1887
+ *
1888
+ * \since This function is available since SDL_image 3.0.0.
1889
+ *
1890
+ * \sa IMG_LoadAVIF_IO
1891
+ * \sa IMG_LoadBMP_IO
1892
+ * \sa IMG_LoadCUR_IO
1893
+ * \sa IMG_LoadGIF_IO
1894
+ * \sa IMG_LoadICO_IO
1895
+ * \sa IMG_LoadJPG_IO
1896
+ * \sa IMG_LoadJXL_IO
1897
+ * \sa IMG_LoadLBM_IO
1898
+ * \sa IMG_LoadPCX_IO
1899
+ * \sa IMG_LoadPNG_IO
1900
+ * \sa IMG_LoadPNM_IO
1901
+ * \sa IMG_LoadQOI_IO
1902
+ * \sa IMG_LoadSVG_IO
1903
+ * \sa IMG_LoadTGA_IO
1904
+ * \sa IMG_LoadTIF_IO
1905
+ * \sa IMG_LoadXCF_IO
1906
+ * \sa IMG_LoadXPM_IO
1907
+ * \sa IMG_LoadXV_IO
1908
+ */
1909
+ extern SDL_DECLSPEC SDL_Surface * SDLCALL IMG_LoadWEBP_IO(SDL_IOStream *src);
1910
+
1911
+ /**
1912
+ * Load a XCF image directly.
1913
+ *
1914
+ * If you know you definitely have a XCF image, you can call this function,
1915
+ * which will skip SDL_image's file format detection routines. Generally it's
1916
+ * better to use the abstract interfaces; also, there is only an SDL_IOStream
1917
+ * interface available here.
1918
+ *
1919
+ * \param src an SDL_IOStream to load image data from.
1920
+ * \returns SDL surface, or NULL on error.
1921
+ *
1922
+ * \since This function is available since SDL_image 3.0.0.
1923
+ *
1924
+ * \sa IMG_LoadAVIF_IO
1925
+ * \sa IMG_LoadBMP_IO
1926
+ * \sa IMG_LoadCUR_IO
1927
+ * \sa IMG_LoadGIF_IO
1928
+ * \sa IMG_LoadICO_IO
1929
+ * \sa IMG_LoadJPG_IO
1930
+ * \sa IMG_LoadJXL_IO
1931
+ * \sa IMG_LoadLBM_IO
1932
+ * \sa IMG_LoadPCX_IO
1933
+ * \sa IMG_LoadPNG_IO
1934
+ * \sa IMG_LoadPNM_IO
1935
+ * \sa IMG_LoadQOI_IO
1936
+ * \sa IMG_LoadSVG_IO
1937
+ * \sa IMG_LoadTGA_IO
1938
+ * \sa IMG_LoadTIF_IO
1939
+ * \sa IMG_LoadWEBP_IO
1940
+ * \sa IMG_LoadXPM_IO
1941
+ * \sa IMG_LoadXV_IO
1942
+ */
1943
+ extern SDL_DECLSPEC SDL_Surface * SDLCALL IMG_LoadXCF_IO(SDL_IOStream *src);
1944
+
1945
+ /**
1946
+ * Load a XPM image directly.
1947
+ *
1948
+ * If you know you definitely have a XPM image, you can call this function,
1949
+ * which will skip SDL_image's file format detection routines. Generally it's
1950
+ * better to use the abstract interfaces; also, there is only an SDL_IOStream
1951
+ * interface available here.
1952
+ *
1953
+ * \param src an SDL_IOStream to load image data from.
1954
+ * \returns SDL surface, or NULL on error.
1955
+ *
1956
+ * \since This function is available since SDL_image 3.0.0.
1957
+ *
1958
+ * \sa IMG_LoadAVIF_IO
1959
+ * \sa IMG_LoadBMP_IO
1960
+ * \sa IMG_LoadCUR_IO
1961
+ * \sa IMG_LoadGIF_IO
1962
+ * \sa IMG_LoadICO_IO
1963
+ * \sa IMG_LoadJPG_IO
1964
+ * \sa IMG_LoadJXL_IO
1965
+ * \sa IMG_LoadLBM_IO
1966
+ * \sa IMG_LoadPCX_IO
1967
+ * \sa IMG_LoadPNG_IO
1968
+ * \sa IMG_LoadPNM_IO
1969
+ * \sa IMG_LoadQOI_IO
1970
+ * \sa IMG_LoadSVG_IO
1971
+ * \sa IMG_LoadTGA_IO
1972
+ * \sa IMG_LoadTIF_IO
1973
+ * \sa IMG_LoadWEBP_IO
1974
+ * \sa IMG_LoadXCF_IO
1975
+ * \sa IMG_LoadXV_IO
1976
+ */
1977
+ extern SDL_DECLSPEC SDL_Surface * SDLCALL IMG_LoadXPM_IO(SDL_IOStream *src);
1978
+
1979
+ /**
1980
+ * Load a XV image directly.
1981
+ *
1982
+ * If you know you definitely have a XV image, you can call this function,
1983
+ * which will skip SDL_image's file format detection routines. Generally it's
1984
+ * better to use the abstract interfaces; also, there is only an SDL_IOStream
1985
+ * interface available here.
1986
+ *
1987
+ * \param src an SDL_IOStream to load image data from.
1988
+ * \returns SDL surface, or NULL on error.
1989
+ *
1990
+ * \since This function is available since SDL_image 3.0.0.
1991
+ *
1992
+ * \sa IMG_LoadAVIF_IO
1993
+ * \sa IMG_LoadBMP_IO
1994
+ * \sa IMG_LoadCUR_IO
1995
+ * \sa IMG_LoadGIF_IO
1996
+ * \sa IMG_LoadICO_IO
1997
+ * \sa IMG_LoadJPG_IO
1998
+ * \sa IMG_LoadJXL_IO
1999
+ * \sa IMG_LoadLBM_IO
2000
+ * \sa IMG_LoadPCX_IO
2001
+ * \sa IMG_LoadPNG_IO
2002
+ * \sa IMG_LoadPNM_IO
2003
+ * \sa IMG_LoadQOI_IO
2004
+ * \sa IMG_LoadSVG_IO
2005
+ * \sa IMG_LoadTGA_IO
2006
+ * \sa IMG_LoadTIF_IO
2007
+ * \sa IMG_LoadWEBP_IO
2008
+ * \sa IMG_LoadXCF_IO
2009
+ * \sa IMG_LoadXPM_IO
2010
+ */
2011
+ extern SDL_DECLSPEC SDL_Surface * SDLCALL IMG_LoadXV_IO(SDL_IOStream *src);
2012
+
2013
+ /**
2014
+ * Load an XPM image from a memory array.
2015
+ *
2016
+ * The returned surface will be an 8bpp indexed surface, if possible,
2017
+ * otherwise it will be 32bpp. If you always want 32-bit data, use
2018
+ * IMG_ReadXPMFromArrayToRGB888() instead.
2019
+ *
2020
+ * When done with the returned surface, the app should dispose of it with a
2021
+ * call to SDL_DestroySurface().
2022
+ *
2023
+ * \param xpm a null-terminated array of strings that comprise XPM data.
2024
+ * \returns a new SDL surface, or NULL on error.
2025
+ *
2026
+ * \since This function is available since SDL_image 3.0.0.
2027
+ *
2028
+ * \sa IMG_ReadXPMFromArrayToRGB888
2029
+ */
2030
+ extern SDL_DECLSPEC SDL_Surface * SDLCALL IMG_ReadXPMFromArray(char **xpm);
2031
+
2032
+ /**
2033
+ * Load an XPM image from a memory array.
2034
+ *
2035
+ * The returned surface will always be a 32-bit RGB surface. If you want 8-bit
2036
+ * indexed colors (and the XPM data allows it), use IMG_ReadXPMFromArray()
2037
+ * instead.
2038
+ *
2039
+ * When done with the returned surface, the app should dispose of it with a
2040
+ * call to SDL_DestroySurface().
2041
+ *
2042
+ * \param xpm a null-terminated array of strings that comprise XPM data.
2043
+ * \returns a new SDL surface, or NULL on error.
2044
+ *
2045
+ * \since This function is available since SDL_image 3.0.0.
2046
+ *
2047
+ * \sa IMG_ReadXPMFromArray
2048
+ */
2049
+ extern SDL_DECLSPEC SDL_Surface * SDLCALL IMG_ReadXPMFromArrayToRGB888(char **xpm);
2050
+
2051
+ /**
2052
+ * Save an SDL_Surface into an image file.
2053
+ *
2054
+ * If the file already exists, it will be overwritten.
2055
+ *
2056
+ * For formats that accept a quality, a default quality of 90 will be used.
2057
+ *
2058
+ * \param surface the SDL surface to save.
2059
+ * \param file path on the filesystem to write new file to.
2060
+ * \returns true on success or false on failure; call SDL_GetError() for more
2061
+ * information.
2062
+ *
2063
+ * \since This function is available since SDL_image 3.4.0.
2064
+ *
2065
+ * \sa IMG_SaveTyped_IO
2066
+ * \sa IMG_SaveAVIF
2067
+ * \sa IMG_SaveBMP
2068
+ * \sa IMG_SaveCUR
2069
+ * \sa IMG_SaveGIF
2070
+ * \sa IMG_SaveICO
2071
+ * \sa IMG_SaveJPG
2072
+ * \sa IMG_SavePNG
2073
+ * \sa IMG_SaveTGA
2074
+ * \sa IMG_SaveWEBP
2075
+ */
2076
+ extern SDL_DECLSPEC bool SDLCALL IMG_Save(SDL_Surface *surface, const char *file);
2077
+
2078
+ /**
2079
+ * Save an SDL_Surface into formatted image data, via an SDL_IOStream.
2080
+ *
2081
+ * If you just want to save to a filename, you can use IMG_Save() instead.
2082
+ *
2083
+ * If `closeio` is true, `dst` will be closed before returning, whether this
2084
+ * function succeeds or not.
2085
+ *
2086
+ * For formats that accept a quality, a default quality of 90 will be used.
2087
+ *
2088
+ * \param surface the SDL surface to save.
2089
+ * \param dst the SDL_IOStream to save the image data to.
2090
+ * \param closeio true to close/free the SDL_IOStream before returning, false
2091
+ * to leave it open.
2092
+ * \param type a filename extension that represent this data ("BMP", "GIF",
2093
+ * "PNG", etc).
2094
+ * \returns true on success or false on failure; call SDL_GetError() for more
2095
+ * information.
2096
+ *
2097
+ * \since This function is available since SDL_image 3.4.0.
2098
+ *
2099
+ * \sa IMG_Save
2100
+ * \sa IMG_SaveAVIF_IO
2101
+ * \sa IMG_SaveBMP_IO
2102
+ * \sa IMG_SaveCUR_IO
2103
+ * \sa IMG_SaveGIF_IO
2104
+ * \sa IMG_SaveICO_IO
2105
+ * \sa IMG_SaveJPG_IO
2106
+ * \sa IMG_SavePNG_IO
2107
+ * \sa IMG_SaveTGA_IO
2108
+ * \sa IMG_SaveWEBP_IO
2109
+ */
2110
+ extern SDL_DECLSPEC bool SDLCALL IMG_SaveTyped_IO(SDL_Surface *surface, SDL_IOStream *dst, bool closeio, const char *type);
2111
+
2112
+ /**
2113
+ * Save an SDL_Surface into a AVIF image file.
2114
+ *
2115
+ * If the file already exists, it will be overwritten.
2116
+ *
2117
+ * \param surface the SDL surface to save.
2118
+ * \param file path on the filesystem to write new file to.
2119
+ * \param quality the desired quality, ranging between 0 (lowest) and 100
2120
+ * (highest).
2121
+ * \returns true on success or false on failure; call SDL_GetError() for more
2122
+ * information.
2123
+ *
2124
+ * \since This function is available since SDL_image 3.0.0.
2125
+ *
2126
+ * \sa IMG_SaveAVIF_IO
2127
+ */
2128
+ extern SDL_DECLSPEC bool SDLCALL IMG_SaveAVIF(SDL_Surface *surface, const char *file, int quality);
2129
+
2130
+ /**
2131
+ * Save an SDL_Surface into AVIF image data, via an SDL_IOStream.
2132
+ *
2133
+ * If you just want to save to a filename, you can use IMG_SaveAVIF() instead.
2134
+ *
2135
+ * If `closeio` is true, `dst` will be closed before returning, whether this
2136
+ * function succeeds or not.
2137
+ *
2138
+ * \param surface the SDL surface to save.
2139
+ * \param dst the SDL_IOStream to save the image data to.
2140
+ * \param closeio true to close/free the SDL_IOStream before returning, false
2141
+ * to leave it open.
2142
+ * \param quality the desired quality, ranging between 0 (lowest) and 100
2143
+ * (highest).
2144
+ * \returns true on success or false on failure; call SDL_GetError() for more
2145
+ * information.
2146
+ *
2147
+ * \since This function is available since SDL_image 3.0.0.
2148
+ *
2149
+ * \sa IMG_SaveAVIF
2150
+ */
2151
+ extern SDL_DECLSPEC bool SDLCALL IMG_SaveAVIF_IO(SDL_Surface *surface, SDL_IOStream *dst, bool closeio, int quality);
2152
+
2153
+ /**
2154
+ * Save an SDL_Surface into a BMP image file.
2155
+ *
2156
+ * If the file already exists, it will be overwritten.
2157
+ *
2158
+ * \param surface the SDL surface to save.
2159
+ * \param file path on the filesystem to write new file to.
2160
+ * \returns true on success or false on failure; call SDL_GetError() for more
2161
+ * information.
2162
+ *
2163
+ * \since This function is available since SDL_image 3.4.0.
2164
+ *
2165
+ * \sa IMG_SaveBMP_IO
2166
+ */
2167
+ extern SDL_DECLSPEC bool SDLCALL IMG_SaveBMP(SDL_Surface *surface, const char *file);
2168
+
2169
+ /**
2170
+ * Save an SDL_Surface into BMP image data, via an SDL_IOStream.
2171
+ *
2172
+ * If you just want to save to a filename, you can use IMG_SaveBMP() instead.
2173
+ *
2174
+ * If `closeio` is true, `dst` will be closed before returning, whether this
2175
+ * function succeeds or not.
2176
+ *
2177
+ * \param surface the SDL surface to save.
2178
+ * \param dst the SDL_IOStream to save the image data to.
2179
+ * \param closeio true to close/free the SDL_IOStream before returning, false
2180
+ * to leave it open.
2181
+ * \returns true on success or false on failure; call SDL_GetError() for more
2182
+ * information.
2183
+ *
2184
+ * \since This function is available since SDL_image 3.4.0.
2185
+ *
2186
+ * \sa IMG_SaveBMP
2187
+ */
2188
+ extern SDL_DECLSPEC bool SDLCALL IMG_SaveBMP_IO(SDL_Surface *surface, SDL_IOStream *dst, bool closeio);
2189
+
2190
+ /**
2191
+ * Save an SDL_Surface into a CUR image file.
2192
+ *
2193
+ * If the file already exists, it will be overwritten.
2194
+ *
2195
+ * \param surface the SDL surface to save.
2196
+ * \param file path on the filesystem to write new file to.
2197
+ * \returns true on success or false on failure; call SDL_GetError() for more
2198
+ * information.
2199
+ *
2200
+ * \since This function is available since SDL_image 3.4.0.
2201
+ *
2202
+ * \sa IMG_SaveCUR_IO
2203
+ */
2204
+ extern SDL_DECLSPEC bool SDLCALL IMG_SaveCUR(SDL_Surface *surface, const char *file);
2205
+
2206
+ /**
2207
+ * Save an SDL_Surface into CUR image data, via an SDL_IOStream.
2208
+ *
2209
+ * If you just want to save to a filename, you can use IMG_SaveCUR() instead.
2210
+ *
2211
+ * If `closeio` is true, `dst` will be closed before returning, whether this
2212
+ * function succeeds or not.
2213
+ *
2214
+ * \param surface the SDL surface to save.
2215
+ * \param dst the SDL_IOStream to save the image data to.
2216
+ * \param closeio true to close/free the SDL_IOStream before returning, false
2217
+ * to leave it open.
2218
+ * \returns true on success or false on failure; call SDL_GetError() for more
2219
+ * information.
2220
+ *
2221
+ * \since This function is available since SDL_image 3.4.0.
2222
+ *
2223
+ * \sa IMG_SaveCUR
2224
+ */
2225
+ extern SDL_DECLSPEC bool SDLCALL IMG_SaveCUR_IO(SDL_Surface *surface, SDL_IOStream *dst, bool closeio);
2226
+
2227
+ /**
2228
+ * Save an SDL_Surface into a GIF image file.
2229
+ *
2230
+ * If the file already exists, it will be overwritten.
2231
+ *
2232
+ * \param surface the SDL surface to save.
2233
+ * \param file path on the filesystem to write new file to.
2234
+ * \returns true on success or false on failure; call SDL_GetError() for more
2235
+ * information.
2236
+ *
2237
+ * \since This function is available since SDL_image 3.4.0.
2238
+ *
2239
+ * \sa IMG_SaveGIF_IO
2240
+ */
2241
+ extern SDL_DECLSPEC bool SDLCALL IMG_SaveGIF(SDL_Surface *surface, const char *file);
2242
+
2243
+ /**
2244
+ * Save an SDL_Surface into GIF image data, via an SDL_IOStream.
2245
+ *
2246
+ * If you just want to save to a filename, you can use IMG_SaveGIF() instead.
2247
+ *
2248
+ * If `closeio` is true, `dst` will be closed before returning, whether this
2249
+ * function succeeds or not.
2250
+ *
2251
+ * \param surface the SDL surface to save.
2252
+ * \param dst the SDL_IOStream to save the image data to.
2253
+ * \param closeio true to close/free the SDL_IOStream before returning, false
2254
+ * to leave it open.
2255
+ * \returns true on success or false on failure; call SDL_GetError() for more
2256
+ * information.
2257
+ *
2258
+ * \since This function is available since SDL_image 3.4.0.
2259
+ *
2260
+ * \sa IMG_SaveGIF
2261
+ */
2262
+ extern SDL_DECLSPEC bool SDLCALL IMG_SaveGIF_IO(SDL_Surface *surface, SDL_IOStream *dst, bool closeio);
2263
+
2264
+ /**
2265
+ * Save an SDL_Surface into a ICO image file.
2266
+ *
2267
+ * If the file already exists, it will be overwritten.
2268
+ *
2269
+ * \param surface the SDL surface to save.
2270
+ * \param file path on the filesystem to write new file to.
2271
+ * \returns true on success or false on failure; call SDL_GetError() for more
2272
+ * information.
2273
+ *
2274
+ * \since This function is available since SDL_image 3.4.0.
2275
+ *
2276
+ * \sa IMG_SaveICO_IO
2277
+ */
2278
+ extern SDL_DECLSPEC bool SDLCALL IMG_SaveICO(SDL_Surface *surface, const char *file);
2279
+
2280
+ /**
2281
+ * Save an SDL_Surface into ICO image data, via an SDL_IOStream.
2282
+ *
2283
+ * If you just want to save to a filename, you can use IMG_SaveICO() instead.
2284
+ *
2285
+ * If `closeio` is true, `dst` will be closed before returning, whether this
2286
+ * function succeeds or not.
2287
+ *
2288
+ * \param surface the SDL surface to save.
2289
+ * \param dst the SDL_IOStream to save the image data to.
2290
+ * \param closeio true to close/free the SDL_IOStream before returning, false
2291
+ * to leave it open.
2292
+ * \returns true on success or false on failure; call SDL_GetError() for more
2293
+ * information.
2294
+ *
2295
+ * \since This function is available since SDL_image 3.4.0.
2296
+ *
2297
+ * \sa IMG_SaveICO
2298
+ */
2299
+ extern SDL_DECLSPEC bool SDLCALL IMG_SaveICO_IO(SDL_Surface *surface, SDL_IOStream *dst, bool closeio);
2300
+
2301
+ /**
2302
+ * Save an SDL_Surface into a JPEG image file.
2303
+ *
2304
+ * If the file already exists, it will be overwritten.
2305
+ *
2306
+ * \param surface the SDL surface to save.
2307
+ * \param file path on the filesystem to write new file to.
2308
+ * \param quality [0; 33] is Lowest quality, [34; 66] is Middle quality, [67;
2309
+ * 100] is Highest quality.
2310
+ * \returns true on success or false on failure; call SDL_GetError() for more
2311
+ * information.
2312
+ *
2313
+ * \since This function is available since SDL_image 3.0.0.
2314
+ *
2315
+ * \sa IMG_SaveJPG_IO
2316
+ */
2317
+ extern SDL_DECLSPEC bool SDLCALL IMG_SaveJPG(SDL_Surface *surface, const char *file, int quality);
2318
+
2319
+ /**
2320
+ * Save an SDL_Surface into JPEG image data, via an SDL_IOStream.
2321
+ *
2322
+ * If you just want to save to a filename, you can use IMG_SaveJPG() instead.
2323
+ *
2324
+ * If `closeio` is true, `dst` will be closed before returning, whether this
2325
+ * function succeeds or not.
2326
+ *
2327
+ * \param surface the SDL surface to save.
2328
+ * \param dst the SDL_IOStream to save the image data to.
2329
+ * \param closeio true to close/free the SDL_IOStream before returning, false
2330
+ * to leave it open.
2331
+ * \param quality [0; 33] is Lowest quality, [34; 66] is Middle quality, [67;
2332
+ * 100] is Highest quality.
2333
+ * \returns true on success or false on failure; call SDL_GetError() for more
2334
+ * information.
2335
+ *
2336
+ * \since This function is available since SDL_image 3.0.0.
2337
+ *
2338
+ * \sa IMG_SaveJPG
2339
+ */
2340
+ extern SDL_DECLSPEC bool SDLCALL IMG_SaveJPG_IO(SDL_Surface *surface, SDL_IOStream *dst, bool closeio, int quality);
2341
+
2342
+ /**
2343
+ * Save an SDL_Surface into a PNG image file.
2344
+ *
2345
+ * If the file already exists, it will be overwritten.
2346
+ *
2347
+ * \param surface the SDL surface to save.
2348
+ * \param file path on the filesystem to write new file to.
2349
+ * \returns true on success or false on failure; call SDL_GetError() for more
2350
+ * information.
2351
+ *
2352
+ * \since This function is available since SDL_image 3.0.0.
2353
+ *
2354
+ * \sa IMG_SavePNG_IO
2355
+ */
2356
+ extern SDL_DECLSPEC bool SDLCALL IMG_SavePNG(SDL_Surface *surface, const char *file);
2357
+
2358
+ /**
2359
+ * Save an SDL_Surface into PNG image data, via an SDL_IOStream.
2360
+ *
2361
+ * If you just want to save to a filename, you can use IMG_SavePNG() instead.
2362
+ *
2363
+ * If `closeio` is true, `dst` will be closed before returning, whether this
2364
+ * function succeeds or not.
2365
+ *
2366
+ * \param surface the SDL surface to save.
2367
+ * \param dst the SDL_IOStream to save the image data to.
2368
+ * \param closeio true to close/free the SDL_IOStream before returning, false
2369
+ * to leave it open.
2370
+ * \returns true on success or false on failure; call SDL_GetError() for more
2371
+ * information.
2372
+ *
2373
+ * \since This function is available since SDL_image 3.0.0.
2374
+ *
2375
+ * \sa IMG_SavePNG
2376
+ */
2377
+ extern SDL_DECLSPEC bool SDLCALL IMG_SavePNG_IO(SDL_Surface *surface, SDL_IOStream *dst, bool closeio);
2378
+
2379
+ /**
2380
+ * Save an SDL_Surface into a TGA image file.
2381
+ *
2382
+ * If the file already exists, it will be overwritten.
2383
+ *
2384
+ * \param surface the SDL surface to save.
2385
+ * \param file path on the filesystem to write new file to.
2386
+ * \returns true on success or false on failure; call SDL_GetError() for more
2387
+ * information.
2388
+ *
2389
+ * \since This function is available since SDL_image 3.4.0.
2390
+ *
2391
+ * \sa IMG_SaveTGA_IO
2392
+ */
2393
+ extern SDL_DECLSPEC bool SDLCALL IMG_SaveTGA(SDL_Surface *surface, const char *file);
2394
+
2395
+ /**
2396
+ * Save an SDL_Surface into TGA image data, via an SDL_IOStream.
2397
+ *
2398
+ * If you just want to save to a filename, you can use IMG_SaveTGA() instead.
2399
+ *
2400
+ * If `closeio` is true, `dst` will be closed before returning, whether this
2401
+ * function succeeds or not.
2402
+ *
2403
+ * \param surface the SDL surface to save.
2404
+ * \param dst the SDL_IOStream to save the image data to.
2405
+ * \param closeio true to close/free the SDL_IOStream before returning, false
2406
+ * to leave it open.
2407
+ * \returns true on success or false on failure; call SDL_GetError() for more
2408
+ * information.
2409
+ *
2410
+ * \since This function is available since SDL_image 3.4.0.
2411
+ *
2412
+ * \sa IMG_SaveTGA
2413
+ */
2414
+ extern SDL_DECLSPEC bool SDLCALL IMG_SaveTGA_IO(SDL_Surface *surface, SDL_IOStream *dst, bool closeio);
2415
+
2416
+ /**
2417
+ * Save an SDL_Surface into a WEBP image file.
2418
+ *
2419
+ * If the file already exists, it will be overwritten.
2420
+ *
2421
+ * \param surface the SDL surface to save.
2422
+ * \param file path on the filesystem to write the new file to.
2423
+ * \param quality between 0 and 100. For lossy, 0 gives the smallest size and
2424
+ * 100 the largest. For lossless, this parameter is the amount
2425
+ * of effort put into the compression: 0 is the fastest but
2426
+ * gives larger files compared to the slowest, but best, 100.
2427
+ * \returns true on success or false on failure; call SDL_GetError() for more
2428
+ * information.
2429
+ *
2430
+ * \since This function is available since SDL_image 3.4.0.
2431
+ *
2432
+ * \sa IMG_SaveWEBP_IO
2433
+ */
2434
+ extern SDL_DECLSPEC bool SDLCALL IMG_SaveWEBP(SDL_Surface *surface, const char *file, float quality);
2435
+
2436
+ /**
2437
+ * Save an SDL_Surface into WEBP image data, via an SDL_IOStream.
2438
+ *
2439
+ * If you just want to save to a filename, you can use IMG_SaveWEBP() instead.
2440
+ *
2441
+ * If `closeio` is true, `dst` will be closed before returning, whether this
2442
+ * function succeeds or not.
2443
+ *
2444
+ * \param surface the SDL surface to save.
2445
+ * \param dst the SDL_IOStream to save the image data to.
2446
+ * \param closeio true to close/free the SDL_IOStream before returning, false
2447
+ * to leave it open.
2448
+ * \param quality between 0 and 100. For lossy, 0 gives the smallest size and
2449
+ * 100 the largest. For lossless, this parameter is the amount
2450
+ * of effort put into the compression: 0 is the fastest but
2451
+ * gives larger files compared to the slowest, but best, 100.
2452
+ * \returns true on success or false on failure; call SDL_GetError() for more
2453
+ * information.
2454
+ *
2455
+ * \since This function is available since SDL_image 3.4.0.
2456
+ *
2457
+ * \sa IMG_SaveWEBP
2458
+ */
2459
+ extern SDL_DECLSPEC bool SDLCALL IMG_SaveWEBP_IO(SDL_Surface *surface, SDL_IOStream *dst, bool closeio, float quality);
2460
+
2461
+ /**
2462
+ * Animated image support
2463
+ */
2464
+ typedef struct IMG_Animation
2465
+ {
2466
+ int w; /**< The width of the frames */
2467
+ int h; /**< The height of the frames */
2468
+ int count; /**< The number of frames */
2469
+ SDL_Surface **frames; /**< An array of frames */
2470
+ int *delays; /**< An array of frame delays, in milliseconds */
2471
+ } IMG_Animation;
2472
+
2473
+ /**
2474
+ * Load an animation from a file.
2475
+ *
2476
+ * When done with the returned animation, the app should dispose of it with a
2477
+ * call to IMG_FreeAnimation().
2478
+ *
2479
+ * \param file path on the filesystem containing an animated image.
2480
+ * \returns a new IMG_Animation, or NULL on error.
2481
+ *
2482
+ * \since This function is available since SDL_image 3.0.0.
2483
+ *
2484
+ * \sa IMG_CreateAnimatedCursor
2485
+ * \sa IMG_LoadAnimation_IO
2486
+ * \sa IMG_LoadAnimationTyped_IO
2487
+ * \sa IMG_LoadANIAnimation_IO
2488
+ * \sa IMG_LoadAPNGAnimation_IO
2489
+ * \sa IMG_LoadAVIFAnimation_IO
2490
+ * \sa IMG_LoadGIFAnimation_IO
2491
+ * \sa IMG_LoadWEBPAnimation_IO
2492
+ * \sa IMG_FreeAnimation
2493
+ */
2494
+ extern SDL_DECLSPEC IMG_Animation * SDLCALL IMG_LoadAnimation(const char *file);
2495
+
2496
+ /**
2497
+ * Load an animation from an SDL_IOStream.
2498
+ *
2499
+ * If `closeio` is true, `src` will be closed before returning, whether this
2500
+ * function succeeds or not. SDL_image reads everything it needs from `src`
2501
+ * during this call in any case.
2502
+ *
2503
+ * When done with the returned animation, the app should dispose of it with a
2504
+ * call to IMG_FreeAnimation().
2505
+ *
2506
+ * \param src an SDL_IOStream that data will be read from.
2507
+ * \param closeio true to close/free the SDL_IOStream before returning, false
2508
+ * to leave it open.
2509
+ * \returns a new IMG_Animation, or NULL on error.
2510
+ *
2511
+ * \since This function is available since SDL_image 3.0.0.
2512
+ *
2513
+ * \sa IMG_CreateAnimatedCursor
2514
+ * \sa IMG_LoadAnimation
2515
+ * \sa IMG_LoadAnimationTyped_IO
2516
+ * \sa IMG_LoadANIAnimation_IO
2517
+ * \sa IMG_LoadAPNGAnimation_IO
2518
+ * \sa IMG_LoadAVIFAnimation_IO
2519
+ * \sa IMG_LoadGIFAnimation_IO
2520
+ * \sa IMG_LoadWEBPAnimation_IO
2521
+ * \sa IMG_FreeAnimation
2522
+ */
2523
+ extern SDL_DECLSPEC IMG_Animation * SDLCALL IMG_LoadAnimation_IO(SDL_IOStream *src, bool closeio);
2524
+
2525
+ /**
2526
+ * Load an animation from an SDL_IOStream.
2527
+ *
2528
+ * Even though this function accepts a file type, SDL_image may still try
2529
+ * other decoders that are capable of detecting file type from the contents of
2530
+ * the image data, but may rely on the caller-provided type string for formats
2531
+ * that it cannot autodetect. If `type` is NULL, SDL_image will rely solely on
2532
+ * its ability to guess the format.
2533
+ *
2534
+ * If `closeio` is true, `src` will be closed before returning, whether this
2535
+ * function succeeds or not. SDL_image reads everything it needs from `src`
2536
+ * during this call in any case.
2537
+ *
2538
+ * When done with the returned animation, the app should dispose of it with a
2539
+ * call to IMG_FreeAnimation().
2540
+ *
2541
+ * \param src an SDL_IOStream that data will be read from.
2542
+ * \param closeio true to close/free the SDL_IOStream before returning, false
2543
+ * to leave it open.
2544
+ * \param type a filename extension that represent this data ("GIF", etc).
2545
+ * \returns a new IMG_Animation, or NULL on error.
2546
+ *
2547
+ * \since This function is available since SDL_image 3.0.0.
2548
+ *
2549
+ * \sa IMG_CreateAnimatedCursor
2550
+ * \sa IMG_LoadAnimation
2551
+ * \sa IMG_LoadAnimation_IO
2552
+ * \sa IMG_LoadANIAnimation_IO
2553
+ * \sa IMG_LoadAPNGAnimation_IO
2554
+ * \sa IMG_LoadAVIFAnimation_IO
2555
+ * \sa IMG_LoadGIFAnimation_IO
2556
+ * \sa IMG_LoadWEBPAnimation_IO
2557
+ * \sa IMG_FreeAnimation
2558
+ */
2559
+ extern SDL_DECLSPEC IMG_Animation * SDLCALL IMG_LoadAnimationTyped_IO(SDL_IOStream *src, bool closeio, const char *type);
2560
+
2561
+ /**
2562
+ * Load an ANI animation directly from an SDL_IOStream.
2563
+ *
2564
+ * If you know you definitely have an ANI image, you can call this function,
2565
+ * which will skip SDL_image's file format detection routines. Generally, it's
2566
+ * better to use the abstract interfaces; also, there is only an SDL_IOStream
2567
+ * interface available here.
2568
+ *
2569
+ * When done with the returned animation, the app should dispose of it with a
2570
+ * call to IMG_FreeAnimation().
2571
+ *
2572
+ * \param src an SDL_IOStream from which data will be read.
2573
+ * \returns a new IMG_Animation, or NULL on error.
2574
+ *
2575
+ * \since This function is available since SDL_image 3.4.0.
2576
+ *
2577
+ * \sa IMG_isANI
2578
+ * \sa IMG_LoadAnimation
2579
+ * \sa IMG_LoadAnimation_IO
2580
+ * \sa IMG_LoadAnimationTyped_IO
2581
+ * \sa IMG_LoadAPNGAnimation_IO
2582
+ * \sa IMG_LoadAVIFAnimation_IO
2583
+ * \sa IMG_LoadGIFAnimation_IO
2584
+ * \sa IMG_LoadWEBPAnimation_IO
2585
+ * \sa IMG_FreeAnimation
2586
+ */
2587
+ extern SDL_DECLSPEC IMG_Animation *SDLCALL IMG_LoadANIAnimation_IO(SDL_IOStream *src);
2588
+
2589
+ /**
2590
+ * Load an APNG animation directly from an SDL_IOStream.
2591
+ *
2592
+ * If you know you definitely have an APNG image, you can call this function,
2593
+ * which will skip SDL_image's file format detection routines. Generally, it's
2594
+ * better to use the abstract interfaces; also, there is only an SDL_IOStream
2595
+ * interface available here.
2596
+ *
2597
+ * When done with the returned animation, the app should dispose of it with a
2598
+ * call to IMG_FreeAnimation().
2599
+ *
2600
+ * \param src an SDL_IOStream from which data will be read.
2601
+ * \returns a new IMG_Animation, or NULL on error.
2602
+ *
2603
+ * \since This function is available since SDL_image 3.4.0.
2604
+ *
2605
+ * \sa IMG_isPNG
2606
+ * \sa IMG_LoadAnimation
2607
+ * \sa IMG_LoadAnimation_IO
2608
+ * \sa IMG_LoadAnimationTyped_IO
2609
+ * \sa IMG_LoadANIAnimation_IO
2610
+ * \sa IMG_LoadAVIFAnimation_IO
2611
+ * \sa IMG_LoadGIFAnimation_IO
2612
+ * \sa IMG_LoadWEBPAnimation_IO
2613
+ * \sa IMG_FreeAnimation
2614
+ */
2615
+ extern SDL_DECLSPEC IMG_Animation *SDLCALL IMG_LoadAPNGAnimation_IO(SDL_IOStream *src);
2616
+
2617
+ /**
2618
+ * Load an AVIF animation directly from an SDL_IOStream.
2619
+ *
2620
+ * If you know you definitely have an AVIF animation, you can call this
2621
+ * function, which will skip SDL_image's file format detection routines.
2622
+ * Generally it's better to use the abstract interfaces; also, there is only
2623
+ * an SDL_IOStream interface available here.
2624
+ *
2625
+ * When done with the returned animation, the app should dispose of it with a
2626
+ * call to IMG_FreeAnimation().
2627
+ *
2628
+ * \param src an SDL_IOStream that data will be read from.
2629
+ * \returns a new IMG_Animation, or NULL on error.
2630
+ *
2631
+ * \since This function is available since SDL_image 3.4.0.
2632
+ *
2633
+ * \sa IMG_isAVIF
2634
+ * \sa IMG_LoadAnimation
2635
+ * \sa IMG_LoadAnimation_IO
2636
+ * \sa IMG_LoadAnimationTyped_IO
2637
+ * \sa IMG_LoadANIAnimation_IO
2638
+ * \sa IMG_LoadAPNGAnimation_IO
2639
+ * \sa IMG_LoadGIFAnimation_IO
2640
+ * \sa IMG_LoadWEBPAnimation_IO
2641
+ * \sa IMG_FreeAnimation
2642
+ */
2643
+ extern SDL_DECLSPEC IMG_Animation *SDLCALL IMG_LoadAVIFAnimation_IO(SDL_IOStream *src);
2644
+
2645
+ /**
2646
+ * Load a GIF animation directly.
2647
+ *
2648
+ * If you know you definitely have a GIF image, you can call this function,
2649
+ * which will skip SDL_image's file format detection routines. Generally it's
2650
+ * better to use the abstract interfaces; also, there is only an SDL_IOStream
2651
+ * interface available here.
2652
+ *
2653
+ * \param src an SDL_IOStream that data will be read from.
2654
+ * \returns a new IMG_Animation, or NULL on error.
2655
+ *
2656
+ * \since This function is available since SDL_image 3.0.0.
2657
+ *
2658
+ * \sa IMG_isGIF
2659
+ * \sa IMG_LoadAnimation
2660
+ * \sa IMG_LoadAnimation_IO
2661
+ * \sa IMG_LoadAnimationTyped_IO
2662
+ * \sa IMG_LoadANIAnimation_IO
2663
+ * \sa IMG_LoadAPNGAnimation_IO
2664
+ * \sa IMG_LoadAVIFAnimation_IO
2665
+ * \sa IMG_LoadWEBPAnimation_IO
2666
+ * \sa IMG_FreeAnimation
2667
+ */
2668
+ extern SDL_DECLSPEC IMG_Animation * SDLCALL IMG_LoadGIFAnimation_IO(SDL_IOStream *src);
2669
+
2670
+ /**
2671
+ * Load a WEBP animation directly.
2672
+ *
2673
+ * If you know you definitely have a WEBP image, you can call this function,
2674
+ * which will skip SDL_image's file format detection routines. Generally it's
2675
+ * better to use the abstract interfaces; also, there is only an SDL_IOStream
2676
+ * interface available here.
2677
+ *
2678
+ * \param src an SDL_IOStream that data will be read from.
2679
+ * \returns a new IMG_Animation, or NULL on error.
2680
+ *
2681
+ * \since This function is available since SDL_image 3.0.0.
2682
+ *
2683
+ * \sa IMG_isWEBP
2684
+ * \sa IMG_LoadAnimation
2685
+ * \sa IMG_LoadAnimation_IO
2686
+ * \sa IMG_LoadAnimationTyped_IO
2687
+ * \sa IMG_LoadANIAnimation_IO
2688
+ * \sa IMG_LoadAPNGAnimation_IO
2689
+ * \sa IMG_LoadAVIFAnimation_IO
2690
+ * \sa IMG_LoadGIFAnimation_IO
2691
+ * \sa IMG_FreeAnimation
2692
+ */
2693
+ extern SDL_DECLSPEC IMG_Animation * SDLCALL IMG_LoadWEBPAnimation_IO(SDL_IOStream *src);
2694
+
2695
+ /**
2696
+ * Save an animation to a file.
2697
+ *
2698
+ * For formats that accept a quality, a default quality of 90 will be used.
2699
+ *
2700
+ * \param anim the animation to save.
2701
+ * \param file path on the filesystem containing an animated image.
2702
+ * \returns true on success or false on failure; call SDL_GetError() for more
2703
+ * information.
2704
+ *
2705
+ * \since This function is available since SDL_image 3.4.0.
2706
+ *
2707
+ * \sa IMG_SaveAnimationTyped_IO
2708
+ * \sa IMG_SaveANIAnimation_IO
2709
+ * \sa IMG_SaveAPNGAnimation_IO
2710
+ * \sa IMG_SaveAVIFAnimation_IO
2711
+ * \sa IMG_SaveGIFAnimation_IO
2712
+ * \sa IMG_SaveWEBPAnimation_IO
2713
+ */
2714
+ extern SDL_DECLSPEC bool SDLCALL IMG_SaveAnimation(IMG_Animation *anim, const char *file);
2715
+
2716
+ /**
2717
+ * Save an animation to an SDL_IOStream.
2718
+ *
2719
+ * If you just want to save to a filename, you can use IMG_SaveAnimation()
2720
+ * instead.
2721
+ *
2722
+ * If `closeio` is true, `dst` will be closed before returning, whether this
2723
+ * function succeeds or not.
2724
+ *
2725
+ * For formats that accept a quality, a default quality of 90 will be used.
2726
+ *
2727
+ * \param anim the animation to save.
2728
+ * \param dst an SDL_IOStream that data will be written to.
2729
+ * \param closeio true to close/free the SDL_IOStream before returning, false
2730
+ * to leave it open.
2731
+ * \param type a filename extension that represent this data ("GIF", etc).
2732
+ * \returns true on success or false on failure; call SDL_GetError() for more
2733
+ * information.
2734
+ *
2735
+ * \since This function is available since SDL_image 3.4.0.
2736
+ *
2737
+ * \sa IMG_SaveAnimation
2738
+ * \sa IMG_SaveANIAnimation_IO
2739
+ * \sa IMG_SaveAPNGAnimation_IO
2740
+ * \sa IMG_SaveAVIFAnimation_IO
2741
+ * \sa IMG_SaveGIFAnimation_IO
2742
+ * \sa IMG_SaveWEBPAnimation_IO
2743
+ */
2744
+ extern SDL_DECLSPEC bool SDLCALL IMG_SaveAnimationTyped_IO(IMG_Animation *anim, SDL_IOStream *dst, bool closeio, const char *type);
2745
+
2746
+ /**
2747
+ * Save an animation in ANI format to an SDL_IOStream.
2748
+ *
2749
+ * If `closeio` is true, `dst` will be closed before returning, whether this
2750
+ * function succeeds or not.
2751
+ *
2752
+ * \param anim the animation to save.
2753
+ * \param dst an SDL_IOStream from which data will be written to.
2754
+ * \param closeio true to close/free the SDL_IOStream before returning, false
2755
+ * to leave it open.
2756
+ * \returns true on success or false on failure; call SDL_GetError() for more
2757
+ * information.
2758
+ *
2759
+ * \since This function is available since SDL_image 3.4.0.
2760
+ *
2761
+ * \sa IMG_SaveAnimation
2762
+ * \sa IMG_SaveAnimationTyped_IO
2763
+ * \sa IMG_SaveAPNGAnimation_IO
2764
+ * \sa IMG_SaveAVIFAnimation_IO
2765
+ * \sa IMG_SaveGIFAnimation_IO
2766
+ * \sa IMG_SaveWEBPAnimation_IO
2767
+ */
2768
+ extern SDL_DECLSPEC bool SDLCALL IMG_SaveANIAnimation_IO(IMG_Animation *anim, SDL_IOStream *dst, bool closeio);
2769
+
2770
+ /**
2771
+ * Save an animation in APNG format to an SDL_IOStream.
2772
+ *
2773
+ * If `closeio` is true, `dst` will be closed before returning, whether this
2774
+ * function succeeds or not.
2775
+ *
2776
+ * \param anim the animation to save.
2777
+ * \param dst an SDL_IOStream from which data will be written to.
2778
+ * \param closeio true to close/free the SDL_IOStream before returning, false
2779
+ * to leave it open.
2780
+ * \returns true on success or false on failure; call SDL_GetError() for more
2781
+ * information.
2782
+ *
2783
+ * \since This function is available since SDL_image 3.4.0.
2784
+ *
2785
+ * \sa IMG_SaveAnimation
2786
+ * \sa IMG_SaveAnimationTyped_IO
2787
+ * \sa IMG_SaveANIAnimation_IO
2788
+ * \sa IMG_SaveAVIFAnimation_IO
2789
+ * \sa IMG_SaveGIFAnimation_IO
2790
+ * \sa IMG_SaveWEBPAnimation_IO
2791
+ */
2792
+ extern SDL_DECLSPEC bool SDLCALL IMG_SaveAPNGAnimation_IO(IMG_Animation *anim, SDL_IOStream *dst, bool closeio);
2793
+
2794
+ /**
2795
+ * Save an animation in AVIF format to an SDL_IOStream.
2796
+ *
2797
+ * If `closeio` is true, `dst` will be closed before returning, whether this
2798
+ * function succeeds or not.
2799
+ *
2800
+ * \param anim the animation to save.
2801
+ * \param dst an SDL_IOStream from which data will be written to.
2802
+ * \param closeio true to close/free the SDL_IOStream before returning, false
2803
+ * to leave it open.
2804
+ * \param quality the desired quality, ranging between 0 (lowest) and 100
2805
+ * (highest).
2806
+ * \returns true on success or false on failure; call SDL_GetError() for more
2807
+ * information.
2808
+ *
2809
+ * \since This function is available since SDL_image 3.4.0.
2810
+ *
2811
+ * \sa IMG_SaveAnimation
2812
+ * \sa IMG_SaveAnimationTyped_IO
2813
+ * \sa IMG_SaveANIAnimation_IO
2814
+ * \sa IMG_SaveAPNGAnimation_IO
2815
+ * \sa IMG_SaveGIFAnimation_IO
2816
+ * \sa IMG_SaveWEBPAnimation_IO
2817
+ */
2818
+ extern SDL_DECLSPEC bool SDLCALL IMG_SaveAVIFAnimation_IO(IMG_Animation *anim, SDL_IOStream *dst, bool closeio, int quality);
2819
+
2820
+ /**
2821
+ * Save an animation in GIF format to an SDL_IOStream.
2822
+ *
2823
+ * If `closeio` is true, `dst` will be closed before returning, whether this
2824
+ * function succeeds or not.
2825
+ *
2826
+ * \param anim the animation to save.
2827
+ * \param dst an SDL_IOStream from which data will be written to.
2828
+ * \param closeio true to close/free the SDL_IOStream before returning, false
2829
+ * to leave it open.
2830
+ * \returns true on success or false on failure; call SDL_GetError() for more
2831
+ * information.
2832
+ *
2833
+ * \since This function is available since SDL_image 3.4.0.
2834
+ *
2835
+ * \sa IMG_SaveAnimation
2836
+ * \sa IMG_SaveAnimationTyped_IO
2837
+ * \sa IMG_SaveANIAnimation_IO
2838
+ * \sa IMG_SaveAPNGAnimation_IO
2839
+ * \sa IMG_SaveAVIFAnimation_IO
2840
+ * \sa IMG_SaveWEBPAnimation_IO
2841
+ */
2842
+ extern SDL_DECLSPEC bool SDLCALL IMG_SaveGIFAnimation_IO(IMG_Animation *anim, SDL_IOStream *dst, bool closeio);
2843
+
2844
+ /**
2845
+ * Save an animation in WEBP format to an SDL_IOStream.
2846
+ *
2847
+ * If `closeio` is true, `dst` will be closed before returning, whether this
2848
+ * function succeeds or not.
2849
+ *
2850
+ * \param anim the animation to save.
2851
+ * \param dst an SDL_IOStream from which data will be written to.
2852
+ * \param closeio true to close/free the SDL_IOStream before returning, false
2853
+ * to leave it open.
2854
+ * \param quality between 0 and 100. For lossy, 0 gives the smallest size and
2855
+ * 100 the largest. For lossless, this parameter is the amount
2856
+ * of effort put into the compression: 0 is the fastest but
2857
+ * gives larger files compared to the slowest, but best, 100.
2858
+ * \returns true on success or false on failure; call SDL_GetError() for more
2859
+ * information.
2860
+ *
2861
+ * \since This function is available since SDL_image 3.4.0.
2862
+ *
2863
+ * \sa IMG_SaveAnimation
2864
+ * \sa IMG_SaveAnimationTyped_IO
2865
+ * \sa IMG_SaveANIAnimation_IO
2866
+ * \sa IMG_SaveAPNGAnimation_IO
2867
+ * \sa IMG_SaveAVIFAnimation_IO
2868
+ * \sa IMG_SaveGIFAnimation_IO
2869
+ */
2870
+ extern SDL_DECLSPEC bool SDLCALL IMG_SaveWEBPAnimation_IO(IMG_Animation *anim, SDL_IOStream *dst, bool closeio, int quality);
2871
+
2872
+ /**
2873
+ * Create an animated cursor from an animation.
2874
+ *
2875
+ * \param anim an animation to use to create an animated cursor.
2876
+ * \param hot_x the x position of the cursor hot spot.
2877
+ * \param hot_y the y position of the cursor hot spot.
2878
+ * \returns the new cursor on success or NULL on failure; call SDL_GetError()
2879
+ * for more information.
2880
+ *
2881
+ * \since This function is available since SDL_image 3.4.0.
2882
+ *
2883
+ * \sa IMG_LoadAnimation
2884
+ * \sa IMG_LoadAnimation_IO
2885
+ * \sa IMG_LoadAnimationTyped_IO
2886
+ */
2887
+ extern SDL_DECLSPEC SDL_Cursor * SDLCALL IMG_CreateAnimatedCursor(IMG_Animation *anim, int hot_x, int hot_y);
2888
+
2889
+ /**
2890
+ * Dispose of an IMG_Animation and free its resources.
2891
+ *
2892
+ * The provided `anim` pointer is not valid once this call returns.
2893
+ *
2894
+ * \param anim IMG_Animation to dispose of.
2895
+ *
2896
+ * \since This function is available since SDL_image 3.0.0.
2897
+ *
2898
+ * \sa IMG_LoadAnimation
2899
+ * \sa IMG_LoadAnimation_IO
2900
+ * \sa IMG_LoadAnimationTyped_IO
2901
+ * \sa IMG_LoadANIAnimation_IO
2902
+ * \sa IMG_LoadAPNGAnimation_IO
2903
+ * \sa IMG_LoadAVIFAnimation_IO
2904
+ * \sa IMG_LoadGIFAnimation_IO
2905
+ * \sa IMG_LoadWEBPAnimation_IO
2906
+ */
2907
+ extern SDL_DECLSPEC void SDLCALL IMG_FreeAnimation(IMG_Animation *anim);
2908
+
2909
+ /**
2910
+ * An object representing the encoder context.
2911
+ */
2912
+ typedef struct IMG_AnimationEncoder IMG_AnimationEncoder;
2913
+
2914
+ /**
2915
+ * Create an encoder to save a series of images to a file.
2916
+ *
2917
+ * These animation types are currently supported:
2918
+ *
2919
+ * - ANI
2920
+ * - APNG
2921
+ * - AVIFS
2922
+ * - GIF
2923
+ * - WEBP
2924
+ *
2925
+ * The file type is determined from the file extension, e.g. "file.webp" will
2926
+ * be encoded using WEBP.
2927
+ *
2928
+ * \param file the file where the animation will be saved.
2929
+ * \returns a new IMG_AnimationEncoder, or NULL on failure; call
2930
+ * SDL_GetError() for more information.
2931
+ *
2932
+ * \since This function is available since SDL_image 3.4.0.
2933
+ *
2934
+ * \sa IMG_CreateAnimationEncoder_IO
2935
+ * \sa IMG_CreateAnimationEncoderWithProperties
2936
+ * \sa IMG_AddAnimationEncoderFrame
2937
+ * \sa IMG_CloseAnimationEncoder
2938
+ */
2939
+ extern SDL_DECLSPEC IMG_AnimationEncoder * SDLCALL IMG_CreateAnimationEncoder(const char *file);
2940
+
2941
+ /**
2942
+ * Create an encoder to save a series of images to an IOStream.
2943
+ *
2944
+ * These animation types are currently supported:
2945
+ *
2946
+ * - ANI
2947
+ * - APNG
2948
+ * - AVIFS
2949
+ * - GIF
2950
+ * - WEBP
2951
+ *
2952
+ * If `closeio` is true, `dst` will be closed before returning if this
2953
+ * function fails, or when the animation encoder is closed if this function
2954
+ * succeeds.
2955
+ *
2956
+ * \param dst an SDL_IOStream that will be used to save the stream.
2957
+ * \param closeio true to close the SDL_IOStream when done, false to leave it
2958
+ * open.
2959
+ * \param type a filename extension that represent this data ("WEBP", etc).
2960
+ * \returns a new IMG_AnimationEncoder, or NULL on failure; call
2961
+ * SDL_GetError() for more information.
2962
+ *
2963
+ * \since This function is available since SDL_image 3.4.0.
2964
+ *
2965
+ * \sa IMG_CreateAnimationEncoder
2966
+ * \sa IMG_CreateAnimationEncoderWithProperties
2967
+ * \sa IMG_AddAnimationEncoderFrame
2968
+ * \sa IMG_CloseAnimationEncoder
2969
+ */
2970
+ extern SDL_DECLSPEC IMG_AnimationEncoder * SDLCALL IMG_CreateAnimationEncoder_IO(SDL_IOStream *dst, bool closeio, const char *type);
2971
+
2972
+ /**
2973
+ * Create an animation encoder with the specified properties.
2974
+ *
2975
+ * These animation types are currently supported:
2976
+ *
2977
+ * - ANI
2978
+ * - APNG
2979
+ * - AVIFS
2980
+ * - GIF
2981
+ * - WEBP
2982
+ *
2983
+ * These are the supported properties:
2984
+ *
2985
+ * - `IMG_PROP_ANIMATION_ENCODER_CREATE_FILENAME_STRING`: the file to save, if
2986
+ * an SDL_IOStream isn't being used. This is required if
2987
+ * `IMG_PROP_ANIMATION_ENCODER_CREATE_IOSTREAM_POINTER` isn't set.
2988
+ * - `IMG_PROP_ANIMATION_ENCODER_CREATE_IOSTREAM_POINTER`: an SDL_IOStream
2989
+ * that will be used to save the stream. This should not be closed until the
2990
+ * animation encoder is closed. This is required if
2991
+ * `IMG_PROP_ANIMATION_ENCODER_CREATE_FILENAME_STRING` isn't set.
2992
+ * - `IMG_PROP_ANIMATION_ENCODER_CREATE_IOSTREAM_AUTOCLOSE_BOOLEAN`: true if
2993
+ * closing the animation encoder should also close the associated
2994
+ * SDL_IOStream.
2995
+ * - `IMG_PROP_ANIMATION_ENCODER_CREATE_TYPE_STRING`: the output file type,
2996
+ * e.g. "webp", defaults to the file extension if
2997
+ * `IMG_PROP_ANIMATION_ENCODER_CREATE_FILENAME_STRING` is set.
2998
+ * - `IMG_PROP_ANIMATION_ENCODER_CREATE_QUALITY_NUMBER`: the compression
2999
+ * quality, in the range of 0 to 100. The higher the number, the higher the
3000
+ * quality and file size. This defaults to a balanced value for compression
3001
+ * and quality.
3002
+ * - `IMG_PROP_ANIMATION_ENCODER_CREATE_TIMEBASE_NUMERATOR_NUMBER`: the
3003
+ * numerator of the fraction used to multiply the pts to convert it to
3004
+ * seconds. This defaults to 1.
3005
+ * - `IMG_PROP_ANIMATION_ENCODER_CREATE_TIMEBASE_DENOMINATOR_NUMBER`: the
3006
+ * denominator of the fraction used to multiply the pts to convert it to
3007
+ * seconds. This defaults to 1000.
3008
+ *
3009
+ * \param props the properties of the animation encoder.
3010
+ * \returns a new IMG_AnimationEncoder, or NULL on failure; call
3011
+ * SDL_GetError() for more information.
3012
+ *
3013
+ * \since This function is available since SDL_image 3.4.0.
3014
+ *
3015
+ * \sa IMG_CreateAnimationEncoder
3016
+ * \sa IMG_CreateAnimationEncoder_IO
3017
+ * \sa IMG_AddAnimationEncoderFrame
3018
+ * \sa IMG_CloseAnimationEncoder
3019
+ */
3020
+ extern SDL_DECLSPEC IMG_AnimationEncoder * SDLCALL IMG_CreateAnimationEncoderWithProperties(SDL_PropertiesID props);
3021
+
3022
+ #define IMG_PROP_ANIMATION_ENCODER_CREATE_FILENAME_STRING "SDL_image.animation_encoder.create.filename"
3023
+ #define IMG_PROP_ANIMATION_ENCODER_CREATE_IOSTREAM_POINTER "SDL_image.animation_encoder.create.iostream"
3024
+ #define IMG_PROP_ANIMATION_ENCODER_CREATE_IOSTREAM_AUTOCLOSE_BOOLEAN "SDL_image.animation_encoder.create.iostream.autoclose"
3025
+ #define IMG_PROP_ANIMATION_ENCODER_CREATE_TYPE_STRING "SDL_image.animation_encoder.create.type"
3026
+ #define IMG_PROP_ANIMATION_ENCODER_CREATE_QUALITY_NUMBER "SDL_image.animation_encoder.create.quality"
3027
+ #define IMG_PROP_ANIMATION_ENCODER_CREATE_TIMEBASE_NUMERATOR_NUMBER "SDL_image.animation_encoder.create.timebase.numerator"
3028
+ #define IMG_PROP_ANIMATION_ENCODER_CREATE_TIMEBASE_DENOMINATOR_NUMBER "SDL_image.animation_encoder.create.timebase.denominator"
3029
+
3030
+ #define IMG_PROP_ANIMATION_ENCODER_CREATE_AVIF_MAX_THREADS_NUMBER "SDL_image.animation_encoder.create.avif.max_threads"
3031
+ #define IMG_PROP_ANIMATION_ENCODER_CREATE_AVIF_KEYFRAME_INTERVAL_NUMBER "SDL_image.animation_encoder.create.avif.keyframe_interval"
3032
+ #define IMG_PROP_ANIMATION_ENCODER_CREATE_GIF_USE_LUT_BOOLEAN "SDL_image.animation_encoder.create.gif.use_lut"
3033
+
3034
+ /**
3035
+ * Add a frame to an animation encoder.
3036
+ *
3037
+ * \param encoder the receiving images.
3038
+ * \param surface the surface to add as the next frame in the animation.
3039
+ * \param duration the duration of the frame, usually in milliseconds but can
3040
+ * be other units if the
3041
+ * `IMG_PROP_ANIMATION_ENCODER_CREATE_TIMEBASE_DENOMINATOR_NUMBER`
3042
+ * property is set when creating the encoder.
3043
+ * \returns true on success or false on failure; call SDL_GetError() for more
3044
+ * information.
3045
+ *
3046
+ * \since This function is available since SDL_image 3.4.0.
3047
+ *
3048
+ * \sa IMG_CreateAnimationEncoder
3049
+ * \sa IMG_CreateAnimationEncoder_IO
3050
+ * \sa IMG_CreateAnimationEncoderWithProperties
3051
+ * \sa IMG_CloseAnimationEncoder
3052
+ */
3053
+ extern SDL_DECLSPEC bool SDLCALL IMG_AddAnimationEncoderFrame(IMG_AnimationEncoder *encoder, SDL_Surface *surface, Uint64 duration);
3054
+
3055
+ /**
3056
+ * Close an animation encoder, finishing any encoding.
3057
+ *
3058
+ * Calling this function frees the animation encoder, and returns the final
3059
+ * status of the encoding process.
3060
+ *
3061
+ * \param encoder the encoder to close.
3062
+ * \returns true on success or false on failure; call SDL_GetError() for more
3063
+ * information.
3064
+ *
3065
+ * \since This function is available since SDL_image 3.4.0.
3066
+ *
3067
+ * \sa IMG_CreateAnimationEncoder
3068
+ * \sa IMG_CreateAnimationEncoder_IO
3069
+ * \sa IMG_CreateAnimationEncoderWithProperties
3070
+ */
3071
+ extern SDL_DECLSPEC bool SDLCALL IMG_CloseAnimationEncoder(IMG_AnimationEncoder *encoder);
3072
+
3073
+ /**
3074
+ * An enum representing the status of an animation decoder.
3075
+ *
3076
+ * \since This enum is available since SDL_image 3.4.0.
3077
+ */
3078
+ typedef enum IMG_AnimationDecoderStatus
3079
+ {
3080
+ IMG_DECODER_STATUS_INVALID = -1, /**< The decoder is invalid */
3081
+ IMG_DECODER_STATUS_OK, /**< The decoder is ready to decode the next frame */
3082
+ IMG_DECODER_STATUS_FAILED, /**< The decoder failed to decode a frame, call SDL_GetError() for more information. */
3083
+ IMG_DECODER_STATUS_COMPLETE /**< No more frames available */
3084
+ } IMG_AnimationDecoderStatus;
3085
+
3086
+ /**
3087
+ * An object representing animation decoder.
3088
+ */
3089
+ typedef struct IMG_AnimationDecoder IMG_AnimationDecoder;
3090
+
3091
+ /**
3092
+ * Create a decoder to read a series of images from a file.
3093
+ *
3094
+ * These animation types are currently supported:
3095
+ *
3096
+ * - ANI
3097
+ * - APNG
3098
+ * - AVIFS
3099
+ * - GIF
3100
+ * - WEBP
3101
+ *
3102
+ * The file type is determined from the file extension, e.g. "file.webp" will
3103
+ * be decoded using WEBP.
3104
+ *
3105
+ * \param file the file containing a series of images.
3106
+ * \returns a new IMG_AnimationDecoder, or NULL on failure; call
3107
+ * SDL_GetError() for more information.
3108
+ *
3109
+ * \since This function is available since SDL_image 3.4.0.
3110
+ *
3111
+ * \sa IMG_CreateAnimationDecoder_IO
3112
+ * \sa IMG_CreateAnimationDecoderWithProperties
3113
+ * \sa IMG_GetAnimationDecoderFrame
3114
+ * \sa IMG_ResetAnimationDecoder
3115
+ * \sa IMG_CloseAnimationDecoder
3116
+ */
3117
+ extern SDL_DECLSPEC IMG_AnimationDecoder * SDLCALL IMG_CreateAnimationDecoder(const char *file);
3118
+
3119
+ /**
3120
+ * Create a decoder to read a series of images from an IOStream.
3121
+ *
3122
+ * These animation types are currently supported:
3123
+ *
3124
+ * - ANI
3125
+ * - APNG
3126
+ * - AVIFS
3127
+ * - GIF
3128
+ * - WEBP
3129
+ *
3130
+ * If `closeio` is true, `src` will be closed before returning if this
3131
+ * function fails, or when the animation decoder is closed if this function
3132
+ * succeeds.
3133
+ *
3134
+ * \param src an SDL_IOStream containing a series of images.
3135
+ * \param closeio true to close the SDL_IOStream when done, false to leave it
3136
+ * open.
3137
+ * \param type a filename extension that represent this data ("WEBP", etc).
3138
+ * \returns a new IMG_AnimationDecoder, or NULL on failure; call
3139
+ * SDL_GetError() for more information.
3140
+ *
3141
+ * \since This function is available since SDL_image 3.4.0.
3142
+ *
3143
+ * \sa IMG_CreateAnimationDecoder
3144
+ * \sa IMG_CreateAnimationDecoderWithProperties
3145
+ * \sa IMG_GetAnimationDecoderFrame
3146
+ * \sa IMG_ResetAnimationDecoder
3147
+ * \sa IMG_CloseAnimationDecoder
3148
+ */
3149
+ extern SDL_DECLSPEC IMG_AnimationDecoder * SDLCALL IMG_CreateAnimationDecoder_IO(SDL_IOStream *src, bool closeio, const char *type);
3150
+
3151
+ /**
3152
+ * Create an animation decoder with the specified properties.
3153
+ *
3154
+ * These animation types are currently supported:
3155
+ *
3156
+ * - ANI
3157
+ * - APNG
3158
+ * - AVIFS
3159
+ * - GIF
3160
+ * - WEBP
3161
+ *
3162
+ * These are the supported properties:
3163
+ *
3164
+ * - `IMG_PROP_ANIMATION_DECODER_CREATE_FILENAME_STRING`: the file to load, if
3165
+ * an SDL_IOStream isn't being used. This is required if
3166
+ * `IMG_PROP_ANIMATION_DECODER_CREATE_IOSTREAM_POINTER` isn't set.
3167
+ * - `IMG_PROP_ANIMATION_DECODER_CREATE_IOSTREAM_POINTER`: an SDL_IOStream
3168
+ * containing a series of images. This should not be closed until the
3169
+ * animation decoder is closed. This is required if
3170
+ * `IMG_PROP_ANIMATION_DECODER_CREATE_FILENAME_STRING` isn't set.
3171
+ * - `IMG_PROP_ANIMATION_DECODER_CREATE_IOSTREAM_AUTOCLOSE_BOOLEAN`: true if
3172
+ * closing the animation decoder should also close the associated
3173
+ * SDL_IOStream.
3174
+ * - `IMG_PROP_ANIMATION_DECODER_CREATE_TYPE_STRING`: the input file type,
3175
+ * e.g. "webp", defaults to the file extension if
3176
+ * `IMG_PROP_ANIMATION_DECODER_CREATE_FILENAME_STRING` is set.
3177
+ *
3178
+ * \param props the properties of the animation decoder.
3179
+ * \returns a new IMG_AnimationDecoder, or NULL on failure; call
3180
+ * SDL_GetError() for more information.
3181
+ *
3182
+ * \since This function is available since SDL_image 3.4.0.
3183
+ *
3184
+ * \sa IMG_CreateAnimationDecoder
3185
+ * \sa IMG_CreateAnimationDecoder_IO
3186
+ * \sa IMG_GetAnimationDecoderFrame
3187
+ * \sa IMG_ResetAnimationDecoder
3188
+ * \sa IMG_CloseAnimationDecoder
3189
+ */
3190
+ extern SDL_DECLSPEC IMG_AnimationDecoder * SDLCALL IMG_CreateAnimationDecoderWithProperties(SDL_PropertiesID props);
3191
+
3192
+ #define IMG_PROP_ANIMATION_DECODER_CREATE_FILENAME_STRING "SDL_image.animation_decoder.create.filename"
3193
+ #define IMG_PROP_ANIMATION_DECODER_CREATE_IOSTREAM_POINTER "SDL_image.animation_decoder.create.iostream"
3194
+ #define IMG_PROP_ANIMATION_DECODER_CREATE_IOSTREAM_AUTOCLOSE_BOOLEAN "SDL_image.animation_decoder.create.iostream.autoclose"
3195
+ #define IMG_PROP_ANIMATION_DECODER_CREATE_TYPE_STRING "SDL_image.animation_decoder.create.type"
3196
+ #define IMG_PROP_ANIMATION_DECODER_CREATE_TIMEBASE_NUMERATOR_NUMBER "SDL_image.animation_decoder.create.timebase.numerator"
3197
+ #define IMG_PROP_ANIMATION_DECODER_CREATE_TIMEBASE_DENOMINATOR_NUMBER "SDL_image.animation_decoder.create.timebase.denominator"
3198
+
3199
+ #define IMG_PROP_ANIMATION_DECODER_CREATE_AVIF_MAX_THREADS_NUMBER "SDL_image.animation_decoder.create.avif.max_threads"
3200
+ #define IMG_PROP_ANIMATION_DECODER_CREATE_AVIF_ALLOW_INCREMENTAL_BOOLEAN "SDL_image.animation_decoder.create.avif.allow_incremental"
3201
+ #define IMG_PROP_ANIMATION_DECODER_CREATE_AVIF_ALLOW_PROGRESSIVE_BOOLEAN "SDL_image.animation_decoder.create.avif.allow_progressive"
3202
+ #define IMG_PROP_ANIMATION_DECODER_CREATE_GIF_TRANSPARENT_COLOR_INDEX_NUMBER "SDL_image.animation_encoder.create.gif.transparent_color_index"
3203
+ #define IMG_PROP_ANIMATION_DECODER_CREATE_GIF_NUM_COLORS_NUMBER "SDL_image.animation_encoder.create.gif.num_colors"
3204
+
3205
+ /**
3206
+ * Get the properties of an animation decoder.
3207
+ *
3208
+ * This function returns the properties of the animation decoder, which holds
3209
+ * information about the underlying image such as description, copyright text
3210
+ * and loop count.
3211
+ *
3212
+ * `IMG_PROP_METADATA_LOOP_COUNT_NUMBER`, if present, specifies the number of times to play the animation, with 0 meaning loop continuously.
3213
+ *
3214
+ * \param decoder the animation decoder.
3215
+ * \returns the properties ID of the animation decoder, or 0 if there are no
3216
+ * properties; call SDL_GetError() for more information.
3217
+ *
3218
+ * \since This function is available since SDL_image 3.4.0.
3219
+ *
3220
+ * \sa IMG_CreateAnimationDecoder
3221
+ * \sa IMG_CreateAnimationDecoder_IO
3222
+ * \sa IMG_CreateAnimationDecoderWithProperties
3223
+ */
3224
+ extern SDL_DECLSPEC SDL_PropertiesID SDLCALL IMG_GetAnimationDecoderProperties(IMG_AnimationDecoder *decoder);
3225
+
3226
+ #define IMG_PROP_METADATA_IGNORE_PROPS_BOOLEAN "SDL_image.metadata.ignore_props"
3227
+ #define IMG_PROP_METADATA_DESCRIPTION_STRING "SDL_image.metadata.description"
3228
+ #define IMG_PROP_METADATA_COPYRIGHT_STRING "SDL_image.metadata.copyright"
3229
+ #define IMG_PROP_METADATA_TITLE_STRING "SDL_image.metadata.title"
3230
+ #define IMG_PROP_METADATA_AUTHOR_STRING "SDL_image.metadata.author"
3231
+ #define IMG_PROP_METADATA_CREATION_TIME_STRING "SDL_image.metadata.creation_time"
3232
+ #define IMG_PROP_METADATA_FRAME_COUNT_NUMBER "SDL_image.metadata.frame_count"
3233
+ #define IMG_PROP_METADATA_LOOP_COUNT_NUMBER "SDL_image.metadata.loop_count"
3234
+
3235
+ /**
3236
+ * Get the next frame in an animation decoder.
3237
+ *
3238
+ * This function decodes the next frame in the animation decoder, returning it
3239
+ * as an SDL_Surface. The returned surface should be freed with
3240
+ * SDL_FreeSurface() when no longer needed.
3241
+ *
3242
+ * If the animation decoder has no more frames or an error occurred while
3243
+ * decoding the frame, this function returns false. In that case, please call
3244
+ * SDL_GetError() for more information. If SDL_GetError() returns an empty
3245
+ * string, that means there are no more available frames. If SDL_GetError()
3246
+ * returns a valid string, that means the decoding failed.
3247
+ *
3248
+ * \param decoder the animation decoder.
3249
+ * \param frame a pointer filled in with the SDL_Surface for the next frame in
3250
+ * the animation.
3251
+ * \param duration the duration of the frame, usually in milliseconds but can
3252
+ * be other units if the
3253
+ * `IMG_PROP_ANIMATION_DECODER_CREATE_TIMEBASE_DENOMINATOR_NUMBER`
3254
+ * property is set when creating the decoder.
3255
+ * \returns true on success or false on failure and when no more frames are
3256
+ * available; call IMG_GetAnimationDecoderStatus() or SDL_GetError()
3257
+ * for more information.
3258
+ *
3259
+ * \since This function is available since SDL_image 3.4.0.
3260
+ *
3261
+ * \sa IMG_CreateAnimationDecoder
3262
+ * \sa IMG_CreateAnimationDecoder_IO
3263
+ * \sa IMG_CreateAnimationDecoderWithProperties
3264
+ * \sa IMG_GetAnimationDecoderStatus
3265
+ * \sa IMG_ResetAnimationDecoder
3266
+ * \sa IMG_CloseAnimationDecoder
3267
+ */
3268
+ extern SDL_DECLSPEC bool SDLCALL IMG_GetAnimationDecoderFrame(IMG_AnimationDecoder *decoder, SDL_Surface **frame, Uint64 *duration);
3269
+
3270
+ /**
3271
+ * Get the decoder status indicating the current state of the decoder.
3272
+ *
3273
+ * \param decoder the decoder to get the status of.
3274
+ * \returns the status of the underlying decoder, or
3275
+ * IMG_DECODER_STATUS_INVALID if the given decoder is invalid.
3276
+ *
3277
+ * \since This function is available since SDL_image 3.4.0.
3278
+ *
3279
+ * \sa IMG_GetAnimationDecoderFrame
3280
+ */
3281
+ extern SDL_DECLSPEC IMG_AnimationDecoderStatus SDLCALL IMG_GetAnimationDecoderStatus(IMG_AnimationDecoder *decoder);
3282
+
3283
+ /**
3284
+ * Reset an animation decoder.
3285
+ *
3286
+ * Calling this function resets the animation decoder, allowing it to start
3287
+ * from the beginning again. This is useful if you want to decode the frame
3288
+ * sequence again without creating a new decoder.
3289
+ *
3290
+ * \param decoder the decoder to reset.
3291
+ * \returns true on success or false on failure; call SDL_GetError() for more
3292
+ * information.
3293
+ *
3294
+ * \since This function is available since SDL_image 3.4.0.
3295
+ *
3296
+ * \sa IMG_CreateAnimationDecoder
3297
+ * \sa IMG_CreateAnimationDecoder_IO
3298
+ * \sa IMG_CreateAnimationDecoderWithProperties
3299
+ * \sa IMG_GetAnimationDecoderFrame
3300
+ * \sa IMG_CloseAnimationDecoder
3301
+ */
3302
+ extern SDL_DECLSPEC bool SDLCALL IMG_ResetAnimationDecoder(IMG_AnimationDecoder *decoder);
3303
+
3304
+ /**
3305
+ * Close an animation decoder, finishing any decoding.
3306
+ *
3307
+ * Calling this function frees the animation decoder, and returns the final
3308
+ * status of the decoding process.
3309
+ *
3310
+ * \param decoder the decoder to close.
3311
+ * \returns true on success or false on failure; call SDL_GetError() for more
3312
+ * information.
3313
+ *
3314
+ * \since This function is available since SDL_image 3.4.0.
3315
+ *
3316
+ * \sa IMG_CreateAnimationDecoder
3317
+ * \sa IMG_CreateAnimationDecoder_IO
3318
+ * \sa IMG_CreateAnimationDecoderWithProperties
3319
+ */
3320
+ extern SDL_DECLSPEC bool SDLCALL IMG_CloseAnimationDecoder(IMG_AnimationDecoder *decoder);
3321
+
3322
+ /* Ends C function definitions when using C++ */
3323
+ #ifdef __cplusplus
3324
+ }
3325
+ #endif
3326
+ #include <SDL3/SDL_close_code.h>
3327
+
3328
+ #endif /* SDL_IMAGE_H_ */