alphatau 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Rakefile +11 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/ext/alphatau/native/alphatau_native.cpp +141 -0
- data/ext/alphatau/native/extconf.rb +18 -0
- data/ext/alphatau/native/sdl/Android.mk +110 -0
- data/ext/alphatau/native/sdl/BUGS.txt +16 -0
- data/ext/alphatau/native/sdl/CMakeLists.txt +1877 -0
- data/ext/alphatau/native/sdl/COPYING.txt +20 -0
- data/ext/alphatau/native/sdl/CREDITS.txt +53 -0
- data/ext/alphatau/native/sdl/INSTALL.txt +40 -0
- data/ext/alphatau/native/sdl/Makefile.in +240 -0
- data/ext/alphatau/native/sdl/Makefile.minimal +44 -0
- data/ext/alphatau/native/sdl/Makefile.pandora +60 -0
- data/ext/alphatau/native/sdl/Makefile.psp +95 -0
- data/ext/alphatau/native/sdl/Makefile.wiz +80 -0
- data/ext/alphatau/native/sdl/README-SDL.txt +13 -0
- data/ext/alphatau/native/sdl/README.txt +21 -0
- data/ext/alphatau/native/sdl/SDL2.spec.in +118 -0
- data/ext/alphatau/native/sdl/SDL2Config.cmake +1 -0
- data/ext/alphatau/native/sdl/TODO.txt +10 -0
- data/ext/alphatau/native/sdl/VisualC-WinRT/SDL2-WinRT.nuspec +23 -0
- data/ext/alphatau/native/sdl/VisualC-WinRT/SDL2-WinRT.targets +38 -0
- data/ext/alphatau/native/sdl/VisualC-WinRT/SDL2main-WinRT-NonXAML.nuspec +22 -0
- data/ext/alphatau/native/sdl/VisualC-WinRT/SDL2main-WinRT-NonXAML.targets +10 -0
- data/ext/alphatau/native/sdl/VisualC-WinRT/UWP_VS2015/SDL-UWP.sln +34 -0
- data/ext/alphatau/native/sdl/VisualC-WinRT/UWP_VS2015/SDL-UWP.vcxproj +575 -0
- data/ext/alphatau/native/sdl/VisualC-WinRT/UWP_VS2015/SDL-UWP.vcxproj.filters +774 -0
- data/ext/alphatau/native/sdl/VisualC-WinRT/WinPhone81_VS2013/SDL-WinPhone81.sln +28 -0
- data/ext/alphatau/native/sdl/VisualC-WinRT/WinPhone81_VS2013/SDL-WinPhone81.vcxproj +466 -0
- data/ext/alphatau/native/sdl/VisualC-WinRT/WinPhone81_VS2013/SDL-WinPhone81.vcxproj.filters +735 -0
- data/ext/alphatau/native/sdl/VisualC-WinRT/WinRT81_VS2013/SDL-WinRT81.sln +34 -0
- data/ext/alphatau/native/sdl/VisualC-WinRT/WinRT81_VS2013/SDL-WinRT81.vcxproj +571 -0
- data/ext/alphatau/native/sdl/VisualC-WinRT/WinRT81_VS2013/SDL-WinRT81.vcxproj.filters +771 -0
- data/ext/alphatau/native/sdl/VisualC-WinRT/tests/loopwave/Assets/Logo.png +0 -0
- data/ext/alphatau/native/sdl/VisualC-WinRT/tests/loopwave/Assets/SmallLogo.png +0 -0
- data/ext/alphatau/native/sdl/VisualC-WinRT/tests/loopwave/Assets/SplashScreen.png +0 -0
- data/ext/alphatau/native/sdl/VisualC-WinRT/tests/loopwave/Assets/StoreLogo.png +0 -0
- data/ext/alphatau/native/sdl/VisualC-WinRT/tests/loopwave/Package.appxmanifest +42 -0
- data/ext/alphatau/native/sdl/VisualC-WinRT/tests/loopwave/loopwave_VS2012.vcxproj +170 -0
- data/ext/alphatau/native/sdl/VisualC-WinRT/tests/loopwave/loopwave_VS2012_TemporaryKey.pfx +0 -0
- data/ext/alphatau/native/sdl/VisualC-WinRT/tests/testthread/Assets/Logo.png +0 -0
- data/ext/alphatau/native/sdl/VisualC-WinRT/tests/testthread/Assets/SmallLogo.png +0 -0
- data/ext/alphatau/native/sdl/VisualC-WinRT/tests/testthread/Assets/SplashScreen.png +0 -0
- data/ext/alphatau/native/sdl/VisualC-WinRT/tests/testthread/Assets/StoreLogo.png +0 -0
- data/ext/alphatau/native/sdl/VisualC-WinRT/tests/testthread/Package.appxmanifest +42 -0
- data/ext/alphatau/native/sdl/VisualC-WinRT/tests/testthread/testthread_VS2012.vcxproj +160 -0
- data/ext/alphatau/native/sdl/VisualC-WinRT/tests/testthread/testthread_VS2012_TemporaryKey.pfx +0 -0
- data/ext/alphatau/native/sdl/VisualC.html +146 -0
- data/ext/alphatau/native/sdl/VisualC/SDL.sln +291 -0
- data/ext/alphatau/native/sdl/VisualC/SDL/SDL.vcxproj +559 -0
- data/ext/alphatau/native/sdl/VisualC/SDL/SDL.vcxproj.filters +479 -0
- data/ext/alphatau/native/sdl/VisualC/SDLmain/SDLmain.vcxproj +162 -0
- data/ext/alphatau/native/sdl/VisualC/SDLtest/SDLtest.vcxproj +177 -0
- data/ext/alphatau/native/sdl/VisualC/clean.sh +4 -0
- data/ext/alphatau/native/sdl/VisualC/tests/checkkeys/checkkeys.vcxproj +218 -0
- data/ext/alphatau/native/sdl/VisualC/tests/controllermap/controllermap.vcxproj +259 -0
- data/ext/alphatau/native/sdl/VisualC/tests/loopwave/loopwave.vcxproj +229 -0
- data/ext/alphatau/native/sdl/VisualC/tests/testatomic/testatomic.vcxproj +203 -0
- data/ext/alphatau/native/sdl/VisualC/tests/testautomation/testautomation.vcxproj +230 -0
- data/ext/alphatau/native/sdl/VisualC/tests/testdraw2/testdraw2.vcxproj +209 -0
- data/ext/alphatau/native/sdl/VisualC/tests/testfile/testfile.vcxproj +203 -0
- data/ext/alphatau/native/sdl/VisualC/tests/testgamecontroller/testgamecontroller.vcxproj +259 -0
- data/ext/alphatau/native/sdl/VisualC/tests/testgesture/testgesture.vcxproj +203 -0
- data/ext/alphatau/native/sdl/VisualC/tests/testgl2/testgl2.vcxproj +213 -0
- data/ext/alphatau/native/sdl/VisualC/tests/testgles2/testgles2.vcxproj +209 -0
- data/ext/alphatau/native/sdl/VisualC/tests/testjoystick/testjoystick.vcxproj +203 -0
- data/ext/alphatau/native/sdl/VisualC/tests/testoverlay2/testoverlay2.vcxproj +224 -0
- data/ext/alphatau/native/sdl/VisualC/tests/testplatform/testplatform.vcxproj +231 -0
- data/ext/alphatau/native/sdl/VisualC/tests/testpower/testpower.vcxproj +203 -0
- data/ext/alphatau/native/sdl/VisualC/tests/testrendertarget/testrendertarget.vcxproj +247 -0
- data/ext/alphatau/native/sdl/VisualC/tests/testrumble/testrumble.vcxproj +203 -0
- data/ext/alphatau/native/sdl/VisualC/tests/testscale/testscale.vcxproj +247 -0
- data/ext/alphatau/native/sdl/VisualC/tests/testshape/testshape.vcxproj +203 -0
- data/ext/alphatau/native/sdl/VisualC/tests/testsprite2/testsprite2.vcxproj +229 -0
- data/ext/alphatau/native/sdl/VisualC/tests/testvulkan/testvulkan.vcxproj +203 -0
- data/ext/alphatau/native/sdl/VisualC/tests/testyuv/testyuv.vcxproj +233 -0
- data/ext/alphatau/native/sdl/VisualC/visualtest/unittest/testquit/testquit_VS2012.vcxproj +216 -0
- data/ext/alphatau/native/sdl/VisualC/visualtest/visualtest_VS2012.vcxproj +304 -0
- data/ext/alphatau/native/sdl/WhatsNew.txt +401 -0
- data/ext/alphatau/native/sdl/Xcode-iOS/Demos/Default.png +0 -0
- data/ext/alphatau/native/sdl/Xcode-iOS/Demos/Demos.xcodeproj/project.pbxproj +1299 -0
- data/ext/alphatau/native/sdl/Xcode-iOS/Demos/Icon.png +0 -0
- data/ext/alphatau/native/sdl/Xcode-iOS/Demos/Info.plist +32 -0
- data/ext/alphatau/native/sdl/Xcode-iOS/Demos/README +43 -0
- data/ext/alphatau/native/sdl/Xcode-iOS/Demos/data/bitmapfont/kromasky_16x16.bmp +0 -0
- data/ext/alphatau/native/sdl/Xcode-iOS/Demos/data/bitmapfont/license.txt +258 -0
- data/ext/alphatau/native/sdl/Xcode-iOS/Demos/data/drums/ds_brush_snare.wav +0 -0
- data/ext/alphatau/native/sdl/Xcode-iOS/Demos/data/drums/ds_china.wav +0 -0
- data/ext/alphatau/native/sdl/Xcode-iOS/Demos/data/drums/ds_kick_big_amb.wav +0 -0
- data/ext/alphatau/native/sdl/Xcode-iOS/Demos/data/drums/ds_loose_skin_mute.wav +0 -0
- data/ext/alphatau/native/sdl/Xcode-iOS/Demos/data/icon.bmp +0 -0
- data/ext/alphatau/native/sdl/Xcode-iOS/Demos/data/ship.bmp +0 -0
- data/ext/alphatau/native/sdl/Xcode-iOS/Demos/data/space.bmp +0 -0
- data/ext/alphatau/native/sdl/Xcode-iOS/Demos/data/stroke.bmp +0 -0
- data/ext/alphatau/native/sdl/Xcode-iOS/Demos/iOS Launch Screen.storyboard +40 -0
- data/ext/alphatau/native/sdl/Xcode-iOS/Demos/src/accelerometer.c +226 -0
- data/ext/alphatau/native/sdl/Xcode-iOS/Demos/src/common.c +56 -0
- data/ext/alphatau/native/sdl/Xcode-iOS/Demos/src/common.h +10 -0
- data/ext/alphatau/native/sdl/Xcode-iOS/Demos/src/fireworks.c +474 -0
- data/ext/alphatau/native/sdl/Xcode-iOS/Demos/src/happy.c +180 -0
- data/ext/alphatau/native/sdl/Xcode-iOS/Demos/src/keyboard.c +301 -0
- data/ext/alphatau/native/sdl/Xcode-iOS/Demos/src/mixer.c +344 -0
- data/ext/alphatau/native/sdl/Xcode-iOS/Demos/src/rectangles.c +92 -0
- data/ext/alphatau/native/sdl/Xcode-iOS/Demos/src/touch.c +129 -0
- data/ext/alphatau/native/sdl/Xcode-iOS/SDL/SDL.xcodeproj/project.pbxproj +2047 -0
- data/ext/alphatau/native/sdl/Xcode-iOS/SDLtest/SDL2test.xcodeproj/project.pbxproj +422 -0
- data/ext/alphatau/native/sdl/Xcode-iOS/Template/SDL iOS Application/Default-568h@2x.png +0 -0
- data/ext/alphatau/native/sdl/Xcode-iOS/Template/SDL iOS Application/Default.png +0 -0
- data/ext/alphatau/native/sdl/Xcode-iOS/Template/SDL iOS Application/Icon.png +0 -0
- data/ext/alphatau/native/sdl/Xcode-iOS/Template/SDL iOS Application/Info.plist +28 -0
- data/ext/alphatau/native/sdl/Xcode-iOS/Template/SDL iOS Application/___PROJECTNAME___.xcodeproj/TemplateIcon.icns +0 -0
- data/ext/alphatau/native/sdl/Xcode-iOS/Template/SDL iOS Application/___PROJECTNAME___.xcodeproj/TemplateInfo.plist +10 -0
- data/ext/alphatau/native/sdl/Xcode-iOS/Template/SDL iOS Application/___PROJECTNAME___.xcodeproj/project.pbxproj +308 -0
- data/ext/alphatau/native/sdl/Xcode-iOS/Template/SDL iOS Application/___PROJECTNAME___.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
- data/ext/alphatau/native/sdl/Xcode-iOS/Template/SDL iOS Application/main.c +100 -0
- data/ext/alphatau/native/sdl/Xcode-iOS/Test/Info.plist +26 -0
- data/ext/alphatau/native/sdl/Xcode-iOS/Test/README +11 -0
- data/ext/alphatau/native/sdl/Xcode-iOS/Test/TestiPhoneOS.xcodeproj/project.pbxproj +3095 -0
- data/ext/alphatau/native/sdl/Xcode/SDL/Info-Framework.plist +28 -0
- data/ext/alphatau/native/sdl/Xcode/SDL/SDL.xcodeproj/project.pbxproj +3384 -0
- data/ext/alphatau/native/sdl/Xcode/SDL/pkg-support/SDL.info +15 -0
- data/ext/alphatau/native/sdl/Xcode/SDL/pkg-support/resources/License.txt +19 -0
- data/ext/alphatau/native/sdl/Xcode/SDL/pkg-support/resources/ReadMe.txt +32 -0
- data/ext/alphatau/native/sdl/Xcode/SDL/pkg-support/resources/SDL_DS_Store +0 -0
- data/ext/alphatau/native/sdl/Xcode/SDL/pkg-support/sdl_logo.pdf +0 -0
- data/ext/alphatau/native/sdl/Xcode/SDLTest/SDLTest.xcodeproj/project.pbxproj +4995 -0
- data/ext/alphatau/native/sdl/Xcode/SDLTest/TestDropFile-Info.plist +35 -0
- data/ext/alphatau/native/sdl/Xcode/XcodeDocSet/Doxyfile +1558 -0
- data/ext/alphatau/native/sdl/acinclude/ac_check_define.m4 +14 -0
- data/ext/alphatau/native/sdl/acinclude/alsa.m4 +145 -0
- data/ext/alphatau/native/sdl/acinclude/ax_check_compiler_flags.m4 +76 -0
- data/ext/alphatau/native/sdl/acinclude/ax_gcc_archflag.m4 +215 -0
- data/ext/alphatau/native/sdl/acinclude/ax_gcc_x86_cpuid.m4.htm +79 -0
- data/ext/alphatau/native/sdl/acinclude/esd.m4 +168 -0
- data/ext/alphatau/native/sdl/acinclude/libtool.m4 +7998 -0
- data/ext/alphatau/native/sdl/acinclude/ltoptions.m4 +384 -0
- data/ext/alphatau/native/sdl/acinclude/ltsugar.m4 +123 -0
- data/ext/alphatau/native/sdl/acinclude/ltversion.m4 +23 -0
- data/ext/alphatau/native/sdl/acinclude/lt~obsolete.m4 +98 -0
- data/ext/alphatau/native/sdl/android-project-ant/AndroidManifest.xml +1 -0
- data/ext/alphatau/native/sdl/android-project-ant/ant.properties +17 -0
- data/ext/alphatau/native/sdl/android-project-ant/build.properties +17 -0
- data/ext/alphatau/native/sdl/android-project-ant/build.xml +93 -0
- data/ext/alphatau/native/sdl/android-project-ant/default.properties +11 -0
- data/ext/alphatau/native/sdl/android-project-ant/jni/Android.mk +1 -0
- data/ext/alphatau/native/sdl/android-project-ant/jni/Application.mk +10 -0
- data/ext/alphatau/native/sdl/android-project-ant/jni/src/Android.mk +18 -0
- data/ext/alphatau/native/sdl/android-project-ant/jni/src/Android_static.mk +12 -0
- data/ext/alphatau/native/sdl/android-project-ant/proguard-project.txt +20 -0
- data/ext/alphatau/native/sdl/android-project-ant/project.properties +14 -0
- data/ext/alphatau/native/sdl/android-project-ant/res/drawable-hdpi/ic_launcher.png +0 -0
- data/ext/alphatau/native/sdl/android-project-ant/res/drawable-mdpi/ic_launcher.png +0 -0
- data/ext/alphatau/native/sdl/android-project-ant/res/drawable-xhdpi/ic_launcher.png +0 -0
- data/ext/alphatau/native/sdl/android-project-ant/res/drawable-xxhdpi/ic_launcher.png +0 -0
- data/ext/alphatau/native/sdl/android-project-ant/res/layout/main.xml +13 -0
- data/ext/alphatau/native/sdl/android-project-ant/res/values/strings.xml +4 -0
- data/ext/alphatau/native/sdl/android-project-ant/src +1 -0
- data/ext/alphatau/native/sdl/android-project/app/build.gradle +69 -0
- data/ext/alphatau/native/sdl/android-project/app/jni/Android.mk +1 -0
- data/ext/alphatau/native/sdl/android-project/app/jni/Application.mk +9 -0
- data/ext/alphatau/native/sdl/android-project/app/jni/src/Android.mk +18 -0
- data/ext/alphatau/native/sdl/android-project/app/proguard-rules.pro +17 -0
- data/ext/alphatau/native/sdl/android-project/app/src/main/AndroidManifest.xml +77 -0
- data/ext/alphatau/native/sdl/android-project/app/src/main/java/org/libsdl/app/HIDDevice.java +19 -0
- data/ext/alphatau/native/sdl/android-project/app/src/main/java/org/libsdl/app/HIDDeviceBLESteamController.java +640 -0
- data/ext/alphatau/native/sdl/android-project/app/src/main/java/org/libsdl/app/HIDDeviceManager.java +624 -0
- data/ext/alphatau/native/sdl/android-project/app/src/main/java/org/libsdl/app/HIDDeviceUSB.java +298 -0
- data/ext/alphatau/native/sdl/android-project/app/src/main/java/org/libsdl/app/SDL.java +37 -0
- data/ext/alphatau/native/sdl/android-project/app/src/main/java/org/libsdl/app/SDLActivity.java +2103 -0
- data/ext/alphatau/native/sdl/android-project/app/src/main/java/org/libsdl/app/SDLAudioManager.java +178 -0
- data/ext/alphatau/native/sdl/android-project/app/src/main/java/org/libsdl/app/SDLControllerManager.java +812 -0
- data/ext/alphatau/native/sdl/android-project/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
- data/ext/alphatau/native/sdl/android-project/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
- data/ext/alphatau/native/sdl/android-project/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
- data/ext/alphatau/native/sdl/android-project/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
- data/ext/alphatau/native/sdl/android-project/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
- data/ext/alphatau/native/sdl/android-project/app/src/main/res/values/colors.xml +6 -0
- data/ext/alphatau/native/sdl/android-project/app/src/main/res/values/strings.xml +3 -0
- data/ext/alphatau/native/sdl/android-project/app/src/main/res/values/styles.xml +8 -0
- data/ext/alphatau/native/sdl/android-project/build.gradle +23 -0
- data/ext/alphatau/native/sdl/android-project/gradle.properties +17 -0
- data/ext/alphatau/native/sdl/android-project/gradle/wrapper/gradle-wrapper.jar +0 -0
- data/ext/alphatau/native/sdl/android-project/gradle/wrapper/gradle-wrapper.properties +6 -0
- data/ext/alphatau/native/sdl/android-project/gradlew +160 -0
- data/ext/alphatau/native/sdl/android-project/gradlew.bat +90 -0
- data/ext/alphatau/native/sdl/android-project/settings.gradle +1 -0
- data/ext/alphatau/native/sdl/autogen.sh +23 -0
- data/ext/alphatau/native/sdl/build-scripts/androidbuild.sh +100 -0
- data/ext/alphatau/native/sdl/build-scripts/androidbuildlibs.sh +74 -0
- data/ext/alphatau/native/sdl/build-scripts/checker-buildbot.sh +103 -0
- data/ext/alphatau/native/sdl/build-scripts/config.guess +1476 -0
- data/ext/alphatau/native/sdl/build-scripts/config.sub +1868 -0
- data/ext/alphatau/native/sdl/build-scripts/config.sub.patch +72 -0
- data/ext/alphatau/native/sdl/build-scripts/emscripten-buildbot.sh +77 -0
- data/ext/alphatau/native/sdl/build-scripts/g++-fat.sh +101 -0
- data/ext/alphatau/native/sdl/build-scripts/gcc-fat.sh +102 -0
- data/ext/alphatau/native/sdl/build-scripts/install-sh +323 -0
- data/ext/alphatau/native/sdl/build-scripts/iosbuild.sh +188 -0
- data/ext/alphatau/native/sdl/build-scripts/ltmain.sh +9658 -0
- data/ext/alphatau/native/sdl/build-scripts/mkinstalldirs +99 -0
- data/ext/alphatau/native/sdl/build-scripts/nacl-buildbot.sh +61 -0
- data/ext/alphatau/native/sdl/build-scripts/naclbuild.sh +105 -0
- data/ext/alphatau/native/sdl/build-scripts/raspberrypi-buildbot.sh +60 -0
- data/ext/alphatau/native/sdl/build-scripts/showrev.sh +5 -0
- data/ext/alphatau/native/sdl/build-scripts/strip_fPIC.sh +21 -0
- data/ext/alphatau/native/sdl/build-scripts/update-copyright.sh +8 -0
- data/ext/alphatau/native/sdl/build-scripts/updaterev.sh +20 -0
- data/ext/alphatau/native/sdl/build-scripts/windows-buildbot-zipper.bat +40 -0
- data/ext/alphatau/native/sdl/build-scripts/winrtbuild.bat +8 -0
- data/ext/alphatau/native/sdl/build-scripts/winrtbuild.ps1 +302 -0
- data/ext/alphatau/native/sdl/cmake/macros.cmake +73 -0
- data/ext/alphatau/native/sdl/cmake/sdlchecks.cmake +1184 -0
- data/ext/alphatau/native/sdl/cmake_uninstall.cmake.in +18 -0
- data/ext/alphatau/native/sdl/configure +27540 -0
- data/ext/alphatau/native/sdl/configure.in +4236 -0
- data/ext/alphatau/native/sdl/debian/changelog +114 -0
- data/ext/alphatau/native/sdl/debian/compat +1 -0
- data/ext/alphatau/native/sdl/debian/control +76 -0
- data/ext/alphatau/native/sdl/debian/copyright +351 -0
- data/ext/alphatau/native/sdl/debian/docs +4 -0
- data/ext/alphatau/native/sdl/debian/libsdl2-dev.install +8 -0
- data/ext/alphatau/native/sdl/debian/libsdl2-dev.manpages +1 -0
- data/ext/alphatau/native/sdl/debian/libsdl2.install +1 -0
- data/ext/alphatau/native/sdl/debian/rules +41 -0
- data/ext/alphatau/native/sdl/debian/sdl2-config.1 +86 -0
- data/ext/alphatau/native/sdl/debian/source/format +1 -0
- data/ext/alphatau/native/sdl/debian/watch +2 -0
- data/ext/alphatau/native/sdl/docs/README-android.md +432 -0
- data/ext/alphatau/native/sdl/docs/README-cmake.md +32 -0
- data/ext/alphatau/native/sdl/docs/README-directfb.md +107 -0
- data/ext/alphatau/native/sdl/docs/README-dynapi.md +130 -0
- data/ext/alphatau/native/sdl/docs/README-emscripten.md +35 -0
- data/ext/alphatau/native/sdl/docs/README-gesture.md +71 -0
- data/ext/alphatau/native/sdl/docs/README-hg.md +22 -0
- data/ext/alphatau/native/sdl/docs/README-ios.md +284 -0
- data/ext/alphatau/native/sdl/docs/README-linux.md +90 -0
- data/ext/alphatau/native/sdl/docs/README-macosx.md +240 -0
- data/ext/alphatau/native/sdl/docs/README-nacl.md +103 -0
- data/ext/alphatau/native/sdl/docs/README-pandora.md +17 -0
- data/ext/alphatau/native/sdl/docs/README-platforms.md +8 -0
- data/ext/alphatau/native/sdl/docs/README-porting.md +68 -0
- data/ext/alphatau/native/sdl/docs/README-psp.md +19 -0
- data/ext/alphatau/native/sdl/docs/README-raspberrypi.md +188 -0
- data/ext/alphatau/native/sdl/docs/README-touch.md +86 -0
- data/ext/alphatau/native/sdl/docs/README-wince.md +10 -0
- data/ext/alphatau/native/sdl/docs/README-windows.md +45 -0
- data/ext/alphatau/native/sdl/docs/README-winrt.md +544 -0
- data/ext/alphatau/native/sdl/docs/README.md +63 -0
- data/ext/alphatau/native/sdl/docs/doxyfile +1560 -0
- data/ext/alphatau/native/sdl/include/SDL.h +135 -0
- data/ext/alphatau/native/sdl/include/SDL_assert.h +291 -0
- data/ext/alphatau/native/sdl/include/SDL_atomic.h +277 -0
- data/ext/alphatau/native/sdl/include/SDL_audio.h +825 -0
- data/ext/alphatau/native/sdl/include/SDL_bits.h +112 -0
- data/ext/alphatau/native/sdl/include/SDL_blendmode.h +120 -0
- data/ext/alphatau/native/sdl/include/SDL_clipboard.h +71 -0
- data/ext/alphatau/native/sdl/include/SDL_config.h +53 -0
- data/ext/alphatau/native/sdl/include/SDL_config.h.cmake +471 -0
- data/ext/alphatau/native/sdl/include/SDL_config.h.in +417 -0
- data/ext/alphatau/native/sdl/include/SDL_config_android.h +177 -0
- data/ext/alphatau/native/sdl/include/SDL_config_iphoneos.h +201 -0
- data/ext/alphatau/native/sdl/include/SDL_config_macosx.h +240 -0
- data/ext/alphatau/native/sdl/include/SDL_config_minimal.h +85 -0
- data/ext/alphatau/native/sdl/include/SDL_config_pandora.h +133 -0
- data/ext/alphatau/native/sdl/include/SDL_config_psp.h +164 -0
- data/ext/alphatau/native/sdl/include/SDL_config_windows.h +254 -0
- data/ext/alphatau/native/sdl/include/SDL_config_winrt.h +235 -0
- data/ext/alphatau/native/sdl/include/SDL_config_wiz.h +146 -0
- data/ext/alphatau/native/sdl/include/SDL_copying.h +20 -0
- data/ext/alphatau/native/sdl/include/SDL_cpuinfo.h +188 -0
- data/ext/alphatau/native/sdl/include/SDL_egl.h +1673 -0
- data/ext/alphatau/native/sdl/include/SDL_endian.h +260 -0
- data/ext/alphatau/native/sdl/include/SDL_error.h +76 -0
- data/ext/alphatau/native/sdl/include/SDL_events.h +788 -0
- data/ext/alphatau/native/sdl/include/SDL_filesystem.h +136 -0
- data/ext/alphatau/native/sdl/include/SDL_gamecontroller.h +383 -0
- data/ext/alphatau/native/sdl/include/SDL_gesture.h +87 -0
- data/ext/alphatau/native/sdl/include/SDL_haptic.h +1227 -0
- data/ext/alphatau/native/sdl/include/SDL_hints.h +1106 -0
- data/ext/alphatau/native/sdl/include/SDL_joystick.h +395 -0
- data/ext/alphatau/native/sdl/include/SDL_keyboard.h +217 -0
- data/ext/alphatau/native/sdl/include/SDL_keycode.h +349 -0
- data/ext/alphatau/native/sdl/include/SDL_loadso.h +81 -0
- data/ext/alphatau/native/sdl/include/SDL_log.h +211 -0
- data/ext/alphatau/native/sdl/include/SDL_main.h +168 -0
- data/ext/alphatau/native/sdl/include/SDL_messagebox.h +144 -0
- data/ext/alphatau/native/sdl/include/SDL_mouse.h +302 -0
- data/ext/alphatau/native/sdl/include/SDL_mutex.h +251 -0
- data/ext/alphatau/native/sdl/include/SDL_name.h +33 -0
- data/ext/alphatau/native/sdl/include/SDL_opengl.h +2183 -0
- data/ext/alphatau/native/sdl/include/SDL_opengl_glext.h +11177 -0
- data/ext/alphatau/native/sdl/include/SDL_opengles.h +39 -0
- data/ext/alphatau/native/sdl/include/SDL_opengles2.h +52 -0
- data/ext/alphatau/native/sdl/include/SDL_opengles2_gl2.h +621 -0
- data/ext/alphatau/native/sdl/include/SDL_opengles2_gl2ext.h +2050 -0
- data/ext/alphatau/native/sdl/include/SDL_opengles2_gl2platform.h +30 -0
- data/ext/alphatau/native/sdl/include/SDL_opengles2_khrplatform.h +282 -0
- data/ext/alphatau/native/sdl/include/SDL_pixels.h +470 -0
- data/ext/alphatau/native/sdl/include/SDL_platform.h +198 -0
- data/ext/alphatau/native/sdl/include/SDL_power.h +75 -0
- data/ext/alphatau/native/sdl/include/SDL_quit.h +58 -0
- data/ext/alphatau/native/sdl/include/SDL_rect.h +148 -0
- data/ext/alphatau/native/sdl/include/SDL_render.h +931 -0
- data/ext/alphatau/native/sdl/include/SDL_revision.h +2 -0
- data/ext/alphatau/native/sdl/include/SDL_rwops.h +254 -0
- data/ext/alphatau/native/sdl/include/SDL_scancode.h +413 -0
- data/ext/alphatau/native/sdl/include/SDL_sensor.h +251 -0
- data/ext/alphatau/native/sdl/include/SDL_shape.h +144 -0
- data/ext/alphatau/native/sdl/include/SDL_stdinc.h +607 -0
- data/ext/alphatau/native/sdl/include/SDL_surface.h +546 -0
- data/ext/alphatau/native/sdl/include/SDL_system.h +279 -0
- data/ext/alphatau/native/sdl/include/SDL_syswm.h +324 -0
- data/ext/alphatau/native/sdl/include/SDL_test.h +69 -0
- data/ext/alphatau/native/sdl/include/SDL_test_assert.h +105 -0
- data/ext/alphatau/native/sdl/include/SDL_test_common.h +188 -0
- data/ext/alphatau/native/sdl/include/SDL_test_compare.h +69 -0
- data/ext/alphatau/native/sdl/include/SDL_test_crc32.h +124 -0
- data/ext/alphatau/native/sdl/include/SDL_test_font.h +81 -0
- data/ext/alphatau/native/sdl/include/SDL_test_fuzzer.h +384 -0
- data/ext/alphatau/native/sdl/include/SDL_test_harness.h +134 -0
- data/ext/alphatau/native/sdl/include/SDL_test_images.h +78 -0
- data/ext/alphatau/native/sdl/include/SDL_test_log.h +67 -0
- data/ext/alphatau/native/sdl/include/SDL_test_md5.h +129 -0
- data/ext/alphatau/native/sdl/include/SDL_test_memory.h +63 -0
- data/ext/alphatau/native/sdl/include/SDL_test_random.h +115 -0
- data/ext/alphatau/native/sdl/include/SDL_thread.h +309 -0
- data/ext/alphatau/native/sdl/include/SDL_timer.h +115 -0
- data/ext/alphatau/native/sdl/include/SDL_touch.h +86 -0
- data/ext/alphatau/native/sdl/include/SDL_types.h +29 -0
- data/ext/alphatau/native/sdl/include/SDL_version.h +162 -0
- data/ext/alphatau/native/sdl/include/SDL_video.h +1276 -0
- data/ext/alphatau/native/sdl/include/SDL_vulkan.h +278 -0
- data/ext/alphatau/native/sdl/include/begin_code.h +167 -0
- data/ext/alphatau/native/sdl/include/close_code.h +37 -0
- data/ext/alphatau/native/sdl/sdl2-config.cmake.in +11 -0
- data/ext/alphatau/native/sdl/sdl2-config.in +60 -0
- data/ext/alphatau/native/sdl/sdl2.m4 +234 -0
- data/ext/alphatau/native/sdl/sdl2.pc.in +15 -0
- data/ext/alphatau/native/sdl/src/SDL.c +514 -0
- data/ext/alphatau/native/sdl/src/SDL_assert.c +451 -0
- data/ext/alphatau/native/sdl/src/SDL_assert_c.h +24 -0
- data/ext/alphatau/native/sdl/src/SDL_dataqueue.c +339 -0
- data/ext/alphatau/native/sdl/src/SDL_dataqueue.h +55 -0
- data/ext/alphatau/native/sdl/src/SDL_error.c +319 -0
- data/ext/alphatau/native/sdl/src/SDL_error_c.h +65 -0
- data/ext/alphatau/native/sdl/src/SDL_hints.c +236 -0
- data/ext/alphatau/native/sdl/src/SDL_internal.h +52 -0
- data/ext/alphatau/native/sdl/src/SDL_log.c +450 -0
- data/ext/alphatau/native/sdl/src/atomic/SDL_atomic.c +303 -0
- data/ext/alphatau/native/sdl/src/atomic/SDL_spinlock.c +176 -0
- data/ext/alphatau/native/sdl/src/audio/SDL_audio.c +1647 -0
- data/ext/alphatau/native/sdl/src/audio/SDL_audio_c.h +79 -0
- data/ext/alphatau/native/sdl/src/audio/SDL_audiocvt.c +1673 -0
- data/ext/alphatau/native/sdl/src/audio/SDL_audiodev.c +124 -0
- data/ext/alphatau/native/sdl/src/audio/SDL_audiodev_c.h +38 -0
- data/ext/alphatau/native/sdl/src/audio/SDL_audiotypecvt.c +1430 -0
- data/ext/alphatau/native/sdl/src/audio/SDL_mixer.c +369 -0
- data/ext/alphatau/native/sdl/src/audio/SDL_sysaudio.h +211 -0
- data/ext/alphatau/native/sdl/src/audio/SDL_wave.c +694 -0
- data/ext/alphatau/native/sdl/src/audio/SDL_wave.h +77 -0
- data/ext/alphatau/native/sdl/src/audio/alsa/SDL_alsa_audio.c +990 -0
- data/ext/alphatau/native/sdl/src/audio/alsa/SDL_alsa_audio.h +48 -0
- data/ext/alphatau/native/sdl/src/audio/android/SDL_androidaudio.c +226 -0
- data/ext/alphatau/native/sdl/src/audio/android/SDL_androidaudio.h +42 -0
- data/ext/alphatau/native/sdl/src/audio/arts/SDL_artsaudio.c +365 -0
- data/ext/alphatau/native/sdl/src/audio/arts/SDL_artsaudio.h +53 -0
- data/ext/alphatau/native/sdl/src/audio/coreaudio/SDL_coreaudio.h +66 -0
- data/ext/alphatau/native/sdl/src/audio/coreaudio/SDL_coreaudio.m +861 -0
- data/ext/alphatau/native/sdl/src/audio/directsound/SDL_directsound.c +604 -0
- data/ext/alphatau/native/sdl/src/audio/directsound/SDL_directsound.h +47 -0
- data/ext/alphatau/native/sdl/src/audio/disk/SDL_diskaudio.c +207 -0
- data/ext/alphatau/native/sdl/src/audio/disk/SDL_diskaudio.h +41 -0
- data/ext/alphatau/native/sdl/src/audio/dsp/SDL_dspaudio.c +320 -0
- data/ext/alphatau/native/sdl/src/audio/dsp/SDL_dspaudio.h +43 -0
- data/ext/alphatau/native/sdl/src/audio/dummy/SDL_dummyaudio.c +65 -0
- data/ext/alphatau/native/sdl/src/audio/dummy/SDL_dummyaudio.h +41 -0
- data/ext/alphatau/native/sdl/src/audio/emscripten/SDL_emscriptenaudio.c +379 -0
- data/ext/alphatau/native/sdl/src/audio/emscripten/SDL_emscriptenaudio.h +38 -0
- data/ext/alphatau/native/sdl/src/audio/esd/SDL_esdaudio.c +335 -0
- data/ext/alphatau/native/sdl/src/audio/esd/SDL_esdaudio.h +51 -0
- data/ext/alphatau/native/sdl/src/audio/fusionsound/SDL_fsaudio.c +328 -0
- data/ext/alphatau/native/sdl/src/audio/fusionsound/SDL_fsaudio.h +50 -0
- data/ext/alphatau/native/sdl/src/audio/haiku/SDL_haikuaudio.cc +248 -0
- data/ext/alphatau/native/sdl/src/audio/haiku/SDL_haikuaudio.h +38 -0
- data/ext/alphatau/native/sdl/src/audio/jack/SDL_jackaudio.c +446 -0
- data/ext/alphatau/native/sdl/src/audio/jack/SDL_jackaudio.h +41 -0
- data/ext/alphatau/native/sdl/src/audio/nacl/SDL_naclaudio.c +165 -0
- data/ext/alphatau/native/sdl/src/audio/nacl/SDL_naclaudio.h +43 -0
- data/ext/alphatau/native/sdl/src/audio/nas/SDL_nasaudio.c +463 -0
- data/ext/alphatau/native/sdl/src/audio/nas/SDL_nasaudio.h +56 -0
- data/ext/alphatau/native/sdl/src/audio/netbsd/SDL_netbsdaudio.c +412 -0
- data/ext/alphatau/native/sdl/src/audio/netbsd/SDL_netbsdaudio.h +48 -0
- data/ext/alphatau/native/sdl/src/audio/paudio/SDL_paudio.c +516 -0
- data/ext/alphatau/native/sdl/src/audio/paudio/SDL_paudio.h +48 -0
- data/ext/alphatau/native/sdl/src/audio/psp/SDL_pspaudio.c +181 -0
- data/ext/alphatau/native/sdl/src/audio/psp/SDL_pspaudio.h +45 -0
- data/ext/alphatau/native/sdl/src/audio/pulseaudio/SDL_pulseaudio.c +782 -0
- data/ext/alphatau/native/sdl/src/audio/pulseaudio/SDL_pulseaudio.h +52 -0
- data/ext/alphatau/native/sdl/src/audio/qsa/SDL_qsa_audio.c +666 -0
- data/ext/alphatau/native/sdl/src/audio/qsa/SDL_qsa_audio.h +57 -0
- data/ext/alphatau/native/sdl/src/audio/sndio/SDL_sndioaudio.c +382 -0
- data/ext/alphatau/native/sdl/src/audio/sndio/SDL_sndioaudio.h +49 -0
- data/ext/alphatau/native/sdl/src/audio/sun/SDL_sunaudio.c +419 -0
- data/ext/alphatau/native/sdl/src/audio/sun/SDL_sunaudio.h +47 -0
- data/ext/alphatau/native/sdl/src/audio/wasapi/SDL_wasapi.c +779 -0
- data/ext/alphatau/native/sdl/src/audio/wasapi/SDL_wasapi.h +85 -0
- data/ext/alphatau/native/sdl/src/audio/wasapi/SDL_wasapi_win32.c +417 -0
- data/ext/alphatau/native/sdl/src/audio/wasapi/SDL_wasapi_winrt.cpp +276 -0
- data/ext/alphatau/native/sdl/src/audio/winmm/SDL_winmm.c +457 -0
- data/ext/alphatau/native/sdl/src/audio/winmm/SDL_winmm.h +45 -0
- data/ext/alphatau/native/sdl/src/core/android/SDL_android.c +2285 -0
- data/ext/alphatau/native/sdl/src/core/android/SDL_android.h +122 -0
- data/ext/alphatau/native/sdl/src/core/android/keyinfotable.h +175 -0
- data/ext/alphatau/native/sdl/src/core/linux/SDL_dbus.c +347 -0
- data/ext/alphatau/native/sdl/src/core/linux/SDL_dbus.h +97 -0
- data/ext/alphatau/native/sdl/src/core/linux/SDL_evdev.c +698 -0
- data/ext/alphatau/native/sdl/src/core/linux/SDL_evdev.h +39 -0
- data/ext/alphatau/native/sdl/src/core/linux/SDL_evdev_kbd.c +840 -0
- data/ext/alphatau/native/sdl/src/core/linux/SDL_evdev_kbd.h +29 -0
- data/ext/alphatau/native/sdl/src/core/linux/SDL_evdev_kbd_default_accents.h +284 -0
- data/ext/alphatau/native/sdl/src/core/linux/SDL_evdev_kbd_default_keymap.h +4763 -0
- data/ext/alphatau/native/sdl/src/core/linux/SDL_fcitx.c +373 -0
- data/ext/alphatau/native/sdl/src/core/linux/SDL_fcitx.h +40 -0
- data/ext/alphatau/native/sdl/src/core/linux/SDL_ibus.c +584 -0
- data/ext/alphatau/native/sdl/src/core/linux/SDL_ibus.h +58 -0
- data/ext/alphatau/native/sdl/src/core/linux/SDL_ime.c +152 -0
- data/ext/alphatau/native/sdl/src/core/linux/SDL_ime.h +40 -0
- data/ext/alphatau/native/sdl/src/core/linux/SDL_udev.c +553 -0
- data/ext/alphatau/native/sdl/src/core/linux/SDL_udev.h +121 -0
- data/ext/alphatau/native/sdl/src/core/unix/SDL_poll.c +87 -0
- data/ext/alphatau/native/sdl/src/core/unix/SDL_poll.h +34 -0
- data/ext/alphatau/native/sdl/src/core/windows/SDL_directx.h +111 -0
- data/ext/alphatau/native/sdl/src/core/windows/SDL_windows.c +233 -0
- data/ext/alphatau/native/sdl/src/core/windows/SDL_windows.h +75 -0
- data/ext/alphatau/native/sdl/src/core/windows/SDL_xinput.c +139 -0
- data/ext/alphatau/native/sdl/src/core/windows/SDL_xinput.h +177 -0
- data/ext/alphatau/native/sdl/src/core/winrt/SDL_winrtapp_common.cpp +66 -0
- data/ext/alphatau/native/sdl/src/core/winrt/SDL_winrtapp_common.h +31 -0
- data/ext/alphatau/native/sdl/src/core/winrt/SDL_winrtapp_direct3d.cpp +855 -0
- data/ext/alphatau/native/sdl/src/core/winrt/SDL_winrtapp_direct3d.h +92 -0
- data/ext/alphatau/native/sdl/src/core/winrt/SDL_winrtapp_xaml.cpp +160 -0
- data/ext/alphatau/native/sdl/src/core/winrt/SDL_winrtapp_xaml.h +33 -0
- data/ext/alphatau/native/sdl/src/cpuinfo/SDL_cpuinfo.c +855 -0
- data/ext/alphatau/native/sdl/src/cpuinfo/SDL_simd.h +88 -0
- data/ext/alphatau/native/sdl/src/dynapi/SDL_dynapi.c +331 -0
- data/ext/alphatau/native/sdl/src/dynapi/SDL_dynapi.h +67 -0
- data/ext/alphatau/native/sdl/src/dynapi/SDL_dynapi_overrides.h +698 -0
- data/ext/alphatau/native/sdl/src/dynapi/SDL_dynapi_procs.h +740 -0
- data/ext/alphatau/native/sdl/src/dynapi/gendynapi.pl +141 -0
- data/ext/alphatau/native/sdl/src/events/SDL_clipboardevents.c +46 -0
- data/ext/alphatau/native/sdl/src/events/SDL_clipboardevents_c.h +30 -0
- data/ext/alphatau/native/sdl/src/events/SDL_displayevents.c +60 -0
- data/ext/alphatau/native/sdl/src/events/SDL_displayevents_c.h +30 -0
- data/ext/alphatau/native/sdl/src/events/SDL_dropevents.c +98 -0
- data/ext/alphatau/native/sdl/src/events/SDL_dropevents_c.h +32 -0
- data/ext/alphatau/native/sdl/src/events/SDL_events.c +976 -0
- data/ext/alphatau/native/sdl/src/events/SDL_events_c.h +52 -0
- data/ext/alphatau/native/sdl/src/events/SDL_gesture.c +700 -0
- data/ext/alphatau/native/sdl/src/events/SDL_gesture_c.h +35 -0
- data/ext/alphatau/native/sdl/src/events/SDL_keyboard.c +1033 -0
- data/ext/alphatau/native/sdl/src/events/SDL_keyboard_c.h +70 -0
- data/ext/alphatau/native/sdl/src/events/SDL_mouse.c +1031 -0
- data/ext/alphatau/native/sdl/src/events/SDL_mouse_c.h +141 -0
- data/ext/alphatau/native/sdl/src/events/SDL_quit.c +152 -0
- data/ext/alphatau/native/sdl/src/events/SDL_sysevents.h +36 -0
- data/ext/alphatau/native/sdl/src/events/SDL_touch.c +375 -0
- data/ext/alphatau/native/sdl/src/events/SDL_touch_c.h +61 -0
- data/ext/alphatau/native/sdl/src/events/SDL_windowevents.c +227 -0
- data/ext/alphatau/native/sdl/src/events/SDL_windowevents_c.h +31 -0
- data/ext/alphatau/native/sdl/src/events/blank_cursor.h +33 -0
- data/ext/alphatau/native/sdl/src/events/default_cursor.h +114 -0
- data/ext/alphatau/native/sdl/src/events/scancodes_darwin.h +159 -0
- data/ext/alphatau/native/sdl/src/events/scancodes_linux.h +263 -0
- data/ext/alphatau/native/sdl/src/events/scancodes_windows.h +55 -0
- data/ext/alphatau/native/sdl/src/events/scancodes_xfree86.h +506 -0
- data/ext/alphatau/native/sdl/src/file/SDL_rwops.c +867 -0
- data/ext/alphatau/native/sdl/src/file/cocoa/SDL_rwopsbundlesupport.h +30 -0
- data/ext/alphatau/native/sdl/src/file/cocoa/SDL_rwopsbundlesupport.m +62 -0
- data/ext/alphatau/native/sdl/src/filesystem/android/SDL_sysfilesystem.c +62 -0
- data/ext/alphatau/native/sdl/src/filesystem/cocoa/SDL_sysfilesystem.m +117 -0
- data/ext/alphatau/native/sdl/src/filesystem/dummy/SDL_sysfilesystem.c +47 -0
- data/ext/alphatau/native/sdl/src/filesystem/emscripten/SDL_sysfilesystem.c +81 -0
- data/ext/alphatau/native/sdl/src/filesystem/haiku/SDL_sysfilesystem.cc +110 -0
- data/ext/alphatau/native/sdl/src/filesystem/nacl/SDL_sysfilesystem.c +43 -0
- data/ext/alphatau/native/sdl/src/filesystem/unix/SDL_sysfilesystem.c +250 -0
- data/ext/alphatau/native/sdl/src/filesystem/windows/SDL_sysfilesystem.c +192 -0
- data/ext/alphatau/native/sdl/src/filesystem/winrt/SDL_sysfilesystem.cpp +233 -0
- data/ext/alphatau/native/sdl/src/haptic/SDL_haptic.c +850 -0
- data/ext/alphatau/native/sdl/src/haptic/SDL_haptic_c.h +25 -0
- data/ext/alphatau/native/sdl/src/haptic/SDL_syshaptic.h +208 -0
- data/ext/alphatau/native/sdl/src/haptic/android/SDL_syshaptic.c +358 -0
- data/ext/alphatau/native/sdl/src/haptic/android/SDL_syshaptic_c.h +12 -0
- data/ext/alphatau/native/sdl/src/haptic/darwin/SDL_syshaptic.c +1417 -0
- data/ext/alphatau/native/sdl/src/haptic/darwin/SDL_syshaptic_c.h +26 -0
- data/ext/alphatau/native/sdl/src/haptic/dummy/SDL_syshaptic.c +186 -0
- data/ext/alphatau/native/sdl/src/haptic/linux/SDL_syshaptic.c +1165 -0
- data/ext/alphatau/native/sdl/src/haptic/windows/SDL_dinputhaptic.c +1305 -0
- data/ext/alphatau/native/sdl/src/haptic/windows/SDL_dinputhaptic_c.h +47 -0
- data/ext/alphatau/native/sdl/src/haptic/windows/SDL_windowshaptic.c +456 -0
- data/ext/alphatau/native/sdl/src/haptic/windows/SDL_windowshaptic_c.h +88 -0
- data/ext/alphatau/native/sdl/src/haptic/windows/SDL_xinputhaptic.c +487 -0
- data/ext/alphatau/native/sdl/src/haptic/windows/SDL_xinputhaptic_c.h +47 -0
- data/ext/alphatau/native/sdl/src/hidapi/AUTHORS.txt +16 -0
- data/ext/alphatau/native/sdl/src/hidapi/HACKING.txt +15 -0
- data/ext/alphatau/native/sdl/src/hidapi/LICENSE-bsd.txt +26 -0
- data/ext/alphatau/native/sdl/src/hidapi/LICENSE-gpl3.txt +674 -0
- data/ext/alphatau/native/sdl/src/hidapi/LICENSE-orig.txt +9 -0
- data/ext/alphatau/native/sdl/src/hidapi/LICENSE.txt +13 -0
- data/ext/alphatau/native/sdl/src/hidapi/Makefile.am +85 -0
- data/ext/alphatau/native/sdl/src/hidapi/README.txt +339 -0
- data/ext/alphatau/native/sdl/src/hidapi/android/hid.cpp +1079 -0
- data/ext/alphatau/native/sdl/src/hidapi/android/jni/Android.mk +16 -0
- data/ext/alphatau/native/sdl/src/hidapi/android/jni/Application.mk +2 -0
- data/ext/alphatau/native/sdl/src/hidapi/android/project.properties +14 -0
- data/ext/alphatau/native/sdl/src/hidapi/bootstrap +2 -0
- data/ext/alphatau/native/sdl/src/hidapi/configure.ac +236 -0
- data/ext/alphatau/native/sdl/src/hidapi/doxygen/Doxyfile +1630 -0
- data/ext/alphatau/native/sdl/src/hidapi/hidapi/hidapi.h +398 -0
- data/ext/alphatau/native/sdl/src/hidapi/hidtest/Makefile.am +20 -0
- data/ext/alphatau/native/sdl/src/hidapi/hidtest/hidtest.cpp +194 -0
- data/ext/alphatau/native/sdl/src/hidapi/ios/Makefile-manual +32 -0
- data/ext/alphatau/native/sdl/src/hidapi/ios/Makefile.am +9 -0
- data/ext/alphatau/native/sdl/src/hidapi/ios/hid.m +909 -0
- data/ext/alphatau/native/sdl/src/hidapi/libusb/Makefile-manual +18 -0
- data/ext/alphatau/native/sdl/src/hidapi/libusb/Makefile.am +27 -0
- data/ext/alphatau/native/sdl/src/hidapi/libusb/Makefile.freebsd +46 -0
- data/ext/alphatau/native/sdl/src/hidapi/libusb/Makefile.linux +49 -0
- data/ext/alphatau/native/sdl/src/hidapi/libusb/hid.c +1615 -0
- data/ext/alphatau/native/sdl/src/hidapi/libusb/hidusb.cpp +3 -0
- data/ext/alphatau/native/sdl/src/hidapi/linux/Makefile-manual +49 -0
- data/ext/alphatau/native/sdl/src/hidapi/linux/Makefile.am +10 -0
- data/ext/alphatau/native/sdl/src/hidapi/linux/README.txt +59 -0
- data/ext/alphatau/native/sdl/src/hidapi/linux/hid.c +893 -0
- data/ext/alphatau/native/sdl/src/hidapi/linux/hid.cpp +333 -0
- data/ext/alphatau/native/sdl/src/hidapi/linux/hidraw.cpp +3 -0
- data/ext/alphatau/native/sdl/src/hidapi/m4/ax_pthread.m4 +309 -0
- data/ext/alphatau/native/sdl/src/hidapi/m4/pkg.m4 +157 -0
- data/ext/alphatau/native/sdl/src/hidapi/mac/Makefile-manual +32 -0
- data/ext/alphatau/native/sdl/src/hidapi/mac/Makefile.am +9 -0
- data/ext/alphatau/native/sdl/src/hidapi/mac/hid.c +1186 -0
- data/ext/alphatau/native/sdl/src/hidapi/pc/hidapi-hidraw.pc.in +10 -0
- data/ext/alphatau/native/sdl/src/hidapi/pc/hidapi-libusb.pc.in +10 -0
- data/ext/alphatau/native/sdl/src/hidapi/pc/hidapi.pc.in +10 -0
- data/ext/alphatau/native/sdl/src/hidapi/testgui/Makefile-manual +26 -0
- data/ext/alphatau/native/sdl/src/hidapi/testgui/Makefile.am +43 -0
- data/ext/alphatau/native/sdl/src/hidapi/testgui/Makefile.freebsd +33 -0
- data/ext/alphatau/native/sdl/src/hidapi/testgui/Makefile.linux +32 -0
- data/ext/alphatau/native/sdl/src/hidapi/testgui/Makefile.mac +46 -0
- data/ext/alphatau/native/sdl/src/hidapi/testgui/Makefile.mingw +32 -0
- data/ext/alphatau/native/sdl/src/hidapi/testgui/TestGUI.app.in/Contents/Info.plist +28 -0
- data/ext/alphatau/native/sdl/src/hidapi/testgui/TestGUI.app.in/Contents/PkgInfo +1 -0
- data/ext/alphatau/native/sdl/src/hidapi/testgui/TestGUI.app.in/Contents/Resources/English.lproj/InfoPlist.strings +0 -0
- data/ext/alphatau/native/sdl/src/hidapi/testgui/TestGUI.app.in/Contents/Resources/Signal11.icns +0 -0
- data/ext/alphatau/native/sdl/src/hidapi/testgui/copy_to_bundle.sh +97 -0
- data/ext/alphatau/native/sdl/src/hidapi/testgui/mac_support.cpp +134 -0
- data/ext/alphatau/native/sdl/src/hidapi/testgui/mac_support.h +17 -0
- data/ext/alphatau/native/sdl/src/hidapi/testgui/mac_support_cocoa.m +94 -0
- data/ext/alphatau/native/sdl/src/hidapi/testgui/start.sh +2 -0
- data/ext/alphatau/native/sdl/src/hidapi/testgui/test.cpp +532 -0
- data/ext/alphatau/native/sdl/src/hidapi/testgui/testgui.sln +20 -0
- data/ext/alphatau/native/sdl/src/hidapi/testgui/testgui.vcproj +217 -0
- data/ext/alphatau/native/sdl/src/hidapi/udev/99-hid.rules +33 -0
- data/ext/alphatau/native/sdl/src/hidapi/windows/Makefile-manual +14 -0
- data/ext/alphatau/native/sdl/src/hidapi/windows/Makefile.am +16 -0
- data/ext/alphatau/native/sdl/src/hidapi/windows/Makefile.mingw +35 -0
- data/ext/alphatau/native/sdl/src/hidapi/windows/ddk_build/hidapi.def +17 -0
- data/ext/alphatau/native/sdl/src/hidapi/windows/ddk_build/makefile +49 -0
- data/ext/alphatau/native/sdl/src/hidapi/windows/ddk_build/sources +23 -0
- data/ext/alphatau/native/sdl/src/hidapi/windows/hid.c +983 -0
- data/ext/alphatau/native/sdl/src/hidapi/windows/hidapi.sln +29 -0
- data/ext/alphatau/native/sdl/src/hidapi/windows/hidapi.vcproj +201 -0
- data/ext/alphatau/native/sdl/src/hidapi/windows/hidtest.vcproj +196 -0
- data/ext/alphatau/native/sdl/src/joystick/SDL_gamecontroller.c +2066 -0
- data/ext/alphatau/native/sdl/src/joystick/SDL_gamecontrollerdb.h +583 -0
- data/ext/alphatau/native/sdl/src/joystick/SDL_joystick.c +1547 -0
- data/ext/alphatau/native/sdl/src/joystick/SDL_joystick_c.h +94 -0
- data/ext/alphatau/native/sdl/src/joystick/SDL_sysjoystick.h +153 -0
- data/ext/alphatau/native/sdl/src/joystick/android/SDL_sysjoystick.c +703 -0
- data/ext/alphatau/native/sdl/src/joystick/android/SDL_sysjoystick_c.h +59 -0
- data/ext/alphatau/native/sdl/src/joystick/bsd/SDL_sysjoystick.c +701 -0
- data/ext/alphatau/native/sdl/src/joystick/controller_type.h +457 -0
- data/ext/alphatau/native/sdl/src/joystick/darwin/SDL_sysjoystick.c +1012 -0
- data/ext/alphatau/native/sdl/src/joystick/darwin/SDL_sysjoystick_c.h +79 -0
- data/ext/alphatau/native/sdl/src/joystick/dummy/SDL_sysjoystick.c +113 -0
- data/ext/alphatau/native/sdl/src/joystick/emscripten/SDL_sysjoystick.c +406 -0
- data/ext/alphatau/native/sdl/src/joystick/emscripten/SDL_sysjoystick_c.h +52 -0
- data/ext/alphatau/native/sdl/src/joystick/haiku/SDL_haikujoystick.cc +272 -0
- data/ext/alphatau/native/sdl/src/joystick/hidapi/SDL_hidapi_ps4.c +545 -0
- data/ext/alphatau/native/sdl/src/joystick/hidapi/SDL_hidapi_switch.c +905 -0
- data/ext/alphatau/native/sdl/src/joystick/hidapi/SDL_hidapi_xbox360.c +461 -0
- data/ext/alphatau/native/sdl/src/joystick/hidapi/SDL_hidapi_xboxone.c +318 -0
- data/ext/alphatau/native/sdl/src/joystick/hidapi/SDL_hidapijoystick.c +1021 -0
- data/ext/alphatau/native/sdl/src/joystick/hidapi/SDL_hidapijoystick_c.h +72 -0
- data/ext/alphatau/native/sdl/src/joystick/iphoneos/SDL_sysjoystick.m +727 -0
- data/ext/alphatau/native/sdl/src/joystick/iphoneos/SDL_sysjoystick_c.h +57 -0
- data/ext/alphatau/native/sdl/src/joystick/linux/SDL_sysjoystick.c +1116 -0
- data/ext/alphatau/native/sdl/src/joystick/linux/SDL_sysjoystick_c.h +64 -0
- data/ext/alphatau/native/sdl/src/joystick/psp/SDL_sysjoystick.c +264 -0
- data/ext/alphatau/native/sdl/src/joystick/sort_controllers.py +78 -0
- data/ext/alphatau/native/sdl/src/joystick/steam/SDL_steamcontroller.c +52 -0
- data/ext/alphatau/native/sdl/src/joystick/steam/SDL_steamcontroller.h +33 -0
- data/ext/alphatau/native/sdl/src/joystick/windows/SDL_dinputjoystick.c +1155 -0
- data/ext/alphatau/native/sdl/src/joystick/windows/SDL_dinputjoystick_c.h +31 -0
- data/ext/alphatau/native/sdl/src/joystick/windows/SDL_mmjoystick.c +452 -0
- data/ext/alphatau/native/sdl/src/joystick/windows/SDL_windowsjoystick.c +558 -0
- data/ext/alphatau/native/sdl/src/joystick/windows/SDL_windowsjoystick_c.h +95 -0
- data/ext/alphatau/native/sdl/src/joystick/windows/SDL_xinputjoystick.c +558 -0
- data/ext/alphatau/native/sdl/src/joystick/windows/SDL_xinputjoystick_c.h +34 -0
- data/ext/alphatau/native/sdl/src/libm/e_atan2.c +134 -0
- data/ext/alphatau/native/sdl/src/libm/e_exp.c +187 -0
- data/ext/alphatau/native/sdl/src/libm/e_fmod.c +144 -0
- data/ext/alphatau/native/sdl/src/libm/e_log.c +152 -0
- data/ext/alphatau/native/sdl/src/libm/e_log10.c +106 -0
- data/ext/alphatau/native/sdl/src/libm/e_pow.c +343 -0
- data/ext/alphatau/native/sdl/src/libm/e_rem_pio2.c +161 -0
- data/ext/alphatau/native/sdl/src/libm/e_sqrt.c +457 -0
- data/ext/alphatau/native/sdl/src/libm/k_cos.c +82 -0
- data/ext/alphatau/native/sdl/src/libm/k_rem_pio2.c +317 -0
- data/ext/alphatau/native/sdl/src/libm/k_sin.c +65 -0
- data/ext/alphatau/native/sdl/src/libm/k_tan.c +118 -0
- data/ext/alphatau/native/sdl/src/libm/math_libm.h +41 -0
- data/ext/alphatau/native/sdl/src/libm/math_private.h +227 -0
- data/ext/alphatau/native/sdl/src/libm/s_atan.c +114 -0
- data/ext/alphatau/native/sdl/src/libm/s_copysign.c +29 -0
- data/ext/alphatau/native/sdl/src/libm/s_cos.c +73 -0
- data/ext/alphatau/native/sdl/src/libm/s_fabs.c +29 -0
- data/ext/alphatau/native/sdl/src/libm/s_floor.c +71 -0
- data/ext/alphatau/native/sdl/src/libm/s_scalbn.c +69 -0
- data/ext/alphatau/native/sdl/src/libm/s_sin.c +73 -0
- data/ext/alphatau/native/sdl/src/libm/s_tan.c +67 -0
- data/ext/alphatau/native/sdl/src/loadso/dlopen/SDL_sysloadso.c +88 -0
- data/ext/alphatau/native/sdl/src/loadso/dummy/SDL_sysloadso.c +54 -0
- data/ext/alphatau/native/sdl/src/loadso/windows/SDL_sysloadso.c +80 -0
- data/ext/alphatau/native/sdl/src/main/android/SDL_android_main.c +7 -0
- data/ext/alphatau/native/sdl/src/main/dummy/SDL_dummy_main.c +28 -0
- data/ext/alphatau/native/sdl/src/main/haiku/SDL_BApp.h +399 -0
- data/ext/alphatau/native/sdl/src/main/haiku/SDL_BeApp.cc +157 -0
- data/ext/alphatau/native/sdl/src/main/haiku/SDL_BeApp.h +38 -0
- data/ext/alphatau/native/sdl/src/main/nacl/SDL_nacl_main.c +93 -0
- data/ext/alphatau/native/sdl/src/main/psp/SDL_psp_main.c +70 -0
- data/ext/alphatau/native/sdl/src/main/windows/SDL_windows_main.c +207 -0
- data/ext/alphatau/native/sdl/src/main/windows/version.rc +38 -0
- data/ext/alphatau/native/sdl/src/main/winrt/SDL2-WinRTResource_BlankCursor.cur +0 -0
- data/ext/alphatau/native/sdl/src/main/winrt/SDL2-WinRTResources.rc +3 -0
- data/ext/alphatau/native/sdl/src/main/winrt/SDL_winrt_main_NonXAML.cpp +54 -0
- data/ext/alphatau/native/sdl/src/power/SDL_power.c +116 -0
- data/ext/alphatau/native/sdl/src/power/SDL_syspower.h +47 -0
- data/ext/alphatau/native/sdl/src/power/android/SDL_syspower.c +64 -0
- data/ext/alphatau/native/sdl/src/power/emscripten/SDL_syspower.c +62 -0
- data/ext/alphatau/native/sdl/src/power/haiku/SDL_syspower.c +128 -0
- data/ext/alphatau/native/sdl/src/power/linux/SDL_syspower.c +642 -0
- data/ext/alphatau/native/sdl/src/power/macosx/SDL_syspower.c +192 -0
- data/ext/alphatau/native/sdl/src/power/psp/SDL_syspower.c +68 -0
- data/ext/alphatau/native/sdl/src/power/uikit/SDL_syspower.h +32 -0
- data/ext/alphatau/native/sdl/src/power/uikit/SDL_syspower.m +113 -0
- data/ext/alphatau/native/sdl/src/power/windows/SDL_syspower.c +76 -0
- data/ext/alphatau/native/sdl/src/power/winrt/SDL_syspower.cpp +44 -0
- data/ext/alphatau/native/sdl/src/render/SDL_d3dmath.c +136 -0
- data/ext/alphatau/native/sdl/src/render/SDL_d3dmath.h +72 -0
- data/ext/alphatau/native/sdl/src/render/SDL_render.c +2292 -0
- data/ext/alphatau/native/sdl/src/render/SDL_sysrender.h +214 -0
- data/ext/alphatau/native/sdl/src/render/SDL_yuv_sw.c +414 -0
- data/ext/alphatau/native/sdl/src/render/SDL_yuv_sw_c.h +67 -0
- data/ext/alphatau/native/sdl/src/render/direct3d/SDL_render_d3d.c +1813 -0
- data/ext/alphatau/native/sdl/src/render/direct3d/SDL_shaders_d3d.c +274 -0
- data/ext/alphatau/native/sdl/src/render/direct3d/SDL_shaders_d3d.h +34 -0
- data/ext/alphatau/native/sdl/src/render/direct3d11/SDL_render_d3d11.c +2559 -0
- data/ext/alphatau/native/sdl/src/render/direct3d11/SDL_render_winrt.cpp +116 -0
- data/ext/alphatau/native/sdl/src/render/direct3d11/SDL_render_winrt.h +40 -0
- data/ext/alphatau/native/sdl/src/render/direct3d11/SDL_shaders_d3d11.c +1957 -0
- data/ext/alphatau/native/sdl/src/render/direct3d11/SDL_shaders_d3d11.h +43 -0
- data/ext/alphatau/native/sdl/src/render/metal/SDL_render_metal.m +1428 -0
- data/ext/alphatau/native/sdl/src/render/metal/SDL_shaders_metal.metal +109 -0
- data/ext/alphatau/native/sdl/src/render/metal/SDL_shaders_metal_ios.h +1899 -0
- data/ext/alphatau/native/sdl/src/render/metal/SDL_shaders_metal_osx.h +1903 -0
- data/ext/alphatau/native/sdl/src/render/metal/build-metal-shaders.sh +18 -0
- data/ext/alphatau/native/sdl/src/render/opengl/SDL_glfuncs.h +478 -0
- data/ext/alphatau/native/sdl/src/render/opengl/SDL_render_gl.c +1678 -0
- data/ext/alphatau/native/sdl/src/render/opengl/SDL_shaders_gl.c +524 -0
- data/ext/alphatau/native/sdl/src/render/opengl/SDL_shaders_gl.h +47 -0
- data/ext/alphatau/native/sdl/src/render/opengles/SDL_glesfuncs.h +65 -0
- data/ext/alphatau/native/sdl/src/render/opengles/SDL_render_gles.c +1278 -0
- data/ext/alphatau/native/sdl/src/render/opengles2/SDL_gles2funcs.h +80 -0
- data/ext/alphatau/native/sdl/src/render/opengles2/SDL_render_gles2.c +2256 -0
- data/ext/alphatau/native/sdl/src/render/opengles2/SDL_shaders_gles2.c +569 -0
- data/ext/alphatau/native/sdl/src/render/opengles2/SDL_shaders_gles2.h +70 -0
- data/ext/alphatau/native/sdl/src/render/opengles2/build_code_with_snobol/Makefile +41 -0
- data/ext/alphatau/native/sdl/src/render/opengles2/build_code_with_snobol/convert_gl2_h_into_gles2_stubcall_overs_c.sno +181 -0
- data/ext/alphatau/native/sdl/src/render/opengles2/build_code_with_snobol/convert_gl2_h_into_gles2_stubcall_overs_h.sno +116 -0
- data/ext/alphatau/native/sdl/src/render/opengles2/build_code_with_snobol/convert_gl2_h_into_gles2funcs_h.sno +82 -0
- data/ext/alphatau/native/sdl/src/render/opengles2/build_code_with_snobol/convert_gles2funcs_into_gles2_define_overs_h.sno +42 -0
- data/ext/alphatau/native/sdl/src/render/opengles2/build_code_with_snobol/gl2.h +686 -0
- data/ext/alphatau/native/sdl/src/render/opengles2/build_code_with_snobol/readme.txt +70 -0
- data/ext/alphatau/native/sdl/src/render/opengles2/build_code_with_snobol/testgles2.c +725 -0
- data/ext/alphatau/native/sdl/src/render/opengles2/build_code_with_snobol/triangle.c +147 -0
- data/ext/alphatau/native/sdl/src/render/psp/SDL_render_psp.c +1016 -0
- data/ext/alphatau/native/sdl/src/render/software/SDL_blendfillrect.c +336 -0
- data/ext/alphatau/native/sdl/src/render/software/SDL_blendfillrect.h +27 -0
- data/ext/alphatau/native/sdl/src/render/software/SDL_blendline.c +777 -0
- data/ext/alphatau/native/sdl/src/render/software/SDL_blendline.h +27 -0
- data/ext/alphatau/native/sdl/src/render/software/SDL_blendpoint.c +341 -0
- data/ext/alphatau/native/sdl/src/render/software/SDL_blendpoint.h +27 -0
- data/ext/alphatau/native/sdl/src/render/software/SDL_draw.h +576 -0
- data/ext/alphatau/native/sdl/src/render/software/SDL_drawline.c +209 -0
- data/ext/alphatau/native/sdl/src/render/software/SDL_drawline.h +27 -0
- data/ext/alphatau/native/sdl/src/render/software/SDL_drawpoint.c +114 -0
- data/ext/alphatau/native/sdl/src/render/software/SDL_drawpoint.h +27 -0
- data/ext/alphatau/native/sdl/src/render/software/SDL_render_sw.c +882 -0
- data/ext/alphatau/native/sdl/src/render/software/SDL_render_sw_c.h +24 -0
- data/ext/alphatau/native/sdl/src/render/software/SDL_rotate.c +530 -0
- data/ext/alphatau/native/sdl/src/render/software/SDL_rotate.h +28 -0
- data/ext/alphatau/native/sdl/src/sensor/SDL_sensor.c +546 -0
- data/ext/alphatau/native/sdl/src/sensor/SDL_sensor_c.h +38 -0
- data/ext/alphatau/native/sdl/src/sensor/SDL_syssensor.h +99 -0
- data/ext/alphatau/native/sdl/src/sensor/android/SDL_androidsensor.c +211 -0
- data/ext/alphatau/native/sdl/src/sensor/android/SDL_androidsensor.h +31 -0
- data/ext/alphatau/native/sdl/src/sensor/coremotion/SDL_coremotionsensor.h +30 -0
- data/ext/alphatau/native/sdl/src/sensor/coremotion/SDL_coremotionsensor.m +234 -0
- data/ext/alphatau/native/sdl/src/sensor/dummy/SDL_dummysensor.c +110 -0
- data/ext/alphatau/native/sdl/src/sensor/dummy/SDL_dummysensor.h +23 -0
- data/ext/alphatau/native/sdl/src/stdlib/SDL_getenv.c +315 -0
- data/ext/alphatau/native/sdl/src/stdlib/SDL_iconv.c +934 -0
- data/ext/alphatau/native/sdl/src/stdlib/SDL_malloc.c +5376 -0
- data/ext/alphatau/native/sdl/src/stdlib/SDL_qsort.c +534 -0
- data/ext/alphatau/native/sdl/src/stdlib/SDL_stdlib.c +1155 -0
- data/ext/alphatau/native/sdl/src/stdlib/SDL_string.c +1737 -0
- data/ext/alphatau/native/sdl/src/test/SDL_test_assert.c +152 -0
- data/ext/alphatau/native/sdl/src/test/SDL_test_common.c +1826 -0
- data/ext/alphatau/native/sdl/src/test/SDL_test_compare.c +117 -0
- data/ext/alphatau/native/sdl/src/test/SDL_test_crc32.c +166 -0
- data/ext/alphatau/native/sdl/src/test/SDL_test_font.c +3250 -0
- data/ext/alphatau/native/sdl/src/test/SDL_test_fuzzer.c +534 -0
- data/ext/alphatau/native/sdl/src/test/SDL_test_harness.c +683 -0
- data/ext/alphatau/native/sdl/src/test/SDL_test_imageBlit.c +1559 -0
- data/ext/alphatau/native/sdl/src/test/SDL_test_imageBlitBlend.c +2845 -0
- data/ext/alphatau/native/sdl/src/test/SDL_test_imageFace.c +247 -0
- data/ext/alphatau/native/sdl/src/test/SDL_test_imagePrimitives.c +514 -0
- data/ext/alphatau/native/sdl/src/test/SDL_test_imagePrimitivesBlend.c +696 -0
- data/ext/alphatau/native/sdl/src/test/SDL_test_log.c +118 -0
- data/ext/alphatau/native/sdl/src/test/SDL_test_md5.c +338 -0
- data/ext/alphatau/native/sdl/src/test/SDL_test_memory.c +274 -0
- data/ext/alphatau/native/sdl/src/test/SDL_test_random.c +96 -0
- data/ext/alphatau/native/sdl/src/thread/SDL_systhread.h +70 -0
- data/ext/alphatau/native/sdl/src/thread/SDL_thread.c +503 -0
- data/ext/alphatau/native/sdl/src/thread/SDL_thread_c.h +95 -0
- data/ext/alphatau/native/sdl/src/thread/generic/SDL_syscond.c +220 -0
- data/ext/alphatau/native/sdl/src/thread/generic/SDL_sysmutex.c +165 -0
- data/ext/alphatau/native/sdl/src/thread/generic/SDL_sysmutex_c.h +22 -0
- data/ext/alphatau/native/sdl/src/thread/generic/SDL_syssem.c +217 -0
- data/ext/alphatau/native/sdl/src/thread/generic/SDL_systhread.c +71 -0
- data/ext/alphatau/native/sdl/src/thread/generic/SDL_systhread_c.h +26 -0
- data/ext/alphatau/native/sdl/src/thread/generic/SDL_systls.c +38 -0
- data/ext/alphatau/native/sdl/src/thread/psp/SDL_syscond.c +224 -0
- data/ext/alphatau/native/sdl/src/thread/psp/SDL_sysmutex.c +136 -0
- data/ext/alphatau/native/sdl/src/thread/psp/SDL_sysmutex_c.h +22 -0
- data/ext/alphatau/native/sdl/src/thread/psp/SDL_syssem.c +161 -0
- data/ext/alphatau/native/sdl/src/thread/psp/SDL_systhread.c +114 -0
- data/ext/alphatau/native/sdl/src/thread/psp/SDL_systhread_c.h +24 -0
- data/ext/alphatau/native/sdl/src/thread/pthread/SDL_syscond.c +158 -0
- data/ext/alphatau/native/sdl/src/thread/pthread/SDL_sysmutex.c +195 -0
- data/ext/alphatau/native/sdl/src/thread/pthread/SDL_sysmutex_c.h +32 -0
- data/ext/alphatau/native/sdl/src/thread/pthread/SDL_syssem.c +209 -0
- data/ext/alphatau/native/sdl/src/thread/pthread/SDL_systhread.c +324 -0
- data/ext/alphatau/native/sdl/src/thread/pthread/SDL_systhread_c.h +27 -0
- data/ext/alphatau/native/sdl/src/thread/pthread/SDL_systls.c +70 -0
- data/ext/alphatau/native/sdl/src/thread/stdcpp/SDL_syscond.cpp +164 -0
- data/ext/alphatau/native/sdl/src/thread/stdcpp/SDL_sysmutex.cpp +111 -0
- data/ext/alphatau/native/sdl/src/thread/stdcpp/SDL_sysmutex_c.h +30 -0
- data/ext/alphatau/native/sdl/src/thread/stdcpp/SDL_systhread.cpp +168 -0
- data/ext/alphatau/native/sdl/src/thread/stdcpp/SDL_systhread_c.h +26 -0
- data/ext/alphatau/native/sdl/src/thread/windows/SDL_sysmutex.c +110 -0
- data/ext/alphatau/native/sdl/src/thread/windows/SDL_syssem.c +152 -0
- data/ext/alphatau/native/sdl/src/thread/windows/SDL_systhread.c +260 -0
- data/ext/alphatau/native/sdl/src/thread/windows/SDL_systhread_c.h +32 -0
- data/ext/alphatau/native/sdl/src/thread/windows/SDL_systls.c +72 -0
- data/ext/alphatau/native/sdl/src/timer/SDL_timer.c +373 -0
- data/ext/alphatau/native/sdl/src/timer/SDL_timer_c.h +34 -0
- data/ext/alphatau/native/sdl/src/timer/dummy/SDL_systimer.c +75 -0
- data/ext/alphatau/native/sdl/src/timer/haiku/SDL_systimer.c +80 -0
- data/ext/alphatau/native/sdl/src/timer/psp/SDL_systimer.c +91 -0
- data/ext/alphatau/native/sdl/src/timer/unix/SDL_systimer.c +232 -0
- data/ext/alphatau/native/sdl/src/timer/windows/SDL_systimer.c +200 -0
- data/ext/alphatau/native/sdl/src/video/SDL_RLEaccel.c +1581 -0
- data/ext/alphatau/native/sdl/src/video/SDL_RLEaccel_c.h +31 -0
- data/ext/alphatau/native/sdl/src/video/SDL_blit.c +296 -0
- data/ext/alphatau/native/sdl/src/video/SDL_blit.h +553 -0
- data/ext/alphatau/native/sdl/src/video/SDL_blit_0.c +483 -0
- data/ext/alphatau/native/sdl/src/video/SDL_blit_1.c +552 -0
- data/ext/alphatau/native/sdl/src/video/SDL_blit_A.c +1388 -0
- data/ext/alphatau/native/sdl/src/video/SDL_blit_N.c +2647 -0
- data/ext/alphatau/native/sdl/src/video/SDL_blit_auto.c +7419 -0
- data/ext/alphatau/native/sdl/src/video/SDL_blit_auto.h +30 -0
- data/ext/alphatau/native/sdl/src/video/SDL_blit_copy.c +162 -0
- data/ext/alphatau/native/sdl/src/video/SDL_blit_copy.h +24 -0
- data/ext/alphatau/native/sdl/src/video/SDL_blit_slow.c +164 -0
- data/ext/alphatau/native/sdl/src/video/SDL_blit_slow.h +25 -0
- data/ext/alphatau/native/sdl/src/video/SDL_bmp.c +702 -0
- data/ext/alphatau/native/sdl/src/video/SDL_clipboard.c +90 -0
- data/ext/alphatau/native/sdl/src/video/SDL_egl.c +899 -0
- data/ext/alphatau/native/sdl/src/video/SDL_egl_c.h +149 -0
- data/ext/alphatau/native/sdl/src/video/SDL_fillrect.c +343 -0
- data/ext/alphatau/native/sdl/src/video/SDL_pixels.c +1125 -0
- data/ext/alphatau/native/sdl/src/video/SDL_pixels_c.h +40 -0
- data/ext/alphatau/native/sdl/src/video/SDL_rect.c +531 -0
- data/ext/alphatau/native/sdl/src/video/SDL_rect_c.h +25 -0
- data/ext/alphatau/native/sdl/src/video/SDL_shape.c +309 -0
- data/ext/alphatau/native/sdl/src/video/SDL_shape_internals.h +69 -0
- data/ext/alphatau/native/sdl/src/video/SDL_stretch.c +353 -0
- data/ext/alphatau/native/sdl/src/video/SDL_surface.c +1232 -0
- data/ext/alphatau/native/sdl/src/video/SDL_sysvideo.h +467 -0
- data/ext/alphatau/native/sdl/src/video/SDL_video.c +4160 -0
- data/ext/alphatau/native/sdl/src/video/SDL_vulkan_internal.h +91 -0
- data/ext/alphatau/native/sdl/src/video/SDL_vulkan_utils.c +172 -0
- data/ext/alphatau/native/sdl/src/video/SDL_yuv.c +1834 -0
- data/ext/alphatau/native/sdl/src/video/SDL_yuv_c.h +30 -0
- data/ext/alphatau/native/sdl/src/video/android/SDL_androidclipboard.c +48 -0
- data/ext/alphatau/native/sdl/src/video/android/SDL_androidclipboard.h +32 -0
- data/ext/alphatau/native/sdl/src/video/android/SDL_androidevents.c +123 -0
- data/ext/alphatau/native/sdl/src/video/android/SDL_androidevents.h +27 -0
- data/ext/alphatau/native/sdl/src/video/android/SDL_androidgl.c +62 -0
- data/ext/alphatau/native/sdl/src/video/android/SDL_androidgl.h +34 -0
- data/ext/alphatau/native/sdl/src/video/android/SDL_androidkeyboard.c +391 -0
- data/ext/alphatau/native/sdl/src/video/android/SDL_androidkeyboard.h +36 -0
- data/ext/alphatau/native/sdl/src/video/android/SDL_androidmessagebox.c +37 -0
- data/ext/alphatau/native/sdl/src/video/android/SDL_androidmessagebox.h +29 -0
- data/ext/alphatau/native/sdl/src/video/android/SDL_androidmouse.c +266 -0
- data/ext/alphatau/native/sdl/src/video/android/SDL_androidmouse.h +33 -0
- data/ext/alphatau/native/sdl/src/video/android/SDL_androidtouch.c +151 -0
- data/ext/alphatau/native/sdl/src/video/android/SDL_androidtouch.h +29 -0
- data/ext/alphatau/native/sdl/src/video/android/SDL_androidvideo.c +259 -0
- data/ext/alphatau/native/sdl/src/video/android/SDL_androidvideo.h +51 -0
- data/ext/alphatau/native/sdl/src/video/android/SDL_androidvulkan.c +175 -0
- data/ext/alphatau/native/sdl/src/video/android/SDL_androidvulkan.h +52 -0
- data/ext/alphatau/native/sdl/src/video/android/SDL_androidwindow.c +175 -0
- data/ext/alphatau/native/sdl/src/video/android/SDL_androidwindow.h +45 -0
- data/ext/alphatau/native/sdl/src/video/cocoa/SDL_cocoaclipboard.h +36 -0
- data/ext/alphatau/native/sdl/src/video/cocoa/SDL_cocoaclipboard.m +103 -0
- data/ext/alphatau/native/sdl/src/video/cocoa/SDL_cocoaevents.h +32 -0
- data/ext/alphatau/native/sdl/src/video/cocoa/SDL_cocoaevents.m +483 -0
- data/ext/alphatau/native/sdl/src/video/cocoa/SDL_cocoakeyboard.h +36 -0
- data/ext/alphatau/native/sdl/src/video/cocoa/SDL_cocoakeyboard.m +720 -0
- data/ext/alphatau/native/sdl/src/video/cocoa/SDL_cocoamessagebox.h +29 -0
- data/ext/alphatau/native/sdl/src/video/cocoa/SDL_cocoamessagebox.m +145 -0
- data/ext/alphatau/native/sdl/src/video/cocoa/SDL_cocoametalview.h +63 -0
- data/ext/alphatau/native/sdl/src/video/cocoa/SDL_cocoametalview.m +134 -0
- data/ext/alphatau/native/sdl/src/video/cocoa/SDL_cocoamodes.h +46 -0
- data/ext/alphatau/native/sdl/src/video/cocoa/SDL_cocoamodes.m +490 -0
- data/ext/alphatau/native/sdl/src/video/cocoa/SDL_cocoamouse.h +52 -0
- data/ext/alphatau/native/sdl/src/video/cocoa/SDL_cocoamouse.m +477 -0
- data/ext/alphatau/native/sdl/src/video/cocoa/SDL_cocoamousetap.h +34 -0
- data/ext/alphatau/native/sdl/src/video/cocoa/SDL_cocoamousetap.m +279 -0
- data/ext/alphatau/native/sdl/src/video/cocoa/SDL_cocoaopengl.h +68 -0
- data/ext/alphatau/native/sdl/src/video/cocoa/SDL_cocoaopengl.m +428 -0
- data/ext/alphatau/native/sdl/src/video/cocoa/SDL_cocoaopengles.h +49 -0
- data/ext/alphatau/native/sdl/src/video/cocoa/SDL_cocoaopengles.m +132 -0
- data/ext/alphatau/native/sdl/src/video/cocoa/SDL_cocoashape.h +45 -0
- data/ext/alphatau/native/sdl/src/video/cocoa/SDL_cocoashape.m +113 -0
- data/ext/alphatau/native/sdl/src/video/cocoa/SDL_cocoavideo.h +118 -0
- data/ext/alphatau/native/sdl/src/video/cocoa/SDL_cocoavideo.m +254 -0
- data/ext/alphatau/native/sdl/src/video/cocoa/SDL_cocoavulkan.h +55 -0
- data/ext/alphatau/native/sdl/src/video/cocoa/SDL_cocoavulkan.m +231 -0
- data/ext/alphatau/native/sdl/src/video/cocoa/SDL_cocoawindow.h +155 -0
- data/ext/alphatau/native/sdl/src/video/cocoa/SDL_cocoawindow.m +1885 -0
- data/ext/alphatau/native/sdl/src/video/directfb/SDL_DirectFB_WM.c +413 -0
- data/ext/alphatau/native/sdl/src/video/directfb/SDL_DirectFB_WM.h +56 -0
- data/ext/alphatau/native/sdl/src/video/directfb/SDL_DirectFB_dyn.c +117 -0
- data/ext/alphatau/native/sdl/src/video/directfb/SDL_DirectFB_dyn.h +41 -0
- data/ext/alphatau/native/sdl/src/video/directfb/SDL_DirectFB_events.c +748 -0
- data/ext/alphatau/native/sdl/src/video/directfb/SDL_DirectFB_events.h +34 -0
- data/ext/alphatau/native/sdl/src/video/directfb/SDL_DirectFB_modes.c +414 -0
- data/ext/alphatau/native/sdl/src/video/directfb/SDL_DirectFB_modes.h +59 -0
- data/ext/alphatau/native/sdl/src/video/directfb/SDL_DirectFB_mouse.c +389 -0
- data/ext/alphatau/native/sdl/src/video/directfb/SDL_DirectFB_mouse.h +44 -0
- data/ext/alphatau/native/sdl/src/video/directfb/SDL_DirectFB_opengl.c +332 -0
- data/ext/alphatau/native/sdl/src/video/directfb/SDL_DirectFB_opengl.h +64 -0
- data/ext/alphatau/native/sdl/src/video/directfb/SDL_DirectFB_render.c +1335 -0
- data/ext/alphatau/native/sdl/src/video/directfb/SDL_DirectFB_render.h +25 -0
- data/ext/alphatau/native/sdl/src/video/directfb/SDL_DirectFB_shape.c +131 -0
- data/ext/alphatau/native/sdl/src/video/directfb/SDL_DirectFB_shape.h +38 -0
- data/ext/alphatau/native/sdl/src/video/directfb/SDL_DirectFB_video.c +418 -0
- data/ext/alphatau/native/sdl/src/video/directfb/SDL_DirectFB_video.h +170 -0
- data/ext/alphatau/native/sdl/src/video/directfb/SDL_DirectFB_window.c +565 -0
- data/ext/alphatau/native/sdl/src/video/directfb/SDL_DirectFB_window.h +82 -0
- data/ext/alphatau/native/sdl/src/video/dummy/SDL_nullevents.c +41 -0
- data/ext/alphatau/native/sdl/src/video/dummy/SDL_nullevents_c.h +27 -0
- data/ext/alphatau/native/sdl/src/video/dummy/SDL_nullframebuffer.c +89 -0
- data/ext/alphatau/native/sdl/src/video/dummy/SDL_nullframebuffer_c.h +27 -0
- data/ext/alphatau/native/sdl/src/video/dummy/SDL_nullvideo.c +144 -0
- data/ext/alphatau/native/sdl/src/video/dummy/SDL_nullvideo.h +30 -0
- data/ext/alphatau/native/sdl/src/video/emscripten/SDL_emscriptenevents.c +716 -0
- data/ext/alphatau/native/sdl/src/video/emscripten/SDL_emscriptenevents.h +40 -0
- data/ext/alphatau/native/sdl/src/video/emscripten/SDL_emscriptenframebuffer.c +178 -0
- data/ext/alphatau/native/sdl/src/video/emscripten/SDL_emscriptenframebuffer.h +32 -0
- data/ext/alphatau/native/sdl/src/video/emscripten/SDL_emscriptenmouse.c +275 -0
- data/ext/alphatau/native/sdl/src/video/emscripten/SDL_emscriptenmouse.h +42 -0
- data/ext/alphatau/native/sdl/src/video/emscripten/SDL_emscriptenopengles.c +119 -0
- data/ext/alphatau/native/sdl/src/video/emscripten/SDL_emscriptenopengles.h +49 -0
- data/ext/alphatau/native/sdl/src/video/emscripten/SDL_emscriptenvideo.c +354 -0
- data/ext/alphatau/native/sdl/src/video/emscripten/SDL_emscriptenvideo.h +58 -0
- data/ext/alphatau/native/sdl/src/video/haiku/SDL_BWin.h +679 -0
- data/ext/alphatau/native/sdl/src/video/haiku/SDL_bclipboard.cc +95 -0
- data/ext/alphatau/native/sdl/src/video/haiku/SDL_bclipboard.h +33 -0
- data/ext/alphatau/native/sdl/src/video/haiku/SDL_bevents.cc +41 -0
- data/ext/alphatau/native/sdl/src/video/haiku/SDL_bevents.h +39 -0
- data/ext/alphatau/native/sdl/src/video/haiku/SDL_bframebuffer.cc +259 -0
- data/ext/alphatau/native/sdl/src/video/haiku/SDL_bframebuffer.h +47 -0
- data/ext/alphatau/native/sdl/src/video/haiku/SDL_bkeyboard.cc +190 -0
- data/ext/alphatau/native/sdl/src/video/haiku/SDL_bkeyboard.h +44 -0
- data/ext/alphatau/native/sdl/src/video/haiku/SDL_bmodes.cc +333 -0
- data/ext/alphatau/native/sdl/src/video/haiku/SDL_bmodes.h +48 -0
- data/ext/alphatau/native/sdl/src/video/haiku/SDL_bopengl.cc +176 -0
- data/ext/alphatau/native/sdl/src/video/haiku/SDL_bopengl.h +55 -0
- data/ext/alphatau/native/sdl/src/video/haiku/SDL_bvideo.cc +178 -0
- data/ext/alphatau/native/sdl/src/video/haiku/SDL_bvideo.h +44 -0
- data/ext/alphatau/native/sdl/src/video/haiku/SDL_bwindow.cc +233 -0
- data/ext/alphatau/native/sdl/src/video/haiku/SDL_bwindow.h +55 -0
- data/ext/alphatau/native/sdl/src/video/khronos/EGL/egl.h +303 -0
- data/ext/alphatau/native/sdl/src/video/khronos/EGL/eglext.h +1241 -0
- data/ext/alphatau/native/sdl/src/video/khronos/EGL/eglplatform.h +132 -0
- data/ext/alphatau/native/sdl/src/video/khronos/GLES2/gl2.h +675 -0
- data/ext/alphatau/native/sdl/src/video/khronos/GLES2/gl2ext.h +3505 -0
- data/ext/alphatau/native/sdl/src/video/khronos/GLES2/gl2platform.h +38 -0
- data/ext/alphatau/native/sdl/src/video/khronos/KHR/khrplatform.h +284 -0
- data/ext/alphatau/native/sdl/src/video/khronos/vulkan/vk_platform.h +120 -0
- data/ext/alphatau/native/sdl/src/video/khronos/vulkan/vulkan.h +6458 -0
- data/ext/alphatau/native/sdl/src/video/kmsdrm/SDL_kmsdrmdyn.c +171 -0
- data/ext/alphatau/native/sdl/src/video/kmsdrm/SDL_kmsdrmdyn.h +53 -0
- data/ext/alphatau/native/sdl/src/video/kmsdrm/SDL_kmsdrmevents.c +42 -0
- data/ext/alphatau/native/sdl/src/video/kmsdrm/SDL_kmsdrmevents.h +31 -0
- data/ext/alphatau/native/sdl/src/video/kmsdrm/SDL_kmsdrmmouse.c +501 -0
- data/ext/alphatau/native/sdl/src/video/kmsdrm/SDL_kmsdrmmouse.h +45 -0
- data/ext/alphatau/native/sdl/src/video/kmsdrm/SDL_kmsdrmopengles.c +189 -0
- data/ext/alphatau/native/sdl/src/video/kmsdrm/SDL_kmsdrmopengles.h +48 -0
- data/ext/alphatau/native/sdl/src/video/kmsdrm/SDL_kmsdrmsym.h +99 -0
- data/ext/alphatau/native/sdl/src/video/kmsdrm/SDL_kmsdrmvideo.c +664 -0
- data/ext/alphatau/native/sdl/src/video/kmsdrm/SDL_kmsdrmvideo.h +124 -0
- data/ext/alphatau/native/sdl/src/video/mir/SDL_mirdyn.c +170 -0
- data/ext/alphatau/native/sdl/src/video/mir/SDL_mirdyn.h +53 -0
- data/ext/alphatau/native/sdl/src/video/mir/SDL_mirevents.c +321 -0
- data/ext/alphatau/native/sdl/src/video/mir/SDL_mirevents.h +37 -0
- data/ext/alphatau/native/sdl/src/video/mir/SDL_mirframebuffer.c +134 -0
- data/ext/alphatau/native/sdl/src/video/mir/SDL_mirframebuffer.h +47 -0
- data/ext/alphatau/native/sdl/src/video/mir/SDL_mirmouse.c +292 -0
- data/ext/alphatau/native/sdl/src/video/mir/SDL_mirmouse.h +37 -0
- data/ext/alphatau/native/sdl/src/video/mir/SDL_miropengl.c +78 -0
- data/ext/alphatau/native/sdl/src/video/mir/SDL_miropengl.h +53 -0
- data/ext/alphatau/native/sdl/src/video/mir/SDL_mirsym.h +143 -0
- data/ext/alphatau/native/sdl/src/video/mir/SDL_mirvideo.c +423 -0
- data/ext/alphatau/native/sdl/src/video/mir/SDL_mirvideo.h +49 -0
- data/ext/alphatau/native/sdl/src/video/mir/SDL_mirvulkan.c +176 -0
- data/ext/alphatau/native/sdl/src/video/mir/SDL_mirvulkan.h +52 -0
- data/ext/alphatau/native/sdl/src/video/mir/SDL_mirwindow.c +374 -0
- data/ext/alphatau/native/sdl/src/video/mir/SDL_mirwindow.h +93 -0
- data/ext/alphatau/native/sdl/src/video/nacl/SDL_naclevents.c +438 -0
- data/ext/alphatau/native/sdl/src/video/nacl/SDL_naclevents_c.h +30 -0
- data/ext/alphatau/native/sdl/src/video/nacl/SDL_naclglue.c +24 -0
- data/ext/alphatau/native/sdl/src/video/nacl/SDL_naclopengles.c +174 -0
- data/ext/alphatau/native/sdl/src/video/nacl/SDL_naclopengles.h +38 -0
- data/ext/alphatau/native/sdl/src/video/nacl/SDL_naclvideo.c +183 -0
- data/ext/alphatau/native/sdl/src/video/nacl/SDL_naclvideo.h +67 -0
- data/ext/alphatau/native/sdl/src/video/nacl/SDL_naclwindow.c +79 -0
- data/ext/alphatau/native/sdl/src/video/nacl/SDL_naclwindow.h +32 -0
- data/ext/alphatau/native/sdl/src/video/pandora/SDL_pandora.c +838 -0
- data/ext/alphatau/native/sdl/src/video/pandora/SDL_pandora.h +101 -0
- data/ext/alphatau/native/sdl/src/video/pandora/SDL_pandora_events.c +38 -0
- data/ext/alphatau/native/sdl/src/video/pandora/SDL_pandora_events.h +25 -0
- data/ext/alphatau/native/sdl/src/video/psp/SDL_pspevents.c +290 -0
- data/ext/alphatau/native/sdl/src/video/psp/SDL_pspevents_c.h +31 -0
- data/ext/alphatau/native/sdl/src/video/psp/SDL_pspgl.c +210 -0
- data/ext/alphatau/native/sdl/src/video/psp/SDL_pspgl_c.h +54 -0
- data/ext/alphatau/native/sdl/src/video/psp/SDL_pspmouse.c +41 -0
- data/ext/alphatau/native/sdl/src/video/psp/SDL_pspmouse_c.h +24 -0
- data/ext/alphatau/native/sdl/src/video/psp/SDL_pspvideo.c +333 -0
- data/ext/alphatau/native/sdl/src/video/psp/SDL_pspvideo.h +102 -0
- data/ext/alphatau/native/sdl/src/video/qnx/gl.c +285 -0
- data/ext/alphatau/native/sdl/src/video/qnx/keyboard.c +133 -0
- data/ext/alphatau/native/sdl/src/video/qnx/sdl_qnx.h +48 -0
- data/ext/alphatau/native/sdl/src/video/qnx/video.c +364 -0
- data/ext/alphatau/native/sdl/src/video/raspberry/SDL_rpievents.c +45 -0
- data/ext/alphatau/native/sdl/src/video/raspberry/SDL_rpievents_c.h +31 -0
- data/ext/alphatau/native/sdl/src/video/raspberry/SDL_rpimouse.c +386 -0
- data/ext/alphatau/native/sdl/src/video/raspberry/SDL_rpimouse.h +43 -0
- data/ext/alphatau/native/sdl/src/video/raspberry/SDL_rpiopengles.c +71 -0
- data/ext/alphatau/native/sdl/src/video/raspberry/SDL_rpiopengles.h +49 -0
- data/ext/alphatau/native/sdl/src/video/raspberry/SDL_rpivideo.c +442 -0
- data/ext/alphatau/native/sdl/src/video/raspberry/SDL_rpivideo.h +104 -0
- data/ext/alphatau/native/sdl/src/video/sdlgenblit.pl +535 -0
- data/ext/alphatau/native/sdl/src/video/uikit/SDL_uikitappdelegate.h +47 -0
- data/ext/alphatau/native/sdl/src/video/uikit/SDL_uikitappdelegate.m +516 -0
- data/ext/alphatau/native/sdl/src/video/uikit/SDL_uikitclipboard.h +35 -0
- data/ext/alphatau/native/sdl/src/video/uikit/SDL_uikitclipboard.m +111 -0
- data/ext/alphatau/native/sdl/src/video/uikit/SDL_uikitevents.h +30 -0
- data/ext/alphatau/native/sdl/src/video/uikit/SDL_uikitevents.m +73 -0
- data/ext/alphatau/native/sdl/src/video/uikit/SDL_uikitmessagebox.h +31 -0
- data/ext/alphatau/native/sdl/src/video/uikit/SDL_uikitmessagebox.m +208 -0
- data/ext/alphatau/native/sdl/src/video/uikit/SDL_uikitmetalview.h +58 -0
- data/ext/alphatau/native/sdl/src/video/uikit/SDL_uikitmetalview.m +131 -0
- data/ext/alphatau/native/sdl/src/video/uikit/SDL_uikitmodes.h +54 -0
- data/ext/alphatau/native/sdl/src/video/uikit/SDL_uikitmodes.m +378 -0
- data/ext/alphatau/native/sdl/src/video/uikit/SDL_uikitopengles.h +40 -0
- data/ext/alphatau/native/sdl/src/video/uikit/SDL_uikitopengles.m +250 -0
- data/ext/alphatau/native/sdl/src/video/uikit/SDL_uikitopenglview.h +60 -0
- data/ext/alphatau/native/sdl/src/video/uikit/SDL_uikitopenglview.m +384 -0
- data/ext/alphatau/native/sdl/src/video/uikit/SDL_uikitvideo.h +46 -0
- data/ext/alphatau/native/sdl/src/video/uikit/SDL_uikitvideo.m +249 -0
- data/ext/alphatau/native/sdl/src/video/uikit/SDL_uikitview.h +41 -0
- data/ext/alphatau/native/sdl/src/video/uikit/SDL_uikitview.m +328 -0
- data/ext/alphatau/native/sdl/src/video/uikit/SDL_uikitviewcontroller.h +91 -0
- data/ext/alphatau/native/sdl/src/video/uikit/SDL_uikitviewcontroller.m +532 -0
- data/ext/alphatau/native/sdl/src/video/uikit/SDL_uikitvulkan.h +54 -0
- data/ext/alphatau/native/sdl/src/video/uikit/SDL_uikitvulkan.m +222 -0
- data/ext/alphatau/native/sdl/src/video/uikit/SDL_uikitwindow.h +56 -0
- data/ext/alphatau/native/sdl/src/video/uikit/SDL_uikitwindow.m +465 -0
- data/ext/alphatau/native/sdl/src/video/uikit/keyinfotable.h +174 -0
- data/ext/alphatau/native/sdl/src/video/vivante/SDL_vivanteopengles.c +47 -0
- data/ext/alphatau/native/sdl/src/video/vivante/SDL_vivanteopengles.h +48 -0
- data/ext/alphatau/native/sdl/src/video/vivante/SDL_vivanteplatform.c +54 -0
- data/ext/alphatau/native/sdl/src/video/vivante/SDL_vivanteplatform.h +47 -0
- data/ext/alphatau/native/sdl/src/video/vivante/SDL_vivantevideo.c +409 -0
- data/ext/alphatau/native/sdl/src/video/vivante/SDL_vivantevideo.h +91 -0
- data/ext/alphatau/native/sdl/src/video/wayland/SDL_waylandclipboard.c +123 -0
- data/ext/alphatau/native/sdl/src/video/wayland/SDL_waylandclipboard.h +32 -0
- data/ext/alphatau/native/sdl/src/video/wayland/SDL_waylanddatamanager.c +468 -0
- data/ext/alphatau/native/sdl/src/video/wayland/SDL_waylanddatamanager.h +103 -0
- data/ext/alphatau/native/sdl/src/video/wayland/SDL_waylanddyn.c +178 -0
- data/ext/alphatau/native/sdl/src/video/wayland/SDL_waylanddyn.h +107 -0
- data/ext/alphatau/native/sdl/src/video/wayland/SDL_waylandevents.c +1134 -0
- data/ext/alphatau/native/sdl/src/video/wayland/SDL_waylandevents_c.h +51 -0
- data/ext/alphatau/native/sdl/src/video/wayland/SDL_waylandmouse.c +396 -0
- data/ext/alphatau/native/sdl/src/video/wayland/SDL_waylandmouse.h +31 -0
- data/ext/alphatau/native/sdl/src/video/wayland/SDL_waylandopengles.c +93 -0
- data/ext/alphatau/native/sdl/src/video/wayland/SDL_waylandopengles.h +49 -0
- data/ext/alphatau/native/sdl/src/video/wayland/SDL_waylandsym.h +127 -0
- data/ext/alphatau/native/sdl/src/video/wayland/SDL_waylandtouch.c +265 -0
- data/ext/alphatau/native/sdl/src/video/wayland/SDL_waylandtouch.h +352 -0
- data/ext/alphatau/native/sdl/src/video/wayland/SDL_waylandvideo.c +517 -0
- data/ext/alphatau/native/sdl/src/video/wayland/SDL_waylandvideo.h +85 -0
- data/ext/alphatau/native/sdl/src/video/wayland/SDL_waylandvulkan.c +176 -0
- data/ext/alphatau/native/sdl/src/video/wayland/SDL_waylandvulkan.h +52 -0
- data/ext/alphatau/native/sdl/src/video/wayland/SDL_waylandwindow.c +684 -0
- data/ext/alphatau/native/sdl/src/video/wayland/SDL_waylandwindow.h +88 -0
- data/ext/alphatau/native/sdl/src/video/windows/SDL_msctf.h +242 -0
- data/ext/alphatau/native/sdl/src/video/windows/SDL_vkeys.h +76 -0
- data/ext/alphatau/native/sdl/src/video/windows/SDL_windowsclipboard.c +160 -0
- data/ext/alphatau/native/sdl/src/video/windows/SDL_windowsclipboard.h +36 -0
- data/ext/alphatau/native/sdl/src/video/windows/SDL_windowsevents.c +1229 -0
- data/ext/alphatau/native/sdl/src/video/windows/SDL_windowsevents.h +36 -0
- data/ext/alphatau/native/sdl/src/video/windows/SDL_windowsframebuffer.c +127 -0
- data/ext/alphatau/native/sdl/src/video/windows/SDL_windowsframebuffer.h +27 -0
- data/ext/alphatau/native/sdl/src/video/windows/SDL_windowskeyboard.c +1579 -0
- data/ext/alphatau/native/sdl/src/video/windows/SDL_windowskeyboard.h +40 -0
- data/ext/alphatau/native/sdl/src/video/windows/SDL_windowsmessagebox.c +905 -0
- data/ext/alphatau/native/sdl/src/video/windows/SDL_windowsmessagebox.h +29 -0
- data/ext/alphatau/native/sdl/src/video/windows/SDL_windowsmodes.c +407 -0
- data/ext/alphatau/native/sdl/src/video/windows/SDL_windowsmodes.h +47 -0
- data/ext/alphatau/native/sdl/src/video/windows/SDL_windowsmouse.c +322 -0
- data/ext/alphatau/native/sdl/src/video/windows/SDL_windowsmouse.h +33 -0
- data/ext/alphatau/native/sdl/src/video/windows/SDL_windowsopengl.c +895 -0
- data/ext/alphatau/native/sdl/src/video/windows/SDL_windowsopengl.h +142 -0
- data/ext/alphatau/native/sdl/src/video/windows/SDL_windowsopengles.c +131 -0
- data/ext/alphatau/native/sdl/src/video/windows/SDL_windowsopengles.h +49 -0
- data/ext/alphatau/native/sdl/src/video/windows/SDL_windowsshape.c +110 -0
- data/ext/alphatau/native/sdl/src/video/windows/SDL_windowsshape.h +40 -0
- data/ext/alphatau/native/sdl/src/video/windows/SDL_windowstaskdialog.h +156 -0
- data/ext/alphatau/native/sdl/src/video/windows/SDL_windowsvideo.c +442 -0
- data/ext/alphatau/native/sdl/src/video/windows/SDL_windowsvideo.h +199 -0
- data/ext/alphatau/native/sdl/src/video/windows/SDL_windowsvulkan.c +176 -0
- data/ext/alphatau/native/sdl/src/video/windows/SDL_windowsvulkan.h +52 -0
- data/ext/alphatau/native/sdl/src/video/windows/SDL_windowswindow.c +992 -0
- data/ext/alphatau/native/sdl/src/video/windows/SDL_windowswindow.h +86 -0
- data/ext/alphatau/native/sdl/src/video/windows/wmmsg.h +1052 -0
- data/ext/alphatau/native/sdl/src/video/winrt/SDL_winrtevents.cpp +154 -0
- data/ext/alphatau/native/sdl/src/video/winrt/SDL_winrtevents_c.h +82 -0
- data/ext/alphatau/native/sdl/src/video/winrt/SDL_winrtgamebar.cpp +196 -0
- data/ext/alphatau/native/sdl/src/video/winrt/SDL_winrtgamebar_cpp.h +35 -0
- data/ext/alphatau/native/sdl/src/video/winrt/SDL_winrtkeyboard.cpp +430 -0
- data/ext/alphatau/native/sdl/src/video/winrt/SDL_winrtmessagebox.cpp +112 -0
- data/ext/alphatau/native/sdl/src/video/winrt/SDL_winrtmessagebox.h +29 -0
- data/ext/alphatau/native/sdl/src/video/winrt/SDL_winrtmouse.cpp +224 -0
- data/ext/alphatau/native/sdl/src/video/winrt/SDL_winrtmouse_c.h +40 -0
- data/ext/alphatau/native/sdl/src/video/winrt/SDL_winrtopengles.cpp +203 -0
- data/ext/alphatau/native/sdl/src/video/winrt/SDL_winrtopengles.h +70 -0
- data/ext/alphatau/native/sdl/src/video/winrt/SDL_winrtpointerinput.cpp +415 -0
- data/ext/alphatau/native/sdl/src/video/winrt/SDL_winrtvideo.cpp +842 -0
- data/ext/alphatau/native/sdl/src/video/winrt/SDL_winrtvideo_cpp.h +106 -0
- data/ext/alphatau/native/sdl/src/video/x11/SDL_x11clipboard.c +199 -0
- data/ext/alphatau/native/sdl/src/video/x11/SDL_x11clipboard.h +33 -0
- data/ext/alphatau/native/sdl/src/video/x11/SDL_x11dyn.c +212 -0
- data/ext/alphatau/native/sdl/src/video/x11/SDL_x11dyn.h +111 -0
- data/ext/alphatau/native/sdl/src/video/x11/SDL_x11events.c +1500 -0
- data/ext/alphatau/native/sdl/src/video/x11/SDL_x11events.h +31 -0
- data/ext/alphatau/native/sdl/src/video/x11/SDL_x11framebuffer.c +257 -0
- data/ext/alphatau/native/sdl/src/video/x11/SDL_x11framebuffer.h +31 -0
- data/ext/alphatau/native/sdl/src/video/x11/SDL_x11keyboard.c +543 -0
- data/ext/alphatau/native/sdl/src/video/x11/SDL_x11keyboard.h +36 -0
- data/ext/alphatau/native/sdl/src/video/x11/SDL_x11messagebox.c +853 -0
- data/ext/alphatau/native/sdl/src/video/x11/SDL_x11messagebox.h +28 -0
- data/ext/alphatau/native/sdl/src/video/x11/SDL_x11modes.c +1112 -0
- data/ext/alphatau/native/sdl/src/video/x11/SDL_x11modes.h +85 -0
- data/ext/alphatau/native/sdl/src/video/x11/SDL_x11mouse.c +448 -0
- data/ext/alphatau/native/sdl/src/video/x11/SDL_x11mouse.h +31 -0
- data/ext/alphatau/native/sdl/src/video/x11/SDL_x11opengl.c +946 -0
- data/ext/alphatau/native/sdl/src/video/x11/SDL_x11opengl.h +84 -0
- data/ext/alphatau/native/sdl/src/video/x11/SDL_x11opengles.c +109 -0
- data/ext/alphatau/native/sdl/src/video/x11/SDL_x11opengles.h +56 -0
- data/ext/alphatau/native/sdl/src/video/x11/SDL_x11shape.c +115 -0
- data/ext/alphatau/native/sdl/src/video/x11/SDL_x11shape.h +39 -0
- data/ext/alphatau/native/sdl/src/video/x11/SDL_x11sym.h +337 -0
- data/ext/alphatau/native/sdl/src/video/x11/SDL_x11touch.c +54 -0
- data/ext/alphatau/native/sdl/src/video/x11/SDL_x11touch.h +32 -0
- data/ext/alphatau/native/sdl/src/video/x11/SDL_x11video.c +497 -0
- data/ext/alphatau/native/sdl/src/video/x11/SDL_x11video.h +156 -0
- data/ext/alphatau/native/sdl/src/video/x11/SDL_x11vulkan.c +243 -0
- data/ext/alphatau/native/sdl/src/video/x11/SDL_x11vulkan.h +48 -0
- data/ext/alphatau/native/sdl/src/video/x11/SDL_x11window.c +1619 -0
- data/ext/alphatau/native/sdl/src/video/x11/SDL_x11window.h +111 -0
- data/ext/alphatau/native/sdl/src/video/x11/SDL_x11xinput2.c +313 -0
- data/ext/alphatau/native/sdl/src/video/x11/SDL_x11xinput2.h +42 -0
- data/ext/alphatau/native/sdl/src/video/x11/edid-parse.c +754 -0
- data/ext/alphatau/native/sdl/src/video/x11/edid.h +167 -0
- data/ext/alphatau/native/sdl/src/video/x11/imKStoUCS.c +350 -0
- data/ext/alphatau/native/sdl/src/video/x11/imKStoUCS.h +32 -0
- data/ext/alphatau/native/sdl/src/video/yuv2rgb/LICENSE +27 -0
- data/ext/alphatau/native/sdl/src/video/yuv2rgb/README.md +63 -0
- data/ext/alphatau/native/sdl/src/video/yuv2rgb/yuv_rgb.c +687 -0
- data/ext/alphatau/native/sdl/src/video/yuv2rgb/yuv_rgb.h +381 -0
- data/ext/alphatau/native/sdl/src/video/yuv2rgb/yuv_rgb_sse_func.h +498 -0
- data/ext/alphatau/native/sdl/src/video/yuv2rgb/yuv_rgb_std_func.h +228 -0
- data/ext/alphatau/native/sdl/test/CMakeLists.txt +122 -0
- data/ext/alphatau/native/sdl/test/COPYING +8 -0
- data/ext/alphatau/native/sdl/test/Makefile.in +328 -0
- data/ext/alphatau/native/sdl/test/README +47 -0
- data/ext/alphatau/native/sdl/test/acinclude.m4 +359 -0
- data/ext/alphatau/native/sdl/test/aclocal.m4 +359 -0
- data/ext/alphatau/native/sdl/test/autogen.sh +12 -0
- data/ext/alphatau/native/sdl/test/axis.bmp +0 -0
- data/ext/alphatau/native/sdl/test/button.bmp +0 -0
- data/ext/alphatau/native/sdl/test/checkkeys.c +248 -0
- data/ext/alphatau/native/sdl/test/configure +5124 -0
- data/ext/alphatau/native/sdl/test/configure.in +191 -0
- data/ext/alphatau/native/sdl/test/controllermap.bmp +0 -0
- data/ext/alphatau/native/sdl/test/controllermap.c +781 -0
- data/ext/alphatau/native/sdl/test/emscripten/joystick-pre.js +25 -0
- data/ext/alphatau/native/sdl/test/gcc-fat.sh +110 -0
- data/ext/alphatau/native/sdl/test/icon.bmp +0 -0
- data/ext/alphatau/native/sdl/test/loopwave.c +179 -0
- data/ext/alphatau/native/sdl/test/loopwavequeue.c +149 -0
- data/ext/alphatau/native/sdl/test/moose.dat +0 -0
- data/ext/alphatau/native/sdl/test/nacl/Makefile +63 -0
- data/ext/alphatau/native/sdl/test/nacl/background.js +40 -0
- data/ext/alphatau/native/sdl/test/nacl/common.js +474 -0
- data/ext/alphatau/native/sdl/test/nacl/index.html +21 -0
- data/ext/alphatau/native/sdl/test/nacl/manifest.json +22 -0
- data/ext/alphatau/native/sdl/test/picture.xbm +14 -0
- data/ext/alphatau/native/sdl/test/relative_mode.markdown +58 -0
- data/ext/alphatau/native/sdl/test/sample.bmp +0 -0
- data/ext/alphatau/native/sdl/test/sample.wav +0 -0
- data/ext/alphatau/native/sdl/test/shapes/p01_shape24.bmp +0 -0
- data/ext/alphatau/native/sdl/test/shapes/p01_shape32alpha.bmp +0 -0
- data/ext/alphatau/native/sdl/test/shapes/p01_shape8.bmp +0 -0
- data/ext/alphatau/native/sdl/test/shapes/p02_shape24.bmp +0 -0
- data/ext/alphatau/native/sdl/test/shapes/p02_shape32alpha.bmp +0 -0
- data/ext/alphatau/native/sdl/test/shapes/p02_shape8.bmp +0 -0
- data/ext/alphatau/native/sdl/test/shapes/p03_shape24.bmp +0 -0
- data/ext/alphatau/native/sdl/test/shapes/p03_shape8.bmp +0 -0
- data/ext/alphatau/native/sdl/test/shapes/p04_shape1.bmp +0 -0
- data/ext/alphatau/native/sdl/test/shapes/p04_shape24.bmp +0 -0
- data/ext/alphatau/native/sdl/test/shapes/p04_shape32alpha.bmp +0 -0
- data/ext/alphatau/native/sdl/test/shapes/p04_shape8.bmp +0 -0
- data/ext/alphatau/native/sdl/test/shapes/p05_shape8.bmp +0 -0
- data/ext/alphatau/native/sdl/test/shapes/p06_shape1alpha.bmp +0 -0
- data/ext/alphatau/native/sdl/test/shapes/p06_shape24.bmp +0 -0
- data/ext/alphatau/native/sdl/test/shapes/p06_shape32alpha.bmp +0 -0
- data/ext/alphatau/native/sdl/test/shapes/p06_shape8.bmp +0 -0
- data/ext/alphatau/native/sdl/test/shapes/p07_shape24.bmp +0 -0
- data/ext/alphatau/native/sdl/test/shapes/p07_shape32alpha.bmp +0 -0
- data/ext/alphatau/native/sdl/test/shapes/p07_shape8.bmp +0 -0
- data/ext/alphatau/native/sdl/test/shapes/p08_shape24.bmp +0 -0
- data/ext/alphatau/native/sdl/test/shapes/p08_shape32alpha.bmp +0 -0
- data/ext/alphatau/native/sdl/test/shapes/p08_shape8.bmp +0 -0
- data/ext/alphatau/native/sdl/test/shapes/p09_shape24.bmp +0 -0
- data/ext/alphatau/native/sdl/test/shapes/p09_shape32alpha.bmp +0 -0
- data/ext/alphatau/native/sdl/test/shapes/p09_shape8.bmp +0 -0
- data/ext/alphatau/native/sdl/test/shapes/p10_shape1.bmp +0 -0
- data/ext/alphatau/native/sdl/test/shapes/p10_shape24.bmp +0 -0
- data/ext/alphatau/native/sdl/test/shapes/p10_shape32alpha.bmp +0 -0
- data/ext/alphatau/native/sdl/test/shapes/p10_shape8.bmp +0 -0
- data/ext/alphatau/native/sdl/test/shapes/p11_shape24.bmp +0 -0
- data/ext/alphatau/native/sdl/test/shapes/p11_shape32alpha.bmp +0 -0
- data/ext/alphatau/native/sdl/test/shapes/p11_shape8.bmp +0 -0
- data/ext/alphatau/native/sdl/test/shapes/p12_shape24.bmp +0 -0
- data/ext/alphatau/native/sdl/test/shapes/p12_shape8.bmp +0 -0
- data/ext/alphatau/native/sdl/test/shapes/p13_shape24.bmp +0 -0
- data/ext/alphatau/native/sdl/test/shapes/p13_shape32alpha.bmp +0 -0
- data/ext/alphatau/native/sdl/test/shapes/p13_shape8.bmp +0 -0
- data/ext/alphatau/native/sdl/test/shapes/p14_shape24.bmp +0 -0
- data/ext/alphatau/native/sdl/test/shapes/p14_shape8.bmp +0 -0
- data/ext/alphatau/native/sdl/test/shapes/p15_shape24.bmp +0 -0
- data/ext/alphatau/native/sdl/test/shapes/p15_shape32alpha.bmp +0 -0
- data/ext/alphatau/native/sdl/test/shapes/p15_shape8.bmp +0 -0
- data/ext/alphatau/native/sdl/test/shapes/p16_shape1.bmp +0 -0
- data/ext/alphatau/native/sdl/test/shapes/p16_shape24.bmp +0 -0
- data/ext/alphatau/native/sdl/test/shapes/p16_shape8.bmp +0 -0
- data/ext/alphatau/native/sdl/test/shapes/trollface_24.bmp +0 -0
- data/ext/alphatau/native/sdl/test/shapes/trollface_32alpha.bmp +0 -0
- data/ext/alphatau/native/sdl/test/testatomic.c +727 -0
- data/ext/alphatau/native/sdl/test/testaudiocapture.c +165 -0
- data/ext/alphatau/native/sdl/test/testaudiohotplug.c +203 -0
- data/ext/alphatau/native/sdl/test/testaudioinfo.c +74 -0
- data/ext/alphatau/native/sdl/test/testautomation.c +124 -0
- data/ext/alphatau/native/sdl/test/testautomation_audio.c +1038 -0
- data/ext/alphatau/native/sdl/test/testautomation_clipboard.c +184 -0
- data/ext/alphatau/native/sdl/test/testautomation_events.c +201 -0
- data/ext/alphatau/native/sdl/test/testautomation_hints.c +168 -0
- data/ext/alphatau/native/sdl/test/testautomation_keyboard.c +713 -0
- data/ext/alphatau/native/sdl/test/testautomation_main.c +157 -0
- data/ext/alphatau/native/sdl/test/testautomation_mouse.c +606 -0
- data/ext/alphatau/native/sdl/test/testautomation_pixels.c +529 -0
- data/ext/alphatau/native/sdl/test/testautomation_platform.c +584 -0
- data/ext/alphatau/native/sdl/test/testautomation_rect.c +1696 -0
- data/ext/alphatau/native/sdl/test/testautomation_render.c +1099 -0
- data/ext/alphatau/native/sdl/test/testautomation_rwops.c +748 -0
- data/ext/alphatau/native/sdl/test/testautomation_sdltest.c +1319 -0
- data/ext/alphatau/native/sdl/test/testautomation_stdlib.c +319 -0
- data/ext/alphatau/native/sdl/test/testautomation_suites.h +54 -0
- data/ext/alphatau/native/sdl/test/testautomation_surface.c +647 -0
- data/ext/alphatau/native/sdl/test/testautomation_syswm.c +61 -0
- data/ext/alphatau/native/sdl/test/testautomation_timer.c +201 -0
- data/ext/alphatau/native/sdl/test/testautomation_video.c +1811 -0
- data/ext/alphatau/native/sdl/test/testbounds.c +40 -0
- data/ext/alphatau/native/sdl/test/testcustomcursor.c +259 -0
- data/ext/alphatau/native/sdl/test/testdisplayinfo.c +96 -0
- data/ext/alphatau/native/sdl/test/testdraw2.c +305 -0
- data/ext/alphatau/native/sdl/test/testdrawchessboard.c +147 -0
- data/ext/alphatau/native/sdl/test/testdropfile.c +98 -0
- data/ext/alphatau/native/sdl/test/testerror.c +76 -0
- data/ext/alphatau/native/sdl/test/testfile.c +283 -0
- data/ext/alphatau/native/sdl/test/testfilesystem.c +60 -0
- data/ext/alphatau/native/sdl/test/testgamecontroller.c +375 -0
- data/ext/alphatau/native/sdl/test/testgesture.c +309 -0
- data/ext/alphatau/native/sdl/test/testgl2.c +416 -0
- data/ext/alphatau/native/sdl/test/testgles.c +355 -0
- data/ext/alphatau/native/sdl/test/testgles2.c +732 -0
- data/ext/alphatau/native/sdl/test/testhaptic.c +369 -0
- data/ext/alphatau/native/sdl/test/testhittesting.c +134 -0
- data/ext/alphatau/native/sdl/test/testhotplug.c +162 -0
- data/ext/alphatau/native/sdl/test/testiconv.c +88 -0
- data/ext/alphatau/native/sdl/test/testime.c +801 -0
- data/ext/alphatau/native/sdl/test/testintersections.c +363 -0
- data/ext/alphatau/native/sdl/test/testjoystick.c +387 -0
- data/ext/alphatau/native/sdl/test/testkeys.c +40 -0
- data/ext/alphatau/native/sdl/test/testloadso.c +82 -0
- data/ext/alphatau/native/sdl/test/testlock.c +128 -0
- data/ext/alphatau/native/sdl/test/testmessage.c +193 -0
- data/ext/alphatau/native/sdl/test/testmultiaudio.c +199 -0
- data/ext/alphatau/native/sdl/test/testnative.c +237 -0
- data/ext/alphatau/native/sdl/test/testnative.h +46 -0
- data/ext/alphatau/native/sdl/test/testnativecocoa.m +51 -0
- data/ext/alphatau/native/sdl/test/testnativew32.c +86 -0
- data/ext/alphatau/native/sdl/test/testnativex11.c +53 -0
- data/ext/alphatau/native/sdl/test/testoverlay2.c +408 -0
- data/ext/alphatau/native/sdl/test/testplatform.c +442 -0
- data/ext/alphatau/native/sdl/test/testpower.c +80 -0
- data/ext/alphatau/native/sdl/test/testqsort.c +108 -0
- data/ext/alphatau/native/sdl/test/testrelative.c +126 -0
- data/ext/alphatau/native/sdl/test/testrendercopyex.c +233 -0
- data/ext/alphatau/native/sdl/test/testrendertarget.c +335 -0
- data/ext/alphatau/native/sdl/test/testresample.c +120 -0
- data/ext/alphatau/native/sdl/test/testrumble.c +153 -0
- data/ext/alphatau/native/sdl/test/testscale.c +224 -0
- data/ext/alphatau/native/sdl/test/testsem.c +130 -0
- data/ext/alphatau/native/sdl/test/testsensor.c +117 -0
- data/ext/alphatau/native/sdl/test/testshader.c +500 -0
- data/ext/alphatau/native/sdl/test/testshape.c +200 -0
- data/ext/alphatau/native/sdl/test/testsprite2.c +409 -0
- data/ext/alphatau/native/sdl/test/testspriteminimal.c +194 -0
- data/ext/alphatau/native/sdl/test/teststreaming.c +190 -0
- data/ext/alphatau/native/sdl/test/testthread.c +130 -0
- data/ext/alphatau/native/sdl/test/testtimer.c +122 -0
- data/ext/alphatau/native/sdl/test/testver.c +47 -0
- data/ext/alphatau/native/sdl/test/testviewport.c +217 -0
- data/ext/alphatau/native/sdl/test/testvulkan.c +1201 -0
- data/ext/alphatau/native/sdl/test/testwm2.c +174 -0
- data/ext/alphatau/native/sdl/test/testyuv.bmp +0 -0
- data/ext/alphatau/native/sdl/test/testyuv.c +455 -0
- data/ext/alphatau/native/sdl/test/testyuv_cvt.c +300 -0
- data/ext/alphatau/native/sdl/test/testyuv_cvt.h +16 -0
- data/ext/alphatau/native/sdl/test/torturethread.c +113 -0
- data/ext/alphatau/native/sdl/test/utf8.txt +287 -0
- data/ext/alphatau/native/sdl/visualtest/COPYING.txt +18 -0
- data/ext/alphatau/native/sdl/visualtest/Makefile.in +37 -0
- data/ext/alphatau/native/sdl/visualtest/README.txt +214 -0
- data/ext/alphatau/native/sdl/visualtest/acinclude.m4 +359 -0
- data/ext/alphatau/native/sdl/visualtest/autogen.sh +12 -0
- data/ext/alphatau/native/sdl/visualtest/compile +1 -0
- data/ext/alphatau/native/sdl/visualtest/config.h +23 -0
- data/ext/alphatau/native/sdl/visualtest/config.h.in +22 -0
- data/ext/alphatau/native/sdl/visualtest/configs/testsprite2_blendmodes/testsprite2_blendmodes.actions +3 -0
- data/ext/alphatau/native/sdl/visualtest/configs/testsprite2_blendmodes/testsprite2_blendmodes.config +5 -0
- data/ext/alphatau/native/sdl/visualtest/configs/testsprite2_blendmodes/testsprite2_blendmodes.parameters +5 -0
- data/ext/alphatau/native/sdl/visualtest/configs/testsprite2_crashtest/testsprite2_crashtest.actions +1 -0
- data/ext/alphatau/native/sdl/visualtest/configs/testsprite2_crashtest/testsprite2_crashtest.config +5 -0
- data/ext/alphatau/native/sdl/visualtest/configs/testsprite2_crashtest/testsprite2_crashtest.parameters +24 -0
- data/ext/alphatau/native/sdl/visualtest/configs/testsprite2_fullscreen/testsprite2_fullscreen.actions +3 -0
- data/ext/alphatau/native/sdl/visualtest/configs/testsprite2_fullscreen/testsprite2_fullscreen.config +5 -0
- data/ext/alphatau/native/sdl/visualtest/configs/testsprite2_fullscreen/testsprite2_fullscreen.parameters +5 -0
- data/ext/alphatau/native/sdl/visualtest/configs/testsprite2_geometry/testsprite2_geometry.actions +3 -0
- data/ext/alphatau/native/sdl/visualtest/configs/testsprite2_geometry/testsprite2_geometry.config +5 -0
- data/ext/alphatau/native/sdl/visualtest/configs/testsprite2_geometry/testsprite2_geometry.parameters +5 -0
- data/ext/alphatau/native/sdl/visualtest/configure +5203 -0
- data/ext/alphatau/native/sdl/visualtest/configure.in +166 -0
- data/ext/alphatau/native/sdl/visualtest/depcomp +1 -0
- data/ext/alphatau/native/sdl/visualtest/docs/Doxyfile +1936 -0
- data/ext/alphatau/native/sdl/visualtest/include/SDL_visualtest_action_configparser.h +149 -0
- data/ext/alphatau/native/sdl/visualtest/include/SDL_visualtest_exhaustive_variator.h +64 -0
- data/ext/alphatau/native/sdl/visualtest/include/SDL_visualtest_harness_argparser.h +75 -0
- data/ext/alphatau/native/sdl/visualtest/include/SDL_visualtest_mischelper.h +28 -0
- data/ext/alphatau/native/sdl/visualtest/include/SDL_visualtest_parsehelper.h +46 -0
- data/ext/alphatau/native/sdl/visualtest/include/SDL_visualtest_process.h +112 -0
- data/ext/alphatau/native/sdl/visualtest/include/SDL_visualtest_random_variator.h +61 -0
- data/ext/alphatau/native/sdl/visualtest/include/SDL_visualtest_rwhelper.h +87 -0
- data/ext/alphatau/native/sdl/visualtest/include/SDL_visualtest_screenshot.h +52 -0
- data/ext/alphatau/native/sdl/visualtest/include/SDL_visualtest_sut_configparser.h +105 -0
- data/ext/alphatau/native/sdl/visualtest/include/SDL_visualtest_variator_common.h +122 -0
- data/ext/alphatau/native/sdl/visualtest/include/SDL_visualtest_variators.h +66 -0
- data/ext/alphatau/native/sdl/visualtest/install-sh +1 -0
- data/ext/alphatau/native/sdl/visualtest/launch_harness.cmd +2 -0
- data/ext/alphatau/native/sdl/visualtest/launch_harness.sh +6 -0
- data/ext/alphatau/native/sdl/visualtest/missing +1 -0
- data/ext/alphatau/native/sdl/visualtest/src/action_configparser.c +396 -0
- data/ext/alphatau/native/sdl/visualtest/src/harness_argparser.c +358 -0
- data/ext/alphatau/native/sdl/visualtest/src/linux/linux_process.c +199 -0
- data/ext/alphatau/native/sdl/visualtest/src/mischelper.c +28 -0
- data/ext/alphatau/native/sdl/visualtest/src/parsehelper.c +231 -0
- data/ext/alphatau/native/sdl/visualtest/src/rwhelper.c +131 -0
- data/ext/alphatau/native/sdl/visualtest/src/screenshot.c +136 -0
- data/ext/alphatau/native/sdl/visualtest/src/sut_configparser.c +232 -0
- data/ext/alphatau/native/sdl/visualtest/src/testharness.c +533 -0
- data/ext/alphatau/native/sdl/visualtest/src/variator_common.c +225 -0
- data/ext/alphatau/native/sdl/visualtest/src/variator_exhaustive.c +132 -0
- data/ext/alphatau/native/sdl/visualtest/src/variator_random.c +111 -0
- data/ext/alphatau/native/sdl/visualtest/src/variators.c +93 -0
- data/ext/alphatau/native/sdl/visualtest/src/windows/windows_process.c +284 -0
- data/ext/alphatau/native/sdl/visualtest/src/windows/windows_screenshot.c +349 -0
- data/ext/alphatau/native/sdl/visualtest/stamp-h1 +1 -0
- data/ext/alphatau/native/sdl/visualtest/testsprite2_sample.actions +3 -0
- data/ext/alphatau/native/sdl/visualtest/testsprite2_sample.config +6 -0
- data/ext/alphatau/native/sdl/visualtest/testsprite2_sample.parameters +29 -0
- data/ext/alphatau/native/sdl/visualtest/unittest/testquit.actions +1 -0
- data/ext/alphatau/native/sdl/visualtest/unittest/testquit.c +101 -0
- data/ext/alphatau/native/sdl/visualtest/unittest/testquit.config +5 -0
- data/ext/alphatau/native/sdl/visualtest/unittest/testquit.parameters +3 -0
- data/ext/alphatau/native/sdl/wayland-protocols/pointer-constraints-unstable-v1.xml +339 -0
- data/ext/alphatau/native/sdl/wayland-protocols/relative-pointer-unstable-v1.xml +136 -0
- data/ext/alphatau/native/sdl/wayland-protocols/wayland.xml +2746 -0
- data/ext/alphatau/native/sdl/wayland-protocols/xdg-shell-unstable-v6.xml +1044 -0
- data/ext/alphatau/native/sdl/wayland-protocols/xdg-shell.xml +1120 -0
- data/lib/alphatau.rb +12 -0
- data/lib/alphatau/version.rb +3 -0
- metadata +1465 -0
@@ -0,0 +1,155 @@
|
|
1
|
+
/*
|
2
|
+
Simple DirectMedia Layer
|
3
|
+
Copyright (C) 1997-2018 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
|
+
#include "../../SDL_internal.h"
|
22
|
+
|
23
|
+
#ifndef SDL_cocoawindow_h_
|
24
|
+
#define SDL_cocoawindow_h_
|
25
|
+
|
26
|
+
#import <Cocoa/Cocoa.h>
|
27
|
+
|
28
|
+
#if SDL_VIDEO_OPENGL_EGL
|
29
|
+
#include "../SDL_egl_c.h"
|
30
|
+
#endif
|
31
|
+
|
32
|
+
typedef struct SDL_WindowData SDL_WindowData;
|
33
|
+
|
34
|
+
typedef enum
|
35
|
+
{
|
36
|
+
PENDING_OPERATION_NONE,
|
37
|
+
PENDING_OPERATION_ENTER_FULLSCREEN,
|
38
|
+
PENDING_OPERATION_LEAVE_FULLSCREEN,
|
39
|
+
PENDING_OPERATION_MINIMIZE
|
40
|
+
} PendingWindowOperation;
|
41
|
+
|
42
|
+
@interface Cocoa_WindowListener : NSResponder <NSWindowDelegate> {
|
43
|
+
SDL_WindowData *_data;
|
44
|
+
BOOL observingVisible;
|
45
|
+
BOOL wasCtrlLeft;
|
46
|
+
BOOL wasVisible;
|
47
|
+
BOOL isFullscreenSpace;
|
48
|
+
BOOL inFullscreenTransition;
|
49
|
+
PendingWindowOperation pendingWindowOperation;
|
50
|
+
BOOL isMoving;
|
51
|
+
int pendingWindowWarpX, pendingWindowWarpY;
|
52
|
+
BOOL isDragAreaRunning;
|
53
|
+
}
|
54
|
+
|
55
|
+
-(void) listen:(SDL_WindowData *) data;
|
56
|
+
-(void) pauseVisibleObservation;
|
57
|
+
-(void) resumeVisibleObservation;
|
58
|
+
-(BOOL) setFullscreenSpace:(BOOL) state;
|
59
|
+
-(BOOL) isInFullscreenSpace;
|
60
|
+
-(BOOL) isInFullscreenSpaceTransition;
|
61
|
+
-(void) addPendingWindowOperation:(PendingWindowOperation) operation;
|
62
|
+
-(void) close;
|
63
|
+
|
64
|
+
-(BOOL) isMoving;
|
65
|
+
-(void) setPendingMoveX:(int)x Y:(int)y;
|
66
|
+
-(void) windowDidFinishMoving;
|
67
|
+
|
68
|
+
/* Window delegate functionality */
|
69
|
+
-(BOOL) windowShouldClose:(id) sender;
|
70
|
+
-(void) windowDidExpose:(NSNotification *) aNotification;
|
71
|
+
-(void) windowDidMove:(NSNotification *) aNotification;
|
72
|
+
-(void) windowDidResize:(NSNotification *) aNotification;
|
73
|
+
-(void) windowDidMiniaturize:(NSNotification *) aNotification;
|
74
|
+
-(void) windowDidDeminiaturize:(NSNotification *) aNotification;
|
75
|
+
-(void) windowDidBecomeKey:(NSNotification *) aNotification;
|
76
|
+
-(void) windowDidResignKey:(NSNotification *) aNotification;
|
77
|
+
-(void) windowDidChangeBackingProperties:(NSNotification *) aNotification;
|
78
|
+
-(void) windowWillEnterFullScreen:(NSNotification *) aNotification;
|
79
|
+
-(void) windowDidEnterFullScreen:(NSNotification *) aNotification;
|
80
|
+
-(void) windowWillExitFullScreen:(NSNotification *) aNotification;
|
81
|
+
-(void) windowDidExitFullScreen:(NSNotification *) aNotification;
|
82
|
+
-(NSApplicationPresentationOptions)window:(NSWindow *)window willUseFullScreenPresentationOptions:(NSApplicationPresentationOptions)proposedOptions;
|
83
|
+
|
84
|
+
/* See if event is in a drag area, toggle on window dragging. */
|
85
|
+
-(BOOL) processHitTest:(NSEvent *)theEvent;
|
86
|
+
|
87
|
+
/* Window event handling */
|
88
|
+
-(void) mouseDown:(NSEvent *) theEvent;
|
89
|
+
-(void) rightMouseDown:(NSEvent *) theEvent;
|
90
|
+
-(void) otherMouseDown:(NSEvent *) theEvent;
|
91
|
+
-(void) mouseUp:(NSEvent *) theEvent;
|
92
|
+
-(void) rightMouseUp:(NSEvent *) theEvent;
|
93
|
+
-(void) otherMouseUp:(NSEvent *) theEvent;
|
94
|
+
-(void) mouseMoved:(NSEvent *) theEvent;
|
95
|
+
-(void) mouseDragged:(NSEvent *) theEvent;
|
96
|
+
-(void) rightMouseDragged:(NSEvent *) theEvent;
|
97
|
+
-(void) otherMouseDragged:(NSEvent *) theEvent;
|
98
|
+
-(void) scrollWheel:(NSEvent *) theEvent;
|
99
|
+
-(void) touchesBeganWithEvent:(NSEvent *) theEvent;
|
100
|
+
-(void) touchesMovedWithEvent:(NSEvent *) theEvent;
|
101
|
+
-(void) touchesEndedWithEvent:(NSEvent *) theEvent;
|
102
|
+
-(void) touchesCancelledWithEvent:(NSEvent *) theEvent;
|
103
|
+
|
104
|
+
/* Touch event handling */
|
105
|
+
-(void) handleTouches:(NSTouchPhase) phase withEvent:(NSEvent*) theEvent;
|
106
|
+
|
107
|
+
@end
|
108
|
+
/* *INDENT-ON* */
|
109
|
+
|
110
|
+
@class SDLOpenGLContext;
|
111
|
+
|
112
|
+
struct SDL_WindowData
|
113
|
+
{
|
114
|
+
SDL_Window *window;
|
115
|
+
NSWindow *nswindow;
|
116
|
+
NSMutableArray *nscontexts;
|
117
|
+
SDL_bool created;
|
118
|
+
SDL_bool inWindowMove;
|
119
|
+
Cocoa_WindowListener *listener;
|
120
|
+
struct SDL_VideoData *videodata;
|
121
|
+
#if SDL_VIDEO_OPENGL_EGL
|
122
|
+
EGLSurface egl_surface;
|
123
|
+
#endif
|
124
|
+
};
|
125
|
+
|
126
|
+
extern int Cocoa_CreateWindow(_THIS, SDL_Window * window);
|
127
|
+
extern int Cocoa_CreateWindowFrom(_THIS, SDL_Window * window,
|
128
|
+
const void *data);
|
129
|
+
extern void Cocoa_SetWindowTitle(_THIS, SDL_Window * window);
|
130
|
+
extern void Cocoa_SetWindowIcon(_THIS, SDL_Window * window, SDL_Surface * icon);
|
131
|
+
extern void Cocoa_SetWindowPosition(_THIS, SDL_Window * window);
|
132
|
+
extern void Cocoa_SetWindowSize(_THIS, SDL_Window * window);
|
133
|
+
extern void Cocoa_SetWindowMinimumSize(_THIS, SDL_Window * window);
|
134
|
+
extern void Cocoa_SetWindowMaximumSize(_THIS, SDL_Window * window);
|
135
|
+
extern int Cocoa_SetWindowOpacity(_THIS, SDL_Window * window, float opacity);
|
136
|
+
extern void Cocoa_ShowWindow(_THIS, SDL_Window * window);
|
137
|
+
extern void Cocoa_HideWindow(_THIS, SDL_Window * window);
|
138
|
+
extern void Cocoa_RaiseWindow(_THIS, SDL_Window * window);
|
139
|
+
extern void Cocoa_MaximizeWindow(_THIS, SDL_Window * window);
|
140
|
+
extern void Cocoa_MinimizeWindow(_THIS, SDL_Window * window);
|
141
|
+
extern void Cocoa_RestoreWindow(_THIS, SDL_Window * window);
|
142
|
+
extern void Cocoa_SetWindowBordered(_THIS, SDL_Window * window, SDL_bool bordered);
|
143
|
+
extern void Cocoa_SetWindowResizable(_THIS, SDL_Window * window, SDL_bool resizable);
|
144
|
+
extern void Cocoa_SetWindowFullscreen(_THIS, SDL_Window * window, SDL_VideoDisplay * display, SDL_bool fullscreen);
|
145
|
+
extern int Cocoa_SetWindowGammaRamp(_THIS, SDL_Window * window, const Uint16 * ramp);
|
146
|
+
extern int Cocoa_GetWindowGammaRamp(_THIS, SDL_Window * window, Uint16 * ramp);
|
147
|
+
extern void Cocoa_SetWindowGrab(_THIS, SDL_Window * window, SDL_bool grabbed);
|
148
|
+
extern void Cocoa_DestroyWindow(_THIS, SDL_Window * window);
|
149
|
+
extern SDL_bool Cocoa_GetWindowWMInfo(_THIS, SDL_Window * window, struct SDL_SysWMinfo *info);
|
150
|
+
extern int Cocoa_SetWindowHitTest(SDL_Window *window, SDL_bool enabled);
|
151
|
+
extern void Cocoa_AcceptDragAndDrop(SDL_Window * window, SDL_bool accept);
|
152
|
+
|
153
|
+
#endif /* SDL_cocoawindow_h_ */
|
154
|
+
|
155
|
+
/* vi: set ts=4 sw=4 expandtab: */
|
@@ -0,0 +1,1885 @@
|
|
1
|
+
/*
|
2
|
+
Simple DirectMedia Layer
|
3
|
+
Copyright (C) 1997-2018 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
|
+
#include "../../SDL_internal.h"
|
22
|
+
|
23
|
+
#if SDL_VIDEO_DRIVER_COCOA
|
24
|
+
|
25
|
+
#if MAC_OS_X_VERSION_MAX_ALLOWED < 1070
|
26
|
+
# error SDL for Mac OS X must be built with a 10.7 SDK or above.
|
27
|
+
#endif /* MAC_OS_X_VERSION_MAX_ALLOWED < 1070 */
|
28
|
+
|
29
|
+
#include "SDL_syswm.h"
|
30
|
+
#include "SDL_timer.h" /* For SDL_GetTicks() */
|
31
|
+
#include "SDL_hints.h"
|
32
|
+
#include "../SDL_sysvideo.h"
|
33
|
+
#include "../../events/SDL_keyboard_c.h"
|
34
|
+
#include "../../events/SDL_mouse_c.h"
|
35
|
+
#include "../../events/SDL_touch_c.h"
|
36
|
+
#include "../../events/SDL_windowevents_c.h"
|
37
|
+
#include "../../events/SDL_dropevents_c.h"
|
38
|
+
#include "SDL_cocoavideo.h"
|
39
|
+
#include "SDL_cocoashape.h"
|
40
|
+
#include "SDL_cocoamouse.h"
|
41
|
+
#include "SDL_cocoamousetap.h"
|
42
|
+
#include "SDL_cocoaopengl.h"
|
43
|
+
#include "SDL_cocoaopengles.h"
|
44
|
+
#include "SDL_assert.h"
|
45
|
+
|
46
|
+
/* #define DEBUG_COCOAWINDOW */
|
47
|
+
|
48
|
+
#ifdef DEBUG_COCOAWINDOW
|
49
|
+
#define DLog(fmt, ...) printf("%s: " fmt "\n", __func__, ##__VA_ARGS__)
|
50
|
+
#else
|
51
|
+
#define DLog(...) do { } while (0)
|
52
|
+
#endif
|
53
|
+
|
54
|
+
|
55
|
+
#define FULLSCREEN_MASK (SDL_WINDOW_FULLSCREEN_DESKTOP | SDL_WINDOW_FULLSCREEN)
|
56
|
+
|
57
|
+
|
58
|
+
@interface SDLWindow : NSWindow <NSDraggingDestination>
|
59
|
+
/* These are needed for borderless/fullscreen windows */
|
60
|
+
- (BOOL)canBecomeKeyWindow;
|
61
|
+
- (BOOL)canBecomeMainWindow;
|
62
|
+
- (void)sendEvent:(NSEvent *)event;
|
63
|
+
- (void)doCommandBySelector:(SEL)aSelector;
|
64
|
+
|
65
|
+
/* Handle drag-and-drop of files onto the SDL window. */
|
66
|
+
- (NSDragOperation)draggingEntered:(id <NSDraggingInfo>)sender;
|
67
|
+
- (BOOL)performDragOperation:(id <NSDraggingInfo>)sender;
|
68
|
+
- (BOOL)wantsPeriodicDraggingUpdates;
|
69
|
+
- (BOOL)validateMenuItem:(NSMenuItem *)menuItem;
|
70
|
+
|
71
|
+
- (SDL_Window*)findSDLWindow;
|
72
|
+
@end
|
73
|
+
|
74
|
+
@implementation SDLWindow
|
75
|
+
|
76
|
+
- (BOOL)validateMenuItem:(NSMenuItem *)menuItem
|
77
|
+
{
|
78
|
+
/* Only allow using the macOS native fullscreen toggle menubar item if the
|
79
|
+
* window is resizable and not in a SDL fullscreen mode.
|
80
|
+
*/
|
81
|
+
if ([menuItem action] == @selector(toggleFullScreen:)) {
|
82
|
+
SDL_Window *window = [self findSDLWindow];
|
83
|
+
if (window == NULL) {
|
84
|
+
return NO;
|
85
|
+
} else if ((window->flags & (SDL_WINDOW_FULLSCREEN|SDL_WINDOW_FULLSCREEN_DESKTOP)) != 0) {
|
86
|
+
return NO;
|
87
|
+
} else if ((window->flags & SDL_WINDOW_RESIZABLE) == 0) {
|
88
|
+
return NO;
|
89
|
+
}
|
90
|
+
}
|
91
|
+
return [super validateMenuItem:menuItem];
|
92
|
+
}
|
93
|
+
|
94
|
+
- (BOOL)canBecomeKeyWindow
|
95
|
+
{
|
96
|
+
return YES;
|
97
|
+
}
|
98
|
+
|
99
|
+
- (BOOL)canBecomeMainWindow
|
100
|
+
{
|
101
|
+
return YES;
|
102
|
+
}
|
103
|
+
|
104
|
+
- (void)sendEvent:(NSEvent *)event
|
105
|
+
{
|
106
|
+
[super sendEvent:event];
|
107
|
+
|
108
|
+
if ([event type] != NSEventTypeLeftMouseUp) {
|
109
|
+
return;
|
110
|
+
}
|
111
|
+
|
112
|
+
id delegate = [self delegate];
|
113
|
+
if (![delegate isKindOfClass:[Cocoa_WindowListener class]]) {
|
114
|
+
return;
|
115
|
+
}
|
116
|
+
|
117
|
+
if ([delegate isMoving]) {
|
118
|
+
[delegate windowDidFinishMoving];
|
119
|
+
}
|
120
|
+
}
|
121
|
+
|
122
|
+
/* We'll respond to selectors by doing nothing so we don't beep.
|
123
|
+
* The escape key gets converted to a "cancel" selector, etc.
|
124
|
+
*/
|
125
|
+
- (void)doCommandBySelector:(SEL)aSelector
|
126
|
+
{
|
127
|
+
/*NSLog(@"doCommandBySelector: %@\n", NSStringFromSelector(aSelector));*/
|
128
|
+
}
|
129
|
+
|
130
|
+
- (NSDragOperation)draggingEntered:(id <NSDraggingInfo>)sender
|
131
|
+
{
|
132
|
+
if (([sender draggingSourceOperationMask] & NSDragOperationGeneric) == NSDragOperationGeneric) {
|
133
|
+
return NSDragOperationGeneric;
|
134
|
+
}
|
135
|
+
|
136
|
+
return NSDragOperationNone; /* no idea what to do with this, reject it. */
|
137
|
+
}
|
138
|
+
|
139
|
+
- (BOOL)performDragOperation:(id <NSDraggingInfo>)sender
|
140
|
+
{ @autoreleasepool
|
141
|
+
{
|
142
|
+
NSPasteboard *pasteboard = [sender draggingPasteboard];
|
143
|
+
NSArray *types = [NSArray arrayWithObject:NSFilenamesPboardType];
|
144
|
+
NSString *desiredType = [pasteboard availableTypeFromArray:types];
|
145
|
+
SDL_Window *sdlwindow = [self findSDLWindow];
|
146
|
+
|
147
|
+
if (desiredType == nil) {
|
148
|
+
return NO; /* can't accept anything that's being dropped here. */
|
149
|
+
}
|
150
|
+
|
151
|
+
NSData *data = [pasteboard dataForType:desiredType];
|
152
|
+
if (data == nil) {
|
153
|
+
return NO;
|
154
|
+
}
|
155
|
+
|
156
|
+
SDL_assert([desiredType isEqualToString:NSFilenamesPboardType]);
|
157
|
+
NSArray *array = [pasteboard propertyListForType:@"NSFilenamesPboardType"];
|
158
|
+
|
159
|
+
for (NSString *path in array) {
|
160
|
+
NSURL *fileURL = [NSURL fileURLWithPath:path];
|
161
|
+
NSNumber *isAlias = nil;
|
162
|
+
|
163
|
+
[fileURL getResourceValue:&isAlias forKey:NSURLIsAliasFileKey error:nil];
|
164
|
+
|
165
|
+
/* If the URL is an alias, resolve it. */
|
166
|
+
if ([isAlias boolValue]) {
|
167
|
+
NSURLBookmarkResolutionOptions opts = NSURLBookmarkResolutionWithoutMounting | NSURLBookmarkResolutionWithoutUI;
|
168
|
+
NSData *bookmark = [NSURL bookmarkDataWithContentsOfURL:fileURL error:nil];
|
169
|
+
if (bookmark != nil) {
|
170
|
+
NSURL *resolvedURL = [NSURL URLByResolvingBookmarkData:bookmark
|
171
|
+
options:opts
|
172
|
+
relativeToURL:nil
|
173
|
+
bookmarkDataIsStale:nil
|
174
|
+
error:nil];
|
175
|
+
|
176
|
+
if (resolvedURL != nil) {
|
177
|
+
fileURL = resolvedURL;
|
178
|
+
}
|
179
|
+
}
|
180
|
+
}
|
181
|
+
|
182
|
+
if (!SDL_SendDropFile(sdlwindow, [[fileURL path] UTF8String])) {
|
183
|
+
return NO;
|
184
|
+
}
|
185
|
+
}
|
186
|
+
|
187
|
+
SDL_SendDropComplete(sdlwindow);
|
188
|
+
return YES;
|
189
|
+
}}
|
190
|
+
|
191
|
+
- (BOOL)wantsPeriodicDraggingUpdates
|
192
|
+
{
|
193
|
+
return NO;
|
194
|
+
}
|
195
|
+
|
196
|
+
- (SDL_Window*)findSDLWindow
|
197
|
+
{
|
198
|
+
SDL_Window *sdlwindow = NULL;
|
199
|
+
SDL_VideoDevice *_this = SDL_GetVideoDevice();
|
200
|
+
|
201
|
+
/* !!! FIXME: is there a better way to do this? */
|
202
|
+
if (_this) {
|
203
|
+
for (sdlwindow = _this->windows; sdlwindow; sdlwindow = sdlwindow->next) {
|
204
|
+
NSWindow *nswindow = ((SDL_WindowData *) sdlwindow->driverdata)->nswindow;
|
205
|
+
if (nswindow == self) {
|
206
|
+
break;
|
207
|
+
}
|
208
|
+
}
|
209
|
+
}
|
210
|
+
|
211
|
+
return sdlwindow;
|
212
|
+
}
|
213
|
+
|
214
|
+
@end
|
215
|
+
|
216
|
+
|
217
|
+
static Uint32 s_moveHack;
|
218
|
+
|
219
|
+
static void ConvertNSRect(NSScreen *screen, BOOL fullscreen, NSRect *r)
|
220
|
+
{
|
221
|
+
r->origin.y = CGDisplayPixelsHigh(kCGDirectMainDisplay) - r->origin.y - r->size.height;
|
222
|
+
}
|
223
|
+
|
224
|
+
static void
|
225
|
+
ScheduleContextUpdates(SDL_WindowData *data)
|
226
|
+
{
|
227
|
+
NSOpenGLContext *currentContext = [NSOpenGLContext currentContext];
|
228
|
+
NSMutableArray *contexts = data->nscontexts;
|
229
|
+
@synchronized (contexts) {
|
230
|
+
for (SDLOpenGLContext *context in contexts) {
|
231
|
+
if (context == currentContext) {
|
232
|
+
[context update];
|
233
|
+
} else {
|
234
|
+
[context scheduleUpdate];
|
235
|
+
}
|
236
|
+
}
|
237
|
+
}
|
238
|
+
}
|
239
|
+
|
240
|
+
/* !!! FIXME: this should use a hint callback. */
|
241
|
+
static int
|
242
|
+
GetHintCtrlClickEmulateRightClick()
|
243
|
+
{
|
244
|
+
return SDL_GetHintBoolean(SDL_HINT_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK, SDL_FALSE);
|
245
|
+
}
|
246
|
+
|
247
|
+
static NSUInteger
|
248
|
+
GetWindowStyle(SDL_Window * window)
|
249
|
+
{
|
250
|
+
NSUInteger style = 0;
|
251
|
+
|
252
|
+
if (window->flags & SDL_WINDOW_FULLSCREEN) {
|
253
|
+
style = NSWindowStyleMaskBorderless;
|
254
|
+
} else {
|
255
|
+
if (window->flags & SDL_WINDOW_BORDERLESS) {
|
256
|
+
style = NSWindowStyleMaskBorderless;
|
257
|
+
} else {
|
258
|
+
style = (NSWindowStyleMaskTitled|NSWindowStyleMaskClosable|NSWindowStyleMaskMiniaturizable);
|
259
|
+
}
|
260
|
+
if (window->flags & SDL_WINDOW_RESIZABLE) {
|
261
|
+
style |= NSWindowStyleMaskResizable;
|
262
|
+
}
|
263
|
+
}
|
264
|
+
return style;
|
265
|
+
}
|
266
|
+
|
267
|
+
static SDL_bool
|
268
|
+
SetWindowStyle(SDL_Window * window, NSUInteger style)
|
269
|
+
{
|
270
|
+
SDL_WindowData *data = (SDL_WindowData *) window->driverdata;
|
271
|
+
NSWindow *nswindow = data->nswindow;
|
272
|
+
|
273
|
+
/* The view responder chain gets messed with during setStyleMask */
|
274
|
+
if ([[nswindow contentView] nextResponder] == data->listener) {
|
275
|
+
[[nswindow contentView] setNextResponder:nil];
|
276
|
+
}
|
277
|
+
|
278
|
+
[nswindow setStyleMask:style];
|
279
|
+
|
280
|
+
/* The view responder chain gets messed with during setStyleMask */
|
281
|
+
if ([[nswindow contentView] nextResponder] != data->listener) {
|
282
|
+
[[nswindow contentView] setNextResponder:data->listener];
|
283
|
+
}
|
284
|
+
|
285
|
+
return SDL_TRUE;
|
286
|
+
}
|
287
|
+
|
288
|
+
|
289
|
+
@implementation Cocoa_WindowListener
|
290
|
+
|
291
|
+
- (void)listen:(SDL_WindowData *)data
|
292
|
+
{
|
293
|
+
NSNotificationCenter *center;
|
294
|
+
NSWindow *window = data->nswindow;
|
295
|
+
NSView *view = [window contentView];
|
296
|
+
|
297
|
+
_data = data;
|
298
|
+
observingVisible = YES;
|
299
|
+
wasCtrlLeft = NO;
|
300
|
+
wasVisible = [window isVisible];
|
301
|
+
isFullscreenSpace = NO;
|
302
|
+
inFullscreenTransition = NO;
|
303
|
+
pendingWindowOperation = PENDING_OPERATION_NONE;
|
304
|
+
isMoving = NO;
|
305
|
+
isDragAreaRunning = NO;
|
306
|
+
|
307
|
+
center = [NSNotificationCenter defaultCenter];
|
308
|
+
|
309
|
+
if ([window delegate] != nil) {
|
310
|
+
[center addObserver:self selector:@selector(windowDidExpose:) name:NSWindowDidExposeNotification object:window];
|
311
|
+
[center addObserver:self selector:@selector(windowDidMove:) name:NSWindowDidMoveNotification object:window];
|
312
|
+
[center addObserver:self selector:@selector(windowDidResize:) name:NSWindowDidResizeNotification object:window];
|
313
|
+
[center addObserver:self selector:@selector(windowDidMiniaturize:) name:NSWindowDidMiniaturizeNotification object:window];
|
314
|
+
[center addObserver:self selector:@selector(windowDidDeminiaturize:) name:NSWindowDidDeminiaturizeNotification object:window];
|
315
|
+
[center addObserver:self selector:@selector(windowDidBecomeKey:) name:NSWindowDidBecomeKeyNotification object:window];
|
316
|
+
[center addObserver:self selector:@selector(windowDidResignKey:) name:NSWindowDidResignKeyNotification object:window];
|
317
|
+
[center addObserver:self selector:@selector(windowDidChangeBackingProperties:) name:NSWindowDidChangeBackingPropertiesNotification object:window];
|
318
|
+
[center addObserver:self selector:@selector(windowWillEnterFullScreen:) name:NSWindowWillEnterFullScreenNotification object:window];
|
319
|
+
[center addObserver:self selector:@selector(windowDidEnterFullScreen:) name:NSWindowDidEnterFullScreenNotification object:window];
|
320
|
+
[center addObserver:self selector:@selector(windowWillExitFullScreen:) name:NSWindowWillExitFullScreenNotification object:window];
|
321
|
+
[center addObserver:self selector:@selector(windowDidExitFullScreen:) name:NSWindowDidExitFullScreenNotification object:window];
|
322
|
+
[center addObserver:self selector:@selector(windowDidFailToEnterFullScreen:) name:@"NSWindowDidFailToEnterFullScreenNotification" object:window];
|
323
|
+
[center addObserver:self selector:@selector(windowDidFailToExitFullScreen:) name:@"NSWindowDidFailToExitFullScreenNotification" object:window];
|
324
|
+
} else {
|
325
|
+
[window setDelegate:self];
|
326
|
+
}
|
327
|
+
|
328
|
+
/* Haven't found a delegate / notification that triggers when the window is
|
329
|
+
* ordered out (is not visible any more). You can be ordered out without
|
330
|
+
* minimizing, so DidMiniaturize doesn't work. (e.g. -[NSWindow orderOut:])
|
331
|
+
*/
|
332
|
+
[window addObserver:self
|
333
|
+
forKeyPath:@"visible"
|
334
|
+
options:NSKeyValueObservingOptionNew
|
335
|
+
context:NULL];
|
336
|
+
|
337
|
+
[window setNextResponder:self];
|
338
|
+
[window setAcceptsMouseMovedEvents:YES];
|
339
|
+
|
340
|
+
[view setNextResponder:self];
|
341
|
+
|
342
|
+
[view setAcceptsTouchEvents:YES];
|
343
|
+
}
|
344
|
+
|
345
|
+
- (void)observeValueForKeyPath:(NSString *)keyPath
|
346
|
+
ofObject:(id)object
|
347
|
+
change:(NSDictionary *)change
|
348
|
+
context:(void *)context
|
349
|
+
{
|
350
|
+
if (!observingVisible) {
|
351
|
+
return;
|
352
|
+
}
|
353
|
+
|
354
|
+
if (object == _data->nswindow && [keyPath isEqualToString:@"visible"]) {
|
355
|
+
int newVisibility = [[change objectForKey:@"new"] intValue];
|
356
|
+
if (newVisibility) {
|
357
|
+
SDL_SendWindowEvent(_data->window, SDL_WINDOWEVENT_SHOWN, 0, 0);
|
358
|
+
} else {
|
359
|
+
SDL_SendWindowEvent(_data->window, SDL_WINDOWEVENT_HIDDEN, 0, 0);
|
360
|
+
}
|
361
|
+
}
|
362
|
+
}
|
363
|
+
|
364
|
+
-(void) pauseVisibleObservation
|
365
|
+
{
|
366
|
+
observingVisible = NO;
|
367
|
+
wasVisible = [_data->nswindow isVisible];
|
368
|
+
}
|
369
|
+
|
370
|
+
-(void) resumeVisibleObservation
|
371
|
+
{
|
372
|
+
BOOL isVisible = [_data->nswindow isVisible];
|
373
|
+
observingVisible = YES;
|
374
|
+
if (wasVisible != isVisible) {
|
375
|
+
if (isVisible) {
|
376
|
+
SDL_SendWindowEvent(_data->window, SDL_WINDOWEVENT_SHOWN, 0, 0);
|
377
|
+
} else {
|
378
|
+
SDL_SendWindowEvent(_data->window, SDL_WINDOWEVENT_HIDDEN, 0, 0);
|
379
|
+
}
|
380
|
+
|
381
|
+
wasVisible = isVisible;
|
382
|
+
}
|
383
|
+
}
|
384
|
+
|
385
|
+
-(BOOL) setFullscreenSpace:(BOOL) state
|
386
|
+
{
|
387
|
+
SDL_Window *window = _data->window;
|
388
|
+
NSWindow *nswindow = _data->nswindow;
|
389
|
+
SDL_VideoData *videodata = ((SDL_WindowData *) window->driverdata)->videodata;
|
390
|
+
|
391
|
+
if (!videodata->allow_spaces) {
|
392
|
+
return NO; /* Spaces are forcibly disabled. */
|
393
|
+
} else if (state && ((window->flags & SDL_WINDOW_FULLSCREEN_DESKTOP) != SDL_WINDOW_FULLSCREEN_DESKTOP)) {
|
394
|
+
return NO; /* we only allow you to make a Space on FULLSCREEN_DESKTOP windows. */
|
395
|
+
} else if (!state && ((window->last_fullscreen_flags & SDL_WINDOW_FULLSCREEN_DESKTOP) != SDL_WINDOW_FULLSCREEN_DESKTOP)) {
|
396
|
+
return NO; /* we only handle leaving the Space on windows that were previously FULLSCREEN_DESKTOP. */
|
397
|
+
} else if (state == isFullscreenSpace) {
|
398
|
+
return YES; /* already there. */
|
399
|
+
}
|
400
|
+
|
401
|
+
if (inFullscreenTransition) {
|
402
|
+
if (state) {
|
403
|
+
[self addPendingWindowOperation:PENDING_OPERATION_ENTER_FULLSCREEN];
|
404
|
+
} else {
|
405
|
+
[self addPendingWindowOperation:PENDING_OPERATION_LEAVE_FULLSCREEN];
|
406
|
+
}
|
407
|
+
return YES;
|
408
|
+
}
|
409
|
+
inFullscreenTransition = YES;
|
410
|
+
|
411
|
+
/* you need to be FullScreenPrimary, or toggleFullScreen doesn't work. Unset it again in windowDidExitFullScreen. */
|
412
|
+
[nswindow setCollectionBehavior:NSWindowCollectionBehaviorFullScreenPrimary];
|
413
|
+
[nswindow performSelectorOnMainThread: @selector(toggleFullScreen:) withObject:nswindow waitUntilDone:NO];
|
414
|
+
return YES;
|
415
|
+
}
|
416
|
+
|
417
|
+
-(BOOL) isInFullscreenSpace
|
418
|
+
{
|
419
|
+
return isFullscreenSpace;
|
420
|
+
}
|
421
|
+
|
422
|
+
-(BOOL) isInFullscreenSpaceTransition
|
423
|
+
{
|
424
|
+
return inFullscreenTransition;
|
425
|
+
}
|
426
|
+
|
427
|
+
-(void) addPendingWindowOperation:(PendingWindowOperation) operation
|
428
|
+
{
|
429
|
+
pendingWindowOperation = operation;
|
430
|
+
}
|
431
|
+
|
432
|
+
- (void)close
|
433
|
+
{
|
434
|
+
NSNotificationCenter *center;
|
435
|
+
NSWindow *window = _data->nswindow;
|
436
|
+
NSView *view = [window contentView];
|
437
|
+
|
438
|
+
center = [NSNotificationCenter defaultCenter];
|
439
|
+
|
440
|
+
if ([window delegate] != self) {
|
441
|
+
[center removeObserver:self name:NSWindowDidExposeNotification object:window];
|
442
|
+
[center removeObserver:self name:NSWindowDidMoveNotification object:window];
|
443
|
+
[center removeObserver:self name:NSWindowDidResizeNotification object:window];
|
444
|
+
[center removeObserver:self name:NSWindowDidMiniaturizeNotification object:window];
|
445
|
+
[center removeObserver:self name:NSWindowDidDeminiaturizeNotification object:window];
|
446
|
+
[center removeObserver:self name:NSWindowDidBecomeKeyNotification object:window];
|
447
|
+
[center removeObserver:self name:NSWindowDidResignKeyNotification object:window];
|
448
|
+
[center removeObserver:self name:NSWindowDidChangeBackingPropertiesNotification object:window];
|
449
|
+
[center removeObserver:self name:NSWindowWillEnterFullScreenNotification object:window];
|
450
|
+
[center removeObserver:self name:NSWindowDidEnterFullScreenNotification object:window];
|
451
|
+
[center removeObserver:self name:NSWindowWillExitFullScreenNotification object:window];
|
452
|
+
[center removeObserver:self name:NSWindowDidExitFullScreenNotification object:window];
|
453
|
+
[center removeObserver:self name:@"NSWindowDidFailToEnterFullScreenNotification" object:window];
|
454
|
+
[center removeObserver:self name:@"NSWindowDidFailToExitFullScreenNotification" object:window];
|
455
|
+
} else {
|
456
|
+
[window setDelegate:nil];
|
457
|
+
}
|
458
|
+
|
459
|
+
[window removeObserver:self forKeyPath:@"visible"];
|
460
|
+
|
461
|
+
if ([window nextResponder] == self) {
|
462
|
+
[window setNextResponder:nil];
|
463
|
+
}
|
464
|
+
if ([view nextResponder] == self) {
|
465
|
+
[view setNextResponder:nil];
|
466
|
+
}
|
467
|
+
}
|
468
|
+
|
469
|
+
- (BOOL)isMoving
|
470
|
+
{
|
471
|
+
return isMoving;
|
472
|
+
}
|
473
|
+
|
474
|
+
-(void) setPendingMoveX:(int)x Y:(int)y
|
475
|
+
{
|
476
|
+
pendingWindowWarpX = x;
|
477
|
+
pendingWindowWarpY = y;
|
478
|
+
}
|
479
|
+
|
480
|
+
- (void)windowDidFinishMoving
|
481
|
+
{
|
482
|
+
if ([self isMoving]) {
|
483
|
+
isMoving = NO;
|
484
|
+
|
485
|
+
SDL_Mouse *mouse = SDL_GetMouse();
|
486
|
+
if (pendingWindowWarpX != INT_MAX && pendingWindowWarpY != INT_MAX) {
|
487
|
+
mouse->WarpMouseGlobal(pendingWindowWarpX, pendingWindowWarpY);
|
488
|
+
pendingWindowWarpX = pendingWindowWarpY = INT_MAX;
|
489
|
+
}
|
490
|
+
if (mouse->relative_mode && !mouse->relative_mode_warp && mouse->focus == _data->window) {
|
491
|
+
mouse->SetRelativeMouseMode(SDL_TRUE);
|
492
|
+
}
|
493
|
+
}
|
494
|
+
}
|
495
|
+
|
496
|
+
- (BOOL)windowShouldClose:(id)sender
|
497
|
+
{
|
498
|
+
SDL_SendWindowEvent(_data->window, SDL_WINDOWEVENT_CLOSE, 0, 0);
|
499
|
+
return NO;
|
500
|
+
}
|
501
|
+
|
502
|
+
- (void)windowDidExpose:(NSNotification *)aNotification
|
503
|
+
{
|
504
|
+
SDL_SendWindowEvent(_data->window, SDL_WINDOWEVENT_EXPOSED, 0, 0);
|
505
|
+
}
|
506
|
+
|
507
|
+
- (void)windowWillMove:(NSNotification *)aNotification
|
508
|
+
{
|
509
|
+
if ([_data->nswindow isKindOfClass:[SDLWindow class]]) {
|
510
|
+
pendingWindowWarpX = pendingWindowWarpY = INT_MAX;
|
511
|
+
isMoving = YES;
|
512
|
+
}
|
513
|
+
}
|
514
|
+
|
515
|
+
- (void)windowDidMove:(NSNotification *)aNotification
|
516
|
+
{
|
517
|
+
int x, y;
|
518
|
+
SDL_Window *window = _data->window;
|
519
|
+
NSWindow *nswindow = _data->nswindow;
|
520
|
+
BOOL fullscreen = window->flags & FULLSCREEN_MASK;
|
521
|
+
NSRect rect = [nswindow contentRectForFrameRect:[nswindow frame]];
|
522
|
+
ConvertNSRect([nswindow screen], fullscreen, &rect);
|
523
|
+
|
524
|
+
if (inFullscreenTransition) {
|
525
|
+
/* We'll take care of this at the end of the transition */
|
526
|
+
return;
|
527
|
+
}
|
528
|
+
|
529
|
+
if (s_moveHack) {
|
530
|
+
SDL_bool blockMove = ((SDL_GetTicks() - s_moveHack) < 500);
|
531
|
+
|
532
|
+
s_moveHack = 0;
|
533
|
+
|
534
|
+
if (blockMove) {
|
535
|
+
/* Cocoa is adjusting the window in response to a mode change */
|
536
|
+
rect.origin.x = window->x;
|
537
|
+
rect.origin.y = window->y;
|
538
|
+
ConvertNSRect([nswindow screen], fullscreen, &rect);
|
539
|
+
[nswindow setFrameOrigin:rect.origin];
|
540
|
+
return;
|
541
|
+
}
|
542
|
+
}
|
543
|
+
|
544
|
+
x = (int)rect.origin.x;
|
545
|
+
y = (int)rect.origin.y;
|
546
|
+
|
547
|
+
ScheduleContextUpdates(_data);
|
548
|
+
|
549
|
+
SDL_SendWindowEvent(window, SDL_WINDOWEVENT_MOVED, x, y);
|
550
|
+
}
|
551
|
+
|
552
|
+
- (void)windowDidResize:(NSNotification *)aNotification
|
553
|
+
{
|
554
|
+
if (inFullscreenTransition) {
|
555
|
+
/* We'll take care of this at the end of the transition */
|
556
|
+
return;
|
557
|
+
}
|
558
|
+
|
559
|
+
SDL_Window *window = _data->window;
|
560
|
+
NSWindow *nswindow = _data->nswindow;
|
561
|
+
int x, y, w, h;
|
562
|
+
NSRect rect = [nswindow contentRectForFrameRect:[nswindow frame]];
|
563
|
+
ConvertNSRect([nswindow screen], (window->flags & FULLSCREEN_MASK), &rect);
|
564
|
+
x = (int)rect.origin.x;
|
565
|
+
y = (int)rect.origin.y;
|
566
|
+
w = (int)rect.size.width;
|
567
|
+
h = (int)rect.size.height;
|
568
|
+
|
569
|
+
if (SDL_IsShapedWindow(window)) {
|
570
|
+
Cocoa_ResizeWindowShape(window);
|
571
|
+
}
|
572
|
+
|
573
|
+
ScheduleContextUpdates(_data);
|
574
|
+
|
575
|
+
/* The window can move during a resize event, such as when maximizing
|
576
|
+
or resizing from a corner */
|
577
|
+
SDL_SendWindowEvent(window, SDL_WINDOWEVENT_MOVED, x, y);
|
578
|
+
SDL_SendWindowEvent(window, SDL_WINDOWEVENT_RESIZED, w, h);
|
579
|
+
|
580
|
+
const BOOL zoomed = [nswindow isZoomed];
|
581
|
+
if (!zoomed) {
|
582
|
+
SDL_SendWindowEvent(window, SDL_WINDOWEVENT_RESTORED, 0, 0);
|
583
|
+
} else if (zoomed) {
|
584
|
+
SDL_SendWindowEvent(window, SDL_WINDOWEVENT_MAXIMIZED, 0, 0);
|
585
|
+
}
|
586
|
+
}
|
587
|
+
|
588
|
+
- (void)windowDidMiniaturize:(NSNotification *)aNotification
|
589
|
+
{
|
590
|
+
SDL_SendWindowEvent(_data->window, SDL_WINDOWEVENT_MINIMIZED, 0, 0);
|
591
|
+
}
|
592
|
+
|
593
|
+
- (void)windowDidDeminiaturize:(NSNotification *)aNotification
|
594
|
+
{
|
595
|
+
SDL_SendWindowEvent(_data->window, SDL_WINDOWEVENT_RESTORED, 0, 0);
|
596
|
+
}
|
597
|
+
|
598
|
+
- (void)windowDidBecomeKey:(NSNotification *)aNotification
|
599
|
+
{
|
600
|
+
SDL_Window *window = _data->window;
|
601
|
+
SDL_Mouse *mouse = SDL_GetMouse();
|
602
|
+
|
603
|
+
/* We're going to get keyboard events, since we're key. */
|
604
|
+
/* This needs to be done before restoring the relative mouse mode. */
|
605
|
+
SDL_SetKeyboardFocus(window);
|
606
|
+
|
607
|
+
if (mouse->relative_mode && !mouse->relative_mode_warp && ![self isMoving]) {
|
608
|
+
mouse->SetRelativeMouseMode(SDL_TRUE);
|
609
|
+
}
|
610
|
+
|
611
|
+
/* If we just gained focus we need the updated mouse position */
|
612
|
+
if (!mouse->relative_mode) {
|
613
|
+
NSPoint point;
|
614
|
+
int x, y;
|
615
|
+
|
616
|
+
point = [_data->nswindow mouseLocationOutsideOfEventStream];
|
617
|
+
x = (int)point.x;
|
618
|
+
y = (int)(window->h - point.y);
|
619
|
+
|
620
|
+
if (x >= 0 && x < window->w && y >= 0 && y < window->h) {
|
621
|
+
SDL_SendMouseMotion(window, 0, 0, x, y);
|
622
|
+
}
|
623
|
+
}
|
624
|
+
|
625
|
+
/* Check to see if someone updated the clipboard */
|
626
|
+
Cocoa_CheckClipboardUpdate(_data->videodata);
|
627
|
+
|
628
|
+
if ((isFullscreenSpace) && ((window->flags & SDL_WINDOW_FULLSCREEN_DESKTOP) == SDL_WINDOW_FULLSCREEN_DESKTOP)) {
|
629
|
+
[NSMenu setMenuBarVisible:NO];
|
630
|
+
}
|
631
|
+
|
632
|
+
const unsigned int newflags = [NSEvent modifierFlags] & NSEventModifierFlagCapsLock;
|
633
|
+
_data->videodata->modifierFlags = (_data->videodata->modifierFlags & ~NSEventModifierFlagCapsLock) | newflags;
|
634
|
+
SDL_ToggleModState(KMOD_CAPS, newflags != 0);
|
635
|
+
}
|
636
|
+
|
637
|
+
- (void)windowDidResignKey:(NSNotification *)aNotification
|
638
|
+
{
|
639
|
+
SDL_Mouse *mouse = SDL_GetMouse();
|
640
|
+
if (mouse->relative_mode && !mouse->relative_mode_warp) {
|
641
|
+
mouse->SetRelativeMouseMode(SDL_FALSE);
|
642
|
+
}
|
643
|
+
|
644
|
+
/* Some other window will get mouse events, since we're not key. */
|
645
|
+
if (SDL_GetMouseFocus() == _data->window) {
|
646
|
+
SDL_SetMouseFocus(NULL);
|
647
|
+
}
|
648
|
+
|
649
|
+
/* Some other window will get keyboard events, since we're not key. */
|
650
|
+
if (SDL_GetKeyboardFocus() == _data->window) {
|
651
|
+
SDL_SetKeyboardFocus(NULL);
|
652
|
+
}
|
653
|
+
|
654
|
+
if (isFullscreenSpace) {
|
655
|
+
[NSMenu setMenuBarVisible:YES];
|
656
|
+
}
|
657
|
+
}
|
658
|
+
|
659
|
+
- (void)windowDidChangeBackingProperties:(NSNotification *)aNotification
|
660
|
+
{
|
661
|
+
NSNumber *oldscale = [[aNotification userInfo] objectForKey:NSBackingPropertyOldScaleFactorKey];
|
662
|
+
|
663
|
+
if (inFullscreenTransition) {
|
664
|
+
return;
|
665
|
+
}
|
666
|
+
|
667
|
+
if ([oldscale doubleValue] != [_data->nswindow backingScaleFactor]) {
|
668
|
+
/* Force a resize event when the backing scale factor changes. */
|
669
|
+
_data->window->w = 0;
|
670
|
+
_data->window->h = 0;
|
671
|
+
[self windowDidResize:aNotification];
|
672
|
+
}
|
673
|
+
}
|
674
|
+
|
675
|
+
- (void)windowWillEnterFullScreen:(NSNotification *)aNotification
|
676
|
+
{
|
677
|
+
SDL_Window *window = _data->window;
|
678
|
+
|
679
|
+
SetWindowStyle(window, (NSWindowStyleMaskTitled|NSWindowStyleMaskClosable|NSWindowStyleMaskMiniaturizable|NSWindowStyleMaskResizable));
|
680
|
+
|
681
|
+
isFullscreenSpace = YES;
|
682
|
+
inFullscreenTransition = YES;
|
683
|
+
}
|
684
|
+
|
685
|
+
- (void)windowDidFailToEnterFullScreen:(NSNotification *)aNotification
|
686
|
+
{
|
687
|
+
SDL_Window *window = _data->window;
|
688
|
+
|
689
|
+
if (window->is_destroying) {
|
690
|
+
return;
|
691
|
+
}
|
692
|
+
|
693
|
+
SetWindowStyle(window, GetWindowStyle(window));
|
694
|
+
|
695
|
+
isFullscreenSpace = NO;
|
696
|
+
inFullscreenTransition = NO;
|
697
|
+
|
698
|
+
[self windowDidExitFullScreen:nil];
|
699
|
+
}
|
700
|
+
|
701
|
+
- (void)windowDidEnterFullScreen:(NSNotification *)aNotification
|
702
|
+
{
|
703
|
+
SDL_Window *window = _data->window;
|
704
|
+
SDL_WindowData *data = (SDL_WindowData *) window->driverdata;
|
705
|
+
NSWindow *nswindow = data->nswindow;
|
706
|
+
|
707
|
+
inFullscreenTransition = NO;
|
708
|
+
|
709
|
+
if (pendingWindowOperation == PENDING_OPERATION_LEAVE_FULLSCREEN) {
|
710
|
+
pendingWindowOperation = PENDING_OPERATION_NONE;
|
711
|
+
[self setFullscreenSpace:NO];
|
712
|
+
} else {
|
713
|
+
/* Unset the resizable flag.
|
714
|
+
This is a workaround for https://bugzilla.libsdl.org/show_bug.cgi?id=3697
|
715
|
+
*/
|
716
|
+
SetWindowStyle(window, [nswindow styleMask] & (~NSWindowStyleMaskResizable));
|
717
|
+
|
718
|
+
if ((window->flags & SDL_WINDOW_FULLSCREEN_DESKTOP) == SDL_WINDOW_FULLSCREEN_DESKTOP) {
|
719
|
+
[NSMenu setMenuBarVisible:NO];
|
720
|
+
}
|
721
|
+
|
722
|
+
pendingWindowOperation = PENDING_OPERATION_NONE;
|
723
|
+
/* Force the size change event in case it was delivered earlier
|
724
|
+
while the window was still animating into place.
|
725
|
+
*/
|
726
|
+
window->w = 0;
|
727
|
+
window->h = 0;
|
728
|
+
[self windowDidMove:aNotification];
|
729
|
+
[self windowDidResize:aNotification];
|
730
|
+
}
|
731
|
+
}
|
732
|
+
|
733
|
+
- (void)windowWillExitFullScreen:(NSNotification *)aNotification
|
734
|
+
{
|
735
|
+
SDL_Window *window = _data->window;
|
736
|
+
|
737
|
+
isFullscreenSpace = NO;
|
738
|
+
inFullscreenTransition = YES;
|
739
|
+
|
740
|
+
/* As of OS X 10.11, the window seems to need to be resizable when exiting
|
741
|
+
a Space, in order for it to resize back to its windowed-mode size.
|
742
|
+
*/
|
743
|
+
SetWindowStyle(window, GetWindowStyle(window) | NSWindowStyleMaskResizable);
|
744
|
+
}
|
745
|
+
|
746
|
+
- (void)windowDidFailToExitFullScreen:(NSNotification *)aNotification
|
747
|
+
{
|
748
|
+
SDL_Window *window = _data->window;
|
749
|
+
|
750
|
+
if (window->is_destroying) {
|
751
|
+
return;
|
752
|
+
}
|
753
|
+
|
754
|
+
SetWindowStyle(window, (NSWindowStyleMaskTitled|NSWindowStyleMaskClosable|NSWindowStyleMaskMiniaturizable|NSWindowStyleMaskResizable));
|
755
|
+
|
756
|
+
isFullscreenSpace = YES;
|
757
|
+
inFullscreenTransition = NO;
|
758
|
+
|
759
|
+
[self windowDidEnterFullScreen:nil];
|
760
|
+
}
|
761
|
+
|
762
|
+
- (void)windowDidExitFullScreen:(NSNotification *)aNotification
|
763
|
+
{
|
764
|
+
SDL_Window *window = _data->window;
|
765
|
+
NSWindow *nswindow = _data->nswindow;
|
766
|
+
|
767
|
+
inFullscreenTransition = NO;
|
768
|
+
|
769
|
+
SetWindowStyle(window, GetWindowStyle(window));
|
770
|
+
|
771
|
+
[nswindow setLevel:kCGNormalWindowLevel];
|
772
|
+
|
773
|
+
if (pendingWindowOperation == PENDING_OPERATION_ENTER_FULLSCREEN) {
|
774
|
+
pendingWindowOperation = PENDING_OPERATION_NONE;
|
775
|
+
[self setFullscreenSpace:YES];
|
776
|
+
} else if (pendingWindowOperation == PENDING_OPERATION_MINIMIZE) {
|
777
|
+
pendingWindowOperation = PENDING_OPERATION_NONE;
|
778
|
+
[nswindow miniaturize:nil];
|
779
|
+
} else {
|
780
|
+
/* Adjust the fullscreen toggle button and readd menu now that we're here. */
|
781
|
+
if (window->flags & SDL_WINDOW_RESIZABLE) {
|
782
|
+
/* resizable windows are Spaces-friendly: they get the "go fullscreen" toggle button on their titlebar. */
|
783
|
+
[nswindow setCollectionBehavior:NSWindowCollectionBehaviorFullScreenPrimary];
|
784
|
+
} else {
|
785
|
+
[nswindow setCollectionBehavior:NSWindowCollectionBehaviorManaged];
|
786
|
+
}
|
787
|
+
[NSMenu setMenuBarVisible:YES];
|
788
|
+
|
789
|
+
pendingWindowOperation = PENDING_OPERATION_NONE;
|
790
|
+
|
791
|
+
#if 0
|
792
|
+
/* This fixed bug 3719, which is that changing window size while fullscreen
|
793
|
+
doesn't take effect when leaving fullscreen, but introduces bug 3809,
|
794
|
+
which is that a maximized window doesn't go back to normal size when
|
795
|
+
restored, so this code is disabled until we can properly handle the
|
796
|
+
beginning and end of maximize and restore.
|
797
|
+
*/
|
798
|
+
/* Restore windowed size and position in case it changed while fullscreen */
|
799
|
+
{
|
800
|
+
NSRect rect;
|
801
|
+
rect.origin.x = window->windowed.x;
|
802
|
+
rect.origin.y = window->windowed.y;
|
803
|
+
rect.size.width = window->windowed.w;
|
804
|
+
rect.size.height = window->windowed.h;
|
805
|
+
ConvertNSRect([nswindow screen], NO, &rect);
|
806
|
+
|
807
|
+
s_moveHack = 0;
|
808
|
+
[nswindow setContentSize:rect.size];
|
809
|
+
[nswindow setFrameOrigin:rect.origin];
|
810
|
+
s_moveHack = SDL_GetTicks();
|
811
|
+
}
|
812
|
+
#endif /* 0 */
|
813
|
+
|
814
|
+
/* Force the size change event in case it was delivered earlier
|
815
|
+
while the window was still animating into place.
|
816
|
+
*/
|
817
|
+
window->w = 0;
|
818
|
+
window->h = 0;
|
819
|
+
[self windowDidMove:aNotification];
|
820
|
+
[self windowDidResize:aNotification];
|
821
|
+
|
822
|
+
/* FIXME: Why does the window get hidden? */
|
823
|
+
if (window->flags & SDL_WINDOW_SHOWN) {
|
824
|
+
Cocoa_ShowWindow(SDL_GetVideoDevice(), window);
|
825
|
+
}
|
826
|
+
}
|
827
|
+
}
|
828
|
+
|
829
|
+
-(NSApplicationPresentationOptions)window:(NSWindow *)window willUseFullScreenPresentationOptions:(NSApplicationPresentationOptions)proposedOptions
|
830
|
+
{
|
831
|
+
if ((_data->window->flags & SDL_WINDOW_FULLSCREEN_DESKTOP) == SDL_WINDOW_FULLSCREEN_DESKTOP) {
|
832
|
+
return NSApplicationPresentationFullScreen | NSApplicationPresentationHideDock | NSApplicationPresentationHideMenuBar;
|
833
|
+
} else {
|
834
|
+
return proposedOptions;
|
835
|
+
}
|
836
|
+
}
|
837
|
+
|
838
|
+
|
839
|
+
/* We'll respond to key events by doing nothing so we don't beep.
|
840
|
+
* We could handle key messages here, but we lose some in the NSApp dispatch,
|
841
|
+
* where they get converted to action messages, etc.
|
842
|
+
*/
|
843
|
+
- (void)flagsChanged:(NSEvent *)theEvent
|
844
|
+
{
|
845
|
+
/*Cocoa_HandleKeyEvent(SDL_GetVideoDevice(), theEvent);*/
|
846
|
+
}
|
847
|
+
- (void)keyDown:(NSEvent *)theEvent
|
848
|
+
{
|
849
|
+
/*Cocoa_HandleKeyEvent(SDL_GetVideoDevice(), theEvent);*/
|
850
|
+
}
|
851
|
+
- (void)keyUp:(NSEvent *)theEvent
|
852
|
+
{
|
853
|
+
/*Cocoa_HandleKeyEvent(SDL_GetVideoDevice(), theEvent);*/
|
854
|
+
}
|
855
|
+
|
856
|
+
/* We'll respond to selectors by doing nothing so we don't beep.
|
857
|
+
* The escape key gets converted to a "cancel" selector, etc.
|
858
|
+
*/
|
859
|
+
- (void)doCommandBySelector:(SEL)aSelector
|
860
|
+
{
|
861
|
+
/*NSLog(@"doCommandBySelector: %@\n", NSStringFromSelector(aSelector));*/
|
862
|
+
}
|
863
|
+
|
864
|
+
- (BOOL)processHitTest:(NSEvent *)theEvent
|
865
|
+
{
|
866
|
+
SDL_assert(isDragAreaRunning == [_data->nswindow isMovableByWindowBackground]);
|
867
|
+
|
868
|
+
if (_data->window->hit_test) { /* if no hit-test, skip this. */
|
869
|
+
const NSPoint location = [theEvent locationInWindow];
|
870
|
+
const SDL_Point point = { (int) location.x, _data->window->h - (((int) location.y)-1) };
|
871
|
+
const SDL_HitTestResult rc = _data->window->hit_test(_data->window, &point, _data->window->hit_test_data);
|
872
|
+
if (rc == SDL_HITTEST_DRAGGABLE) {
|
873
|
+
if (!isDragAreaRunning) {
|
874
|
+
isDragAreaRunning = YES;
|
875
|
+
[_data->nswindow setMovableByWindowBackground:YES];
|
876
|
+
}
|
877
|
+
return YES; /* dragging! */
|
878
|
+
}
|
879
|
+
}
|
880
|
+
|
881
|
+
if (isDragAreaRunning) {
|
882
|
+
isDragAreaRunning = NO;
|
883
|
+
[_data->nswindow setMovableByWindowBackground:NO];
|
884
|
+
return YES; /* was dragging, drop event. */
|
885
|
+
}
|
886
|
+
|
887
|
+
return NO; /* not a special area, carry on. */
|
888
|
+
}
|
889
|
+
|
890
|
+
- (void)mouseDown:(NSEvent *)theEvent
|
891
|
+
{
|
892
|
+
int button;
|
893
|
+
int clicks;
|
894
|
+
|
895
|
+
/* Ignore events that aren't inside the client area (i.e. title bar.) */
|
896
|
+
if ([theEvent window]) {
|
897
|
+
NSRect windowRect = [[[theEvent window] contentView] frame];
|
898
|
+
if (!NSMouseInRect([theEvent locationInWindow], windowRect, NO)) {
|
899
|
+
return;
|
900
|
+
}
|
901
|
+
}
|
902
|
+
|
903
|
+
if ([self processHitTest:theEvent]) {
|
904
|
+
SDL_SendWindowEvent(_data->window, SDL_WINDOWEVENT_HIT_TEST, 0, 0);
|
905
|
+
return; /* dragging, drop event. */
|
906
|
+
}
|
907
|
+
|
908
|
+
switch ([theEvent buttonNumber]) {
|
909
|
+
case 0:
|
910
|
+
if (([theEvent modifierFlags] & NSEventModifierFlagControl) &&
|
911
|
+
GetHintCtrlClickEmulateRightClick()) {
|
912
|
+
wasCtrlLeft = YES;
|
913
|
+
button = SDL_BUTTON_RIGHT;
|
914
|
+
} else {
|
915
|
+
wasCtrlLeft = NO;
|
916
|
+
button = SDL_BUTTON_LEFT;
|
917
|
+
}
|
918
|
+
break;
|
919
|
+
case 1:
|
920
|
+
button = SDL_BUTTON_RIGHT;
|
921
|
+
break;
|
922
|
+
case 2:
|
923
|
+
button = SDL_BUTTON_MIDDLE;
|
924
|
+
break;
|
925
|
+
default:
|
926
|
+
button = (int) [theEvent buttonNumber] + 1;
|
927
|
+
break;
|
928
|
+
}
|
929
|
+
|
930
|
+
clicks = (int) [theEvent clickCount];
|
931
|
+
SDL_SendMouseButtonClicks(_data->window, 0, SDL_PRESSED, button, clicks);
|
932
|
+
}
|
933
|
+
|
934
|
+
- (void)rightMouseDown:(NSEvent *)theEvent
|
935
|
+
{
|
936
|
+
[self mouseDown:theEvent];
|
937
|
+
}
|
938
|
+
|
939
|
+
- (void)otherMouseDown:(NSEvent *)theEvent
|
940
|
+
{
|
941
|
+
[self mouseDown:theEvent];
|
942
|
+
}
|
943
|
+
|
944
|
+
- (void)mouseUp:(NSEvent *)theEvent
|
945
|
+
{
|
946
|
+
int button;
|
947
|
+
int clicks;
|
948
|
+
|
949
|
+
if ([self processHitTest:theEvent]) {
|
950
|
+
SDL_SendWindowEvent(_data->window, SDL_WINDOWEVENT_HIT_TEST, 0, 0);
|
951
|
+
return; /* stopped dragging, drop event. */
|
952
|
+
}
|
953
|
+
|
954
|
+
switch ([theEvent buttonNumber]) {
|
955
|
+
case 0:
|
956
|
+
if (wasCtrlLeft) {
|
957
|
+
button = SDL_BUTTON_RIGHT;
|
958
|
+
wasCtrlLeft = NO;
|
959
|
+
} else {
|
960
|
+
button = SDL_BUTTON_LEFT;
|
961
|
+
}
|
962
|
+
break;
|
963
|
+
case 1:
|
964
|
+
button = SDL_BUTTON_RIGHT;
|
965
|
+
break;
|
966
|
+
case 2:
|
967
|
+
button = SDL_BUTTON_MIDDLE;
|
968
|
+
break;
|
969
|
+
default:
|
970
|
+
button = (int) [theEvent buttonNumber] + 1;
|
971
|
+
break;
|
972
|
+
}
|
973
|
+
|
974
|
+
clicks = (int) [theEvent clickCount];
|
975
|
+
SDL_SendMouseButtonClicks(_data->window, 0, SDL_RELEASED, button, clicks);
|
976
|
+
}
|
977
|
+
|
978
|
+
- (void)rightMouseUp:(NSEvent *)theEvent
|
979
|
+
{
|
980
|
+
[self mouseUp:theEvent];
|
981
|
+
}
|
982
|
+
|
983
|
+
- (void)otherMouseUp:(NSEvent *)theEvent
|
984
|
+
{
|
985
|
+
[self mouseUp:theEvent];
|
986
|
+
}
|
987
|
+
|
988
|
+
- (void)mouseMoved:(NSEvent *)theEvent
|
989
|
+
{
|
990
|
+
SDL_Mouse *mouse = SDL_GetMouse();
|
991
|
+
SDL_Window *window = _data->window;
|
992
|
+
NSPoint point;
|
993
|
+
int x, y;
|
994
|
+
|
995
|
+
if ([self processHitTest:theEvent]) {
|
996
|
+
SDL_SendWindowEvent(window, SDL_WINDOWEVENT_HIT_TEST, 0, 0);
|
997
|
+
return; /* dragging, drop event. */
|
998
|
+
}
|
999
|
+
|
1000
|
+
if (mouse->relative_mode) {
|
1001
|
+
return;
|
1002
|
+
}
|
1003
|
+
|
1004
|
+
point = [theEvent locationInWindow];
|
1005
|
+
x = (int)point.x;
|
1006
|
+
y = (int)(window->h - point.y);
|
1007
|
+
|
1008
|
+
if (window->flags & SDL_WINDOW_INPUT_GRABBED) {
|
1009
|
+
if (x < 0 || x >= window->w || y < 0 || y >= window->h) {
|
1010
|
+
if (x < 0) {
|
1011
|
+
x = 0;
|
1012
|
+
} else if (x >= window->w) {
|
1013
|
+
x = window->w - 1;
|
1014
|
+
}
|
1015
|
+
if (y < 0) {
|
1016
|
+
y = 0;
|
1017
|
+
} else if (y >= window->h) {
|
1018
|
+
y = window->h - 1;
|
1019
|
+
}
|
1020
|
+
|
1021
|
+
#if !SDL_MAC_NO_SANDBOX
|
1022
|
+
CGPoint cgpoint;
|
1023
|
+
|
1024
|
+
/* When SDL_MAC_NO_SANDBOX is set, this is handled by
|
1025
|
+
* SDL_cocoamousetap.m.
|
1026
|
+
*/
|
1027
|
+
|
1028
|
+
cgpoint.x = window->x + x;
|
1029
|
+
cgpoint.y = window->y + y;
|
1030
|
+
|
1031
|
+
CGDisplayMoveCursorToPoint(kCGDirectMainDisplay, cgpoint);
|
1032
|
+
CGAssociateMouseAndMouseCursorPosition(YES);
|
1033
|
+
|
1034
|
+
Cocoa_HandleMouseWarp(cgpoint.x, cgpoint.y);
|
1035
|
+
#endif
|
1036
|
+
}
|
1037
|
+
}
|
1038
|
+
SDL_SendMouseMotion(window, 0, 0, x, y);
|
1039
|
+
}
|
1040
|
+
|
1041
|
+
- (void)mouseDragged:(NSEvent *)theEvent
|
1042
|
+
{
|
1043
|
+
[self mouseMoved:theEvent];
|
1044
|
+
}
|
1045
|
+
|
1046
|
+
- (void)rightMouseDragged:(NSEvent *)theEvent
|
1047
|
+
{
|
1048
|
+
[self mouseMoved:theEvent];
|
1049
|
+
}
|
1050
|
+
|
1051
|
+
- (void)otherMouseDragged:(NSEvent *)theEvent
|
1052
|
+
{
|
1053
|
+
[self mouseMoved:theEvent];
|
1054
|
+
}
|
1055
|
+
|
1056
|
+
- (void)scrollWheel:(NSEvent *)theEvent
|
1057
|
+
{
|
1058
|
+
Cocoa_HandleMouseWheel(_data->window, theEvent);
|
1059
|
+
}
|
1060
|
+
|
1061
|
+
- (void)touchesBeganWithEvent:(NSEvent *) theEvent
|
1062
|
+
{
|
1063
|
+
NSSet *touches = [theEvent touchesMatchingPhase:NSTouchPhaseAny inView:nil];
|
1064
|
+
int existingTouchCount = 0;
|
1065
|
+
|
1066
|
+
for (NSTouch* touch in touches) {
|
1067
|
+
if ([touch phase] != NSTouchPhaseBegan) {
|
1068
|
+
existingTouchCount++;
|
1069
|
+
}
|
1070
|
+
}
|
1071
|
+
if (existingTouchCount == 0) {
|
1072
|
+
SDL_TouchID touchID = (SDL_TouchID)(intptr_t)[[touches anyObject] device];
|
1073
|
+
int numFingers = SDL_GetNumTouchFingers(touchID);
|
1074
|
+
DLog("Reset Lost Fingers: %d", numFingers);
|
1075
|
+
for (--numFingers; numFingers >= 0; --numFingers) {
|
1076
|
+
SDL_Finger* finger = SDL_GetTouchFinger(touchID, numFingers);
|
1077
|
+
SDL_SendTouch(touchID, finger->id, SDL_FALSE, 0, 0, 0);
|
1078
|
+
}
|
1079
|
+
}
|
1080
|
+
|
1081
|
+
DLog("Began Fingers: %lu .. existing: %d", (unsigned long)[touches count], existingTouchCount);
|
1082
|
+
[self handleTouches:NSTouchPhaseBegan withEvent:theEvent];
|
1083
|
+
}
|
1084
|
+
|
1085
|
+
- (void)touchesMovedWithEvent:(NSEvent *) theEvent
|
1086
|
+
{
|
1087
|
+
[self handleTouches:NSTouchPhaseMoved withEvent:theEvent];
|
1088
|
+
}
|
1089
|
+
|
1090
|
+
- (void)touchesEndedWithEvent:(NSEvent *) theEvent
|
1091
|
+
{
|
1092
|
+
[self handleTouches:NSTouchPhaseEnded withEvent:theEvent];
|
1093
|
+
}
|
1094
|
+
|
1095
|
+
- (void)touchesCancelledWithEvent:(NSEvent *) theEvent
|
1096
|
+
{
|
1097
|
+
[self handleTouches:NSTouchPhaseCancelled withEvent:theEvent];
|
1098
|
+
}
|
1099
|
+
|
1100
|
+
- (void)handleTouches:(NSTouchPhase) phase withEvent:(NSEvent *) theEvent
|
1101
|
+
{
|
1102
|
+
NSSet *touches = [theEvent touchesMatchingPhase:phase inView:nil];
|
1103
|
+
|
1104
|
+
for (NSTouch *touch in touches) {
|
1105
|
+
const SDL_TouchID touchId = (SDL_TouchID)(intptr_t)[touch device];
|
1106
|
+
if (SDL_AddTouch(touchId, "") < 0) {
|
1107
|
+
return;
|
1108
|
+
}
|
1109
|
+
|
1110
|
+
const SDL_FingerID fingerId = (SDL_FingerID)(intptr_t)[touch identity];
|
1111
|
+
float x = [touch normalizedPosition].x;
|
1112
|
+
float y = [touch normalizedPosition].y;
|
1113
|
+
/* Make the origin the upper left instead of the lower left */
|
1114
|
+
y = 1.0f - y;
|
1115
|
+
|
1116
|
+
switch (phase) {
|
1117
|
+
case NSTouchPhaseBegan:
|
1118
|
+
SDL_SendTouch(touchId, fingerId, SDL_TRUE, x, y, 1.0f);
|
1119
|
+
break;
|
1120
|
+
case NSTouchPhaseEnded:
|
1121
|
+
case NSTouchPhaseCancelled:
|
1122
|
+
SDL_SendTouch(touchId, fingerId, SDL_FALSE, x, y, 1.0f);
|
1123
|
+
break;
|
1124
|
+
case NSTouchPhaseMoved:
|
1125
|
+
SDL_SendTouchMotion(touchId, fingerId, x, y, 1.0f);
|
1126
|
+
break;
|
1127
|
+
default:
|
1128
|
+
break;
|
1129
|
+
}
|
1130
|
+
}
|
1131
|
+
}
|
1132
|
+
|
1133
|
+
@end
|
1134
|
+
|
1135
|
+
@interface SDLView : NSView {
|
1136
|
+
SDL_Window *_sdlWindow;
|
1137
|
+
}
|
1138
|
+
|
1139
|
+
- (void)setSDLWindow:(SDL_Window*)window;
|
1140
|
+
|
1141
|
+
/* The default implementation doesn't pass rightMouseDown to responder chain */
|
1142
|
+
- (void)rightMouseDown:(NSEvent *)theEvent;
|
1143
|
+
- (BOOL)mouseDownCanMoveWindow;
|
1144
|
+
- (void)drawRect:(NSRect)dirtyRect;
|
1145
|
+
- (BOOL)acceptsFirstMouse:(NSEvent *)theEvent;
|
1146
|
+
@end
|
1147
|
+
|
1148
|
+
@implementation SDLView
|
1149
|
+
- (void)setSDLWindow:(SDL_Window*)window
|
1150
|
+
{
|
1151
|
+
_sdlWindow = window;
|
1152
|
+
}
|
1153
|
+
|
1154
|
+
- (void)drawRect:(NSRect)dirtyRect
|
1155
|
+
{
|
1156
|
+
/* Force the graphics context to clear to black so we don't get a flash of
|
1157
|
+
white until the app is ready to draw. In practice on modern macOS, this
|
1158
|
+
only gets called for window creation and other extraordinary events. */
|
1159
|
+
[[NSColor blackColor] setFill];
|
1160
|
+
NSRectFill(dirtyRect);
|
1161
|
+
SDL_SendWindowEvent(_sdlWindow, SDL_WINDOWEVENT_EXPOSED, 0, 0);
|
1162
|
+
}
|
1163
|
+
|
1164
|
+
- (void)rightMouseDown:(NSEvent *)theEvent
|
1165
|
+
{
|
1166
|
+
[[self nextResponder] rightMouseDown:theEvent];
|
1167
|
+
}
|
1168
|
+
|
1169
|
+
- (BOOL)mouseDownCanMoveWindow
|
1170
|
+
{
|
1171
|
+
/* Always say YES, but this doesn't do anything until we call
|
1172
|
+
-[NSWindow setMovableByWindowBackground:YES], which we ninja-toggle
|
1173
|
+
during mouse events when we're using a drag area. */
|
1174
|
+
return YES;
|
1175
|
+
}
|
1176
|
+
|
1177
|
+
- (void)resetCursorRects
|
1178
|
+
{
|
1179
|
+
[super resetCursorRects];
|
1180
|
+
SDL_Mouse *mouse = SDL_GetMouse();
|
1181
|
+
|
1182
|
+
if (mouse->cursor_shown && mouse->cur_cursor && !mouse->relative_mode) {
|
1183
|
+
[self addCursorRect:[self bounds]
|
1184
|
+
cursor:mouse->cur_cursor->driverdata];
|
1185
|
+
} else {
|
1186
|
+
[self addCursorRect:[self bounds]
|
1187
|
+
cursor:[NSCursor invisibleCursor]];
|
1188
|
+
}
|
1189
|
+
}
|
1190
|
+
|
1191
|
+
- (BOOL)acceptsFirstMouse:(NSEvent *)theEvent
|
1192
|
+
{
|
1193
|
+
if (SDL_GetHint(SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH)) {
|
1194
|
+
return SDL_GetHintBoolean(SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH, SDL_FALSE);
|
1195
|
+
} else {
|
1196
|
+
return SDL_GetHintBoolean("SDL_MAC_MOUSE_FOCUS_CLICKTHROUGH", SDL_FALSE);
|
1197
|
+
}
|
1198
|
+
}
|
1199
|
+
@end
|
1200
|
+
|
1201
|
+
static int
|
1202
|
+
SetupWindowData(_THIS, SDL_Window * window, NSWindow *nswindow, SDL_bool created)
|
1203
|
+
{ @autoreleasepool
|
1204
|
+
{
|
1205
|
+
SDL_VideoData *videodata = (SDL_VideoData *) _this->driverdata;
|
1206
|
+
SDL_WindowData *data;
|
1207
|
+
|
1208
|
+
/* Allocate the window data */
|
1209
|
+
window->driverdata = data = (SDL_WindowData *) SDL_calloc(1, sizeof(*data));
|
1210
|
+
if (!data) {
|
1211
|
+
return SDL_OutOfMemory();
|
1212
|
+
}
|
1213
|
+
data->window = window;
|
1214
|
+
data->nswindow = nswindow;
|
1215
|
+
data->created = created;
|
1216
|
+
data->videodata = videodata;
|
1217
|
+
data->nscontexts = [[NSMutableArray alloc] init];
|
1218
|
+
|
1219
|
+
/* Create an event listener for the window */
|
1220
|
+
data->listener = [[Cocoa_WindowListener alloc] init];
|
1221
|
+
|
1222
|
+
/* Fill in the SDL window with the window data */
|
1223
|
+
{
|
1224
|
+
NSRect rect = [nswindow contentRectForFrameRect:[nswindow frame]];
|
1225
|
+
ConvertNSRect([nswindow screen], (window->flags & FULLSCREEN_MASK), &rect);
|
1226
|
+
window->x = (int)rect.origin.x;
|
1227
|
+
window->y = (int)rect.origin.y;
|
1228
|
+
window->w = (int)rect.size.width;
|
1229
|
+
window->h = (int)rect.size.height;
|
1230
|
+
}
|
1231
|
+
|
1232
|
+
/* Set up the listener after we create the view */
|
1233
|
+
[data->listener listen:data];
|
1234
|
+
|
1235
|
+
if ([nswindow isVisible]) {
|
1236
|
+
window->flags |= SDL_WINDOW_SHOWN;
|
1237
|
+
} else {
|
1238
|
+
window->flags &= ~SDL_WINDOW_SHOWN;
|
1239
|
+
}
|
1240
|
+
|
1241
|
+
{
|
1242
|
+
unsigned long style = [nswindow styleMask];
|
1243
|
+
|
1244
|
+
if (style == NSWindowStyleMaskBorderless) {
|
1245
|
+
window->flags |= SDL_WINDOW_BORDERLESS;
|
1246
|
+
} else {
|
1247
|
+
window->flags &= ~SDL_WINDOW_BORDERLESS;
|
1248
|
+
}
|
1249
|
+
if (style & NSWindowStyleMaskResizable) {
|
1250
|
+
window->flags |= SDL_WINDOW_RESIZABLE;
|
1251
|
+
} else {
|
1252
|
+
window->flags &= ~SDL_WINDOW_RESIZABLE;
|
1253
|
+
}
|
1254
|
+
}
|
1255
|
+
|
1256
|
+
/* isZoomed always returns true if the window is not resizable */
|
1257
|
+
if ((window->flags & SDL_WINDOW_RESIZABLE) && [nswindow isZoomed]) {
|
1258
|
+
window->flags |= SDL_WINDOW_MAXIMIZED;
|
1259
|
+
} else {
|
1260
|
+
window->flags &= ~SDL_WINDOW_MAXIMIZED;
|
1261
|
+
}
|
1262
|
+
|
1263
|
+
if ([nswindow isMiniaturized]) {
|
1264
|
+
window->flags |= SDL_WINDOW_MINIMIZED;
|
1265
|
+
} else {
|
1266
|
+
window->flags &= ~SDL_WINDOW_MINIMIZED;
|
1267
|
+
}
|
1268
|
+
|
1269
|
+
if ([nswindow isKeyWindow]) {
|
1270
|
+
window->flags |= SDL_WINDOW_INPUT_FOCUS;
|
1271
|
+
SDL_SetKeyboardFocus(data->window);
|
1272
|
+
}
|
1273
|
+
|
1274
|
+
/* Prevents the window's "window device" from being destroyed when it is
|
1275
|
+
* hidden. See http://www.mikeash.com/pyblog/nsopenglcontext-and-one-shot.html
|
1276
|
+
*/
|
1277
|
+
[nswindow setOneShot:NO];
|
1278
|
+
|
1279
|
+
/* All done! */
|
1280
|
+
window->driverdata = data;
|
1281
|
+
return 0;
|
1282
|
+
}}
|
1283
|
+
|
1284
|
+
int
|
1285
|
+
Cocoa_CreateWindow(_THIS, SDL_Window * window)
|
1286
|
+
{ @autoreleasepool
|
1287
|
+
{
|
1288
|
+
SDL_VideoData *videodata = (SDL_VideoData *) _this->driverdata;
|
1289
|
+
NSWindow *nswindow;
|
1290
|
+
SDL_VideoDisplay *display = SDL_GetDisplayForWindow(window);
|
1291
|
+
NSRect rect;
|
1292
|
+
SDL_Rect bounds;
|
1293
|
+
NSUInteger style;
|
1294
|
+
NSArray *screens = [NSScreen screens];
|
1295
|
+
|
1296
|
+
Cocoa_GetDisplayBounds(_this, display, &bounds);
|
1297
|
+
rect.origin.x = window->x;
|
1298
|
+
rect.origin.y = window->y;
|
1299
|
+
rect.size.width = window->w;
|
1300
|
+
rect.size.height = window->h;
|
1301
|
+
ConvertNSRect([screens objectAtIndex:0], (window->flags & FULLSCREEN_MASK), &rect);
|
1302
|
+
|
1303
|
+
style = GetWindowStyle(window);
|
1304
|
+
|
1305
|
+
/* Figure out which screen to place this window */
|
1306
|
+
NSScreen *screen = nil;
|
1307
|
+
for (NSScreen *candidate in screens) {
|
1308
|
+
NSRect screenRect = [candidate frame];
|
1309
|
+
if (rect.origin.x >= screenRect.origin.x &&
|
1310
|
+
rect.origin.x < screenRect.origin.x + screenRect.size.width &&
|
1311
|
+
rect.origin.y >= screenRect.origin.y &&
|
1312
|
+
rect.origin.y < screenRect.origin.y + screenRect.size.height) {
|
1313
|
+
screen = candidate;
|
1314
|
+
rect.origin.x -= screenRect.origin.x;
|
1315
|
+
rect.origin.y -= screenRect.origin.y;
|
1316
|
+
}
|
1317
|
+
}
|
1318
|
+
|
1319
|
+
@try {
|
1320
|
+
nswindow = [[SDLWindow alloc] initWithContentRect:rect styleMask:style backing:NSBackingStoreBuffered defer:NO screen:screen];
|
1321
|
+
}
|
1322
|
+
@catch (NSException *e) {
|
1323
|
+
return SDL_SetError("%s", [[e reason] UTF8String]);
|
1324
|
+
}
|
1325
|
+
|
1326
|
+
if (videodata->allow_spaces) {
|
1327
|
+
SDL_assert(floor(NSAppKitVersionNumber) > NSAppKitVersionNumber10_6);
|
1328
|
+
SDL_assert([nswindow respondsToSelector:@selector(toggleFullScreen:)]);
|
1329
|
+
/* we put FULLSCREEN_DESKTOP windows in their own Space, without a toggle button or menubar, later */
|
1330
|
+
if (window->flags & SDL_WINDOW_RESIZABLE) {
|
1331
|
+
/* resizable windows are Spaces-friendly: they get the "go fullscreen" toggle button on their titlebar. */
|
1332
|
+
[nswindow setCollectionBehavior:NSWindowCollectionBehaviorFullScreenPrimary];
|
1333
|
+
}
|
1334
|
+
}
|
1335
|
+
|
1336
|
+
/* Create a default view for this window */
|
1337
|
+
rect = [nswindow contentRectForFrameRect:[nswindow frame]];
|
1338
|
+
SDLView *contentView = [[SDLView alloc] initWithFrame:rect];
|
1339
|
+
[contentView setSDLWindow:window];
|
1340
|
+
|
1341
|
+
if (window->flags & SDL_WINDOW_ALLOW_HIGHDPI) {
|
1342
|
+
if ([contentView respondsToSelector:@selector(setWantsBestResolutionOpenGLSurface:)]) {
|
1343
|
+
[contentView setWantsBestResolutionOpenGLSurface:YES];
|
1344
|
+
}
|
1345
|
+
}
|
1346
|
+
#if SDL_VIDEO_OPENGL_ES2
|
1347
|
+
#if SDL_VIDEO_OPENGL_EGL
|
1348
|
+
if ((window->flags & SDL_WINDOW_OPENGL) &&
|
1349
|
+
_this->gl_config.profile_mask == SDL_GL_CONTEXT_PROFILE_ES) {
|
1350
|
+
[contentView setWantsLayer:TRUE];
|
1351
|
+
}
|
1352
|
+
#endif /* SDL_VIDEO_OPENGL_EGL */
|
1353
|
+
#endif /* SDL_VIDEO_OPENGL_ES2 */
|
1354
|
+
[nswindow setContentView:contentView];
|
1355
|
+
[contentView release];
|
1356
|
+
|
1357
|
+
if (SetupWindowData(_this, window, nswindow, SDL_TRUE) < 0) {
|
1358
|
+
[nswindow release];
|
1359
|
+
return -1;
|
1360
|
+
}
|
1361
|
+
|
1362
|
+
if (!(window->flags & SDL_WINDOW_OPENGL)) {
|
1363
|
+
return 0;
|
1364
|
+
}
|
1365
|
+
|
1366
|
+
/* The rest of this macro mess is for OpenGL or OpenGL ES windows */
|
1367
|
+
#if SDL_VIDEO_OPENGL_ES2
|
1368
|
+
if (_this->gl_config.profile_mask == SDL_GL_CONTEXT_PROFILE_ES) {
|
1369
|
+
#if SDL_VIDEO_OPENGL_EGL
|
1370
|
+
if (Cocoa_GLES_SetupWindow(_this, window) < 0) {
|
1371
|
+
Cocoa_DestroyWindow(_this, window);
|
1372
|
+
return -1;
|
1373
|
+
}
|
1374
|
+
return 0;
|
1375
|
+
#else
|
1376
|
+
return SDL_SetError("Could not create GLES window surface (EGL support not configured)");
|
1377
|
+
#endif /* SDL_VIDEO_OPENGL_EGL */
|
1378
|
+
}
|
1379
|
+
#endif /* SDL_VIDEO_OPENGL_ES2 */
|
1380
|
+
return 0;
|
1381
|
+
}}
|
1382
|
+
|
1383
|
+
int
|
1384
|
+
Cocoa_CreateWindowFrom(_THIS, SDL_Window * window, const void *data)
|
1385
|
+
{ @autoreleasepool
|
1386
|
+
{
|
1387
|
+
NSWindow *nswindow = (NSWindow *) data;
|
1388
|
+
NSString *title;
|
1389
|
+
|
1390
|
+
/* Query the title from the existing window */
|
1391
|
+
title = [nswindow title];
|
1392
|
+
if (title) {
|
1393
|
+
window->title = SDL_strdup([title UTF8String]);
|
1394
|
+
}
|
1395
|
+
|
1396
|
+
return SetupWindowData(_this, window, nswindow, SDL_FALSE);
|
1397
|
+
}}
|
1398
|
+
|
1399
|
+
void
|
1400
|
+
Cocoa_SetWindowTitle(_THIS, SDL_Window * window)
|
1401
|
+
{ @autoreleasepool
|
1402
|
+
{
|
1403
|
+
const char *title = window->title ? window->title : "";
|
1404
|
+
NSWindow *nswindow = ((SDL_WindowData *) window->driverdata)->nswindow;
|
1405
|
+
NSString *string = [[NSString alloc] initWithUTF8String:title];
|
1406
|
+
[nswindow setTitle:string];
|
1407
|
+
[string release];
|
1408
|
+
}}
|
1409
|
+
|
1410
|
+
void
|
1411
|
+
Cocoa_SetWindowIcon(_THIS, SDL_Window * window, SDL_Surface * icon)
|
1412
|
+
{ @autoreleasepool
|
1413
|
+
{
|
1414
|
+
NSImage *nsimage = Cocoa_CreateImage(icon);
|
1415
|
+
|
1416
|
+
if (nsimage) {
|
1417
|
+
[NSApp setApplicationIconImage:nsimage];
|
1418
|
+
}
|
1419
|
+
}}
|
1420
|
+
|
1421
|
+
void
|
1422
|
+
Cocoa_SetWindowPosition(_THIS, SDL_Window * window)
|
1423
|
+
{ @autoreleasepool
|
1424
|
+
{
|
1425
|
+
SDL_WindowData *windata = (SDL_WindowData *) window->driverdata;
|
1426
|
+
NSWindow *nswindow = windata->nswindow;
|
1427
|
+
NSRect rect;
|
1428
|
+
Uint32 moveHack;
|
1429
|
+
|
1430
|
+
rect.origin.x = window->x;
|
1431
|
+
rect.origin.y = window->y;
|
1432
|
+
rect.size.width = window->w;
|
1433
|
+
rect.size.height = window->h;
|
1434
|
+
ConvertNSRect([nswindow screen], (window->flags & FULLSCREEN_MASK), &rect);
|
1435
|
+
|
1436
|
+
moveHack = s_moveHack;
|
1437
|
+
s_moveHack = 0;
|
1438
|
+
[nswindow setFrameOrigin:rect.origin];
|
1439
|
+
s_moveHack = moveHack;
|
1440
|
+
|
1441
|
+
ScheduleContextUpdates(windata);
|
1442
|
+
}}
|
1443
|
+
|
1444
|
+
void
|
1445
|
+
Cocoa_SetWindowSize(_THIS, SDL_Window * window)
|
1446
|
+
{ @autoreleasepool
|
1447
|
+
{
|
1448
|
+
SDL_WindowData *windata = (SDL_WindowData *) window->driverdata;
|
1449
|
+
NSWindow *nswindow = windata->nswindow;
|
1450
|
+
NSRect rect;
|
1451
|
+
Uint32 moveHack;
|
1452
|
+
|
1453
|
+
/* Cocoa will resize the window from the bottom-left rather than the
|
1454
|
+
* top-left when -[nswindow setContentSize:] is used, so we must set the
|
1455
|
+
* entire frame based on the new size, in order to preserve the position.
|
1456
|
+
*/
|
1457
|
+
rect.origin.x = window->x;
|
1458
|
+
rect.origin.y = window->y;
|
1459
|
+
rect.size.width = window->w;
|
1460
|
+
rect.size.height = window->h;
|
1461
|
+
ConvertNSRect([nswindow screen], (window->flags & FULLSCREEN_MASK), &rect);
|
1462
|
+
|
1463
|
+
moveHack = s_moveHack;
|
1464
|
+
s_moveHack = 0;
|
1465
|
+
[nswindow setFrame:[nswindow frameRectForContentRect:rect] display:YES];
|
1466
|
+
s_moveHack = moveHack;
|
1467
|
+
|
1468
|
+
ScheduleContextUpdates(windata);
|
1469
|
+
}}
|
1470
|
+
|
1471
|
+
void
|
1472
|
+
Cocoa_SetWindowMinimumSize(_THIS, SDL_Window * window)
|
1473
|
+
{ @autoreleasepool
|
1474
|
+
{
|
1475
|
+
SDL_WindowData *windata = (SDL_WindowData *) window->driverdata;
|
1476
|
+
|
1477
|
+
NSSize minSize;
|
1478
|
+
minSize.width = window->min_w;
|
1479
|
+
minSize.height = window->min_h;
|
1480
|
+
|
1481
|
+
[windata->nswindow setContentMinSize:minSize];
|
1482
|
+
}}
|
1483
|
+
|
1484
|
+
void
|
1485
|
+
Cocoa_SetWindowMaximumSize(_THIS, SDL_Window * window)
|
1486
|
+
{ @autoreleasepool
|
1487
|
+
{
|
1488
|
+
SDL_WindowData *windata = (SDL_WindowData *) window->driverdata;
|
1489
|
+
|
1490
|
+
NSSize maxSize;
|
1491
|
+
maxSize.width = window->max_w;
|
1492
|
+
maxSize.height = window->max_h;
|
1493
|
+
|
1494
|
+
[windata->nswindow setContentMaxSize:maxSize];
|
1495
|
+
}}
|
1496
|
+
|
1497
|
+
void
|
1498
|
+
Cocoa_ShowWindow(_THIS, SDL_Window * window)
|
1499
|
+
{ @autoreleasepool
|
1500
|
+
{
|
1501
|
+
SDL_WindowData *windowData = ((SDL_WindowData *) window->driverdata);
|
1502
|
+
NSWindow *nswindow = windowData->nswindow;
|
1503
|
+
|
1504
|
+
if (![nswindow isMiniaturized]) {
|
1505
|
+
[windowData->listener pauseVisibleObservation];
|
1506
|
+
[nswindow makeKeyAndOrderFront:nil];
|
1507
|
+
[windowData->listener resumeVisibleObservation];
|
1508
|
+
}
|
1509
|
+
}}
|
1510
|
+
|
1511
|
+
void
|
1512
|
+
Cocoa_HideWindow(_THIS, SDL_Window * window)
|
1513
|
+
{ @autoreleasepool
|
1514
|
+
{
|
1515
|
+
NSWindow *nswindow = ((SDL_WindowData *) window->driverdata)->nswindow;
|
1516
|
+
|
1517
|
+
[nswindow orderOut:nil];
|
1518
|
+
}}
|
1519
|
+
|
1520
|
+
void
|
1521
|
+
Cocoa_RaiseWindow(_THIS, SDL_Window * window)
|
1522
|
+
{ @autoreleasepool
|
1523
|
+
{
|
1524
|
+
SDL_WindowData *windowData = ((SDL_WindowData *) window->driverdata);
|
1525
|
+
NSWindow *nswindow = windowData->nswindow;
|
1526
|
+
|
1527
|
+
/* makeKeyAndOrderFront: has the side-effect of deminiaturizing and showing
|
1528
|
+
a minimized or hidden window, so check for that before showing it.
|
1529
|
+
*/
|
1530
|
+
[windowData->listener pauseVisibleObservation];
|
1531
|
+
if (![nswindow isMiniaturized] && [nswindow isVisible]) {
|
1532
|
+
[NSApp activateIgnoringOtherApps:YES];
|
1533
|
+
[nswindow makeKeyAndOrderFront:nil];
|
1534
|
+
}
|
1535
|
+
[windowData->listener resumeVisibleObservation];
|
1536
|
+
}}
|
1537
|
+
|
1538
|
+
void
|
1539
|
+
Cocoa_MaximizeWindow(_THIS, SDL_Window * window)
|
1540
|
+
{ @autoreleasepool
|
1541
|
+
{
|
1542
|
+
SDL_WindowData *windata = (SDL_WindowData *) window->driverdata;
|
1543
|
+
NSWindow *nswindow = windata->nswindow;
|
1544
|
+
|
1545
|
+
[nswindow zoom:nil];
|
1546
|
+
|
1547
|
+
ScheduleContextUpdates(windata);
|
1548
|
+
}}
|
1549
|
+
|
1550
|
+
void
|
1551
|
+
Cocoa_MinimizeWindow(_THIS, SDL_Window * window)
|
1552
|
+
{ @autoreleasepool
|
1553
|
+
{
|
1554
|
+
SDL_WindowData *data = (SDL_WindowData *) window->driverdata;
|
1555
|
+
NSWindow *nswindow = data->nswindow;
|
1556
|
+
|
1557
|
+
if ([data->listener isInFullscreenSpaceTransition]) {
|
1558
|
+
[data->listener addPendingWindowOperation:PENDING_OPERATION_MINIMIZE];
|
1559
|
+
} else {
|
1560
|
+
[nswindow miniaturize:nil];
|
1561
|
+
}
|
1562
|
+
}}
|
1563
|
+
|
1564
|
+
void
|
1565
|
+
Cocoa_RestoreWindow(_THIS, SDL_Window * window)
|
1566
|
+
{ @autoreleasepool
|
1567
|
+
{
|
1568
|
+
NSWindow *nswindow = ((SDL_WindowData *) window->driverdata)->nswindow;
|
1569
|
+
|
1570
|
+
if ([nswindow isMiniaturized]) {
|
1571
|
+
[nswindow deminiaturize:nil];
|
1572
|
+
} else if ((window->flags & SDL_WINDOW_RESIZABLE) && [nswindow isZoomed]) {
|
1573
|
+
[nswindow zoom:nil];
|
1574
|
+
}
|
1575
|
+
}}
|
1576
|
+
|
1577
|
+
void
|
1578
|
+
Cocoa_SetWindowBordered(_THIS, SDL_Window * window, SDL_bool bordered)
|
1579
|
+
{ @autoreleasepool
|
1580
|
+
{
|
1581
|
+
if (SetWindowStyle(window, GetWindowStyle(window))) {
|
1582
|
+
if (bordered) {
|
1583
|
+
Cocoa_SetWindowTitle(_this, window); /* this got blanked out. */
|
1584
|
+
}
|
1585
|
+
}
|
1586
|
+
}}
|
1587
|
+
|
1588
|
+
void
|
1589
|
+
Cocoa_SetWindowResizable(_THIS, SDL_Window * window, SDL_bool resizable)
|
1590
|
+
{ @autoreleasepool
|
1591
|
+
{
|
1592
|
+
/* Don't set this if we're in a space!
|
1593
|
+
* The window will get permanently stuck if resizable is false.
|
1594
|
+
* -flibit
|
1595
|
+
*/
|
1596
|
+
SDL_WindowData *data = (SDL_WindowData *) window->driverdata;
|
1597
|
+
Cocoa_WindowListener *listener = data->listener;
|
1598
|
+
if (![listener isInFullscreenSpace]) {
|
1599
|
+
SetWindowStyle(window, GetWindowStyle(window));
|
1600
|
+
}
|
1601
|
+
}}
|
1602
|
+
|
1603
|
+
void
|
1604
|
+
Cocoa_SetWindowFullscreen(_THIS, SDL_Window * window, SDL_VideoDisplay * display, SDL_bool fullscreen)
|
1605
|
+
{ @autoreleasepool
|
1606
|
+
{
|
1607
|
+
SDL_WindowData *data = (SDL_WindowData *) window->driverdata;
|
1608
|
+
NSWindow *nswindow = data->nswindow;
|
1609
|
+
NSRect rect;
|
1610
|
+
|
1611
|
+
/* The view responder chain gets messed with during setStyleMask */
|
1612
|
+
if ([[nswindow contentView] nextResponder] == data->listener) {
|
1613
|
+
[[nswindow contentView] setNextResponder:nil];
|
1614
|
+
}
|
1615
|
+
|
1616
|
+
if (fullscreen) {
|
1617
|
+
SDL_Rect bounds;
|
1618
|
+
|
1619
|
+
Cocoa_GetDisplayBounds(_this, display, &bounds);
|
1620
|
+
rect.origin.x = bounds.x;
|
1621
|
+
rect.origin.y = bounds.y;
|
1622
|
+
rect.size.width = bounds.w;
|
1623
|
+
rect.size.height = bounds.h;
|
1624
|
+
ConvertNSRect([nswindow screen], fullscreen, &rect);
|
1625
|
+
|
1626
|
+
/* Hack to fix origin on Mac OS X 10.4 */
|
1627
|
+
NSRect screenRect = [[nswindow screen] frame];
|
1628
|
+
if (screenRect.size.height >= 1.0f) {
|
1629
|
+
rect.origin.y += (screenRect.size.height - rect.size.height);
|
1630
|
+
}
|
1631
|
+
|
1632
|
+
[nswindow setStyleMask:NSWindowStyleMaskBorderless];
|
1633
|
+
} else {
|
1634
|
+
rect.origin.x = window->windowed.x;
|
1635
|
+
rect.origin.y = window->windowed.y;
|
1636
|
+
rect.size.width = window->windowed.w;
|
1637
|
+
rect.size.height = window->windowed.h;
|
1638
|
+
ConvertNSRect([nswindow screen], fullscreen, &rect);
|
1639
|
+
|
1640
|
+
[nswindow setStyleMask:GetWindowStyle(window)];
|
1641
|
+
|
1642
|
+
/* Hack to restore window decorations on Mac OS X 10.10 */
|
1643
|
+
NSRect frameRect = [nswindow frame];
|
1644
|
+
[nswindow setFrame:NSMakeRect(frameRect.origin.x, frameRect.origin.y, frameRect.size.width + 1, frameRect.size.height) display:NO];
|
1645
|
+
[nswindow setFrame:frameRect display:NO];
|
1646
|
+
}
|
1647
|
+
|
1648
|
+
/* The view responder chain gets messed with during setStyleMask */
|
1649
|
+
if ([[nswindow contentView] nextResponder] != data->listener) {
|
1650
|
+
[[nswindow contentView] setNextResponder:data->listener];
|
1651
|
+
}
|
1652
|
+
|
1653
|
+
s_moveHack = 0;
|
1654
|
+
[nswindow setContentSize:rect.size];
|
1655
|
+
[nswindow setFrameOrigin:rect.origin];
|
1656
|
+
s_moveHack = SDL_GetTicks();
|
1657
|
+
|
1658
|
+
/* When the window style changes the title is cleared */
|
1659
|
+
if (!fullscreen) {
|
1660
|
+
Cocoa_SetWindowTitle(_this, window);
|
1661
|
+
}
|
1662
|
+
|
1663
|
+
if (SDL_ShouldAllowTopmost() && fullscreen) {
|
1664
|
+
/* OpenGL is rendering to the window, so make it visible! */
|
1665
|
+
[nswindow setLevel:CGShieldingWindowLevel()];
|
1666
|
+
} else {
|
1667
|
+
[nswindow setLevel:kCGNormalWindowLevel];
|
1668
|
+
}
|
1669
|
+
|
1670
|
+
if ([nswindow isVisible] || fullscreen) {
|
1671
|
+
[data->listener pauseVisibleObservation];
|
1672
|
+
[nswindow makeKeyAndOrderFront:nil];
|
1673
|
+
[data->listener resumeVisibleObservation];
|
1674
|
+
}
|
1675
|
+
|
1676
|
+
ScheduleContextUpdates(data);
|
1677
|
+
}}
|
1678
|
+
|
1679
|
+
int
|
1680
|
+
Cocoa_SetWindowGammaRamp(_THIS, SDL_Window * window, const Uint16 * ramp)
|
1681
|
+
{
|
1682
|
+
SDL_VideoDisplay *display = SDL_GetDisplayForWindow(window);
|
1683
|
+
CGDirectDisplayID display_id = ((SDL_DisplayData *)display->driverdata)->display;
|
1684
|
+
const uint32_t tableSize = 256;
|
1685
|
+
CGGammaValue redTable[tableSize];
|
1686
|
+
CGGammaValue greenTable[tableSize];
|
1687
|
+
CGGammaValue blueTable[tableSize];
|
1688
|
+
uint32_t i;
|
1689
|
+
float inv65535 = 1.0f / 65535.0f;
|
1690
|
+
|
1691
|
+
/* Extract gamma values into separate tables, convert to floats between 0.0 and 1.0 */
|
1692
|
+
for (i = 0; i < 256; i++) {
|
1693
|
+
redTable[i] = ramp[0*256+i] * inv65535;
|
1694
|
+
greenTable[i] = ramp[1*256+i] * inv65535;
|
1695
|
+
blueTable[i] = ramp[2*256+i] * inv65535;
|
1696
|
+
}
|
1697
|
+
|
1698
|
+
if (CGSetDisplayTransferByTable(display_id, tableSize,
|
1699
|
+
redTable, greenTable, blueTable) != CGDisplayNoErr) {
|
1700
|
+
return SDL_SetError("CGSetDisplayTransferByTable()");
|
1701
|
+
}
|
1702
|
+
return 0;
|
1703
|
+
}
|
1704
|
+
|
1705
|
+
int
|
1706
|
+
Cocoa_GetWindowGammaRamp(_THIS, SDL_Window * window, Uint16 * ramp)
|
1707
|
+
{
|
1708
|
+
SDL_VideoDisplay *display = SDL_GetDisplayForWindow(window);
|
1709
|
+
CGDirectDisplayID display_id = ((SDL_DisplayData *)display->driverdata)->display;
|
1710
|
+
const uint32_t tableSize = 256;
|
1711
|
+
CGGammaValue redTable[tableSize];
|
1712
|
+
CGGammaValue greenTable[tableSize];
|
1713
|
+
CGGammaValue blueTable[tableSize];
|
1714
|
+
uint32_t i, tableCopied;
|
1715
|
+
|
1716
|
+
if (CGGetDisplayTransferByTable(display_id, tableSize,
|
1717
|
+
redTable, greenTable, blueTable, &tableCopied) != CGDisplayNoErr) {
|
1718
|
+
return SDL_SetError("CGGetDisplayTransferByTable()");
|
1719
|
+
}
|
1720
|
+
|
1721
|
+
for (i = 0; i < tableCopied; i++) {
|
1722
|
+
ramp[0*256+i] = (Uint16)(redTable[i] * 65535.0f);
|
1723
|
+
ramp[1*256+i] = (Uint16)(greenTable[i] * 65535.0f);
|
1724
|
+
ramp[2*256+i] = (Uint16)(blueTable[i] * 65535.0f);
|
1725
|
+
}
|
1726
|
+
return 0;
|
1727
|
+
}
|
1728
|
+
|
1729
|
+
void
|
1730
|
+
Cocoa_SetWindowGrab(_THIS, SDL_Window * window, SDL_bool grabbed)
|
1731
|
+
{
|
1732
|
+
SDL_Mouse *mouse = SDL_GetMouse();
|
1733
|
+
SDL_WindowData *data = (SDL_WindowData *) window->driverdata;
|
1734
|
+
|
1735
|
+
/* Enable or disable the event tap as necessary */
|
1736
|
+
Cocoa_EnableMouseEventTap(mouse->driverdata, grabbed);
|
1737
|
+
|
1738
|
+
/* Move the cursor to the nearest point in the window */
|
1739
|
+
if (grabbed && data && ![data->listener isMoving]) {
|
1740
|
+
int x, y;
|
1741
|
+
CGPoint cgpoint;
|
1742
|
+
|
1743
|
+
SDL_GetMouseState(&x, &y);
|
1744
|
+
cgpoint.x = window->x + x;
|
1745
|
+
cgpoint.y = window->y + y;
|
1746
|
+
|
1747
|
+
Cocoa_HandleMouseWarp(cgpoint.x, cgpoint.y);
|
1748
|
+
|
1749
|
+
DLog("Returning cursor to (%g, %g)", cgpoint.x, cgpoint.y);
|
1750
|
+
CGDisplayMoveCursorToPoint(kCGDirectMainDisplay, cgpoint);
|
1751
|
+
}
|
1752
|
+
|
1753
|
+
if ( data && (window->flags & SDL_WINDOW_FULLSCREEN) ) {
|
1754
|
+
if (SDL_ShouldAllowTopmost() && (window->flags & SDL_WINDOW_INPUT_FOCUS)
|
1755
|
+
&& ![data->listener isInFullscreenSpace]) {
|
1756
|
+
/* OpenGL is rendering to the window, so make it visible! */
|
1757
|
+
/* Doing this in 10.11 while in a Space breaks things (bug #3152) */
|
1758
|
+
[data->nswindow setLevel:CGShieldingWindowLevel()];
|
1759
|
+
} else {
|
1760
|
+
[data->nswindow setLevel:kCGNormalWindowLevel];
|
1761
|
+
}
|
1762
|
+
}
|
1763
|
+
}
|
1764
|
+
|
1765
|
+
void
|
1766
|
+
Cocoa_DestroyWindow(_THIS, SDL_Window * window)
|
1767
|
+
{ @autoreleasepool
|
1768
|
+
{
|
1769
|
+
SDL_WindowData *data = (SDL_WindowData *) window->driverdata;
|
1770
|
+
|
1771
|
+
if (data) {
|
1772
|
+
if ([data->listener isInFullscreenSpace]) {
|
1773
|
+
[NSMenu setMenuBarVisible:YES];
|
1774
|
+
}
|
1775
|
+
[data->listener close];
|
1776
|
+
[data->listener release];
|
1777
|
+
if (data->created) {
|
1778
|
+
[data->nswindow close];
|
1779
|
+
}
|
1780
|
+
|
1781
|
+
NSArray *contexts = [[data->nscontexts copy] autorelease];
|
1782
|
+
for (SDLOpenGLContext *context in contexts) {
|
1783
|
+
/* Calling setWindow:NULL causes the context to remove itself from the context list. */
|
1784
|
+
[context setWindow:NULL];
|
1785
|
+
}
|
1786
|
+
[data->nscontexts release];
|
1787
|
+
|
1788
|
+
SDL_free(data);
|
1789
|
+
}
|
1790
|
+
window->driverdata = NULL;
|
1791
|
+
}}
|
1792
|
+
|
1793
|
+
SDL_bool
|
1794
|
+
Cocoa_GetWindowWMInfo(_THIS, SDL_Window * window, SDL_SysWMinfo * info)
|
1795
|
+
{
|
1796
|
+
NSWindow *nswindow = ((SDL_WindowData *) window->driverdata)->nswindow;
|
1797
|
+
|
1798
|
+
if (info->version.major <= SDL_MAJOR_VERSION) {
|
1799
|
+
info->subsystem = SDL_SYSWM_COCOA;
|
1800
|
+
info->info.cocoa.window = nswindow;
|
1801
|
+
return SDL_TRUE;
|
1802
|
+
} else {
|
1803
|
+
SDL_SetError("Application not compiled with SDL %d.%d",
|
1804
|
+
SDL_MAJOR_VERSION, SDL_MINOR_VERSION);
|
1805
|
+
return SDL_FALSE;
|
1806
|
+
}
|
1807
|
+
}
|
1808
|
+
|
1809
|
+
SDL_bool
|
1810
|
+
Cocoa_IsWindowInFullscreenSpace(SDL_Window * window)
|
1811
|
+
{
|
1812
|
+
SDL_WindowData *data = (SDL_WindowData *) window->driverdata;
|
1813
|
+
|
1814
|
+
if ([data->listener isInFullscreenSpace]) {
|
1815
|
+
return SDL_TRUE;
|
1816
|
+
} else {
|
1817
|
+
return SDL_FALSE;
|
1818
|
+
}
|
1819
|
+
}
|
1820
|
+
|
1821
|
+
SDL_bool
|
1822
|
+
Cocoa_SetWindowFullscreenSpace(SDL_Window * window, SDL_bool state)
|
1823
|
+
{ @autoreleasepool
|
1824
|
+
{
|
1825
|
+
SDL_bool succeeded = SDL_FALSE;
|
1826
|
+
SDL_WindowData *data = (SDL_WindowData *) window->driverdata;
|
1827
|
+
|
1828
|
+
if ([data->listener setFullscreenSpace:(state ? YES : NO)]) {
|
1829
|
+
const int maxattempts = 3;
|
1830
|
+
int attempt = 0;
|
1831
|
+
while (++attempt <= maxattempts) {
|
1832
|
+
/* Wait for the transition to complete, so application changes
|
1833
|
+
take effect properly (e.g. setting the window size, etc.)
|
1834
|
+
*/
|
1835
|
+
const int limit = 10000;
|
1836
|
+
int count = 0;
|
1837
|
+
while ([data->listener isInFullscreenSpaceTransition]) {
|
1838
|
+
if ( ++count == limit ) {
|
1839
|
+
/* Uh oh, transition isn't completing. Should we assert? */
|
1840
|
+
break;
|
1841
|
+
}
|
1842
|
+
SDL_Delay(1);
|
1843
|
+
SDL_PumpEvents();
|
1844
|
+
}
|
1845
|
+
if ([data->listener isInFullscreenSpace] == (state ? YES : NO))
|
1846
|
+
break;
|
1847
|
+
/* Try again, the last attempt was interrupted by user gestures */
|
1848
|
+
if (![data->listener setFullscreenSpace:(state ? YES : NO)])
|
1849
|
+
break; /* ??? */
|
1850
|
+
}
|
1851
|
+
/* Return TRUE to prevent non-space fullscreen logic from running */
|
1852
|
+
succeeded = SDL_TRUE;
|
1853
|
+
}
|
1854
|
+
|
1855
|
+
return succeeded;
|
1856
|
+
}}
|
1857
|
+
|
1858
|
+
int
|
1859
|
+
Cocoa_SetWindowHitTest(SDL_Window * window, SDL_bool enabled)
|
1860
|
+
{
|
1861
|
+
return 0; /* just succeed, the real work is done elsewhere. */
|
1862
|
+
}
|
1863
|
+
|
1864
|
+
void
|
1865
|
+
Cocoa_AcceptDragAndDrop(SDL_Window * window, SDL_bool accept)
|
1866
|
+
{
|
1867
|
+
SDL_WindowData *data = (SDL_WindowData *) window->driverdata;
|
1868
|
+
if (accept) {
|
1869
|
+
[data->nswindow registerForDraggedTypes:[NSArray arrayWithObject:(NSString *)kUTTypeFileURL]];
|
1870
|
+
} else {
|
1871
|
+
[data->nswindow unregisterDraggedTypes];
|
1872
|
+
}
|
1873
|
+
}
|
1874
|
+
|
1875
|
+
int
|
1876
|
+
Cocoa_SetWindowOpacity(_THIS, SDL_Window * window, float opacity)
|
1877
|
+
{
|
1878
|
+
SDL_WindowData *data = (SDL_WindowData *) window->driverdata;
|
1879
|
+
[data->nswindow setAlphaValue:opacity];
|
1880
|
+
return 0;
|
1881
|
+
}
|
1882
|
+
|
1883
|
+
#endif /* SDL_VIDEO_DRIVER_COCOA */
|
1884
|
+
|
1885
|
+
/* vi: set ts=4 sw=4 expandtab: */
|