diff --git a/.silktouch/sdl-clangsharp.stout b/.silktouch/sdl-clangsharp.stout
index 693076b364..e005341523 100644
Binary files a/.silktouch/sdl-clangsharp.stout and b/.silktouch/sdl-clangsharp.stout differ
diff --git a/Directory.Packages.props b/Directory.Packages.props
index 0c0cf4d13b..385845b466 100644
--- a/Directory.Packages.props
+++ b/Directory.Packages.props
@@ -21,7 +21,7 @@
-
+
diff --git a/Silk.NET.sln b/Silk.NET.sln
index 7c83ca6760..ad76ff1655 100644
--- a/Silk.NET.sln
+++ b/Silk.NET.sln
@@ -116,7 +116,11 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "CSharp", "CSharp", "{12B4D1
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "OpenAL", "OpenAL", "{662A1AEC-91F2-48FA-AA29-6F27038D30F2}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tutorial001.HelloSound", "examples\CSharp\OpenAL\Tutorial001.HelloSound\Tutorial001.HelloSound.csproj", "{946C912C-5BBB-446A-A566-0D1696D19F59}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenAL.Tutorial001.HelloSound", "examples\CSharp\OpenAL\Tutorial001.HelloSound\OpenAL.Tutorial001.HelloSound.csproj", "{946C912C-5BBB-446A-A566-0D1696D19F59}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SDL.Tutorial001.HelloWindow", "examples\CSharp\SDL\Tutorial001.HelloWindow\SDL.Tutorial001.HelloWindow.csproj", "{3444151F-2DE3-41BC-B5E0-EFBF0091C087}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SDL", "SDL", "{96567E92-4A89-4AC8-9F20-C2A3FE644D10}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -196,7 +200,11 @@ Global
{946C912C-5BBB-446A-A566-0D1696D19F59}.Debug|Any CPU.Build.0 = Debug|Any CPU
{946C912C-5BBB-446A-A566-0D1696D19F59}.Release|Any CPU.ActiveCfg = Release|Any CPU
{946C912C-5BBB-446A-A566-0D1696D19F59}.Release|Any CPU.Build.0 = Release|Any CPU
- EndGlobalSection
+ {3444151F-2DE3-41BC-B5E0-EFBF0091C087}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {3444151F-2DE3-41BC-B5E0-EFBF0091C087}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {3444151F-2DE3-41BC-B5E0-EFBF0091C087}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {3444151F-2DE3-41BC-B5E0-EFBF0091C087}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
@@ -235,6 +243,8 @@ Global
{946C912C-5BBB-446A-A566-0D1696D19F59} = {662A1AEC-91F2-48FA-AA29-6F27038D30F2}
{5E20252F-E2A0-46C9-BBEF-4CE5C96D0E07} = {DD29EA8F-B1A6-45AA-8D2E-B38DA56D9EF6}
{E5E8FFBF-1319-4D33-B084-E732656E8A04} = {5E20252F-E2A0-46C9-BBEF-4CE5C96D0E07}
+ {96567E92-4A89-4AC8-9F20-C2A3FE644D10} = {12B4D1CB-8938-4EC4-8895-79C4E6ABD1E8}
+ {3444151F-2DE3-41BC-B5E0-EFBF0091C087} = {96567E92-4A89-4AC8-9F20-C2A3FE644D10}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {78D2CF6A-60A1-43E3-837B-00B73C9DA384}
diff --git a/eng/native/cmake/zig-toolchain.cmake b/eng/native/cmake/zig-toolchain.cmake
index f0202e8f8e..963cdae0d8 100755
--- a/eng/native/cmake/zig-toolchain.cmake
+++ b/eng/native/cmake/zig-toolchain.cmake
@@ -45,7 +45,7 @@ if(ZIG_OS STREQUAL "linux")
set(PKG_CONFIG_EXECUTABLE "/usr/bin/${ZIG_ARCH}-${ZIG_OS}-${LINUX_ABI}-pkg-config")
set(ENV{PKG_CONFIG_LIBDIR} "/usr/lib/${ZIG_ARCH}-${ZIG_OS}-${LINUX_ABI}/pkgconfig")
set(ENV{PKG_CONFIG_PATH} "/usr/lib/pkgconfig:/usr/share/pkgconfig")
- set(CMAKE_FIND_ROOT_PATH "/usr/${ZIG_ARCH}-${ZIG_OS}-${LINUX_ABI}")
+ set(CMAKE_LIBRARY_ARCHITECTURE "${ZIG_ARCH}-${ZIG_OS}-${LINUX_ABI}")
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY BOTH)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE BOTH)
diff --git a/eng/submodules/sdl b/eng/submodules/sdl
index b5c3eab6b4..5848e584a1 160000
--- a/eng/submodules/sdl
+++ b/eng/submodules/sdl
@@ -1 +1 @@
-Subproject commit b5c3eab6b447111d3c7879bb547b80fb4abd9063
+Subproject commit 5848e584a1b606de26e3dbd1c7e4ecbc34f807a6
diff --git a/examples/CSharp/OpenAL/Tutorial001.HelloSound/Tutorial001.HelloSound.csproj b/examples/CSharp/OpenAL/Tutorial001.HelloSound/OpenAL.Tutorial001.HelloSound.csproj
similarity index 100%
rename from examples/CSharp/OpenAL/Tutorial001.HelloSound/Tutorial001.HelloSound.csproj
rename to examples/CSharp/OpenAL/Tutorial001.HelloSound/OpenAL.Tutorial001.HelloSound.csproj
diff --git a/examples/CSharp/OpenAL/Tutorial001.HelloSound/Program.cs b/examples/CSharp/OpenAL/Tutorial001.HelloSound/Program.cs
index d9206d03fb..912f45c8d5 100644
--- a/examples/CSharp/OpenAL/Tutorial001.HelloSound/Program.cs
+++ b/examples/CSharp/OpenAL/Tutorial001.HelloSound/Program.cs
@@ -1,4 +1,7 @@
-using NAudio.Wave;
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+using NAudio.Wave;
using Silk.NET.OpenAL;
// NOTE: If you prefer, you can use the static ALContext and AL functions instead of creating an API object!
diff --git a/examples/CSharp/SDL/Tutorial001.HelloWindow/Program.cs b/examples/CSharp/SDL/Tutorial001.HelloWindow/Program.cs
new file mode 100644
index 0000000000..88650f8ec3
--- /dev/null
+++ b/examples/CSharp/SDL/Tutorial001.HelloWindow/Program.cs
@@ -0,0 +1,42 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+using Silk.NET.SDL;
+
+if (!Sdl.Init(Sdl.InitVideo))
+{
+ throw new Exception($"SDL failed to initialize: {Sdl.GetError().ReadToString()}");
+}
+
+var window = Sdl.CreateWindow("Silk.NET.SDL - Hello Window", 800, 600, Sdl.WindowResizable);
+if (window == nullptr)
+{
+ throw new Exception("Failed to create window");
+}
+
+try
+{
+ var renderer = Sdl.CreateRenderer(window, nullptr);
+ {
+ var shouldRun = true;
+ while (shouldRun)
+ {
+ var e = default(Event);
+ Sdl.PollEvent(e.AsRef());
+
+ if (e.Type == (uint)EventType.Quit)
+ {
+ shouldRun = false;
+ }
+
+ Sdl.SetRenderDrawColor(renderer, 0, 255, 0, 255);
+ Sdl.RenderClear(renderer);
+ Sdl.RenderPresent(renderer);
+ }
+ }
+ Sdl.DestroyWindow(window);
+}
+finally
+{
+ Sdl.Quit();
+}
diff --git a/examples/CSharp/SDL/Tutorial001.HelloWindow/SDL.Tutorial001.HelloWindow.csproj b/examples/CSharp/SDL/Tutorial001.HelloWindow/SDL.Tutorial001.HelloWindow.csproj
new file mode 100644
index 0000000000..bba484a1a4
--- /dev/null
+++ b/examples/CSharp/SDL/Tutorial001.HelloWindow/SDL.Tutorial001.HelloWindow.csproj
@@ -0,0 +1,14 @@
+
+
+
+ Exe
+ net10.0
+ enable
+ enable
+
+
+
+
+
+
+
diff --git a/sources/OpenAL/Soft.Native/build-win-arm64.cmd b/sources/OpenAL/Soft.Native/build-win-arm64.cmd
index 3ef56243b4..087746b7ae 100755
--- a/sources/OpenAL/Soft.Native/build-win-arm64.cmd
+++ b/sources/OpenAL/Soft.Native/build-win-arm64.cmd
@@ -2,7 +2,7 @@ if not exist "../../../eng/submodules/openal-soft/CMakeLists.txt" (
git submodule update --init --recursive --depth 1 ..\..\..\eng\submodules\openal-soft
)
-call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" arm64
+call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" amd64_arm64
rd /s /q build
mkdir build
cd build
diff --git a/sources/OpenAL/Soft.Native/runtimes/android-arm/native/libopenal.so b/sources/OpenAL/Soft.Native/runtimes/android-arm/native/libopenal.so
index 8a28b4398a..8b0f64ec21 100644
Binary files a/sources/OpenAL/Soft.Native/runtimes/android-arm/native/libopenal.so and b/sources/OpenAL/Soft.Native/runtimes/android-arm/native/libopenal.so differ
diff --git a/sources/OpenAL/Soft.Native/runtimes/android-arm64/native/libopenal.so b/sources/OpenAL/Soft.Native/runtimes/android-arm64/native/libopenal.so
index 03bc1a8eec..4fd3f598ca 100644
Binary files a/sources/OpenAL/Soft.Native/runtimes/android-arm64/native/libopenal.so and b/sources/OpenAL/Soft.Native/runtimes/android-arm64/native/libopenal.so differ
diff --git a/sources/OpenAL/Soft.Native/runtimes/android-x64/native/libopenal.so b/sources/OpenAL/Soft.Native/runtimes/android-x64/native/libopenal.so
index b6bfd84880..3c2ec92d5a 100644
Binary files a/sources/OpenAL/Soft.Native/runtimes/android-x64/native/libopenal.so and b/sources/OpenAL/Soft.Native/runtimes/android-x64/native/libopenal.so differ
diff --git a/sources/OpenAL/Soft.Native/runtimes/android-x86/native/libopenal.so b/sources/OpenAL/Soft.Native/runtimes/android-x86/native/libopenal.so
index ca0d0ec739..ed41794f25 100644
Binary files a/sources/OpenAL/Soft.Native/runtimes/android-x86/native/libopenal.so and b/sources/OpenAL/Soft.Native/runtimes/android-x86/native/libopenal.so differ
diff --git a/sources/OpenAL/Soft.Native/runtimes/ios/native/libopenal.dylib b/sources/OpenAL/Soft.Native/runtimes/ios/native/libopenal.dylib
index e69fa099d2..f58e35e947 100644
Binary files a/sources/OpenAL/Soft.Native/runtimes/ios/native/libopenal.dylib and b/sources/OpenAL/Soft.Native/runtimes/ios/native/libopenal.dylib differ
diff --git a/sources/OpenAL/Soft.Native/runtimes/iossimulator/native/libopenal.dylib b/sources/OpenAL/Soft.Native/runtimes/iossimulator/native/libopenal.dylib
index 0d193144b5..7e6a42e1ba 100644
Binary files a/sources/OpenAL/Soft.Native/runtimes/iossimulator/native/libopenal.dylib and b/sources/OpenAL/Soft.Native/runtimes/iossimulator/native/libopenal.dylib differ
diff --git a/sources/OpenAL/Soft.Native/runtimes/linux-arm/native/libopenal.so b/sources/OpenAL/Soft.Native/runtimes/linux-arm/native/libopenal.so
index e7bfa66eb9..8cf76e295b 100644
Binary files a/sources/OpenAL/Soft.Native/runtimes/linux-arm/native/libopenal.so and b/sources/OpenAL/Soft.Native/runtimes/linux-arm/native/libopenal.so differ
diff --git a/sources/OpenAL/Soft.Native/runtimes/linux-arm64/native/libopenal.so b/sources/OpenAL/Soft.Native/runtimes/linux-arm64/native/libopenal.so
index 491fe426ab..c636b3783c 100644
Binary files a/sources/OpenAL/Soft.Native/runtimes/linux-arm64/native/libopenal.so and b/sources/OpenAL/Soft.Native/runtimes/linux-arm64/native/libopenal.so differ
diff --git a/sources/OpenAL/Soft.Native/runtimes/linux-x64/native/libopenal.so b/sources/OpenAL/Soft.Native/runtimes/linux-x64/native/libopenal.so
index da2d923433..bc5237235c 100644
Binary files a/sources/OpenAL/Soft.Native/runtimes/linux-x64/native/libopenal.so and b/sources/OpenAL/Soft.Native/runtimes/linux-x64/native/libopenal.so differ
diff --git a/sources/OpenAL/Soft.Native/runtimes/osx/native/libopenal.dylib b/sources/OpenAL/Soft.Native/runtimes/osx/native/libopenal.dylib
index 4c7375818a..d6e299f695 100644
Binary files a/sources/OpenAL/Soft.Native/runtimes/osx/native/libopenal.dylib and b/sources/OpenAL/Soft.Native/runtimes/osx/native/libopenal.dylib differ
diff --git a/sources/OpenAL/Soft.Native/runtimes/tvos/native/libopenal.dylib b/sources/OpenAL/Soft.Native/runtimes/tvos/native/libopenal.dylib
index b7cfc92e3a..2ad7c825d8 100644
Binary files a/sources/OpenAL/Soft.Native/runtimes/tvos/native/libopenal.dylib and b/sources/OpenAL/Soft.Native/runtimes/tvos/native/libopenal.dylib differ
diff --git a/sources/OpenAL/Soft.Native/runtimes/win-arm64/native/OpenAL32.dll b/sources/OpenAL/Soft.Native/runtimes/win-arm64/native/OpenAL32.dll
index b058f2c0e7..6de6f59740 100644
Binary files a/sources/OpenAL/Soft.Native/runtimes/win-arm64/native/OpenAL32.dll and b/sources/OpenAL/Soft.Native/runtimes/win-arm64/native/OpenAL32.dll differ
diff --git a/sources/OpenAL/Soft.Native/runtimes/win-arm64/native/soft_oal.dll b/sources/OpenAL/Soft.Native/runtimes/win-arm64/native/soft_oal.dll
index c84d42bed8..df8fa4fc68 100644
Binary files a/sources/OpenAL/Soft.Native/runtimes/win-arm64/native/soft_oal.dll and b/sources/OpenAL/Soft.Native/runtimes/win-arm64/native/soft_oal.dll differ
diff --git a/sources/OpenAL/Soft.Native/runtimes/win-x64/native/OpenAL32.dll b/sources/OpenAL/Soft.Native/runtimes/win-x64/native/OpenAL32.dll
index 415977690c..a80bf92c91 100644
Binary files a/sources/OpenAL/Soft.Native/runtimes/win-x64/native/OpenAL32.dll and b/sources/OpenAL/Soft.Native/runtimes/win-x64/native/OpenAL32.dll differ
diff --git a/sources/OpenAL/Soft.Native/runtimes/win-x64/native/soft_oal.dll b/sources/OpenAL/Soft.Native/runtimes/win-x64/native/soft_oal.dll
index 7969fbe170..5cc77c6a40 100644
Binary files a/sources/OpenAL/Soft.Native/runtimes/win-x64/native/soft_oal.dll and b/sources/OpenAL/Soft.Native/runtimes/win-x64/native/soft_oal.dll differ
diff --git a/sources/SDL/Native/android/SDL3.jar b/sources/SDL/Native/android/SDL3.jar
index 9e919660df..d107789555 100644
Binary files a/sources/SDL/Native/android/SDL3.jar and b/sources/SDL/Native/android/SDL3.jar differ
diff --git a/sources/SDL/Native/android/proguard.txt b/sources/SDL/Native/android/proguard.txt
index 1eeb90e2c3..0fb7ae09ac 100644
--- a/sources/SDL/Native/android/proguard.txt
+++ b/sources/SDL/Native/android/proguard.txt
@@ -23,20 +23,18 @@
void clipboardSetText(java.lang.String);
int createCustomCursor(int[], int, int, int, int);
void destroyCustomCursor(int);
- android.content.Context getContext();
+ android.app.Activity getContext();
boolean getManifestEnvironmentVariables();
android.view.Surface getNativeSurface();
void initTouch();
boolean isAndroidTV();
boolean isChromebook();
boolean isDeXMode();
- boolean isScreenKeyboardShown();
boolean isTablet();
void manualBackButton();
int messageboxShowMessageBox(int, java.lang.String, java.lang.String, int[], int[], java.lang.String[], int[]);
void minimizeWindow();
boolean openURL(java.lang.String);
- void onNativePen(int, int, int , float , float , float);
void requestPermission(java.lang.String, int);
boolean showToast(java.lang.String, int, int, int, int);
boolean sendMessage(int, int);
@@ -51,6 +49,8 @@
boolean supportsRelativeMouse();
int openFileDescriptor(java.lang.String, java.lang.String);
boolean showFileDialog(java.lang.String[], boolean, boolean, int);
+ java.lang.String getPreferredLocales();
+ java.lang.String formatLocale(java.util.Locale);
}
-keep,includedescriptorclasses,allowoptimization class org.libsdl.app.HIDDeviceManager {
@@ -69,6 +69,7 @@
-keep,includedescriptorclasses,allowoptimization class org.libsdl.app.SDLControllerManager {
void pollInputDevices();
+ void joystickSetLED(int, int, int, int);
void pollHapticDevices();
void hapticRun(int, float, int);
void hapticRumble(int, float, float, int);
diff --git a/sources/SDL/Native/build-ios.sh b/sources/SDL/Native/build-ios.sh
index 7bb8178036..2ff4f664a3 100755
--- a/sources/SDL/Native/build-ios.sh
+++ b/sources/SDL/Native/build-ios.sh
@@ -7,7 +7,7 @@ fi
rm -rf build
mkdir build
cd build
-cmake ../../../../eng/submodules/sdl -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_SYSROOT=iphoneos "-DCMAKE_OSX_ARCHITECTURES=arm64;armv7s" -DCMAKE_OSX_DEPLOYMENT_TARGET=9.0 -DCMAKE_BUILD_TYPE=Release -DSDL_STATIC=ON
+cmake ../../../../eng/submodules/sdl -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_SYSROOT=iphoneos "-DCMAKE_OSX_ARCHITECTURES=arm64" -DCMAKE_OSX_DEPLOYMENT_TARGET=9.0 -DCMAKE_BUILD_TYPE=Release -DSDL_STATIC=ON -DSDL_TEST_LIBRARY=OFF
cmake --build . --parallel
cd ..
mkdir -p runtimes/ios/native
diff --git a/sources/SDL/Native/build-iossimulator.sh b/sources/SDL/Native/build-iossimulator.sh
index 6ae6577ddd..a7890fd884 100755
--- a/sources/SDL/Native/build-iossimulator.sh
+++ b/sources/SDL/Native/build-iossimulator.sh
@@ -7,7 +7,7 @@ fi
rm -rf build
mkdir build
cd build
-cmake ../../../../eng/submodules/sdl -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_SYSROOT=iphonesimulator "-DCMAKE_OSX_ARCHITECTURES=arm64;x86_64" -DCMAKE_OSX_DEPLOYMENT_TARGET=9.0 -DCMAKE_BUILD_TYPE=Release -DSDL_STATIC=ON
+cmake ../../../../eng/submodules/sdl -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_SYSROOT=iphonesimulator "-DCMAKE_OSX_ARCHITECTURES=arm64;x86_64" -DCMAKE_OSX_DEPLOYMENT_TARGET=9.0 -DCMAKE_BUILD_TYPE=Release -DSDL_STATIC=ON -DSDL_TEST_LIBRARY=OFF
cmake --build . --parallel
cd ..
mkdir -p runtimes/iossimulator/native
diff --git a/sources/SDL/Native/build-linux-arm.sh b/sources/SDL/Native/build-linux-arm.sh
index 22d2ed4898..f4cf61df49 100755
--- a/sources/SDL/Native/build-linux-arm.sh
+++ b/sources/SDL/Native/build-linux-arm.sh
@@ -6,19 +6,37 @@ fi
if [[ ! -z ${GITHUB_ACTIONS+x} ]]; then
../../../eng/native/buildsystem/download-zig.py
export PATH="$PATH:$(readlink -f "../../../eng/native/buildsystem/zig")"
+
+ # Enable ports repository
+ sudo apt-get update
+ sudo apt install lsb-release
+ grep -q "^Architectures:" /etc/apt/sources.list.d/ubuntu.sources || sudo sed -i "/^Signed-By: /a Architectures: amd64" /etc/apt/sources.list.d/ubuntu.sources
+ sudo tee /etc/apt/sources.list.d/ubuntu-ports.sources < Handle == other.Handle;
+
+ public override bool Equals(object? obj) => obj is GpuRenderStateHandle other && Equals(other);
+
+ public override int GetHashCode() => HashCode.Combine((nuint)Handle);
+
+ public static bool operator ==(GpuRenderStateHandle left, GpuRenderStateHandle right) =>
+ left.Equals(right);
+
+ public static bool operator !=(GpuRenderStateHandle left, GpuRenderStateHandle right) =>
+ !left.Equals(right);
+
+ public bool Equals(NullPtr _) => Handle is null;
+
+ public static bool operator ==(GpuRenderStateHandle left, NullPtr right) => left.Equals(right);
+
+ public static bool operator !=(GpuRenderStateHandle left, NullPtr right) => !left.Equals(right);
+
+ public static implicit operator GpuRenderStateHandle(NullPtr _) => default;
+}
diff --git a/sources/SDL/SDL/SDL3/AudioStreamDataCompleteCallback.gen.cs b/sources/SDL/SDL/SDL3/AudioStreamDataCompleteCallback.gen.cs
new file mode 100644
index 0000000000..c9da70d876
--- /dev/null
+++ b/sources/SDL/SDL/SDL3/AudioStreamDataCompleteCallback.gen.cs
@@ -0,0 +1,33 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// Ported from SDL.h and corresponding dependencies of SDL3.
+// Original source is Copyright (C) 1997-2024 Sam Lantinga. Licensed under the zlib license.
+using System;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace Silk.NET.SDL;
+
+[NativeName("SDL_AudioStreamDataCompleteCallback")]
+public readonly unsafe struct AudioStreamDataCompleteCallback : IDisposable
+{
+ private readonly void* Pointer;
+ public delegate* unmanaged Handle =>
+ (delegate* unmanaged)Pointer;
+
+ public AudioStreamDataCompleteCallback(delegate* unmanaged ptr) =>
+ Pointer = ptr;
+
+ public AudioStreamDataCompleteCallback(AudioStreamDataCompleteCallbackDelegate proc) =>
+ Pointer = SilkMarshal.DelegateToPtr(proc);
+
+ public void Dispose() => SilkMarshal.Free(Pointer);
+
+ public static implicit operator AudioStreamDataCompleteCallback(
+ delegate* unmanaged pfn
+ ) => new(pfn);
+
+ public static implicit operator delegate* unmanaged(
+ AudioStreamDataCompleteCallback pfn
+ ) => (delegate* unmanaged)pfn.Pointer;
+}
diff --git a/sources/SDL/SDL/SDL3/AudioStreamDataCompleteCallbackDelegate.gen.cs b/sources/SDL/SDL/SDL3/AudioStreamDataCompleteCallbackDelegate.gen.cs
new file mode 100644
index 0000000000..ec7debbc4e
--- /dev/null
+++ b/sources/SDL/SDL/SDL3/AudioStreamDataCompleteCallbackDelegate.gen.cs
@@ -0,0 +1,16 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// Ported from SDL.h and corresponding dependencies of SDL3.
+// Original source is Copyright (C) 1997-2024 Sam Lantinga. Licensed under the zlib license.
+using System;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace Silk.NET.SDL;
+
+[NativeName("SDL_AudioStreamDataCompleteCallback")]
+public unsafe delegate void AudioStreamDataCompleteCallbackDelegate(
+ void* arg0,
+ void* arg1,
+ int arg2
+);
diff --git a/sources/SDL/SDL/SDL3/CameraPermissionState.gen.cs b/sources/SDL/SDL/SDL3/CameraPermissionState.gen.cs
new file mode 100644
index 0000000000..b832697521
--- /dev/null
+++ b/sources/SDL/SDL/SDL3/CameraPermissionState.gen.cs
@@ -0,0 +1,22 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// Ported from SDL.h and corresponding dependencies of SDL3.
+// Original source is Copyright (C) 1997-2024 Sam Lantinga. Licensed under the zlib license.
+using System;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace Silk.NET.SDL;
+
+[NativeName("SDL_CameraPermissionState")]
+public enum CameraPermissionState
+{
+ [NativeName("SDL_CAMERA_PERMISSION_STATE_DENIED")]
+ Denied = -1,
+
+ [NativeName("SDL_CAMERA_PERMISSION_STATE_PENDING")]
+ Pending = 0,
+
+ [NativeName("SDL_CAMERA_PERMISSION_STATE_APPROVED")]
+ Approved = 1,
+}
diff --git a/sources/SDL/SDL/SDL3/Colorspace.gen.cs b/sources/SDL/SDL/SDL3/Colorspace.gen.cs
index aea78aa110..0ecd9b201e 100644
--- a/sources/SDL/SDL/SDL3/Colorspace.gen.cs
+++ b/sources/SDL/SDL/SDL3/Colorspace.gen.cs
@@ -48,5 +48,5 @@ public enum Colorspace
RgbDefault = Srgb,
[NativeName("SDL_COLORSPACE_YUV_DEFAULT")]
- YuvDefault = Jpeg,
+ YuvDefault = Bt601Limited,
}
diff --git a/sources/SDL/SDL/SDL3/CursorFrameInfo.gen.cs b/sources/SDL/SDL/SDL3/CursorFrameInfo.gen.cs
new file mode 100644
index 0000000000..801e66226f
--- /dev/null
+++ b/sources/SDL/SDL/SDL3/CursorFrameInfo.gen.cs
@@ -0,0 +1,18 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// Ported from SDL.h and corresponding dependencies of SDL3.
+// Original source is Copyright (C) 1997-2024 Sam Lantinga. Licensed under the zlib license.
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace Silk.NET.SDL;
+
+[NativeName("SDL_CursorFrameInfo")]
+public unsafe partial struct CursorFrameInfo
+{
+ [NativeName("surface")]
+ public Surface* Surface;
+
+ [NativeName("duration")]
+ public uint Duration;
+}
diff --git a/sources/SDL/SDL/SDL3/Event.gen.cs b/sources/SDL/SDL/SDL3/Event.gen.cs
index 79d8317a92..3c2d64455e 100644
--- a/sources/SDL/SDL/SDL3/Event.gen.cs
+++ b/sources/SDL/SDL/SDL3/Event.gen.cs
@@ -131,6 +131,10 @@ public partial struct Event
[FieldOffset(0)]
public TouchFingerEvent Tfinger;
+ [NativeName("pinch")]
+ [FieldOffset(0)]
+ public PinchFingerEvent Pinch;
+
[NativeName("pproximity")]
[FieldOffset(0)]
public PenProximityEvent Pproximity;
diff --git a/sources/SDL/SDL/SDL3/EventType.gen.cs b/sources/SDL/SDL/SDL3/EventType.gen.cs
index 9a5aa4a71a..49bc076c61 100644
--- a/sources/SDL/SDL/SDL3/EventType.gen.cs
+++ b/sources/SDL/SDL/SDL3/EventType.gen.cs
@@ -61,11 +61,14 @@ public enum EventType
[NativeName("SDL_EVENT_DISPLAY_CONTENT_SCALE_CHANGED")]
DisplayContentScaleChanged = 343,
+ [NativeName("SDL_EVENT_DISPLAY_USABLE_BOUNDS_CHANGED")]
+ DisplayUsableBoundsChanged = 344,
+
[NativeName("SDL_EVENT_DISPLAY_FIRST")]
DisplayFirst = DisplayOrientation,
[NativeName("SDL_EVENT_DISPLAY_LAST")]
- DisplayLast = DisplayContentScaleChanged,
+ DisplayLast = DisplayUsableBoundsChanged,
[NativeName("SDL_EVENT_WINDOW_SHOWN")]
WindowShown = 514,
@@ -172,6 +175,12 @@ public enum EventType
[NativeName("SDL_EVENT_TEXT_EDITING_CANDIDATES")]
TextEditingCandidates = 775,
+ [NativeName("SDL_EVENT_SCREEN_KEYBOARD_SHOWN")]
+ ScreenKeyboardShown = 776,
+
+ [NativeName("SDL_EVENT_SCREEN_KEYBOARD_HIDDEN")]
+ ScreenKeyboardHidden = 777,
+
[NativeName("SDL_EVENT_MOUSE_MOTION")]
MouseMotion = 1024,
@@ -265,6 +274,15 @@ public enum EventType
[NativeName("SDL_EVENT_FINGER_CANCELED")]
FingerCanceled = 1795,
+ [NativeName("SDL_EVENT_PINCH_BEGIN")]
+ PinchBegin = 1808,
+
+ [NativeName("SDL_EVENT_PINCH_UPDATE")]
+ PinchUpdate = 1809,
+
+ [NativeName("SDL_EVENT_PINCH_END")]
+ PinchEnd = 1810,
+
[NativeName("SDL_EVENT_CLIPBOARD_UPDATE")]
ClipboardUpdate = 2304,
diff --git a/sources/SDL/SDL/SDL3/FlipMode.gen.cs b/sources/SDL/SDL/SDL3/FlipMode.gen.cs
index e0b7d438da..30554e2a80 100644
--- a/sources/SDL/SDL/SDL3/FlipMode.gen.cs
+++ b/sources/SDL/SDL/SDL3/FlipMode.gen.cs
@@ -18,4 +18,7 @@ public enum FlipMode
[NativeName("SDL_FLIP_VERTICAL")]
Vertical = 2,
+
+ [NativeName("SDL_FLIP_HORIZONTAL_AND_VERTICAL")]
+ HorizontalAndVertical = (Horizontal | Vertical),
}
diff --git a/sources/SDL/SDL/SDL3/GamepadType.gen.cs b/sources/SDL/SDL/SDL3/GamepadType.gen.cs
index c04700195b..fa7ad93970 100644
--- a/sources/SDL/SDL/SDL3/GamepadType.gen.cs
+++ b/sources/SDL/SDL/SDL3/GamepadType.gen.cs
@@ -43,6 +43,9 @@ public enum GamepadType
[NativeName("SDL_GAMEPAD_TYPE_NINTENDO_SWITCH_JOYCON_PAIR")]
NintendoSwitchJoyconPair = 10,
+ [NativeName("SDL_GAMEPAD_TYPE_GAMECUBE")]
+ Gamecube = 11,
+
[NativeName("SDL_GAMEPAD_TYPE_COUNT")]
- Count = 11,
+ Count = 12,
}
diff --git a/sources/SDL/SDL/SDL3/GpuDepthStencilTargetInfo.gen.cs b/sources/SDL/SDL/SDL3/GpuDepthStencilTargetInfo.gen.cs
index 7f97572bd6..60503e4273 100644
--- a/sources/SDL/SDL/SDL3/GpuDepthStencilTargetInfo.gen.cs
+++ b/sources/SDL/SDL/SDL3/GpuDepthStencilTargetInfo.gen.cs
@@ -34,9 +34,9 @@ public unsafe partial struct GpuDepthStencilTargetInfo
[NativeName("clear_stencil")]
public byte ClearStencil;
- [NativeName("padding1")]
- public byte Padding1;
+ [NativeName("mip_level")]
+ public byte MipLevel;
- [NativeName("padding2")]
- public byte Padding2;
+ [NativeName("layer")]
+ public byte Layer;
}
diff --git a/sources/SDL/SDL/SDL3/GpuMultisampleState.gen.cs b/sources/SDL/SDL/SDL3/GpuMultisampleState.gen.cs
index 87129bed1a..f5c48e5de2 100644
--- a/sources/SDL/SDL/SDL3/GpuMultisampleState.gen.cs
+++ b/sources/SDL/SDL/SDL3/GpuMultisampleState.gen.cs
@@ -19,8 +19,8 @@ public partial struct GpuMultisampleState
[NativeName("enable_mask")]
public byte EnableMask;
- [NativeName("padding1")]
- public byte Padding1;
+ [NativeName("enable_alpha_to_coverage")]
+ public byte EnableAlphaToCoverage;
[NativeName("padding2")]
public byte Padding2;
diff --git a/sources/SDL/SDL/SDL3/GpuRenderStateCreateInfo.gen.cs b/sources/SDL/SDL/SDL3/GpuRenderStateCreateInfo.gen.cs
new file mode 100644
index 0000000000..b3c3a27a44
--- /dev/null
+++ b/sources/SDL/SDL/SDL3/GpuRenderStateCreateInfo.gen.cs
@@ -0,0 +1,36 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// Ported from SDL.h and corresponding dependencies of SDL3.
+// Original source is Copyright (C) 1997-2024 Sam Lantinga. Licensed under the zlib license.
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace Silk.NET.SDL;
+
+[NativeName("SDL_GPURenderStateCreateInfo")]
+public unsafe partial struct GpuRenderStateCreateInfo
+{
+ [NativeName("fragment_shader")]
+ public GpuShaderHandle FragmentShader;
+
+ [NativeName("num_sampler_bindings")]
+ public int NumSamplerBindings;
+
+ [NativeName("sampler_bindings")]
+ public GpuTextureSamplerBinding* SamplerBindings;
+
+ [NativeName("num_storage_textures")]
+ public int NumStorageTextures;
+
+ [NativeName("storage_textures")]
+ public GpuTextureHandle* StorageTextures;
+
+ [NativeName("num_storage_buffers")]
+ public int NumStorageBuffers;
+
+ [NativeName("storage_buffers")]
+ public GpuBufferHandle* StorageBuffers;
+
+ [NativeName("props")]
+ public uint Props;
+}
diff --git a/sources/SDL/SDL/SDL3/GpuVulkanOptions.gen.cs b/sources/SDL/SDL/SDL3/GpuVulkanOptions.gen.cs
new file mode 100644
index 0000000000..aa0ccc5ed7
--- /dev/null
+++ b/sources/SDL/SDL/SDL3/GpuVulkanOptions.gen.cs
@@ -0,0 +1,33 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// Ported from SDL.h and corresponding dependencies of SDL3.
+// Original source is Copyright (C) 1997-2024 Sam Lantinga. Licensed under the zlib license.
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace Silk.NET.SDL;
+
+[NativeName("SDL_GPUVulkanOptions")]
+public unsafe partial struct GpuVulkanOptions
+{
+ [NativeName("vulkan_api_version")]
+ public uint VulkanApiVersion;
+
+ [NativeName("feature_list")]
+ public void* FeatureList;
+
+ [NativeName("vulkan_10_physical_device_features")]
+ public void* Vulkan10PhysicalDeviceFeatures;
+
+ [NativeName("device_extension_count")]
+ public uint DeviceExtensionCount;
+
+ [NativeName("device_extension_names")]
+ public sbyte** DeviceExtensionNames;
+
+ [NativeName("instance_extension_count")]
+ public uint InstanceExtensionCount;
+
+ [NativeName("instance_extension_names")]
+ public sbyte** InstanceExtensionNames;
+}
diff --git a/sources/SDL/SDL/SDL3/ISdl.gen.cs b/sources/SDL/SDL/SDL3/ISdl.gen.cs
index 93572b6091..d5c8c95c5f 100644
--- a/sources/SDL/SDL/SDL3/ISdl.gen.cs
+++ b/sources/SDL/SDL/SDL3/ISdl.gen.cs
@@ -67,6 +67,14 @@ Ref swapchain_texture_height
[NativeFunction("SDL3", EntryPoint = "SDL_AddAtomicInt")]
static abstract int AddAtomicInt(Ref a, int v);
+ [NativeName("SDL_AddAtomicU32")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_AddAtomicU32")]
+ static abstract uint AddAtomicU32(AtomicU32* a, int v);
+
+ [NativeName("SDL_AddAtomicU32")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_AddAtomicU32")]
+ static abstract uint AddAtomicU32(Ref a, int v);
+
[NativeName("SDL_AddEventWatch")]
[NativeFunction("SDL3", EntryPoint = "SDL_AddEventWatch")]
static abstract byte AddEventWatch(EventFilter filter, void* userdata);
@@ -1143,6 +1151,24 @@ Ref newpath
[NativeFunction("SDL3", EntryPoint = "SDL_crc32")]
static abstract uint Crc32(uint crc, Ref data, nuint len);
+ [NativeName("SDL_CreateAnimatedCursor")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_CreateAnimatedCursor")]
+ static abstract CursorHandle CreateAnimatedCursor(
+ CursorFrameInfo* frames,
+ int frame_count,
+ int hot_x,
+ int hot_y
+ );
+
+ [NativeName("SDL_CreateAnimatedCursor")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_CreateAnimatedCursor")]
+ static abstract CursorHandle CreateAnimatedCursor(
+ Ref frames,
+ int frame_count,
+ int hot_x,
+ int hot_y
+ );
+
[NativeName("SDL_CreateAudioStream")]
[NativeFunction("SDL3", EntryPoint = "SDL_CreateAudioStream")]
static abstract AudioStreamHandle CreateAudioStream(
@@ -1269,6 +1295,27 @@ static abstract GpuGraphicsPipelineHandle CreateGpuGraphicsPipeline(
Ref createinfo
);
+ [NativeName("SDL_CreateGPURenderer")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_CreateGPURenderer")]
+ static abstract RendererHandle CreateGpuRenderer(
+ GpuDeviceHandle device,
+ WindowHandle window
+ );
+
+ [NativeName("SDL_CreateGPURenderState")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_CreateGPURenderState")]
+ static abstract GpuRenderStateHandle CreateGpuRenderState(
+ RendererHandle renderer,
+ GpuRenderStateCreateInfo* createinfo
+ );
+
+ [NativeName("SDL_CreateGPURenderState")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_CreateGPURenderState")]
+ static abstract GpuRenderStateHandle CreateGpuRenderState(
+ RendererHandle renderer,
+ Ref createinfo
+ );
+
[NativeName("SDL_CreateGPUSampler")]
[NativeFunction("SDL3", EntryPoint = "SDL_CreateGPUSampler")]
static abstract GpuSamplerHandle CreateGpuSampler(
@@ -1609,6 +1656,10 @@ Ref renderer
[NativeFunction("SDL3", EntryPoint = "SDL_DestroyGPUDevice")]
static abstract void DestroyGpuDevice(GpuDeviceHandle device);
+ [NativeName("SDL_DestroyGPURenderState")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_DestroyGPURenderState")]
+ static abstract void DestroyGpuRenderState(GpuRenderStateHandle state);
+
[NativeName("SDL_DestroyHapticEffect")]
[NativeFunction("SDL3", EntryPoint = "SDL_DestroyHapticEffect")]
static abstract void DestroyHapticEffect(HapticHandle haptic, int effect);
@@ -2353,7 +2404,7 @@ MaybeBool default_value
[NativeName("SDL_GetCameraPermissionState")]
[NativeFunction("SDL3", EntryPoint = "SDL_GetCameraPermissionState")]
- static abstract int GetCameraPermissionState(CameraHandle camera);
+ static abstract CameraPermissionState GetCameraPermissionState(CameraHandle camera);
[NativeName("SDL_GetCameraPosition")]
[NativeFunction("SDL3", EntryPoint = "SDL_GetCameraPosition")]
@@ -2542,6 +2593,20 @@ Ref timeFormat
[NativeFunction("SDL3", EntryPoint = "SDL_GetDefaultLogOutputFunction")]
static abstract LogOutputFunction GetDefaultLogOutputFunction();
+ [NativeName("SDL_GetDefaultTextureScaleMode")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_GetDefaultTextureScaleMode")]
+ static abstract byte GetDefaultTextureScaleMode(
+ RendererHandle renderer,
+ ScaleMode* scale_mode
+ );
+
+ [NativeName("SDL_GetDefaultTextureScaleMode")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_GetDefaultTextureScaleMode")]
+ static abstract MaybeBool GetDefaultTextureScaleMode(
+ RendererHandle renderer,
+ Ref scale_mode
+ );
+
[NativeName("SDL_GetDesktopDisplayMode")]
[NativeFunction("SDL3", EntryPoint = "SDL_GetDesktopDisplayMode")]
static abstract Ptr GetDesktopDisplayMode(uint displayID);
@@ -2670,6 +2735,14 @@ Ref outputIndex
[NativeFunction("SDL3", EntryPoint = "SDL_GetError")]
static abstract sbyte* GetErrorRaw();
+ [NativeName("SDL_GetEventDescription")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_GetEventDescription")]
+ static abstract int GetEventDescription(Event* @event, sbyte* buf, int buflen);
+
+ [NativeName("SDL_GetEventDescription")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_GetEventDescription")]
+ static abstract int GetEventDescription(Ref @event, Ref buf, int buflen);
+
[NativeName("SDL_GetEventFilter")]
[NativeFunction("SDL3", EntryPoint = "SDL_GetEventFilter")]
static abstract byte GetEventFilter(EventFilter* filter, void** userdata);
@@ -3043,6 +3116,10 @@ Ref pressure
[NativeFunction("SDL3", EntryPoint = "SDL_GetGPUDeviceDriver")]
static abstract sbyte* GetGpuDeviceDriverRaw(GpuDeviceHandle device);
+ [NativeName("SDL_GetGPUDeviceProperties")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_GetGPUDeviceProperties")]
+ static abstract uint GetGpuDeviceProperties(GpuDeviceHandle device);
+
[NativeName("SDL_GetGPUDriver")]
[NativeFunction("SDL3", EntryPoint = "SDL_GetGPUDriver")]
static abstract Ptr GetGpuDriver(int index);
@@ -3051,6 +3128,10 @@ Ref pressure
[NativeFunction("SDL3", EntryPoint = "SDL_GetGPUDriver")]
static abstract sbyte* GetGpuDriverRaw(int index);
+ [NativeName("SDL_GetGPURendererDevice")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_GetGPURendererDevice")]
+ static abstract GpuDeviceHandle GetGpuRendererDevice(RendererHandle renderer);
+
[NativeName("SDL_GetGPUShaderFormats")]
[NativeFunction("SDL3", EntryPoint = "SDL_GetGPUShaderFormats")]
static abstract uint GetGpuShaderFormats(GpuDeviceHandle device);
@@ -3062,6 +3143,10 @@ static abstract GpuTextureFormat GetGpuSwapchainTextureFormat(
WindowHandle window
);
+ [NativeName("SDL_GetGPUTextureFormatFromPixelFormat")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_GetGPUTextureFormatFromPixelFormat")]
+ static abstract GpuTextureFormat GetGpuTextureFormatFromPixelFormat(PixelFormat format);
+
[NativeName("SDL_GetGrabbedWindow")]
[NativeFunction("SDL3", EntryPoint = "SDL_GetGrabbedWindow")]
static abstract WindowHandle GetGrabbedWindow();
@@ -3576,6 +3661,10 @@ Ref free_func
[NativeFunction("SDL3", EntryPoint = "SDL_GetPathInfo")]
static abstract MaybeBool GetPathInfo(Ref path, Ref info);
+ [NativeName("SDL_GetPenDeviceType")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_GetPenDeviceType")]
+ static abstract PenDeviceType GetPenDeviceType(uint instance_id);
+
[NativeName("SDL_GetPerformanceCounter")]
[NativeFunction("SDL3", EntryPoint = "SDL_GetPerformanceCounter")]
static abstract ulong GetPerformanceCounter();
@@ -3602,6 +3691,10 @@ static abstract PixelFormat GetPixelFormatForMasks(
uint Amask
);
+ [NativeName("SDL_GetPixelFormatFromGPUTextureFormat")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_GetPixelFormatFromGPUTextureFormat")]
+ static abstract PixelFormat GetPixelFormatFromGpuTextureFormat(GpuTextureFormat format);
+
[NativeName("SDL_GetPixelFormatName")]
[NativeFunction("SDL3", EntryPoint = "SDL_GetPixelFormatName")]
static abstract Ptr GetPixelFormatName(PixelFormat format);
@@ -4005,6 +4098,22 @@ Ref scaleY
[NativeFunction("SDL3", EntryPoint = "SDL_GetRenderTarget")]
static abstract Texture* GetRenderTargetRaw(RendererHandle renderer);
+ [NativeName("SDL_GetRenderTextureAddressMode")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_GetRenderTextureAddressMode")]
+ static abstract byte GetRenderTextureAddressMode(
+ RendererHandle renderer,
+ TextureAddressMode* u_mode,
+ TextureAddressMode* v_mode
+ );
+
+ [NativeName("SDL_GetRenderTextureAddressMode")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_GetRenderTextureAddressMode")]
+ static abstract MaybeBool GetRenderTextureAddressMode(
+ RendererHandle renderer,
+ Ref u_mode,
+ Ref v_mode
+ );
+
[NativeName("SDL_GetRenderViewport")]
[NativeFunction("SDL3", EntryPoint = "SDL_GetRenderViewport")]
static abstract byte GetRenderViewport(RendererHandle renderer, Rect* rect);
@@ -4036,7 +4145,7 @@ Ref scaleY
[NativeName("SDL_GetRGB")]
[NativeFunction("SDL3", EntryPoint = "SDL_GetRGB")]
static abstract void GetRgb(
- uint pixel,
+ uint pixelvalue,
PixelFormatDetails* format,
Palette* palette,
byte* r,
@@ -4047,7 +4156,7 @@ static abstract void GetRgb(
[NativeName("SDL_GetRGB")]
[NativeFunction("SDL3", EntryPoint = "SDL_GetRGB")]
static abstract void GetRgb(
- uint pixel,
+ uint pixelvalue,
Ref format,
Ref palette,
Ref r,
@@ -4058,7 +4167,7 @@ Ref b
[NativeName("SDL_GetRGBA")]
[NativeFunction("SDL3", EntryPoint = "SDL_GetRGBA")]
static abstract void GetRgba(
- uint pixel,
+ uint pixelvalue,
PixelFormatDetails* format,
Palette* palette,
byte* r,
@@ -4070,7 +4179,7 @@ static abstract void GetRgba(
[NativeName("SDL_GetRGBA")]
[NativeFunction("SDL3", EntryPoint = "SDL_GetRGBA")]
static abstract void GetRgba(
- uint pixel,
+ uint pixelvalue,
Ref format,
Ref palette,
Ref r,
@@ -4303,6 +4412,10 @@ Ref b
[NativeFunction("SDL3", EntryPoint = "SDL_GetSurfaceProperties")]
static abstract uint GetSurfaceProperties(Ref surface);
+ [NativeName("SDL_GetSystemPageSize")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_GetSystemPageSize")]
+ static abstract int GetSystemPageSize();
+
[NativeName("SDL_GetSystemRAM")]
[NativeFunction("SDL3", EntryPoint = "SDL_GetSystemRAM")]
static abstract int GetSystemRam();
@@ -4384,6 +4497,14 @@ static abstract MaybeBool GetTextureColorModFloat(
Ref b
);
+ [NativeName("SDL_GetTexturePalette")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_GetTexturePalette")]
+ static abstract Palette* GetTexturePalette(Texture* texture);
+
+ [NativeName("SDL_GetTexturePalette")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_GetTexturePalette")]
+ static abstract Ptr GetTexturePalette(Ref texture);
+
[NativeName("SDL_GetTextureProperties")]
[NativeFunction("SDL3", EntryPoint = "SDL_GetTextureProperties")]
static abstract uint GetTextureProperties(Texture* texture);
@@ -4647,6 +4768,14 @@ static abstract MaybeBool GetWindowPosition(
Ref y
);
+ [NativeName("SDL_GetWindowProgressState")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_GetWindowProgressState")]
+ static abstract ProgressState GetWindowProgressState(WindowHandle window);
+
+ [NativeName("SDL_GetWindowProgressValue")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_GetWindowProgressValue")]
+ static abstract float GetWindowProgressValue(WindowHandle window);
+
[NativeName("SDL_GetWindowProperties")]
[NativeFunction("SDL3", EntryPoint = "SDL_GetWindowProperties")]
static abstract uint GetWindowProperties(WindowHandle window);
@@ -5261,6 +5390,10 @@ static abstract int HidGetProductString(
nuint maxlen
);
+ [NativeName("SDL_hid_get_properties")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_hid_get_properties")]
+ static abstract uint HidGetProperties(HidDeviceHandle dev);
+
[NativeName("SDL_hid_get_report_descriptor")]
[NativeFunction("SDL3", EntryPoint = "SDL_hid_get_report_descriptor")]
static abstract int HidGetReportDescriptor(HidDeviceHandle dev, byte* buf, nuint buf_size);
@@ -5731,6 +5864,38 @@ MaybeBool closeio
[NativeFunction("SDL3", EntryPoint = "SDL_LoadObject")]
static abstract SharedObjectHandle LoadObject(Ref sofile);
+ [NativeName("SDL_LoadPNG")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_LoadPNG")]
+ static abstract Surface* LoadPng(sbyte* file);
+
+ [NativeName("SDL_LoadPNG")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_LoadPNG")]
+ static abstract Ptr LoadPng(Ref file);
+
+ [NativeName("SDL_LoadPNG_IO")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_LoadPNG_IO")]
+ static abstract Surface* LoadPngIO(IOStreamHandle src, byte closeio);
+
+ [NativeName("SDL_LoadPNG_IO")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_LoadPNG_IO")]
+ static abstract Ptr LoadPngIO(IOStreamHandle src, MaybeBool closeio);
+
+ [NativeName("SDL_LoadSurface")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_LoadSurface")]
+ static abstract Surface* LoadSurface(sbyte* file);
+
+ [NativeName("SDL_LoadSurface")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_LoadSurface")]
+ static abstract Ptr LoadSurface(Ref file);
+
+ [NativeName("SDL_LoadSurface_IO")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_LoadSurface_IO")]
+ static abstract Surface* LoadSurfaceIO(IOStreamHandle src, byte closeio);
+
+ [NativeName("SDL_LoadSurface_IO")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_LoadSurface_IO")]
+ static abstract Ptr LoadSurfaceIO(IOStreamHandle src, MaybeBool closeio);
+
[NativeName("SDL_LoadWAV")]
[NativeFunction("SDL3", EntryPoint = "SDL_LoadWAV")]
static abstract byte LoadWav(
@@ -6427,6 +6592,44 @@ static abstract MaybeBool PutAudioStreamData(
int len
);
+ [NativeName("SDL_PutAudioStreamDataNoCopy")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_PutAudioStreamDataNoCopy")]
+ static abstract byte PutAudioStreamDataNoCopy(
+ AudioStreamHandle stream,
+ void* buf,
+ int len,
+ AudioStreamDataCompleteCallback callback,
+ void* userdata
+ );
+
+ [NativeName("SDL_PutAudioStreamDataNoCopy")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_PutAudioStreamDataNoCopy")]
+ static abstract MaybeBool PutAudioStreamDataNoCopy(
+ AudioStreamHandle stream,
+ Ref buf,
+ int len,
+ AudioStreamDataCompleteCallback callback,
+ Ref userdata
+ );
+
+ [NativeName("SDL_PutAudioStreamPlanarData")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_PutAudioStreamPlanarData")]
+ static abstract byte PutAudioStreamPlanarData(
+ AudioStreamHandle stream,
+ void** channel_buffers,
+ int num_channels,
+ int num_samples
+ );
+
+ [NativeName("SDL_PutAudioStreamPlanarData")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_PutAudioStreamPlanarData")]
+ static abstract MaybeBool PutAudioStreamPlanarData(
+ AudioStreamHandle stream,
+ Ref2D channel_buffers,
+ int num_channels,
+ int num_samples
+ );
+
[NativeName("SDL_qsort")]
[NativeFunction("SDL3", EntryPoint = "SDL_qsort")]
static abstract void Qsort(void* @base, nuint nmemb, nuint size, CompareCallback compare);
@@ -7152,6 +7355,36 @@ static abstract MaybeBool RenderTexture9Grid(
Ref dstrect
);
+ [NativeName("SDL_RenderTexture9GridTiled")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_RenderTexture9GridTiled")]
+ static abstract byte RenderTexture9GridTiled(
+ RendererHandle renderer,
+ Texture* texture,
+ FRect* srcrect,
+ float left_width,
+ float right_width,
+ float top_height,
+ float bottom_height,
+ float scale,
+ FRect* dstrect,
+ float tileScale
+ );
+
+ [NativeName("SDL_RenderTexture9GridTiled")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_RenderTexture9GridTiled")]
+ static abstract MaybeBool RenderTexture9GridTiled(
+ RendererHandle renderer,
+ Ref texture,
+ Ref srcrect,
+ float left_width,
+ float right_width,
+ float top_height,
+ float bottom_height,
+ float scale,
+ Ref dstrect,
+ float tileScale
+ );
+
[NativeName("SDL_RenderTextureAffine")]
[NativeFunction("SDL3", EntryPoint = "SDL_RenderTextureAffine")]
static abstract byte RenderTextureAffine(
@@ -7300,6 +7533,14 @@ int line
[NativeFunction("SDL3", EntryPoint = "SDL_ResumeHaptic")]
static abstract byte ResumeHapticRaw(HapticHandle haptic);
+ [NativeName("SDL_RotateSurface")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_RotateSurface")]
+ static abstract Surface* RotateSurface(Surface* surface, float angle);
+
+ [NativeName("SDL_RotateSurface")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_RotateSurface")]
+ static abstract Ptr RotateSurface(Ref surface, float angle);
+
[NativeName("SDL_round")]
[NativeFunction("SDL3", EntryPoint = "SDL_round")]
static abstract double Round(double x);
@@ -7467,6 +7708,26 @@ static abstract MaybeBool SaveFileIO(
MaybeBool closeio
);
+ [NativeName("SDL_SavePNG")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_SavePNG")]
+ static abstract byte SavePng(Surface* surface, sbyte* file);
+
+ [NativeName("SDL_SavePNG")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_SavePNG")]
+ static abstract MaybeBool SavePng(Ref surface, Ref file);
+
+ [NativeName("SDL_SavePNG_IO")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_SavePNG_IO")]
+ static abstract byte SavePngIO(Surface* surface, IOStreamHandle dst, byte closeio);
+
+ [NativeName("SDL_SavePNG_IO")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_SavePNG_IO")]
+ static abstract MaybeBool SavePngIO(
+ Ref surface,
+ IOStreamHandle dst,
+ MaybeBool closeio
+ );
+
[NativeName("SDL_scalbn")]
[NativeFunction("SDL3", EntryPoint = "SDL_scalbn")]
static abstract double Scalbn(double x, int n);
@@ -7792,6 +8053,20 @@ nuint num_mime_types
[NativeFunction("SDL3", EntryPoint = "SDL_SetCursor")]
static abstract byte SetCursorRaw(CursorHandle cursor);
+ [NativeName("SDL_SetDefaultTextureScaleMode")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_SetDefaultTextureScaleMode")]
+ static abstract MaybeBool SetDefaultTextureScaleMode(
+ RendererHandle renderer,
+ ScaleMode scale_mode
+ );
+
+ [NativeName("SDL_SetDefaultTextureScaleMode")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_SetDefaultTextureScaleMode")]
+ static abstract byte SetDefaultTextureScaleModeRaw(
+ RendererHandle renderer,
+ ScaleMode scale_mode
+ );
+
[NativeName("SDL_setenv_unsafe")]
[NativeFunction("SDL3", EntryPoint = "SDL_setenv_unsafe")]
static abstract int SetenvUnsafe(sbyte* name, sbyte* value, int overwrite);
@@ -7948,6 +8223,38 @@ static abstract void SetGpuBufferName(
Ref text
);
+ [NativeName("SDL_SetGPURenderState")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_SetGPURenderState")]
+ static abstract MaybeBool SetGpuRenderState(
+ RendererHandle renderer,
+ GpuRenderStateHandle state
+ );
+
+ [NativeName("SDL_SetGPURenderStateFragmentUniforms")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_SetGPURenderStateFragmentUniforms")]
+ static abstract byte SetGpuRenderStateFragmentUniforms(
+ GpuRenderStateHandle state,
+ uint slot_index,
+ void* data,
+ uint length
+ );
+
+ [NativeName("SDL_SetGPURenderStateFragmentUniforms")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_SetGPURenderStateFragmentUniforms")]
+ static abstract MaybeBool SetGpuRenderStateFragmentUniforms(
+ GpuRenderStateHandle state,
+ uint slot_index,
+ Ref data,
+ uint length
+ );
+
+ [NativeName("SDL_SetGPURenderState")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_SetGPURenderState")]
+ static abstract byte SetGpuRenderStateRaw(
+ RendererHandle renderer,
+ GpuRenderStateHandle state
+ );
+
[NativeName("SDL_SetGPUScissor")]
[NativeFunction("SDL3", EntryPoint = "SDL_SetGPUScissor")]
static abstract void SetGpuScissor(GpuRenderPassHandle render_pass, Rect* scissor);
@@ -8290,6 +8597,20 @@ Ref userdata
[NativeFunction("SDL3", EntryPoint = "SDL_SetPrimarySelectionText")]
static abstract MaybeBool SetPrimarySelectionText(Ref text);
+ [NativeName("SDL_SetRelativeMouseTransform")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_SetRelativeMouseTransform")]
+ static abstract byte SetRelativeMouseTransform(
+ MouseMotionTransformCallback callback,
+ void* userdata
+ );
+
+ [NativeName("SDL_SetRelativeMouseTransform")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_SetRelativeMouseTransform")]
+ static abstract MaybeBool SetRelativeMouseTransform(
+ MouseMotionTransformCallback callback,
+ Ref userdata
+ );
+
[NativeName("SDL_SetRenderClipRect")]
[NativeFunction("SDL3", EntryPoint = "SDL_SetRenderClipRect")]
static abstract byte SetRenderClipRect(RendererHandle renderer, Rect* rect);
@@ -8401,6 +8722,22 @@ static abstract MaybeBool SetRenderTarget(
Ref texture
);
+ [NativeName("SDL_SetRenderTextureAddressMode")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_SetRenderTextureAddressMode")]
+ static abstract MaybeBool SetRenderTextureAddressMode(
+ RendererHandle renderer,
+ TextureAddressMode u_mode,
+ TextureAddressMode v_mode
+ );
+
+ [NativeName("SDL_SetRenderTextureAddressMode")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_SetRenderTextureAddressMode")]
+ static abstract byte SetRenderTextureAddressModeRaw(
+ RendererHandle renderer,
+ TextureAddressMode u_mode,
+ TextureAddressMode v_mode
+ );
+
[NativeName("SDL_SetRenderViewport")]
[NativeFunction("SDL3", EntryPoint = "SDL_SetRenderViewport")]
static abstract byte SetRenderViewport(RendererHandle renderer, Rect* rect);
@@ -8587,6 +8924,17 @@ static abstract MaybeBool SetTextureColorModFloat(
float b
);
+ [NativeName("SDL_SetTexturePalette")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_SetTexturePalette")]
+ static abstract byte SetTexturePalette(Texture* texture, Palette* palette);
+
+ [NativeName("SDL_SetTexturePalette")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_SetTexturePalette")]
+ static abstract MaybeBool SetTexturePalette(
+ Ref texture,
+ Ref palette
+ );
+
[NativeName("SDL_SetTextureScaleMode")]
[NativeFunction("SDL3", EntryPoint = "SDL_SetTextureScaleMode")]
static abstract byte SetTextureScaleMode(Texture* texture, ScaleMode scaleMode);
@@ -8648,6 +8996,17 @@ static abstract MaybeBool SetWindowBordered(
MaybeBool bordered
);
+ [NativeName("SDL_SetWindowFillDocument")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_SetWindowFillDocument")]
+ static abstract byte SetWindowFillDocument(WindowHandle window, byte fill);
+
+ [NativeName("SDL_SetWindowFillDocument")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_SetWindowFillDocument")]
+ static abstract MaybeBool SetWindowFillDocument(
+ WindowHandle window,
+ MaybeBool fill
+ );
+
[NativeName("SDL_SetWindowFocusable")]
[NativeFunction("SDL3", EntryPoint = "SDL_SetWindowFocusable")]
static abstract byte SetWindowFocusable(WindowHandle window, byte focusable);
@@ -8791,6 +9150,25 @@ MaybeBool grabbed
[NativeFunction("SDL3", EntryPoint = "SDL_SetWindowPosition")]
static abstract byte SetWindowPositionRaw(WindowHandle window, int x, int y);
+ [NativeName("SDL_SetWindowProgressState")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_SetWindowProgressState")]
+ static abstract MaybeBool SetWindowProgressState(
+ WindowHandle window,
+ ProgressState state
+ );
+
+ [NativeName("SDL_SetWindowProgressState")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_SetWindowProgressState")]
+ static abstract byte SetWindowProgressStateRaw(WindowHandle window, ProgressState state);
+
+ [NativeName("SDL_SetWindowProgressValue")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_SetWindowProgressValue")]
+ static abstract MaybeBool SetWindowProgressValue(WindowHandle window, float value);
+
+ [NativeName("SDL_SetWindowProgressValue")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_SetWindowProgressValue")]
+ static abstract byte SetWindowProgressValueRaw(WindowHandle window, float value);
+
[NativeName("SDL_SetWindowRelativeMouseMode")]
[NativeFunction("SDL3", EntryPoint = "SDL_SetWindowRelativeMouseMode")]
static abstract byte SetWindowRelativeMouseMode(WindowHandle window, byte enabled);
@@ -10399,6 +10777,14 @@ Ref swapchain_texture_height
[NativeFunction("SDL3", EntryPoint = "SDL_AddAtomicInt")]
int AddAtomicInt(Ref a, int v);
+ [NativeName("SDL_AddAtomicU32")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_AddAtomicU32")]
+ uint AddAtomicU32(AtomicU32* a, int v);
+
+ [NativeName("SDL_AddAtomicU32")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_AddAtomicU32")]
+ uint AddAtomicU32(Ref a, int v);
+
[NativeName("SDL_AddEventWatch")]
[NativeFunction("SDL3", EntryPoint = "SDL_AddEventWatch")]
byte AddEventWatch(EventFilter filter, void* userdata);
@@ -11396,6 +11782,24 @@ MaybeBool cycle
[NativeFunction("SDL3", EntryPoint = "SDL_crc32")]
uint Crc32(uint crc, Ref data, nuint len);
+ [NativeName("SDL_CreateAnimatedCursor")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_CreateAnimatedCursor")]
+ CursorHandle CreateAnimatedCursor(
+ CursorFrameInfo* frames,
+ int frame_count,
+ int hot_x,
+ int hot_y
+ );
+
+ [NativeName("SDL_CreateAnimatedCursor")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_CreateAnimatedCursor")]
+ CursorHandle CreateAnimatedCursor(
+ Ref frames,
+ int frame_count,
+ int hot_x,
+ int hot_y
+ );
+
[NativeName("SDL_CreateAudioStream")]
[NativeFunction("SDL3", EntryPoint = "SDL_CreateAudioStream")]
AudioStreamHandle CreateAudioStream(AudioSpec* src_spec, AudioSpec* dst_spec);
@@ -11488,6 +11892,24 @@ GpuGraphicsPipelineHandle CreateGpuGraphicsPipeline(
Ref createinfo
);
+ [NativeName("SDL_CreateGPURenderer")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_CreateGPURenderer")]
+ RendererHandle CreateGpuRenderer(GpuDeviceHandle device, WindowHandle window);
+
+ [NativeName("SDL_CreateGPURenderState")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_CreateGPURenderState")]
+ GpuRenderStateHandle CreateGpuRenderState(
+ RendererHandle renderer,
+ GpuRenderStateCreateInfo* createinfo
+ );
+
+ [NativeName("SDL_CreateGPURenderState")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_CreateGPURenderState")]
+ GpuRenderStateHandle CreateGpuRenderState(
+ RendererHandle renderer,
+ Ref createinfo
+ );
+
[NativeName("SDL_CreateGPUSampler")]
[NativeFunction("SDL3", EntryPoint = "SDL_CreateGPUSampler")]
GpuSamplerHandle CreateGpuSampler(GpuDeviceHandle device, GpuSamplerCreateInfo* createinfo);
@@ -11789,6 +12211,10 @@ Ref renderer
[NativeFunction("SDL3", EntryPoint = "SDL_DestroyGPUDevice")]
void DestroyGpuDevice(GpuDeviceHandle device);
+ [NativeName("SDL_DestroyGPURenderState")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_DestroyGPURenderState")]
+ void DestroyGpuRenderState(GpuRenderStateHandle state);
+
[NativeName("SDL_DestroyHapticEffect")]
[NativeFunction("SDL3", EntryPoint = "SDL_DestroyHapticEffect")]
void DestroyHapticEffect(HapticHandle haptic, int effect);
@@ -12492,7 +12918,7 @@ Ref dst_spec
[NativeName("SDL_GetCameraPermissionState")]
[NativeFunction("SDL3", EntryPoint = "SDL_GetCameraPermissionState")]
- int GetCameraPermissionState(CameraHandle camera);
+ CameraPermissionState GetCameraPermissionState(CameraHandle camera);
[NativeName("SDL_GetCameraPosition")]
[NativeFunction("SDL3", EntryPoint = "SDL_GetCameraPosition")]
@@ -12671,6 +13097,14 @@ Ref timeFormat
[NativeFunction("SDL3", EntryPoint = "SDL_GetDefaultLogOutputFunction")]
LogOutputFunction GetDefaultLogOutputFunction();
+ [NativeName("SDL_GetDefaultTextureScaleMode")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_GetDefaultTextureScaleMode")]
+ byte GetDefaultTextureScaleMode(RendererHandle renderer, ScaleMode* scale_mode);
+
+ [NativeName("SDL_GetDefaultTextureScaleMode")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_GetDefaultTextureScaleMode")]
+ MaybeBool GetDefaultTextureScaleMode(RendererHandle renderer, Ref scale_mode);
+
[NativeName("SDL_GetDesktopDisplayMode")]
[NativeFunction("SDL3", EntryPoint = "SDL_GetDesktopDisplayMode")]
Ptr GetDesktopDisplayMode(uint displayID);
@@ -12795,6 +13229,14 @@ Ref timeFormat
[NativeFunction("SDL3", EntryPoint = "SDL_GetError")]
sbyte* GetErrorRaw();
+ [NativeName("SDL_GetEventDescription")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_GetEventDescription")]
+ int GetEventDescription(Event* @event, sbyte* buf, int buflen);
+
+ [NativeName("SDL_GetEventDescription")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_GetEventDescription")]
+ int GetEventDescription(Ref @event, Ref buf, int buflen);
+
[NativeName("SDL_GetEventFilter")]
[NativeFunction("SDL3", EntryPoint = "SDL_GetEventFilter")]
byte GetEventFilter(EventFilter* filter, void** userdata);
@@ -13136,6 +13578,10 @@ Ref pressure
[NativeFunction("SDL3", EntryPoint = "SDL_GetGPUDeviceDriver")]
sbyte* GetGpuDeviceDriverRaw(GpuDeviceHandle device);
+ [NativeName("SDL_GetGPUDeviceProperties")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_GetGPUDeviceProperties")]
+ uint GetGpuDeviceProperties(GpuDeviceHandle device);
+
[NativeName("SDL_GetGPUDriver")]
[NativeFunction("SDL3", EntryPoint = "SDL_GetGPUDriver")]
Ptr GetGpuDriver(int index);
@@ -13144,6 +13590,10 @@ Ref pressure
[NativeFunction("SDL3", EntryPoint = "SDL_GetGPUDriver")]
sbyte* GetGpuDriverRaw(int index);
+ [NativeName("SDL_GetGPURendererDevice")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_GetGPURendererDevice")]
+ GpuDeviceHandle GetGpuRendererDevice(RendererHandle renderer);
+
[NativeName("SDL_GetGPUShaderFormats")]
[NativeFunction("SDL3", EntryPoint = "SDL_GetGPUShaderFormats")]
uint GetGpuShaderFormats(GpuDeviceHandle device);
@@ -13152,6 +13602,10 @@ Ref pressure
[NativeFunction("SDL3", EntryPoint = "SDL_GetGPUSwapchainTextureFormat")]
GpuTextureFormat GetGpuSwapchainTextureFormat(GpuDeviceHandle device, WindowHandle window);
+ [NativeName("SDL_GetGPUTextureFormatFromPixelFormat")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_GetGPUTextureFormatFromPixelFormat")]
+ GpuTextureFormat GetGpuTextureFormatFromPixelFormat(PixelFormat format);
+
[NativeName("SDL_GetGrabbedWindow")]
[NativeFunction("SDL3", EntryPoint = "SDL_GetGrabbedWindow")]
WindowHandle GetGrabbedWindow();
@@ -13650,6 +14104,10 @@ Ref free_func
[NativeFunction("SDL3", EntryPoint = "SDL_GetPathInfo")]
MaybeBool GetPathInfo(Ref path, Ref info);
+ [NativeName("SDL_GetPenDeviceType")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_GetPenDeviceType")]
+ PenDeviceType GetPenDeviceType(uint instance_id);
+
[NativeName("SDL_GetPerformanceCounter")]
[NativeFunction("SDL3", EntryPoint = "SDL_GetPerformanceCounter")]
ulong GetPerformanceCounter();
@@ -13670,6 +14128,10 @@ Ref free_func
[NativeFunction("SDL3", EntryPoint = "SDL_GetPixelFormatForMasks")]
PixelFormat GetPixelFormatForMasks(int bpp, uint Rmask, uint Gmask, uint Bmask, uint Amask);
+ [NativeName("SDL_GetPixelFormatFromGPUTextureFormat")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_GetPixelFormatFromGPUTextureFormat")]
+ PixelFormat GetPixelFormatFromGpuTextureFormat(GpuTextureFormat format);
+
[NativeName("SDL_GetPixelFormatName")]
[NativeFunction("SDL3", EntryPoint = "SDL_GetPixelFormatName")]
Ptr GetPixelFormatName(PixelFormat format);
@@ -14010,6 +14472,22 @@ Ref mode
[NativeFunction("SDL3", EntryPoint = "SDL_GetRenderTarget")]
Texture* GetRenderTargetRaw(RendererHandle renderer);
+ [NativeName("SDL_GetRenderTextureAddressMode")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_GetRenderTextureAddressMode")]
+ byte GetRenderTextureAddressMode(
+ RendererHandle renderer,
+ TextureAddressMode* u_mode,
+ TextureAddressMode* v_mode
+ );
+
+ [NativeName("SDL_GetRenderTextureAddressMode")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_GetRenderTextureAddressMode")]
+ MaybeBool GetRenderTextureAddressMode(
+ RendererHandle renderer,
+ Ref u_mode,
+ Ref v_mode
+ );
+
[NativeName("SDL_GetRenderViewport")]
[NativeFunction("SDL3", EntryPoint = "SDL_GetRenderViewport")]
byte GetRenderViewport(RendererHandle renderer, Rect* rect);
@@ -14041,7 +14519,7 @@ Ref mode
[NativeName("SDL_GetRGB")]
[NativeFunction("SDL3", EntryPoint = "SDL_GetRGB")]
void GetRgb(
- uint pixel,
+ uint pixelvalue,
PixelFormatDetails* format,
Palette* palette,
byte* r,
@@ -14052,7 +14530,7 @@ void GetRgb(
[NativeName("SDL_GetRGB")]
[NativeFunction("SDL3", EntryPoint = "SDL_GetRGB")]
void GetRgb(
- uint pixel,
+ uint pixelvalue,
Ref format,
Ref palette,
Ref r,
@@ -14063,7 +14541,7 @@ Ref b
[NativeName("SDL_GetRGBA")]
[NativeFunction("SDL3", EntryPoint = "SDL_GetRGBA")]
void GetRgba(
- uint pixel,
+ uint pixelvalue,
PixelFormatDetails* format,
Palette* palette,
byte* r,
@@ -14075,7 +14553,7 @@ void GetRgba(
[NativeName("SDL_GetRGBA")]
[NativeFunction("SDL3", EntryPoint = "SDL_GetRGBA")]
void GetRgba(
- uint pixel,
+ uint pixelvalue,
Ref format,
Ref palette,
Ref r,
@@ -14284,6 +14762,10 @@ Ref a
[NativeFunction("SDL3", EntryPoint = "SDL_GetSurfaceProperties")]
uint GetSurfaceProperties(Ref surface);
+ [NativeName("SDL_GetSystemPageSize")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_GetSystemPageSize")]
+ int GetSystemPageSize();
+
[NativeName("SDL_GetSystemRAM")]
[NativeFunction("SDL3", EntryPoint = "SDL_GetSystemRAM")]
int GetSystemRam();
@@ -14345,6 +14827,14 @@ MaybeBool GetTextureColorModFloat(
Ref b
);
+ [NativeName("SDL_GetTexturePalette")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_GetTexturePalette")]
+ Palette* GetTexturePalette(Texture* texture);
+
+ [NativeName("SDL_GetTexturePalette")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_GetTexturePalette")]
+ Ptr GetTexturePalette(Ref texture);
+
[NativeName("SDL_GetTextureProperties")]
[NativeFunction("SDL3", EntryPoint = "SDL_GetTextureProperties")]
uint GetTextureProperties(Texture* texture);
@@ -14579,6 +15069,14 @@ Ref right
[NativeFunction("SDL3", EntryPoint = "SDL_GetWindowPosition")]
MaybeBool GetWindowPosition(WindowHandle window, Ref x, Ref y);
+ [NativeName("SDL_GetWindowProgressState")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_GetWindowProgressState")]
+ ProgressState GetWindowProgressState(WindowHandle window);
+
+ [NativeName("SDL_GetWindowProgressValue")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_GetWindowProgressValue")]
+ float GetWindowProgressValue(WindowHandle window);
+
[NativeName("SDL_GetWindowProperties")]
[NativeFunction("SDL3", EntryPoint = "SDL_GetWindowProperties")]
uint GetWindowProperties(WindowHandle window);
@@ -15158,6 +15656,10 @@ nuint maxlen
[NativeFunction("SDL3", EntryPoint = "SDL_hid_get_product_string")]
int HidGetProductString(HidDeviceHandle dev, Ref @string, nuint maxlen);
+ [NativeName("SDL_hid_get_properties")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_hid_get_properties")]
+ uint HidGetProperties(HidDeviceHandle dev);
+
[NativeName("SDL_hid_get_report_descriptor")]
[NativeFunction("SDL3", EntryPoint = "SDL_hid_get_report_descriptor")]
int HidGetReportDescriptor(HidDeviceHandle dev, byte* buf, nuint buf_size);
@@ -15583,6 +16085,38 @@ nuint inbytesleft
[NativeFunction("SDL3", EntryPoint = "SDL_LoadObject")]
SharedObjectHandle LoadObject(Ref sofile);
+ [NativeName("SDL_LoadPNG")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_LoadPNG")]
+ Surface* LoadPng(sbyte* file);
+
+ [NativeName("SDL_LoadPNG")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_LoadPNG")]
+ Ptr LoadPng(Ref file);
+
+ [NativeName("SDL_LoadPNG_IO")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_LoadPNG_IO")]
+ Surface* LoadPngIO(IOStreamHandle src, byte closeio);
+
+ [NativeName("SDL_LoadPNG_IO")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_LoadPNG_IO")]
+ Ptr LoadPngIO(IOStreamHandle src, MaybeBool closeio);
+
+ [NativeName("SDL_LoadSurface")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_LoadSurface")]
+ Surface* LoadSurface(sbyte* file);
+
+ [NativeName("SDL_LoadSurface")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_LoadSurface")]
+ Ptr LoadSurface(Ref file);
+
+ [NativeName("SDL_LoadSurface_IO")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_LoadSurface_IO")]
+ Surface* LoadSurfaceIO(IOStreamHandle src, byte closeio);
+
+ [NativeName("SDL_LoadSurface_IO")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_LoadSurface_IO")]
+ Ptr LoadSurfaceIO(IOStreamHandle src, MaybeBool closeio);
+
[NativeName("SDL_LoadWAV")]
[NativeFunction("SDL3", EntryPoint = "SDL_LoadWAV")]
byte LoadWav(sbyte* path, AudioSpec* spec, byte** audio_buf, uint* audio_len);
@@ -16219,6 +16753,44 @@ uint length
[NativeFunction("SDL3", EntryPoint = "SDL_PutAudioStreamData")]
MaybeBool PutAudioStreamData(AudioStreamHandle stream, Ref buf, int len);
+ [NativeName("SDL_PutAudioStreamDataNoCopy")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_PutAudioStreamDataNoCopy")]
+ byte PutAudioStreamDataNoCopy(
+ AudioStreamHandle stream,
+ void* buf,
+ int len,
+ AudioStreamDataCompleteCallback callback,
+ void* userdata
+ );
+
+ [NativeName("SDL_PutAudioStreamDataNoCopy")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_PutAudioStreamDataNoCopy")]
+ MaybeBool PutAudioStreamDataNoCopy(
+ AudioStreamHandle stream,
+ Ref buf,
+ int len,
+ AudioStreamDataCompleteCallback callback,
+ Ref userdata
+ );
+
+ [NativeName("SDL_PutAudioStreamPlanarData")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_PutAudioStreamPlanarData")]
+ byte PutAudioStreamPlanarData(
+ AudioStreamHandle stream,
+ void** channel_buffers,
+ int num_channels,
+ int num_samples
+ );
+
+ [NativeName("SDL_PutAudioStreamPlanarData")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_PutAudioStreamPlanarData")]
+ MaybeBool PutAudioStreamPlanarData(
+ AudioStreamHandle stream,
+ Ref2D channel_buffers,
+ int num_channels,
+ int num_samples
+ );
+
[NativeName("SDL_qsort")]
[NativeFunction("SDL3", EntryPoint = "SDL_qsort")]
void Qsort(void* @base, nuint nmemb, nuint size, CompareCallback compare);
@@ -16863,6 +17435,36 @@ MaybeBool RenderTexture9Grid(
Ref dstrect
);
+ [NativeName("SDL_RenderTexture9GridTiled")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_RenderTexture9GridTiled")]
+ byte RenderTexture9GridTiled(
+ RendererHandle renderer,
+ Texture* texture,
+ FRect* srcrect,
+ float left_width,
+ float right_width,
+ float top_height,
+ float bottom_height,
+ float scale,
+ FRect* dstrect,
+ float tileScale
+ );
+
+ [NativeName("SDL_RenderTexture9GridTiled")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_RenderTexture9GridTiled")]
+ MaybeBool RenderTexture9GridTiled(
+ RendererHandle renderer,
+ Ref texture,
+ Ref srcrect,
+ float left_width,
+ float right_width,
+ float top_height,
+ float bottom_height,
+ float scale,
+ Ref dstrect,
+ float tileScale
+ );
+
[NativeName("SDL_RenderTextureAffine")]
[NativeFunction("SDL3", EntryPoint = "SDL_RenderTextureAffine")]
byte RenderTextureAffine(
@@ -17001,6 +17603,14 @@ Ref dstrect
[NativeFunction("SDL3", EntryPoint = "SDL_ResumeHaptic")]
byte ResumeHapticRaw(HapticHandle haptic);
+ [NativeName("SDL_RotateSurface")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_RotateSurface")]
+ Surface* RotateSurface(Surface* surface, float angle);
+
+ [NativeName("SDL_RotateSurface")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_RotateSurface")]
+ Ptr RotateSurface(Ref surface, float angle);
+
[NativeName("SDL_round")]
[NativeFunction("SDL3", EntryPoint = "SDL_round")]
double Round(double x);
@@ -17146,6 +17756,22 @@ MaybeBool SaveFileIO(
MaybeBool closeio
);
+ [NativeName("SDL_SavePNG")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_SavePNG")]
+ byte SavePng(Surface* surface, sbyte* file);
+
+ [NativeName("SDL_SavePNG")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_SavePNG")]
+ MaybeBool SavePng(Ref surface, Ref file);
+
+ [NativeName("SDL_SavePNG_IO")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_SavePNG_IO")]
+ byte SavePngIO(Surface* surface, IOStreamHandle dst, byte closeio);
+
+ [NativeName("SDL_SavePNG_IO")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_SavePNG_IO")]
+ MaybeBool SavePngIO(Ref surface, IOStreamHandle dst, MaybeBool closeio);
+
[NativeName("SDL_scalbn")]
[NativeFunction("SDL3", EntryPoint = "SDL_scalbn")]
double Scalbn(double x, int n);
@@ -17426,6 +18052,14 @@ nuint num_mime_types
[NativeFunction("SDL3", EntryPoint = "SDL_SetCursor")]
byte SetCursorRaw(CursorHandle cursor);
+ [NativeName("SDL_SetDefaultTextureScaleMode")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_SetDefaultTextureScaleMode")]
+ MaybeBool SetDefaultTextureScaleMode(RendererHandle renderer, ScaleMode scale_mode);
+
+ [NativeName("SDL_SetDefaultTextureScaleMode")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_SetDefaultTextureScaleMode")]
+ byte SetDefaultTextureScaleModeRaw(RendererHandle renderer, ScaleMode scale_mode);
+
[NativeName("SDL_setenv_unsafe")]
[NativeFunction("SDL3", EntryPoint = "SDL_setenv_unsafe")]
int SetenvUnsafe(sbyte* name, sbyte* value, int overwrite);
@@ -17546,6 +18180,32 @@ uint allowed_frames_in_flight
[NativeFunction("SDL3", EntryPoint = "SDL_SetGPUBufferName")]
void SetGpuBufferName(GpuDeviceHandle device, GpuBufferHandle buffer, Ref text);
+ [NativeName("SDL_SetGPURenderState")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_SetGPURenderState")]
+ MaybeBool SetGpuRenderState(RendererHandle renderer, GpuRenderStateHandle state);
+
+ [NativeName("SDL_SetGPURenderStateFragmentUniforms")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_SetGPURenderStateFragmentUniforms")]
+ byte SetGpuRenderStateFragmentUniforms(
+ GpuRenderStateHandle state,
+ uint slot_index,
+ void* data,
+ uint length
+ );
+
+ [NativeName("SDL_SetGPURenderStateFragmentUniforms")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_SetGPURenderStateFragmentUniforms")]
+ MaybeBool SetGpuRenderStateFragmentUniforms(
+ GpuRenderStateHandle state,
+ uint slot_index,
+ Ref data,
+ uint length
+ );
+
+ [NativeName("SDL_SetGPURenderState")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_SetGPURenderState")]
+ byte SetGpuRenderStateRaw(RendererHandle renderer, GpuRenderStateHandle state);
+
[NativeName("SDL_SetGPUScissor")]
[NativeFunction("SDL3", EntryPoint = "SDL_SetGPUScissor")]
void SetGpuScissor(GpuRenderPassHandle render_pass, Rect* scissor);
@@ -17828,6 +18488,14 @@ Ref userdata
[NativeFunction("SDL3", EntryPoint = "SDL_SetPrimarySelectionText")]
MaybeBool SetPrimarySelectionText(Ref text);
+ [NativeName("SDL_SetRelativeMouseTransform")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_SetRelativeMouseTransform")]
+ byte SetRelativeMouseTransform(MouseMotionTransformCallback callback, void* userdata);
+
+ [NativeName("SDL_SetRelativeMouseTransform")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_SetRelativeMouseTransform")]
+ MaybeBool SetRelativeMouseTransform(MouseMotionTransformCallback callback, Ref userdata);
+
[NativeName("SDL_SetRenderClipRect")]
[NativeFunction("SDL3", EntryPoint = "SDL_SetRenderClipRect")]
byte SetRenderClipRect(RendererHandle renderer, Rect* rect);
@@ -17908,6 +18576,22 @@ RendererLogicalPresentation mode
[NativeFunction("SDL3", EntryPoint = "SDL_SetRenderTarget")]
MaybeBool SetRenderTarget(RendererHandle renderer, Ref texture);
+ [NativeName("SDL_SetRenderTextureAddressMode")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_SetRenderTextureAddressMode")]
+ MaybeBool SetRenderTextureAddressMode(
+ RendererHandle renderer,
+ TextureAddressMode u_mode,
+ TextureAddressMode v_mode
+ );
+
+ [NativeName("SDL_SetRenderTextureAddressMode")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_SetRenderTextureAddressMode")]
+ byte SetRenderTextureAddressModeRaw(
+ RendererHandle renderer,
+ TextureAddressMode u_mode,
+ TextureAddressMode v_mode
+ );
+
[NativeName("SDL_SetRenderViewport")]
[NativeFunction("SDL3", EntryPoint = "SDL_SetRenderViewport")]
byte SetRenderViewport(RendererHandle renderer, Rect* rect);
@@ -18052,6 +18736,14 @@ RendererLogicalPresentation mode
[NativeFunction("SDL3", EntryPoint = "SDL_SetTextureColorModFloat")]
MaybeBool SetTextureColorModFloat(Ref texture, float r, float g, float b);
+ [NativeName("SDL_SetTexturePalette")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_SetTexturePalette")]
+ byte SetTexturePalette(Texture* texture, Palette* palette);
+
+ [NativeName("SDL_SetTexturePalette")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_SetTexturePalette")]
+ MaybeBool SetTexturePalette(Ref texture, Ref palette);
+
[NativeName("SDL_SetTextureScaleMode")]
[NativeFunction("SDL3", EntryPoint = "SDL_SetTextureScaleMode")]
byte SetTextureScaleMode(Texture* texture, ScaleMode scaleMode);
@@ -18092,6 +18784,14 @@ RendererLogicalPresentation mode
[NativeFunction("SDL3", EntryPoint = "SDL_SetWindowBordered")]
MaybeBool SetWindowBordered(WindowHandle window, MaybeBool bordered);
+ [NativeName("SDL_SetWindowFillDocument")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_SetWindowFillDocument")]
+ byte SetWindowFillDocument(WindowHandle window, byte fill);
+
+ [NativeName("SDL_SetWindowFillDocument")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_SetWindowFillDocument")]
+ MaybeBool SetWindowFillDocument(WindowHandle window, MaybeBool fill);
+
[NativeName("SDL_SetWindowFocusable")]
[NativeFunction("SDL3", EntryPoint = "SDL_SetWindowFocusable")]
byte SetWindowFocusable(WindowHandle window, byte focusable);
@@ -18204,6 +18904,22 @@ RendererLogicalPresentation mode
[NativeFunction("SDL3", EntryPoint = "SDL_SetWindowPosition")]
byte SetWindowPositionRaw(WindowHandle window, int x, int y);
+ [NativeName("SDL_SetWindowProgressState")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_SetWindowProgressState")]
+ MaybeBool SetWindowProgressState(WindowHandle window, ProgressState state);
+
+ [NativeName("SDL_SetWindowProgressState")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_SetWindowProgressState")]
+ byte SetWindowProgressStateRaw(WindowHandle window, ProgressState state);
+
+ [NativeName("SDL_SetWindowProgressValue")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_SetWindowProgressValue")]
+ MaybeBool SetWindowProgressValue(WindowHandle window, float value);
+
+ [NativeName("SDL_SetWindowProgressValue")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_SetWindowProgressValue")]
+ byte SetWindowProgressValueRaw(WindowHandle window, float value);
+
[NativeName("SDL_SetWindowRelativeMouseMode")]
[NativeFunction("SDL3", EntryPoint = "SDL_SetWindowRelativeMouseMode")]
byte SetWindowRelativeMouseMode(WindowHandle window, byte enabled);
diff --git a/sources/SDL/SDL/SDL3/MouseMotionTransformCallback.gen.cs b/sources/SDL/SDL/SDL3/MouseMotionTransformCallback.gen.cs
new file mode 100644
index 0000000000..a42c8cc486
--- /dev/null
+++ b/sources/SDL/SDL/SDL3/MouseMotionTransformCallback.gen.cs
@@ -0,0 +1,40 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// Ported from SDL.h and corresponding dependencies of SDL3.
+// Original source is Copyright (C) 1997-2024 Sam Lantinga. Licensed under the zlib license.
+using System;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace Silk.NET.SDL;
+
+[NativeName("SDL_MouseMotionTransformCallback")]
+public readonly unsafe struct MouseMotionTransformCallback : IDisposable
+{
+ private readonly void* Pointer;
+ public delegate* unmanaged Handle =>
+ (delegate* unmanaged)Pointer;
+
+ public MouseMotionTransformCallback(
+ delegate* unmanaged ptr
+ ) => Pointer = ptr;
+
+ public MouseMotionTransformCallback(MouseMotionTransformCallbackDelegate proc) =>
+ Pointer = SilkMarshal.DelegateToPtr(proc);
+
+ public void Dispose() => SilkMarshal.Free(Pointer);
+
+ public static implicit operator MouseMotionTransformCallback(
+ delegate* unmanaged pfn
+ ) => new(pfn);
+
+ public static implicit operator delegate* unmanaged<
+ void*,
+ ulong,
+ WindowHandle,
+ uint,
+ float*,
+ float*,
+ void>(MouseMotionTransformCallback pfn) =>
+ (delegate* unmanaged)pfn.Pointer;
+}
diff --git a/sources/SDL/SDL/SDL3/MouseMotionTransformCallbackDelegate.gen.cs b/sources/SDL/SDL/SDL3/MouseMotionTransformCallbackDelegate.gen.cs
new file mode 100644
index 0000000000..c0218e34b9
--- /dev/null
+++ b/sources/SDL/SDL/SDL3/MouseMotionTransformCallbackDelegate.gen.cs
@@ -0,0 +1,19 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// Ported from SDL.h and corresponding dependencies of SDL3.
+// Original source is Copyright (C) 1997-2024 Sam Lantinga. Licensed under the zlib license.
+using System;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace Silk.NET.SDL;
+
+[NativeName("SDL_MouseMotionTransformCallback")]
+public unsafe delegate void MouseMotionTransformCallbackDelegate(
+ void* arg0,
+ ulong arg1,
+ WindowHandle arg2,
+ uint arg3,
+ float* arg4,
+ float* arg5
+);
diff --git a/sources/SDL/SDL/SDL3/MouseWheelEvent.gen.cs b/sources/SDL/SDL/SDL3/MouseWheelEvent.gen.cs
index f49f918974..db67e54aeb 100644
--- a/sources/SDL/SDL/SDL3/MouseWheelEvent.gen.cs
+++ b/sources/SDL/SDL/SDL3/MouseWheelEvent.gen.cs
@@ -39,4 +39,10 @@ public partial struct MouseWheelEvent
[NativeName("mouse_y")]
public float MouseY;
+
+ [NativeName("integer_x")]
+ public int IntegerX;
+
+ [NativeName("integer_y")]
+ public int IntegerY;
}
diff --git a/sources/SDL/SDL/SDL3/PenDeviceType.gen.cs b/sources/SDL/SDL/SDL3/PenDeviceType.gen.cs
new file mode 100644
index 0000000000..75dfff96f0
--- /dev/null
+++ b/sources/SDL/SDL/SDL3/PenDeviceType.gen.cs
@@ -0,0 +1,24 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// Ported from SDL.h and corresponding dependencies of SDL3.
+// Original source is Copyright (C) 1997-2024 Sam Lantinga. Licensed under the zlib license.
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace Silk.NET.SDL;
+
+[NativeName("SDL_PenDeviceType")]
+public enum PenDeviceType
+{
+ [NativeName("SDL_PEN_DEVICE_TYPE_INVALID")]
+ Invalid = -1,
+
+ [NativeName("SDL_PEN_DEVICE_TYPE_UNKNOWN")]
+ Unknown = 0,
+
+ [NativeName("SDL_PEN_DEVICE_TYPE_DIRECT")]
+ Direct = 1,
+
+ [NativeName("SDL_PEN_DEVICE_TYPE_INDIRECT")]
+ Indirect = 2,
+}
diff --git a/sources/SDL/SDL/SDL3/PinchFingerEvent.gen.cs b/sources/SDL/SDL/SDL3/PinchFingerEvent.gen.cs
new file mode 100644
index 0000000000..4a7df38627
--- /dev/null
+++ b/sources/SDL/SDL/SDL3/PinchFingerEvent.gen.cs
@@ -0,0 +1,27 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// Ported from SDL.h and corresponding dependencies of SDL3.
+// Original source is Copyright (C) 1997-2024 Sam Lantinga. Licensed under the zlib license.
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace Silk.NET.SDL;
+
+[NativeName("SDL_PinchFingerEvent")]
+public partial struct PinchFingerEvent
+{
+ [NativeName("type")]
+ public EventType Type;
+
+ [NativeName("reserved")]
+ public uint Reserved;
+
+ [NativeName("timestamp")]
+ public ulong Timestamp;
+
+ [NativeName("scale")]
+ public float Scale;
+
+ [NativeName("windowID")]
+ public uint WindowID;
+}
diff --git a/sources/SDL/SDL/SDL3/PixelFormat.gen.cs b/sources/SDL/SDL/SDL3/PixelFormat.gen.cs
index 04728f254e..42c5aa5e8e 100644
--- a/sources/SDL/SDL/SDL3/PixelFormat.gen.cs
+++ b/sources/SDL/SDL/SDL3/PixelFormat.gen.cs
@@ -202,6 +202,9 @@ public enum PixelFormat
[NativeName("SDL_PIXELFORMAT_EXTERNAL_OES")]
ExternalOes = 542328143,
+ [NativeName("SDL_PIXELFORMAT_MJPG")]
+ Mjpg = 1196444237,
+
[NativeName("SDL_PIXELFORMAT_RGBA32")]
Rgba32 = Abgr8888,
diff --git a/sources/SDL/SDL/SDL3/ProgressState.gen.cs b/sources/SDL/SDL/SDL3/ProgressState.gen.cs
new file mode 100644
index 0000000000..53d6895394
--- /dev/null
+++ b/sources/SDL/SDL/SDL3/ProgressState.gen.cs
@@ -0,0 +1,30 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// Ported from SDL.h and corresponding dependencies of SDL3.
+// Original source is Copyright (C) 1997-2024 Sam Lantinga. Licensed under the zlib license.
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace Silk.NET.SDL;
+
+[NativeName("SDL_ProgressState")]
+public enum ProgressState
+{
+ [NativeName("SDL_PROGRESS_STATE_INVALID")]
+ Invalid = -1,
+
+ [NativeName("SDL_PROGRESS_STATE_NONE")]
+ None = 0,
+
+ [NativeName("SDL_PROGRESS_STATE_INDETERMINATE")]
+ Indeterminate = 1,
+
+ [NativeName("SDL_PROGRESS_STATE_NORMAL")]
+ Normal = 2,
+
+ [NativeName("SDL_PROGRESS_STATE_PAUSED")]
+ Paused = 3,
+
+ [NativeName("SDL_PROGRESS_STATE_ERROR")]
+ Error = 4,
+}
diff --git a/sources/SDL/SDL/SDL3/ScaleMode.gen.cs b/sources/SDL/SDL/SDL3/ScaleMode.gen.cs
index 241898217d..49f902e011 100644
--- a/sources/SDL/SDL/SDL3/ScaleMode.gen.cs
+++ b/sources/SDL/SDL/SDL3/ScaleMode.gen.cs
@@ -10,9 +10,15 @@ namespace Silk.NET.SDL;
[NativeName("SDL_ScaleMode")]
public enum ScaleMode
{
+ [NativeName("SDL_SCALEMODE_INVALID")]
+ Invalid = -1,
+
[NativeName("SDL_SCALEMODE_NEAREST")]
Nearest = 0,
[NativeName("SDL_SCALEMODE_LINEAR")]
Linear = 1,
+
+ [NativeName("SDL_SCALEMODE_PIXELART")]
+ Pixelart = 2,
}
diff --git a/sources/SDL/SDL/SDL3/Sdl.gen.cs b/sources/SDL/SDL/SDL3/Sdl.gen.cs
index 95f75c8265..c4f2200c54 100644
--- a/sources/SDL/SDL/SDL3/Sdl.gen.cs
+++ b/sources/SDL/SDL/SDL3/Sdl.gen.cs
@@ -100,6 +100,23 @@ public static int AddAtomicInt(Ref a, int v)
}
}
+ [NativeName("SDL_AddAtomicU32")]
+ [DllImport("SDL3", ExactSpelling = true, EntryPoint = "SDL_AddAtomicU32")]
+ public static extern uint AddAtomicU32(AtomicU32* a, int v);
+
+ [NativeName("SDL_AddAtomicU32")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_AddAtomicU32")]
+ [MethodImpl(
+ MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization
+ )]
+ public static uint AddAtomicU32(Ref a, int v)
+ {
+ fixed (AtomicU32* __dsl_a = a)
+ {
+ return (uint)AddAtomicU32(__dsl_a, v);
+ }
+ }
+
[NativeName("SDL_AddEventWatch")]
[DllImport("SDL3", ExactSpelling = true, EntryPoint = "SDL_AddEventWatch")]
public static extern byte AddEventWatch(EventFilter filter, void* userdata);
@@ -1898,6 +1915,33 @@ public static uint Crc32(uint crc, Ref data, nuint len)
}
}
+ [NativeName("SDL_CreateAnimatedCursor")]
+ [DllImport("SDL3", ExactSpelling = true, EntryPoint = "SDL_CreateAnimatedCursor")]
+ public static extern CursorHandle CreateAnimatedCursor(
+ CursorFrameInfo* frames,
+ int frame_count,
+ int hot_x,
+ int hot_y
+ );
+
+ [NativeName("SDL_CreateAnimatedCursor")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_CreateAnimatedCursor")]
+ [MethodImpl(
+ MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization
+ )]
+ public static CursorHandle CreateAnimatedCursor(
+ Ref frames,
+ int frame_count,
+ int hot_x,
+ int hot_y
+ )
+ {
+ fixed (CursorFrameInfo* __dsl_frames = frames)
+ {
+ return (CursorHandle)CreateAnimatedCursor(__dsl_frames, frame_count, hot_x, hot_y);
+ }
+ }
+
[NativeName("SDL_CreateAudioStream")]
[DllImport("SDL3", ExactSpelling = true, EntryPoint = "SDL_CreateAudioStream")]
public static extern AudioStreamHandle CreateAudioStream(
@@ -2102,6 +2146,36 @@ Ref createinfo
}
}
+ [NativeName("SDL_CreateGPURenderer")]
+ [DllImport("SDL3", ExactSpelling = true, EntryPoint = "SDL_CreateGPURenderer")]
+ public static extern RendererHandle CreateGpuRenderer(
+ GpuDeviceHandle device,
+ WindowHandle window
+ );
+
+ [NativeName("SDL_CreateGPURenderState")]
+ [DllImport("SDL3", ExactSpelling = true, EntryPoint = "SDL_CreateGPURenderState")]
+ public static extern GpuRenderStateHandle CreateGpuRenderState(
+ RendererHandle renderer,
+ GpuRenderStateCreateInfo* createinfo
+ );
+
+ [NativeName("SDL_CreateGPURenderState")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_CreateGPURenderState")]
+ [MethodImpl(
+ MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization
+ )]
+ public static GpuRenderStateHandle CreateGpuRenderState(
+ RendererHandle renderer,
+ Ref createinfo
+ )
+ {
+ fixed (GpuRenderStateCreateInfo* __dsl_createinfo = createinfo)
+ {
+ return (GpuRenderStateHandle)CreateGpuRenderState(renderer, __dsl_createinfo);
+ }
+ }
+
[NativeName("SDL_CreateGPUSampler")]
[DllImport("SDL3", ExactSpelling = true, EntryPoint = "SDL_CreateGPUSampler")]
public static extern GpuSamplerHandle CreateGpuSampler(
@@ -2619,6 +2693,10 @@ public static MaybeBool DateTimeToTime(Ref dt, Ref ticks)
[DllImport("SDL3", ExactSpelling = true, EntryPoint = "SDL_DestroyGPUDevice")]
public static extern void DestroyGpuDevice(GpuDeviceHandle device);
+ [NativeName("SDL_DestroyGPURenderState")]
+ [DllImport("SDL3", ExactSpelling = true, EntryPoint = "SDL_DestroyGPURenderState")]
+ public static extern void DestroyGpuRenderState(GpuRenderStateHandle state);
+
[NativeName("SDL_DestroyHapticEffect")]
[DllImport("SDL3", ExactSpelling = true, EntryPoint = "SDL_DestroyHapticEffect")]
public static extern void DestroyHapticEffect(HapticHandle haptic, int effect);
@@ -3739,7 +3817,7 @@ public static Ptr GetCameraName(uint instance_id) =>
[NativeName("SDL_GetCameraPermissionState")]
[DllImport("SDL3", ExactSpelling = true, EntryPoint = "SDL_GetCameraPermissionState")]
- public static extern int GetCameraPermissionState(CameraHandle camera);
+ public static extern CameraPermissionState GetCameraPermissionState(CameraHandle camera);
[NativeName("SDL_GetCameraPosition")]
[DllImport("SDL3", ExactSpelling = true, EntryPoint = "SDL_GetCameraPosition")]
@@ -4037,6 +4115,30 @@ Ref timeFormat
[DllImport("SDL3", ExactSpelling = true, EntryPoint = "SDL_GetDefaultLogOutputFunction")]
public static extern LogOutputFunction GetDefaultLogOutputFunction();
+ [NativeName("SDL_GetDefaultTextureScaleMode")]
+ [DllImport("SDL3", ExactSpelling = true, EntryPoint = "SDL_GetDefaultTextureScaleMode")]
+ public static extern byte GetDefaultTextureScaleMode(
+ RendererHandle renderer,
+ ScaleMode* scale_mode
+ );
+
+ [NativeName("SDL_GetDefaultTextureScaleMode")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_GetDefaultTextureScaleMode")]
+ [MethodImpl(
+ MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization
+ )]
+ public static MaybeBool GetDefaultTextureScaleMode(
+ RendererHandle renderer,
+ Ref scale_mode
+ )
+ {
+ fixed (ScaleMode* __dsl_scale_mode = scale_mode)
+ {
+ return (MaybeBool)
+ (byte)GetDefaultTextureScaleMode(renderer, __dsl_scale_mode);
+ }
+ }
+
[NativeName("SDL_GetDesktopDisplayMode")]
[NativeFunction("SDL3", EntryPoint = "SDL_GetDesktopDisplayMode")]
[MethodImpl(
@@ -4267,6 +4369,24 @@ public static Ptr2D GetEnvironmentVariables(EnvironmentHandle env) =>
[DllImport("SDL3", ExactSpelling = true, EntryPoint = "SDL_GetError")]
public static extern sbyte* GetErrorRaw();
+ [NativeName("SDL_GetEventDescription")]
+ [DllImport("SDL3", ExactSpelling = true, EntryPoint = "SDL_GetEventDescription")]
+ public static extern int GetEventDescription(Event* @event, sbyte* buf, int buflen);
+
+ [NativeName("SDL_GetEventDescription")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_GetEventDescription")]
+ [MethodImpl(
+ MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization
+ )]
+ public static int GetEventDescription(Ref @event, Ref buf, int buflen)
+ {
+ fixed (sbyte* __dsl_buf = buf)
+ fixed (Event* __dsl_event = @event)
+ {
+ return (int)GetEventDescription(__dsl_event, __dsl_buf, buflen);
+ }
+ }
+
[NativeName("SDL_GetEventFilter")]
[DllImport("SDL3", ExactSpelling = true, EntryPoint = "SDL_GetEventFilter")]
public static extern byte GetEventFilter(EventFilter* filter, void** userdata);
@@ -4833,6 +4953,10 @@ public static Ptr GetGpuDeviceDriver(GpuDeviceHandle device) =>
[DllImport("SDL3", ExactSpelling = true, EntryPoint = "SDL_GetGPUDeviceDriver")]
public static extern sbyte* GetGpuDeviceDriverRaw(GpuDeviceHandle device);
+ [NativeName("SDL_GetGPUDeviceProperties")]
+ [DllImport("SDL3", ExactSpelling = true, EntryPoint = "SDL_GetGPUDeviceProperties")]
+ public static extern uint GetGpuDeviceProperties(GpuDeviceHandle device);
+
[NativeName("SDL_GetGPUDriver")]
[NativeFunction("SDL3", EntryPoint = "SDL_GetGPUDriver")]
[MethodImpl(
@@ -4844,6 +4968,10 @@ public static Ptr GetGpuDeviceDriver(GpuDeviceHandle device) =>
[DllImport("SDL3", ExactSpelling = true, EntryPoint = "SDL_GetGPUDriver")]
public static extern sbyte* GetGpuDriverRaw(int index);
+ [NativeName("SDL_GetGPURendererDevice")]
+ [DllImport("SDL3", ExactSpelling = true, EntryPoint = "SDL_GetGPURendererDevice")]
+ public static extern GpuDeviceHandle GetGpuRendererDevice(RendererHandle renderer);
+
[NativeName("SDL_GetGPUShaderFormats")]
[DllImport("SDL3", ExactSpelling = true, EntryPoint = "SDL_GetGPUShaderFormats")]
public static extern uint GetGpuShaderFormats(GpuDeviceHandle device);
@@ -4855,6 +4983,16 @@ public static extern GpuTextureFormat GetGpuSwapchainTextureFormat(
WindowHandle window
);
+ [NativeName("SDL_GetGPUTextureFormatFromPixelFormat")]
+ [DllImport(
+ "SDL3",
+ ExactSpelling = true,
+ EntryPoint = "SDL_GetGPUTextureFormatFromPixelFormat"
+ )]
+ public static extern GpuTextureFormat GetGpuTextureFormatFromPixelFormat(
+ PixelFormat format
+ );
+
[NativeName("SDL_GetGrabbedWindow")]
[DllImport("SDL3", ExactSpelling = true, EntryPoint = "SDL_GetGrabbedWindow")]
public static extern WindowHandle GetGrabbedWindow();
@@ -5628,6 +5766,10 @@ public static MaybeBool GetPathInfo(Ref path, Ref info)
}
}
+ [NativeName("SDL_GetPenDeviceType")]
+ [DllImport("SDL3", ExactSpelling = true, EntryPoint = "SDL_GetPenDeviceType")]
+ public static extern PenDeviceType GetPenDeviceType(uint instance_id);
+
[NativeName("SDL_GetPerformanceCounter")]
[DllImport("SDL3", ExactSpelling = true, EntryPoint = "SDL_GetPerformanceCounter")]
public static extern ulong GetPerformanceCounter();
@@ -5658,6 +5800,16 @@ public static extern PixelFormat GetPixelFormatForMasks(
uint Amask
);
+ [NativeName("SDL_GetPixelFormatFromGPUTextureFormat")]
+ [DllImport(
+ "SDL3",
+ ExactSpelling = true,
+ EntryPoint = "SDL_GetPixelFormatFromGPUTextureFormat"
+ )]
+ public static extern PixelFormat GetPixelFormatFromGpuTextureFormat(
+ GpuTextureFormat format
+ );
+
[NativeName("SDL_GetPixelFormatName")]
[NativeFunction("SDL3", EntryPoint = "SDL_GetPixelFormatName")]
[MethodImpl(
@@ -6390,6 +6542,33 @@ public static Ptr GetRenderTarget(RendererHandle renderer) =>
[DllImport("SDL3", ExactSpelling = true, EntryPoint = "SDL_GetRenderTarget")]
public static extern Texture* GetRenderTargetRaw(RendererHandle renderer);
+ [NativeName("SDL_GetRenderTextureAddressMode")]
+ [DllImport("SDL3", ExactSpelling = true, EntryPoint = "SDL_GetRenderTextureAddressMode")]
+ public static extern byte GetRenderTextureAddressMode(
+ RendererHandle renderer,
+ TextureAddressMode* u_mode,
+ TextureAddressMode* v_mode
+ );
+
+ [NativeName("SDL_GetRenderTextureAddressMode")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_GetRenderTextureAddressMode")]
+ [MethodImpl(
+ MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization
+ )]
+ public static MaybeBool GetRenderTextureAddressMode(
+ RendererHandle renderer,
+ Ref u_mode,
+ Ref v_mode
+ )
+ {
+ fixed (TextureAddressMode* __dsl_v_mode = v_mode)
+ fixed (TextureAddressMode* __dsl_u_mode = u_mode)
+ {
+ return (MaybeBool)
+ (byte)GetRenderTextureAddressMode(renderer, __dsl_u_mode, __dsl_v_mode);
+ }
+ }
+
[NativeName("SDL_GetRenderViewport")]
[DllImport("SDL3", ExactSpelling = true, EntryPoint = "SDL_GetRenderViewport")]
public static extern byte GetRenderViewport(RendererHandle renderer, Rect* rect);
@@ -6442,7 +6621,7 @@ public static MaybeBool GetRenderVSync(RendererHandle renderer, Ref v
[NativeName("SDL_GetRGB")]
[DllImport("SDL3", ExactSpelling = true, EntryPoint = "SDL_GetRGB")]
public static extern void GetRgb(
- uint pixel,
+ uint pixelvalue,
PixelFormatDetails* format,
Palette* palette,
byte* r,
@@ -6456,7 +6635,7 @@ public static extern void GetRgb(
MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization
)]
public static void GetRgb(
- uint pixel,
+ uint pixelvalue,
Ref format,
Ref palette,
Ref r,
@@ -6470,14 +6649,14 @@ Ref b
fixed (Palette* __dsl_palette = palette)
fixed (PixelFormatDetails* __dsl_format = format)
{
- GetRgb(pixel, __dsl_format, __dsl_palette, __dsl_r, __dsl_g, __dsl_b);
+ GetRgb(pixelvalue, __dsl_format, __dsl_palette, __dsl_r, __dsl_g, __dsl_b);
}
}
[NativeName("SDL_GetRGBA")]
[DllImport("SDL3", ExactSpelling = true, EntryPoint = "SDL_GetRGBA")]
public static extern void GetRgba(
- uint pixel,
+ uint pixelvalue,
PixelFormatDetails* format,
Palette* palette,
byte* r,
@@ -6492,7 +6671,7 @@ public static extern void GetRgba(
MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization
)]
public static void GetRgba(
- uint pixel,
+ uint pixelvalue,
Ref format,
Ref palette,
Ref r,
@@ -6508,7 +6687,15 @@ Ref a
fixed (Palette* __dsl_palette = palette)
fixed (PixelFormatDetails* __dsl_format = format)
{
- GetRgba(pixel, __dsl_format, __dsl_palette, __dsl_r, __dsl_g, __dsl_b, __dsl_a);
+ GetRgba(
+ pixelvalue,
+ __dsl_format,
+ __dsl_palette,
+ __dsl_r,
+ __dsl_g,
+ __dsl_b,
+ __dsl_a
+ );
}
}
@@ -6916,6 +7103,10 @@ public static uint GetSurfaceProperties(Ref surface)
}
}
+ [NativeName("SDL_GetSystemPageSize")]
+ [DllImport("SDL3", ExactSpelling = true, EntryPoint = "SDL_GetSystemPageSize")]
+ public static extern int GetSystemPageSize();
+
[NativeName("SDL_GetSystemRAM")]
[DllImport("SDL3", ExactSpelling = true, EntryPoint = "SDL_GetSystemRAM")]
public static extern int GetSystemRam();
@@ -7063,6 +7254,23 @@ Ref b
}
}
+ [NativeName("SDL_GetTexturePalette")]
+ [DllImport("SDL3", ExactSpelling = true, EntryPoint = "SDL_GetTexturePalette")]
+ public static extern Palette* GetTexturePalette(Texture* texture);
+
+ [NativeName("SDL_GetTexturePalette")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_GetTexturePalette")]
+ [MethodImpl(
+ MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization
+ )]
+ public static Ptr GetTexturePalette(Ref texture)
+ {
+ fixed (Texture* __dsl_texture = texture)
+ {
+ return (Palette*)GetTexturePalette(__dsl_texture);
+ }
+ }
+
[NativeName("SDL_GetTextureProperties")]
[DllImport("SDL3", ExactSpelling = true, EntryPoint = "SDL_GetTextureProperties")]
public static extern uint GetTextureProperties(Texture* texture);
@@ -7481,6 +7689,14 @@ public static MaybeBool GetWindowPosition(WindowHandle window, Ref x,
}
}
+ [NativeName("SDL_GetWindowProgressState")]
+ [DllImport("SDL3", ExactSpelling = true, EntryPoint = "SDL_GetWindowProgressState")]
+ public static extern ProgressState GetWindowProgressState(WindowHandle window);
+
+ [NativeName("SDL_GetWindowProgressValue")]
+ [DllImport("SDL3", ExactSpelling = true, EntryPoint = "SDL_GetWindowProgressValue")]
+ public static extern float GetWindowProgressValue(WindowHandle window);
+
[NativeName("SDL_GetWindowProperties")]
[DllImport("SDL3", ExactSpelling = true, EntryPoint = "SDL_GetWindowProperties")]
public static extern uint GetWindowProperties(WindowHandle window);
@@ -8371,6 +8587,10 @@ nuint maxlen
}
}
+ [NativeName("SDL_hid_get_properties")]
+ [DllImport("SDL3", ExactSpelling = true, EntryPoint = "SDL_hid_get_properties")]
+ public static extern uint HidGetProperties(HidDeviceHandle dev);
+
[NativeName("SDL_hid_get_report_descriptor")]
[DllImport("SDL3", ExactSpelling = true, EntryPoint = "SDL_hid_get_report_descriptor")]
public static extern int HidGetReportDescriptor(
@@ -9082,6 +9302,64 @@ public static SharedObjectHandle LoadObject(Ref sofile)
}
}
+ [NativeName("SDL_LoadPNG")]
+ [DllImport("SDL3", ExactSpelling = true, EntryPoint = "SDL_LoadPNG")]
+ public static extern Surface* LoadPng(sbyte* file);
+
+ [NativeName("SDL_LoadPNG")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_LoadPNG")]
+ [MethodImpl(
+ MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization
+ )]
+ public static Ptr LoadPng(Ref file)
+ {
+ fixed (sbyte* __dsl_file = file)
+ {
+ return (Surface*)LoadPng(__dsl_file);
+ }
+ }
+
+ [NativeName("SDL_LoadPNG_IO")]
+ [DllImport("SDL3", ExactSpelling = true, EntryPoint = "SDL_LoadPNG_IO")]
+ public static extern Surface* LoadPngIO(IOStreamHandle src, byte closeio);
+
+ [NativeName("SDL_LoadPNG_IO")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_LoadPNG_IO")]
+ [MethodImpl(
+ MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization
+ )]
+ public static Ptr LoadPngIO(IOStreamHandle src, MaybeBool closeio) =>
+ (Surface*)LoadPngIO(src, (byte)closeio);
+
+ [NativeName("SDL_LoadSurface")]
+ [DllImport("SDL3", ExactSpelling = true, EntryPoint = "SDL_LoadSurface")]
+ public static extern Surface* LoadSurface(sbyte* file);
+
+ [NativeName("SDL_LoadSurface")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_LoadSurface")]
+ [MethodImpl(
+ MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization
+ )]
+ public static Ptr LoadSurface(Ref file)
+ {
+ fixed (sbyte* __dsl_file = file)
+ {
+ return (Surface*)LoadSurface(__dsl_file);
+ }
+ }
+
+ [NativeName("SDL_LoadSurface_IO")]
+ [DllImport("SDL3", ExactSpelling = true, EntryPoint = "SDL_LoadSurface_IO")]
+ public static extern Surface* LoadSurfaceIO(IOStreamHandle src, byte closeio);
+
+ [NativeName("SDL_LoadSurface_IO")]
+ [NativeFunction("SDL3", EntryPoint = "SDL_LoadSurface_IO")]
+ [MethodImpl(
+ MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization
+ )]
+ public static Ptr