gesture: Removed the gesture API from SDL3.

Fixes #6758.
This commit is contained in:
Ryan C. Gordon 2022-12-13 14:54:37 -05:00
parent 07fa2769b8
commit a76053352c
No known key found for this signature in database
GPG key ID: FA148B892AB48044
29 changed files with 6 additions and 1726 deletions

View file

@ -305,7 +305,6 @@
<ClInclude Include="..\..\include\SDL3\SDL_events.h" />
<ClInclude Include="..\..\include\SDL3\SDL_filesystem.h" />
<ClInclude Include="..\..\include\SDL3\SDL_gamecontroller.h" />
<ClInclude Include="..\..\include\SDL3\SDL_gesture.h" />
<ClInclude Include="..\..\include\SDL3\SDL_guid.h" />
<ClInclude Include="..\..\include\SDL3\SDL_haptic.h" />
<ClInclude Include="..\..\include\SDL3\SDL_hints.h" />
@ -390,7 +389,6 @@
<ClInclude Include="..\..\src\events\SDL_displayevents_c.h" />
<ClInclude Include="..\..\src\events\SDL_dropevents_c.h" />
<ClInclude Include="..\..\src\events\SDL_events_c.h" />
<ClInclude Include="..\..\src\events\SDL_gesture_c.h" />
<ClInclude Include="..\..\src\events\SDL_keyboard_c.h" />
<ClInclude Include="..\..\src\events\SDL_mouse_c.h" />
<ClInclude Include="..\..\src\events\SDL_touch_c.h" />
@ -575,7 +573,6 @@
<ClCompile Include="..\..\src\events\SDL_displayevents.c" />
<ClCompile Include="..\..\src\events\SDL_dropevents.c" />
<ClCompile Include="..\..\src\events\SDL_events.c" />
<ClCompile Include="..\..\src\events\SDL_gesture.c" />
<ClCompile Include="..\..\src\events\SDL_keyboard.c" />
<ClCompile Include="..\..\src\events\SDL_mouse.c" />
<ClCompile Include="..\..\src\events\SDL_quit.c" />

View file

@ -225,9 +225,6 @@
<ClInclude Include="..\..\include\SDL3\SDL_gamecontroller.h">
<Filter>API Headers</Filter>
</ClInclude>
<ClInclude Include="..\..\include\SDL3\SDL_gesture.h">
<Filter>API Headers</Filter>
</ClInclude>
<ClInclude Include="..\..\include\SDL3\SDL_guid.h">
<Filter>API Headers</Filter>
</ClInclude>
@ -459,9 +456,6 @@
<ClInclude Include="..\..\src\events\SDL_events_c.h">
<Filter>events</Filter>
</ClInclude>
<ClInclude Include="..\..\src\events\SDL_gesture_c.h">
<Filter>events</Filter>
</ClInclude>
<ClInclude Include="..\..\src\events\SDL_keyboard_c.h">
<Filter>events</Filter>
</ClInclude>
@ -892,9 +886,6 @@
<ClCompile Include="..\..\src\events\SDL_events.c">
<Filter>events</Filter>
</ClCompile>
<ClCompile Include="..\..\src\events\SDL_gesture.c">
<Filter>events</Filter>
</ClCompile>
<ClCompile Include="..\..\src\events\SDL_keyboard.c">
<Filter>events</Filter>
</ClCompile>

View file

@ -291,7 +291,6 @@
<ClCompile Include="..\src\events\SDL_displayevents.c" />
<ClCompile Include="..\src\events\SDL_dropevents.c" />
<ClCompile Include="..\src\events\SDL_events.c" />
<ClCompile Include="..\src\events\SDL_gesture.c" />
<ClCompile Include="..\src\events\SDL_keyboard.c" />
<ClCompile Include="..\src\events\SDL_mouse.c" />
<ClCompile Include="..\src\events\SDL_quit.c" />

View file

@ -507,9 +507,6 @@
<ClCompile Include="..\src\events\SDL_events.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\events\SDL_gesture.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\events\SDL_keyboard.c">
<Filter>Source Files</Filter>
</ClCompile>

View file

@ -18,8 +18,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testdraw2", "tests\testdraw
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testfile", "tests\testfile\testfile.vcxproj", "{CAE4F1D0-314F-4B10-805B-0EFD670133A0}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testgesture", "tests\testgesture\testgesture.vcxproj", "{79CEE57E-1BC3-4FF6-90B3-9E39763CDAFF}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testgl2", "tests\testgl2\testgl2.vcxproj", "{8B5CFB38-CCBA-40A8-AD7A-89C57B070884}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testjoystick", "tests\testjoystick\testjoystick.vcxproj", "{55812185-D13C-4022-9C81-32E0F4A08304}"

View file

@ -251,7 +251,6 @@
<ClInclude Include="..\..\include\SDL3\SDL_events.h" />
<ClInclude Include="..\..\include\SDL3\SDL_filesystem.h" />
<ClInclude Include="..\..\include\SDL3\SDL_gamecontroller.h" />
<ClInclude Include="..\..\include\SDL3\SDL_gesture.h" />
<ClInclude Include="..\..\include\SDL3\SDL_guid.h" />
<ClInclude Include="..\..\include\SDL3\SDL_haptic.h" />
<ClInclude Include="..\..\include\SDL3\SDL_hints.h" />
@ -334,7 +333,6 @@
<ClInclude Include="..\..\src\events\SDL_displayevents_c.h" />
<ClInclude Include="..\..\src\events\SDL_dropevents_c.h" />
<ClInclude Include="..\..\src\events\SDL_events_c.h" />
<ClInclude Include="..\..\src\events\SDL_gesture_c.h" />
<ClInclude Include="..\..\src\events\SDL_keyboard_c.h" />
<ClInclude Include="..\..\src\events\SDL_mouse_c.h" />
<ClInclude Include="..\..\src\events\SDL_touch_c.h" />
@ -491,7 +489,6 @@
<ClCompile Include="..\..\src\events\SDL_displayevents.c" />
<ClCompile Include="..\..\src\events\SDL_dropevents.c" />
<ClCompile Include="..\..\src\events\SDL_events.c" />
<ClCompile Include="..\..\src\events\SDL_gesture.c" />
<ClCompile Include="..\..\src\events\SDL_keyboard.c" />
<ClCompile Include="..\..\src\events\SDL_mouse.c" />
<ClCompile Include="..\..\src\events\SDL_quit.c" />

View file

@ -222,9 +222,6 @@
<ClInclude Include="..\..\include\SDL3\SDL_gamecontroller.h">
<Filter>API Headers</Filter>
</ClInclude>
<ClInclude Include="..\..\include\SDL3\SDL_gesture.h">
<Filter>API Headers</Filter>
</ClInclude>
<ClInclude Include="..\..\include\SDL3\SDL_guid.h">
<Filter>API Headers</Filter>
</ClInclude>
@ -453,9 +450,6 @@
<ClInclude Include="..\..\src\events\SDL_events_c.h">
<Filter>events</Filter>
</ClInclude>
<ClInclude Include="..\..\src\events\SDL_gesture_c.h">
<Filter>events</Filter>
</ClInclude>
<ClInclude Include="..\..\src\events\SDL_keyboard_c.h">
<Filter>events</Filter>
</ClInclude>
@ -880,9 +874,6 @@
<ClCompile Include="..\..\src\events\SDL_events.c">
<Filter>events</Filter>
</ClCompile>
<ClCompile Include="..\..\src\events\SDL_gesture.c">
<Filter>events</Filter>
</ClCompile>
<ClCompile Include="..\..\src\events\SDL_keyboard.c">
<Filter>events</Filter>
</ClCompile>

View file

@ -1,210 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{79CEE57E-1BC3-4FF6-90B3-9E39763CDAFF}</ProjectGuid>
<RootNamespace>testgesture</RootNamespace>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<PlatformToolset Condition="'$(VisualStudioVersion)' != '10.0'">$(DefaultPlatformToolset)</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<PlatformToolset Condition="'$(VisualStudioVersion)' != '10.0'">$(DefaultPlatformToolset)</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<PlatformToolset Condition="'$(VisualStudioVersion)' != '10.0'">$(DefaultPlatformToolset)</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<PlatformToolset Condition="'$(VisualStudioVersion)' != '10.0'">$(DefaultPlatformToolset)</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC70.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC70.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC70.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC70.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Platform)\$(Configuration)\</IntDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Platform)\$(Configuration)\</IntDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Midl>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>true</MkTypLibCompatible>
<SuppressStartupBanner>true</SuppressStartupBanner>
<TargetEnvironment>Win32</TargetEnvironment>
<TypeLibraryName>.\Debug/testgesture.tlb</TypeLibraryName>
</Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>$(SolutionDir)/../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalUsingDirectories>%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>OldStyle</DebugInformationFormat>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0409</Culture>
</ResourceCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Midl>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>true</MkTypLibCompatible>
<SuppressStartupBanner>true</SuppressStartupBanner>
<TargetEnvironment>X64</TargetEnvironment>
<TypeLibraryName>.\Debug/testgesture.tlb</TypeLibraryName>
</Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>$(SolutionDir)/../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalUsingDirectories>%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>OldStyle</DebugInformationFormat>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0409</Culture>
</ResourceCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Midl>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>true</MkTypLibCompatible>
<SuppressStartupBanner>true</SuppressStartupBanner>
<TargetEnvironment>Win32</TargetEnvironment>
<TypeLibraryName>.\Release/testgesture.tlb</TypeLibraryName>
</Midl>
<ClCompile>
<AdditionalIncludeDirectories>$(SolutionDir)/../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalUsingDirectories>%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0409</Culture>
</ResourceCompile>
<Link>
<SubSystem>Windows</SubSystem>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Midl>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>true</MkTypLibCompatible>
<SuppressStartupBanner>true</SuppressStartupBanner>
<TargetEnvironment>X64</TargetEnvironment>
<TypeLibraryName>.\Release/testgesture.tlb</TypeLibraryName>
</Midl>
<ClCompile>
<AdditionalIncludeDirectories>$(SolutionDir)/../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalUsingDirectories>%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0409</Culture>
</ResourceCompile>
<Link>
<SubSystem>Windows</SubSystem>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ProjectReference Include="..\..\SDL\SDL.vcxproj">
<Project>{81ce8daf-ebb2-4761-8e45-b71abcca8c68}</Project>
<Private>false</Private>
<CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
<ReferenceOutputAssembly>true</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="..\..\SDL_main\SDL_main.vcxproj">
<Project>{da956fd3-e142-46f2-9dd5-c78bebb56b7a}</Project>
<Private>false</Private>
<CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
<ReferenceOutputAssembly>true</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="..\..\SDL_test\SDL_test.vcxproj">
<Project>{da956fd3-e143-46f2-9fe5-c77bebc56b1a}</Project>
<Private>false</Private>
<CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
<ReferenceOutputAssembly>true</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\..\test\testgesture.c" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View file

@ -175,7 +175,6 @@
A75FCD4023E25AB700529352 /* SDL_windowevents_c.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A94323E2514000DCD162 /* SDL_windowevents_c.h */; };
A75FCD4223E25AB700529352 /* SDL_cocoavideo.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A69323E2513E00DCD162 /* SDL_cocoavideo.h */; };
A75FCD4423E25AB700529352 /* SDL_uikitevents.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A62D23E2513D00DCD162 /* SDL_uikitevents.h */; };
A75FCD4523E25AB700529352 /* SDL_gesture_c.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A93023E2514000DCD162 /* SDL_gesture_c.h */; };
A75FCD4623E25AB700529352 /* SDL_shaders_gl.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A90D23E2514000DCD162 /* SDL_shaders_gl.h */; };
A75FCD4723E25AB700529352 /* SDL_systhread_c.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A78423E2513E00DCD162 /* SDL_systhread_c.h */; };
A75FCD4A23E25AB700529352 /* SDL_cocoakeyboard.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A68023E2513E00DCD162 /* SDL_cocoakeyboard.h */; };
@ -395,7 +394,6 @@
A75FCE6523E25AB700529352 /* SDL_uikitopengles.m in Sources */ = {isa = PBXBuildFile; fileRef = A7D8A62323E2513D00DCD162 /* SDL_uikitopengles.m */; };
A75FCE6723E25AB700529352 /* SDL_cocoamodes.m in Sources */ = {isa = PBXBuildFile; fileRef = A7D8A68123E2513E00DCD162 /* SDL_cocoamodes.m */; };
A75FCE6823E25AB700529352 /* k_rem_pio2.c in Sources */ = {isa = PBXBuildFile; fileRef = A7D8A91623E2514000DCD162 /* k_rem_pio2.c */; };
A75FCE6A23E25AB700529352 /* SDL_gesture.c in Sources */ = {isa = PBXBuildFile; fileRef = A7D8A94023E2514000DCD162 /* SDL_gesture.c */; };
A75FCE6B23E25AB700529352 /* SDL_getenv.c in Sources */ = {isa = PBXBuildFile; fileRef = A7D8A8D423E2514000DCD162 /* SDL_getenv.c */; };
A75FCE6C23E25AB700529352 /* SDL_hidapi_gamecube.c in Sources */ = {isa = PBXBuildFile; fileRef = A7D8A7C923E2513E00DCD162 /* SDL_hidapi_gamecube.c */; };
A75FCE6D23E25AB700529352 /* SDL_joystick.c in Sources */ = {isa = PBXBuildFile; fileRef = A7D8A7A923E2513E00DCD162 /* SDL_joystick.c */; };
@ -490,7 +488,6 @@
A75FCEF923E25AC700529352 /* SDL_windowevents_c.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A94323E2514000DCD162 /* SDL_windowevents_c.h */; };
A75FCEFB23E25AC700529352 /* SDL_cocoavideo.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A69323E2513E00DCD162 /* SDL_cocoavideo.h */; };
A75FCEFD23E25AC700529352 /* SDL_uikitevents.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A62D23E2513D00DCD162 /* SDL_uikitevents.h */; };
A75FCEFE23E25AC700529352 /* SDL_gesture_c.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A93023E2514000DCD162 /* SDL_gesture_c.h */; };
A75FCEFF23E25AC700529352 /* SDL_shaders_gl.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A90D23E2514000DCD162 /* SDL_shaders_gl.h */; };
A75FCF0023E25AC700529352 /* SDL_systhread_c.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A78423E2513E00DCD162 /* SDL_systhread_c.h */; };
A75FCF0323E25AC700529352 /* SDL_cocoakeyboard.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A68023E2513E00DCD162 /* SDL_cocoakeyboard.h */; };
@ -710,7 +707,6 @@
A75FD01E23E25AC700529352 /* SDL_uikitopengles.m in Sources */ = {isa = PBXBuildFile; fileRef = A7D8A62323E2513D00DCD162 /* SDL_uikitopengles.m */; };
A75FD02023E25AC700529352 /* SDL_cocoamodes.m in Sources */ = {isa = PBXBuildFile; fileRef = A7D8A68123E2513E00DCD162 /* SDL_cocoamodes.m */; };
A75FD02123E25AC700529352 /* k_rem_pio2.c in Sources */ = {isa = PBXBuildFile; fileRef = A7D8A91623E2514000DCD162 /* k_rem_pio2.c */; };
A75FD02323E25AC700529352 /* SDL_gesture.c in Sources */ = {isa = PBXBuildFile; fileRef = A7D8A94023E2514000DCD162 /* SDL_gesture.c */; };
A75FD02423E25AC700529352 /* SDL_getenv.c in Sources */ = {isa = PBXBuildFile; fileRef = A7D8A8D423E2514000DCD162 /* SDL_getenv.c */; };
A75FD02523E25AC700529352 /* SDL_hidapi_gamecube.c in Sources */ = {isa = PBXBuildFile; fileRef = A7D8A7C923E2513E00DCD162 /* SDL_hidapi_gamecube.c */; };
A75FD02623E25AC700529352 /* SDL_joystick.c in Sources */ = {isa = PBXBuildFile; fileRef = A7D8A7A923E2513E00DCD162 /* SDL_joystick.c */; };
@ -842,7 +838,6 @@
A769B0C623E259AE00872273 /* SDL_windowevents_c.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A94323E2514000DCD162 /* SDL_windowevents_c.h */; };
A769B0C823E259AE00872273 /* SDL_cocoavideo.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A69323E2513E00DCD162 /* SDL_cocoavideo.h */; };
A769B0CA23E259AE00872273 /* SDL_uikitevents.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A62D23E2513D00DCD162 /* SDL_uikitevents.h */; };
A769B0CB23E259AE00872273 /* SDL_gesture_c.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A93023E2514000DCD162 /* SDL_gesture_c.h */; };
A769B0CC23E259AE00872273 /* SDL_shaders_gl.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A90D23E2514000DCD162 /* SDL_shaders_gl.h */; };
A769B0CD23E259AE00872273 /* SDL_systhread_c.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A78423E2513E00DCD162 /* SDL_systhread_c.h */; };
A769B0D023E259AE00872273 /* SDL_cocoakeyboard.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A68023E2513E00DCD162 /* SDL_cocoakeyboard.h */; };
@ -1064,7 +1059,6 @@
A769B1F123E259AE00872273 /* SDL_uikitopengles.m in Sources */ = {isa = PBXBuildFile; fileRef = A7D8A62323E2513D00DCD162 /* SDL_uikitopengles.m */; };
A769B1F323E259AE00872273 /* SDL_cocoamodes.m in Sources */ = {isa = PBXBuildFile; fileRef = A7D8A68123E2513E00DCD162 /* SDL_cocoamodes.m */; };
A769B1F423E259AE00872273 /* k_rem_pio2.c in Sources */ = {isa = PBXBuildFile; fileRef = A7D8A91623E2514000DCD162 /* k_rem_pio2.c */; };
A769B1F623E259AE00872273 /* SDL_gesture.c in Sources */ = {isa = PBXBuildFile; fileRef = A7D8A94023E2514000DCD162 /* SDL_gesture.c */; };
A769B1F723E259AE00872273 /* SDL_getenv.c in Sources */ = {isa = PBXBuildFile; fileRef = A7D8A8D423E2514000DCD162 /* SDL_getenv.c */; };
A769B1F823E259AE00872273 /* SDL_hidapi_gamecube.c in Sources */ = {isa = PBXBuildFile; fileRef = A7D8A7C923E2513E00DCD162 /* SDL_hidapi_gamecube.c */; };
A769B1F923E259AE00872273 /* SDL_joystick.c in Sources */ = {isa = PBXBuildFile; fileRef = A7D8A7A923E2513E00DCD162 /* SDL_joystick.c */; };
@ -2791,12 +2785,6 @@
A7D8BB3623E2514500DCD162 /* SDL_windowevents.c in Sources */ = {isa = PBXBuildFile; fileRef = A7D8A92F23E2514000DCD162 /* SDL_windowevents.c */; };
A7D8BB3723E2514500DCD162 /* SDL_windowevents.c in Sources */ = {isa = PBXBuildFile; fileRef = A7D8A92F23E2514000DCD162 /* SDL_windowevents.c */; };
A7D8BB3823E2514500DCD162 /* SDL_windowevents.c in Sources */ = {isa = PBXBuildFile; fileRef = A7D8A92F23E2514000DCD162 /* SDL_windowevents.c */; };
A7D8BB3923E2514500DCD162 /* SDL_gesture_c.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A93023E2514000DCD162 /* SDL_gesture_c.h */; };
A7D8BB3A23E2514500DCD162 /* SDL_gesture_c.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A93023E2514000DCD162 /* SDL_gesture_c.h */; };
A7D8BB3B23E2514500DCD162 /* SDL_gesture_c.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A93023E2514000DCD162 /* SDL_gesture_c.h */; };
A7D8BB3C23E2514500DCD162 /* SDL_gesture_c.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A93023E2514000DCD162 /* SDL_gesture_c.h */; };
A7D8BB3D23E2514500DCD162 /* SDL_gesture_c.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A93023E2514000DCD162 /* SDL_gesture_c.h */; };
A7D8BB3E23E2514500DCD162 /* SDL_gesture_c.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A93023E2514000DCD162 /* SDL_gesture_c.h */; };
A7D8BB3F23E2514500DCD162 /* SDL_displayevents_c.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A93123E2514000DCD162 /* SDL_displayevents_c.h */; };
A7D8BB4023E2514500DCD162 /* SDL_displayevents_c.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A93123E2514000DCD162 /* SDL_displayevents_c.h */; };
A7D8BB4123E2514500DCD162 /* SDL_displayevents_c.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A93123E2514000DCD162 /* SDL_displayevents_c.h */; };
@ -2881,12 +2869,6 @@
A7D8BB9023E2514500DCD162 /* SDL_touch.c in Sources */ = {isa = PBXBuildFile; fileRef = A7D8A93E23E2514000DCD162 /* SDL_touch.c */; };
A7D8BB9123E2514500DCD162 /* SDL_touch.c in Sources */ = {isa = PBXBuildFile; fileRef = A7D8A93E23E2514000DCD162 /* SDL_touch.c */; };
A7D8BB9223E2514500DCD162 /* SDL_touch.c in Sources */ = {isa = PBXBuildFile; fileRef = A7D8A93E23E2514000DCD162 /* SDL_touch.c */; };
A7D8BB9923E2514500DCD162 /* SDL_gesture.c in Sources */ = {isa = PBXBuildFile; fileRef = A7D8A94023E2514000DCD162 /* SDL_gesture.c */; };
A7D8BB9A23E2514500DCD162 /* SDL_gesture.c in Sources */ = {isa = PBXBuildFile; fileRef = A7D8A94023E2514000DCD162 /* SDL_gesture.c */; };
A7D8BB9B23E2514500DCD162 /* SDL_gesture.c in Sources */ = {isa = PBXBuildFile; fileRef = A7D8A94023E2514000DCD162 /* SDL_gesture.c */; };
A7D8BB9C23E2514500DCD162 /* SDL_gesture.c in Sources */ = {isa = PBXBuildFile; fileRef = A7D8A94023E2514000DCD162 /* SDL_gesture.c */; };
A7D8BB9D23E2514500DCD162 /* SDL_gesture.c in Sources */ = {isa = PBXBuildFile; fileRef = A7D8A94023E2514000DCD162 /* SDL_gesture.c */; };
A7D8BB9E23E2514500DCD162 /* SDL_gesture.c in Sources */ = {isa = PBXBuildFile; fileRef = A7D8A94023E2514000DCD162 /* SDL_gesture.c */; };
A7D8BB9F23E2514500DCD162 /* scancodes_xfree86.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A94123E2514000DCD162 /* scancodes_xfree86.h */; };
A7D8BBA023E2514500DCD162 /* scancodes_xfree86.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A94123E2514000DCD162 /* scancodes_xfree86.h */; };
A7D8BBA123E2514500DCD162 /* scancodes_xfree86.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D8A94123E2514000DCD162 /* scancodes_xfree86.h */; };
@ -3218,10 +3200,6 @@
F3F07D60269640160074468B /* SDL_hidapi_luna.c in Sources */ = {isa = PBXBuildFile; fileRef = F3F07D59269640160074468B /* SDL_hidapi_luna.c */; };
F3F07D61269640160074468B /* SDL_hidapi_luna.c in Sources */ = {isa = PBXBuildFile; fileRef = F3F07D59269640160074468B /* SDL_hidapi_luna.c */; };
F3F07D62269640160074468B /* SDL_hidapi_luna.c in Sources */ = {isa = PBXBuildFile; fileRef = F3F07D59269640160074468B /* SDL_hidapi_luna.c */; };
F3F7D8E92933074E00816151 /* SDL_gesture.h in Headers */ = {isa = PBXBuildFile; fileRef = F3F7D8A92933074900816151 /* SDL_gesture.h */; };
F3F7D8EA2933074E00816151 /* SDL_gesture.h in Headers */ = {isa = PBXBuildFile; fileRef = F3F7D8A92933074900816151 /* SDL_gesture.h */; };
F3F7D8EB2933074E00816151 /* SDL_gesture.h in Headers */ = {isa = PBXBuildFile; fileRef = F3F7D8A92933074900816151 /* SDL_gesture.h */; };
F3F7D8EC2933074E00816151 /* SDL_gesture.h in Headers */ = {isa = PBXBuildFile; fileRef = F3F7D8A92933074900816151 /* SDL_gesture.h */; };
F3F7D8ED2933074E00816151 /* SDL_audio.h in Headers */ = {isa = PBXBuildFile; fileRef = F3F7D8AA2933074900816151 /* SDL_audio.h */; };
F3F7D8EE2933074E00816151 /* SDL_audio.h in Headers */ = {isa = PBXBuildFile; fileRef = F3F7D8AA2933074900816151 /* SDL_audio.h */; };
F3F7D8EF2933074E00816151 /* SDL_audio.h in Headers */ = {isa = PBXBuildFile; fileRef = F3F7D8AA2933074900816151 /* SDL_audio.h */; };
@ -3857,7 +3835,6 @@
A7D8A92D23E2514000DCD162 /* SDL_displayevents.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_displayevents.c; sourceTree = "<group>"; };
A7D8A92E23E2514000DCD162 /* SDL_dropevents_c.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_dropevents_c.h; sourceTree = "<group>"; };
A7D8A92F23E2514000DCD162 /* SDL_windowevents.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_windowevents.c; sourceTree = "<group>"; };
A7D8A93023E2514000DCD162 /* SDL_gesture_c.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_gesture_c.h; sourceTree = "<group>"; };
A7D8A93123E2514000DCD162 /* SDL_displayevents_c.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_displayevents_c.h; sourceTree = "<group>"; };
A7D8A93223E2514000DCD162 /* blank_cursor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = blank_cursor.h; sourceTree = "<group>"; };
A7D8A93323E2514000DCD162 /* default_cursor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = default_cursor.h; sourceTree = "<group>"; };
@ -3872,7 +3849,6 @@
A7D8A93C23E2514000DCD162 /* SDL_quit.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_quit.c; sourceTree = "<group>"; };
A7D8A93D23E2514000DCD162 /* SDL_keyboard_c.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_keyboard_c.h; sourceTree = "<group>"; };
A7D8A93E23E2514000DCD162 /* SDL_touch.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_touch.c; sourceTree = "<group>"; };
A7D8A94023E2514000DCD162 /* SDL_gesture.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_gesture.c; sourceTree = "<group>"; };
A7D8A94123E2514000DCD162 /* scancodes_xfree86.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = scancodes_xfree86.h; sourceTree = "<group>"; };
A7D8A94223E2514000DCD162 /* SDL_events_c.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_events_c.h; sourceTree = "<group>"; };
A7D8A94323E2514000DCD162 /* SDL_windowevents_c.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_windowevents_c.h; sourceTree = "<group>"; };
@ -3923,7 +3899,6 @@
F3ADAB8D2576F0B300A6B1D9 /* SDL_sysurl.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDL_sysurl.m; sourceTree = "<group>"; };
F3D60A8228C16A1800788A3A /* SDL_hidapi_wii.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_hidapi_wii.c; sourceTree = "<group>"; };
F3F07D59269640160074468B /* SDL_hidapi_luna.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_hidapi_luna.c; sourceTree = "<group>"; };
F3F7D8A92933074900816151 /* SDL_gesture.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_gesture.h; path = SDL3/SDL_gesture.h; sourceTree = "<group>"; };
F3F7D8AA2933074900816151 /* SDL_audio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_audio.h; path = SDL3/SDL_audio.h; sourceTree = "<group>"; };
F3F7D8AB2933074900816151 /* SDL_platform.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_platform.h; path = SDL3/SDL_platform.h; sourceTree = "<group>"; };
F3F7D8AC2933074900816151 /* SDL_stdinc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_stdinc.h; path = SDL3/SDL_stdinc.h; sourceTree = "<group>"; };
@ -4166,7 +4141,6 @@
F3F7D8CB2933074B00816151 /* SDL_events.h */,
F3F7D8D62933074C00816151 /* SDL_filesystem.h */,
F3F7D8D02933074C00816151 /* SDL_gamecontroller.h */,
F3F7D8A92933074900816151 /* SDL_gesture.h */,
F3F7D8D12933074C00816151 /* SDL_guid.h */,
F3F7D8AD2933074900816151 /* SDL_haptic.h */,
F3F7D8CA2933074B00816151 /* SDL_hidapi.h */,
@ -5155,8 +5129,6 @@
A7D8A93B23E2514000DCD162 /* SDL_dropevents.c */,
A7D8A94223E2514000DCD162 /* SDL_events_c.h */,
A7D8A93523E2514000DCD162 /* SDL_events.c */,
A7D8A93023E2514000DCD162 /* SDL_gesture_c.h */,
A7D8A94023E2514000DCD162 /* SDL_gesture.c */,
A7D8A93D23E2514000DCD162 /* SDL_keyboard_c.h */,
A7D8A93823E2514000DCD162 /* SDL_keyboard.c */,
A7D8A92B23E2514000DCD162 /* SDL_mouse_c.h */,
@ -5257,7 +5229,6 @@
A75FCD4223E25AB700529352 /* SDL_cocoavideo.h in Headers */,
5605721D2473688E00B46B66 /* SDL_syslocale.h in Headers */,
A75FCD4423E25AB700529352 /* SDL_uikitevents.h in Headers */,
A75FCD4523E25AB700529352 /* SDL_gesture_c.h in Headers */,
A75FCD4623E25AB700529352 /* SDL_shaders_gl.h in Headers */,
A75FCD4723E25AB700529352 /* SDL_systhread_c.h in Headers */,
A1BB8B7327F6CF330057CFA8 /* SDL_list.h in Headers */,
@ -5423,7 +5394,6 @@
A75FCEFB23E25AC700529352 /* SDL_cocoavideo.h in Headers */,
5605721E2473688F00B46B66 /* SDL_syslocale.h in Headers */,
A75FCEFD23E25AC700529352 /* SDL_uikitevents.h in Headers */,
A75FCEFE23E25AC700529352 /* SDL_gesture_c.h in Headers */,
A75FCEFF23E25AC700529352 /* SDL_shaders_gl.h in Headers */,
A75FCF0023E25AC700529352 /* SDL_systhread_c.h in Headers */,
A1BB8B7427F6CF330057CFA8 /* SDL_list.h in Headers */,
@ -5589,7 +5559,6 @@
5605721C2473688D00B46B66 /* SDL_syslocale.h in Headers */,
A1BB8B7127F6CF330057CFA8 /* SDL_list.h in Headers */,
A769B0CA23E259AE00872273 /* SDL_uikitevents.h in Headers */,
A769B0CB23E259AE00872273 /* SDL_gesture_c.h in Headers */,
A769B0CC23E259AE00872273 /* SDL_shaders_gl.h in Headers */,
A769B0CD23E259AE00872273 /* SDL_systhread_c.h in Headers */,
A769B0D023E259AE00872273 /* SDL_cocoakeyboard.h in Headers */,
@ -5771,14 +5740,12 @@
F3F7D93E2933074E00816151 /* SDL_endian.h in Headers */,
A7D8AB1123E2514100DCD162 /* SDL_dynapi_overrides.h in Headers */,
A7D8AB1D23E2514100DCD162 /* SDL_dynapi_procs.h in Headers */,
F3F7D8EA2933074E00816151 /* SDL_gesture.h in Headers */,
A7D8ABDA23E2514100DCD162 /* SDL_egl_c.h in Headers */,
A7D8A95E23E2514000DCD162 /* SDL_error_c.h in Headers */,
F3F7D92E2933074E00816151 /* SDL_shape.h in Headers */,
A7D8BBA623E2514500DCD162 /* SDL_events_c.h in Headers */,
F3F7D9962933074E00816151 /* SDL_vulkan.h in Headers */,
A7D8B4AD23E2514300DCD162 /* SDL_gamecontrollerdb.h in Headers */,
A7D8BB3A23E2514500DCD162 /* SDL_gesture_c.h in Headers */,
F3F7D9BA2933074E00816151 /* SDL_cpuinfo.h in Headers */,
A7D8BA5623E2514400DCD162 /* SDL_gles2funcs.h in Headers */,
A7D8BA7A23E2514400DCD162 /* SDL_glfuncs.h in Headers */,
@ -6001,14 +5968,12 @@
F3F7D93F2933074E00816151 /* SDL_endian.h in Headers */,
A7D8AB1223E2514100DCD162 /* SDL_dynapi_overrides.h in Headers */,
A7D8AB1E23E2514100DCD162 /* SDL_dynapi_procs.h in Headers */,
F3F7D8EB2933074E00816151 /* SDL_gesture.h in Headers */,
A7D8ABDB23E2514100DCD162 /* SDL_egl_c.h in Headers */,
A7D8A95F23E2514000DCD162 /* SDL_error_c.h in Headers */,
F3F7D92F2933074E00816151 /* SDL_shape.h in Headers */,
A7D8BBA723E2514500DCD162 /* SDL_events_c.h in Headers */,
F3F7D9972933074E00816151 /* SDL_vulkan.h in Headers */,
A7D8B4AE23E2514300DCD162 /* SDL_gamecontrollerdb.h in Headers */,
A7D8BB3B23E2514500DCD162 /* SDL_gesture_c.h in Headers */,
F3F7D9BB2933074E00816151 /* SDL_cpuinfo.h in Headers */,
A7D8BA5723E2514400DCD162 /* SDL_gles2funcs.h in Headers */,
A7D8BA7B23E2514400DCD162 /* SDL_glfuncs.h in Headers */,
@ -6215,7 +6180,6 @@
5605721A2473688C00B46B66 /* SDL_syslocale.h in Headers */,
A1BB8B7027F6CF330057CFA8 /* SDL_list.h in Headers */,
A7D8ACC123E2514100DCD162 /* SDL_uikitevents.h in Headers */,
A7D8BB3D23E2514500DCD162 /* SDL_gesture_c.h in Headers */,
A7D8BA7723E2514400DCD162 /* SDL_shaders_gl.h in Headers */,
A7D8B42C23E2514300DCD162 /* SDL_systhread_c.h in Headers */,
A7D8AE9223E2514100DCD162 /* SDL_cocoakeyboard.h in Headers */,
@ -6397,14 +6361,12 @@
F3F7D93D2933074E00816151 /* SDL_endian.h in Headers */,
A7D8AB1023E2514100DCD162 /* SDL_dynapi_overrides.h in Headers */,
A7D8AB1C23E2514100DCD162 /* SDL_dynapi_procs.h in Headers */,
F3F7D8E92933074E00816151 /* SDL_gesture.h in Headers */,
A7D8ABD923E2514100DCD162 /* SDL_egl_c.h in Headers */,
A7D8A95D23E2514000DCD162 /* SDL_error_c.h in Headers */,
F3F7D92D2933074E00816151 /* SDL_shape.h in Headers */,
A7D8BBA523E2514500DCD162 /* SDL_events_c.h in Headers */,
F3F7D9952933074E00816151 /* SDL_vulkan.h in Headers */,
A7D8B4AC23E2514300DCD162 /* SDL_gamecontrollerdb.h in Headers */,
A7D8BB3923E2514500DCD162 /* SDL_gesture_c.h in Headers */,
F3F7D9B92933074E00816151 /* SDL_cpuinfo.h in Headers */,
A7D8BA5523E2514400DCD162 /* SDL_gles2funcs.h in Headers */,
A7D8BA7923E2514400DCD162 /* SDL_glfuncs.h in Headers */,
@ -6602,7 +6564,6 @@
A7D8BBFD23E2574800DCD162 /* SDL_uikitvideo.h in Headers */,
A7D8BBAE23E2514500DCD162 /* SDL_windowevents_c.h in Headers */,
A7D8AF0323E2514100DCD162 /* SDL_cocoavideo.h in Headers */,
A7D8BB3C23E2514500DCD162 /* SDL_gesture_c.h in Headers */,
A7D8BBEF23E2574800DCD162 /* SDL_uikitclipboard.h in Headers */,
A7D8BA7623E2514400DCD162 /* SDL_shaders_gl.h in Headers */,
A7D8B42B23E2514300DCD162 /* SDL_systhread_c.h in Headers */,
@ -6776,7 +6737,6 @@
A7D8BBB023E2514500DCD162 /* SDL_windowevents_c.h in Headers */,
A7D8AF0523E2514100DCD162 /* SDL_cocoavideo.h in Headers */,
A7D8ACC223E2514100DCD162 /* SDL_uikitevents.h in Headers */,
A7D8BB3E23E2514500DCD162 /* SDL_gesture_c.h in Headers */,
A7D8BA7823E2514400DCD162 /* SDL_shaders_gl.h in Headers */,
A7D8B42D23E2514300DCD162 /* SDL_systhread_c.h in Headers */,
A1BB8B7227F6CF330057CFA8 /* SDL_list.h in Headers */,
@ -6900,7 +6860,6 @@
files = (
F3F7D9B42933074E00816151 /* SDL_power.h in Headers */,
F3F7D9202933074E00816151 /* SDL_messagebox.h in Headers */,
F3F7D8EC2933074E00816151 /* SDL_gesture.h in Headers */,
F3F7D9142933074E00816151 /* SDL_hints.h in Headers */,
F3F7D9902933074E00816151 /* SDL_metal.h in Headers */,
F3F7D9B02933074E00816151 /* SDL_mouse.h in Headers */,
@ -7484,7 +7443,6 @@
A75FCE6523E25AB700529352 /* SDL_uikitopengles.m in Sources */,
A75FCE6723E25AB700529352 /* SDL_cocoamodes.m in Sources */,
A75FCE6823E25AB700529352 /* k_rem_pio2.c in Sources */,
A75FCE6A23E25AB700529352 /* SDL_gesture.c in Sources */,
A75FCE6B23E25AB700529352 /* SDL_getenv.c in Sources */,
A75FCE6C23E25AB700529352 /* SDL_hidapi_gamecube.c in Sources */,
A75FCE6D23E25AB700529352 /* SDL_joystick.c in Sources */,
@ -7679,7 +7637,6 @@
A75FD01E23E25AC700529352 /* SDL_uikitopengles.m in Sources */,
A75FD02023E25AC700529352 /* SDL_cocoamodes.m in Sources */,
A75FD02123E25AC700529352 /* k_rem_pio2.c in Sources */,
A75FD02323E25AC700529352 /* SDL_gesture.c in Sources */,
A75FD02423E25AC700529352 /* SDL_getenv.c in Sources */,
A75FD02523E25AC700529352 /* SDL_hidapi_gamecube.c in Sources */,
A75FD02623E25AC700529352 /* SDL_joystick.c in Sources */,
@ -7865,7 +7822,6 @@
A769B1F123E259AE00872273 /* SDL_uikitopengles.m in Sources */,
A769B1F323E259AE00872273 /* SDL_cocoamodes.m in Sources */,
A769B1F423E259AE00872273 /* k_rem_pio2.c in Sources */,
A769B1F623E259AE00872273 /* SDL_gesture.c in Sources */,
A769B1F723E259AE00872273 /* SDL_getenv.c in Sources */,
A769B1F823E259AE00872273 /* SDL_hidapi_gamecube.c in Sources */,
A769B1F923E259AE00872273 /* SDL_joystick.c in Sources */,
@ -8068,7 +8024,6 @@
A7D8AC8223E2514100DCD162 /* SDL_uikitopengles.m in Sources */,
A7D8AE9523E2514100DCD162 /* SDL_cocoamodes.m in Sources */,
A7D8BAA423E2514400DCD162 /* k_rem_pio2.c in Sources */,
A7D8BB9A23E2514500DCD162 /* SDL_gesture.c in Sources */,
A7D8B95723E2514400DCD162 /* SDL_getenv.c in Sources */,
A7D8B56423E2514300DCD162 /* SDL_hidapi_gamecube.c in Sources */,
A7D8B4DD23E2514300DCD162 /* SDL_joystick.c in Sources */,
@ -8263,7 +8218,6 @@
A7D8AC8323E2514100DCD162 /* SDL_uikitopengles.m in Sources */,
A7D8AE9623E2514100DCD162 /* SDL_cocoamodes.m in Sources */,
A7D8BAA523E2514400DCD162 /* k_rem_pio2.c in Sources */,
A7D8BB9B23E2514500DCD162 /* SDL_gesture.c in Sources */,
A7D8B95823E2514400DCD162 /* SDL_getenv.c in Sources */,
A7D8B56523E2514300DCD162 /* SDL_hidapi_gamecube.c in Sources */,
A7D8B4DE23E2514300DCD162 /* SDL_joystick.c in Sources */,
@ -8451,7 +8405,6 @@
A7D8AC8523E2514100DCD162 /* SDL_uikitopengles.m in Sources */,
A7D8AE9823E2514100DCD162 /* SDL_cocoamodes.m in Sources */,
A7D8BAA723E2514400DCD162 /* k_rem_pio2.c in Sources */,
A7D8BB9D23E2514500DCD162 /* SDL_gesture.c in Sources */,
A7D8B95A23E2514400DCD162 /* SDL_getenv.c in Sources */,
A7D8B56723E2514300DCD162 /* SDL_hidapi_gamecube.c in Sources */,
A7D8B4E023E2514300DCD162 /* SDL_joystick.c in Sources */,
@ -8652,7 +8605,6 @@
A7D8BA7F23E2514400DCD162 /* SDL_render_gl.c in Sources */,
A7D8AE9423E2514100DCD162 /* SDL_cocoamodes.m in Sources */,
A7D8BAA323E2514400DCD162 /* k_rem_pio2.c in Sources */,
A7D8BB9923E2514500DCD162 /* SDL_gesture.c in Sources */,
A7D8B95623E2514400DCD162 /* SDL_getenv.c in Sources */,
A7D8B56323E2514300DCD162 /* SDL_hidapi_gamecube.c in Sources */,
A7D8B4DC23E2514300DCD162 /* SDL_joystick.c in Sources */,
@ -8845,7 +8797,6 @@
A7D8BA8223E2514400DCD162 /* SDL_render_gl.c in Sources */,
A7D8AE9723E2514100DCD162 /* SDL_cocoamodes.m in Sources */,
A7D8BAA623E2514400DCD162 /* k_rem_pio2.c in Sources */,
A7D8BB9C23E2514500DCD162 /* SDL_gesture.c in Sources */,
A7D8B95923E2514400DCD162 /* SDL_getenv.c in Sources */,
A7D8B56623E2514300DCD162 /* SDL_hidapi_gamecube.c in Sources */,
A7D8B4DF23E2514300DCD162 /* SDL_joystick.c in Sources */,
@ -9040,7 +8991,6 @@
A7D8AC8623E2514100DCD162 /* SDL_uikitopengles.m in Sources */,
A7D8AE9923E2514100DCD162 /* SDL_cocoamodes.m in Sources */,
A7D8BAA823E2514400DCD162 /* k_rem_pio2.c in Sources */,
A7D8BB9E23E2514500DCD162 /* SDL_gesture.c in Sources */,
A7D8B95B23E2514400DCD162 /* SDL_getenv.c in Sources */,
A7D8B56823E2514300DCD162 /* SDL_hidapi_gamecube.c in Sources */,
A7D8B4E123E2514300DCD162 /* SDL_joystick.c in Sources */,

View file

@ -124,7 +124,6 @@
DB166DAA16A1D27700A1396C /* libSDL_test.a in Frameworks */ = {isa = PBXBuildFile; fileRef = DB166D7F16A1D12400A1396C /* libSDL_test.a */; };
DB166DAB16A1D27C00A1396C /* libSDL_test.a in Frameworks */ = {isa = PBXBuildFile; fileRef = DB166D7F16A1D12400A1396C /* libSDL_test.a */; };
DB166DAC16A1D29000A1396C /* libSDL_test.a in Frameworks */ = {isa = PBXBuildFile; fileRef = DB166D7F16A1D12400A1396C /* libSDL_test.a */; };
DB166DC116A1D31E00A1396C /* testgesture.c in Sources */ = {isa = PBXBuildFile; fileRef = DB166CBB16A1C74100A1396C /* testgesture.c */; };
DB166DD716A1D37800A1396C /* testmessage.c in Sources */ = {isa = PBXBuildFile; fileRef = DB166CBD16A1C74100A1396C /* testmessage.c */; };
DB166DDB16A1D42F00A1396C /* icon.bmp in CopyFiles */ = {isa = PBXBuildFile; fileRef = 00794E5D09D20839003FC8A1 /* icon.bmp */; };
DB166DEA16A1D50C00A1396C /* libSDL_test.a in Frameworks */ = {isa = PBXBuildFile; fileRef = DB166D7F16A1D12400A1396C /* libSDL_test.a */; };
@ -482,13 +481,6 @@
remoteGlobalIDString = 4537749112091504002F0F45;
remoteInfo = testshape;
};
DB166DC216A1D32C00A1396C /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
proxyType = 1;
remoteGlobalIDString = DB166DAD16A1D2F600A1396C;
remoteInfo = testgesture;
};
DB166DD816A1D38900A1396C /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
@ -808,7 +800,6 @@
DB0F48D817CA51D2008798C5 /* testfilesystem.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = testfilesystem.c; sourceTree = "<group>"; };
DB0F48EC17CA51E5008798C5 /* testdrawchessboard */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; name = testdrawchessboard; path = testdrawchessboard.app; sourceTree = BUILT_PRODUCTS_DIR; };
DB0F490117CA5212008798C5 /* testfilesystem */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; name = testfilesystem; path = testfilesystem.app; sourceTree = BUILT_PRODUCTS_DIR; };
DB166CBB16A1C74100A1396C /* testgesture.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = testgesture.c; sourceTree = "<group>"; };
DB166CBC16A1C74100A1396C /* testgles.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = testgles.c; sourceTree = "<group>"; };
DB166CBD16A1C74100A1396C /* testmessage.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = testmessage.c; sourceTree = "<group>"; };
DB166CBF16A1C74100A1396C /* testrelative.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = testrelative.c; sourceTree = "<group>"; };
@ -835,7 +826,6 @@
DB166D9016A1D1A500A1396C /* SDL_test_log.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_test_log.c; sourceTree = "<group>"; };
DB166D9116A1D1A500A1396C /* SDL_test_md5.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_test_md5.c; sourceTree = "<group>"; };
DB166D9216A1D1A500A1396C /* SDL_test_random.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_test_random.c; sourceTree = "<group>"; };
DB166DBF16A1D2F600A1396C /* testgesture */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; name = testgesture; path = testgesture.app; sourceTree = BUILT_PRODUCTS_DIR; };
DB166DD516A1D36A00A1396C /* testmessage */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; name = testmessage; path = testmessage.app; sourceTree = BUILT_PRODUCTS_DIR; };
DB166DEE16A1D50C00A1396C /* testrelative */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; name = testrelative; path = testrelative.app; sourceTree = BUILT_PRODUCTS_DIR; };
DB166E0516A1D57C00A1396C /* testrendercopyex */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; name = testrendercopyex; path = testrendercopyex.app; sourceTree = BUILT_PRODUCTS_DIR; };
@ -1288,7 +1278,6 @@
DB0F48D817CA51D2008798C5 /* testfilesystem.c */,
BBFC088E164C6820003E6A99 /* testgamecontroller.c */,
F3C17CD628E416AC00E1A26D /* testgeometry.c */,
DB166CBB16A1C74100A1396C /* testgesture.c */,
0017972710742FB900F5D044 /* testgl2.c */,
DB166CBC16A1C74100A1396C /* testgles.c */,
0017974E1074315700F5D044 /* testhaptic.c */,
@ -1368,7 +1357,6 @@
4537749212091504002F0F45 /* testshape */,
BBFC08CD164C6862003E6A99 /* testgamecontroller */,
DB166D7F16A1D12400A1396C /* libSDL_test.a */,
DB166DBF16A1D2F600A1396C /* testgesture */,
DB166DD516A1D36A00A1396C /* testmessage */,
DB166DEE16A1D50C00A1396C /* testrelative */,
DB166E0516A1D57C00A1396C /* testrendercopyex */,
@ -1978,22 +1966,6 @@
productReference = DB166D7F16A1D12400A1396C /* libSDL_test.a */;
productType = "com.apple.product-type.library.static";
};
DB166DAD16A1D2F600A1396C /* testgesture */ = {
isa = PBXNativeTarget;
buildConfigurationList = DB166DBC16A1D2F600A1396C /* Build configuration list for PBXNativeTarget "testgesture" */;
buildPhases = (
DB166DAE16A1D2F600A1396C /* Sources */,
DB166DB016A1D2F600A1396C /* Frameworks */,
);
buildRules = (
);
dependencies = (
);
name = testgesture;
productName = testalpha;
productReference = DB166DBF16A1D2F600A1396C /* testgesture */;
productType = "com.apple.product-type.application";
};
DB166DC416A1D36A00A1396C /* testmessage */ = {
isa = PBXNativeTarget;
buildConfigurationList = DB166DD216A1D36A00A1396C /* Build configuration list for PBXNativeTarget "testmessage" */;
@ -2259,7 +2231,6 @@
DB0F48EF17CA5212008798C5 /* testfilesystem */,
BBFC08B7164C6862003E6A99 /* testgamecontroller */,
F3C17CDB28E416CF00E1A26D /* testgeometry */,
DB166DAD16A1D2F600A1396C /* testgesture */,
0017970910742F3200F5D044 /* testgl2 */,
00179730107430D600F5D044 /* testhaptic */,
DB89956D18A19ABA0092407C /* testhotplug */,
@ -2737,15 +2708,6 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
DB166DAE16A1D2F600A1396C /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
F3C17D0828E41EDB00E1A26D /* SDL_uikit_main.c in Sources */,
DB166DC116A1D31E00A1396C /* testgesture.c in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
DB166DC516A1D36A00A1396C /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
@ -3038,11 +3000,6 @@
target = 4537749112091504002F0F45 /* testshape */;
targetProxy = DB166D6F16A1CEAF00A1396C /* PBXContainerItemProxy */;
};
DB166DC316A1D32C00A1396C /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = DB166DAD16A1D2F600A1396C /* testgesture */;
targetProxy = DB166DC216A1D32C00A1396C /* PBXContainerItemProxy */;
};
DB166DD916A1D38900A1396C /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = DB166DC416A1D36A00A1396C /* testmessage */;
@ -3648,20 +3605,6 @@
};
name = Release;
};
DB166DBD16A1D2F600A1396C /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
PRODUCT_NAME = testgesture;
};
name = Debug;
};
DB166DBE16A1D2F600A1396C /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
PRODUCT_NAME = testgesture;
};
name = Release;
};
DB166DD316A1D36A00A1396C /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
@ -4173,15 +4116,6 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Debug;
};
DB166DBC16A1D2F600A1396C /* Build configuration list for PBXNativeTarget "testgesture" */ = {
isa = XCConfigurationList;
buildConfigurations = (
DB166DBD16A1D2F600A1396C /* Debug */,
DB166DBE16A1D2F600A1396C /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Debug;
};
DB166DD216A1D36A00A1396C /* Build configuration list for PBXNativeTarget "testmessage" */ = {
isa = XCConfigurationList;
buildConfigurations = (

View file

@ -1,71 +0,0 @@
Dollar Gestures
===========================================================================
SDL provides an implementation of the $1 gesture recognition system. This allows for recording, saving, loading, and performing single stroke gestures.
Gestures can be performed with any number of fingers (the centroid of the fingers must follow the path of the gesture), but the number of fingers must be constant (a finger cannot go down in the middle of a gesture). The path of a gesture is considered the path from the time when the final finger went down, to the first time any finger comes up.
Dollar gestures are assigned an Id based on a hash function. This is guaranteed to remain constant for a given gesture. There is a (small) chance that two different gestures will be assigned the same ID. In this case, simply re-recording one of the gestures should result in a different ID.
Recording:
----------
To begin recording on a touch device call:
SDL_RecordGesture(SDL_TouchID touchId), where touchId is the id of the touch device you wish to record on, or -1 to record on all connected devices.
Recording terminates as soon as a finger comes up. Recording is acknowledged by an SDL_DOLLARRECORD event.
A SDL_DOLLARRECORD event is a dgesture with the following fields:
* event.dgesture.touchId - the Id of the touch used to record the gesture.
* event.dgesture.gestureId - the unique id of the recorded gesture.
Performing:
-----------
As long as there is a dollar gesture assigned to a touch, every finger-up event will also cause an SDL_DOLLARGESTURE event with the following fields:
* event.dgesture.touchId - the Id of the touch which performed the gesture.
* event.dgesture.gestureId - the unique id of the closest gesture to the performed stroke.
* event.dgesture.error - the difference between the gesture template and the actual performed gesture. Lower error is a better match.
* event.dgesture.numFingers - the number of fingers used to draw the stroke.
Most programs will want to define an appropriate error threshold and check to be sure that the error of a gesture is not abnormally high (an indicator that no gesture was performed).
Saving:
-------
To save a template, call SDL_SaveDollarTemplate(gestureId, dst) where gestureId is the id of the gesture you want to save, and dst is an SDL_RWops pointer to the file where the gesture will be stored.
To save all currently loaded templates, call SDL_SaveAllDollarTemplates(dst) where dst is an SDL_RWops pointer to the file where the gesture will be stored.
Both functions return the number of gestures successfully saved.
Loading:
--------
To load templates from a file, call SDL_LoadDollarTemplates(touchId,src) where touchId is the id of the touch to load to (or -1 to load to all touch devices), and src is an SDL_RWops pointer to a gesture save file.
SDL_LoadDollarTemplates returns the number of templates successfully loaded.
===========================================================================
Multi Gestures
===========================================================================
SDL provides simple support for pinch/rotate/swipe gestures.
Every time a finger is moved an SDL_MULTIGESTURE event is sent with the following fields:
* event.mgesture.touchId - the Id of the touch on which the gesture was performed.
* event.mgesture.x - the normalized x coordinate of the gesture. (0..1)
* event.mgesture.y - the normalized y coordinate of the gesture. (0..1)
* event.mgesture.dTheta - the amount that the fingers rotated during this motion.
* event.mgesture.dDist - the amount that the fingers pinched during this motion.
* event.mgesture.numFingers - the number of fingers used in the gesture.
===========================================================================
Notes
===========================================================================
For a complete example see test/testgesture.c
Please direct questions/comments to:
jim.tla+sdl_touch@gmail.com

View file

@ -312,3 +312,8 @@ The following hints have been removed:
* Renamed hints 'SDL_HINT_VIDEODRIVER' and 'SDL_HINT_AUDIODRIVER' to 'SDL_HINT_VIDEO_DRIVER' and 'SDL_HINT_AUDIO_DRIVER'
* Renamed environment variables 'SDL_VIDEODRIVER' and 'SDL_AUDIODRIVER' to 'SDL_VIDEO_DRIVER' and 'SDL_AUDIO_DRIVER'
## SDL_gesture.h
The gesture API has been removed. There is no replacement planned.

View file

@ -76,11 +76,6 @@ A SDL_Finger has the following fields:
The pressure of the touch.
===========================================================================
Notes
===========================================================================
For a complete example see test/testgesture.c
Please direct questions/comments to:
jim.tla+sdl_touch@gmail.com
(original author, API was changed since)

View file

@ -28,7 +28,6 @@ More documentation and FAQs are available online at [the wiki](http://wiki.libsd
- [DynAPI](README-dynapi.md)
- [Emscripten](README-emscripten.md)
- [GDK](README-gdk.md)
- [Gesture](README-gesture.md)
- [Git](README-git.md)
- [iOS](README-ios.md)
- [Linux](README-linux.md)

View file

@ -43,7 +43,6 @@
#include <SDL3/SDL_events.h>
#include <SDL3/SDL_filesystem.h>
#include <SDL3/SDL_gamecontroller.h>
#include <SDL3/SDL_gesture.h>
#include <SDL3/SDL_guid.h>
#include <SDL3/SDL_haptic.h>
#include <SDL3/SDL_hidapi.h>

View file

@ -36,7 +36,6 @@
#include <SDL3/SDL_joystick.h>
#include <SDL3/SDL_gamecontroller.h>
#include <SDL3/SDL_quit.h>
#include <SDL3/SDL_gesture.h>
#include <SDL3/SDL_touch.h>
#include <SDL3/begin_code.h>
@ -136,10 +135,7 @@ typedef enum
SDL_FINGERUP,
SDL_FINGERMOTION,
/* Gesture events */
SDL_DOLLARGESTURE = 0x800,
SDL_DOLLARRECORD,
SDL_MULTIGESTURE,
/* 0x800, 0x801, and 0x802 were the Gesture events from SDL2. Do not reuse these values! sdl2-compat needs them! */
/* Clipboard events */
SDL_CLIPBOARDUPDATE = 0x900, /**< The clipboard or primary selection changed */
@ -495,39 +491,6 @@ typedef struct SDL_TouchFingerEvent
} SDL_TouchFingerEvent;
/**
* \brief Multiple Finger Gesture Event (event.mgesture.*)
*/
typedef struct SDL_MultiGestureEvent
{
Uint32 type; /**< ::SDL_MULTIGESTURE */
Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */
SDL_TouchID touchId; /**< The touch device id */
float dTheta;
float dDist;
float x;
float y;
Uint16 numFingers;
Uint16 padding;
} SDL_MultiGestureEvent;
/**
* \brief Dollar Gesture Event (event.dgesture.*)
*/
typedef struct SDL_DollarGestureEvent
{
Uint32 type; /**< ::SDL_DOLLARGESTURE or ::SDL_DOLLARRECORD */
Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */
SDL_TouchID touchId; /**< The touch device id */
SDL_GestureID gestureId;
Uint32 numFingers;
float error;
float x; /**< Normalized center of gesture */
float y; /**< Normalized center of gesture */
} SDL_DollarGestureEvent;
/**
* \brief An event used to request a file open by the system (event.drop.*)
* This event is enabled by default, you can disable it with SDL_EventState().
@ -634,8 +597,6 @@ typedef union SDL_Event
SDL_UserEvent user; /**< Custom event data */
SDL_SysWMEvent syswm; /**< System dependent window event data */
SDL_TouchFingerEvent tfinger; /**< Touch finger event data */
SDL_MultiGestureEvent mgesture; /**< Gesture event data */
SDL_DollarGestureEvent dgesture; /**< Gesture event data */
SDL_DropEvent drop; /**< Drag and drop event data */
/* This is necessary for ABI compatibility between Visual C++ and GCC.

View file

@ -1,117 +0,0 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
/**
* \file SDL_gesture.h
*
* Include file for SDL gesture event handling.
*/
#ifndef SDL_gesture_h_
#define SDL_gesture_h_
#include <SDL3/SDL_stdinc.h>
#include <SDL3/SDL_error.h>
#include <SDL3/SDL_video.h>
#include <SDL3/SDL_touch.h>
#include <SDL3/begin_code.h>
/* Set up for C function definitions, even when using C++ */
#ifdef __cplusplus
extern "C" {
#endif
typedef Sint64 SDL_GestureID;
/* Function prototypes */
/**
* Begin recording a gesture on a specified touch device or all touch devices.
*
* If the parameter `touchId` is -1 (i.e., all devices), this function will
* always return 1, regardless of whether there actually are any devices.
*
* \param touchId the touch device id, or -1 for all touch devices
* \returns 1 on success or 0 if the specified device could not be found.
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_GetTouchDevice
*/
extern DECLSPEC int SDLCALL SDL_RecordGesture(SDL_TouchID touchId);
/**
* Save all currently loaded Dollar Gesture templates.
*
* \param dst a SDL_RWops to save to
* \returns the number of saved templates on success or 0 on failure; call
* SDL_GetError() for more information.
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_LoadDollarTemplates
* \sa SDL_SaveDollarTemplate
*/
extern DECLSPEC int SDLCALL SDL_SaveAllDollarTemplates(SDL_RWops *dst);
/**
* Save a currently loaded Dollar Gesture template.
*
* \param gestureId a gesture id
* \param dst a SDL_RWops to save to
* \returns 1 on success or 0 on failure; call SDL_GetError() for more
* information.
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_LoadDollarTemplates
* \sa SDL_SaveAllDollarTemplates
*/
extern DECLSPEC int SDLCALL SDL_SaveDollarTemplate(SDL_GestureID gestureId,SDL_RWops *dst);
/**
* Load Dollar Gesture templates from a file.
*
* \param touchId a touch id
* \param src a SDL_RWops to load from
* \returns the number of loaded templates on success or a negative error code
* (or 0) on failure; call SDL_GetError() for more information.
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_SaveAllDollarTemplates
* \sa SDL_SaveDollarTemplate
*/
extern DECLSPEC int SDLCALL SDL_LoadDollarTemplates(SDL_TouchID touchId, SDL_RWops *src);
/* Ends C function definitions when using C++ */
#ifdef __cplusplus
}
#endif
#include <SDL3/close_code.h>
#endif /* SDL_gesture_h_ */
/* vi: set ts=4 sw=4 expandtab: */

View file

@ -134,8 +134,6 @@ extern DECLSPEC int SDLCALL SDL_GetNumTouchFingers(SDL_TouchID touchID);
* given ID and index could be found.
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_RecordGesture
*/
extern DECLSPEC SDL_Finger * SDLCALL SDL_GetTouchFinger(SDL_TouchID touchID, int index);

View file

@ -31,10 +31,6 @@ SDL3_0.0.0 {
SDL_WriteBE32;
SDL_WriteLE64;
SDL_WriteBE64;
SDL_RecordGesture;
SDL_SaveAllDollarTemplates;
SDL_SaveDollarTemplate;
SDL_LoadDollarTemplates;
SDL_GetNumAudioDrivers;
SDL_GetAudioDriver;
SDL_AudioInit;

View file

@ -151,10 +151,6 @@
#define SDL_GameControllerGetBindForButton SDL_GameControllerGetBindForButton_REAL
#define SDL_GameControllerGetButton SDL_GameControllerGetButton_REAL
#define SDL_GameControllerClose SDL_GameControllerClose_REAL
#define SDL_RecordGesture SDL_RecordGesture_REAL
#define SDL_SaveAllDollarTemplates SDL_SaveAllDollarTemplates_REAL
#define SDL_SaveDollarTemplate SDL_SaveDollarTemplate_REAL
#define SDL_LoadDollarTemplates SDL_LoadDollarTemplates_REAL
#define SDL_NumHaptics SDL_NumHaptics_REAL
#define SDL_HapticName SDL_HapticName_REAL
#define SDL_HapticOpen SDL_HapticOpen_REAL

View file

@ -178,10 +178,6 @@ SDL_DYNAPI_PROC(const char*,SDL_GameControllerGetStringForButton,(SDL_GameContro
SDL_DYNAPI_PROC(SDL_GameControllerButtonBind,SDL_GameControllerGetBindForButton,(SDL_GameController *a, SDL_GameControllerButton b),(a,b),return)
SDL_DYNAPI_PROC(Uint8,SDL_GameControllerGetButton,(SDL_GameController *a, SDL_GameControllerButton b),(a,b),return)
SDL_DYNAPI_PROC(void,SDL_GameControllerClose,(SDL_GameController *a),(a),)
SDL_DYNAPI_PROC(int,SDL_RecordGesture,(SDL_TouchID a),(a),return)
SDL_DYNAPI_PROC(int,SDL_SaveAllDollarTemplates,(SDL_RWops *a),(a),return)
SDL_DYNAPI_PROC(int,SDL_SaveDollarTemplate,(SDL_GestureID a, SDL_RWops *b),(a,b),return)
SDL_DYNAPI_PROC(int,SDL_LoadDollarTemplates,(SDL_TouchID a, SDL_RWops *b),(a,b),return)
SDL_DYNAPI_PROC(int,SDL_NumHaptics,(void),(),return)
SDL_DYNAPI_PROC(const char*,SDL_HapticName,(int a),(a),return)
SDL_DYNAPI_PROC(SDL_Haptic*,SDL_HapticOpen,(int a),(a),return)

View file

@ -456,26 +456,6 @@ static void SDL_LogEvent(const SDL_Event *event)
break;
#undef PRINT_FINGER_EVENT
#define PRINT_DOLLAR_EVENT(event) \
(void)SDL_snprintf(details, sizeof(details), " (timestamp=%u touchid=%" SDL_PRIs64 " gestureid=%" SDL_PRIs64 " numfingers=%u error=%f x=%f y=%f)", \
(uint)event->dgesture.timestamp, (long long)event->dgesture.touchId, \
(long long)event->dgesture.gestureId, (uint)event->dgesture.numFingers, \
event->dgesture.error, event->dgesture.x, event->dgesture.y)
SDL_EVENT_CASE(SDL_DOLLARGESTURE)
PRINT_DOLLAR_EVENT(event);
break;
SDL_EVENT_CASE(SDL_DOLLARRECORD)
PRINT_DOLLAR_EVENT(event);
break;
#undef PRINT_DOLLAR_EVENT
SDL_EVENT_CASE(SDL_MULTIGESTURE)
(void)SDL_snprintf(details, sizeof(details), " (timestamp=%u touchid=%" SDL_PRIs64 " dtheta=%f ddist=%f x=%f y=%f numfingers=%u)",
(uint)event->mgesture.timestamp, (long long)event->mgesture.touchId,
event->mgesture.dTheta, event->mgesture.dDist,
event->mgesture.x, event->mgesture.y, (uint)event->mgesture.numFingers);
break;
#define PRINT_DROP_EVENT(event) (void)SDL_snprintf(details, sizeof(details), " (file='%s' timestamp=%u windowid=%u)", event->drop.file, (uint)event->drop.timestamp, (uint)event->drop.windowID)
SDL_EVENT_CASE(SDL_DROPFILE)
PRINT_DROP_EVENT(event);
@ -1235,8 +1215,6 @@ int SDL_PushEvent(SDL_Event *event)
return -1;
}
SDL_GestureProcessEvent(event);
return 1;
}

View file

@ -30,7 +30,6 @@
#include "SDL_clipboardevents_c.h"
#include "SDL_displayevents_c.h"
#include "SDL_dropevents_c.h"
#include "SDL_gesture_c.h"
#include "SDL_keyboard_c.h"
#include "SDL_mouse_c.h"
#include "SDL_touch_c.h"

View file

@ -1,743 +0,0 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
#include "SDL_internal.h"
/* General gesture handling code for SDL */
#include "SDL_events_c.h"
#include "SDL_gesture_c.h"
/*
#include <stdio.h>
*/
/* TODO: Replace with SDL_malloc */
#define MAXPATHSIZE 1024
#define ENABLE_DOLLAR
#define DOLLARNPOINTS 64
#if defined(ENABLE_DOLLAR)
#define DOLLARSIZE 256
#define PHI 0.618033989
#endif
typedef struct
{
float x, y;
} SDL_FloatPoint;
typedef struct
{
float length;
int numPoints;
SDL_FloatPoint p[MAXPATHSIZE];
} SDL_DollarPath;
typedef struct
{
SDL_FloatPoint path[DOLLARNPOINTS];
unsigned long hash;
} SDL_DollarTemplate;
typedef struct
{
SDL_TouchID id;
SDL_FloatPoint centroid;
SDL_DollarPath dollarPath;
Uint16 numDownFingers;
int numDollarTemplates;
SDL_DollarTemplate *dollarTemplate;
SDL_bool recording;
} SDL_GestureTouch;
static SDL_GestureTouch *SDL_gestureTouch;
static int SDL_numGestureTouches = 0;
static SDL_bool recordAll;
#if 0
static void PrintPath(SDL_FloatPoint *path)
{
int i;
printf("Path:");
for (i=0; i<DOLLARNPOINTS; i++) {
printf(" (%f,%f)",path[i].x,path[i].y);
}
printf("\n");
}
#endif
int SDL_RecordGesture(SDL_TouchID touchId)
{
int i;
if (touchId < 0) {
recordAll = SDL_TRUE;
}
for (i = 0; i < SDL_numGestureTouches; i++) {
if ((touchId < 0) || (SDL_gestureTouch[i].id == touchId)) {
SDL_gestureTouch[i].recording = SDL_TRUE;
if (touchId >= 0) {
return 1;
}
}
}
return touchId < 0;
}
void SDL_GestureQuit()
{
SDL_free(SDL_gestureTouch);
SDL_gestureTouch = NULL;
}
static unsigned long SDL_HashDollar(SDL_FloatPoint *points)
{
unsigned long hash = 5381;
int i;
for (i = 0; i < DOLLARNPOINTS; i++) {
hash = ((hash << 5) + hash) + (unsigned long)points[i].x;
hash = ((hash << 5) + hash) + (unsigned long)points[i].y;
}
return hash;
}
static int SaveTemplate(SDL_DollarTemplate *templ, SDL_RWops *dst)
{
if (dst == NULL) {
return 0;
}
/* No Longer storing the Hash, rehash on load */
/* if (SDL_RWops.write(dst, &(templ->hash), sizeof(templ->hash), 1) != 1) return 0; */
#if SDL_BYTEORDER == SDL_LIL_ENDIAN
if (SDL_RWwrite(dst, templ->path,
sizeof(templ->path[0]), DOLLARNPOINTS) != DOLLARNPOINTS) {
return 0;
}
#else
{
SDL_DollarTemplate copy = *templ;
SDL_FloatPoint *p = copy.path;
int i;
for (i = 0; i < DOLLARNPOINTS; i++, p++) {
p->x = SDL_SwapFloatLE(p->x);
p->y = SDL_SwapFloatLE(p->y);
}
if (SDL_RWwrite(dst, copy.path,
sizeof(copy.path[0]), DOLLARNPOINTS) != DOLLARNPOINTS) {
return 0;
}
}
#endif
return 1;
}
int SDL_SaveAllDollarTemplates(SDL_RWops *dst)
{
int i, j, rtrn = 0;
for (i = 0; i < SDL_numGestureTouches; i++) {
SDL_GestureTouch *touch = &SDL_gestureTouch[i];
for (j = 0; j < touch->numDollarTemplates; j++) {
rtrn += SaveTemplate(&touch->dollarTemplate[j], dst);
}
}
return rtrn;
}
int SDL_SaveDollarTemplate(SDL_GestureID gestureId, SDL_RWops *dst)
{
int i, j;
for (i = 0; i < SDL_numGestureTouches; i++) {
SDL_GestureTouch *touch = &SDL_gestureTouch[i];
for (j = 0; j < touch->numDollarTemplates; j++) {
if (touch->dollarTemplate[j].hash == gestureId) {
return SaveTemplate(&touch->dollarTemplate[j], dst);
}
}
}
return SDL_SetError("Unknown gestureId");
}
/* path is an already sampled set of points
Returns the index of the gesture on success, or -1 */
static int SDL_AddDollarGesture_one(SDL_GestureTouch *inTouch, SDL_FloatPoint *path)
{
SDL_DollarTemplate *dollarTemplate;
SDL_DollarTemplate *templ;
int index;
index = inTouch->numDollarTemplates;
dollarTemplate =
(SDL_DollarTemplate *)SDL_realloc(inTouch->dollarTemplate,
(index + 1) *
sizeof(SDL_DollarTemplate));
if (dollarTemplate == NULL) {
return SDL_OutOfMemory();
}
inTouch->dollarTemplate = dollarTemplate;
templ = &inTouch->dollarTemplate[index];
SDL_memcpy(templ->path, path, DOLLARNPOINTS * sizeof(SDL_FloatPoint));
templ->hash = SDL_HashDollar(templ->path);
inTouch->numDollarTemplates++;
return index;
}
static int SDL_AddDollarGesture(SDL_GestureTouch *inTouch, SDL_FloatPoint *path)
{
int index = -1;
int i = 0;
if (inTouch == NULL) {
if (SDL_numGestureTouches == 0) {
return SDL_SetError("no gesture touch devices registered");
}
for (i = 0; i < SDL_numGestureTouches; i++) {
inTouch = &SDL_gestureTouch[i];
index = SDL_AddDollarGesture_one(inTouch, path);
if (index < 0) {
return -1;
}
}
/* Use the index of the last one added. */
return index;
}
return SDL_AddDollarGesture_one(inTouch, path);
}
int SDL_LoadDollarTemplates(SDL_TouchID touchId, SDL_RWops *src)
{
int i, loaded = 0;
SDL_GestureTouch *touch = NULL;
if (src == NULL) {
return 0;
}
if (touchId >= 0) {
for (i = 0; i < SDL_numGestureTouches; i++) {
if (SDL_gestureTouch[i].id == touchId) {
touch = &SDL_gestureTouch[i];
}
}
if (touch == NULL) {
return SDL_SetError("given touch id not found");
}
}
while (1) {
SDL_DollarTemplate templ;
if (SDL_RWread(src, templ.path, sizeof(templ.path[0]), DOLLARNPOINTS) < DOLLARNPOINTS) {
if (loaded == 0) {
return SDL_SetError("could not read any dollar gesture from rwops");
}
break;
}
#if SDL_BYTEORDER != SDL_LIL_ENDIAN
for (i = 0; i < DOLLARNPOINTS; i++) {
SDL_FloatPoint *p = &templ.path[i];
p->x = SDL_SwapFloatLE(p->x);
p->y = SDL_SwapFloatLE(p->y);
}
#endif
if (touchId >= 0) {
/* printf("Adding loaded gesture to 1 touch\n"); */
if (SDL_AddDollarGesture(touch, templ.path) >= 0) {
loaded++;
}
} else {
/* printf("Adding to: %i touches\n",SDL_numGestureTouches); */
for (i = 0; i < SDL_numGestureTouches; i++) {
touch = &SDL_gestureTouch[i];
/* printf("Adding loaded gesture to + touches\n"); */
/* TODO: What if this fails? */
SDL_AddDollarGesture(touch, templ.path);
}
loaded++;
}
}
return loaded;
}
#if defined(ENABLE_DOLLAR)
static float dollarDifference(SDL_FloatPoint *points, SDL_FloatPoint *templ, float ang)
{
/* SDL_FloatPoint p[DOLLARNPOINTS]; */
float dist = 0;
SDL_FloatPoint p;
int i;
for (i = 0; i < DOLLARNPOINTS; i++) {
p.x = (float)(points[i].x * SDL_cos(ang) - points[i].y * SDL_sin(ang));
p.y = (float)(points[i].x * SDL_sin(ang) + points[i].y * SDL_cos(ang));
dist += (float)(SDL_sqrt((p.x - templ[i].x) * (p.x - templ[i].x) +
(p.y - templ[i].y) * (p.y - templ[i].y)));
}
return dist / DOLLARNPOINTS;
}
static float bestDollarDifference(SDL_FloatPoint *points, SDL_FloatPoint *templ)
{
/*------------BEGIN DOLLAR BLACKBOX------------------
-TRANSLATED DIRECTLY FROM PSUDEO-CODE AVAILABLE AT-
-"http://depts.washington.edu/aimgroup/proj/dollar/"
*/
double ta = -SDL_PI_D / 4;
double tb = SDL_PI_D / 4;
double dt = SDL_PI_D / 90;
float x1 = (float)(PHI * ta + (1 - PHI) * tb);
float f1 = dollarDifference(points, templ, x1);
float x2 = (float)((1 - PHI) * ta + PHI * tb);
float f2 = dollarDifference(points, templ, x2);
while (SDL_fabs(ta - tb) > dt) {
if (f1 < f2) {
tb = x2;
x2 = x1;
f2 = f1;
x1 = (float)(PHI * ta + (1 - PHI) * tb);
f1 = dollarDifference(points, templ, x1);
} else {
ta = x1;
x1 = x2;
f1 = f2;
x2 = (float)((1 - PHI) * ta + PHI * tb);
f2 = dollarDifference(points, templ, x2);
}
}
/*
if (f1 <= f2)
printf("Min angle (x1): %f\n",x1);
else if (f1 > f2)
printf("Min angle (x2): %f\n",x2);
*/
return SDL_min(f1, f2);
}
/* DollarPath contains raw points, plus (possibly) the calculated length */
static int dollarNormalize(const SDL_DollarPath *path, SDL_FloatPoint *points, SDL_bool is_recording)
{
int i;
float interval;
float dist;
int numPoints = 0;
SDL_FloatPoint centroid;
float xmin, xmax, ymin, ymax;
float ang;
float w, h;
float length = path->length;
/* Calculate length if it hasn't already been done */
if (length <= 0) {
for (i = 1; i < path->numPoints; i++) {
float dx = path->p[i].x - path->p[i - 1].x;
float dy = path->p[i].y - path->p[i - 1].y;
length += (float)(SDL_sqrt(dx * dx + dy * dy));
}
}
/* Resample */
interval = length / (DOLLARNPOINTS - 1);
dist = interval;
centroid.x = 0;
centroid.y = 0;
/* printf("(%f,%f)\n",path->p[path->numPoints-1].x,path->p[path->numPoints-1].y); */
for (i = 1; i < path->numPoints; i++) {
float d = (float)(SDL_sqrt((path->p[i - 1].x - path->p[i].x) * (path->p[i - 1].x - path->p[i].x) +
(path->p[i - 1].y - path->p[i].y) * (path->p[i - 1].y - path->p[i].y)));
/* printf("d = %f dist = %f/%f\n",d,dist,interval); */
while (dist + d > interval) {
points[numPoints].x = path->p[i - 1].x +
((interval - dist) / d) * (path->p[i].x - path->p[i - 1].x);
points[numPoints].y = path->p[i - 1].y +
((interval - dist) / d) * (path->p[i].y - path->p[i - 1].y);
centroid.x += points[numPoints].x;
centroid.y += points[numPoints].y;
numPoints++;
dist -= interval;
}
dist += d;
}
if (numPoints < DOLLARNPOINTS - 1) {
if (is_recording) {
SDL_SetError("ERROR: NumPoints = %i", numPoints);
}
return 0;
}
/* copy the last point */
points[DOLLARNPOINTS - 1] = path->p[path->numPoints - 1];
numPoints = DOLLARNPOINTS;
centroid.x /= numPoints;
centroid.y /= numPoints;
/* printf("Centroid (%f,%f)",centroid.x,centroid.y); */
/* Rotate Points so point 0 is left of centroid and solve for the bounding box */
xmin = centroid.x;
xmax = centroid.x;
ymin = centroid.y;
ymax = centroid.y;
ang = (float)(SDL_atan2(centroid.y - points[0].y,
centroid.x - points[0].x));
for (i = 0; i < numPoints; i++) {
float px = points[i].x;
float py = points[i].y;
points[i].x = (float)((px - centroid.x) * SDL_cos(ang) -
(py - centroid.y) * SDL_sin(ang) + centroid.x);
points[i].y = (float)((px - centroid.x) * SDL_sin(ang) +
(py - centroid.y) * SDL_cos(ang) + centroid.y);
if (points[i].x < xmin) {
xmin = points[i].x;
}
if (points[i].x > xmax) {
xmax = points[i].x;
}
if (points[i].y < ymin) {
ymin = points[i].y;
}
if (points[i].y > ymax) {
ymax = points[i].y;
}
}
/* Scale points to DOLLARSIZE, and translate to the origin */
w = xmax - xmin;
h = ymax - ymin;
for (i = 0; i < numPoints; i++) {
points[i].x = (points[i].x - centroid.x) * DOLLARSIZE / w;
points[i].y = (points[i].y - centroid.y) * DOLLARSIZE / h;
}
return numPoints;
}
static float dollarRecognize(const SDL_DollarPath *path, int *bestTempl, SDL_GestureTouch *touch)
{
SDL_FloatPoint points[DOLLARNPOINTS];
int i;
float bestDiff = 10000;
SDL_memset(points, 0, sizeof(points));
dollarNormalize(path, points, SDL_FALSE);
/* PrintPath(points); */
*bestTempl = -1;
for (i = 0; i < touch->numDollarTemplates; i++) {
float diff = bestDollarDifference(points, touch->dollarTemplate[i].path);
if (diff < bestDiff) {
bestDiff = diff;
*bestTempl = i;
}
}
return bestDiff;
}
#endif
int SDL_GestureAddTouch(SDL_TouchID touchId)
{
SDL_GestureTouch *gestureTouch = (SDL_GestureTouch *)SDL_realloc(SDL_gestureTouch,
(SDL_numGestureTouches + 1) *
sizeof(SDL_GestureTouch));
if (gestureTouch == NULL) {
return SDL_OutOfMemory();
}
SDL_gestureTouch = gestureTouch;
SDL_zero(SDL_gestureTouch[SDL_numGestureTouches]);
SDL_gestureTouch[SDL_numGestureTouches].id = touchId;
SDL_numGestureTouches++;
return 0;
}
int SDL_GestureDelTouch(SDL_TouchID touchId)
{
int i;
for (i = 0; i < SDL_numGestureTouches; i++) {
if (SDL_gestureTouch[i].id == touchId) {
break;
}
}
if (i == SDL_numGestureTouches) {
/* not found */
return -1;
}
SDL_free(SDL_gestureTouch[i].dollarTemplate);
SDL_zero(SDL_gestureTouch[i]);
SDL_numGestureTouches--;
if (i != SDL_numGestureTouches) {
SDL_copyp(&SDL_gestureTouch[i], &SDL_gestureTouch[SDL_numGestureTouches]);
}
return 0;
}
static SDL_GestureTouch *SDL_GetGestureTouch(SDL_TouchID id)
{
int i;
for (i = 0; i < SDL_numGestureTouches; i++) {
/* printf("%i ?= %i\n",SDL_gestureTouch[i].id,id); */
if (SDL_gestureTouch[i].id == id) {
return &SDL_gestureTouch[i];
}
}
return NULL;
}
static void SDL_SendGestureMulti(SDL_GestureTouch *touch, float dTheta, float dDist)
{
if (SDL_GetEventState(SDL_MULTIGESTURE) == SDL_ENABLE) {
SDL_Event event;
event.type = SDL_MULTIGESTURE;
event.common.timestamp = 0;
event.mgesture.touchId = touch->id;
event.mgesture.x = touch->centroid.x;
event.mgesture.y = touch->centroid.y;
event.mgesture.dTheta = dTheta;
event.mgesture.dDist = dDist;
event.mgesture.numFingers = touch->numDownFingers;
SDL_PushEvent(&event);
}
}
#if defined(ENABLE_DOLLAR)
static void SDL_SendGestureDollar(SDL_GestureTouch *touch,
SDL_GestureID gestureId, float error)
{
if (SDL_GetEventState(SDL_DOLLARGESTURE) == SDL_ENABLE) {
SDL_Event event;
event.type = SDL_DOLLARGESTURE;
event.common.timestamp = 0;
event.dgesture.touchId = touch->id;
event.dgesture.x = touch->centroid.x;
event.dgesture.y = touch->centroid.y;
event.dgesture.gestureId = gestureId;
event.dgesture.error = error;
/* A finger came up to trigger this event. */
event.dgesture.numFingers = touch->numDownFingers + 1;
SDL_PushEvent(&event);
}
}
static void SDL_SendDollarRecord(SDL_GestureTouch *touch, SDL_GestureID gestureId)
{
if (SDL_GetEventState(SDL_DOLLARRECORD) == SDL_ENABLE) {
SDL_Event event;
event.type = SDL_DOLLARRECORD;
event.common.timestamp = 0;
event.dgesture.touchId = touch->id;
event.dgesture.gestureId = gestureId;
SDL_PushEvent(&event);
}
}
#endif
void SDL_GestureProcessEvent(SDL_Event *event)
{
float x, y;
#if defined(ENABLE_DOLLAR)
int index;
int i;
float pathDx, pathDy;
#endif
SDL_FloatPoint lastP;
SDL_FloatPoint lastCentroid;
float lDist;
float Dist;
float dtheta;
float dDist;
if (event->type == SDL_FINGERMOTION ||
event->type == SDL_FINGERDOWN ||
event->type == SDL_FINGERUP) {
SDL_GestureTouch *inTouch = SDL_GetGestureTouch(event->tfinger.touchId);
/* Shouldn't be possible */
if (inTouch == NULL) {
return;
}
x = event->tfinger.x;
y = event->tfinger.y;
/* Finger Up */
if (event->type == SDL_FINGERUP) {
#if defined(ENABLE_DOLLAR)
SDL_FloatPoint path[DOLLARNPOINTS];
#endif
inTouch->numDownFingers--;
#if defined(ENABLE_DOLLAR)
if (inTouch->recording) {
inTouch->recording = SDL_FALSE;
dollarNormalize(&inTouch->dollarPath, path, SDL_TRUE);
/* PrintPath(path); */
if (recordAll) {
index = SDL_AddDollarGesture(NULL, path);
for (i = 0; i < SDL_numGestureTouches; i++) {
SDL_gestureTouch[i].recording = SDL_FALSE;
}
} else {
index = SDL_AddDollarGesture(inTouch, path);
}
if (index >= 0) {
SDL_SendDollarRecord(inTouch, inTouch->dollarTemplate[index].hash);
} else {
SDL_SendDollarRecord(inTouch, -1);
}
} else {
int bestTempl;
float error;
error = dollarRecognize(&inTouch->dollarPath,
&bestTempl, inTouch);
if (bestTempl >= 0) {
/* Send Event */
unsigned long gestureId = inTouch->dollarTemplate[bestTempl].hash;
SDL_SendGestureDollar(inTouch, gestureId, error);
/* printf ("%s\n",);("Dollar error: %f\n",error); */
}
}
#endif
/* inTouch->gestureLast[j] = inTouch->gestureLast[inTouch->numDownFingers]; */
if (inTouch->numDownFingers > 0) {
inTouch->centroid.x = (inTouch->centroid.x * (inTouch->numDownFingers + 1) -
x) /
inTouch->numDownFingers;
inTouch->centroid.y = (inTouch->centroid.y * (inTouch->numDownFingers + 1) -
y) /
inTouch->numDownFingers;
}
} else if (event->type == SDL_FINGERMOTION) {
float dx = event->tfinger.dx;
float dy = event->tfinger.dy;
#if defined(ENABLE_DOLLAR)
SDL_DollarPath *path = &inTouch->dollarPath;
if (path->numPoints < MAXPATHSIZE) {
path->p[path->numPoints].x = inTouch->centroid.x;
path->p[path->numPoints].y = inTouch->centroid.y;
pathDx =
(path->p[path->numPoints].x - path->p[path->numPoints - 1].x);
pathDy =
(path->p[path->numPoints].y - path->p[path->numPoints - 1].y);
path->length += (float)SDL_sqrt(pathDx * pathDx + pathDy * pathDy);
path->numPoints++;
}
#endif
lastP.x = x - dx;
lastP.y = y - dy;
lastCentroid = inTouch->centroid;
inTouch->centroid.x += dx / inTouch->numDownFingers;
inTouch->centroid.y += dy / inTouch->numDownFingers;
/* printf("Centrid : (%f,%f)\n",inTouch->centroid.x,inTouch->centroid.y); */
if (inTouch->numDownFingers > 1) {
SDL_FloatPoint lv; /* Vector from centroid to last x,y position */
SDL_FloatPoint v; /* Vector from centroid to current x,y position */
/* lv = inTouch->gestureLast[j].cv; */
lv.x = lastP.x - lastCentroid.x;
lv.y = lastP.y - lastCentroid.y;
lDist = (float)SDL_sqrt(lv.x * lv.x + lv.y * lv.y);
/* printf("lDist = %f\n",lDist); */
v.x = x - inTouch->centroid.x;
v.y = y - inTouch->centroid.y;
/* inTouch->gestureLast[j].cv = v; */
Dist = (float)SDL_sqrt(v.x * v.x + v.y * v.y);
/* SDL_cos(dTheta) = (v . lv)/(|v| * |lv|) */
/* Normalize Vectors to simplify angle calculation */
lv.x /= lDist;
lv.y /= lDist;
v.x /= Dist;
v.y /= Dist;
dtheta = (float)SDL_atan2(lv.x * v.y - lv.y * v.x, lv.x * v.x + lv.y * v.y);
dDist = (Dist - lDist);
if (lDist == 0) {
/* To avoid impossible values */
dDist = 0;
dtheta = 0;
}
/* inTouch->gestureLast[j].dDist = dDist;
inTouch->gestureLast[j].dtheta = dtheta;
printf("dDist = %f, dTheta = %f\n",dDist,dtheta);
gdtheta = gdtheta*.9 + dtheta*.1;
gdDist = gdDist*.9 + dDist*.1
knob.r += dDist/numDownFingers;
knob.ang += dtheta;
printf("thetaSum = %f, distSum = %f\n",gdtheta,gdDist);
printf("id: %i dTheta = %f, dDist = %f\n",j,dtheta,dDist); */
SDL_SendGestureMulti(inTouch, dtheta, dDist);
} else {
/* inTouch->gestureLast[j].dDist = 0;
inTouch->gestureLast[j].dtheta = 0;
inTouch->gestureLast[j].cv.x = 0;
inTouch->gestureLast[j].cv.y = 0; */
}
/* inTouch->gestureLast[j].f.p.x = x;
inTouch->gestureLast[j].f.p.y = y;
break;
pressure? */
} else if (event->type == SDL_FINGERDOWN) {
inTouch->numDownFingers++;
inTouch->centroid.x = (inTouch->centroid.x * (inTouch->numDownFingers - 1) +
x) /
inTouch->numDownFingers;
inTouch->centroid.y = (inTouch->centroid.y * (inTouch->numDownFingers - 1) +
y) /
inTouch->numDownFingers;
/* printf("Finger Down: (%f,%f). Centroid: (%f,%f\n",x,y,
inTouch->centroid.x,inTouch->centroid.y); */
#if defined(ENABLE_DOLLAR)
inTouch->dollarPath.length = 0;
inTouch->dollarPath.p[0].x = x;
inTouch->dollarPath.p[0].y = y;
inTouch->dollarPath.numPoints = 1;
#endif
}
}
}
/* vi: set ts=4 sw=4 expandtab: */

View file

@ -1,35 +0,0 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
#include "SDL_internal.h"
#ifndef SDL_gesture_c_h_
#define SDL_gesture_c_h_
extern int SDL_GestureAddTouch(SDL_TouchID touchId);
extern int SDL_GestureDelTouch(SDL_TouchID touchId);
extern void SDL_GestureProcessEvent(SDL_Event *event);
extern void SDL_GestureQuit(void);
#endif /* SDL_gesture_c_h_ */
/* vi: set ts=4 sw=4 expandtab: */

View file

@ -188,10 +188,6 @@ int SDL_AddTouch(SDL_TouchID touchID, SDL_TouchDeviceType type, const char *name
SDL_touchDevices[index]->fingers = NULL;
SDL_touchDevices[index]->name = SDL_strdup(name ? name : "");
/* Record this touch device for gestures */
/* We could do this on the fly in the gesture code if we wanted */
SDL_GestureAddTouch(touchID);
return index;
}
@ -483,9 +479,6 @@ void SDL_DelTouch(SDL_TouchID id)
SDL_num_touch--;
SDL_touchDevices[index] = SDL_touchDevices[SDL_num_touch];
/* Delete this touch device for gestures */
SDL_GestureDelTouch(id);
}
void SDL_TouchQuit(void)
@ -499,7 +492,6 @@ void SDL_TouchQuit(void)
SDL_free(SDL_touchDevices);
SDL_touchDevices = NULL;
SDL_GestureQuit();
}
/* vi: set ts=4 sw=4 expandtab: */

View file

@ -1685,15 +1685,6 @@ static void SDLTest_PrintEvent(SDL_Event *event)
event->tfinger.x, event->tfinger.y,
event->tfinger.dx, event->tfinger.dy, event->tfinger.pressure);
break;
case SDL_DOLLARGESTURE:
SDL_Log("SDL_EVENT: Dollar gesture detect: %ld", (long)event->dgesture.gestureId);
break;
case SDL_DOLLARRECORD:
SDL_Log("SDL_EVENT: Dollar gesture record: %ld", (long)event->dgesture.gestureId);
break;
case SDL_MULTIGESTURE:
SDL_Log("SDL_EVENT: Multi gesture fingers: %d", event->mgesture.numFingers);
break;
case SDL_RENDER_DEVICE_RESET:
SDL_Log("SDL EVENT: render device reset");

View file

@ -137,7 +137,6 @@ endif()
add_sdl_test_executable(testfile testfile.c)
add_sdl_test_executable(testgamecontroller NEEDS_RESOURCES TESTUTILS testgamecontroller.c)
add_sdl_test_executable(testgeometry TESTUTILS testgeometry.c)
add_sdl_test_executable(testgesture testgesture.c)
add_sdl_test_executable(testgl2 testgl2.c)
add_sdl_test_executable(testgles testgles.c)
add_sdl_test_executable(testgles2 testgles2.c)

View file

@ -1,302 +0,0 @@
/*
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely.
*/
/* Usage:
* Spacebar to begin recording a gesture on all touches.
* s to save all touches into "./gestureSave"
* l to load all touches from "./gestureSave"
*/
#include <stdlib.h> /* for exit() */
#include <SDL3/SDL.h>
#ifdef __EMSCRIPTEN__
#include <emscripten/emscripten.h>
#endif
#include <SDL3/SDL_test.h>
#include <SDL3/SDL_test_common.h>
#define WIDTH 640
#define HEIGHT 480
#define BPP 4
/* MUST BE A POWER OF 2! */
#define EVENT_BUF_SIZE 256
#define VERBOSE 0
static SDLTest_CommonState *state;
static SDL_Event events[EVENT_BUF_SIZE];
static int eventWrite;
static int colors[7] = { 0xFF, 0xFF00, 0xFF0000, 0xFFFF00, 0x00FFFF, 0xFF00FF, 0xFFFFFF };
static int quitting = 0;
typedef struct
{
float x, y;
} Point;
typedef struct
{
float ang, r;
Point p;
} Knob;
static Knob knob = { 0.0f, 0.1f, { 0.0f, 0.0f } };
static void
setpix(SDL_Surface *screen, float _x, float _y, unsigned int col)
{
Uint32 *pixmem32;
Uint32 colour;
Uint8 r, g, b;
const int x = (int)_x;
const int y = (int)_y;
float a;
if ((x < 0) || (x >= screen->w) || (y < 0) || (y >= screen->h)) {
return;
}
pixmem32 = (Uint32 *)screen->pixels + y * screen->pitch / BPP + x;
SDL_memcpy(&colour, pixmem32, screen->format->BytesPerPixel);
SDL_GetRGB(colour, screen->format, &r, &g, &b);
/* r = 0;g = 0; b = 0; */
a = (float)((col >> 24) & 0xFF);
if (a == 0) {
a = 0xFF; /* Hack, to make things easier. */
}
a = (a == 0.0f) ? 1 : (a / 255.0f);
r = (Uint8)(r * (1 - a) + ((col >> 16) & 0xFF) * a);
g = (Uint8)(g * (1 - a) + ((col >> 8) & 0xFF) * a);
b = (Uint8)(b * (1 - a) + ((col >> 0) & 0xFF) * a);
colour = SDL_MapRGB(screen->format, r, g, b);
*pixmem32 = colour;
}
#if 0 /* unused */
static void
drawLine(SDL_Surface *screen, float x0, float y0, float x1, float y1, unsigned int col)
{
float t;
for (t = 0; t < 1; t += (float) (1.0f / SDL_max(SDL_fabs(x0 - x1), SDL_fabs(y0 - y1)))) {
setpix(screen, x1 + t * (x0 - x1), y1 + t * (y0 - y1), col);
}
}
#endif
static void
drawCircle(SDL_Surface *screen, float x, float y, float r, unsigned int c)
{
float tx, ty, xr;
for (ty = (float)-SDL_fabs(r); ty <= (float)SDL_fabs((int)r); ty++) {
xr = (float)SDL_sqrt(r * r - ty * ty);
if (r > 0) { /* r > 0 ==> filled circle */
for (tx = -xr + 0.5f; tx <= xr - 0.5f; tx++) {
setpix(screen, x + tx, y + ty, c);
}
} else {
setpix(screen, x - xr + 0.5f, y + ty, c);
setpix(screen, x + xr - 0.5f, y + ty, c);
}
}
}
static void
drawKnob(SDL_Surface *screen, const Knob *k)
{
drawCircle(screen, k->p.x * screen->w, k->p.y * screen->h, k->r * screen->w, 0xFFFFFF);
drawCircle(screen, (k->p.x + k->r / 2 * SDL_cosf(k->ang)) * screen->w,
(k->p.y + k->r / 2 * SDL_sinf(k->ang)) * screen->h, k->r / 4 * screen->w, 0);
}
static void
DrawScreen(SDL_Window *window)
{
SDL_Surface *screen = SDL_GetWindowSurface(window);
int i;
if (screen == NULL) {
return;
}
SDL_FillRect(screen, NULL, SDL_MapRGB(screen->format, 75, 75, 75));
/* draw Touch History */
for (i = eventWrite; i < eventWrite + EVENT_BUF_SIZE; ++i) {
const SDL_Event *event = &events[i & (EVENT_BUF_SIZE - 1)];
const float age = (float)(i - eventWrite) / EVENT_BUF_SIZE;
float x, y;
unsigned int c, col;
if ((event->type == SDL_FINGERMOTION) ||
(event->type == SDL_FINGERDOWN) ||
(event->type == SDL_FINGERUP)) {
x = event->tfinger.x;
y = event->tfinger.y;
/* draw the touch: */
c = colors[event->tfinger.fingerId % 7];
col = ((unsigned int)(c * (0.1f + 0.85f))) | (unsigned int)(0xFF * age) << 24;
if (event->type == SDL_FINGERMOTION) {
drawCircle(screen, x * screen->w, y * screen->h, 5, col);
} else if (event->type == SDL_FINGERDOWN) {
drawCircle(screen, x * screen->w, y * screen->h, -10, col);
}
}
}
if (knob.p.x > 0) {
drawKnob(screen, &knob);
}
SDL_UpdateWindowSurface(window);
}
static void
loop(void)
{
SDL_Event event;
SDL_RWops *stream;
int i;
while (SDL_PollEvent(&event)) {
SDLTest_CommonEvent(state, &event, &quitting);
/* Record _all_ events */
events[eventWrite & (EVENT_BUF_SIZE - 1)] = event;
eventWrite++;
switch (event.type) {
case SDL_KEYDOWN:
switch (event.key.keysym.sym) {
case SDLK_i:
{
for (i = 0; i < SDL_GetNumTouchDevices(); ++i) {
const SDL_TouchID id = SDL_GetTouchDevice(i);
const char *name = SDL_GetTouchName(i);
SDL_Log("Fingers Down on device %" SDL_PRIs64 " (%s): %d", id, name, SDL_GetNumTouchFingers(id));
}
break;
}
case SDLK_SPACE:
SDL_RecordGesture(-1);
break;
case SDLK_s:
stream = SDL_RWFromFile("gestureSave", "w");
SDL_Log("Wrote %i templates", SDL_SaveAllDollarTemplates(stream));
SDL_RWclose(stream);
break;
case SDLK_l:
stream = SDL_RWFromFile("gestureSave", "r");
SDL_Log("Loaded: %i", SDL_LoadDollarTemplates(-1, stream));
SDL_RWclose(stream);
break;
}
break;
#if VERBOSE
case SDL_FINGERMOTION:
SDL_Log("Finger: %" SDL_PRIs64 ", x: %f, y: %f", event.tfinger.fingerId,
event.tfinger.x, event.tfinger.y);
break;
case SDL_FINGERDOWN:
SDL_Log("Finger: %" SDL_PRIs64 " down - x: %f, y: %f",
event.tfinger.fingerId, event.tfinger.x, event.tfinger.y);
break;
case SDL_FINGERUP:
SDL_Log("Finger: %" SDL_PRIs64 " up - x: %f, y: %f",
event.tfinger.fingerId, event.tfinger.x, event.tfinger.y);
break;
#endif
case SDL_MULTIGESTURE:
#if VERBOSE
SDL_Log("Multi Gesture: x = %f, y = %f, dAng = %f, dR = %f",
event.mgesture.x, event.mgesture.y,
event.mgesture.dTheta, event.mgesture.dDist);
SDL_Log("MG: numDownTouch = %i", event.mgesture.numFingers);
#endif
knob.p.x = event.mgesture.x;
knob.p.y = event.mgesture.y;
knob.ang += event.mgesture.dTheta;
knob.r += event.mgesture.dDist;
break;
case SDL_DOLLARGESTURE:
SDL_Log("Gesture %" SDL_PRIs64 " performed, error: %f",
event.dgesture.gestureId, event.dgesture.error);
break;
case SDL_DOLLARRECORD:
SDL_Log("Recorded gesture: %" SDL_PRIs64 "", event.dgesture.gestureId);
break;
}
}
for (i = 0; i < state->num_windows; ++i) {
if (state->windows[i]) {
DrawScreen(state->windows[i]);
}
}
#ifdef __EMSCRIPTEN__
if (quitting) {
emscripten_cancel_main_loop();
}
#endif
}
int main(int argc, char *argv[])
{
state = SDLTest_CommonCreateState(argv, SDL_INIT_VIDEO);
if (state == NULL) {
return 1;
}
state->window_title = "Gesture Test";
state->window_w = WIDTH;
state->window_h = HEIGHT;
state->skip_renderer = SDL_TRUE;
if (!SDLTest_CommonDefaultArgs(state, argc, argv) || !SDLTest_CommonInit(state)) {
SDLTest_CommonQuit(state);
return 1;
}
#ifdef __EMSCRIPTEN__
emscripten_set_main_loop(loop, 0, 1);
#else
while (!quitting) {
loop();
}
#endif
SDLTest_CommonQuit(state);
return 0;
}
/* vi: set ts=4 sw=4 expandtab: */