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