alphatau 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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,9 @@
|
|
|
1
|
+
HIDAPI - Multi-Platform library for
|
|
2
|
+
communication with HID devices.
|
|
3
|
+
|
|
4
|
+
Copyright 2009, Alan Ott, Signal 11 Software.
|
|
5
|
+
All Rights Reserved.
|
|
6
|
+
|
|
7
|
+
This software may be used by anyone for any reason so
|
|
8
|
+
long as the copyright notice in the source files
|
|
9
|
+
remains intact.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
HIDAPI can be used under one of three licenses.
|
|
2
|
+
|
|
3
|
+
1. The GNU General Public License, version 3.0, in LICENSE-gpl3.txt
|
|
4
|
+
2. A BSD-Style License, in LICENSE-bsd.txt.
|
|
5
|
+
3. The more liberal original HIDAPI license. LICENSE-orig.txt
|
|
6
|
+
|
|
7
|
+
The license chosen is at the discretion of the user of HIDAPI. For example:
|
|
8
|
+
1. An author of GPL software would likely use HIDAPI under the terms of the
|
|
9
|
+
GPL.
|
|
10
|
+
|
|
11
|
+
2. An author of commercial closed-source software would likely use HIDAPI
|
|
12
|
+
under the terms of the BSD-style license or the original HIDAPI license.
|
|
13
|
+
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
|
|
2
|
+
ACLOCAL_AMFLAGS = -I m4
|
|
3
|
+
|
|
4
|
+
if OS_FREEBSD
|
|
5
|
+
pkgconfigdir=$(prefix)/libdata/pkgconfig
|
|
6
|
+
else
|
|
7
|
+
pkgconfigdir=$(libdir)/pkgconfig
|
|
8
|
+
endif
|
|
9
|
+
|
|
10
|
+
if OS_LINUX
|
|
11
|
+
pkgconfig_DATA=pc/hidapi-hidraw.pc pc/hidapi-libusb.pc
|
|
12
|
+
else
|
|
13
|
+
pkgconfig_DATA=pc/hidapi.pc
|
|
14
|
+
endif
|
|
15
|
+
|
|
16
|
+
SUBDIRS=
|
|
17
|
+
|
|
18
|
+
if OS_LINUX
|
|
19
|
+
SUBDIRS += linux libusb
|
|
20
|
+
endif
|
|
21
|
+
|
|
22
|
+
if OS_DARWIN
|
|
23
|
+
SUBDIRS += mac
|
|
24
|
+
endif
|
|
25
|
+
|
|
26
|
+
if OS_IOS
|
|
27
|
+
SUBDIRS += ios
|
|
28
|
+
endif
|
|
29
|
+
|
|
30
|
+
if OS_FREEBSD
|
|
31
|
+
SUBDIRS += libusb
|
|
32
|
+
endif
|
|
33
|
+
|
|
34
|
+
if OS_KFREEBSD
|
|
35
|
+
SUBDIRS += libusb
|
|
36
|
+
endif
|
|
37
|
+
|
|
38
|
+
if OS_WINDOWS
|
|
39
|
+
SUBDIRS += windows
|
|
40
|
+
endif
|
|
41
|
+
|
|
42
|
+
SUBDIRS += hidtest
|
|
43
|
+
|
|
44
|
+
if BUILD_TESTGUI
|
|
45
|
+
SUBDIRS += testgui
|
|
46
|
+
endif
|
|
47
|
+
|
|
48
|
+
EXTRA_DIST = udev doxygen
|
|
49
|
+
|
|
50
|
+
dist_doc_DATA = \
|
|
51
|
+
README.txt \
|
|
52
|
+
AUTHORS.txt \
|
|
53
|
+
LICENSE-bsd.txt \
|
|
54
|
+
LICENSE-gpl3.txt \
|
|
55
|
+
LICENSE-orig.txt \
|
|
56
|
+
LICENSE.txt
|
|
57
|
+
|
|
58
|
+
SCMCLEAN_TARGETS= \
|
|
59
|
+
aclocal.m4 \
|
|
60
|
+
config.guess \
|
|
61
|
+
config.sub \
|
|
62
|
+
configure \
|
|
63
|
+
config.h.in \
|
|
64
|
+
depcomp \
|
|
65
|
+
install-sh \
|
|
66
|
+
ltmain.sh \
|
|
67
|
+
missing \
|
|
68
|
+
mac/Makefile.in \
|
|
69
|
+
testgui/Makefile.in \
|
|
70
|
+
libusb/Makefile.in \
|
|
71
|
+
Makefile.in \
|
|
72
|
+
linux/Makefile.in \
|
|
73
|
+
windows/Makefile.in \
|
|
74
|
+
m4/libtool.m4 \
|
|
75
|
+
m4/lt~obsolete.m4 \
|
|
76
|
+
m4/ltoptions.m4 \
|
|
77
|
+
m4/ltsugar.m4 \
|
|
78
|
+
m4/ltversion.m4
|
|
79
|
+
|
|
80
|
+
SCMCLEAN_DIR_TARGETS = \
|
|
81
|
+
autom4te.cache
|
|
82
|
+
|
|
83
|
+
scm-clean: distclean
|
|
84
|
+
rm -f $(SCMCLEAN_TARGETS)
|
|
85
|
+
rm -Rf $(SCMCLEAN_DIR_TARGETS)
|
|
@@ -0,0 +1,339 @@
|
|
|
1
|
+
HIDAPI library for Windows, Linux, FreeBSD and Mac OS X
|
|
2
|
+
=========================================================
|
|
3
|
+
|
|
4
|
+
About
|
|
5
|
+
======
|
|
6
|
+
|
|
7
|
+
HIDAPI is a multi-platform library which allows an application to interface
|
|
8
|
+
with USB and Bluetooth HID-Class devices on Windows, Linux, FreeBSD, and Mac
|
|
9
|
+
OS X. HIDAPI can be either built as a shared library (.so or .dll) or
|
|
10
|
+
can be embedded directly into a target application by adding a single source
|
|
11
|
+
file (per platform) and a single header.
|
|
12
|
+
|
|
13
|
+
HIDAPI has four back-ends:
|
|
14
|
+
* Windows (using hid.dll)
|
|
15
|
+
* Linux/hidraw (using the Kernel's hidraw driver)
|
|
16
|
+
* Linux/libusb (using libusb-1.0)
|
|
17
|
+
* FreeBSD (using libusb-1.0)
|
|
18
|
+
* Mac (using IOHidManager)
|
|
19
|
+
|
|
20
|
+
On Linux, either the hidraw or the libusb back-end can be used. There are
|
|
21
|
+
tradeoffs, and the functionality supported is slightly different.
|
|
22
|
+
|
|
23
|
+
Linux/hidraw (linux/hid.c):
|
|
24
|
+
This back-end uses the hidraw interface in the Linux kernel. While this
|
|
25
|
+
back-end will support both USB and Bluetooth, it has some limitations on
|
|
26
|
+
kernels prior to 2.6.39, including the inability to send or receive feature
|
|
27
|
+
reports. In addition, it will only communicate with devices which have
|
|
28
|
+
hidraw nodes associated with them. Keyboards, mice, and some other devices
|
|
29
|
+
which are blacklisted from having hidraw nodes will not work. Fortunately,
|
|
30
|
+
for nearly all the uses of hidraw, this is not a problem.
|
|
31
|
+
|
|
32
|
+
Linux/FreeBSD/libusb (libusb/hid.c):
|
|
33
|
+
This back-end uses libusb-1.0 to communicate directly to a USB device. This
|
|
34
|
+
back-end will of course not work with Bluetooth devices.
|
|
35
|
+
|
|
36
|
+
HIDAPI also comes with a Test GUI. The Test GUI is cross-platform and uses
|
|
37
|
+
Fox Toolkit (http://www.fox-toolkit.org). It will build on every platform
|
|
38
|
+
which HIDAPI supports. Since it relies on a 3rd party library, building it
|
|
39
|
+
is optional but recommended because it is so useful when debugging hardware.
|
|
40
|
+
|
|
41
|
+
What Does the API Look Like?
|
|
42
|
+
=============================
|
|
43
|
+
The API provides the the most commonly used HID functions including sending
|
|
44
|
+
and receiving of input, output, and feature reports. The sample program,
|
|
45
|
+
which communicates with a heavily hacked up version of the Microchip USB
|
|
46
|
+
Generic HID sample looks like this (with error checking removed for
|
|
47
|
+
simplicity):
|
|
48
|
+
|
|
49
|
+
#ifdef WIN32
|
|
50
|
+
#include <windows.h>
|
|
51
|
+
#endif
|
|
52
|
+
#include <stdio.h>
|
|
53
|
+
#include <stdlib.h>
|
|
54
|
+
#include "hidapi.h"
|
|
55
|
+
|
|
56
|
+
#define MAX_STR 255
|
|
57
|
+
|
|
58
|
+
int main(int argc, char* argv[])
|
|
59
|
+
{
|
|
60
|
+
int res;
|
|
61
|
+
unsigned char buf[65];
|
|
62
|
+
wchar_t wstr[MAX_STR];
|
|
63
|
+
hid_device *handle;
|
|
64
|
+
int i;
|
|
65
|
+
|
|
66
|
+
// Initialize the hidapi library
|
|
67
|
+
res = hid_init();
|
|
68
|
+
|
|
69
|
+
// Open the device using the VID, PID,
|
|
70
|
+
// and optionally the Serial number.
|
|
71
|
+
handle = hid_open(0x4d8, 0x3f, NULL);
|
|
72
|
+
|
|
73
|
+
// Read the Manufacturer String
|
|
74
|
+
res = hid_get_manufacturer_string(handle, wstr, MAX_STR);
|
|
75
|
+
wprintf(L"Manufacturer String: %s\n", wstr);
|
|
76
|
+
|
|
77
|
+
// Read the Product String
|
|
78
|
+
res = hid_get_product_string(handle, wstr, MAX_STR);
|
|
79
|
+
wprintf(L"Product String: %s\n", wstr);
|
|
80
|
+
|
|
81
|
+
// Read the Serial Number String
|
|
82
|
+
res = hid_get_serial_number_string(handle, wstr, MAX_STR);
|
|
83
|
+
wprintf(L"Serial Number String: (%d) %s\n", wstr[0], wstr);
|
|
84
|
+
|
|
85
|
+
// Read Indexed String 1
|
|
86
|
+
res = hid_get_indexed_string(handle, 1, wstr, MAX_STR);
|
|
87
|
+
wprintf(L"Indexed String 1: %s\n", wstr);
|
|
88
|
+
|
|
89
|
+
// Toggle LED (cmd 0x80). The first byte is the report number (0x0).
|
|
90
|
+
buf[0] = 0x0;
|
|
91
|
+
buf[1] = 0x80;
|
|
92
|
+
res = hid_write(handle, buf, 65);
|
|
93
|
+
|
|
94
|
+
// Request state (cmd 0x81). The first byte is the report number (0x0).
|
|
95
|
+
buf[0] = 0x0;
|
|
96
|
+
buf[1] = 0x81;
|
|
97
|
+
res = hid_write(handle, buf, 65);
|
|
98
|
+
|
|
99
|
+
// Read requested state
|
|
100
|
+
res = hid_read(handle, buf, 65);
|
|
101
|
+
|
|
102
|
+
// Print out the returned buffer.
|
|
103
|
+
for (i = 0; i < 4; i++)
|
|
104
|
+
printf("buf[%d]: %d\n", i, buf[i]);
|
|
105
|
+
|
|
106
|
+
// Finalize the hidapi library
|
|
107
|
+
res = hid_exit();
|
|
108
|
+
|
|
109
|
+
return 0;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
If you have your own simple test programs which communicate with standard
|
|
113
|
+
hardware development boards (such as those from Microchip, TI, Atmel,
|
|
114
|
+
FreeScale and others), please consider sending me something like the above
|
|
115
|
+
for inclusion into the HIDAPI source. This will help others who have the
|
|
116
|
+
same hardware as you do.
|
|
117
|
+
|
|
118
|
+
License
|
|
119
|
+
========
|
|
120
|
+
HIDAPI may be used by one of three licenses as outlined in LICENSE.txt.
|
|
121
|
+
|
|
122
|
+
Download
|
|
123
|
+
=========
|
|
124
|
+
HIDAPI can be downloaded from github
|
|
125
|
+
git clone git://github.com/signal11/hidapi.git
|
|
126
|
+
|
|
127
|
+
Build Instructions
|
|
128
|
+
===================
|
|
129
|
+
|
|
130
|
+
This section is long. Don't be put off by this. It's not long because it's
|
|
131
|
+
complicated to build HIDAPI; it's quite the opposite. This section is long
|
|
132
|
+
because of the flexibility of HIDAPI and the large number of ways in which
|
|
133
|
+
it can be built and used. You will likely pick a single build method.
|
|
134
|
+
|
|
135
|
+
HIDAPI can be built in several different ways. If you elect to build a
|
|
136
|
+
shared library, you will need to build it from the HIDAPI source
|
|
137
|
+
distribution. If you choose instead to embed HIDAPI directly into your
|
|
138
|
+
application, you can skip the building and look at the provided platform
|
|
139
|
+
Makefiles for guidance. These platform Makefiles are located in linux/
|
|
140
|
+
libusb/ mac/ and windows/ and are called Makefile-manual. In addition,
|
|
141
|
+
Visual Studio projects are provided. Even if you're going to embed HIDAPI
|
|
142
|
+
into your project, it is still beneficial to build the example programs.
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
Prerequisites:
|
|
146
|
+
---------------
|
|
147
|
+
|
|
148
|
+
Linux:
|
|
149
|
+
-------
|
|
150
|
+
On Linux, you will need to install development packages for libudev,
|
|
151
|
+
libusb and optionally Fox-toolkit (for the test GUI). On
|
|
152
|
+
Debian/Ubuntu systems these can be installed by running:
|
|
153
|
+
sudo apt-get install libudev-dev libusb-1.0-0-dev libfox-1.6-dev
|
|
154
|
+
|
|
155
|
+
If you downloaded the source directly from the git repository (using
|
|
156
|
+
git clone), you'll need Autotools:
|
|
157
|
+
sudo apt-get install autotools-dev autoconf automake libtool
|
|
158
|
+
|
|
159
|
+
FreeBSD:
|
|
160
|
+
---------
|
|
161
|
+
On FreeBSD you will need to install GNU make, libiconv, and
|
|
162
|
+
optionally Fox-Toolkit (for the test GUI). This is done by running
|
|
163
|
+
the following:
|
|
164
|
+
pkg_add -r gmake libiconv fox16
|
|
165
|
+
|
|
166
|
+
If you downloaded the source directly from the git repository (using
|
|
167
|
+
git clone), you'll need Autotools:
|
|
168
|
+
pkg_add -r autotools
|
|
169
|
+
|
|
170
|
+
Mac:
|
|
171
|
+
-----
|
|
172
|
+
On Mac, you will need to install Fox-Toolkit if you wish to build
|
|
173
|
+
the Test GUI. There are two ways to do this, and each has a slight
|
|
174
|
+
complication. Which method you use depends on your use case.
|
|
175
|
+
|
|
176
|
+
If you wish to build the Test GUI just for your own testing on your
|
|
177
|
+
own computer, then the easiest method is to install Fox-Toolkit
|
|
178
|
+
using ports:
|
|
179
|
+
sudo port install fox
|
|
180
|
+
|
|
181
|
+
If you wish to build the TestGUI app bundle to redistribute to
|
|
182
|
+
others, you will need to install Fox-toolkit from source. This is
|
|
183
|
+
because the version of fox that gets installed using ports uses the
|
|
184
|
+
ports X11 libraries which are not compatible with the Apple X11
|
|
185
|
+
libraries. If you install Fox with ports and then try to distribute
|
|
186
|
+
your built app bundle, it will simply fail to run on other systems.
|
|
187
|
+
To install Fox-Toolkit manually, download the source package from
|
|
188
|
+
http://www.fox-toolkit.org, extract it, and run the following from
|
|
189
|
+
within the extracted source:
|
|
190
|
+
./configure && make && make install
|
|
191
|
+
|
|
192
|
+
Windows:
|
|
193
|
+
---------
|
|
194
|
+
On Windows, if you want to build the test GUI, you will need to get
|
|
195
|
+
the hidapi-externals.zip package from the download site. This
|
|
196
|
+
contains pre-built binaries for Fox-toolkit. Extract
|
|
197
|
+
hidapi-externals.zip just outside of hidapi, so that
|
|
198
|
+
hidapi-externals and hidapi are on the same level, as shown:
|
|
199
|
+
|
|
200
|
+
Parent_Folder
|
|
201
|
+
|
|
|
202
|
+
+hidapi
|
|
203
|
+
+hidapi-externals
|
|
204
|
+
|
|
205
|
+
Again, this step is not required if you do not wish to build the
|
|
206
|
+
test GUI.
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
Building HIDAPI into a shared library on Unix Platforms:
|
|
210
|
+
---------------------------------------------------------
|
|
211
|
+
|
|
212
|
+
On Unix-like systems such as Linux, FreeBSD, Mac, and even Windows, using
|
|
213
|
+
Mingw or Cygwin, the easiest way to build a standard system-installed shared
|
|
214
|
+
library is to use the GNU Autotools build system. If you checked out the
|
|
215
|
+
source from the git repository, run the following:
|
|
216
|
+
|
|
217
|
+
./bootstrap
|
|
218
|
+
./configure
|
|
219
|
+
make
|
|
220
|
+
make install <----- as root, or using sudo
|
|
221
|
+
|
|
222
|
+
If you downloaded a source package (ie: if you did not run git clone), you
|
|
223
|
+
can skip the ./bootstrap step.
|
|
224
|
+
|
|
225
|
+
./configure can take several arguments which control the build. The two most
|
|
226
|
+
likely to be used are:
|
|
227
|
+
--enable-testgui
|
|
228
|
+
Enable build of the Test GUI. This requires Fox toolkit to
|
|
229
|
+
be installed. Instructions for installing Fox-Toolkit on
|
|
230
|
+
each platform are in the Prerequisites section above.
|
|
231
|
+
|
|
232
|
+
--prefix=/usr
|
|
233
|
+
Specify where you want the output headers and libraries to
|
|
234
|
+
be installed. The example above will put the headers in
|
|
235
|
+
/usr/include and the binaries in /usr/lib. The default is to
|
|
236
|
+
install into /usr/local which is fine on most systems.
|
|
237
|
+
|
|
238
|
+
Building the manual way on Unix platforms:
|
|
239
|
+
-------------------------------------------
|
|
240
|
+
|
|
241
|
+
Manual Makefiles are provided mostly to give the user and idea what it takes
|
|
242
|
+
to build a program which embeds HIDAPI directly inside of it. These should
|
|
243
|
+
really be used as examples only. If you want to build a system-wide shared
|
|
244
|
+
library, use the Autotools method described above.
|
|
245
|
+
|
|
246
|
+
To build HIDAPI using the manual makefiles, change to the directory
|
|
247
|
+
of your platform and run make. For example, on Linux run:
|
|
248
|
+
cd linux/
|
|
249
|
+
make -f Makefile-manual
|
|
250
|
+
|
|
251
|
+
To build the Test GUI using the manual makefiles:
|
|
252
|
+
cd testgui/
|
|
253
|
+
make -f Makefile-manual
|
|
254
|
+
|
|
255
|
+
Building on Windows:
|
|
256
|
+
---------------------
|
|
257
|
+
|
|
258
|
+
To build the HIDAPI DLL on Windows using Visual Studio, build the .sln file
|
|
259
|
+
in the windows/ directory.
|
|
260
|
+
|
|
261
|
+
To build the Test GUI on windows using Visual Studio, build the .sln file in
|
|
262
|
+
the testgui/ directory.
|
|
263
|
+
|
|
264
|
+
To build HIDAPI using MinGW or Cygwin using Autotools, use the instructions
|
|
265
|
+
in the section titled "Building HIDAPI into a shared library on Unix
|
|
266
|
+
Platforms" above. Note that building the Test GUI with MinGW or Cygwin will
|
|
267
|
+
require the Windows procedure in the Prerequisites section above (ie:
|
|
268
|
+
hidapi-externals.zip).
|
|
269
|
+
|
|
270
|
+
To build HIDAPI using MinGW using the Manual Makefiles, see the section
|
|
271
|
+
"Building the manual way on Unix platforms" above.
|
|
272
|
+
|
|
273
|
+
HIDAPI can also be built using the Windows DDK (now also called the Windows
|
|
274
|
+
Driver Kit or WDK). This method was originally required for the HIDAPI build
|
|
275
|
+
but not anymore. However, some users still prefer this method. It is not as
|
|
276
|
+
well supported anymore but should still work. Patches are welcome if it does
|
|
277
|
+
not. To build using the DDK:
|
|
278
|
+
|
|
279
|
+
1. Install the Windows Driver Kit (WDK) from Microsoft.
|
|
280
|
+
2. From the Start menu, in the Windows Driver Kits folder, select Build
|
|
281
|
+
Environments, then your operating system, then the x86 Free Build
|
|
282
|
+
Environment (or one that is appropriate for your system).
|
|
283
|
+
3. From the console, change directory to the windows/ddk_build/ directory,
|
|
284
|
+
which is part of the HIDAPI distribution.
|
|
285
|
+
4. Type build.
|
|
286
|
+
5. You can find the output files (DLL and LIB) in a subdirectory created
|
|
287
|
+
by the build system which is appropriate for your environment. On
|
|
288
|
+
Windows XP, this directory is objfre_wxp_x86/i386.
|
|
289
|
+
|
|
290
|
+
Cross Compiling
|
|
291
|
+
================
|
|
292
|
+
|
|
293
|
+
This section talks about cross compiling HIDAPI for Linux using autotools.
|
|
294
|
+
This is useful for using HIDAPI on embedded Linux targets. These
|
|
295
|
+
instructions assume the most raw kind of embedded Linux build, where all
|
|
296
|
+
prerequisites will need to be built first. This process will of course vary
|
|
297
|
+
based on your embedded Linux build system if you are using one, such as
|
|
298
|
+
OpenEmbedded or Buildroot.
|
|
299
|
+
|
|
300
|
+
For the purpose of this section, it will be assumed that the following
|
|
301
|
+
environment variables are exported.
|
|
302
|
+
|
|
303
|
+
$ export STAGING=$HOME/out
|
|
304
|
+
$ export HOST=arm-linux
|
|
305
|
+
|
|
306
|
+
STAGING and HOST can be modified to suit your setup.
|
|
307
|
+
|
|
308
|
+
Prerequisites
|
|
309
|
+
--------------
|
|
310
|
+
|
|
311
|
+
Note that the build of libudev is the very basic configuration.
|
|
312
|
+
|
|
313
|
+
Build Libusb. From the libusb source directory, run:
|
|
314
|
+
./configure --host=$HOST --prefix=$STAGING
|
|
315
|
+
make
|
|
316
|
+
make install
|
|
317
|
+
|
|
318
|
+
Build libudev. From the libudev source directory, run:
|
|
319
|
+
./configure --disable-gudev --disable-introspection --disable-hwdb \
|
|
320
|
+
--host=$HOST --prefix=$STAGING
|
|
321
|
+
make
|
|
322
|
+
make install
|
|
323
|
+
|
|
324
|
+
Building HIDAPI
|
|
325
|
+
----------------
|
|
326
|
+
|
|
327
|
+
Build HIDAPI:
|
|
328
|
+
|
|
329
|
+
PKG_CONFIG_DIR= \
|
|
330
|
+
PKG_CONFIG_LIBDIR=$STAGING/lib/pkgconfig:$STAGING/share/pkgconfig \
|
|
331
|
+
PKG_CONFIG_SYSROOT_DIR=$STAGING \
|
|
332
|
+
./configure --host=$HOST --prefix=$STAGING
|
|
333
|
+
|
|
334
|
+
|
|
335
|
+
Signal 11 Software - 2010-04-11
|
|
336
|
+
2010-07-28
|
|
337
|
+
2011-09-10
|
|
338
|
+
2012-05-01
|
|
339
|
+
2012-07-03
|
|
@@ -0,0 +1,1079 @@
|
|
|
1
|
+
//=================== Copyright Valve Corporation, All rights reserved. =======
|
|
2
|
+
//
|
|
3
|
+
// Purpose: A wrapper implementing "HID" API for Android
|
|
4
|
+
//
|
|
5
|
+
// This layer glues the hidapi API to Android's USB and BLE stack.
|
|
6
|
+
//
|
|
7
|
+
//=============================================================================
|
|
8
|
+
|
|
9
|
+
#include <jni.h>
|
|
10
|
+
#include <android/log.h>
|
|
11
|
+
#include <pthread.h>
|
|
12
|
+
#include <errno.h> // For ETIMEDOUT and ECONNRESET
|
|
13
|
+
#include <stdlib.h> // For malloc() and free()
|
|
14
|
+
|
|
15
|
+
#define TAG "hidapi"
|
|
16
|
+
#ifdef DEBUG
|
|
17
|
+
#define LOGV(...) __android_log_print(ANDROID_LOG_VERBOSE, TAG, __VA_ARGS__)
|
|
18
|
+
#define LOGD(...) __android_log_print(ANDROID_LOG_DEBUG, TAG, __VA_ARGS__)
|
|
19
|
+
#else
|
|
20
|
+
#define LOGV(...)
|
|
21
|
+
#define LOGD(...)
|
|
22
|
+
#endif
|
|
23
|
+
|
|
24
|
+
#define SDL_JAVA_PREFIX org_libsdl_app
|
|
25
|
+
#define CONCAT1(prefix, class, function) CONCAT2(prefix, class, function)
|
|
26
|
+
#define CONCAT2(prefix, class, function) Java_ ## prefix ## _ ## class ## _ ## function
|
|
27
|
+
#define HID_DEVICE_MANAGER_JAVA_INTERFACE(function) CONCAT1(SDL_JAVA_PREFIX, HIDDeviceManager, function)
|
|
28
|
+
|
|
29
|
+
#include "../hidapi/hidapi.h"
|
|
30
|
+
typedef uint32_t uint32;
|
|
31
|
+
typedef uint64_t uint64;
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
struct hid_device_
|
|
35
|
+
{
|
|
36
|
+
int nId;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
static JavaVM *g_JVM;
|
|
40
|
+
static pthread_key_t g_ThreadKey;
|
|
41
|
+
|
|
42
|
+
template<class T>
|
|
43
|
+
class hid_device_ref
|
|
44
|
+
{
|
|
45
|
+
public:
|
|
46
|
+
hid_device_ref( T *pObject = nullptr ) : m_pObject( nullptr )
|
|
47
|
+
{
|
|
48
|
+
SetObject( pObject );
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
hid_device_ref( const hid_device_ref &rhs ) : m_pObject( nullptr )
|
|
52
|
+
{
|
|
53
|
+
SetObject( rhs.GetObject() );
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
~hid_device_ref()
|
|
57
|
+
{
|
|
58
|
+
SetObject( nullptr );
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
void SetObject( T *pObject )
|
|
62
|
+
{
|
|
63
|
+
if ( m_pObject && m_pObject->DecrementRefCount() == 0 )
|
|
64
|
+
{
|
|
65
|
+
delete m_pObject;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
m_pObject = pObject;
|
|
69
|
+
|
|
70
|
+
if ( m_pObject )
|
|
71
|
+
{
|
|
72
|
+
m_pObject->IncrementRefCount();
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
hid_device_ref &operator =( T *pObject )
|
|
77
|
+
{
|
|
78
|
+
SetObject( pObject );
|
|
79
|
+
return *this;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
hid_device_ref &operator =( const hid_device_ref &rhs )
|
|
83
|
+
{
|
|
84
|
+
SetObject( rhs.GetObject() );
|
|
85
|
+
return *this;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
T *GetObject() const
|
|
89
|
+
{
|
|
90
|
+
return m_pObject;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
T* operator->() const
|
|
94
|
+
{
|
|
95
|
+
return m_pObject;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
operator bool() const
|
|
99
|
+
{
|
|
100
|
+
return ( m_pObject != nullptr );
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
private:
|
|
104
|
+
T *m_pObject;
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
class hid_mutex_guard
|
|
108
|
+
{
|
|
109
|
+
public:
|
|
110
|
+
hid_mutex_guard( pthread_mutex_t *pMutex ) : m_pMutex( pMutex )
|
|
111
|
+
{
|
|
112
|
+
pthread_mutex_lock( m_pMutex );
|
|
113
|
+
}
|
|
114
|
+
~hid_mutex_guard()
|
|
115
|
+
{
|
|
116
|
+
pthread_mutex_unlock( m_pMutex );
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
private:
|
|
120
|
+
pthread_mutex_t *m_pMutex;
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
class hid_buffer
|
|
124
|
+
{
|
|
125
|
+
public:
|
|
126
|
+
hid_buffer() : m_pData( nullptr ), m_nSize( 0 ), m_nAllocated( 0 )
|
|
127
|
+
{
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
hid_buffer( const uint8_t *pData, size_t nSize ) : m_pData( nullptr ), m_nSize( 0 ), m_nAllocated( 0 )
|
|
131
|
+
{
|
|
132
|
+
assign( pData, nSize );
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
~hid_buffer()
|
|
136
|
+
{
|
|
137
|
+
delete[] m_pData;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
void assign( const uint8_t *pData, size_t nSize )
|
|
141
|
+
{
|
|
142
|
+
if ( nSize > m_nAllocated )
|
|
143
|
+
{
|
|
144
|
+
delete[] m_pData;
|
|
145
|
+
m_pData = new uint8_t[ nSize ];
|
|
146
|
+
m_nAllocated = nSize;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
m_nSize = nSize;
|
|
150
|
+
memcpy( m_pData, pData, nSize );
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
void clear()
|
|
154
|
+
{
|
|
155
|
+
m_nSize = 0;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
size_t size() const
|
|
159
|
+
{
|
|
160
|
+
return m_nSize;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
const uint8_t *data() const
|
|
164
|
+
{
|
|
165
|
+
return m_pData;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
private:
|
|
169
|
+
uint8_t *m_pData;
|
|
170
|
+
size_t m_nSize;
|
|
171
|
+
size_t m_nAllocated;
|
|
172
|
+
};
|
|
173
|
+
|
|
174
|
+
class hid_buffer_pool
|
|
175
|
+
{
|
|
176
|
+
public:
|
|
177
|
+
hid_buffer_pool() : m_nSize( 0 ), m_pHead( nullptr ), m_pTail( nullptr ), m_pFree( nullptr )
|
|
178
|
+
{
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
~hid_buffer_pool()
|
|
182
|
+
{
|
|
183
|
+
clear();
|
|
184
|
+
|
|
185
|
+
while ( m_pFree )
|
|
186
|
+
{
|
|
187
|
+
hid_buffer_entry *pEntry = m_pFree;
|
|
188
|
+
m_pFree = m_pFree->m_pNext;
|
|
189
|
+
delete pEntry;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
size_t size() const { return m_nSize; }
|
|
194
|
+
|
|
195
|
+
const hid_buffer &front() const { return m_pHead->m_buffer; }
|
|
196
|
+
|
|
197
|
+
void pop_front()
|
|
198
|
+
{
|
|
199
|
+
hid_buffer_entry *pEntry = m_pHead;
|
|
200
|
+
if ( pEntry )
|
|
201
|
+
{
|
|
202
|
+
m_pHead = pEntry->m_pNext;
|
|
203
|
+
if ( !m_pHead )
|
|
204
|
+
{
|
|
205
|
+
m_pTail = nullptr;
|
|
206
|
+
}
|
|
207
|
+
pEntry->m_pNext = m_pFree;
|
|
208
|
+
m_pFree = pEntry;
|
|
209
|
+
--m_nSize;
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
void emplace_back( const uint8_t *pData, size_t nSize )
|
|
214
|
+
{
|
|
215
|
+
hid_buffer_entry *pEntry;
|
|
216
|
+
|
|
217
|
+
if ( m_pFree )
|
|
218
|
+
{
|
|
219
|
+
pEntry = m_pFree;
|
|
220
|
+
m_pFree = m_pFree->m_pNext;
|
|
221
|
+
}
|
|
222
|
+
else
|
|
223
|
+
{
|
|
224
|
+
pEntry = new hid_buffer_entry;
|
|
225
|
+
}
|
|
226
|
+
pEntry->m_pNext = nullptr;
|
|
227
|
+
|
|
228
|
+
if ( m_pTail )
|
|
229
|
+
{
|
|
230
|
+
m_pTail->m_pNext = pEntry;
|
|
231
|
+
}
|
|
232
|
+
else
|
|
233
|
+
{
|
|
234
|
+
m_pHead = pEntry;
|
|
235
|
+
}
|
|
236
|
+
m_pTail = pEntry;
|
|
237
|
+
|
|
238
|
+
pEntry->m_buffer.assign( pData, nSize );
|
|
239
|
+
++m_nSize;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
void clear()
|
|
243
|
+
{
|
|
244
|
+
while ( size() > 0 )
|
|
245
|
+
{
|
|
246
|
+
pop_front();
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
private:
|
|
251
|
+
struct hid_buffer_entry
|
|
252
|
+
{
|
|
253
|
+
hid_buffer m_buffer;
|
|
254
|
+
hid_buffer_entry *m_pNext;
|
|
255
|
+
};
|
|
256
|
+
|
|
257
|
+
size_t m_nSize;
|
|
258
|
+
hid_buffer_entry *m_pHead;
|
|
259
|
+
hid_buffer_entry *m_pTail;
|
|
260
|
+
hid_buffer_entry *m_pFree;
|
|
261
|
+
};
|
|
262
|
+
|
|
263
|
+
static jbyteArray NewByteArray( JNIEnv* env, const uint8_t *pData, size_t nDataLen )
|
|
264
|
+
{
|
|
265
|
+
jbyteArray array = env->NewByteArray( nDataLen );
|
|
266
|
+
jbyte *pBuf = env->GetByteArrayElements( array, NULL );
|
|
267
|
+
memcpy( pBuf, pData, nDataLen );
|
|
268
|
+
env->ReleaseByteArrayElements( array, pBuf, 0 );
|
|
269
|
+
|
|
270
|
+
return array;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
static char *CreateStringFromJString( JNIEnv *env, const jstring &sString )
|
|
274
|
+
{
|
|
275
|
+
size_t nLength = env->GetStringUTFLength( sString );
|
|
276
|
+
const char *pjChars = env->GetStringUTFChars( sString, NULL );
|
|
277
|
+
char *psString = (char*)malloc( nLength + 1 );
|
|
278
|
+
memcpy( psString, pjChars, nLength );
|
|
279
|
+
psString[ nLength ] = '\0';
|
|
280
|
+
env->ReleaseStringUTFChars( sString, pjChars );
|
|
281
|
+
return psString;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
static wchar_t *CreateWStringFromJString( JNIEnv *env, const jstring &sString )
|
|
285
|
+
{
|
|
286
|
+
size_t nLength = env->GetStringLength( sString );
|
|
287
|
+
const jchar *pjChars = env->GetStringChars( sString, NULL );
|
|
288
|
+
wchar_t *pwString = (wchar_t*)malloc( ( nLength + 1 ) * sizeof( wchar_t ) );
|
|
289
|
+
wchar_t *pwChars = pwString;
|
|
290
|
+
for ( size_t iIndex = 0; iIndex < nLength; ++iIndex )
|
|
291
|
+
{
|
|
292
|
+
pwChars[ iIndex ] = pjChars[ iIndex ];
|
|
293
|
+
}
|
|
294
|
+
pwString[ nLength ] = '\0';
|
|
295
|
+
env->ReleaseStringChars( sString, pjChars );
|
|
296
|
+
return pwString;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
static wchar_t *CreateWStringFromWString( const wchar_t *pwSrc )
|
|
300
|
+
{
|
|
301
|
+
size_t nLength = wcslen( pwSrc );
|
|
302
|
+
wchar_t *pwString = (wchar_t*)malloc( ( nLength + 1 ) * sizeof( wchar_t ) );
|
|
303
|
+
memcpy( pwString, pwSrc, nLength * sizeof( wchar_t ) );
|
|
304
|
+
pwString[ nLength ] = '\0';
|
|
305
|
+
return pwString;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
static hid_device_info *CopyHIDDeviceInfo( const hid_device_info *pInfo )
|
|
309
|
+
{
|
|
310
|
+
hid_device_info *pCopy = new hid_device_info;
|
|
311
|
+
*pCopy = *pInfo;
|
|
312
|
+
pCopy->path = strdup( pInfo->path );
|
|
313
|
+
pCopy->product_string = CreateWStringFromWString( pInfo->product_string );
|
|
314
|
+
pCopy->manufacturer_string = CreateWStringFromWString( pInfo->manufacturer_string );
|
|
315
|
+
pCopy->serial_number = CreateWStringFromWString( pInfo->serial_number );
|
|
316
|
+
return pCopy;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
static void FreeHIDDeviceInfo( hid_device_info *pInfo )
|
|
320
|
+
{
|
|
321
|
+
free( pInfo->path );
|
|
322
|
+
free( pInfo->serial_number );
|
|
323
|
+
free( pInfo->manufacturer_string );
|
|
324
|
+
free( pInfo->product_string );
|
|
325
|
+
delete pInfo;
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
static jclass g_HIDDeviceManagerCallbackClass;
|
|
329
|
+
static jobject g_HIDDeviceManagerCallbackHandler;
|
|
330
|
+
static jmethodID g_midHIDDeviceManagerOpen;
|
|
331
|
+
static jmethodID g_midHIDDeviceManagerSendOutputReport;
|
|
332
|
+
static jmethodID g_midHIDDeviceManagerSendFeatureReport;
|
|
333
|
+
static jmethodID g_midHIDDeviceManagerGetFeatureReport;
|
|
334
|
+
static jmethodID g_midHIDDeviceManagerClose;
|
|
335
|
+
|
|
336
|
+
uint64_t get_timespec_ms( const struct timespec &ts )
|
|
337
|
+
{
|
|
338
|
+
return (uint64_t)ts.tv_sec * 1000 + ts.tv_nsec / 1000000;
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
class CHIDDevice
|
|
342
|
+
{
|
|
343
|
+
public:
|
|
344
|
+
CHIDDevice( int nDeviceID, hid_device_info *pInfo )
|
|
345
|
+
{
|
|
346
|
+
m_nId = nDeviceID;
|
|
347
|
+
m_pInfo = pInfo;
|
|
348
|
+
|
|
349
|
+
// The Bluetooth Steam Controller needs special handling
|
|
350
|
+
const int VALVE_USB_VID = 0x28DE;
|
|
351
|
+
const int D0G_BLE2_PID = 0x1106;
|
|
352
|
+
if ( pInfo->vendor_id == VALVE_USB_VID && pInfo->product_id == D0G_BLE2_PID )
|
|
353
|
+
{
|
|
354
|
+
m_bIsBLESteamController = true;
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
~CHIDDevice()
|
|
359
|
+
{
|
|
360
|
+
FreeHIDDeviceInfo( m_pInfo );
|
|
361
|
+
|
|
362
|
+
// Note that we don't delete m_pDevice, as the app may still have a reference to it
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
int IncrementRefCount()
|
|
366
|
+
{
|
|
367
|
+
return ++m_nRefCount;
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
int DecrementRefCount()
|
|
371
|
+
{
|
|
372
|
+
return --m_nRefCount;
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
int GetId()
|
|
376
|
+
{
|
|
377
|
+
return m_nId;
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
const hid_device_info *GetDeviceInfo()
|
|
381
|
+
{
|
|
382
|
+
return m_pInfo;
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
hid_device *GetDevice()
|
|
386
|
+
{
|
|
387
|
+
return m_pDevice;
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
int GetDeviceRefCount()
|
|
391
|
+
{
|
|
392
|
+
return m_nDeviceRefCount;
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
int IncrementDeviceRefCount()
|
|
396
|
+
{
|
|
397
|
+
return ++m_nDeviceRefCount;
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
int DecrementDeviceRefCount()
|
|
401
|
+
{
|
|
402
|
+
return --m_nDeviceRefCount;
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
bool BOpen()
|
|
406
|
+
{
|
|
407
|
+
// Make sure thread is attached to JVM/env
|
|
408
|
+
JNIEnv *env;
|
|
409
|
+
g_JVM->AttachCurrentThread( &env, NULL );
|
|
410
|
+
pthread_setspecific( g_ThreadKey, (void*)env );
|
|
411
|
+
|
|
412
|
+
m_bIsWaitingForOpen = false;
|
|
413
|
+
m_bOpenResult = env->CallBooleanMethod( g_HIDDeviceManagerCallbackHandler, g_midHIDDeviceManagerOpen, m_nId );
|
|
414
|
+
|
|
415
|
+
if ( m_bIsWaitingForOpen )
|
|
416
|
+
{
|
|
417
|
+
hid_mutex_guard cvl( &m_cvLock );
|
|
418
|
+
|
|
419
|
+
const int OPEN_TIMEOUT_SECONDS = 60;
|
|
420
|
+
struct timespec ts, endtime;
|
|
421
|
+
clock_gettime( CLOCK_REALTIME, &ts );
|
|
422
|
+
endtime = ts;
|
|
423
|
+
endtime.tv_sec += OPEN_TIMEOUT_SECONDS;
|
|
424
|
+
do
|
|
425
|
+
{
|
|
426
|
+
if ( pthread_cond_timedwait( &m_cv, &m_cvLock, &endtime ) != 0 )
|
|
427
|
+
{
|
|
428
|
+
break;
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
while ( m_bIsWaitingForOpen && get_timespec_ms( ts ) < get_timespec_ms( endtime ) );
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
if ( !m_bOpenResult )
|
|
435
|
+
{
|
|
436
|
+
if ( m_bIsWaitingForOpen )
|
|
437
|
+
{
|
|
438
|
+
LOGV( "Device open failed - timed out waiting for device permission" );
|
|
439
|
+
}
|
|
440
|
+
else
|
|
441
|
+
{
|
|
442
|
+
LOGV( "Device open failed" );
|
|
443
|
+
}
|
|
444
|
+
return false;
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
m_pDevice = new hid_device;
|
|
448
|
+
m_pDevice->nId = m_nId;
|
|
449
|
+
m_nDeviceRefCount = 1;
|
|
450
|
+
return true;
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
void SetOpenPending()
|
|
454
|
+
{
|
|
455
|
+
m_bIsWaitingForOpen = true;
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
void SetOpenResult( bool bResult )
|
|
459
|
+
{
|
|
460
|
+
if ( m_bIsWaitingForOpen )
|
|
461
|
+
{
|
|
462
|
+
m_bOpenResult = bResult;
|
|
463
|
+
m_bIsWaitingForOpen = false;
|
|
464
|
+
pthread_cond_signal( &m_cv );
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
void ProcessInput( const uint8_t *pBuf, size_t nBufSize )
|
|
469
|
+
{
|
|
470
|
+
hid_mutex_guard l( &m_dataLock );
|
|
471
|
+
|
|
472
|
+
size_t MAX_REPORT_QUEUE_SIZE = 16;
|
|
473
|
+
if ( m_vecData.size() >= MAX_REPORT_QUEUE_SIZE )
|
|
474
|
+
{
|
|
475
|
+
m_vecData.pop_front();
|
|
476
|
+
}
|
|
477
|
+
m_vecData.emplace_back( pBuf, nBufSize );
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
int GetInput( unsigned char *data, size_t length )
|
|
481
|
+
{
|
|
482
|
+
hid_mutex_guard l( &m_dataLock );
|
|
483
|
+
|
|
484
|
+
if ( m_vecData.size() == 0 )
|
|
485
|
+
{
|
|
486
|
+
// LOGV( "hid_read_timeout no data available" );
|
|
487
|
+
return 0;
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
const hid_buffer &buffer = m_vecData.front();
|
|
491
|
+
size_t nDataLen = buffer.size() > length ? length : buffer.size();
|
|
492
|
+
if ( m_bIsBLESteamController )
|
|
493
|
+
{
|
|
494
|
+
data[0] = 0x03;
|
|
495
|
+
memcpy( data + 1, buffer.data(), nDataLen );
|
|
496
|
+
++nDataLen;
|
|
497
|
+
}
|
|
498
|
+
else
|
|
499
|
+
{
|
|
500
|
+
memcpy( data, buffer.data(), nDataLen );
|
|
501
|
+
}
|
|
502
|
+
m_vecData.pop_front();
|
|
503
|
+
|
|
504
|
+
// LOGV("Read %u bytes", nDataLen);
|
|
505
|
+
// LOGV("%02x %02x %02x %02x %02x %02x %02x %02x ....",
|
|
506
|
+
// data[0], data[1], data[2], data[3],
|
|
507
|
+
// data[4], data[5], data[6], data[7]);
|
|
508
|
+
|
|
509
|
+
return nDataLen;
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
int SendOutputReport( const unsigned char *pData, size_t nDataLen )
|
|
513
|
+
{
|
|
514
|
+
// Make sure thread is attached to JVM/env
|
|
515
|
+
JNIEnv *env;
|
|
516
|
+
g_JVM->AttachCurrentThread( &env, NULL );
|
|
517
|
+
pthread_setspecific( g_ThreadKey, (void*)env );
|
|
518
|
+
|
|
519
|
+
jbyteArray pBuf = NewByteArray( env, pData, nDataLen );
|
|
520
|
+
int nRet = env->CallIntMethod( g_HIDDeviceManagerCallbackHandler, g_midHIDDeviceManagerSendOutputReport, m_nId, pBuf );
|
|
521
|
+
env->DeleteLocalRef( pBuf );
|
|
522
|
+
return nRet;
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
int SendFeatureReport( const unsigned char *pData, size_t nDataLen )
|
|
526
|
+
{
|
|
527
|
+
// Make sure thread is attached to JVM/env
|
|
528
|
+
JNIEnv *env;
|
|
529
|
+
g_JVM->AttachCurrentThread( &env, NULL );
|
|
530
|
+
pthread_setspecific( g_ThreadKey, (void*)env );
|
|
531
|
+
|
|
532
|
+
jbyteArray pBuf = NewByteArray( env, pData, nDataLen );
|
|
533
|
+
int nRet = env->CallIntMethod( g_HIDDeviceManagerCallbackHandler, g_midHIDDeviceManagerSendFeatureReport, m_nId, pBuf );
|
|
534
|
+
env->DeleteLocalRef( pBuf );
|
|
535
|
+
return nRet;
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
void ProcessFeatureReport( const uint8_t *pBuf, size_t nBufSize )
|
|
539
|
+
{
|
|
540
|
+
hid_mutex_guard cvl( &m_cvLock );
|
|
541
|
+
if ( m_bIsWaitingForFeatureReport )
|
|
542
|
+
{
|
|
543
|
+
m_featureReport.assign( pBuf, nBufSize );
|
|
544
|
+
|
|
545
|
+
m_bIsWaitingForFeatureReport = false;
|
|
546
|
+
m_nFeatureReportError = 0;
|
|
547
|
+
pthread_cond_signal( &m_cv );
|
|
548
|
+
}
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
int GetFeatureReport( unsigned char *pData, size_t nDataLen )
|
|
552
|
+
{
|
|
553
|
+
// Make sure thread is attached to JVM/env
|
|
554
|
+
JNIEnv *env;
|
|
555
|
+
g_JVM->AttachCurrentThread( &env, NULL );
|
|
556
|
+
pthread_setspecific( g_ThreadKey, (void*)env );
|
|
557
|
+
|
|
558
|
+
{
|
|
559
|
+
hid_mutex_guard cvl( &m_cvLock );
|
|
560
|
+
if ( m_bIsWaitingForFeatureReport )
|
|
561
|
+
{
|
|
562
|
+
LOGV( "Get feature report already ongoing... bail" );
|
|
563
|
+
return -1; // Read already ongoing, we currently do not serialize, TODO
|
|
564
|
+
}
|
|
565
|
+
m_bIsWaitingForFeatureReport = true;
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
jbyteArray pBuf = NewByteArray( env, pData, nDataLen );
|
|
569
|
+
int nRet = env->CallBooleanMethod( g_HIDDeviceManagerCallbackHandler, g_midHIDDeviceManagerGetFeatureReport, m_nId, pBuf ) ? 0 : -1;
|
|
570
|
+
env->DeleteLocalRef( pBuf );
|
|
571
|
+
if ( nRet < 0 )
|
|
572
|
+
{
|
|
573
|
+
LOGV( "GetFeatureReport failed" );
|
|
574
|
+
m_bIsWaitingForFeatureReport = false;
|
|
575
|
+
return -1;
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
{
|
|
579
|
+
hid_mutex_guard cvl( &m_cvLock );
|
|
580
|
+
if ( m_bIsWaitingForFeatureReport )
|
|
581
|
+
{
|
|
582
|
+
LOGV("=== Going to sleep" );
|
|
583
|
+
// Wait in CV until we are no longer waiting for a feature report.
|
|
584
|
+
const int FEATURE_REPORT_TIMEOUT_SECONDS = 2;
|
|
585
|
+
struct timespec ts, endtime;
|
|
586
|
+
clock_gettime( CLOCK_REALTIME, &ts );
|
|
587
|
+
endtime = ts;
|
|
588
|
+
endtime.tv_sec += FEATURE_REPORT_TIMEOUT_SECONDS;
|
|
589
|
+
do
|
|
590
|
+
{
|
|
591
|
+
if ( pthread_cond_timedwait( &m_cv, &m_cvLock, &endtime ) != 0 )
|
|
592
|
+
{
|
|
593
|
+
break;
|
|
594
|
+
}
|
|
595
|
+
}
|
|
596
|
+
while ( m_bIsWaitingForFeatureReport && get_timespec_ms( ts ) < get_timespec_ms( endtime ) );
|
|
597
|
+
|
|
598
|
+
// We are back
|
|
599
|
+
if ( m_bIsWaitingForFeatureReport )
|
|
600
|
+
{
|
|
601
|
+
m_nFeatureReportError = -ETIMEDOUT;
|
|
602
|
+
m_bIsWaitingForFeatureReport = false;
|
|
603
|
+
}
|
|
604
|
+
LOGV( "=== Got feature report err=%d", m_nFeatureReportError );
|
|
605
|
+
if ( m_nFeatureReportError != 0 )
|
|
606
|
+
{
|
|
607
|
+
return m_nFeatureReportError;
|
|
608
|
+
}
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
size_t uBytesToCopy = m_featureReport.size() > nDataLen ? nDataLen : m_featureReport.size();
|
|
612
|
+
memcpy( pData, m_featureReport.data(), uBytesToCopy );
|
|
613
|
+
m_featureReport.clear();
|
|
614
|
+
LOGV( "=== Got %u bytes", uBytesToCopy );
|
|
615
|
+
|
|
616
|
+
return uBytesToCopy;
|
|
617
|
+
}
|
|
618
|
+
}
|
|
619
|
+
|
|
620
|
+
void Close( bool bDeleteDevice )
|
|
621
|
+
{
|
|
622
|
+
// Make sure thread is attached to JVM/env
|
|
623
|
+
JNIEnv *env;
|
|
624
|
+
g_JVM->AttachCurrentThread( &env, NULL );
|
|
625
|
+
pthread_setspecific( g_ThreadKey, (void*)env );
|
|
626
|
+
|
|
627
|
+
env->CallVoidMethod( g_HIDDeviceManagerCallbackHandler, g_midHIDDeviceManagerClose, m_nId );
|
|
628
|
+
|
|
629
|
+
hid_mutex_guard dataLock( &m_dataLock );
|
|
630
|
+
m_vecData.clear();
|
|
631
|
+
|
|
632
|
+
// Clean and release pending feature report reads
|
|
633
|
+
hid_mutex_guard cvLock( &m_cvLock );
|
|
634
|
+
m_featureReport.clear();
|
|
635
|
+
m_bIsWaitingForFeatureReport = false;
|
|
636
|
+
m_nFeatureReportError = -ECONNRESET;
|
|
637
|
+
pthread_cond_broadcast( &m_cv );
|
|
638
|
+
|
|
639
|
+
if ( bDeleteDevice )
|
|
640
|
+
{
|
|
641
|
+
delete m_pDevice;
|
|
642
|
+
m_pDevice = nullptr;
|
|
643
|
+
}
|
|
644
|
+
}
|
|
645
|
+
|
|
646
|
+
private:
|
|
647
|
+
int m_nRefCount = 0;
|
|
648
|
+
int m_nId = 0;
|
|
649
|
+
hid_device_info *m_pInfo = nullptr;
|
|
650
|
+
hid_device *m_pDevice = nullptr;
|
|
651
|
+
bool m_bIsBLESteamController = false;
|
|
652
|
+
int m_nDeviceRefCount = 0;
|
|
653
|
+
|
|
654
|
+
pthread_mutex_t m_dataLock = PTHREAD_MUTEX_INITIALIZER; // This lock has to be held to access m_vecData
|
|
655
|
+
hid_buffer_pool m_vecData;
|
|
656
|
+
|
|
657
|
+
// For handling get_feature_report
|
|
658
|
+
pthread_mutex_t m_cvLock = PTHREAD_MUTEX_INITIALIZER; // This lock has to be held to access any variables below
|
|
659
|
+
pthread_cond_t m_cv = PTHREAD_COND_INITIALIZER;
|
|
660
|
+
bool m_bIsWaitingForOpen = false;
|
|
661
|
+
bool m_bOpenResult = false;
|
|
662
|
+
bool m_bIsWaitingForFeatureReport = false;
|
|
663
|
+
int m_nFeatureReportError = 0;
|
|
664
|
+
hid_buffer m_featureReport;
|
|
665
|
+
|
|
666
|
+
public:
|
|
667
|
+
hid_device_ref<CHIDDevice> next;
|
|
668
|
+
};
|
|
669
|
+
|
|
670
|
+
class CHIDDevice;
|
|
671
|
+
static pthread_mutex_t g_DevicesMutex = PTHREAD_MUTEX_INITIALIZER;
|
|
672
|
+
static hid_device_ref<CHIDDevice> g_Devices;
|
|
673
|
+
|
|
674
|
+
static hid_device_ref<CHIDDevice> FindDevice( int nDeviceId )
|
|
675
|
+
{
|
|
676
|
+
hid_device_ref<CHIDDevice> pDevice;
|
|
677
|
+
|
|
678
|
+
hid_mutex_guard l( &g_DevicesMutex );
|
|
679
|
+
for ( pDevice = g_Devices; pDevice; pDevice = pDevice->next )
|
|
680
|
+
{
|
|
681
|
+
if ( pDevice->GetId() == nDeviceId )
|
|
682
|
+
{
|
|
683
|
+
break;
|
|
684
|
+
}
|
|
685
|
+
}
|
|
686
|
+
return pDevice;
|
|
687
|
+
}
|
|
688
|
+
|
|
689
|
+
static void ThreadDestroyed(void* value)
|
|
690
|
+
{
|
|
691
|
+
/* The thread is being destroyed, detach it from the Java VM and set the g_ThreadKey value to NULL as required */
|
|
692
|
+
JNIEnv *env = (JNIEnv*) value;
|
|
693
|
+
if (env != NULL) {
|
|
694
|
+
g_JVM->DetachCurrentThread();
|
|
695
|
+
pthread_setspecific(g_ThreadKey, NULL);
|
|
696
|
+
}
|
|
697
|
+
}
|
|
698
|
+
|
|
699
|
+
extern "C"
|
|
700
|
+
JNIEXPORT void JNICALL HID_DEVICE_MANAGER_JAVA_INTERFACE(HIDDeviceRegisterCallback)(JNIEnv *env, jobject thiz, jobject callbackHandler)
|
|
701
|
+
{
|
|
702
|
+
LOGV( "HIDDeviceRegisterCallback()");
|
|
703
|
+
|
|
704
|
+
env->GetJavaVM( &g_JVM );
|
|
705
|
+
|
|
706
|
+
/*
|
|
707
|
+
* Create mThreadKey so we can keep track of the JNIEnv assigned to each thread
|
|
708
|
+
* Refer to http://developer.android.com/guide/practices/design/jni.html for the rationale behind this
|
|
709
|
+
*/
|
|
710
|
+
if (pthread_key_create(&g_ThreadKey, ThreadDestroyed) != 0) {
|
|
711
|
+
__android_log_print(ANDROID_LOG_ERROR, TAG, "Error initializing pthread key");
|
|
712
|
+
}
|
|
713
|
+
|
|
714
|
+
g_HIDDeviceManagerCallbackHandler = env->NewGlobalRef( callbackHandler );
|
|
715
|
+
jclass objClass = env->GetObjectClass( callbackHandler );
|
|
716
|
+
if ( objClass )
|
|
717
|
+
{
|
|
718
|
+
g_HIDDeviceManagerCallbackClass = reinterpret_cast< jclass >( env->NewGlobalRef(objClass) );
|
|
719
|
+
g_midHIDDeviceManagerOpen = env->GetMethodID( g_HIDDeviceManagerCallbackClass, "openDevice", "(I)Z" );
|
|
720
|
+
if ( !g_midHIDDeviceManagerOpen )
|
|
721
|
+
{
|
|
722
|
+
__android_log_print(ANDROID_LOG_ERROR, TAG, "HIDDeviceRegisterCallback: callback class missing openDevice" );
|
|
723
|
+
}
|
|
724
|
+
g_midHIDDeviceManagerSendOutputReport = env->GetMethodID( g_HIDDeviceManagerCallbackClass, "sendOutputReport", "(I[B)I" );
|
|
725
|
+
if ( !g_midHIDDeviceManagerSendOutputReport )
|
|
726
|
+
{
|
|
727
|
+
__android_log_print(ANDROID_LOG_ERROR, TAG, "HIDDeviceRegisterCallback: callback class missing sendOutputReport" );
|
|
728
|
+
}
|
|
729
|
+
g_midHIDDeviceManagerSendFeatureReport = env->GetMethodID( g_HIDDeviceManagerCallbackClass, "sendFeatureReport", "(I[B)I" );
|
|
730
|
+
if ( !g_midHIDDeviceManagerSendFeatureReport )
|
|
731
|
+
{
|
|
732
|
+
__android_log_print(ANDROID_LOG_ERROR, TAG, "HIDDeviceRegisterCallback: callback class missing sendFeatureReport" );
|
|
733
|
+
}
|
|
734
|
+
g_midHIDDeviceManagerGetFeatureReport = env->GetMethodID( g_HIDDeviceManagerCallbackClass, "getFeatureReport", "(I[B)Z" );
|
|
735
|
+
if ( !g_midHIDDeviceManagerGetFeatureReport )
|
|
736
|
+
{
|
|
737
|
+
__android_log_print(ANDROID_LOG_ERROR, TAG, "HIDDeviceRegisterCallback: callback class missing getFeatureReport" );
|
|
738
|
+
}
|
|
739
|
+
g_midHIDDeviceManagerClose = env->GetMethodID( g_HIDDeviceManagerCallbackClass, "closeDevice", "(I)V" );
|
|
740
|
+
if ( !g_midHIDDeviceManagerClose )
|
|
741
|
+
{
|
|
742
|
+
__android_log_print(ANDROID_LOG_ERROR, TAG, "HIDDeviceRegisterCallback: callback class missing closeDevice" );
|
|
743
|
+
}
|
|
744
|
+
env->DeleteLocalRef( objClass );
|
|
745
|
+
}
|
|
746
|
+
}
|
|
747
|
+
|
|
748
|
+
extern "C"
|
|
749
|
+
JNIEXPORT void JNICALL HID_DEVICE_MANAGER_JAVA_INTERFACE(HIDDeviceReleaseCallback)(JNIEnv *env, jobject thiz)
|
|
750
|
+
{
|
|
751
|
+
LOGV("HIDDeviceReleaseCallback");
|
|
752
|
+
env->DeleteGlobalRef( g_HIDDeviceManagerCallbackClass );
|
|
753
|
+
env->DeleteGlobalRef( g_HIDDeviceManagerCallbackHandler );
|
|
754
|
+
}
|
|
755
|
+
|
|
756
|
+
extern "C"
|
|
757
|
+
JNIEXPORT void JNICALL HID_DEVICE_MANAGER_JAVA_INTERFACE(HIDDeviceConnected)(JNIEnv *env, jobject thiz, int nDeviceID, jstring sIdentifier, int nVendorId, int nProductId, jstring sSerialNumber, int nReleaseNumber, jstring sManufacturer, jstring sProduct, int nInterface )
|
|
758
|
+
{
|
|
759
|
+
LOGV( "HIDDeviceConnected() id=%d VID/PID = %.4x/%.4x, interface %d\n", nDeviceID, nVendorId, nProductId, nInterface );
|
|
760
|
+
|
|
761
|
+
hid_device_info *pInfo = new hid_device_info;
|
|
762
|
+
memset( pInfo, 0, sizeof( *pInfo ) );
|
|
763
|
+
pInfo->path = CreateStringFromJString( env, sIdentifier );
|
|
764
|
+
pInfo->vendor_id = nVendorId;
|
|
765
|
+
pInfo->product_id = nProductId;
|
|
766
|
+
pInfo->serial_number = CreateWStringFromJString( env, sSerialNumber );
|
|
767
|
+
pInfo->release_number = nReleaseNumber;
|
|
768
|
+
pInfo->manufacturer_string = CreateWStringFromJString( env, sManufacturer );
|
|
769
|
+
pInfo->product_string = CreateWStringFromJString( env, sProduct );
|
|
770
|
+
pInfo->interface_number = nInterface;
|
|
771
|
+
|
|
772
|
+
hid_device_ref<CHIDDevice> pDevice( new CHIDDevice( nDeviceID, pInfo ) );
|
|
773
|
+
|
|
774
|
+
hid_mutex_guard l( &g_DevicesMutex );
|
|
775
|
+
hid_device_ref<CHIDDevice> pLast, pCurr;
|
|
776
|
+
for ( pCurr = g_Devices; pCurr; pLast = pCurr, pCurr = pCurr->next )
|
|
777
|
+
{
|
|
778
|
+
continue;
|
|
779
|
+
}
|
|
780
|
+
if ( pLast )
|
|
781
|
+
{
|
|
782
|
+
pLast->next = pDevice;
|
|
783
|
+
}
|
|
784
|
+
else
|
|
785
|
+
{
|
|
786
|
+
g_Devices = pDevice;
|
|
787
|
+
}
|
|
788
|
+
}
|
|
789
|
+
|
|
790
|
+
extern "C"
|
|
791
|
+
JNIEXPORT void JNICALL HID_DEVICE_MANAGER_JAVA_INTERFACE(HIDDeviceOpenPending)(JNIEnv *env, jobject thiz, int nDeviceID)
|
|
792
|
+
{
|
|
793
|
+
LOGV( "HIDDeviceOpenPending() id=%d\n", nDeviceID );
|
|
794
|
+
hid_device_ref<CHIDDevice> pDevice = FindDevice( nDeviceID );
|
|
795
|
+
if ( pDevice )
|
|
796
|
+
{
|
|
797
|
+
pDevice->SetOpenPending();
|
|
798
|
+
}
|
|
799
|
+
}
|
|
800
|
+
|
|
801
|
+
extern "C"
|
|
802
|
+
JNIEXPORT void JNICALL HID_DEVICE_MANAGER_JAVA_INTERFACE(HIDDeviceOpenResult)(JNIEnv *env, jobject thiz, int nDeviceID, bool bOpened)
|
|
803
|
+
{
|
|
804
|
+
LOGV( "HIDDeviceOpenResult() id=%d, result=%s\n", nDeviceID, bOpened ? "true" : "false" );
|
|
805
|
+
hid_device_ref<CHIDDevice> pDevice = FindDevice( nDeviceID );
|
|
806
|
+
if ( pDevice )
|
|
807
|
+
{
|
|
808
|
+
pDevice->SetOpenResult( bOpened );
|
|
809
|
+
}
|
|
810
|
+
}
|
|
811
|
+
|
|
812
|
+
extern "C"
|
|
813
|
+
JNIEXPORT void JNICALL HID_DEVICE_MANAGER_JAVA_INTERFACE(HIDDeviceDisconnected)(JNIEnv *env, jobject thiz, int nDeviceID)
|
|
814
|
+
{
|
|
815
|
+
LOGV( "HIDDeviceDisconnected() id=%d\n", nDeviceID );
|
|
816
|
+
hid_device_ref<CHIDDevice> pDevice;
|
|
817
|
+
{
|
|
818
|
+
hid_mutex_guard l( &g_DevicesMutex );
|
|
819
|
+
hid_device_ref<CHIDDevice> pLast, pCurr;
|
|
820
|
+
for ( pCurr = g_Devices; pCurr; pLast = pCurr, pCurr = pCurr->next )
|
|
821
|
+
{
|
|
822
|
+
if ( pCurr->GetId() == nDeviceID )
|
|
823
|
+
{
|
|
824
|
+
pDevice = pCurr;
|
|
825
|
+
|
|
826
|
+
if ( pLast )
|
|
827
|
+
{
|
|
828
|
+
pLast->next = pCurr->next;
|
|
829
|
+
}
|
|
830
|
+
else
|
|
831
|
+
{
|
|
832
|
+
g_Devices = pCurr->next;
|
|
833
|
+
}
|
|
834
|
+
}
|
|
835
|
+
}
|
|
836
|
+
}
|
|
837
|
+
if ( pDevice )
|
|
838
|
+
{
|
|
839
|
+
pDevice->Close( false );
|
|
840
|
+
}
|
|
841
|
+
}
|
|
842
|
+
|
|
843
|
+
extern "C"
|
|
844
|
+
JNIEXPORT void JNICALL HID_DEVICE_MANAGER_JAVA_INTERFACE(HIDDeviceInputReport)(JNIEnv *env, jobject thiz, int nDeviceID, jbyteArray value)
|
|
845
|
+
{
|
|
846
|
+
jbyte *pBuf = env->GetByteArrayElements(value, NULL);
|
|
847
|
+
jsize nBufSize = env->GetArrayLength(value);
|
|
848
|
+
|
|
849
|
+
// LOGV( "HIDDeviceInput() id=%d len=%u\n", nDeviceID, nBufSize );
|
|
850
|
+
hid_device_ref<CHIDDevice> pDevice = FindDevice( nDeviceID );
|
|
851
|
+
if ( pDevice )
|
|
852
|
+
{
|
|
853
|
+
pDevice->ProcessInput( reinterpret_cast< const uint8_t* >( pBuf ), nBufSize );
|
|
854
|
+
}
|
|
855
|
+
|
|
856
|
+
env->ReleaseByteArrayElements(value, pBuf, 0);
|
|
857
|
+
}
|
|
858
|
+
|
|
859
|
+
extern "C"
|
|
860
|
+
JNIEXPORT void JNICALL HID_DEVICE_MANAGER_JAVA_INTERFACE(HIDDeviceFeatureReport)(JNIEnv *env, jobject thiz, int nDeviceID, jbyteArray value)
|
|
861
|
+
{
|
|
862
|
+
jbyte *pBuf = env->GetByteArrayElements(value, NULL);
|
|
863
|
+
jsize nBufSize = env->GetArrayLength(value);
|
|
864
|
+
|
|
865
|
+
LOGV( "HIDDeviceFeatureReport() id=%d len=%u\n", nDeviceID, nBufSize );
|
|
866
|
+
hid_device_ref<CHIDDevice> pDevice = FindDevice( nDeviceID );
|
|
867
|
+
if ( pDevice )
|
|
868
|
+
{
|
|
869
|
+
pDevice->ProcessFeatureReport( reinterpret_cast< const uint8_t* >( pBuf ), nBufSize );
|
|
870
|
+
}
|
|
871
|
+
|
|
872
|
+
env->ReleaseByteArrayElements(value, pBuf, 0);
|
|
873
|
+
}
|
|
874
|
+
|
|
875
|
+
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
876
|
+
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
877
|
+
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
878
|
+
|
|
879
|
+
extern "C"
|
|
880
|
+
{
|
|
881
|
+
|
|
882
|
+
int hid_init(void)
|
|
883
|
+
{
|
|
884
|
+
return 0;
|
|
885
|
+
}
|
|
886
|
+
|
|
887
|
+
struct hid_device_info HID_API_EXPORT * HID_API_CALL hid_enumerate(unsigned short vendor_id, unsigned short product_id)
|
|
888
|
+
{
|
|
889
|
+
struct hid_device_info *root = NULL;
|
|
890
|
+
hid_mutex_guard l( &g_DevicesMutex );
|
|
891
|
+
for ( hid_device_ref<CHIDDevice> pDevice = g_Devices; pDevice; pDevice = pDevice->next )
|
|
892
|
+
{
|
|
893
|
+
const hid_device_info *info = pDevice->GetDeviceInfo();
|
|
894
|
+
if ( ( vendor_id == 0 && product_id == 0 ) ||
|
|
895
|
+
( vendor_id == info->vendor_id && product_id == info->product_id ) )
|
|
896
|
+
{
|
|
897
|
+
hid_device_info *dev = CopyHIDDeviceInfo( info );
|
|
898
|
+
dev->next = root;
|
|
899
|
+
root = dev;
|
|
900
|
+
}
|
|
901
|
+
}
|
|
902
|
+
return root;
|
|
903
|
+
}
|
|
904
|
+
|
|
905
|
+
void HID_API_EXPORT HID_API_CALL hid_free_enumeration(struct hid_device_info *devs)
|
|
906
|
+
{
|
|
907
|
+
while ( devs )
|
|
908
|
+
{
|
|
909
|
+
struct hid_device_info *next = devs->next;
|
|
910
|
+
FreeHIDDeviceInfo( devs );
|
|
911
|
+
devs = next;
|
|
912
|
+
}
|
|
913
|
+
}
|
|
914
|
+
|
|
915
|
+
HID_API_EXPORT hid_device * HID_API_CALL hid_open(unsigned short vendor_id, unsigned short product_id, const wchar_t *serial_number)
|
|
916
|
+
{
|
|
917
|
+
// TODO: Implement
|
|
918
|
+
return NULL;
|
|
919
|
+
}
|
|
920
|
+
|
|
921
|
+
HID_API_EXPORT hid_device * HID_API_CALL hid_open_path(const char *path, int bExclusive)
|
|
922
|
+
{
|
|
923
|
+
LOGV( "hid_open_path( %s )", path );
|
|
924
|
+
|
|
925
|
+
hid_device_ref< CHIDDevice > pDevice;
|
|
926
|
+
{
|
|
927
|
+
hid_mutex_guard l( &g_DevicesMutex );
|
|
928
|
+
for ( hid_device_ref<CHIDDevice> pCurr = g_Devices; pCurr; pCurr = pCurr->next )
|
|
929
|
+
{
|
|
930
|
+
if ( strcmp( pCurr->GetDeviceInfo()->path, path ) == 0 )
|
|
931
|
+
{
|
|
932
|
+
if ( pCurr->GetDevice() ) {
|
|
933
|
+
pCurr->IncrementDeviceRefCount();
|
|
934
|
+
return pCurr->GetDevice();
|
|
935
|
+
}
|
|
936
|
+
|
|
937
|
+
// Hold a shared pointer to the controller for the duration
|
|
938
|
+
pDevice = pCurr;
|
|
939
|
+
break;
|
|
940
|
+
}
|
|
941
|
+
}
|
|
942
|
+
}
|
|
943
|
+
if ( pDevice && pDevice->BOpen() )
|
|
944
|
+
{
|
|
945
|
+
return pDevice->GetDevice();
|
|
946
|
+
}
|
|
947
|
+
return NULL;
|
|
948
|
+
}
|
|
949
|
+
|
|
950
|
+
int HID_API_EXPORT HID_API_CALL hid_write(hid_device *device, const unsigned char *data, size_t length)
|
|
951
|
+
{
|
|
952
|
+
LOGV( "hid_write id=%d length=%u", device->nId, length );
|
|
953
|
+
hid_device_ref<CHIDDevice> pDevice = FindDevice( device->nId );
|
|
954
|
+
if ( pDevice )
|
|
955
|
+
{
|
|
956
|
+
return pDevice->SendOutputReport( data, length );
|
|
957
|
+
}
|
|
958
|
+
return -1; // Controller was disconnected
|
|
959
|
+
}
|
|
960
|
+
|
|
961
|
+
// TODO: Implement timeout?
|
|
962
|
+
int HID_API_EXPORT HID_API_CALL hid_read_timeout(hid_device *device, unsigned char *data, size_t length, int milliseconds)
|
|
963
|
+
{
|
|
964
|
+
// LOGV( "hid_read_timeout id=%d length=%u timeout=%d", device->nId, length, milliseconds );
|
|
965
|
+
hid_device_ref<CHIDDevice> pDevice = FindDevice( device->nId );
|
|
966
|
+
if ( pDevice )
|
|
967
|
+
{
|
|
968
|
+
return pDevice->GetInput( data, length );
|
|
969
|
+
}
|
|
970
|
+
LOGV( "controller was disconnected" );
|
|
971
|
+
return -1; // Controller was disconnected
|
|
972
|
+
}
|
|
973
|
+
|
|
974
|
+
// TODO: Implement blocking
|
|
975
|
+
int HID_API_EXPORT HID_API_CALL hid_read(hid_device *device, unsigned char *data, size_t length)
|
|
976
|
+
{
|
|
977
|
+
LOGV( "hid_read id=%d length=%u", device->nId, length );
|
|
978
|
+
return hid_read_timeout( device, data, length, 0 );
|
|
979
|
+
}
|
|
980
|
+
|
|
981
|
+
// TODO: Implement?
|
|
982
|
+
int HID_API_EXPORT HID_API_CALL hid_set_nonblocking(hid_device *device, int nonblock)
|
|
983
|
+
{
|
|
984
|
+
return -1;
|
|
985
|
+
}
|
|
986
|
+
|
|
987
|
+
int HID_API_EXPORT HID_API_CALL hid_send_feature_report(hid_device *device, const unsigned char *data, size_t length)
|
|
988
|
+
{
|
|
989
|
+
LOGV( "hid_send_feature_report id=%d length=%u", device->nId, length );
|
|
990
|
+
hid_device_ref<CHIDDevice> pDevice = FindDevice( device->nId );
|
|
991
|
+
if ( pDevice )
|
|
992
|
+
{
|
|
993
|
+
return pDevice->SendFeatureReport( data, length );
|
|
994
|
+
}
|
|
995
|
+
return -1; // Controller was disconnected
|
|
996
|
+
}
|
|
997
|
+
|
|
998
|
+
|
|
999
|
+
// Synchronous operation. Will block until completed.
|
|
1000
|
+
int HID_API_EXPORT HID_API_CALL hid_get_feature_report(hid_device *device, unsigned char *data, size_t length)
|
|
1001
|
+
{
|
|
1002
|
+
LOGV( "hid_get_feature_report id=%d length=%u", device->nId, length );
|
|
1003
|
+
hid_device_ref<CHIDDevice> pDevice = FindDevice( device->nId );
|
|
1004
|
+
if ( pDevice )
|
|
1005
|
+
{
|
|
1006
|
+
return pDevice->GetFeatureReport( data, length );
|
|
1007
|
+
}
|
|
1008
|
+
return -1; // Controller was disconnected
|
|
1009
|
+
}
|
|
1010
|
+
|
|
1011
|
+
|
|
1012
|
+
void HID_API_EXPORT HID_API_CALL hid_close(hid_device *device)
|
|
1013
|
+
{
|
|
1014
|
+
LOGV( "hid_close id=%d", device->nId );
|
|
1015
|
+
hid_device_ref<CHIDDevice> pDevice = FindDevice( device->nId );
|
|
1016
|
+
if ( pDevice )
|
|
1017
|
+
{
|
|
1018
|
+
pDevice->DecrementDeviceRefCount();
|
|
1019
|
+
if ( pDevice->GetDeviceRefCount() == 0 ) {
|
|
1020
|
+
pDevice->Close( true );
|
|
1021
|
+
}
|
|
1022
|
+
}
|
|
1023
|
+
else
|
|
1024
|
+
{
|
|
1025
|
+
// Couldn't find it, it's already closed
|
|
1026
|
+
delete device;
|
|
1027
|
+
}
|
|
1028
|
+
|
|
1029
|
+
}
|
|
1030
|
+
|
|
1031
|
+
int HID_API_EXPORT_CALL hid_get_manufacturer_string(hid_device *device, wchar_t *string, size_t maxlen)
|
|
1032
|
+
{
|
|
1033
|
+
hid_device_ref<CHIDDevice> pDevice = FindDevice( device->nId );
|
|
1034
|
+
if ( pDevice )
|
|
1035
|
+
{
|
|
1036
|
+
wcsncpy( string, pDevice->GetDeviceInfo()->manufacturer_string, maxlen );
|
|
1037
|
+
return 0;
|
|
1038
|
+
}
|
|
1039
|
+
return -1;
|
|
1040
|
+
}
|
|
1041
|
+
|
|
1042
|
+
int HID_API_EXPORT_CALL hid_get_product_string(hid_device *device, wchar_t *string, size_t maxlen)
|
|
1043
|
+
{
|
|
1044
|
+
hid_device_ref<CHIDDevice> pDevice = FindDevice( device->nId );
|
|
1045
|
+
if ( pDevice )
|
|
1046
|
+
{
|
|
1047
|
+
wcsncpy( string, pDevice->GetDeviceInfo()->product_string, maxlen );
|
|
1048
|
+
return 0;
|
|
1049
|
+
}
|
|
1050
|
+
return -1;
|
|
1051
|
+
}
|
|
1052
|
+
|
|
1053
|
+
int HID_API_EXPORT_CALL hid_get_serial_number_string(hid_device *device, wchar_t *string, size_t maxlen)
|
|
1054
|
+
{
|
|
1055
|
+
hid_device_ref<CHIDDevice> pDevice = FindDevice( device->nId );
|
|
1056
|
+
if ( pDevice )
|
|
1057
|
+
{
|
|
1058
|
+
wcsncpy( string, pDevice->GetDeviceInfo()->serial_number, maxlen );
|
|
1059
|
+
return 0;
|
|
1060
|
+
}
|
|
1061
|
+
return -1;
|
|
1062
|
+
}
|
|
1063
|
+
|
|
1064
|
+
int HID_API_EXPORT_CALL hid_get_indexed_string(hid_device *device, int string_index, wchar_t *string, size_t maxlen)
|
|
1065
|
+
{
|
|
1066
|
+
return -1;
|
|
1067
|
+
}
|
|
1068
|
+
|
|
1069
|
+
HID_API_EXPORT const wchar_t* HID_API_CALL hid_error(hid_device *device)
|
|
1070
|
+
{
|
|
1071
|
+
return NULL;
|
|
1072
|
+
}
|
|
1073
|
+
|
|
1074
|
+
int hid_exit(void)
|
|
1075
|
+
{
|
|
1076
|
+
return 0;
|
|
1077
|
+
}
|
|
1078
|
+
|
|
1079
|
+
}
|