ruby2d 0.11.0 → 0.11.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/assets/include/SDL2/SDL.h +108 -14
- data/assets/include/SDL2/SDL_assert.h +81 -50
- data/assets/include/SDL2/SDL_atomic.h +135 -35
- data/assets/include/SDL2/SDL_audio.h +960 -355
- data/assets/include/SDL2/SDL_bits.h +11 -6
- data/assets/include/SDL2/SDL_blendmode.h +91 -14
- data/assets/include/SDL2/SDL_clipboard.h +30 -7
- data/assets/include/SDL2/SDL_config.h +3 -1
- data/assets/include/SDL2/SDL_config_android.h +11 -1
- data/assets/include/SDL2/SDL_config_emscripten.h +216 -0
- data/assets/include/SDL2/SDL_config_iphoneos.h +9 -1
- data/assets/include/SDL2/SDL_config_macosx.h +16 -2
- data/assets/include/SDL2/SDL_config_minimal.h +4 -1
- data/assets/include/SDL2/SDL_config_os2.h +37 -20
- data/assets/include/SDL2/SDL_config_pandora.h +6 -1
- data/assets/include/SDL2/SDL_config_psp.h +8 -8
- data/assets/include/SDL2/SDL_config_windows.h +39 -22
- data/assets/include/SDL2/SDL_config_winrt.h +23 -8
- data/assets/include/SDL2/SDL_config_wiz.h +6 -1
- data/assets/include/SDL2/SDL_copying.h +1 -1
- data/assets/include/SDL2/SDL_cpuinfo.h +331 -71
- data/assets/include/SDL2/SDL_egl.h +906 -280
- data/assets/include/SDL2/SDL_endian.h +101 -47
- data/assets/include/SDL2/SDL_error.h +70 -19
- data/assets/include/SDL2/SDL_events.h +387 -79
- data/assets/include/SDL2/SDL_filesystem.h +73 -64
- data/assets/include/SDL2/SDL_gamecontroller.h +585 -125
- data/assets/include/SDL2/SDL_gesture.h +36 -6
- data/assets/include/SDL2/SDL_haptic.h +304 -210
- data/assets/include/SDL2/SDL_hidapi.h +451 -0
- data/assets/include/SDL2/SDL_hints.h +1286 -897
- data/assets/include/SDL2/SDL_joystick.h +577 -130
- data/assets/include/SDL2/SDL_keyboard.h +162 -63
- data/assets/include/SDL2/SDL_keycode.h +7 -5
- data/assets/include/SDL2/SDL_loadso.h +42 -8
- data/assets/include/SDL2/SDL_locale.h +34 -32
- data/assets/include/SDL2/SDL_log.h +212 -19
- data/assets/include/SDL2/SDL_main.h +72 -17
- data/assets/include/SDL2/SDL_messagebox.h +70 -23
- data/assets/include/SDL2/SDL_metal.h +27 -32
- data/assets/include/SDL2/SDL_misc.h +19 -15
- data/assets/include/SDL2/SDL_mouse.h +262 -110
- data/assets/include/SDL2/SDL_mutex.h +286 -66
- data/assets/include/SDL2/SDL_name.h +1 -1
- data/assets/include/SDL2/SDL_opengl.h +1 -1
- data/assets/include/SDL2/SDL_opengles.h +1 -1
- data/assets/include/SDL2/SDL_opengles2.h +2 -2
- data/assets/include/SDL2/SDL_pixels.h +199 -34
- data/assets/include/SDL2/SDL_platform.h +39 -2
- data/assets/include/SDL2/SDL_power.h +23 -10
- data/assets/include/SDL2/SDL_quit.h +1 -1
- data/assets/include/SDL2/SDL_rect.h +78 -28
- data/assets/include/SDL2/SDL_render.h +1204 -472
- data/assets/include/SDL2/SDL_revision.h +2 -2
- data/assets/include/SDL2/SDL_rwops.h +605 -33
- data/assets/include/SDL2/SDL_scancode.h +1 -1
- data/assets/include/SDL2/SDL_sensor.h +76 -42
- data/assets/include/SDL2/SDL_shape.h +38 -27
- data/assets/include/SDL2/SDL_stdinc.h +96 -24
- data/assets/include/SDL2/SDL_surface.h +571 -139
- data/assets/include/SDL2/SDL_system.h +339 -101
- data/assets/include/SDL2/SDL_syswm.h +50 -20
- data/assets/include/SDL2/SDL_test.h +1 -1
- data/assets/include/SDL2/SDL_test_assert.h +2 -2
- data/assets/include/SDL2/SDL_test_common.h +23 -6
- data/assets/include/SDL2/SDL_test_compare.h +1 -1
- data/assets/include/SDL2/SDL_test_crc32.h +1 -1
- data/assets/include/SDL2/SDL_test_font.h +3 -3
- data/assets/include/SDL2/SDL_test_fuzzer.h +28 -26
- data/assets/include/SDL2/SDL_test_harness.h +6 -6
- data/assets/include/SDL2/SDL_test_images.h +1 -1
- data/assets/include/SDL2/SDL_test_log.h +1 -1
- data/assets/include/SDL2/SDL_test_md5.h +1 -1
- data/assets/include/SDL2/SDL_test_memory.h +1 -1
- data/assets/include/SDL2/SDL_test_random.h +2 -2
- data/assets/include/SDL2/SDL_thread.h +226 -128
- data/assets/include/SDL2/SDL_timer.h +129 -22
- data/assets/include/SDL2/SDL_touch.h +48 -8
- data/assets/include/SDL2/SDL_ttf.h +102 -9
- data/assets/include/SDL2/SDL_types.h +1 -1
- data/assets/include/SDL2/SDL_version.h +72 -46
- data/assets/include/SDL2/SDL_video.h +1266 -460
- data/assets/include/SDL2/SDL_vulkan.h +100 -161
- data/assets/include/SDL2/begin_code.h +22 -1
- data/assets/include/SDL2/close_code.h +1 -1
- data/assets/include/mrbconf.h +234 -0
- data/assets/include/mruby/array.h +317 -0
- data/assets/include/mruby/boxing_nan.h +130 -0
- data/assets/include/mruby/boxing_no.h +58 -0
- data/assets/include/mruby/boxing_word.h +205 -0
- data/assets/include/mruby/class.h +108 -0
- data/assets/include/mruby/common.h +92 -0
- data/assets/include/mruby/compile.h +210 -0
- data/assets/include/mruby/data.h +76 -0
- data/assets/include/mruby/debug.h +66 -0
- data/assets/include/mruby/dump.h +158 -0
- data/assets/include/mruby/endian.h +44 -0
- data/assets/include/mruby/error.h +137 -0
- data/assets/include/mruby/gc.h +92 -0
- data/assets/include/mruby/hash.h +242 -0
- data/assets/include/mruby/irep.h +147 -0
- data/assets/include/mruby/istruct.h +50 -0
- data/assets/include/mruby/khash.h +284 -0
- data/assets/include/mruby/numeric.h +169 -0
- data/assets/include/mruby/object.h +43 -0
- data/assets/include/mruby/opcode.h +43 -0
- data/assets/include/mruby/ops.h +122 -0
- data/assets/include/mruby/presym/disable.h +70 -0
- data/assets/include/mruby/presym/enable.h +37 -0
- data/assets/include/mruby/presym/scanning.h +73 -0
- data/assets/include/mruby/presym.h +40 -0
- data/assets/include/mruby/proc.h +209 -0
- data/assets/include/mruby/range.h +79 -0
- data/assets/include/mruby/re.h +16 -0
- data/assets/include/mruby/string.h +469 -0
- data/assets/include/mruby/throw.h +66 -0
- data/assets/include/mruby/value.h +400 -0
- data/assets/include/mruby/variable.h +140 -0
- data/assets/include/mruby/version.h +143 -0
- data/assets/include/mruby.h +1444 -0
- data/assets/macos/universal/bin/mrbc +0 -0
- data/assets/macos/universal/lib/libFLAC.a +0 -0
- data/assets/macos/universal/lib/libSDL2.a +0 -0
- data/assets/macos/universal/lib/libSDL2_image.a +0 -0
- data/assets/macos/{lib → universal/lib}/libSDL2_mixer.a +0 -0
- data/assets/macos/universal/lib/libSDL2_ttf.a +0 -0
- data/assets/macos/universal/lib/libfreetype.a +0 -0
- data/assets/macos/universal/lib/libgraphite2.a +0 -0
- data/assets/macos/universal/lib/libharfbuzz.a +0 -0
- data/assets/macos/universal/lib/libjpeg.a +0 -0
- data/assets/macos/universal/lib/libmodplug.a +0 -0
- data/assets/macos/{lib → universal/lib}/libmpg123.a +0 -0
- data/assets/{mingw/lib/libSDL2.a → macos/universal/lib/libmruby.a} +0 -0
- data/assets/macos/{lib → universal/lib}/libogg.a +0 -0
- data/assets/macos/universal/lib/libpng16.a +0 -0
- data/assets/macos/universal/lib/libtiff.a +0 -0
- data/assets/macos/universal/lib/libvorbis.a +0 -0
- data/assets/macos/universal/lib/libvorbisfile.a +0 -0
- data/assets/macos/universal/lib/libwebp.a +0 -0
- data/assets/test_media/README.md +3 -0
- data/assets/test_media/bitstream_vera/COPYRIGHT.txt +124 -0
- data/assets/test_media/bitstream_vera/vera.ttf +0 -0
- data/assets/test_media/boom.png +0 -0
- data/assets/test_media/coin.png +0 -0
- data/assets/test_media/colors.png +0 -0
- data/assets/test_media/controller.png +0 -0
- data/assets/test_media/dial.wav +0 -0
- data/assets/test_media/hero.png +0 -0
- data/assets/test_media/image.bmp +0 -0
- data/assets/test_media/image.jpg +0 -0
- data/assets/test_media/image.png +0 -0
- data/assets/test_media/music.flac +0 -0
- data/assets/test_media/music.mp3 +0 -0
- data/assets/test_media/music.ogg +0 -0
- data/assets/test_media/music.wav +0 -0
- data/assets/test_media/originals/boom.pxm +0 -0
- data/assets/test_media/originals/coin.pxm +0 -0
- data/assets/test_media/originals/controller.sketch +0 -0
- data/assets/test_media/originals/hero.pxm +0 -0
- data/assets/test_media/originals/image.pxm +0 -0
- data/assets/test_media/originals/music.caf +0 -0
- data/assets/test_media/originals/texture_atlas.pxm +0 -0
- data/assets/test_media/rondo_alla_turka.ogg +0 -0
- data/assets/test_media/sound.flac +0 -0
- data/assets/test_media/sound.mp3 +0 -0
- data/assets/test_media/sound.ogg +0 -0
- data/assets/test_media/sound.wav +0 -0
- data/assets/test_media/sprite_sheet.png +0 -0
- data/assets/test_media/texture_atlas.png +0 -0
- data/assets/wasm/libmruby.a +0 -0
- data/assets/wasm/template.html +64 -0
- data/assets/windows/glew/README.md +10 -0
- data/assets/windows/glew/glew.h +23686 -0
- data/assets/{mingw/lib → windows/glew}/libglew32.a +0 -0
- data/assets/windows/mingw-w64-ucrt-x86_64/bin/mrbc.exe +0 -0
- data/assets/windows/mingw-w64-ucrt-x86_64/lib/libFLAC.a +0 -0
- data/assets/windows/mingw-w64-ucrt-x86_64/lib/libLerc.a +0 -0
- data/assets/windows/mingw-w64-ucrt-x86_64/lib/libSDL2.a +0 -0
- data/assets/windows/mingw-w64-ucrt-x86_64/lib/libSDL2_image.a +0 -0
- data/assets/windows/mingw-w64-ucrt-x86_64/lib/libSDL2_mixer.a +0 -0
- data/assets/windows/mingw-w64-ucrt-x86_64/lib/libSDL2_ttf.a +0 -0
- data/assets/windows/mingw-w64-ucrt-x86_64/lib/libbrotlicommon.a +0 -0
- data/assets/windows/mingw-w64-ucrt-x86_64/lib/libbrotlidec.a +0 -0
- data/assets/windows/mingw-w64-ucrt-x86_64/lib/libbz2.a +0 -0
- data/assets/windows/mingw-w64-ucrt-x86_64/lib/libdeflate.a +0 -0
- data/assets/windows/mingw-w64-ucrt-x86_64/lib/libfreetype.a +0 -0
- data/assets/windows/mingw-w64-ucrt-x86_64/lib/libglew32.a +0 -0
- data/assets/windows/mingw-w64-ucrt-x86_64/lib/libgraphite2.a +0 -0
- data/assets/windows/mingw-w64-ucrt-x86_64/lib/libharfbuzz.a +0 -0
- data/assets/windows/mingw-w64-ucrt-x86_64/lib/libjbig.a +0 -0
- data/assets/windows/mingw-w64-ucrt-x86_64/lib/libjpeg.a +0 -0
- data/assets/windows/mingw-w64-ucrt-x86_64/lib/liblzma.a +0 -0
- data/assets/windows/mingw-w64-ucrt-x86_64/lib/libmodplug.a +0 -0
- data/assets/windows/mingw-w64-ucrt-x86_64/lib/libmpg123.a +0 -0
- data/assets/windows/mingw-w64-ucrt-x86_64/lib/libmruby.a +0 -0
- data/assets/windows/mingw-w64-ucrt-x86_64/lib/libogg.a +0 -0
- data/assets/windows/mingw-w64-ucrt-x86_64/lib/libopus.a +0 -0
- data/assets/windows/mingw-w64-ucrt-x86_64/lib/libopusfile.a +0 -0
- data/assets/windows/mingw-w64-ucrt-x86_64/lib/libpng16.a +0 -0
- data/assets/windows/mingw-w64-ucrt-x86_64/lib/libsndfile.a +0 -0
- data/assets/windows/mingw-w64-ucrt-x86_64/lib/libssp.a +0 -0
- data/assets/windows/mingw-w64-ucrt-x86_64/lib/libstdc++.a +0 -0
- data/assets/windows/mingw-w64-ucrt-x86_64/lib/libtiff.a +0 -0
- data/assets/windows/mingw-w64-ucrt-x86_64/lib/libvorbis.a +0 -0
- data/assets/windows/mingw-w64-ucrt-x86_64/lib/libvorbisfile.a +0 -0
- data/assets/windows/mingw-w64-ucrt-x86_64/lib/libwebp.a +0 -0
- data/assets/windows/mingw-w64-ucrt-x86_64/lib/libz.a +0 -0
- data/assets/windows/mingw-w64-ucrt-x86_64/lib/libzstd.a +0 -0
- data/assets/windows/mingw-w64-x86_64/bin/mrbc.exe +0 -0
- data/assets/windows/mingw-w64-x86_64/lib/libFLAC.a +0 -0
- data/assets/windows/mingw-w64-x86_64/lib/libLerc.a +0 -0
- data/assets/windows/mingw-w64-x86_64/lib/libSDL2.a +0 -0
- data/assets/windows/mingw-w64-x86_64/lib/libSDL2_image.a +0 -0
- data/assets/windows/mingw-w64-x86_64/lib/libSDL2_mixer.a +0 -0
- data/assets/windows/mingw-w64-x86_64/lib/libSDL2_ttf.a +0 -0
- data/assets/windows/mingw-w64-x86_64/lib/libbrotlicommon.a +0 -0
- data/assets/windows/mingw-w64-x86_64/lib/libbrotlidec.a +0 -0
- data/assets/windows/mingw-w64-x86_64/lib/libbz2.a +0 -0
- data/assets/windows/mingw-w64-x86_64/lib/libdeflate.a +0 -0
- data/assets/windows/mingw-w64-x86_64/lib/libfreetype.a +0 -0
- data/assets/windows/mingw-w64-x86_64/lib/libglew32.a +0 -0
- data/assets/windows/mingw-w64-x86_64/lib/libgraphite2.a +0 -0
- data/assets/windows/mingw-w64-x86_64/lib/libharfbuzz.a +0 -0
- data/assets/windows/mingw-w64-x86_64/lib/libjbig.a +0 -0
- data/assets/windows/mingw-w64-x86_64/lib/libjpeg.a +0 -0
- data/assets/windows/mingw-w64-x86_64/lib/liblzma.a +0 -0
- data/assets/windows/mingw-w64-x86_64/lib/libmodplug.a +0 -0
- data/assets/windows/mingw-w64-x86_64/lib/libmpg123.a +0 -0
- data/assets/windows/mingw-w64-x86_64/lib/libmruby.a +0 -0
- data/assets/windows/mingw-w64-x86_64/lib/libogg.a +0 -0
- data/assets/windows/mingw-w64-x86_64/lib/libopus.a +0 -0
- data/assets/windows/mingw-w64-x86_64/lib/libopusfile.a +0 -0
- data/assets/windows/mingw-w64-x86_64/lib/libpng16.a +0 -0
- data/assets/windows/mingw-w64-x86_64/lib/libsndfile.a +0 -0
- data/assets/windows/mingw-w64-x86_64/lib/libssp.a +0 -0
- data/assets/windows/mingw-w64-x86_64/lib/libstdc++.a +0 -0
- data/assets/windows/mingw-w64-x86_64/lib/libtiff.a +0 -0
- data/assets/windows/mingw-w64-x86_64/lib/libvorbis.a +0 -0
- data/assets/windows/mingw-w64-x86_64/lib/libvorbisfile.a +0 -0
- data/assets/windows/mingw-w64-x86_64/lib/libwebp.a +0 -0
- data/assets/windows/mingw-w64-x86_64/lib/libz.a +0 -0
- data/assets/windows/mingw-w64-x86_64/lib/libzstd.a +0 -0
- data/assets/{ios → xcode/ios}/Assets.xcassets/AppIcon.appiconset/Contents.json +0 -0
- data/assets/{ios → xcode/ios}/Assets.xcassets/Contents.json +0 -0
- data/assets/{ios → xcode/ios}/Base.lproj/LaunchScreen.storyboard +0 -0
- data/assets/{ios → xcode/ios}/Info.plist +0 -0
- data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mrbconf.h +0 -0
- data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/array.h +0 -0
- data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/boxing_nan.h +0 -0
- data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/boxing_no.h +0 -0
- data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/boxing_word.h +0 -0
- data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/class.h +0 -0
- data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/common.h +0 -0
- data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/compile.h +0 -0
- data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/data.h +0 -0
- data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/debug.h +0 -0
- data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/dump.h +0 -0
- data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/error.h +0 -0
- data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/gc.h +0 -0
- data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/hash.h +0 -0
- data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/irep.h +0 -0
- data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/istruct.h +0 -0
- data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/khash.h +0 -0
- data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/numeric.h +0 -0
- data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/object.h +0 -0
- data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/opcode.h +0 -0
- data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/ops.h +0 -0
- data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/proc.h +0 -0
- data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/range.h +0 -0
- data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/re.h +0 -0
- data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/string.h +0 -0
- data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/throw.h +0 -0
- data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/value.h +0 -0
- data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/variable.h +0 -0
- data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby/version.h +0 -0
- data/assets/{ios → xcode/ios}/MRuby.framework/Headers/mruby.h +0 -0
- data/assets/{ios → xcode/ios}/MRuby.framework/Info.plist +0 -0
- data/assets/{ios → xcode/ios}/MRuby.framework/MRuby +0 -0
- data/assets/{ios → xcode/ios}/MyApp.xcodeproj/project.pbxproj +0 -0
- data/assets/{ios → xcode/ios}/MyApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -0
- data/assets/{ios → xcode/ios}/MyApp.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -0
- data/assets/{ios → xcode/ios}/MyApp.xcodeproj/project.xcworkspace/xcshareddata/MyApp.xcscmblueprint +0 -0
- data/assets/{ios → xcode/ios}/main.c +0 -0
- data/assets/{tvos → xcode/tvos}/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Content.imageset/Contents.json +0 -0
- data/assets/{tvos → xcode/tvos}/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Contents.json +0 -0
- data/assets/{tvos → xcode/tvos}/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Contents.json +0 -0
- data/assets/{tvos → xcode/tvos}/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Content.imageset/Contents.json +0 -0
- data/assets/{tvos → xcode/tvos}/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Contents.json +0 -0
- data/assets/{tvos → xcode/tvos}/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json +0 -0
- data/assets/{tvos → xcode/tvos}/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Middle.imagestacklayer/Contents.json +0 -0
- data/assets/{tvos → xcode/tvos}/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Content.imageset/Contents.json +0 -0
- data/assets/{tvos → xcode/tvos}/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Contents.json +0 -0
- data/assets/{tvos → xcode/tvos}/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Contents.json +0 -0
- data/assets/{tvos → xcode/tvos}/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Content.imageset/Contents.json +0 -0
- data/assets/{tvos → xcode/tvos}/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Contents.json +0 -0
- data/assets/{tvos → xcode/tvos}/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json +0 -0
- data/assets/{tvos → xcode/tvos}/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Contents.json +0 -0
- data/assets/{tvos → xcode/tvos}/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Contents.json +0 -0
- data/assets/{tvos → xcode/tvos}/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image Wide.imageset/Contents.json +0 -0
- data/assets/{tvos → xcode/tvos}/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image.imageset/Contents.json +0 -0
- data/assets/{tvos → xcode/tvos}/Assets.xcassets/Contents.json +0 -0
- data/assets/{tvos → xcode/tvos}/Assets.xcassets/LaunchImage.launchimage/Contents.json +0 -0
- data/assets/{tvos → xcode/tvos}/Info.plist +0 -0
- data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mrbconf.h +0 -0
- data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/array.h +0 -0
- data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/boxing_nan.h +0 -0
- data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/boxing_no.h +0 -0
- data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/boxing_word.h +0 -0
- data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/class.h +0 -0
- data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/common.h +0 -0
- data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/compile.h +0 -0
- data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/data.h +0 -0
- data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/debug.h +0 -0
- data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/dump.h +0 -0
- data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/error.h +0 -0
- data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/gc.h +0 -0
- data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/hash.h +0 -0
- data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/irep.h +0 -0
- data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/istruct.h +0 -0
- data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/khash.h +0 -0
- data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/numeric.h +0 -0
- data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/object.h +0 -0
- data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/opcode.h +0 -0
- data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/ops.h +0 -0
- data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/proc.h +0 -0
- data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/range.h +0 -0
- data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/re.h +0 -0
- data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/string.h +0 -0
- data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/throw.h +0 -0
- data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/value.h +0 -0
- data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/variable.h +0 -0
- data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby/version.h +0 -0
- data/assets/{tvos → xcode/tvos}/MRuby.framework/Headers/mruby.h +0 -0
- data/assets/{tvos → xcode/tvos}/MRuby.framework/Info.plist +0 -0
- data/assets/{tvos → xcode/tvos}/MRuby.framework/MRuby +0 -0
- data/assets/{tvos → xcode/tvos}/MyApp.xcodeproj/project.pbxproj +0 -0
- data/assets/{tvos → xcode/tvos}/MyApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -0
- data/assets/{tvos → xcode/tvos}/MyApp.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -0
- data/assets/{tvos → xcode/tvos}/MyApp.xcodeproj/project.xcworkspace/xcshareddata/MyApp.xcscmblueprint +0 -0
- data/assets/{tvos → xcode/tvos}/main.c +0 -0
- data/bin/ruby2d +3 -4
- data/ext/ruby2d/extconf.rb +44 -25
- data/ext/ruby2d/gl.c +1 -1
- data/ext/ruby2d/gl3.c +0 -1
- data/ext/ruby2d/gles.c +137 -84
- data/ext/ruby2d/ruby2d.c +126 -32
- data/ext/ruby2d/ruby2d.h +53 -6
- data/ext/ruby2d/text.c +14 -1
- data/ext/ruby2d/window.c +253 -215
- data/lib/ruby2d/cli/build.rb +242 -59
- data/lib/ruby2d/cli/colorize.rb +5 -4
- data/lib/ruby2d/cli/platform.rb +17 -0
- data/lib/ruby2d/font.rb +7 -1
- data/lib/ruby2d/sprite.rb +7 -2
- data/lib/ruby2d/text.rb +1 -3
- data/lib/ruby2d/texture.rb +21 -21
- data/lib/ruby2d/tileset.rb +34 -33
- data/lib/ruby2d/version.rb +1 -1
- data/lib/ruby2d/vertices.rb +11 -6
- data/lib/ruby2d.rb +14 -20
- metadata +279 -151
- data/assets/README.md +0 -22
- data/assets/Rakefile +0 -85
- data/assets/macos/lib/libFLAC.a +0 -0
- data/assets/macos/lib/libSDL2.a +0 -0
- data/assets/macos/lib/libSDL2_image.a +0 -0
- data/assets/macos/lib/libSDL2_ttf.a +0 -0
- data/assets/macos/lib/libfreetype.a +0 -0
- data/assets/macos/lib/libjpeg.a +0 -0
- data/assets/macos/lib/libpng16.a +0 -0
- data/assets/macos/lib/libtiff.a +0 -0
- data/assets/macos/lib/libvorbis.a +0 -0
- data/assets/macos/lib/libvorbisfile.a +0 -0
- data/assets/macos/lib/libwebp.a +0 -0
- data/assets/mingw/bin/SDL2.dll +0 -0
- data/assets/mingw/bin/SDL2_image.dll +0 -0
- data/assets/mingw/bin/SDL2_mixer.dll +0 -0
- data/assets/mingw/bin/SDL2_ttf.dll +0 -0
- data/assets/mingw/bin/glew32.dll +0 -0
- data/assets/mingw/bin/libFLAC-8.dll +0 -0
- data/assets/mingw/bin/libfreetype-6.dll +0 -0
- data/assets/mingw/bin/libjpeg-9.dll +0 -0
- data/assets/mingw/bin/libmodplug-1.dll +0 -0
- data/assets/mingw/bin/libmpg123-0.dll +0 -0
- data/assets/mingw/bin/libogg-0.dll +0 -0
- data/assets/mingw/bin/libopus-0.dll +0 -0
- data/assets/mingw/bin/libopusfile-0.dll +0 -0
- data/assets/mingw/bin/libpng16-16.dll +0 -0
- data/assets/mingw/bin/libtiff-5.dll +0 -0
- data/assets/mingw/bin/libvorbis-0.dll +0 -0
- data/assets/mingw/bin/libvorbisfile-3.dll +0 -0
- data/assets/mingw/bin/libwebp-7.dll +0 -0
- data/assets/mingw/bin/zlib1.dll +0 -0
- data/assets/mingw/lib/libSDL2.dll.a +0 -0
- data/assets/mingw/lib/libSDL2_image.a +0 -0
- data/assets/mingw/lib/libSDL2_image.dll.a +0 -0
- data/assets/mingw/lib/libSDL2_mixer.a +0 -0
- data/assets/mingw/lib/libSDL2_mixer.dll.a +0 -0
- data/assets/mingw/lib/libSDL2_test.a +0 -0
- data/assets/mingw/lib/libSDL2_ttf.a +0 -0
- data/assets/mingw/lib/libSDL2_ttf.dll.a +0 -0
- data/assets/mingw/lib/libSDL2main.a +0 -0
- data/assets/mingw/lib/libglew32.dll.a +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
/*
|
2
2
|
Simple DirectMedia Layer
|
3
|
-
Copyright (C) 1997-
|
3
|
+
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
|
4
4
|
|
5
5
|
This software is provided 'as-is', without any express or implied
|
6
6
|
warranty. In no event will the authors be held liable for any damages
|
@@ -59,38 +59,105 @@ struct SDL_mutex;
|
|
59
59
|
typedef struct SDL_mutex SDL_mutex;
|
60
60
|
|
61
61
|
/**
|
62
|
-
*
|
62
|
+
* Create a new mutex.
|
63
|
+
*
|
64
|
+
* All newly-created mutexes begin in the _unlocked_ state.
|
65
|
+
*
|
66
|
+
* Calls to SDL_LockMutex() will not return while the mutex is locked by
|
67
|
+
* another thread. See SDL_TryLockMutex() to attempt to lock without blocking.
|
68
|
+
*
|
69
|
+
* SDL mutexes are reentrant.
|
70
|
+
*
|
71
|
+
* \returns the initialized and unlocked mutex or NULL on failure; call
|
72
|
+
* SDL_GetError() for more information.
|
73
|
+
*
|
74
|
+
* \since This function is available since SDL 2.0.0.
|
75
|
+
*
|
76
|
+
* \sa SDL_DestroyMutex
|
77
|
+
* \sa SDL_LockMutex
|
78
|
+
* \sa SDL_TryLockMutex
|
79
|
+
* \sa SDL_UnlockMutex
|
63
80
|
*/
|
64
81
|
extern DECLSPEC SDL_mutex *SDLCALL SDL_CreateMutex(void);
|
65
82
|
|
66
83
|
/**
|
67
|
-
*
|
84
|
+
* Lock the mutex.
|
85
|
+
*
|
86
|
+
* This will block until the mutex is available, which is to say it is in the
|
87
|
+
* unlocked state and the OS has chosen the caller as the next thread to lock
|
88
|
+
* it. Of all threads waiting to lock the mutex, only one may do so at a time.
|
89
|
+
*
|
90
|
+
* It is legal for the owning thread to lock an already-locked mutex. It must
|
91
|
+
* unlock it the same number of times before it is actually made available for
|
92
|
+
* other threads in the system (this is known as a "recursive mutex").
|
68
93
|
*
|
69
|
-
*
|
94
|
+
* \param mutex the mutex to lock
|
95
|
+
* \return 0, or -1 on error.
|
96
|
+
*
|
97
|
+
* \since This function is available since SDL 2.0.0.
|
70
98
|
*/
|
71
|
-
#define SDL_mutexP(m) SDL_LockMutex(m)
|
72
99
|
extern DECLSPEC int SDLCALL SDL_LockMutex(SDL_mutex * mutex);
|
100
|
+
#define SDL_mutexP(m) SDL_LockMutex(m)
|
73
101
|
|
74
102
|
/**
|
75
|
-
*
|
103
|
+
* Try to lock a mutex without blocking.
|
104
|
+
*
|
105
|
+
* This works just like SDL_LockMutex(), but if the mutex is not available,
|
106
|
+
* this function returns `SDL_MUTEX_TIMEOUT` immediately.
|
76
107
|
*
|
77
|
-
*
|
108
|
+
* This technique is useful if you need exclusive access to a resource but
|
109
|
+
* don't want to wait for it, and will return to it to try again later.
|
110
|
+
*
|
111
|
+
* \param mutex the mutex to try to lock
|
112
|
+
* \returns 0, `SDL_MUTEX_TIMEDOUT`, or -1 on error; call SDL_GetError() for
|
113
|
+
* more information.
|
114
|
+
*
|
115
|
+
* \since This function is available since SDL 2.0.0.
|
116
|
+
*
|
117
|
+
* \sa SDL_CreateMutex
|
118
|
+
* \sa SDL_DestroyMutex
|
119
|
+
* \sa SDL_LockMutex
|
120
|
+
* \sa SDL_UnlockMutex
|
78
121
|
*/
|
79
122
|
extern DECLSPEC int SDLCALL SDL_TryLockMutex(SDL_mutex * mutex);
|
80
123
|
|
81
124
|
/**
|
82
|
-
*
|
125
|
+
* Unlock the mutex.
|
126
|
+
*
|
127
|
+
* It is legal for the owning thread to lock an already-locked mutex. It must
|
128
|
+
* unlock it the same number of times before it is actually made available for
|
129
|
+
* other threads in the system (this is known as a "recursive mutex").
|
83
130
|
*
|
84
|
-
*
|
131
|
+
* It is an error to unlock a mutex that has not been locked by the current
|
132
|
+
* thread, and doing so results in undefined behavior.
|
85
133
|
*
|
86
|
-
*
|
87
|
-
*
|
134
|
+
* It is also an error to unlock a mutex that isn't locked at all.
|
135
|
+
*
|
136
|
+
* \param mutex the mutex to unlock.
|
137
|
+
* \returns 0, or -1 on error.
|
138
|
+
*
|
139
|
+
* \since This function is available since SDL 2.0.0.
|
88
140
|
*/
|
89
|
-
#define SDL_mutexV(m) SDL_UnlockMutex(m)
|
90
141
|
extern DECLSPEC int SDLCALL SDL_UnlockMutex(SDL_mutex * mutex);
|
142
|
+
#define SDL_mutexV(m) SDL_UnlockMutex(m)
|
91
143
|
|
92
144
|
/**
|
93
|
-
*
|
145
|
+
* Destroy a mutex created with SDL_CreateMutex().
|
146
|
+
*
|
147
|
+
* This function must be called on any mutex that is no longer needed. Failure
|
148
|
+
* to destroy a mutex will result in a system memory or resource leak. While
|
149
|
+
* it is safe to destroy a mutex that is _unlocked_, it is not safe to attempt
|
150
|
+
* to destroy a locked mutex, and may result in undefined behavior depending
|
151
|
+
* on the platform.
|
152
|
+
*
|
153
|
+
* \param mutex the mutex to destroy
|
154
|
+
*
|
155
|
+
* \since This function is available since SDL 2.0.0.
|
156
|
+
*
|
157
|
+
* \sa SDL_CreateMutex
|
158
|
+
* \sa SDL_LockMutex
|
159
|
+
* \sa SDL_TryLockMutex
|
160
|
+
* \sa SDL_UnlockMutex
|
94
161
|
*/
|
95
162
|
extern DECLSPEC void SDLCALL SDL_DestroyMutex(SDL_mutex * mutex);
|
96
163
|
|
@@ -107,50 +174,151 @@ struct SDL_semaphore;
|
|
107
174
|
typedef struct SDL_semaphore SDL_sem;
|
108
175
|
|
109
176
|
/**
|
110
|
-
*
|
177
|
+
* Create a semaphore.
|
178
|
+
*
|
179
|
+
* This function creates a new semaphore and initializes it with the value
|
180
|
+
* `initial_value`. Each wait operation on the semaphore will atomically
|
181
|
+
* decrement the semaphore value and potentially block if the semaphore value
|
182
|
+
* is 0. Each post operation will atomically increment the semaphore value and
|
183
|
+
* wake waiting threads and allow them to retry the wait operation.
|
184
|
+
*
|
185
|
+
* \param initial_value the starting value of the semaphore
|
186
|
+
* \returns a new semaphore or NULL on failure; call SDL_GetError() for more
|
187
|
+
* information.
|
188
|
+
*
|
189
|
+
* \since This function is available since SDL 2.0.0.
|
190
|
+
*
|
191
|
+
* \sa SDL_DestroySemaphore
|
192
|
+
* \sa SDL_SemPost
|
193
|
+
* \sa SDL_SemTryWait
|
194
|
+
* \sa SDL_SemValue
|
195
|
+
* \sa SDL_SemWait
|
196
|
+
* \sa SDL_SemWaitTimeout
|
111
197
|
*/
|
112
198
|
extern DECLSPEC SDL_sem *SDLCALL SDL_CreateSemaphore(Uint32 initial_value);
|
113
199
|
|
114
200
|
/**
|
115
|
-
*
|
201
|
+
* Destroy a semaphore.
|
202
|
+
*
|
203
|
+
* It is not safe to destroy a semaphore if there are threads currently
|
204
|
+
* waiting on it.
|
205
|
+
*
|
206
|
+
* \param sem the semaphore to destroy
|
207
|
+
*
|
208
|
+
* \since This function is available since SDL 2.0.0.
|
209
|
+
*
|
210
|
+
* \sa SDL_CreateSemaphore
|
211
|
+
* \sa SDL_SemPost
|
212
|
+
* \sa SDL_SemTryWait
|
213
|
+
* \sa SDL_SemValue
|
214
|
+
* \sa SDL_SemWait
|
215
|
+
* \sa SDL_SemWaitTimeout
|
116
216
|
*/
|
117
217
|
extern DECLSPEC void SDLCALL SDL_DestroySemaphore(SDL_sem * sem);
|
118
218
|
|
119
219
|
/**
|
120
|
-
*
|
121
|
-
*
|
122
|
-
*
|
220
|
+
* Wait until a semaphore has a positive value and then decrements it.
|
221
|
+
*
|
222
|
+
* This function suspends the calling thread until either the semaphore
|
223
|
+
* pointed to by `sem` has a positive value or the call is interrupted by a
|
224
|
+
* signal or error. If the call is successful it will atomically decrement the
|
225
|
+
* semaphore value.
|
226
|
+
*
|
227
|
+
* This function is the equivalent of calling SDL_SemWaitTimeout() with a time
|
228
|
+
* length of `SDL_MUTEX_MAXWAIT`.
|
229
|
+
*
|
230
|
+
* \param sem the semaphore wait on
|
231
|
+
* \returns 0 on success or a negative error code on failure; call
|
232
|
+
* SDL_GetError() for more information.
|
233
|
+
*
|
234
|
+
* \since This function is available since SDL 2.0.0.
|
235
|
+
*
|
236
|
+
* \sa SDL_CreateSemaphore
|
237
|
+
* \sa SDL_DestroySemaphore
|
238
|
+
* \sa SDL_SemPost
|
239
|
+
* \sa SDL_SemTryWait
|
240
|
+
* \sa SDL_SemValue
|
241
|
+
* \sa SDL_SemWait
|
242
|
+
* \sa SDL_SemWaitTimeout
|
123
243
|
*/
|
124
244
|
extern DECLSPEC int SDLCALL SDL_SemWait(SDL_sem * sem);
|
125
245
|
|
126
246
|
/**
|
127
|
-
*
|
247
|
+
* See if a semaphore has a positive value and decrement it if it does.
|
248
|
+
*
|
249
|
+
* This function checks to see if the semaphore pointed to by `sem` has a
|
250
|
+
* positive value and atomically decrements the semaphore value if it does. If
|
251
|
+
* the semaphore doesn't have a positive value, the function immediately
|
252
|
+
* returns SDL_MUTEX_TIMEDOUT.
|
253
|
+
*
|
254
|
+
* \param sem the semaphore to wait on
|
255
|
+
* \returns 0 if the wait succeeds, `SDL_MUTEX_TIMEDOUT` if the wait would
|
256
|
+
* block, or a negative error code on failure; call SDL_GetError()
|
257
|
+
* for more information.
|
258
|
+
*
|
259
|
+
* \since This function is available since SDL 2.0.0.
|
128
260
|
*
|
129
|
-
*
|
130
|
-
*
|
261
|
+
* \sa SDL_CreateSemaphore
|
262
|
+
* \sa SDL_DestroySemaphore
|
263
|
+
* \sa SDL_SemPost
|
264
|
+
* \sa SDL_SemValue
|
265
|
+
* \sa SDL_SemWait
|
266
|
+
* \sa SDL_SemWaitTimeout
|
131
267
|
*/
|
132
268
|
extern DECLSPEC int SDLCALL SDL_SemTryWait(SDL_sem * sem);
|
133
269
|
|
134
270
|
/**
|
135
|
-
*
|
271
|
+
* Wait until a semaphore has a positive value and then decrements it.
|
136
272
|
*
|
137
|
-
*
|
138
|
-
*
|
273
|
+
* This function suspends the calling thread until either the semaphore
|
274
|
+
* pointed to by `sem` has a positive value, the call is interrupted by a
|
275
|
+
* signal or error, or the specified time has elapsed. If the call is
|
276
|
+
* successful it will atomically decrement the semaphore value.
|
139
277
|
*
|
140
|
-
*
|
141
|
-
*
|
278
|
+
* \param sem the semaphore to wait on
|
279
|
+
* \param ms the length of the timeout, in milliseconds
|
280
|
+
* \returns 0 if the wait succeeds, `SDL_MUTEX_TIMEDOUT` if the wait does not
|
281
|
+
* succeed in the allotted time, or a negative error code on failure;
|
282
|
+
* call SDL_GetError() for more information.
|
283
|
+
*
|
284
|
+
* \since This function is available since SDL 2.0.0.
|
285
|
+
*
|
286
|
+
* \sa SDL_CreateSemaphore
|
287
|
+
* \sa SDL_DestroySemaphore
|
288
|
+
* \sa SDL_SemPost
|
289
|
+
* \sa SDL_SemTryWait
|
290
|
+
* \sa SDL_SemValue
|
291
|
+
* \sa SDL_SemWait
|
142
292
|
*/
|
143
293
|
extern DECLSPEC int SDLCALL SDL_SemWaitTimeout(SDL_sem * sem, Uint32 ms);
|
144
294
|
|
145
295
|
/**
|
146
|
-
*
|
296
|
+
* Atomically increment a semaphore's value and wake waiting threads.
|
297
|
+
*
|
298
|
+
* \param sem the semaphore to increment
|
299
|
+
* \returns 0 on success or a negative error code on failure; call
|
300
|
+
* SDL_GetError() for more information.
|
301
|
+
*
|
302
|
+
* \since This function is available since SDL 2.0.0.
|
147
303
|
*
|
148
|
-
*
|
304
|
+
* \sa SDL_CreateSemaphore
|
305
|
+
* \sa SDL_DestroySemaphore
|
306
|
+
* \sa SDL_SemTryWait
|
307
|
+
* \sa SDL_SemValue
|
308
|
+
* \sa SDL_SemWait
|
309
|
+
* \sa SDL_SemWaitTimeout
|
149
310
|
*/
|
150
311
|
extern DECLSPEC int SDLCALL SDL_SemPost(SDL_sem * sem);
|
151
312
|
|
152
313
|
/**
|
153
|
-
*
|
314
|
+
* Get the current value of a semaphore.
|
315
|
+
*
|
316
|
+
* \param sem the semaphore to query
|
317
|
+
* \returns the current value of the semaphore.
|
318
|
+
*
|
319
|
+
* \since This function is available since SDL 2.0.0.
|
320
|
+
*
|
321
|
+
* \sa SDL_CreateSemaphore
|
154
322
|
*/
|
155
323
|
extern DECLSPEC Uint32 SDLCALL SDL_SemValue(SDL_sem * sem);
|
156
324
|
|
@@ -167,72 +335,124 @@ struct SDL_cond;
|
|
167
335
|
typedef struct SDL_cond SDL_cond;
|
168
336
|
|
169
337
|
/**
|
170
|
-
*
|
171
|
-
*
|
172
|
-
* Typical use of condition variables:
|
338
|
+
* Create a condition variable.
|
173
339
|
*
|
174
|
-
*
|
175
|
-
*
|
176
|
-
* while ( ! condition ) {
|
177
|
-
* SDL_CondWait(cond, lock);
|
178
|
-
* }
|
179
|
-
* SDL_UnlockMutex(lock);
|
340
|
+
* \returns a new condition variable or NULL on failure; call SDL_GetError()
|
341
|
+
* for more information.
|
180
342
|
*
|
181
|
-
*
|
182
|
-
* SDL_LockMutex(lock);
|
183
|
-
* ...
|
184
|
-
* condition = true;
|
185
|
-
* ...
|
186
|
-
* SDL_CondSignal(cond);
|
187
|
-
* SDL_UnlockMutex(lock);
|
343
|
+
* \since This function is available since SDL 2.0.0.
|
188
344
|
*
|
189
|
-
*
|
190
|
-
*
|
191
|
-
*
|
192
|
-
*
|
193
|
-
*
|
194
|
-
* In general it's safer to signal the condition variable while the
|
195
|
-
* mutex is locked.
|
345
|
+
* \sa SDL_CondBroadcast
|
346
|
+
* \sa SDL_CondSignal
|
347
|
+
* \sa SDL_CondWait
|
348
|
+
* \sa SDL_CondWaitTimeout
|
349
|
+
* \sa SDL_DestroyCond
|
196
350
|
*/
|
197
351
|
extern DECLSPEC SDL_cond *SDLCALL SDL_CreateCond(void);
|
198
352
|
|
199
353
|
/**
|
200
|
-
*
|
354
|
+
* Destroy a condition variable.
|
355
|
+
*
|
356
|
+
* \param cond the condition variable to destroy
|
357
|
+
*
|
358
|
+
* \since This function is available since SDL 2.0.0.
|
359
|
+
*
|
360
|
+
* \sa SDL_CondBroadcast
|
361
|
+
* \sa SDL_CondSignal
|
362
|
+
* \sa SDL_CondWait
|
363
|
+
* \sa SDL_CondWaitTimeout
|
364
|
+
* \sa SDL_CreateCond
|
201
365
|
*/
|
202
366
|
extern DECLSPEC void SDLCALL SDL_DestroyCond(SDL_cond * cond);
|
203
367
|
|
204
368
|
/**
|
205
|
-
*
|
369
|
+
* Restart one of the threads that are waiting on the condition variable.
|
206
370
|
*
|
207
|
-
*
|
371
|
+
* \param cond the condition variable to signal
|
372
|
+
* \returns 0 on success or a negative error code on failure; call
|
373
|
+
* SDL_GetError() for more information.
|
374
|
+
*
|
375
|
+
* \since This function is available since SDL 2.0.0.
|
376
|
+
*
|
377
|
+
* \sa SDL_CondBroadcast
|
378
|
+
* \sa SDL_CondWait
|
379
|
+
* \sa SDL_CondWaitTimeout
|
380
|
+
* \sa SDL_CreateCond
|
381
|
+
* \sa SDL_DestroyCond
|
208
382
|
*/
|
209
383
|
extern DECLSPEC int SDLCALL SDL_CondSignal(SDL_cond * cond);
|
210
384
|
|
211
385
|
/**
|
212
|
-
*
|
386
|
+
* Restart all threads that are waiting on the condition variable.
|
387
|
+
*
|
388
|
+
* \param cond the condition variable to signal
|
389
|
+
* \returns 0 on success or a negative error code on failure; call
|
390
|
+
* SDL_GetError() for more information.
|
391
|
+
*
|
392
|
+
* \since This function is available since SDL 2.0.0.
|
213
393
|
*
|
214
|
-
*
|
394
|
+
* \sa SDL_CondSignal
|
395
|
+
* \sa SDL_CondWait
|
396
|
+
* \sa SDL_CondWaitTimeout
|
397
|
+
* \sa SDL_CreateCond
|
398
|
+
* \sa SDL_DestroyCond
|
215
399
|
*/
|
216
400
|
extern DECLSPEC int SDLCALL SDL_CondBroadcast(SDL_cond * cond);
|
217
401
|
|
218
402
|
/**
|
219
|
-
*
|
403
|
+
* Wait until a condition variable is signaled.
|
220
404
|
*
|
221
|
-
*
|
405
|
+
* This function unlocks the specified `mutex` and waits for another thread to
|
406
|
+
* call SDL_CondSignal() or SDL_CondBroadcast() on the condition variable
|
407
|
+
* `cond`. Once the condition variable is signaled, the mutex is re-locked and
|
408
|
+
* the function returns.
|
222
409
|
*
|
223
|
-
*
|
410
|
+
* The mutex must be locked before calling this function.
|
224
411
|
*
|
225
|
-
*
|
412
|
+
* This function is the equivalent of calling SDL_CondWaitTimeout() with a
|
413
|
+
* time length of `SDL_MUTEX_MAXWAIT`.
|
414
|
+
*
|
415
|
+
* \param cond the condition variable to wait on
|
416
|
+
* \param mutex the mutex used to coordinate thread access
|
417
|
+
* \returns 0 when it is signaled or a negative error code on failure; call
|
418
|
+
* SDL_GetError() for more information.
|
419
|
+
*
|
420
|
+
* \since This function is available since SDL 2.0.0.
|
421
|
+
*
|
422
|
+
* \sa SDL_CondBroadcast
|
423
|
+
* \sa SDL_CondSignal
|
424
|
+
* \sa SDL_CondWaitTimeout
|
425
|
+
* \sa SDL_CreateCond
|
426
|
+
* \sa SDL_DestroyCond
|
226
427
|
*/
|
227
428
|
extern DECLSPEC int SDLCALL SDL_CondWait(SDL_cond * cond, SDL_mutex * mutex);
|
228
429
|
|
229
430
|
/**
|
230
|
-
*
|
231
|
-
*
|
232
|
-
*
|
431
|
+
* Wait until a condition variable is signaled or a certain time has passed.
|
432
|
+
*
|
433
|
+
* This function unlocks the specified `mutex` and waits for another thread to
|
434
|
+
* call SDL_CondSignal() or SDL_CondBroadcast() on the condition variable
|
435
|
+
* `cond`, or for the specified time to elapse. Once the condition variable is
|
436
|
+
* signaled or the time elapsed, the mutex is re-locked and the function
|
437
|
+
* returns.
|
438
|
+
*
|
439
|
+
* The mutex must be locked before calling this function.
|
440
|
+
*
|
441
|
+
* \param cond the condition variable to wait on
|
442
|
+
* \param mutex the mutex used to coordinate thread access
|
443
|
+
* \param ms the maximum time to wait, in milliseconds, or `SDL_MUTEX_MAXWAIT`
|
444
|
+
* to wait indefinitely
|
445
|
+
* \returns 0 if the condition variable is signaled, `SDL_MUTEX_TIMEDOUT` if
|
446
|
+
* the condition is not signaled in the allotted time, or a negative
|
447
|
+
* error code on failure; call SDL_GetError() for more information.
|
448
|
+
*
|
449
|
+
* \since This function is available since SDL 2.0.0.
|
233
450
|
*
|
234
|
-
*
|
235
|
-
*
|
451
|
+
* \sa SDL_CondBroadcast
|
452
|
+
* \sa SDL_CondSignal
|
453
|
+
* \sa SDL_CondWait
|
454
|
+
* \sa SDL_CreateCond
|
455
|
+
* \sa SDL_DestroyCond
|
236
456
|
*/
|
237
457
|
extern DECLSPEC int SDLCALL SDL_CondWaitTimeout(SDL_cond * cond,
|
238
458
|
SDL_mutex * mutex, Uint32 ms);
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/*
|
2
2
|
Simple DirectMedia Layer
|
3
|
-
Copyright (C) 1997-
|
3
|
+
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
|
4
4
|
|
5
5
|
This software is provided 'as-is', without any express or implied
|
6
6
|
warranty. In no event will the authors be held liable for any damages
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/*
|
2
2
|
Simple DirectMedia Layer
|
3
|
-
Copyright (C) 1997-
|
3
|
+
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
|
4
4
|
|
5
5
|
This software is provided 'as-is', without any express or implied
|
6
6
|
warranty. In no event will the authors be held liable for any damages
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/*
|
2
2
|
Simple DirectMedia Layer
|
3
|
-
Copyright (C) 1997-
|
3
|
+
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
|
4
4
|
|
5
5
|
This software is provided 'as-is', without any express or implied
|
6
6
|
warranty. In no event will the authors be held liable for any damages
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/*
|
2
2
|
Simple DirectMedia Layer
|
3
|
-
Copyright (C) 1997-
|
3
|
+
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
|
4
4
|
|
5
5
|
This software is provided 'as-is', without any express or implied
|
6
6
|
warranty. In no event will the authors be held liable for any damages
|
@@ -26,7 +26,7 @@
|
|
26
26
|
*/
|
27
27
|
#include "SDL_config.h"
|
28
28
|
|
29
|
-
#
|
29
|
+
#if !defined(_MSC_VER) && !defined(SDL_USE_BUILTIN_OPENGL_DEFINITIONS)
|
30
30
|
|
31
31
|
#ifdef __IPHONEOS__
|
32
32
|
#include <OpenGLES/ES2/gl.h>
|