From 4f32e5fb4e0ad5866a44bb4da3de181ccbebbddd Mon Sep 17 00:00:00 2001 From: Susko3 Date: Sun, 22 Sep 2024 02:03:16 +0100 Subject: [PATCH] Add SDLBool with implicit bool conversions --- SDL3-CS.Tests/MainCallbacksTest.cs | 2 +- SDL3-CS.Tests/MyWindow.cs | 24 ++-- SDL3-CS.Tests/Program.cs | 4 +- SDL3-CS.Tests/TestClipboard.cs | 16 +-- .../TestPositionalInputVisualisation.cs | 6 +- SDL3-CS.Tests/TestSDLBool.cs | 37 +++-- SDL3-CS/SDL3/ClangSharp/SDL_atomic.g.cs | 8 +- SDL3-CS/SDL3/ClangSharp/SDL_audio.g.cs | 54 ++++---- SDL3-CS/SDL3/ClangSharp/SDL_camera.g.cs | 2 +- SDL3-CS/SDL3/ClangSharp/SDL_clipboard.g.cs | 14 +- SDL3-CS/SDL3/ClangSharp/SDL_cpuinfo.g.cs | 28 ++-- SDL3-CS/SDL3/ClangSharp/SDL_dialog.g.cs | 4 +- SDL3-CS/SDL3/ClangSharp/SDL_error.g.cs | 6 +- SDL3-CS/SDL3/ClangSharp/SDL_events.g.cs | 46 +++---- SDL3-CS/SDL3/ClangSharp/SDL_filesystem.g.cs | 12 +- SDL3-CS/SDL3/ClangSharp/SDL_gamepad.g.cs | 42 +++--- SDL3-CS/SDL3/ClangSharp/SDL_gpu.g.cs | 64 ++++----- SDL3-CS/SDL3/ClangSharp/SDL_haptic.g.cs | 32 ++--- SDL3-CS/SDL3/ClangSharp/SDL_hidapi.g.cs | 2 +- SDL3-CS/SDL3/ClangSharp/SDL_hints.g.cs | 10 +- SDL3-CS/SDL3/ClangSharp/SDL_init.g.cs | 8 +- SDL3-CS/SDL3/ClangSharp/SDL_iostream.g.cs | 66 ++++----- SDL3-CS/SDL3/ClangSharp/SDL_joystick.g.cs | 50 +++---- SDL3-CS/SDL3/ClangSharp/SDL_keyboard.g.cs | 26 ++-- SDL3-CS/SDL3/ClangSharp/SDL_log.g.cs | 2 +- SDL3-CS/SDL3/ClangSharp/SDL_main.Windows.g.cs | 2 +- SDL3-CS/SDL3/ClangSharp/SDL_messagebox.g.cs | 4 +- SDL3-CS/SDL3/ClangSharp/SDL_misc.g.cs | 2 +- SDL3-CS/SDL3/ClangSharp/SDL_mouse.g.cs | 18 +-- SDL3-CS/SDL3/ClangSharp/SDL_mutex.g.cs | 12 +- SDL3-CS/SDL3/ClangSharp/SDL_pixels.g.cs | 4 +- SDL3-CS/SDL3/ClangSharp/SDL_process.g.cs | 6 +- SDL3-CS/SDL3/ClangSharp/SDL_properties.g.cs | 24 ++-- SDL3-CS/SDL3/ClangSharp/SDL_rect.g.cs | 41 +++--- SDL3-CS/SDL3/ClangSharp/SDL_render.g.cs | 130 +++++++++--------- SDL3-CS/SDL3/ClangSharp/SDL_sensor.g.cs | 2 +- SDL3-CS/SDL3/ClangSharp/SDL_stdinc.g.cs | 14 +- SDL3-CS/SDL3/ClangSharp/SDL_storage.g.cs | 42 +++--- SDL3-CS/SDL3/ClangSharp/SDL_surface.g.cs | 80 +++++------ .../SDL3/ClangSharp/SDL_system.Android.g.cs | 12 +- SDL3-CS/SDL3/ClangSharp/SDL_system.GDK.g.cs | 4 +- SDL3-CS/SDL3/ClangSharp/SDL_system.Linux.g.cs | 4 +- .../SDL3/ClangSharp/SDL_system.Windows.g.cs | 4 +- SDL3-CS/SDL3/ClangSharp/SDL_system.g.cs | 4 +- SDL3-CS/SDL3/ClangSharp/SDL_system.iOS.g.cs | 4 +- SDL3-CS/SDL3/ClangSharp/SDL_thread.g.cs | 4 +- SDL3-CS/SDL3/ClangSharp/SDL_time.g.cs | 8 +- SDL3-CS/SDL3/ClangSharp/SDL_timer.g.cs | 2 +- SDL3-CS/SDL3/ClangSharp/SDL_video.g.cs | 122 ++++++++-------- SDL3-CS/SDL3/ClangSharp/SDL_vulkan.g.cs | 6 +- SDL3-CS/SDL3/SDL_clipboard.cs | 4 +- SDL3-CS/SDL3/SDL_error.cs | 4 +- SDL3-CS/SDL3/SDL_events.cs | 6 +- SDL3-CS/SDL3/SDL_stdinc.cs | 34 ++++- SDL3-CS/generate_bindings.py | 1 + 55 files changed, 613 insertions(+), 556 deletions(-) diff --git a/SDL3-CS.Tests/MainCallbacksTest.cs b/SDL3-CS.Tests/MainCallbacksTest.cs index 34dc62f..d3424f3 100644 --- a/SDL3-CS.Tests/MainCallbacksTest.cs +++ b/SDL3-CS.Tests/MainCallbacksTest.cs @@ -54,7 +54,7 @@ namespace SDL.Tests } [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])] - private static void LogOutput(IntPtr userdata, SDL_LogCategory category, SDL_LogPriority priority, byte* message) + private static void LogOutput(IntPtr userdata, int category, SDL_LogPriority priority, byte* message) { Console.WriteLine(SDL3.PtrToStringUTF8(message)); } diff --git a/SDL3-CS.Tests/MyWindow.cs b/SDL3-CS.Tests/MyWindow.cs index a5ae375..233f5ca 100644 --- a/SDL3-CS.Tests/MyWindow.cs +++ b/SDL3-CS.Tests/MyWindow.cs @@ -19,7 +19,7 @@ namespace SDL.Tests public MyWindow() { - if (SDL_InitSubSystem(init_flags) == SDL_bool.SDL_FALSE) + if (!SDL_InitSubSystem(init_flags)) throw new InvalidOperationException($"failed to initialise SDL. Error: {SDL_GetError()}"); initSuccess = true; @@ -29,7 +29,7 @@ namespace SDL.Tests public void Setup() { - SDL_SetGamepadEventsEnabled(SDL_bool.SDL_TRUE); + SDL_SetGamepadEventsEnabled(true); SDL_SetEventFilter(&nativeFilter, objectHandle.Handle); if (OperatingSystem.IsWindows()) @@ -37,7 +37,7 @@ namespace SDL.Tests } [UnmanagedCallersOnly(CallConvs = new[] { typeof(CallConvCdecl) })] - private static SDL_bool wndProc(IntPtr userdata, MSG* message) + private static SDLBool wndProc(IntPtr userdata, MSG* message) { var handle = new ObjectHandle(userdata); @@ -46,23 +46,23 @@ namespace SDL.Tests Console.WriteLine($"from {window}, message: {message->message}"); } - return SDL_TRUE; // sample use of definition from SDL3 class, not SDL_bool enum + return true; } // ReSharper disable once UseCollectionExpression [UnmanagedCallersOnly(CallConvs = new[] { typeof(CallConvCdecl) })] - private static SDL_bool nativeFilter(IntPtr userdata, SDL_Event* e) + private static SDLBool nativeFilter(IntPtr userdata, SDL_Event* e) { var handle = new ObjectHandle(userdata); if (handle.GetTarget(out var window)) return window.handleEventFromFilter(e); - return SDL_bool.SDL_TRUE; + return true; } public Action? EventFilter; - private SDL_bool handleEventFromFilter(SDL_Event* e) + private bool handleEventFromFilter(SDL_Event* e) { switch (e->Type) { @@ -76,7 +76,7 @@ namespace SDL.Tests break; } - return SDL_bool.SDL_TRUE; + return true; } private void handleKeyFromFilter(SDL_KeyboardEvent e) @@ -105,8 +105,8 @@ namespace SDL.Tests switch (e.key.key) { case SDL_Keycode.SDLK_R: - bool old = SDL_GetWindowRelativeMouseMode(sdlWindowHandle) == SDL_bool.SDL_TRUE; - SDL_SetWindowRelativeMouseMode(sdlWindowHandle, old ? SDL_bool.SDL_FALSE : SDL_bool.SDL_TRUE); + bool old = SDL_GetWindowRelativeMouseMode(sdlWindowHandle); + SDL_SetWindowRelativeMouseMode(sdlWindowHandle, !old); break; case SDL_Keycode.SDLK_V: @@ -115,11 +115,11 @@ namespace SDL.Tests break; case SDL_Keycode.SDLK_F10: - SDL_SetWindowFullscreen(sdlWindowHandle, SDL_bool.SDL_FALSE); + SDL_SetWindowFullscreen(sdlWindowHandle, false); break; case SDL_Keycode.SDLK_F11: - SDL_SetWindowFullscreen(sdlWindowHandle, SDL_bool.SDL_TRUE); + SDL_SetWindowFullscreen(sdlWindowHandle, true); break; case SDL_Keycode.SDLK_J: diff --git a/SDL3-CS.Tests/Program.cs b/SDL3-CS.Tests/Program.cs index 0a63be5..8e44865 100644 --- a/SDL3-CS.Tests/Program.cs +++ b/SDL3-CS.Tests/Program.cs @@ -14,8 +14,8 @@ namespace SDL.Tests if (OperatingSystem.IsWindows()) Console.OutputEncoding = Encoding.UTF8; - Console.WriteLine($"SDL_FALSE is represented as 0x{SDL_OutOfMemory():X} (expected 0x{SDL_bool.SDL_FALSE:X})"); - Console.WriteLine($"SDL_TRUE is represented as 0x{SDL_ClearError():X} (expected 0x{SDL_bool.SDL_TRUE:X})"); + Console.WriteLine($"false is represented as {SDL_OutOfMemory()} (expected 0x{SDLBool.FALSE_VALUE:x2})"); + Console.WriteLine($"true is represented as {SDL_ClearError()} (expected 0x{SDLBool.TRUE_VALUE:x2})"); SDL_SetHint(SDL_HINT_WINDOWS_CLOSE_ON_ALT_F4, "null byte \0 in string"u8); Debug.Assert(SDL_GetHint(SDL_HINT_WINDOWS_CLOSE_ON_ALT_F4) == "null byte "); diff --git a/SDL3-CS.Tests/TestClipboard.cs b/SDL3-CS.Tests/TestClipboard.cs index 674694b..aeb603b 100644 --- a/SDL3-CS.Tests/TestClipboard.cs +++ b/SDL3-CS.Tests/TestClipboard.cs @@ -25,11 +25,11 @@ namespace SDL.Tests public unsafe void TestClipboardData() { var ret = SDL3.SDL_SetClipboardData(&dataCallback, &cleanupCallback, IntPtr.Zero, "test/one", "test/two"); - Assert.That(ret, Is.EqualTo(0), SDL3.SDL_GetError); + Assert.That(ret, SDL3.SDL_GetError); - Assert.That(SDL3.SDL_HasClipboardData("test/one"), Is.EqualTo(SDL_bool.SDL_TRUE)); - Assert.That(SDL3.SDL_HasClipboardData("test/two"), Is.EqualTo(SDL_bool.SDL_TRUE)); - Assert.That(SDL3.SDL_HasClipboardData("test/three"), Is.EqualTo(SDL_bool.SDL_FALSE)); + Assert.That(SDL3.SDL_HasClipboardData("test/one")); + Assert.That(SDL3.SDL_HasClipboardData("test/two")); + Assert.That(!SDL3.SDL_HasClipboardData("test/three")); UIntPtr size; IntPtr data = SDL3.SDL_GetClipboardData("test/one", &size); @@ -46,13 +46,13 @@ namespace SDL.Tests } ret = SDL3.SDL_ClearClipboardData(); - Assert.That(ret, Is.EqualTo(SDL_bool.SDL_TRUE), SDL3.SDL_GetError); + Assert.That(ret, SDL3.SDL_GetError); Assert.That(cleanups, Is.EqualTo(1)); - Assert.That(SDL3.SDL_HasClipboardData("test/one"), Is.EqualTo(SDL_bool.SDL_FALSE)); - Assert.That(SDL3.SDL_HasClipboardData("test/two"), Is.EqualTo(SDL_bool.SDL_FALSE)); - Assert.That(SDL3.SDL_HasClipboardData("test/three"), Is.EqualTo(SDL_bool.SDL_FALSE)); + Assert.That(!SDL3.SDL_HasClipboardData("test/one")); + Assert.That(!SDL3.SDL_HasClipboardData("test/two")); + Assert.That(!SDL3.SDL_HasClipboardData("test/three")); data = SDL3.SDL_GetClipboardData("test/two", &size); diff --git a/SDL3-CS.Tests/TestPositionalInputVisualisation.cs b/SDL3-CS.Tests/TestPositionalInputVisualisation.cs index fa844c9..1515d83 100644 --- a/SDL3-CS.Tests/TestPositionalInputVisualisation.cs +++ b/SDL3-CS.Tests/TestPositionalInputVisualisation.cs @@ -116,15 +116,15 @@ namespace SDL.Tests switch (e.key.key) { case SDL_Keycode.SDLK_R: - SDL_SetWindowRelativeMouseMode(window, SDL_GetWindowRelativeMouseMode(window) == SDL_bool.SDL_TRUE ? SDL_bool.SDL_FALSE : SDL_bool.SDL_TRUE); + SDL_SetWindowRelativeMouseMode(window, !SDL_GetWindowRelativeMouseMode(window)); break; case SDL_Keycode.SDLK_F: - SDL_SetWindowFullscreen(window, SDL_bool.SDL_TRUE); + SDL_SetWindowFullscreen(window, true); break; case SDL_Keycode.SDLK_W: - SDL_SetWindowFullscreen(window, SDL_bool.SDL_FALSE); + SDL_SetWindowFullscreen(window, false); break; } diff --git a/SDL3-CS.Tests/TestSDLBool.cs b/SDL3-CS.Tests/TestSDLBool.cs index a0413c7..53ebfea 100644 --- a/SDL3-CS.Tests/TestSDLBool.cs +++ b/SDL3-CS.Tests/TestSDLBool.cs @@ -1,6 +1,7 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. +using System.Collections; using NUnit.Framework; namespace SDL.Tests @@ -8,32 +9,52 @@ namespace SDL.Tests [TestFixture] public class TestSDLBool { - private SDL_bool invert(SDL_bool value) => value == SDL_bool.SDL_TRUE ? SDL_bool.SDL_FALSE : SDL_bool.SDL_TRUE; - [Test] public void TestFalse() { - Assert.That(SDL3.SDL_OutOfMemory(), Is.EqualTo(SDL_bool.SDL_FALSE)); + Assert.That((bool)SDL3.SDL_OutOfMemory(), Is.EqualTo(false)); } [Test] public void TestTrue() { - Assert.That(SDL3.SDL_ClearError(), Is.EqualTo(SDL_bool.SDL_TRUE)); + Assert.That((bool)SDL3.SDL_ClearError(), Is.EqualTo(true)); } [Test] - public void TestStoreLoad([Values] SDL_bool value) + public void TestStoreLoad([Values] bool value) { var props = SDL3.SDL_CreateProperties(); Assume.That(props, Is.Not.EqualTo(0)); - var ret = SDL3.SDL_SetBooleanProperty(props, "test", value); - Assume.That(ret, Is.EqualTo(SDL_bool.SDL_TRUE)); + bool ret = SDL3.SDL_SetBooleanProperty(props, "test", value); + Assume.That(ret, Is.EqualTo(true)); - Assert.That(SDL3.SDL_GetBooleanProperty(props, "test", invert(value)), Is.EqualTo(value)); + Assert.That((bool)SDL3.SDL_GetBooleanProperty(props, "test", !value), Is.EqualTo(value)); SDL3.SDL_DestroyProperties(props); } + + public static IEnumerable BoolCases() + { + SDLBool[] values = [new SDLBool(4), true, false]; + + foreach (var x in values) + { + foreach (var y in values) + { + yield return new object[] { x, y }; + } + } + } + + [TestCaseSource(typeof(TestSDLBool), nameof(BoolCases))] + public void TestEquals(SDLBool first, SDLBool second) + { + Assert.That((SDLBool)(bool)first, Is.EqualTo(first)); + + Assert.That(first.Equals(second), Is.EqualTo((bool)first == (bool)second)); + Assert.That(first == second, Is.EqualTo((bool)first == (bool)second)); + } } } diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_atomic.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_atomic.g.cs index a551810..d25b34f 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_atomic.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_atomic.g.cs @@ -43,7 +43,7 @@ namespace SDL { [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_TryLockSpinlock([NativeTypeName("SDL_SpinLock *")] int* @lock); + public static extern SDLBool SDL_TryLockSpinlock([NativeTypeName("SDL_SpinLock *")] int* @lock); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_LockSpinlock([NativeTypeName("SDL_SpinLock *")] int* @lock); @@ -59,7 +59,7 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_CompareAndSwapAtomicInt(SDL_AtomicInt* a, int oldval, int newval); + public static extern SDLBool SDL_CompareAndSwapAtomicInt(SDL_AtomicInt* a, int oldval, int newval); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern int SDL_SetAtomicInt(SDL_AtomicInt* a, int v); @@ -72,7 +72,7 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_CompareAndSwapAtomicU32(SDL_AtomicU32* a, [NativeTypeName("Uint32")] uint oldval, [NativeTypeName("Uint32")] uint newval); + public static extern SDLBool SDL_CompareAndSwapAtomicU32(SDL_AtomicU32* a, [NativeTypeName("Uint32")] uint oldval, [NativeTypeName("Uint32")] uint newval); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("Uint32")] @@ -84,7 +84,7 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_CompareAndSwapAtomicPointer([NativeTypeName("void **")] IntPtr* a, [NativeTypeName("void*")] IntPtr oldval, [NativeTypeName("void*")] IntPtr newval); + public static extern SDLBool SDL_CompareAndSwapAtomicPointer([NativeTypeName("void **")] IntPtr* a, [NativeTypeName("void*")] IntPtr oldval, [NativeTypeName("void*")] IntPtr newval); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("void*")] diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_audio.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_audio.g.cs index b6bfcac..addb1b8 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_audio.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_audio.g.cs @@ -80,7 +80,7 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetAudioDeviceFormat(SDL_AudioDeviceID devid, SDL_AudioSpec* spec, int* sample_frames); + public static extern SDLBool SDL_GetAudioDeviceFormat(SDL_AudioDeviceID devid, SDL_AudioSpec* spec, int* sample_frames); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern int* SDL_GetAudioDeviceChannelMap(SDL_AudioDeviceID devid, int* count); @@ -90,33 +90,33 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_PauseAudioDevice(SDL_AudioDeviceID dev); + public static extern SDLBool SDL_PauseAudioDevice(SDL_AudioDeviceID dev); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_ResumeAudioDevice(SDL_AudioDeviceID dev); + public static extern SDLBool SDL_ResumeAudioDevice(SDL_AudioDeviceID dev); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_AudioDevicePaused(SDL_AudioDeviceID dev); + public static extern SDLBool SDL_AudioDevicePaused(SDL_AudioDeviceID dev); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern float SDL_GetAudioDeviceGain(SDL_AudioDeviceID devid); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetAudioDeviceGain(SDL_AudioDeviceID devid, float gain); + public static extern SDLBool SDL_SetAudioDeviceGain(SDL_AudioDeviceID devid, float gain); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_CloseAudioDevice(SDL_AudioDeviceID devid); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_BindAudioStreams(SDL_AudioDeviceID devid, SDL_AudioStream** streams, int num_streams); + public static extern SDLBool SDL_BindAudioStreams(SDL_AudioDeviceID devid, SDL_AudioStream** streams, int num_streams); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_BindAudioStream(SDL_AudioDeviceID devid, SDL_AudioStream* stream); + public static extern SDLBool SDL_BindAudioStream(SDL_AudioDeviceID devid, SDL_AudioStream* stream); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_UnbindAudioStreams(SDL_AudioStream** streams, int num_streams); @@ -135,25 +135,25 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetAudioStreamFormat(SDL_AudioStream* stream, SDL_AudioSpec* src_spec, SDL_AudioSpec* dst_spec); + public static extern SDLBool SDL_GetAudioStreamFormat(SDL_AudioStream* stream, SDL_AudioSpec* src_spec, SDL_AudioSpec* dst_spec); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetAudioStreamFormat(SDL_AudioStream* stream, [NativeTypeName("const SDL_AudioSpec *")] SDL_AudioSpec* src_spec, [NativeTypeName("const SDL_AudioSpec *")] SDL_AudioSpec* dst_spec); + public static extern SDLBool SDL_SetAudioStreamFormat(SDL_AudioStream* stream, [NativeTypeName("const SDL_AudioSpec *")] SDL_AudioSpec* src_spec, [NativeTypeName("const SDL_AudioSpec *")] SDL_AudioSpec* dst_spec); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern float SDL_GetAudioStreamFrequencyRatio(SDL_AudioStream* stream); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetAudioStreamFrequencyRatio(SDL_AudioStream* stream, float ratio); + public static extern SDLBool SDL_SetAudioStreamFrequencyRatio(SDL_AudioStream* stream, float ratio); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern float SDL_GetAudioStreamGain(SDL_AudioStream* stream); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetAudioStreamGain(SDL_AudioStream* stream, float gain); + public static extern SDLBool SDL_SetAudioStreamGain(SDL_AudioStream* stream, float gain); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern int* SDL_GetAudioStreamInputChannelMap(SDL_AudioStream* stream, int* count); @@ -163,15 +163,15 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetAudioStreamInputChannelMap(SDL_AudioStream* stream, [NativeTypeName("const int *")] int* chmap, int count); + public static extern SDLBool SDL_SetAudioStreamInputChannelMap(SDL_AudioStream* stream, [NativeTypeName("const int *")] int* chmap, int count); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetAudioStreamOutputChannelMap(SDL_AudioStream* stream, [NativeTypeName("const int *")] int* chmap, int count); + public static extern SDLBool SDL_SetAudioStreamOutputChannelMap(SDL_AudioStream* stream, [NativeTypeName("const int *")] int* chmap, int count); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_PutAudioStreamData(SDL_AudioStream* stream, [NativeTypeName("const void *")] IntPtr buf, int len); + public static extern SDLBool SDL_PutAudioStreamData(SDL_AudioStream* stream, [NativeTypeName("const void *")] IntPtr buf, int len); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern int SDL_GetAudioStreamData(SDL_AudioStream* stream, [NativeTypeName("void*")] IntPtr buf, int len); @@ -184,35 +184,35 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_FlushAudioStream(SDL_AudioStream* stream); + public static extern SDLBool SDL_FlushAudioStream(SDL_AudioStream* stream); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_ClearAudioStream(SDL_AudioStream* stream); + public static extern SDLBool SDL_ClearAudioStream(SDL_AudioStream* stream); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_PauseAudioStreamDevice(SDL_AudioStream* stream); + public static extern SDLBool SDL_PauseAudioStreamDevice(SDL_AudioStream* stream); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_ResumeAudioStreamDevice(SDL_AudioStream* stream); + public static extern SDLBool SDL_ResumeAudioStreamDevice(SDL_AudioStream* stream); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_LockAudioStream(SDL_AudioStream* stream); + public static extern SDLBool SDL_LockAudioStream(SDL_AudioStream* stream); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_UnlockAudioStream(SDL_AudioStream* stream); + public static extern SDLBool SDL_UnlockAudioStream(SDL_AudioStream* stream); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetAudioStreamGetCallback(SDL_AudioStream* stream, [NativeTypeName("SDL_AudioStreamCallback")] delegate* unmanaged[Cdecl] callback, [NativeTypeName("void*")] IntPtr userdata); + public static extern SDLBool SDL_SetAudioStreamGetCallback(SDL_AudioStream* stream, [NativeTypeName("SDL_AudioStreamCallback")] delegate* unmanaged[Cdecl] callback, [NativeTypeName("void*")] IntPtr userdata); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetAudioStreamPutCallback(SDL_AudioStream* stream, [NativeTypeName("SDL_AudioStreamCallback")] delegate* unmanaged[Cdecl] callback, [NativeTypeName("void*")] IntPtr userdata); + public static extern SDLBool SDL_SetAudioStreamPutCallback(SDL_AudioStream* stream, [NativeTypeName("SDL_AudioStreamCallback")] delegate* unmanaged[Cdecl] callback, [NativeTypeName("void*")] IntPtr userdata); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_DestroyAudioStream(SDL_AudioStream* stream); @@ -222,23 +222,23 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetAudioPostmixCallback(SDL_AudioDeviceID devid, [NativeTypeName("SDL_AudioPostmixCallback")] delegate* unmanaged[Cdecl] callback, [NativeTypeName("void*")] IntPtr userdata); + public static extern SDLBool SDL_SetAudioPostmixCallback(SDL_AudioDeviceID devid, [NativeTypeName("SDL_AudioPostmixCallback")] delegate* unmanaged[Cdecl] callback, [NativeTypeName("void*")] IntPtr userdata); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_LoadWAV_IO(SDL_IOStream* src, [NativeTypeName("bool")] byte closeio, SDL_AudioSpec* spec, [NativeTypeName("Uint8 **")] byte** audio_buf, [NativeTypeName("Uint32 *")] uint* audio_len); + public static extern SDLBool SDL_LoadWAV_IO(SDL_IOStream* src, [NativeTypeName("bool")] SDLBool closeio, SDL_AudioSpec* spec, [NativeTypeName("Uint8 **")] byte** audio_buf, [NativeTypeName("Uint32 *")] uint* audio_len); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_LoadWAV([NativeTypeName("const char *")] byte* path, SDL_AudioSpec* spec, [NativeTypeName("Uint8 **")] byte** audio_buf, [NativeTypeName("Uint32 *")] uint* audio_len); + public static extern SDLBool SDL_LoadWAV([NativeTypeName("const char *")] byte* path, SDL_AudioSpec* spec, [NativeTypeName("Uint8 **")] byte** audio_buf, [NativeTypeName("Uint32 *")] uint* audio_len); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_MixAudio([NativeTypeName("Uint8 *")] byte* dst, [NativeTypeName("const Uint8 *")] byte* src, SDL_AudioFormat format, [NativeTypeName("Uint32")] uint len, float volume); + public static extern SDLBool SDL_MixAudio([NativeTypeName("Uint8 *")] byte* dst, [NativeTypeName("const Uint8 *")] byte* src, SDL_AudioFormat format, [NativeTypeName("Uint32")] uint len, float volume); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_ConvertAudioSamples([NativeTypeName("const SDL_AudioSpec *")] SDL_AudioSpec* src_spec, [NativeTypeName("const Uint8 *")] byte* src_data, int src_len, [NativeTypeName("const SDL_AudioSpec *")] SDL_AudioSpec* dst_spec, [NativeTypeName("Uint8 **")] byte** dst_data, int* dst_len); + public static extern SDLBool SDL_ConvertAudioSamples([NativeTypeName("const SDL_AudioSpec *")] SDL_AudioSpec* src_spec, [NativeTypeName("const Uint8 *")] byte* src_data, int src_len, [NativeTypeName("const SDL_AudioSpec *")] SDL_AudioSpec* dst_spec, [NativeTypeName("Uint8 **")] byte** dst_data, int* dst_len); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetAudioFormatName", ExactSpelling = true)] [return: NativeTypeName("const char *")] diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_camera.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_camera.g.cs index 30202f3..062ecc6 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_camera.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_camera.g.cs @@ -93,7 +93,7 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetCameraFormat(SDL_Camera* camera, SDL_CameraSpec* spec); + public static extern SDLBool SDL_GetCameraFormat(SDL_Camera* camera, SDL_CameraSpec* spec); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_Surface* SDL_AcquireCameraFrame(SDL_Camera* camera, [NativeTypeName("Uint64 *")] ulong* timestampNS); diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_clipboard.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_clipboard.g.cs index 0d2113d..0f41d88 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_clipboard.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_clipboard.g.cs @@ -32,7 +32,7 @@ namespace SDL { [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetClipboardText([NativeTypeName("const char *")] byte* text); + public static extern SDLBool SDL_SetClipboardText([NativeTypeName("const char *")] byte* text); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetClipboardText", ExactSpelling = true)] [return: NativeTypeName("char *")] @@ -40,11 +40,11 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_HasClipboardText(); + public static extern SDLBool SDL_HasClipboardText(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetPrimarySelectionText([NativeTypeName("const char *")] byte* text); + public static extern SDLBool SDL_SetPrimarySelectionText([NativeTypeName("const char *")] byte* text); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetPrimarySelectionText", ExactSpelling = true)] [return: NativeTypeName("char *")] @@ -52,15 +52,15 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_HasPrimarySelectionText(); + public static extern SDLBool SDL_HasPrimarySelectionText(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetClipboardData([NativeTypeName("SDL_ClipboardDataCallback")] delegate* unmanaged[Cdecl] callback, [NativeTypeName("SDL_ClipboardCleanupCallback")] delegate* unmanaged[Cdecl] cleanup, [NativeTypeName("void*")] IntPtr userdata, [NativeTypeName("const char **")] byte** mime_types, [NativeTypeName("size_t")] nuint num_mime_types); + public static extern SDLBool SDL_SetClipboardData([NativeTypeName("SDL_ClipboardDataCallback")] delegate* unmanaged[Cdecl] callback, [NativeTypeName("SDL_ClipboardCleanupCallback")] delegate* unmanaged[Cdecl] cleanup, [NativeTypeName("void*")] IntPtr userdata, [NativeTypeName("const char **")] byte** mime_types, [NativeTypeName("size_t")] nuint num_mime_types); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_ClearClipboardData(); + public static extern SDLBool SDL_ClearClipboardData(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("void*")] @@ -68,6 +68,6 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_HasClipboardData([NativeTypeName("const char *")] byte* mime_type); + public static extern SDLBool SDL_HasClipboardData([NativeTypeName("const char *")] byte* mime_type); } } diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_cpuinfo.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_cpuinfo.g.cs index 7b480ae..88a70be 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_cpuinfo.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_cpuinfo.g.cs @@ -37,59 +37,59 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_HasAltiVec(); + public static extern SDLBool SDL_HasAltiVec(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_HasMMX(); + public static extern SDLBool SDL_HasMMX(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_HasSSE(); + public static extern SDLBool SDL_HasSSE(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_HasSSE2(); + public static extern SDLBool SDL_HasSSE2(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_HasSSE3(); + public static extern SDLBool SDL_HasSSE3(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_HasSSE41(); + public static extern SDLBool SDL_HasSSE41(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_HasSSE42(); + public static extern SDLBool SDL_HasSSE42(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_HasAVX(); + public static extern SDLBool SDL_HasAVX(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_HasAVX2(); + public static extern SDLBool SDL_HasAVX2(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_HasAVX512F(); + public static extern SDLBool SDL_HasAVX512F(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_HasARMSIMD(); + public static extern SDLBool SDL_HasARMSIMD(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_HasNEON(); + public static extern SDLBool SDL_HasNEON(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_HasLSX(); + public static extern SDLBool SDL_HasLSX(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_HasLASX(); + public static extern SDLBool SDL_HasLASX(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern int SDL_GetSystemRAM(); diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_dialog.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_dialog.g.cs index ef97f80..7109c6b 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_dialog.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_dialog.g.cs @@ -40,12 +40,12 @@ namespace SDL public static unsafe partial class SDL3 { [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void SDL_ShowOpenFileDialog([NativeTypeName("SDL_DialogFileCallback")] delegate* unmanaged[Cdecl] callback, [NativeTypeName("void*")] IntPtr userdata, SDL_Window* window, [NativeTypeName("const SDL_DialogFileFilter *")] SDL_DialogFileFilter* filters, int nfilters, [NativeTypeName("const char *")] byte* default_location, [NativeTypeName("bool")] byte allow_many); + public static extern void SDL_ShowOpenFileDialog([NativeTypeName("SDL_DialogFileCallback")] delegate* unmanaged[Cdecl] callback, [NativeTypeName("void*")] IntPtr userdata, SDL_Window* window, [NativeTypeName("const SDL_DialogFileFilter *")] SDL_DialogFileFilter* filters, int nfilters, [NativeTypeName("const char *")] byte* default_location, [NativeTypeName("bool")] SDLBool allow_many); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_ShowSaveFileDialog([NativeTypeName("SDL_DialogFileCallback")] delegate* unmanaged[Cdecl] callback, [NativeTypeName("void*")] IntPtr userdata, SDL_Window* window, [NativeTypeName("const SDL_DialogFileFilter *")] SDL_DialogFileFilter* filters, int nfilters, [NativeTypeName("const char *")] byte* default_location); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void SDL_ShowOpenFolderDialog([NativeTypeName("SDL_DialogFileCallback")] delegate* unmanaged[Cdecl] callback, [NativeTypeName("void*")] IntPtr userdata, SDL_Window* window, [NativeTypeName("const char *")] byte* default_location, [NativeTypeName("bool")] byte allow_many); + public static extern void SDL_ShowOpenFolderDialog([NativeTypeName("SDL_DialogFileCallback")] delegate* unmanaged[Cdecl] callback, [NativeTypeName("void*")] IntPtr userdata, SDL_Window* window, [NativeTypeName("const char *")] byte* default_location, [NativeTypeName("bool")] SDLBool allow_many); } } diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_error.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_error.g.cs index 5b63446..172beef 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_error.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_error.g.cs @@ -31,11 +31,11 @@ namespace SDL { [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetError([NativeTypeName("const char *")] byte* fmt, __arglist); + public static extern SDLBool SDL_SetError([NativeTypeName("const char *")] byte* fmt, __arglist); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_OutOfMemory(); + public static extern SDLBool SDL_OutOfMemory(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetError", ExactSpelling = true)] [return: NativeTypeName("const char *")] @@ -43,6 +43,6 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_ClearError(); + public static extern SDLBool SDL_ClearError(); } } diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_events.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_events.g.cs index bb77e95..d7957c6 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_events.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_events.g.cs @@ -232,10 +232,10 @@ namespace SDL public ushort raw; [NativeTypeName("bool")] - public byte down; + public SDLBool down; [NativeTypeName("bool")] - public byte repeat; + public SDLBool repeat; } public unsafe partial struct SDL_TextEditingEvent @@ -282,7 +282,7 @@ namespace SDL public int selected_candidate; [NativeTypeName("bool")] - public byte horizontal; + public SDLBool horizontal; [NativeTypeName("Uint8")] public byte padding1; @@ -366,7 +366,7 @@ namespace SDL public byte button; [NativeTypeName("bool")] - public byte down; + public SDLBool down; [NativeTypeName("Uint8")] public byte clicks; @@ -507,7 +507,7 @@ namespace SDL public byte button; [NativeTypeName("bool")] - public byte down; + public SDLBool down; [NativeTypeName("Uint8")] public byte padding1; @@ -593,7 +593,7 @@ namespace SDL public byte button; [NativeTypeName("bool")] - public byte down; + public SDLBool down; [NativeTypeName("Uint8")] public byte padding1; @@ -681,7 +681,7 @@ namespace SDL public SDL_AudioDeviceID which; [NativeTypeName("bool")] - public byte recording; + public SDLBool recording; [NativeTypeName("Uint8")] public byte padding1; @@ -790,10 +790,10 @@ namespace SDL public float y; [NativeTypeName("bool")] - public byte eraser; + public SDLBool eraser; [NativeTypeName("bool")] - public byte down; + public SDLBool down; } public partial struct SDL_PenButtonEvent @@ -820,7 +820,7 @@ namespace SDL public byte button; [NativeTypeName("bool")] - public byte down; + public SDLBool down; } public partial struct SDL_PenAxisEvent @@ -1084,11 +1084,11 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_HasEvent([NativeTypeName("Uint32")] uint type); + public static extern SDLBool SDL_HasEvent([NativeTypeName("Uint32")] uint type); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_HasEvents([NativeTypeName("Uint32")] uint minType, [NativeTypeName("Uint32")] uint maxType); + public static extern SDLBool SDL_HasEvents([NativeTypeName("Uint32")] uint minType, [NativeTypeName("Uint32")] uint maxType); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_FlushEvent([NativeTypeName("Uint32")] uint type); @@ -1098,43 +1098,43 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_PollEvent(SDL_Event* @event); + public static extern SDLBool SDL_PollEvent(SDL_Event* @event); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_WaitEvent(SDL_Event* @event); + public static extern SDLBool SDL_WaitEvent(SDL_Event* @event); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_WaitEventTimeout(SDL_Event* @event, [NativeTypeName("Sint32")] int timeoutMS); + public static extern SDLBool SDL_WaitEventTimeout(SDL_Event* @event, [NativeTypeName("Sint32")] int timeoutMS); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_PushEvent(SDL_Event* @event); + public static extern SDLBool SDL_PushEvent(SDL_Event* @event); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void SDL_SetEventFilter([NativeTypeName("SDL_EventFilter")] delegate* unmanaged[Cdecl] filter, [NativeTypeName("void*")] IntPtr userdata); + public static extern void SDL_SetEventFilter([NativeTypeName("SDL_EventFilter")] delegate* unmanaged[Cdecl] filter, [NativeTypeName("void*")] IntPtr userdata); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetEventFilter([NativeTypeName("SDL_EventFilter *")] delegate* unmanaged[Cdecl]* filter, [NativeTypeName("void **")] IntPtr* userdata); + public static extern SDLBool SDL_GetEventFilter([NativeTypeName("SDL_EventFilter *")] delegate* unmanaged[Cdecl]* filter, [NativeTypeName("void **")] IntPtr* userdata); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_AddEventWatch([NativeTypeName("SDL_EventFilter")] delegate* unmanaged[Cdecl] filter, [NativeTypeName("void*")] IntPtr userdata); + public static extern SDLBool SDL_AddEventWatch([NativeTypeName("SDL_EventFilter")] delegate* unmanaged[Cdecl] filter, [NativeTypeName("void*")] IntPtr userdata); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void SDL_RemoveEventWatch([NativeTypeName("SDL_EventFilter")] delegate* unmanaged[Cdecl] filter, [NativeTypeName("void*")] IntPtr userdata); + public static extern void SDL_RemoveEventWatch([NativeTypeName("SDL_EventFilter")] delegate* unmanaged[Cdecl] filter, [NativeTypeName("void*")] IntPtr userdata); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void SDL_FilterEvents([NativeTypeName("SDL_EventFilter")] delegate* unmanaged[Cdecl] filter, [NativeTypeName("void*")] IntPtr userdata); + public static extern void SDL_FilterEvents([NativeTypeName("SDL_EventFilter")] delegate* unmanaged[Cdecl] filter, [NativeTypeName("void*")] IntPtr userdata); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void SDL_SetEventEnabled([NativeTypeName("Uint32")] uint type, [NativeTypeName("bool")] byte enabled); + public static extern void SDL_SetEventEnabled([NativeTypeName("Uint32")] uint type, [NativeTypeName("bool")] SDLBool enabled); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_EventEnabled([NativeTypeName("Uint32")] uint type); + public static extern SDLBool SDL_EventEnabled([NativeTypeName("Uint32")] uint type); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("Uint32")] diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_filesystem.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_filesystem.g.cs index 15048d1..9648af1 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_filesystem.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_filesystem.g.cs @@ -82,27 +82,27 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_CreateDirectory([NativeTypeName("const char *")] byte* path); + public static extern SDLBool SDL_CreateDirectory([NativeTypeName("const char *")] byte* path); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_EnumerateDirectory([NativeTypeName("const char *")] byte* path, [NativeTypeName("SDL_EnumerateDirectoryCallback")] delegate* unmanaged[Cdecl] callback, [NativeTypeName("void*")] IntPtr userdata); + public static extern SDLBool SDL_EnumerateDirectory([NativeTypeName("const char *")] byte* path, [NativeTypeName("SDL_EnumerateDirectoryCallback")] delegate* unmanaged[Cdecl] callback, [NativeTypeName("void*")] IntPtr userdata); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_RemovePath([NativeTypeName("const char *")] byte* path); + public static extern SDLBool SDL_RemovePath([NativeTypeName("const char *")] byte* path); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_RenamePath([NativeTypeName("const char *")] byte* oldpath, [NativeTypeName("const char *")] byte* newpath); + public static extern SDLBool SDL_RenamePath([NativeTypeName("const char *")] byte* oldpath, [NativeTypeName("const char *")] byte* newpath); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_CopyFile([NativeTypeName("const char *")] byte* oldpath, [NativeTypeName("const char *")] byte* newpath); + public static extern SDLBool SDL_CopyFile([NativeTypeName("const char *")] byte* oldpath, [NativeTypeName("const char *")] byte* newpath); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetPathInfo([NativeTypeName("const char *")] byte* path, SDL_PathInfo* info); + public static extern SDLBool SDL_GetPathInfo([NativeTypeName("const char *")] byte* path, SDL_PathInfo* info); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("char **")] diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_gamepad.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_gamepad.g.cs index 1c93dd7..906e827 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_gamepad.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_gamepad.g.cs @@ -183,14 +183,14 @@ namespace SDL public static extern int SDL_AddGamepadMapping([NativeTypeName("const char *")] byte* mapping); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern int SDL_AddGamepadMappingsFromIO(SDL_IOStream* src, [NativeTypeName("bool")] byte closeio); + public static extern int SDL_AddGamepadMappingsFromIO(SDL_IOStream* src, [NativeTypeName("bool")] SDLBool closeio); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern int SDL_AddGamepadMappingsFromFile([NativeTypeName("const char *")] byte* file); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_ReloadGamepadMappings(); + public static extern SDLBool SDL_ReloadGamepadMappings(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("char **")] @@ -206,18 +206,18 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetGamepadMapping(SDL_JoystickID instance_id, [NativeTypeName("const char *")] byte* mapping); + public static extern SDLBool SDL_SetGamepadMapping(SDL_JoystickID instance_id, [NativeTypeName("const char *")] byte* mapping); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_HasGamepad(); + public static extern SDLBool SDL_HasGamepad(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_JoystickID* SDL_GetGamepads(int* count); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_IsGamepad(SDL_JoystickID instance_id); + public static extern SDLBool SDL_IsGamepad(SDL_JoystickID instance_id); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetGamepadNameForID", ExactSpelling = true)] [return: NativeTypeName("const char *")] @@ -289,7 +289,7 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetGamepadPlayerIndex(SDL_Gamepad* gamepad, int player_index); + public static extern SDLBool SDL_SetGamepadPlayerIndex(SDL_Gamepad* gamepad, int player_index); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("Uint16")] @@ -323,17 +323,17 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GamepadConnected(SDL_Gamepad* gamepad); + public static extern SDLBool SDL_GamepadConnected(SDL_Gamepad* gamepad); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_Joystick* SDL_GetGamepadJoystick(SDL_Gamepad* gamepad); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void SDL_SetGamepadEventsEnabled([NativeTypeName("bool")] byte enabled); + public static extern void SDL_SetGamepadEventsEnabled([NativeTypeName("bool")] SDLBool enabled); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GamepadEventsEnabled(); + public static extern SDLBool SDL_GamepadEventsEnabled(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_GamepadBinding** SDL_GetGamepadBindings(SDL_Gamepad* gamepad, int* count); @@ -357,7 +357,7 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GamepadHasAxis(SDL_Gamepad* gamepad, SDL_GamepadAxis axis); + public static extern SDLBool SDL_GamepadHasAxis(SDL_Gamepad* gamepad, SDL_GamepadAxis axis); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("Sint16")] @@ -372,11 +372,11 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GamepadHasButton(SDL_Gamepad* gamepad, SDL_GamepadButton button); + public static extern SDLBool SDL_GamepadHasButton(SDL_Gamepad* gamepad, SDL_GamepadButton button); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetGamepadButton(SDL_Gamepad* gamepad, SDL_GamepadButton button); + public static extern SDLBool SDL_GetGamepadButton(SDL_Gamepad* gamepad, SDL_GamepadButton button); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_GamepadButtonLabel SDL_GetGamepadButtonLabelForType(SDL_GamepadType type, SDL_GamepadButton button); @@ -392,42 +392,42 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetGamepadTouchpadFinger(SDL_Gamepad* gamepad, int touchpad, int finger, bool* down, float* x, float* y, float* pressure); + public static extern SDLBool SDL_GetGamepadTouchpadFinger(SDL_Gamepad* gamepad, int touchpad, int finger, [NativeTypeName("bool *")] SDLBool* down, float* x, float* y, float* pressure); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GamepadHasSensor(SDL_Gamepad* gamepad, SDL_SensorType type); + public static extern SDLBool SDL_GamepadHasSensor(SDL_Gamepad* gamepad, SDL_SensorType type); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetGamepadSensorEnabled(SDL_Gamepad* gamepad, SDL_SensorType type, [NativeTypeName("bool")] byte enabled); + public static extern SDLBool SDL_SetGamepadSensorEnabled(SDL_Gamepad* gamepad, SDL_SensorType type, [NativeTypeName("bool")] SDLBool enabled); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GamepadSensorEnabled(SDL_Gamepad* gamepad, SDL_SensorType type); + public static extern SDLBool SDL_GamepadSensorEnabled(SDL_Gamepad* gamepad, SDL_SensorType type); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern float SDL_GetGamepadSensorDataRate(SDL_Gamepad* gamepad, SDL_SensorType type); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetGamepadSensorData(SDL_Gamepad* gamepad, SDL_SensorType type, float* data, int num_values); + public static extern SDLBool SDL_GetGamepadSensorData(SDL_Gamepad* gamepad, SDL_SensorType type, float* data, int num_values); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_RumbleGamepad(SDL_Gamepad* gamepad, [NativeTypeName("Uint16")] ushort low_frequency_rumble, [NativeTypeName("Uint16")] ushort high_frequency_rumble, [NativeTypeName("Uint32")] uint duration_ms); + public static extern SDLBool SDL_RumbleGamepad(SDL_Gamepad* gamepad, [NativeTypeName("Uint16")] ushort low_frequency_rumble, [NativeTypeName("Uint16")] ushort high_frequency_rumble, [NativeTypeName("Uint32")] uint duration_ms); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_RumbleGamepadTriggers(SDL_Gamepad* gamepad, [NativeTypeName("Uint16")] ushort left_rumble, [NativeTypeName("Uint16")] ushort right_rumble, [NativeTypeName("Uint32")] uint duration_ms); + public static extern SDLBool SDL_RumbleGamepadTriggers(SDL_Gamepad* gamepad, [NativeTypeName("Uint16")] ushort left_rumble, [NativeTypeName("Uint16")] ushort right_rumble, [NativeTypeName("Uint32")] uint duration_ms); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetGamepadLED(SDL_Gamepad* gamepad, [NativeTypeName("Uint8")] byte red, [NativeTypeName("Uint8")] byte green, [NativeTypeName("Uint8")] byte blue); + public static extern SDLBool SDL_SetGamepadLED(SDL_Gamepad* gamepad, [NativeTypeName("Uint8")] byte red, [NativeTypeName("Uint8")] byte green, [NativeTypeName("Uint8")] byte blue); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SendGamepadEffect(SDL_Gamepad* gamepad, [NativeTypeName("const void *")] IntPtr data, int size); + public static extern SDLBool SDL_SendGamepadEffect(SDL_Gamepad* gamepad, [NativeTypeName("const void *")] IntPtr data, int size); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_CloseGamepad(SDL_Gamepad* gamepad); diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_gpu.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_gpu.g.cs index 0b4c0c4..60b46a2 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_gpu.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_gpu.g.cs @@ -556,10 +556,10 @@ namespace SDL public float max_lod; [NativeTypeName("bool")] - public byte enable_anisotropy; + public SDLBool enable_anisotropy; [NativeTypeName("bool")] - public byte enable_compare; + public SDLBool enable_compare; [NativeTypeName("Uint8")] public byte padding1; @@ -641,10 +641,10 @@ namespace SDL public SDL_GPUColorComponentFlags color_write_mask; [NativeTypeName("bool")] - public byte enable_blend; + public SDLBool enable_blend; [NativeTypeName("bool")] - public byte enable_color_write_mask; + public SDLBool enable_color_write_mask; [NativeTypeName("Uint8")] public byte padding2; @@ -743,7 +743,7 @@ namespace SDL public float depth_bias_slope_factor; [NativeTypeName("bool")] - public byte enable_depth_bias; + public SDLBool enable_depth_bias; [NativeTypeName("Uint8")] public byte padding1; @@ -763,7 +763,7 @@ namespace SDL public uint sample_mask; [NativeTypeName("bool")] - public byte enable_mask; + public SDLBool enable_mask; [NativeTypeName("Uint8")] public byte padding1; @@ -790,13 +790,13 @@ namespace SDL public byte write_mask; [NativeTypeName("bool")] - public byte enable_depth_test; + public SDLBool enable_depth_test; [NativeTypeName("bool")] - public byte enable_depth_write; + public SDLBool enable_depth_write; [NativeTypeName("bool")] - public byte enable_stencil_test; + public SDLBool enable_stencil_test; [NativeTypeName("Uint8")] public byte padding1; @@ -826,7 +826,7 @@ namespace SDL public SDL_GPUTextureFormat depth_stencil_format; [NativeTypeName("bool")] - public byte has_depth_stencil_target; + public SDLBool has_depth_stencil_target; [NativeTypeName("Uint8")] public byte padding1; @@ -927,10 +927,10 @@ namespace SDL public uint resolve_layer; [NativeTypeName("bool")] - public byte cycle; + public SDLBool cycle; [NativeTypeName("bool")] - public byte cycle_resolve_texture; + public SDLBool cycle_resolve_texture; [NativeTypeName("Uint8")] public byte padding1; @@ -954,7 +954,7 @@ namespace SDL public SDL_GPUStoreOp stencil_store_op; [NativeTypeName("bool")] - public byte cycle; + public SDLBool cycle; [NativeTypeName("Uint8")] public byte clear_stencil; @@ -981,7 +981,7 @@ namespace SDL public SDL_GPUFilter filter; [NativeTypeName("bool")] - public byte cycle; + public SDLBool cycle; [NativeTypeName("Uint8")] public byte padding1; @@ -1013,7 +1013,7 @@ namespace SDL public SDL_GPUBuffer* buffer; [NativeTypeName("bool")] - public byte cycle; + public SDLBool cycle; [NativeTypeName("Uint8")] public byte padding1; @@ -1036,7 +1036,7 @@ namespace SDL public uint layer; [NativeTypeName("bool")] - public byte cycle; + public SDLBool cycle; [NativeTypeName("Uint8")] public byte padding1; @@ -1052,14 +1052,14 @@ namespace SDL { [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GPUSupportsShaderFormats(SDL_GPUShaderFormat format_flags, [NativeTypeName("const char *")] byte* name); + public static extern SDLBool SDL_GPUSupportsShaderFormats(SDL_GPUShaderFormat format_flags, [NativeTypeName("const char *")] byte* name); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GPUSupportsProperties(SDL_PropertiesID props); + public static extern SDLBool SDL_GPUSupportsProperties(SDL_PropertiesID props); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_GPUDevice* SDL_CreateGPUDevice(SDL_GPUShaderFormat format_flags, [NativeTypeName("bool")] byte debug_mode, [NativeTypeName("const char *")] byte* name); + public static extern SDL_GPUDevice* SDL_CreateGPUDevice(SDL_GPUShaderFormat format_flags, [NativeTypeName("bool")] SDLBool debug_mode, [NativeTypeName("const char *")] byte* name); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_GPUDevice* SDL_CreateGPUDeviceWithProperties(SDL_PropertiesID props); @@ -1233,7 +1233,7 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("void*")] - public static extern IntPtr SDL_MapGPUTransferBuffer(SDL_GPUDevice* device, SDL_GPUTransferBuffer* transfer_buffer, [NativeTypeName("bool")] byte cycle); + public static extern IntPtr SDL_MapGPUTransferBuffer(SDL_GPUDevice* device, SDL_GPUTransferBuffer* transfer_buffer, [NativeTypeName("bool")] SDLBool cycle); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_UnmapGPUTransferBuffer(SDL_GPUDevice* device, SDL_GPUTransferBuffer* transfer_buffer); @@ -1242,16 +1242,16 @@ namespace SDL public static extern SDL_GPUCopyPass* SDL_BeginGPUCopyPass(SDL_GPUCommandBuffer* command_buffer); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void SDL_UploadToGPUTexture(SDL_GPUCopyPass* copy_pass, [NativeTypeName("const SDL_GPUTextureTransferInfo *")] SDL_GPUTextureTransferInfo* source, [NativeTypeName("const SDL_GPUTextureRegion *")] SDL_GPUTextureRegion* destination, [NativeTypeName("bool")] byte cycle); + public static extern void SDL_UploadToGPUTexture(SDL_GPUCopyPass* copy_pass, [NativeTypeName("const SDL_GPUTextureTransferInfo *")] SDL_GPUTextureTransferInfo* source, [NativeTypeName("const SDL_GPUTextureRegion *")] SDL_GPUTextureRegion* destination, [NativeTypeName("bool")] SDLBool cycle); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void SDL_UploadToGPUBuffer(SDL_GPUCopyPass* copy_pass, [NativeTypeName("const SDL_GPUTransferBufferLocation *")] SDL_GPUTransferBufferLocation* source, [NativeTypeName("const SDL_GPUBufferRegion *")] SDL_GPUBufferRegion* destination, [NativeTypeName("bool")] byte cycle); + public static extern void SDL_UploadToGPUBuffer(SDL_GPUCopyPass* copy_pass, [NativeTypeName("const SDL_GPUTransferBufferLocation *")] SDL_GPUTransferBufferLocation* source, [NativeTypeName("const SDL_GPUBufferRegion *")] SDL_GPUBufferRegion* destination, [NativeTypeName("bool")] SDLBool cycle); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void SDL_CopyGPUTextureToTexture(SDL_GPUCopyPass* copy_pass, [NativeTypeName("const SDL_GPUTextureLocation *")] SDL_GPUTextureLocation* source, [NativeTypeName("const SDL_GPUTextureLocation *")] SDL_GPUTextureLocation* destination, [NativeTypeName("Uint32")] uint w, [NativeTypeName("Uint32")] uint h, [NativeTypeName("Uint32")] uint d, [NativeTypeName("bool")] byte cycle); + public static extern void SDL_CopyGPUTextureToTexture(SDL_GPUCopyPass* copy_pass, [NativeTypeName("const SDL_GPUTextureLocation *")] SDL_GPUTextureLocation* source, [NativeTypeName("const SDL_GPUTextureLocation *")] SDL_GPUTextureLocation* destination, [NativeTypeName("Uint32")] uint w, [NativeTypeName("Uint32")] uint h, [NativeTypeName("Uint32")] uint d, [NativeTypeName("bool")] SDLBool cycle); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void SDL_CopyGPUBufferToBuffer(SDL_GPUCopyPass* copy_pass, [NativeTypeName("const SDL_GPUBufferLocation *")] SDL_GPUBufferLocation* source, [NativeTypeName("const SDL_GPUBufferLocation *")] SDL_GPUBufferLocation* destination, [NativeTypeName("Uint32")] uint size, [NativeTypeName("bool")] byte cycle); + public static extern void SDL_CopyGPUBufferToBuffer(SDL_GPUCopyPass* copy_pass, [NativeTypeName("const SDL_GPUBufferLocation *")] SDL_GPUBufferLocation* source, [NativeTypeName("const SDL_GPUBufferLocation *")] SDL_GPUBufferLocation* destination, [NativeTypeName("Uint32")] uint size, [NativeTypeName("bool")] SDLBool cycle); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_DownloadFromGPUTexture(SDL_GPUCopyPass* copy_pass, [NativeTypeName("const SDL_GPUTextureRegion *")] SDL_GPUTextureRegion* source, [NativeTypeName("const SDL_GPUTextureTransferInfo *")] SDL_GPUTextureTransferInfo* destination); @@ -1270,22 +1270,22 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_WindowSupportsGPUSwapchainComposition(SDL_GPUDevice* device, SDL_Window* window, SDL_GPUSwapchainComposition swapchain_composition); + public static extern SDLBool SDL_WindowSupportsGPUSwapchainComposition(SDL_GPUDevice* device, SDL_Window* window, SDL_GPUSwapchainComposition swapchain_composition); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_WindowSupportsGPUPresentMode(SDL_GPUDevice* device, SDL_Window* window, SDL_GPUPresentMode present_mode); + public static extern SDLBool SDL_WindowSupportsGPUPresentMode(SDL_GPUDevice* device, SDL_Window* window, SDL_GPUPresentMode present_mode); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_ClaimWindowForGPUDevice(SDL_GPUDevice* device, SDL_Window* window); + public static extern SDLBool SDL_ClaimWindowForGPUDevice(SDL_GPUDevice* device, SDL_Window* window); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_ReleaseWindowFromGPUDevice(SDL_GPUDevice* device, SDL_Window* window); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetGPUSwapchainParameters(SDL_GPUDevice* device, SDL_Window* window, SDL_GPUSwapchainComposition swapchain_composition, SDL_GPUPresentMode present_mode); + public static extern SDLBool SDL_SetGPUSwapchainParameters(SDL_GPUDevice* device, SDL_Window* window, SDL_GPUSwapchainComposition swapchain_composition, SDL_GPUPresentMode present_mode); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_GPUTextureFormat SDL_GetGPUSwapchainTextureFormat(SDL_GPUDevice* device, SDL_Window* window); @@ -1303,11 +1303,11 @@ namespace SDL public static extern void SDL_WaitForGPUIdle(SDL_GPUDevice* device); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void SDL_WaitForGPUFences(SDL_GPUDevice* device, [NativeTypeName("bool")] byte wait_all, [NativeTypeName("SDL_GPUFence *const *")] SDL_GPUFence** fences, [NativeTypeName("Uint32")] uint num_fences); + public static extern void SDL_WaitForGPUFences(SDL_GPUDevice* device, [NativeTypeName("bool")] SDLBool wait_all, [NativeTypeName("SDL_GPUFence *const *")] SDL_GPUFence** fences, [NativeTypeName("Uint32")] uint num_fences); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_QueryGPUFence(SDL_GPUDevice* device, SDL_GPUFence* fence); + public static extern SDLBool SDL_QueryGPUFence(SDL_GPUDevice* device, SDL_GPUFence* fence); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_ReleaseGPUFence(SDL_GPUDevice* device, SDL_GPUFence* fence); @@ -1318,11 +1318,11 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GPUTextureSupportsFormat(SDL_GPUDevice* device, SDL_GPUTextureFormat format, SDL_GPUTextureType type, SDL_GPUTextureUsageFlags usage); + public static extern SDLBool SDL_GPUTextureSupportsFormat(SDL_GPUDevice* device, SDL_GPUTextureFormat format, SDL_GPUTextureType type, SDL_GPUTextureUsageFlags usage); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GPUTextureSupportsSampleCount(SDL_GPUDevice* device, SDL_GPUTextureFormat format, SDL_GPUSampleCount sample_count); + public static extern SDLBool SDL_GPUTextureSupportsSampleCount(SDL_GPUDevice* device, SDL_GPUTextureFormat format, SDL_GPUSampleCount sample_count); [NativeTypeName("#define SDL_GPU_TEXTUREUSAGE_SAMPLER (1u << 0)")] public const uint SDL_GPU_TEXTUREUSAGE_SAMPLER = (1U << 0); diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_haptic.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_haptic.g.cs index 0cd0d7a..0d99b1f 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_haptic.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_haptic.g.cs @@ -347,14 +347,14 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_IsMouseHaptic(); + public static extern SDLBool SDL_IsMouseHaptic(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_Haptic* SDL_OpenHapticFromMouse(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_IsJoystickHaptic(SDL_Joystick* joystick); + public static extern SDLBool SDL_IsJoystickHaptic(SDL_Joystick* joystick); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_Haptic* SDL_OpenHapticFromJoystick(SDL_Joystick* joystick); @@ -377,65 +377,65 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_HapticEffectSupported(SDL_Haptic* haptic, [NativeTypeName("const SDL_HapticEffect *")] SDL_HapticEffect* effect); + public static extern SDLBool SDL_HapticEffectSupported(SDL_Haptic* haptic, [NativeTypeName("const SDL_HapticEffect *")] SDL_HapticEffect* effect); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern int SDL_CreateHapticEffect(SDL_Haptic* haptic, [NativeTypeName("const SDL_HapticEffect *")] SDL_HapticEffect* effect); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_UpdateHapticEffect(SDL_Haptic* haptic, int effect, [NativeTypeName("const SDL_HapticEffect *")] SDL_HapticEffect* data); + public static extern SDLBool SDL_UpdateHapticEffect(SDL_Haptic* haptic, int effect, [NativeTypeName("const SDL_HapticEffect *")] SDL_HapticEffect* data); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_RunHapticEffect(SDL_Haptic* haptic, int effect, [NativeTypeName("Uint32")] uint iterations); + public static extern SDLBool SDL_RunHapticEffect(SDL_Haptic* haptic, int effect, [NativeTypeName("Uint32")] uint iterations); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_StopHapticEffect(SDL_Haptic* haptic, int effect); + public static extern SDLBool SDL_StopHapticEffect(SDL_Haptic* haptic, int effect); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_DestroyHapticEffect(SDL_Haptic* haptic, int effect); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetHapticEffectStatus(SDL_Haptic* haptic, int effect); + public static extern SDLBool SDL_GetHapticEffectStatus(SDL_Haptic* haptic, int effect); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetHapticGain(SDL_Haptic* haptic, int gain); + public static extern SDLBool SDL_SetHapticGain(SDL_Haptic* haptic, int gain); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetHapticAutocenter(SDL_Haptic* haptic, int autocenter); + public static extern SDLBool SDL_SetHapticAutocenter(SDL_Haptic* haptic, int autocenter); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_PauseHaptic(SDL_Haptic* haptic); + public static extern SDLBool SDL_PauseHaptic(SDL_Haptic* haptic); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_ResumeHaptic(SDL_Haptic* haptic); + public static extern SDLBool SDL_ResumeHaptic(SDL_Haptic* haptic); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_StopHapticEffects(SDL_Haptic* haptic); + public static extern SDLBool SDL_StopHapticEffects(SDL_Haptic* haptic); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_HapticRumbleSupported(SDL_Haptic* haptic); + public static extern SDLBool SDL_HapticRumbleSupported(SDL_Haptic* haptic); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_InitHapticRumble(SDL_Haptic* haptic); + public static extern SDLBool SDL_InitHapticRumble(SDL_Haptic* haptic); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_PlayHapticRumble(SDL_Haptic* haptic, float strength, [NativeTypeName("Uint32")] uint length); + public static extern SDLBool SDL_PlayHapticRumble(SDL_Haptic* haptic, float strength, [NativeTypeName("Uint32")] uint length); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_StopHapticRumble(SDL_Haptic* haptic); + public static extern SDLBool SDL_StopHapticRumble(SDL_Haptic* haptic); [NativeTypeName("#define SDL_HAPTIC_CONSTANT (1u<<0)")] public const uint SDL_HAPTIC_CONSTANT = (1U << 0); diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_hidapi.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_hidapi.g.cs index 1f0ad45..31a3b66 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_hidapi.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_hidapi.g.cs @@ -151,6 +151,6 @@ namespace SDL public static extern int SDL_hid_get_report_descriptor(SDL_hid_device* dev, [NativeTypeName("unsigned char *")] byte* buf, [NativeTypeName("size_t")] nuint buf_size); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void SDL_hid_ble_scan([NativeTypeName("bool")] byte active); + public static extern void SDL_hid_ble_scan([NativeTypeName("bool")] SDLBool active); } } diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_hints.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_hints.g.cs index 582fb04..23cb17f 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_hints.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_hints.g.cs @@ -39,15 +39,15 @@ namespace SDL { [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetHintWithPriority([NativeTypeName("const char *")] byte* name, [NativeTypeName("const char *")] byte* value, SDL_HintPriority priority); + public static extern SDLBool SDL_SetHintWithPriority([NativeTypeName("const char *")] byte* name, [NativeTypeName("const char *")] byte* value, SDL_HintPriority priority); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetHint([NativeTypeName("const char *")] byte* name, [NativeTypeName("const char *")] byte* value); + public static extern SDLBool SDL_SetHint([NativeTypeName("const char *")] byte* name, [NativeTypeName("const char *")] byte* value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_ResetHint([NativeTypeName("const char *")] byte* name); + public static extern SDLBool SDL_ResetHint([NativeTypeName("const char *")] byte* name); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_ResetHints(); @@ -58,11 +58,11 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetHintBoolean([NativeTypeName("const char *")] byte* name, [NativeTypeName("bool")] byte default_value); + public static extern SDLBool SDL_GetHintBoolean([NativeTypeName("const char *")] byte* name, [NativeTypeName("bool")] SDLBool default_value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_AddHintCallback([NativeTypeName("const char *")] byte* name, [NativeTypeName("SDL_HintCallback")] delegate* unmanaged[Cdecl] callback, [NativeTypeName("void*")] IntPtr userdata); + public static extern SDLBool SDL_AddHintCallback([NativeTypeName("const char *")] byte* name, [NativeTypeName("SDL_HintCallback")] delegate* unmanaged[Cdecl] callback, [NativeTypeName("void*")] IntPtr userdata); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_RemoveHintCallback([NativeTypeName("const char *")] byte* name, [NativeTypeName("SDL_HintCallback")] delegate* unmanaged[Cdecl] callback, [NativeTypeName("void*")] IntPtr userdata); diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_init.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_init.g.cs index 5f31c69..058bf20 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_init.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_init.g.cs @@ -39,11 +39,11 @@ namespace SDL { [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_Init(SDL_InitFlags flags); + public static extern SDLBool SDL_Init(SDL_InitFlags flags); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_InitSubSystem(SDL_InitFlags flags); + public static extern SDLBool SDL_InitSubSystem(SDL_InitFlags flags); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_QuitSubSystem(SDL_InitFlags flags); @@ -56,11 +56,11 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetAppMetadata([NativeTypeName("const char *")] byte* appname, [NativeTypeName("const char *")] byte* appversion, [NativeTypeName("const char *")] byte* appidentifier); + public static extern SDLBool SDL_SetAppMetadata([NativeTypeName("const char *")] byte* appname, [NativeTypeName("const char *")] byte* appversion, [NativeTypeName("const char *")] byte* appidentifier); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetAppMetadataProperty([NativeTypeName("const char *")] byte* name, [NativeTypeName("const char *")] byte* value); + public static extern SDLBool SDL_SetAppMetadataProperty([NativeTypeName("const char *")] byte* name, [NativeTypeName("const char *")] byte* value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetAppMetadataProperty", ExactSpelling = true)] [return: NativeTypeName("const char *")] diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_iostream.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_iostream.g.cs index c51d8a5..8ac25ca 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_iostream.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_iostream.g.cs @@ -63,10 +63,10 @@ namespace SDL public delegate* unmanaged[Cdecl] write; [NativeTypeName("bool (*)(void *, SDL_IOStatus *)")] - public delegate* unmanaged[Cdecl] flush; + public delegate* unmanaged[Cdecl] flush; [NativeTypeName("bool (*)(void *)")] - public delegate* unmanaged[Cdecl] close; + public delegate* unmanaged[Cdecl] close; } public partial struct SDL_IOStream @@ -92,7 +92,7 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_CloseIO(SDL_IOStream* context); + public static extern SDLBool SDL_CloseIO(SDL_IOStream* context); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_PropertiesID SDL_GetIOProperties(SDL_IOStream* context); @@ -130,11 +130,11 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_FlushIO(SDL_IOStream* context); + public static extern SDLBool SDL_FlushIO(SDL_IOStream* context); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("void*")] - public static extern IntPtr SDL_LoadFile_IO(SDL_IOStream* src, [NativeTypeName("size_t *")] nuint* datasize, [NativeTypeName("bool")] byte closeio); + public static extern IntPtr SDL_LoadFile_IO(SDL_IOStream* src, [NativeTypeName("size_t *")] nuint* datasize, [NativeTypeName("bool")] SDLBool closeio); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("void*")] @@ -142,115 +142,115 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_ReadU8(SDL_IOStream* src, [NativeTypeName("Uint8 *")] byte* value); + public static extern SDLBool SDL_ReadU8(SDL_IOStream* src, [NativeTypeName("Uint8 *")] byte* value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_ReadS8(SDL_IOStream* src, [NativeTypeName("Sint8 *")] sbyte* value); + public static extern SDLBool SDL_ReadS8(SDL_IOStream* src, [NativeTypeName("Sint8 *")] sbyte* value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_ReadU16LE(SDL_IOStream* src, [NativeTypeName("Uint16 *")] ushort* value); + public static extern SDLBool SDL_ReadU16LE(SDL_IOStream* src, [NativeTypeName("Uint16 *")] ushort* value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_ReadS16LE(SDL_IOStream* src, [NativeTypeName("Sint16 *")] short* value); + public static extern SDLBool SDL_ReadS16LE(SDL_IOStream* src, [NativeTypeName("Sint16 *")] short* value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_ReadU16BE(SDL_IOStream* src, [NativeTypeName("Uint16 *")] ushort* value); + public static extern SDLBool SDL_ReadU16BE(SDL_IOStream* src, [NativeTypeName("Uint16 *")] ushort* value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_ReadS16BE(SDL_IOStream* src, [NativeTypeName("Sint16 *")] short* value); + public static extern SDLBool SDL_ReadS16BE(SDL_IOStream* src, [NativeTypeName("Sint16 *")] short* value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_ReadU32LE(SDL_IOStream* src, [NativeTypeName("Uint32 *")] uint* value); + public static extern SDLBool SDL_ReadU32LE(SDL_IOStream* src, [NativeTypeName("Uint32 *")] uint* value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_ReadS32LE(SDL_IOStream* src, [NativeTypeName("Sint32 *")] int* value); + public static extern SDLBool SDL_ReadS32LE(SDL_IOStream* src, [NativeTypeName("Sint32 *")] int* value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_ReadU32BE(SDL_IOStream* src, [NativeTypeName("Uint32 *")] uint* value); + public static extern SDLBool SDL_ReadU32BE(SDL_IOStream* src, [NativeTypeName("Uint32 *")] uint* value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_ReadS32BE(SDL_IOStream* src, [NativeTypeName("Sint32 *")] int* value); + public static extern SDLBool SDL_ReadS32BE(SDL_IOStream* src, [NativeTypeName("Sint32 *")] int* value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_ReadU64LE(SDL_IOStream* src, [NativeTypeName("Uint64 *")] ulong* value); + public static extern SDLBool SDL_ReadU64LE(SDL_IOStream* src, [NativeTypeName("Uint64 *")] ulong* value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_ReadS64LE(SDL_IOStream* src, [NativeTypeName("Sint64 *")] long* value); + public static extern SDLBool SDL_ReadS64LE(SDL_IOStream* src, [NativeTypeName("Sint64 *")] long* value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_ReadU64BE(SDL_IOStream* src, [NativeTypeName("Uint64 *")] ulong* value); + public static extern SDLBool SDL_ReadU64BE(SDL_IOStream* src, [NativeTypeName("Uint64 *")] ulong* value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_ReadS64BE(SDL_IOStream* src, [NativeTypeName("Sint64 *")] long* value); + public static extern SDLBool SDL_ReadS64BE(SDL_IOStream* src, [NativeTypeName("Sint64 *")] long* value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_WriteU8(SDL_IOStream* dst, [NativeTypeName("Uint8")] byte value); + public static extern SDLBool SDL_WriteU8(SDL_IOStream* dst, [NativeTypeName("Uint8")] byte value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_WriteS8(SDL_IOStream* dst, [NativeTypeName("Sint8")] sbyte value); + public static extern SDLBool SDL_WriteS8(SDL_IOStream* dst, [NativeTypeName("Sint8")] sbyte value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_WriteU16LE(SDL_IOStream* dst, [NativeTypeName("Uint16")] ushort value); + public static extern SDLBool SDL_WriteU16LE(SDL_IOStream* dst, [NativeTypeName("Uint16")] ushort value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_WriteS16LE(SDL_IOStream* dst, [NativeTypeName("Sint16")] short value); + public static extern SDLBool SDL_WriteS16LE(SDL_IOStream* dst, [NativeTypeName("Sint16")] short value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_WriteU16BE(SDL_IOStream* dst, [NativeTypeName("Uint16")] ushort value); + public static extern SDLBool SDL_WriteU16BE(SDL_IOStream* dst, [NativeTypeName("Uint16")] ushort value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_WriteS16BE(SDL_IOStream* dst, [NativeTypeName("Sint16")] short value); + public static extern SDLBool SDL_WriteS16BE(SDL_IOStream* dst, [NativeTypeName("Sint16")] short value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_WriteU32LE(SDL_IOStream* dst, [NativeTypeName("Uint32")] uint value); + public static extern SDLBool SDL_WriteU32LE(SDL_IOStream* dst, [NativeTypeName("Uint32")] uint value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_WriteS32LE(SDL_IOStream* dst, [NativeTypeName("Sint32")] int value); + public static extern SDLBool SDL_WriteS32LE(SDL_IOStream* dst, [NativeTypeName("Sint32")] int value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_WriteU32BE(SDL_IOStream* dst, [NativeTypeName("Uint32")] uint value); + public static extern SDLBool SDL_WriteU32BE(SDL_IOStream* dst, [NativeTypeName("Uint32")] uint value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_WriteS32BE(SDL_IOStream* dst, [NativeTypeName("Sint32")] int value); + public static extern SDLBool SDL_WriteS32BE(SDL_IOStream* dst, [NativeTypeName("Sint32")] int value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_WriteU64LE(SDL_IOStream* dst, [NativeTypeName("Uint64")] ulong value); + public static extern SDLBool SDL_WriteU64LE(SDL_IOStream* dst, [NativeTypeName("Uint64")] ulong value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_WriteS64LE(SDL_IOStream* dst, [NativeTypeName("Sint64")] long value); + public static extern SDLBool SDL_WriteS64LE(SDL_IOStream* dst, [NativeTypeName("Sint64")] long value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_WriteU64BE(SDL_IOStream* dst, [NativeTypeName("Uint64")] ulong value); + public static extern SDLBool SDL_WriteU64BE(SDL_IOStream* dst, [NativeTypeName("Uint64")] ulong value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_WriteS64BE(SDL_IOStream* dst, [NativeTypeName("Sint64")] long value); + public static extern SDLBool SDL_WriteS64BE(SDL_IOStream* dst, [NativeTypeName("Sint64")] long value); [NativeTypeName("#define SDL_PROP_IOSTREAM_WINDOWS_HANDLE_POINTER \"SDL.iostream.windows.handle\"")] public static ReadOnlySpan SDL_PROP_IOSTREAM_WINDOWS_HANDLE_POINTER => "SDL.iostream.windows.handle"u8; diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_joystick.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_joystick.g.cs index 3b2b430..e1f2c7b 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_joystick.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_joystick.g.cs @@ -141,19 +141,19 @@ namespace SDL public delegate* unmanaged[Cdecl] SetPlayerIndex; [NativeTypeName("bool (*)(void *, Uint16, Uint16)")] - public delegate* unmanaged[Cdecl] Rumble; + public delegate* unmanaged[Cdecl] Rumble; [NativeTypeName("bool (*)(void *, Uint16, Uint16)")] - public delegate* unmanaged[Cdecl] RumbleTriggers; + public delegate* unmanaged[Cdecl] RumbleTriggers; [NativeTypeName("bool (*)(void *, Uint8, Uint8, Uint8)")] - public delegate* unmanaged[Cdecl] SetLED; + public delegate* unmanaged[Cdecl] SetLED; [NativeTypeName("bool (*)(void *, const void *, int)")] - public delegate* unmanaged[Cdecl] SendEffect; + public delegate* unmanaged[Cdecl] SendEffect; [NativeTypeName("bool (*)(void *, bool)")] - public delegate* unmanaged[Cdecl] SetSensorsEnabled; + public delegate* unmanaged[Cdecl] SetSensorsEnabled; [NativeTypeName("void (*)(void *)")] public delegate* unmanaged[Cdecl] Cleanup; @@ -175,7 +175,7 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_HasJoystick(); + public static extern SDLBool SDL_HasJoystick(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_JoystickID* SDL_GetJoysticks(int* count); @@ -223,35 +223,35 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_DetachVirtualJoystick(SDL_JoystickID instance_id); + public static extern SDLBool SDL_DetachVirtualJoystick(SDL_JoystickID instance_id); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_IsJoystickVirtual(SDL_JoystickID instance_id); + public static extern SDLBool SDL_IsJoystickVirtual(SDL_JoystickID instance_id); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetJoystickVirtualAxis(SDL_Joystick* joystick, int axis, [NativeTypeName("Sint16")] short value); + public static extern SDLBool SDL_SetJoystickVirtualAxis(SDL_Joystick* joystick, int axis, [NativeTypeName("Sint16")] short value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetJoystickVirtualBall(SDL_Joystick* joystick, int ball, [NativeTypeName("Sint16")] short xrel, [NativeTypeName("Sint16")] short yrel); + public static extern SDLBool SDL_SetJoystickVirtualBall(SDL_Joystick* joystick, int ball, [NativeTypeName("Sint16")] short xrel, [NativeTypeName("Sint16")] short yrel); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetJoystickVirtualButton(SDL_Joystick* joystick, int button, [NativeTypeName("bool")] byte down); + public static extern SDLBool SDL_SetJoystickVirtualButton(SDL_Joystick* joystick, int button, [NativeTypeName("bool")] SDLBool down); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetJoystickVirtualHat(SDL_Joystick* joystick, int hat, [NativeTypeName("Uint8")] byte value); + public static extern SDLBool SDL_SetJoystickVirtualHat(SDL_Joystick* joystick, int hat, [NativeTypeName("Uint8")] byte value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetJoystickVirtualTouchpad(SDL_Joystick* joystick, int touchpad, int finger, [NativeTypeName("bool")] byte down, float x, float y, float pressure); + public static extern SDLBool SDL_SetJoystickVirtualTouchpad(SDL_Joystick* joystick, int touchpad, int finger, [NativeTypeName("bool")] SDLBool down, float x, float y, float pressure); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SendJoystickVirtualSensorData(SDL_Joystick* joystick, SDL_SensorType type, [NativeTypeName("Uint64")] ulong sensor_timestamp, [NativeTypeName("const float *")] float* data, int num_values); + public static extern SDLBool SDL_SendJoystickVirtualSensorData(SDL_Joystick* joystick, SDL_SensorType type, [NativeTypeName("Uint64")] ulong sensor_timestamp, [NativeTypeName("const float *")] float* data, int num_values); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_PropertiesID SDL_GetJoystickProperties(SDL_Joystick* joystick); @@ -269,7 +269,7 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetJoystickPlayerIndex(SDL_Joystick* joystick, int player_index); + public static extern SDLBool SDL_SetJoystickPlayerIndex(SDL_Joystick* joystick, int player_index); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_GUID SDL_GetJoystickGUID(SDL_Joystick* joystick); @@ -302,7 +302,7 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_JoystickConnected(SDL_Joystick* joystick); + public static extern SDLBool SDL_JoystickConnected(SDL_Joystick* joystick); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_JoystickID SDL_GetJoystickID(SDL_Joystick* joystick); @@ -320,11 +320,11 @@ namespace SDL public static extern int SDL_GetNumJoystickButtons(SDL_Joystick* joystick); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void SDL_SetJoystickEventsEnabled([NativeTypeName("bool")] byte enabled); + public static extern void SDL_SetJoystickEventsEnabled([NativeTypeName("bool")] SDLBool enabled); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_JoystickEventsEnabled(); + public static extern SDLBool SDL_JoystickEventsEnabled(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_UpdateJoysticks(); @@ -335,11 +335,11 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetJoystickAxisInitialState(SDL_Joystick* joystick, int axis, [NativeTypeName("Sint16 *")] short* state); + public static extern SDLBool SDL_GetJoystickAxisInitialState(SDL_Joystick* joystick, int axis, [NativeTypeName("Sint16 *")] short* state); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetJoystickBall(SDL_Joystick* joystick, int ball, int* dx, int* dy); + public static extern SDLBool SDL_GetJoystickBall(SDL_Joystick* joystick, int ball, int* dx, int* dy); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("Uint8")] @@ -347,23 +347,23 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetJoystickButton(SDL_Joystick* joystick, int button); + public static extern SDLBool SDL_GetJoystickButton(SDL_Joystick* joystick, int button); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_RumbleJoystick(SDL_Joystick* joystick, [NativeTypeName("Uint16")] ushort low_frequency_rumble, [NativeTypeName("Uint16")] ushort high_frequency_rumble, [NativeTypeName("Uint32")] uint duration_ms); + public static extern SDLBool SDL_RumbleJoystick(SDL_Joystick* joystick, [NativeTypeName("Uint16")] ushort low_frequency_rumble, [NativeTypeName("Uint16")] ushort high_frequency_rumble, [NativeTypeName("Uint32")] uint duration_ms); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_RumbleJoystickTriggers(SDL_Joystick* joystick, [NativeTypeName("Uint16")] ushort left_rumble, [NativeTypeName("Uint16")] ushort right_rumble, [NativeTypeName("Uint32")] uint duration_ms); + public static extern SDLBool SDL_RumbleJoystickTriggers(SDL_Joystick* joystick, [NativeTypeName("Uint16")] ushort left_rumble, [NativeTypeName("Uint16")] ushort right_rumble, [NativeTypeName("Uint32")] uint duration_ms); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetJoystickLED(SDL_Joystick* joystick, [NativeTypeName("Uint8")] byte red, [NativeTypeName("Uint8")] byte green, [NativeTypeName("Uint8")] byte blue); + public static extern SDLBool SDL_SetJoystickLED(SDL_Joystick* joystick, [NativeTypeName("Uint8")] byte red, [NativeTypeName("Uint8")] byte green, [NativeTypeName("Uint8")] byte blue); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SendJoystickEffect(SDL_Joystick* joystick, [NativeTypeName("const void *")] IntPtr data, int size); + public static extern SDLBool SDL_SendJoystickEffect(SDL_Joystick* joystick, [NativeTypeName("const void *")] IntPtr data, int size); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_CloseJoystick(SDL_Joystick* joystick); diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_keyboard.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_keyboard.g.cs index 066feb9..f92b67f 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_keyboard.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_keyboard.g.cs @@ -53,7 +53,7 @@ namespace SDL { [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_HasKeyboard(); + public static extern SDLBool SDL_HasKeyboard(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_KeyboardID* SDL_GetKeyboards(int* count); @@ -67,7 +67,7 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("const bool *")] - public static extern bool* SDL_GetKeyboardState(int* numkeys); + public static extern SDLBool* SDL_GetKeyboardState(int* numkeys); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_ResetKeyboard(); @@ -79,14 +79,14 @@ namespace SDL public static extern void SDL_SetModState(SDL_Keymod modstate); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_Keycode SDL_GetKeyFromScancode(SDL_Scancode scancode, SDL_Keymod modstate, [NativeTypeName("bool")] byte key_event); + public static extern SDL_Keycode SDL_GetKeyFromScancode(SDL_Scancode scancode, SDL_Keymod modstate, [NativeTypeName("bool")] SDLBool key_event); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_Scancode SDL_GetScancodeFromKey(SDL_Keycode key, SDL_Keymod* modstate); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetScancodeName(SDL_Scancode scancode, [NativeTypeName("const char *")] byte* name); + public static extern SDLBool SDL_SetScancodeName(SDL_Scancode scancode, [NativeTypeName("const char *")] byte* name); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetScancodeName", ExactSpelling = true)] [return: NativeTypeName("const char *")] @@ -104,39 +104,39 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_StartTextInput(SDL_Window* window); + public static extern SDLBool SDL_StartTextInput(SDL_Window* window); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_StartTextInputWithProperties(SDL_Window* window, SDL_PropertiesID props); + public static extern SDLBool SDL_StartTextInputWithProperties(SDL_Window* window, SDL_PropertiesID props); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_TextInputActive(SDL_Window* window); + public static extern SDLBool SDL_TextInputActive(SDL_Window* window); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_StopTextInput(SDL_Window* window); + public static extern SDLBool SDL_StopTextInput(SDL_Window* window); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_ClearComposition(SDL_Window* window); + public static extern SDLBool SDL_ClearComposition(SDL_Window* window); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetTextInputArea(SDL_Window* window, [NativeTypeName("const SDL_Rect *")] SDL_Rect* rect, int cursor); + public static extern SDLBool SDL_SetTextInputArea(SDL_Window* window, [NativeTypeName("const SDL_Rect *")] SDL_Rect* rect, int cursor); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetTextInputArea(SDL_Window* window, SDL_Rect* rect, int* cursor); + public static extern SDLBool SDL_GetTextInputArea(SDL_Window* window, SDL_Rect* rect, int* cursor); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_HasScreenKeyboardSupport(); + public static extern SDLBool SDL_HasScreenKeyboardSupport(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_ScreenKeyboardShown(SDL_Window* window); + public static extern SDLBool SDL_ScreenKeyboardShown(SDL_Window* window); [NativeTypeName("#define SDL_PROP_TEXTINPUT_TYPE_NUMBER \"SDL.textinput.type\"")] public static ReadOnlySpan SDL_PROP_TEXTINPUT_TYPE_NUMBER => "SDL.textinput.type"u8; diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_log.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_log.g.cs index 80c803a..fe5d1b7 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_log.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_log.g.cs @@ -81,7 +81,7 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetLogPriorityPrefix(SDL_LogPriority priority, [NativeTypeName("const char *")] byte* prefix); + public static extern SDLBool SDL_SetLogPriorityPrefix(SDL_LogPriority priority, [NativeTypeName("const char *")] byte* prefix); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_Log([NativeTypeName("const char *")] byte* fmt, __arglist); diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_main.Windows.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_main.Windows.g.cs index 9e8a2eb..ded252e 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_main.Windows.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_main.Windows.g.cs @@ -34,7 +34,7 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] [SupportedOSPlatform("Windows")] - public static extern byte SDL_RegisterApp([NativeTypeName("const char *")] byte* name, [NativeTypeName("Uint32")] uint style, [NativeTypeName("void*")] IntPtr hInst); + public static extern SDLBool SDL_RegisterApp([NativeTypeName("const char *")] byte* name, [NativeTypeName("Uint32")] uint style, [NativeTypeName("void*")] IntPtr hInst); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [SupportedOSPlatform("Windows")] diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_messagebox.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_messagebox.g.cs index 55229e4..3313d0f 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_messagebox.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_messagebox.g.cs @@ -97,11 +97,11 @@ namespace SDL { [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_ShowMessageBox([NativeTypeName("const SDL_MessageBoxData *")] SDL_MessageBoxData* messageboxdata, int* buttonid); + public static extern SDLBool SDL_ShowMessageBox([NativeTypeName("const SDL_MessageBoxData *")] SDL_MessageBoxData* messageboxdata, int* buttonid); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_ShowSimpleMessageBox(SDL_MessageBoxFlags flags, [NativeTypeName("const char *")] byte* title, [NativeTypeName("const char *")] byte* message, SDL_Window* window); + public static extern SDLBool SDL_ShowSimpleMessageBox(SDL_MessageBoxFlags flags, [NativeTypeName("const char *")] byte* title, [NativeTypeName("const char *")] byte* message, SDL_Window* window); [NativeTypeName("#define SDL_MESSAGEBOX_ERROR 0x00000010u")] public const uint SDL_MESSAGEBOX_ERROR = 0x00000010U; diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_misc.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_misc.g.cs index a8cbeb2..f370ab7 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_misc.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_misc.g.cs @@ -31,6 +31,6 @@ namespace SDL { [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_OpenURL([NativeTypeName("const char *")] byte* url); + public static extern SDLBool SDL_OpenURL([NativeTypeName("const char *")] byte* url); } } diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_mouse.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_mouse.g.cs index 4bf1a43..995ec0d 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_mouse.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_mouse.g.cs @@ -66,7 +66,7 @@ namespace SDL { [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_HasMouse(); + public static extern SDLBool SDL_HasMouse(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_MouseID* SDL_GetMice(int* count); @@ -92,19 +92,19 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_WarpMouseGlobal(float x, float y); + public static extern SDLBool SDL_WarpMouseGlobal(float x, float y); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetWindowRelativeMouseMode(SDL_Window* window, [NativeTypeName("bool")] byte enabled); + public static extern SDLBool SDL_SetWindowRelativeMouseMode(SDL_Window* window, [NativeTypeName("bool")] SDLBool enabled); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetWindowRelativeMouseMode(SDL_Window* window); + public static extern SDLBool SDL_GetWindowRelativeMouseMode(SDL_Window* window); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_CaptureMouse([NativeTypeName("bool")] byte enabled); + public static extern SDLBool SDL_CaptureMouse([NativeTypeName("bool")] SDLBool enabled); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_Cursor* SDL_CreateCursor([NativeTypeName("const Uint8 *")] byte* data, [NativeTypeName("const Uint8 *")] byte* mask, int w, int h, int hot_x, int hot_y); @@ -117,7 +117,7 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetCursor(SDL_Cursor* cursor); + public static extern SDLBool SDL_SetCursor(SDL_Cursor* cursor); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_Cursor* SDL_GetCursor(); @@ -130,15 +130,15 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_ShowCursor(); + public static extern SDLBool SDL_ShowCursor(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_HideCursor(); + public static extern SDLBool SDL_HideCursor(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_CursorVisible(); + public static extern SDLBool SDL_CursorVisible(); [NativeTypeName("#define SDL_BUTTON_LEFT 1")] public const int SDL_BUTTON_LEFT = 1; diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_mutex.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_mutex.g.cs index 6af74fa..355c23e 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_mutex.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_mutex.g.cs @@ -53,7 +53,7 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_TryLockMutex(SDL_Mutex* mutex); + public static extern SDLBool SDL_TryLockMutex(SDL_Mutex* mutex); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_UnlockMutex(SDL_Mutex* mutex); @@ -72,11 +72,11 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_TryLockRWLockForReading(SDL_RWLock* rwlock); + public static extern SDLBool SDL_TryLockRWLockForReading(SDL_RWLock* rwlock); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_TryLockRWLockForWriting(SDL_RWLock* rwlock); + public static extern SDLBool SDL_TryLockRWLockForWriting(SDL_RWLock* rwlock); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_UnlockRWLock(SDL_RWLock* rwlock); @@ -95,11 +95,11 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_TryWaitSemaphore(SDL_Semaphore* sem); + public static extern SDLBool SDL_TryWaitSemaphore(SDL_Semaphore* sem); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_WaitSemaphoreTimeout(SDL_Semaphore* sem, [NativeTypeName("Sint32")] int timeoutMS); + public static extern SDLBool SDL_WaitSemaphoreTimeout(SDL_Semaphore* sem, [NativeTypeName("Sint32")] int timeoutMS); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_SignalSemaphore(SDL_Semaphore* sem); @@ -125,6 +125,6 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_WaitConditionTimeout(SDL_Condition* cond, SDL_Mutex* mutex, [NativeTypeName("Sint32")] int timeoutMS); + public static extern SDLBool SDL_WaitConditionTimeout(SDL_Condition* cond, SDL_Mutex* mutex, [NativeTypeName("Sint32")] int timeoutMS); } } diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_pixels.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_pixels.g.cs index 1dd0792..44faf9b 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_pixels.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_pixels.g.cs @@ -360,7 +360,7 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetMasksForPixelFormat(SDL_PixelFormat format, int* bpp, [NativeTypeName("Uint32 *")] uint* Rmask, [NativeTypeName("Uint32 *")] uint* Gmask, [NativeTypeName("Uint32 *")] uint* Bmask, [NativeTypeName("Uint32 *")] uint* Amask); + public static extern SDLBool SDL_GetMasksForPixelFormat(SDL_PixelFormat format, int* bpp, [NativeTypeName("Uint32 *")] uint* Rmask, [NativeTypeName("Uint32 *")] uint* Gmask, [NativeTypeName("Uint32 *")] uint* Bmask, [NativeTypeName("Uint32 *")] uint* Amask); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_PixelFormat SDL_GetPixelFormatForMasks(int bpp, [NativeTypeName("Uint32")] uint Rmask, [NativeTypeName("Uint32")] uint Gmask, [NativeTypeName("Uint32")] uint Bmask, [NativeTypeName("Uint32")] uint Amask); @@ -374,7 +374,7 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetPaletteColors(SDL_Palette* palette, [NativeTypeName("const SDL_Color *")] SDL_Color* colors, int firstcolor, int ncolors); + public static extern SDLBool SDL_SetPaletteColors(SDL_Palette* palette, [NativeTypeName("const SDL_Color *")] SDL_Color* colors, int firstcolor, int ncolors); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_DestroyPalette(SDL_Palette* palette); diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_process.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_process.g.cs index b9b691d..1d3e3df 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_process.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_process.g.cs @@ -43,7 +43,7 @@ namespace SDL public static unsafe partial class SDL3 { [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_Process* SDL_CreateProcess([NativeTypeName("const char *const *")] byte** args, [NativeTypeName("bool")] byte pipe_stdio); + public static extern SDL_Process* SDL_CreateProcess([NativeTypeName("const char *const *")] byte** args, [NativeTypeName("bool")] SDLBool pipe_stdio); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_Process* SDL_CreateProcessWithProperties(SDL_PropertiesID props); @@ -63,11 +63,11 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_KillProcess(SDL_Process* process, [NativeTypeName("bool")] byte force); + public static extern SDLBool SDL_KillProcess(SDL_Process* process, [NativeTypeName("bool")] SDLBool force); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_WaitProcess(SDL_Process* process, [NativeTypeName("bool")] byte block, int* exitcode); + public static extern SDLBool SDL_WaitProcess(SDL_Process* process, [NativeTypeName("bool")] SDLBool block, int* exitcode); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_DestroyProcess(SDL_Process* process); diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_properties.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_properties.g.cs index 2446c10..dee34c9 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_properties.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_properties.g.cs @@ -48,42 +48,42 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_CopyProperties(SDL_PropertiesID src, SDL_PropertiesID dst); + public static extern SDLBool SDL_CopyProperties(SDL_PropertiesID src, SDL_PropertiesID dst); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_LockProperties(SDL_PropertiesID props); + public static extern SDLBool SDL_LockProperties(SDL_PropertiesID props); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_UnlockProperties(SDL_PropertiesID props); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetPointerPropertyWithCleanup(SDL_PropertiesID props, [NativeTypeName("const char *")] byte* name, [NativeTypeName("void*")] IntPtr value, [NativeTypeName("SDL_CleanupPropertyCallback")] delegate* unmanaged[Cdecl] cleanup, [NativeTypeName("void*")] IntPtr userdata); + public static extern SDLBool SDL_SetPointerPropertyWithCleanup(SDL_PropertiesID props, [NativeTypeName("const char *")] byte* name, [NativeTypeName("void*")] IntPtr value, [NativeTypeName("SDL_CleanupPropertyCallback")] delegate* unmanaged[Cdecl] cleanup, [NativeTypeName("void*")] IntPtr userdata); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetPointerProperty(SDL_PropertiesID props, [NativeTypeName("const char *")] byte* name, [NativeTypeName("void*")] IntPtr value); + public static extern SDLBool SDL_SetPointerProperty(SDL_PropertiesID props, [NativeTypeName("const char *")] byte* name, [NativeTypeName("void*")] IntPtr value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetStringProperty(SDL_PropertiesID props, [NativeTypeName("const char *")] byte* name, [NativeTypeName("const char *")] byte* value); + public static extern SDLBool SDL_SetStringProperty(SDL_PropertiesID props, [NativeTypeName("const char *")] byte* name, [NativeTypeName("const char *")] byte* value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetNumberProperty(SDL_PropertiesID props, [NativeTypeName("const char *")] byte* name, [NativeTypeName("Sint64")] long value); + public static extern SDLBool SDL_SetNumberProperty(SDL_PropertiesID props, [NativeTypeName("const char *")] byte* name, [NativeTypeName("Sint64")] long value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetFloatProperty(SDL_PropertiesID props, [NativeTypeName("const char *")] byte* name, float value); + public static extern SDLBool SDL_SetFloatProperty(SDL_PropertiesID props, [NativeTypeName("const char *")] byte* name, float value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetBooleanProperty(SDL_PropertiesID props, [NativeTypeName("const char *")] byte* name, [NativeTypeName("bool")] byte value); + public static extern SDLBool SDL_SetBooleanProperty(SDL_PropertiesID props, [NativeTypeName("const char *")] byte* name, [NativeTypeName("bool")] SDLBool value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_HasProperty(SDL_PropertiesID props, [NativeTypeName("const char *")] byte* name); + public static extern SDLBool SDL_HasProperty(SDL_PropertiesID props, [NativeTypeName("const char *")] byte* name); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_PropertyType SDL_GetPropertyType(SDL_PropertiesID props, [NativeTypeName("const char *")] byte* name); @@ -105,15 +105,15 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetBooleanProperty(SDL_PropertiesID props, [NativeTypeName("const char *")] byte* name, [NativeTypeName("bool")] byte default_value); + public static extern SDLBool SDL_GetBooleanProperty(SDL_PropertiesID props, [NativeTypeName("const char *")] byte* name, [NativeTypeName("bool")] SDLBool default_value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_ClearProperty(SDL_PropertiesID props, [NativeTypeName("const char *")] byte* name); + public static extern SDLBool SDL_ClearProperty(SDL_PropertiesID props, [NativeTypeName("const char *")] byte* name); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_EnumerateProperties(SDL_PropertiesID props, [NativeTypeName("SDL_EnumeratePropertiesCallback")] delegate* unmanaged[Cdecl] callback, [NativeTypeName("void*")] IntPtr userdata); + public static extern SDLBool SDL_EnumerateProperties(SDL_PropertiesID props, [NativeTypeName("SDL_EnumeratePropertiesCallback")] delegate* unmanaged[Cdecl] callback, [NativeTypeName("void*")] IntPtr userdata); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_DestroyProperties(SDL_PropertiesID props); diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_rect.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_rect.g.cs index 19a3f29..f4db088 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_rect.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_rect.g.cs @@ -73,79 +73,86 @@ namespace SDL frect->h = (float)(rect->h); } - public static bool SDL_PointInRect([NativeTypeName("const SDL_Point *")] SDL_Point* p, [NativeTypeName("const SDL_Rect *")] SDL_Rect* r) + [return: NativeTypeName("bool")] + public static SDLBool SDL_PointInRect([NativeTypeName("const SDL_Point *")] SDL_Point* p, [NativeTypeName("const SDL_Rect *")] SDL_Rect* r) { return ((p) != null && (r) != null && (p->x >= r->x) && (p->x < (r->x + r->w)) && (p->y >= r->y) && (p->y < (r->y + r->h))) ? true : false; } - public static bool SDL_RectEmpty([NativeTypeName("const SDL_Rect *")] SDL_Rect* r) + [return: NativeTypeName("bool")] + public static SDLBool SDL_RectEmpty([NativeTypeName("const SDL_Rect *")] SDL_Rect* r) { return ((r == null) || (r->w <= 0) || (r->h <= 0)) ? true : false; } - public static bool SDL_RectsEqual([NativeTypeName("const SDL_Rect *")] SDL_Rect* a, [NativeTypeName("const SDL_Rect *")] SDL_Rect* b) + [return: NativeTypeName("bool")] + public static SDLBool SDL_RectsEqual([NativeTypeName("const SDL_Rect *")] SDL_Rect* a, [NativeTypeName("const SDL_Rect *")] SDL_Rect* b) { return ((a) != null && (b) != null && (a->x == b->x) && (a->y == b->y) && (a->w == b->w) && (a->h == b->h)) ? true : false; } [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_HasRectIntersection([NativeTypeName("const SDL_Rect *")] SDL_Rect* A, [NativeTypeName("const SDL_Rect *")] SDL_Rect* B); + public static extern SDLBool SDL_HasRectIntersection([NativeTypeName("const SDL_Rect *")] SDL_Rect* A, [NativeTypeName("const SDL_Rect *")] SDL_Rect* B); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetRectIntersection([NativeTypeName("const SDL_Rect *")] SDL_Rect* A, [NativeTypeName("const SDL_Rect *")] SDL_Rect* B, SDL_Rect* result); + public static extern SDLBool SDL_GetRectIntersection([NativeTypeName("const SDL_Rect *")] SDL_Rect* A, [NativeTypeName("const SDL_Rect *")] SDL_Rect* B, SDL_Rect* result); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetRectUnion([NativeTypeName("const SDL_Rect *")] SDL_Rect* A, [NativeTypeName("const SDL_Rect *")] SDL_Rect* B, SDL_Rect* result); + public static extern SDLBool SDL_GetRectUnion([NativeTypeName("const SDL_Rect *")] SDL_Rect* A, [NativeTypeName("const SDL_Rect *")] SDL_Rect* B, SDL_Rect* result); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetRectEnclosingPoints([NativeTypeName("const SDL_Point *")] SDL_Point* points, int count, [NativeTypeName("const SDL_Rect *")] SDL_Rect* clip, SDL_Rect* result); + public static extern SDLBool SDL_GetRectEnclosingPoints([NativeTypeName("const SDL_Point *")] SDL_Point* points, int count, [NativeTypeName("const SDL_Rect *")] SDL_Rect* clip, SDL_Rect* result); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetRectAndLineIntersection([NativeTypeName("const SDL_Rect *")] SDL_Rect* rect, int* X1, int* Y1, int* X2, int* Y2); + public static extern SDLBool SDL_GetRectAndLineIntersection([NativeTypeName("const SDL_Rect *")] SDL_Rect* rect, int* X1, int* Y1, int* X2, int* Y2); - public static bool SDL_PointInRectFloat([NativeTypeName("const SDL_FPoint *")] SDL_FPoint* p, [NativeTypeName("const SDL_FRect *")] SDL_FRect* r) + [return: NativeTypeName("bool")] + public static SDLBool SDL_PointInRectFloat([NativeTypeName("const SDL_FPoint *")] SDL_FPoint* p, [NativeTypeName("const SDL_FRect *")] SDL_FRect* r) { return ((p) != null && (r) != null && (p->x >= r->x) && (p->x <= (r->x + r->w)) && (p->y >= r->y) && (p->y <= (r->y + r->h))) ? true : false; } - public static bool SDL_RectEmptyFloat([NativeTypeName("const SDL_FRect *")] SDL_FRect* r) + [return: NativeTypeName("bool")] + public static SDLBool SDL_RectEmptyFloat([NativeTypeName("const SDL_FRect *")] SDL_FRect* r) { return ((r == null) || (r->w < 0.0f) || (r->h < 0.0f)) ? true : false; } - public static bool SDL_RectsEqualEpsilon([NativeTypeName("const SDL_FRect *")] SDL_FRect* a, [NativeTypeName("const SDL_FRect *")] SDL_FRect* b, [NativeTypeName("const float")] float epsilon) + [return: NativeTypeName("bool")] + public static SDLBool SDL_RectsEqualEpsilon([NativeTypeName("const SDL_FRect *")] SDL_FRect* a, [NativeTypeName("const SDL_FRect *")] SDL_FRect* b, [NativeTypeName("const float")] float epsilon) { return ((a) != null && (b) != null && ((a == b) || ((SDL_fabsf(a->x - b->x) <= epsilon) && (SDL_fabsf(a->y - b->y) <= epsilon) && (SDL_fabsf(a->w - b->w) <= epsilon) && (SDL_fabsf(a->h - b->h) <= epsilon)))) ? true : false; } - public static bool SDL_RectsEqualFloat([NativeTypeName("const SDL_FRect *")] SDL_FRect* a, [NativeTypeName("const SDL_FRect *")] SDL_FRect* b) + [return: NativeTypeName("bool")] + public static SDLBool SDL_RectsEqualFloat([NativeTypeName("const SDL_FRect *")] SDL_FRect* a, [NativeTypeName("const SDL_FRect *")] SDL_FRect* b) { return SDL_RectsEqualEpsilon(a, b, 1.1920928955078125e-07F); } [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_HasRectIntersectionFloat([NativeTypeName("const SDL_FRect *")] SDL_FRect* A, [NativeTypeName("const SDL_FRect *")] SDL_FRect* B); + public static extern SDLBool SDL_HasRectIntersectionFloat([NativeTypeName("const SDL_FRect *")] SDL_FRect* A, [NativeTypeName("const SDL_FRect *")] SDL_FRect* B); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetRectIntersectionFloat([NativeTypeName("const SDL_FRect *")] SDL_FRect* A, [NativeTypeName("const SDL_FRect *")] SDL_FRect* B, SDL_FRect* result); + public static extern SDLBool SDL_GetRectIntersectionFloat([NativeTypeName("const SDL_FRect *")] SDL_FRect* A, [NativeTypeName("const SDL_FRect *")] SDL_FRect* B, SDL_FRect* result); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetRectUnionFloat([NativeTypeName("const SDL_FRect *")] SDL_FRect* A, [NativeTypeName("const SDL_FRect *")] SDL_FRect* B, SDL_FRect* result); + public static extern SDLBool SDL_GetRectUnionFloat([NativeTypeName("const SDL_FRect *")] SDL_FRect* A, [NativeTypeName("const SDL_FRect *")] SDL_FRect* B, SDL_FRect* result); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetRectEnclosingPointsFloat([NativeTypeName("const SDL_FPoint *")] SDL_FPoint* points, int count, [NativeTypeName("const SDL_FRect *")] SDL_FRect* clip, SDL_FRect* result); + public static extern SDLBool SDL_GetRectEnclosingPointsFloat([NativeTypeName("const SDL_FPoint *")] SDL_FPoint* points, int count, [NativeTypeName("const SDL_FRect *")] SDL_FRect* clip, SDL_FRect* result); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetRectAndLineIntersectionFloat([NativeTypeName("const SDL_FRect *")] SDL_FRect* rect, float* X1, float* Y1, float* X2, float* Y2); + public static extern SDLBool SDL_GetRectAndLineIntersectionFloat([NativeTypeName("const SDL_FRect *")] SDL_FRect* rect, float* X1, float* Y1, float* X2, float* Y2); } } diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_render.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_render.g.cs index 1019086..de381da 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_render.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_render.g.cs @@ -72,7 +72,7 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_CreateWindowAndRenderer([NativeTypeName("const char *")] byte* title, int width, int height, SDL_WindowFlags window_flags, SDL_Window** window, SDL_Renderer** renderer); + public static extern SDLBool SDL_CreateWindowAndRenderer([NativeTypeName("const char *")] byte* title, int width, int height, SDL_WindowFlags window_flags, SDL_Window** window, SDL_Renderer** renderer); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_Renderer* SDL_CreateRenderer(SDL_Window* window, [NativeTypeName("const char *")] byte* name); @@ -98,11 +98,11 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetRenderOutputSize(SDL_Renderer* renderer, int* w, int* h); + public static extern SDLBool SDL_GetRenderOutputSize(SDL_Renderer* renderer, int* w, int* h); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetCurrentRenderOutputSize(SDL_Renderer* renderer, int* w, int* h); + public static extern SDLBool SDL_GetCurrentRenderOutputSize(SDL_Renderer* renderer, int* w, int* h); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_Texture* SDL_CreateTexture(SDL_Renderer* renderer, SDL_PixelFormat format, SDL_TextureAccess access, int w, int h); @@ -121,244 +121,244 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetTextureSize(SDL_Texture* texture, float* w, float* h); + public static extern SDLBool SDL_GetTextureSize(SDL_Texture* texture, float* w, float* h); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetTextureColorMod(SDL_Texture* texture, [NativeTypeName("Uint8")] byte r, [NativeTypeName("Uint8")] byte g, [NativeTypeName("Uint8")] byte b); + public static extern SDLBool SDL_SetTextureColorMod(SDL_Texture* texture, [NativeTypeName("Uint8")] byte r, [NativeTypeName("Uint8")] byte g, [NativeTypeName("Uint8")] byte b); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetTextureColorModFloat(SDL_Texture* texture, float r, float g, float b); + public static extern SDLBool SDL_SetTextureColorModFloat(SDL_Texture* texture, float r, float g, float b); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetTextureColorMod(SDL_Texture* texture, [NativeTypeName("Uint8 *")] byte* r, [NativeTypeName("Uint8 *")] byte* g, [NativeTypeName("Uint8 *")] byte* b); + public static extern SDLBool SDL_GetTextureColorMod(SDL_Texture* texture, [NativeTypeName("Uint8 *")] byte* r, [NativeTypeName("Uint8 *")] byte* g, [NativeTypeName("Uint8 *")] byte* b); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetTextureColorModFloat(SDL_Texture* texture, float* r, float* g, float* b); + public static extern SDLBool SDL_GetTextureColorModFloat(SDL_Texture* texture, float* r, float* g, float* b); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetTextureAlphaMod(SDL_Texture* texture, [NativeTypeName("Uint8")] byte alpha); + public static extern SDLBool SDL_SetTextureAlphaMod(SDL_Texture* texture, [NativeTypeName("Uint8")] byte alpha); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetTextureAlphaModFloat(SDL_Texture* texture, float alpha); + public static extern SDLBool SDL_SetTextureAlphaModFloat(SDL_Texture* texture, float alpha); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetTextureAlphaMod(SDL_Texture* texture, [NativeTypeName("Uint8 *")] byte* alpha); + public static extern SDLBool SDL_GetTextureAlphaMod(SDL_Texture* texture, [NativeTypeName("Uint8 *")] byte* alpha); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetTextureAlphaModFloat(SDL_Texture* texture, float* alpha); + public static extern SDLBool SDL_GetTextureAlphaModFloat(SDL_Texture* texture, float* alpha); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetTextureBlendMode(SDL_Texture* texture, SDL_BlendMode blendMode); + public static extern SDLBool SDL_SetTextureBlendMode(SDL_Texture* texture, SDL_BlendMode blendMode); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetTextureBlendMode(SDL_Texture* texture, SDL_BlendMode* blendMode); + public static extern SDLBool SDL_GetTextureBlendMode(SDL_Texture* texture, SDL_BlendMode* blendMode); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetTextureScaleMode(SDL_Texture* texture, SDL_ScaleMode scaleMode); + public static extern SDLBool SDL_SetTextureScaleMode(SDL_Texture* texture, SDL_ScaleMode scaleMode); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetTextureScaleMode(SDL_Texture* texture, SDL_ScaleMode* scaleMode); + public static extern SDLBool SDL_GetTextureScaleMode(SDL_Texture* texture, SDL_ScaleMode* scaleMode); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_UpdateTexture(SDL_Texture* texture, [NativeTypeName("const SDL_Rect *")] SDL_Rect* rect, [NativeTypeName("const void *")] IntPtr pixels, int pitch); + public static extern SDLBool SDL_UpdateTexture(SDL_Texture* texture, [NativeTypeName("const SDL_Rect *")] SDL_Rect* rect, [NativeTypeName("const void *")] IntPtr pixels, int pitch); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_UpdateYUVTexture(SDL_Texture* texture, [NativeTypeName("const SDL_Rect *")] SDL_Rect* rect, [NativeTypeName("const Uint8 *")] byte* Yplane, int Ypitch, [NativeTypeName("const Uint8 *")] byte* Uplane, int Upitch, [NativeTypeName("const Uint8 *")] byte* Vplane, int Vpitch); + public static extern SDLBool SDL_UpdateYUVTexture(SDL_Texture* texture, [NativeTypeName("const SDL_Rect *")] SDL_Rect* rect, [NativeTypeName("const Uint8 *")] byte* Yplane, int Ypitch, [NativeTypeName("const Uint8 *")] byte* Uplane, int Upitch, [NativeTypeName("const Uint8 *")] byte* Vplane, int Vpitch); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_UpdateNVTexture(SDL_Texture* texture, [NativeTypeName("const SDL_Rect *")] SDL_Rect* rect, [NativeTypeName("const Uint8 *")] byte* Yplane, int Ypitch, [NativeTypeName("const Uint8 *")] byte* UVplane, int UVpitch); + public static extern SDLBool SDL_UpdateNVTexture(SDL_Texture* texture, [NativeTypeName("const SDL_Rect *")] SDL_Rect* rect, [NativeTypeName("const Uint8 *")] byte* Yplane, int Ypitch, [NativeTypeName("const Uint8 *")] byte* UVplane, int UVpitch); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_LockTexture(SDL_Texture* texture, [NativeTypeName("const SDL_Rect *")] SDL_Rect* rect, [NativeTypeName("void **")] IntPtr* pixels, int* pitch); + public static extern SDLBool SDL_LockTexture(SDL_Texture* texture, [NativeTypeName("const SDL_Rect *")] SDL_Rect* rect, [NativeTypeName("void **")] IntPtr* pixels, int* pitch); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_LockTextureToSurface(SDL_Texture* texture, [NativeTypeName("const SDL_Rect *")] SDL_Rect* rect, SDL_Surface** surface); + public static extern SDLBool SDL_LockTextureToSurface(SDL_Texture* texture, [NativeTypeName("const SDL_Rect *")] SDL_Rect* rect, SDL_Surface** surface); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_UnlockTexture(SDL_Texture* texture); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetRenderTarget(SDL_Renderer* renderer, SDL_Texture* texture); + public static extern SDLBool SDL_SetRenderTarget(SDL_Renderer* renderer, SDL_Texture* texture); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_Texture* SDL_GetRenderTarget(SDL_Renderer* renderer); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetRenderLogicalPresentation(SDL_Renderer* renderer, int w, int h, SDL_RendererLogicalPresentation mode, SDL_ScaleMode scale_mode); + public static extern SDLBool SDL_SetRenderLogicalPresentation(SDL_Renderer* renderer, int w, int h, SDL_RendererLogicalPresentation mode, SDL_ScaleMode scale_mode); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetRenderLogicalPresentation(SDL_Renderer* renderer, int* w, int* h, SDL_RendererLogicalPresentation* mode, SDL_ScaleMode* scale_mode); + public static extern SDLBool SDL_GetRenderLogicalPresentation(SDL_Renderer* renderer, int* w, int* h, SDL_RendererLogicalPresentation* mode, SDL_ScaleMode* scale_mode); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetRenderLogicalPresentationRect(SDL_Renderer* renderer, SDL_FRect* rect); + public static extern SDLBool SDL_GetRenderLogicalPresentationRect(SDL_Renderer* renderer, SDL_FRect* rect); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_RenderCoordinatesFromWindow(SDL_Renderer* renderer, float window_x, float window_y, float* x, float* y); + public static extern SDLBool SDL_RenderCoordinatesFromWindow(SDL_Renderer* renderer, float window_x, float window_y, float* x, float* y); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_RenderCoordinatesToWindow(SDL_Renderer* renderer, float x, float y, float* window_x, float* window_y); + public static extern SDLBool SDL_RenderCoordinatesToWindow(SDL_Renderer* renderer, float x, float y, float* window_x, float* window_y); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_ConvertEventToRenderCoordinates(SDL_Renderer* renderer, SDL_Event* @event); + public static extern SDLBool SDL_ConvertEventToRenderCoordinates(SDL_Renderer* renderer, SDL_Event* @event); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetRenderViewport(SDL_Renderer* renderer, [NativeTypeName("const SDL_Rect *")] SDL_Rect* rect); + public static extern SDLBool SDL_SetRenderViewport(SDL_Renderer* renderer, [NativeTypeName("const SDL_Rect *")] SDL_Rect* rect); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetRenderViewport(SDL_Renderer* renderer, SDL_Rect* rect); + public static extern SDLBool SDL_GetRenderViewport(SDL_Renderer* renderer, SDL_Rect* rect); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_RenderViewportSet(SDL_Renderer* renderer); + public static extern SDLBool SDL_RenderViewportSet(SDL_Renderer* renderer); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetRenderSafeArea(SDL_Renderer* renderer, SDL_Rect* rect); + public static extern SDLBool SDL_GetRenderSafeArea(SDL_Renderer* renderer, SDL_Rect* rect); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetRenderClipRect(SDL_Renderer* renderer, [NativeTypeName("const SDL_Rect *")] SDL_Rect* rect); + public static extern SDLBool SDL_SetRenderClipRect(SDL_Renderer* renderer, [NativeTypeName("const SDL_Rect *")] SDL_Rect* rect); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetRenderClipRect(SDL_Renderer* renderer, SDL_Rect* rect); + public static extern SDLBool SDL_GetRenderClipRect(SDL_Renderer* renderer, SDL_Rect* rect); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_RenderClipEnabled(SDL_Renderer* renderer); + public static extern SDLBool SDL_RenderClipEnabled(SDL_Renderer* renderer); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetRenderScale(SDL_Renderer* renderer, float scaleX, float scaleY); + public static extern SDLBool SDL_SetRenderScale(SDL_Renderer* renderer, float scaleX, float scaleY); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetRenderScale(SDL_Renderer* renderer, float* scaleX, float* scaleY); + public static extern SDLBool SDL_GetRenderScale(SDL_Renderer* renderer, float* scaleX, float* scaleY); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetRenderDrawColor(SDL_Renderer* renderer, [NativeTypeName("Uint8")] byte r, [NativeTypeName("Uint8")] byte g, [NativeTypeName("Uint8")] byte b, [NativeTypeName("Uint8")] byte a); + public static extern SDLBool SDL_SetRenderDrawColor(SDL_Renderer* renderer, [NativeTypeName("Uint8")] byte r, [NativeTypeName("Uint8")] byte g, [NativeTypeName("Uint8")] byte b, [NativeTypeName("Uint8")] byte a); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetRenderDrawColorFloat(SDL_Renderer* renderer, float r, float g, float b, float a); + public static extern SDLBool SDL_SetRenderDrawColorFloat(SDL_Renderer* renderer, float r, float g, float b, float a); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetRenderDrawColor(SDL_Renderer* renderer, [NativeTypeName("Uint8 *")] byte* r, [NativeTypeName("Uint8 *")] byte* g, [NativeTypeName("Uint8 *")] byte* b, [NativeTypeName("Uint8 *")] byte* a); + public static extern SDLBool SDL_GetRenderDrawColor(SDL_Renderer* renderer, [NativeTypeName("Uint8 *")] byte* r, [NativeTypeName("Uint8 *")] byte* g, [NativeTypeName("Uint8 *")] byte* b, [NativeTypeName("Uint8 *")] byte* a); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetRenderDrawColorFloat(SDL_Renderer* renderer, float* r, float* g, float* b, float* a); + public static extern SDLBool SDL_GetRenderDrawColorFloat(SDL_Renderer* renderer, float* r, float* g, float* b, float* a); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetRenderColorScale(SDL_Renderer* renderer, float scale); + public static extern SDLBool SDL_SetRenderColorScale(SDL_Renderer* renderer, float scale); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetRenderColorScale(SDL_Renderer* renderer, float* scale); + public static extern SDLBool SDL_GetRenderColorScale(SDL_Renderer* renderer, float* scale); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetRenderDrawBlendMode(SDL_Renderer* renderer, SDL_BlendMode blendMode); + public static extern SDLBool SDL_SetRenderDrawBlendMode(SDL_Renderer* renderer, SDL_BlendMode blendMode); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetRenderDrawBlendMode(SDL_Renderer* renderer, SDL_BlendMode* blendMode); + public static extern SDLBool SDL_GetRenderDrawBlendMode(SDL_Renderer* renderer, SDL_BlendMode* blendMode); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_RenderClear(SDL_Renderer* renderer); + public static extern SDLBool SDL_RenderClear(SDL_Renderer* renderer); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_RenderPoint(SDL_Renderer* renderer, float x, float y); + public static extern SDLBool SDL_RenderPoint(SDL_Renderer* renderer, float x, float y); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_RenderPoints(SDL_Renderer* renderer, [NativeTypeName("const SDL_FPoint *")] SDL_FPoint* points, int count); + public static extern SDLBool SDL_RenderPoints(SDL_Renderer* renderer, [NativeTypeName("const SDL_FPoint *")] SDL_FPoint* points, int count); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_RenderLine(SDL_Renderer* renderer, float x1, float y1, float x2, float y2); + public static extern SDLBool SDL_RenderLine(SDL_Renderer* renderer, float x1, float y1, float x2, float y2); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_RenderLines(SDL_Renderer* renderer, [NativeTypeName("const SDL_FPoint *")] SDL_FPoint* points, int count); + public static extern SDLBool SDL_RenderLines(SDL_Renderer* renderer, [NativeTypeName("const SDL_FPoint *")] SDL_FPoint* points, int count); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_RenderRect(SDL_Renderer* renderer, [NativeTypeName("const SDL_FRect *")] SDL_FRect* rect); + public static extern SDLBool SDL_RenderRect(SDL_Renderer* renderer, [NativeTypeName("const SDL_FRect *")] SDL_FRect* rect); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_RenderRects(SDL_Renderer* renderer, [NativeTypeName("const SDL_FRect *")] SDL_FRect* rects, int count); + public static extern SDLBool SDL_RenderRects(SDL_Renderer* renderer, [NativeTypeName("const SDL_FRect *")] SDL_FRect* rects, int count); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_RenderFillRect(SDL_Renderer* renderer, [NativeTypeName("const SDL_FRect *")] SDL_FRect* rect); + public static extern SDLBool SDL_RenderFillRect(SDL_Renderer* renderer, [NativeTypeName("const SDL_FRect *")] SDL_FRect* rect); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_RenderFillRects(SDL_Renderer* renderer, [NativeTypeName("const SDL_FRect *")] SDL_FRect* rects, int count); + public static extern SDLBool SDL_RenderFillRects(SDL_Renderer* renderer, [NativeTypeName("const SDL_FRect *")] SDL_FRect* rects, int count); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_RenderTexture(SDL_Renderer* renderer, SDL_Texture* texture, [NativeTypeName("const SDL_FRect *")] SDL_FRect* srcrect, [NativeTypeName("const SDL_FRect *")] SDL_FRect* dstrect); + public static extern SDLBool SDL_RenderTexture(SDL_Renderer* renderer, SDL_Texture* texture, [NativeTypeName("const SDL_FRect *")] SDL_FRect* srcrect, [NativeTypeName("const SDL_FRect *")] SDL_FRect* dstrect); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_RenderTextureRotated(SDL_Renderer* renderer, SDL_Texture* texture, [NativeTypeName("const SDL_FRect *")] SDL_FRect* srcrect, [NativeTypeName("const SDL_FRect *")] SDL_FRect* dstrect, [NativeTypeName("const double")] double angle, [NativeTypeName("const SDL_FPoint *")] SDL_FPoint* center, [NativeTypeName("const SDL_FlipMode")] SDL_FlipMode flip); + public static extern SDLBool SDL_RenderTextureRotated(SDL_Renderer* renderer, SDL_Texture* texture, [NativeTypeName("const SDL_FRect *")] SDL_FRect* srcrect, [NativeTypeName("const SDL_FRect *")] SDL_FRect* dstrect, [NativeTypeName("const double")] double angle, [NativeTypeName("const SDL_FPoint *")] SDL_FPoint* center, [NativeTypeName("const SDL_FlipMode")] SDL_FlipMode flip); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_RenderTextureTiled(SDL_Renderer* renderer, SDL_Texture* texture, [NativeTypeName("const SDL_FRect *")] SDL_FRect* srcrect, float scale, [NativeTypeName("const SDL_FRect *")] SDL_FRect* dstrect); + public static extern SDLBool SDL_RenderTextureTiled(SDL_Renderer* renderer, SDL_Texture* texture, [NativeTypeName("const SDL_FRect *")] SDL_FRect* srcrect, float scale, [NativeTypeName("const SDL_FRect *")] SDL_FRect* dstrect); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_RenderTexture9Grid(SDL_Renderer* renderer, SDL_Texture* texture, [NativeTypeName("const SDL_FRect *")] SDL_FRect* srcrect, float left_width, float right_width, float top_height, float bottom_height, float scale, [NativeTypeName("const SDL_FRect *")] SDL_FRect* dstrect); + public static extern SDLBool SDL_RenderTexture9Grid(SDL_Renderer* renderer, SDL_Texture* texture, [NativeTypeName("const SDL_FRect *")] SDL_FRect* srcrect, float left_width, float right_width, float top_height, float bottom_height, float scale, [NativeTypeName("const SDL_FRect *")] SDL_FRect* dstrect); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_RenderGeometry(SDL_Renderer* renderer, SDL_Texture* texture, [NativeTypeName("const SDL_Vertex *")] SDL_Vertex* vertices, int num_vertices, [NativeTypeName("const int *")] int* indices, int num_indices); + public static extern SDLBool SDL_RenderGeometry(SDL_Renderer* renderer, SDL_Texture* texture, [NativeTypeName("const SDL_Vertex *")] SDL_Vertex* vertices, int num_vertices, [NativeTypeName("const int *")] int* indices, int num_indices); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_RenderGeometryRaw(SDL_Renderer* renderer, SDL_Texture* texture, [NativeTypeName("const float *")] float* xy, int xy_stride, [NativeTypeName("const SDL_FColor *")] SDL_FColor* color, int color_stride, [NativeTypeName("const float *")] float* uv, int uv_stride, int num_vertices, [NativeTypeName("const void *")] IntPtr indices, int num_indices, int size_indices); + public static extern SDLBool SDL_RenderGeometryRaw(SDL_Renderer* renderer, SDL_Texture* texture, [NativeTypeName("const float *")] float* xy, int xy_stride, [NativeTypeName("const SDL_FColor *")] SDL_FColor* color, int color_stride, [NativeTypeName("const float *")] float* uv, int uv_stride, int num_vertices, [NativeTypeName("const void *")] IntPtr indices, int num_indices, int size_indices); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_Surface* SDL_RenderReadPixels(SDL_Renderer* renderer, [NativeTypeName("const SDL_Rect *")] SDL_Rect* rect); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_RenderPresent(SDL_Renderer* renderer); + public static extern SDLBool SDL_RenderPresent(SDL_Renderer* renderer); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_DestroyTexture(SDL_Texture* texture); @@ -368,7 +368,7 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_FlushRenderer(SDL_Renderer* renderer); + public static extern SDLBool SDL_FlushRenderer(SDL_Renderer* renderer); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("void*")] @@ -380,15 +380,15 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_AddVulkanRenderSemaphores(SDL_Renderer* renderer, [NativeTypeName("Uint32")] uint wait_stage_mask, [NativeTypeName("Sint64")] long wait_semaphore, [NativeTypeName("Sint64")] long signal_semaphore); + public static extern SDLBool SDL_AddVulkanRenderSemaphores(SDL_Renderer* renderer, [NativeTypeName("Uint32")] uint wait_stage_mask, [NativeTypeName("Sint64")] long wait_semaphore, [NativeTypeName("Sint64")] long signal_semaphore); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetRenderVSync(SDL_Renderer* renderer, int vsync); + public static extern SDLBool SDL_SetRenderVSync(SDL_Renderer* renderer, int vsync); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetRenderVSync(SDL_Renderer* renderer, int* vsync); + public static extern SDLBool SDL_GetRenderVSync(SDL_Renderer* renderer, int* vsync); [NativeTypeName("#define SDL_SOFTWARE_RENDERER \"software\"")] public static ReadOnlySpan SDL_SOFTWARE_RENDERER => "software"u8; diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_sensor.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_sensor.g.cs index 93d0d58..a761cab 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_sensor.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_sensor.g.cs @@ -82,7 +82,7 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetSensorData(SDL_Sensor* sensor, float* data, int num_values); + public static extern SDLBool SDL_GetSensorData(SDL_Sensor* sensor, float* data, int num_values); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_CloseSensor(SDL_Sensor* sensor); diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_stdinc.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_stdinc.g.cs index 6536b44..ce169ba 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_stdinc.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_stdinc.g.cs @@ -75,7 +75,7 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetMemoryFunctions([NativeTypeName("SDL_malloc_func")] delegate* unmanaged[Cdecl] malloc_func, [NativeTypeName("SDL_calloc_func")] delegate* unmanaged[Cdecl] calloc_func, [NativeTypeName("SDL_realloc_func")] delegate* unmanaged[Cdecl] realloc_func, [NativeTypeName("SDL_free_func")] delegate* unmanaged[Cdecl] free_func); + public static extern SDLBool SDL_SetMemoryFunctions([NativeTypeName("SDL_malloc_func")] delegate* unmanaged[Cdecl] malloc_func, [NativeTypeName("SDL_calloc_func")] delegate* unmanaged[Cdecl] calloc_func, [NativeTypeName("SDL_realloc_func")] delegate* unmanaged[Cdecl] realloc_func, [NativeTypeName("SDL_free_func")] delegate* unmanaged[Cdecl] free_func); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("void*")] @@ -91,7 +91,7 @@ namespace SDL public static extern SDL_Environment* SDL_GetEnvironment(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_Environment* SDL_CreateEnvironment([NativeTypeName("bool")] byte populated); + public static extern SDL_Environment* SDL_CreateEnvironment([NativeTypeName("bool")] SDLBool populated); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetEnvironmentVariable", ExactSpelling = true)] [return: NativeTypeName("const char *")] @@ -103,11 +103,11 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetEnvironmentVariable(SDL_Environment* env, [NativeTypeName("const char *")] byte* name, [NativeTypeName("const char *")] byte* value, [NativeTypeName("bool")] byte overwrite); + public static extern SDLBool SDL_SetEnvironmentVariable(SDL_Environment* env, [NativeTypeName("const char *")] byte* name, [NativeTypeName("const char *")] byte* value, [NativeTypeName("bool")] SDLBool overwrite); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_UnsetEnvironmentVariable(SDL_Environment* env, [NativeTypeName("const char *")] byte* name); + public static extern SDLBool SDL_UnsetEnvironmentVariable(SDL_Environment* env, [NativeTypeName("const char *")] byte* name); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_DestroyEnvironment(SDL_Environment* env); @@ -611,7 +611,8 @@ namespace SDL [return: NativeTypeName("char *")] public static extern byte* Unsafe_SDL_iconv_string([NativeTypeName("const char *")] byte* tocode, [NativeTypeName("const char *")] byte* fromcode, [NativeTypeName("const char *")] byte* inbuf, [NativeTypeName("size_t")] nuint inbytesleft); - public static bool SDL_size_mul_check_overflow([NativeTypeName("size_t")] nuint a, [NativeTypeName("size_t")] nuint b, [NativeTypeName("size_t *")] nuint* ret) + [return: NativeTypeName("bool")] + public static SDLBool SDL_size_mul_check_overflow([NativeTypeName("size_t")] nuint a, [NativeTypeName("size_t")] nuint b, [NativeTypeName("size_t *")] nuint* ret) { if (a != 0 && b > 0xffffffffffffffffUL / a) { @@ -622,7 +623,8 @@ namespace SDL return true; } - public static bool SDL_size_add_check_overflow([NativeTypeName("size_t")] nuint a, [NativeTypeName("size_t")] nuint b, [NativeTypeName("size_t *")] nuint* ret) + [return: NativeTypeName("bool")] + public static SDLBool SDL_size_add_check_overflow([NativeTypeName("size_t")] nuint a, [NativeTypeName("size_t")] nuint b, [NativeTypeName("size_t *")] nuint* ret) { if (b > 0xffffffffffffffffUL - a) { diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_storage.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_storage.g.cs index 725e7fa..6013cb0 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_storage.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_storage.g.cs @@ -34,34 +34,34 @@ namespace SDL public uint version; [NativeTypeName("bool (*)(void *)")] - public delegate* unmanaged[Cdecl] close; + public delegate* unmanaged[Cdecl] close; [NativeTypeName("bool (*)(void *)")] - public delegate* unmanaged[Cdecl] ready; + public delegate* unmanaged[Cdecl] ready; [NativeTypeName("bool (*)(void *, const char *, SDL_EnumerateDirectoryCallback, void *)")] - public delegate* unmanaged[Cdecl], IntPtr, byte> enumerate; + public delegate* unmanaged[Cdecl], IntPtr, SDLBool> enumerate; [NativeTypeName("bool (*)(void *, const char *, SDL_PathInfo *)")] - public delegate* unmanaged[Cdecl] info; + public delegate* unmanaged[Cdecl] info; [NativeTypeName("bool (*)(void *, const char *, void *, Uint64)")] - public delegate* unmanaged[Cdecl] read_file; + public delegate* unmanaged[Cdecl] read_file; [NativeTypeName("bool (*)(void *, const char *, const void *, Uint64)")] - public delegate* unmanaged[Cdecl] write_file; + public delegate* unmanaged[Cdecl] write_file; [NativeTypeName("bool (*)(void *, const char *)")] - public delegate* unmanaged[Cdecl] mkdir; + public delegate* unmanaged[Cdecl] mkdir; [NativeTypeName("bool (*)(void *, const char *)")] - public delegate* unmanaged[Cdecl] remove; + public delegate* unmanaged[Cdecl] remove; [NativeTypeName("bool (*)(void *, const char *, const char *)")] - public delegate* unmanaged[Cdecl] rename; + public delegate* unmanaged[Cdecl] rename; [NativeTypeName("bool (*)(void *, const char *, const char *)")] - public delegate* unmanaged[Cdecl] copy; + public delegate* unmanaged[Cdecl] copy; [NativeTypeName("Uint64 (*)(void *)")] public delegate* unmanaged[Cdecl] space_remaining; @@ -87,47 +87,47 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_CloseStorage(SDL_Storage* storage); + public static extern SDLBool SDL_CloseStorage(SDL_Storage* storage); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_StorageReady(SDL_Storage* storage); + public static extern SDLBool SDL_StorageReady(SDL_Storage* storage); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetStorageFileSize(SDL_Storage* storage, [NativeTypeName("const char *")] byte* path, [NativeTypeName("Uint64 *")] ulong* length); + public static extern SDLBool SDL_GetStorageFileSize(SDL_Storage* storage, [NativeTypeName("const char *")] byte* path, [NativeTypeName("Uint64 *")] ulong* length); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_ReadStorageFile(SDL_Storage* storage, [NativeTypeName("const char *")] byte* path, [NativeTypeName("void*")] IntPtr destination, [NativeTypeName("Uint64")] ulong length); + public static extern SDLBool SDL_ReadStorageFile(SDL_Storage* storage, [NativeTypeName("const char *")] byte* path, [NativeTypeName("void*")] IntPtr destination, [NativeTypeName("Uint64")] ulong length); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_WriteStorageFile(SDL_Storage* storage, [NativeTypeName("const char *")] byte* path, [NativeTypeName("const void *")] IntPtr source, [NativeTypeName("Uint64")] ulong length); + public static extern SDLBool SDL_WriteStorageFile(SDL_Storage* storage, [NativeTypeName("const char *")] byte* path, [NativeTypeName("const void *")] IntPtr source, [NativeTypeName("Uint64")] ulong length); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_CreateStorageDirectory(SDL_Storage* storage, [NativeTypeName("const char *")] byte* path); + public static extern SDLBool SDL_CreateStorageDirectory(SDL_Storage* storage, [NativeTypeName("const char *")] byte* path); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_EnumerateStorageDirectory(SDL_Storage* storage, [NativeTypeName("const char *")] byte* path, [NativeTypeName("SDL_EnumerateDirectoryCallback")] delegate* unmanaged[Cdecl] callback, [NativeTypeName("void*")] IntPtr userdata); + public static extern SDLBool SDL_EnumerateStorageDirectory(SDL_Storage* storage, [NativeTypeName("const char *")] byte* path, [NativeTypeName("SDL_EnumerateDirectoryCallback")] delegate* unmanaged[Cdecl] callback, [NativeTypeName("void*")] IntPtr userdata); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_RemoveStoragePath(SDL_Storage* storage, [NativeTypeName("const char *")] byte* path); + public static extern SDLBool SDL_RemoveStoragePath(SDL_Storage* storage, [NativeTypeName("const char *")] byte* path); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_RenameStoragePath(SDL_Storage* storage, [NativeTypeName("const char *")] byte* oldpath, [NativeTypeName("const char *")] byte* newpath); + public static extern SDLBool SDL_RenameStoragePath(SDL_Storage* storage, [NativeTypeName("const char *")] byte* oldpath, [NativeTypeName("const char *")] byte* newpath); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_CopyStorageFile(SDL_Storage* storage, [NativeTypeName("const char *")] byte* oldpath, [NativeTypeName("const char *")] byte* newpath); + public static extern SDLBool SDL_CopyStorageFile(SDL_Storage* storage, [NativeTypeName("const char *")] byte* oldpath, [NativeTypeName("const char *")] byte* newpath); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetStoragePathInfo(SDL_Storage* storage, [NativeTypeName("const char *")] byte* path, SDL_PathInfo* info); + public static extern SDLBool SDL_GetStoragePathInfo(SDL_Storage* storage, [NativeTypeName("const char *")] byte* path, SDL_PathInfo* info); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("Uint64")] diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_surface.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_surface.g.cs index cb432d0..1951a05 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_surface.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_surface.g.cs @@ -81,7 +81,7 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetSurfaceColorspace(SDL_Surface* surface, SDL_Colorspace colorspace); + public static extern SDLBool SDL_SetSurfaceColorspace(SDL_Surface* surface, SDL_Colorspace colorspace); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_Colorspace SDL_GetSurfaceColorspace(SDL_Surface* surface); @@ -91,18 +91,18 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetSurfacePalette(SDL_Surface* surface, SDL_Palette* palette); + public static extern SDLBool SDL_SetSurfacePalette(SDL_Surface* surface, SDL_Palette* palette); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_Palette* SDL_GetSurfacePalette(SDL_Surface* surface); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_AddSurfaceAlternateImage(SDL_Surface* surface, SDL_Surface* image); + public static extern SDLBool SDL_AddSurfaceAlternateImage(SDL_Surface* surface, SDL_Surface* image); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SurfaceHasAlternateImages(SDL_Surface* surface); + public static extern SDLBool SDL_SurfaceHasAlternateImages(SDL_Surface* surface); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_Surface** SDL_GetSurfaceImages(SDL_Surface* surface, int* count); @@ -112,80 +112,80 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_LockSurface(SDL_Surface* surface); + public static extern SDLBool SDL_LockSurface(SDL_Surface* surface); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_UnlockSurface(SDL_Surface* surface); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_Surface* SDL_LoadBMP_IO(SDL_IOStream* src, [NativeTypeName("bool")] byte closeio); + public static extern SDL_Surface* SDL_LoadBMP_IO(SDL_IOStream* src, [NativeTypeName("bool")] SDLBool closeio); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_Surface* SDL_LoadBMP([NativeTypeName("const char *")] byte* file); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SaveBMP_IO(SDL_Surface* surface, SDL_IOStream* dst, [NativeTypeName("bool")] byte closeio); + public static extern SDLBool SDL_SaveBMP_IO(SDL_Surface* surface, SDL_IOStream* dst, [NativeTypeName("bool")] SDLBool closeio); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SaveBMP(SDL_Surface* surface, [NativeTypeName("const char *")] byte* file); + public static extern SDLBool SDL_SaveBMP(SDL_Surface* surface, [NativeTypeName("const char *")] byte* file); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetSurfaceRLE(SDL_Surface* surface, [NativeTypeName("bool")] byte enabled); + public static extern SDLBool SDL_SetSurfaceRLE(SDL_Surface* surface, [NativeTypeName("bool")] SDLBool enabled); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SurfaceHasRLE(SDL_Surface* surface); + public static extern SDLBool SDL_SurfaceHasRLE(SDL_Surface* surface); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetSurfaceColorKey(SDL_Surface* surface, [NativeTypeName("bool")] byte enabled, [NativeTypeName("Uint32")] uint key); + public static extern SDLBool SDL_SetSurfaceColorKey(SDL_Surface* surface, [NativeTypeName("bool")] SDLBool enabled, [NativeTypeName("Uint32")] uint key); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SurfaceHasColorKey(SDL_Surface* surface); + public static extern SDLBool SDL_SurfaceHasColorKey(SDL_Surface* surface); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetSurfaceColorKey(SDL_Surface* surface, [NativeTypeName("Uint32 *")] uint* key); + public static extern SDLBool SDL_GetSurfaceColorKey(SDL_Surface* surface, [NativeTypeName("Uint32 *")] uint* key); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetSurfaceColorMod(SDL_Surface* surface, [NativeTypeName("Uint8")] byte r, [NativeTypeName("Uint8")] byte g, [NativeTypeName("Uint8")] byte b); + public static extern SDLBool SDL_SetSurfaceColorMod(SDL_Surface* surface, [NativeTypeName("Uint8")] byte r, [NativeTypeName("Uint8")] byte g, [NativeTypeName("Uint8")] byte b); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetSurfaceColorMod(SDL_Surface* surface, [NativeTypeName("Uint8 *")] byte* r, [NativeTypeName("Uint8 *")] byte* g, [NativeTypeName("Uint8 *")] byte* b); + public static extern SDLBool SDL_GetSurfaceColorMod(SDL_Surface* surface, [NativeTypeName("Uint8 *")] byte* r, [NativeTypeName("Uint8 *")] byte* g, [NativeTypeName("Uint8 *")] byte* b); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetSurfaceAlphaMod(SDL_Surface* surface, [NativeTypeName("Uint8")] byte alpha); + public static extern SDLBool SDL_SetSurfaceAlphaMod(SDL_Surface* surface, [NativeTypeName("Uint8")] byte alpha); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetSurfaceAlphaMod(SDL_Surface* surface, [NativeTypeName("Uint8 *")] byte* alpha); + public static extern SDLBool SDL_GetSurfaceAlphaMod(SDL_Surface* surface, [NativeTypeName("Uint8 *")] byte* alpha); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetSurfaceBlendMode(SDL_Surface* surface, SDL_BlendMode blendMode); + public static extern SDLBool SDL_SetSurfaceBlendMode(SDL_Surface* surface, SDL_BlendMode blendMode); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetSurfaceBlendMode(SDL_Surface* surface, SDL_BlendMode* blendMode); + public static extern SDLBool SDL_GetSurfaceBlendMode(SDL_Surface* surface, SDL_BlendMode* blendMode); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetSurfaceClipRect(SDL_Surface* surface, [NativeTypeName("const SDL_Rect *")] SDL_Rect* rect); + public static extern SDLBool SDL_SetSurfaceClipRect(SDL_Surface* surface, [NativeTypeName("const SDL_Rect *")] SDL_Rect* rect); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetSurfaceClipRect(SDL_Surface* surface, SDL_Rect* rect); + public static extern SDLBool SDL_GetSurfaceClipRect(SDL_Surface* surface, SDL_Rect* rect); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_FlipSurface(SDL_Surface* surface, SDL_FlipMode flip); + public static extern SDLBool SDL_FlipSurface(SDL_Surface* surface, SDL_FlipMode flip); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_Surface* SDL_DuplicateSurface(SDL_Surface* surface); @@ -201,59 +201,59 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_ConvertPixels(int width, int height, SDL_PixelFormat src_format, [NativeTypeName("const void *")] IntPtr src, int src_pitch, SDL_PixelFormat dst_format, [NativeTypeName("void*")] IntPtr dst, int dst_pitch); + public static extern SDLBool SDL_ConvertPixels(int width, int height, SDL_PixelFormat src_format, [NativeTypeName("const void *")] IntPtr src, int src_pitch, SDL_PixelFormat dst_format, [NativeTypeName("void*")] IntPtr dst, int dst_pitch); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_ConvertPixelsAndColorspace(int width, int height, SDL_PixelFormat src_format, SDL_Colorspace src_colorspace, SDL_PropertiesID src_properties, [NativeTypeName("const void *")] IntPtr src, int src_pitch, SDL_PixelFormat dst_format, SDL_Colorspace dst_colorspace, SDL_PropertiesID dst_properties, [NativeTypeName("void*")] IntPtr dst, int dst_pitch); + public static extern SDLBool SDL_ConvertPixelsAndColorspace(int width, int height, SDL_PixelFormat src_format, SDL_Colorspace src_colorspace, SDL_PropertiesID src_properties, [NativeTypeName("const void *")] IntPtr src, int src_pitch, SDL_PixelFormat dst_format, SDL_Colorspace dst_colorspace, SDL_PropertiesID dst_properties, [NativeTypeName("void*")] IntPtr dst, int dst_pitch); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_PremultiplyAlpha(int width, int height, SDL_PixelFormat src_format, [NativeTypeName("const void *")] IntPtr src, int src_pitch, SDL_PixelFormat dst_format, [NativeTypeName("void*")] IntPtr dst, int dst_pitch, [NativeTypeName("bool")] byte linear); + public static extern SDLBool SDL_PremultiplyAlpha(int width, int height, SDL_PixelFormat src_format, [NativeTypeName("const void *")] IntPtr src, int src_pitch, SDL_PixelFormat dst_format, [NativeTypeName("void*")] IntPtr dst, int dst_pitch, [NativeTypeName("bool")] SDLBool linear); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_PremultiplySurfaceAlpha(SDL_Surface* surface, [NativeTypeName("bool")] byte linear); + public static extern SDLBool SDL_PremultiplySurfaceAlpha(SDL_Surface* surface, [NativeTypeName("bool")] SDLBool linear); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_ClearSurface(SDL_Surface* surface, float r, float g, float b, float a); + public static extern SDLBool SDL_ClearSurface(SDL_Surface* surface, float r, float g, float b, float a); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_FillSurfaceRect(SDL_Surface* dst, [NativeTypeName("const SDL_Rect *")] SDL_Rect* rect, [NativeTypeName("Uint32")] uint color); + public static extern SDLBool SDL_FillSurfaceRect(SDL_Surface* dst, [NativeTypeName("const SDL_Rect *")] SDL_Rect* rect, [NativeTypeName("Uint32")] uint color); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_FillSurfaceRects(SDL_Surface* dst, [NativeTypeName("const SDL_Rect *")] SDL_Rect* rects, int count, [NativeTypeName("Uint32")] uint color); + public static extern SDLBool SDL_FillSurfaceRects(SDL_Surface* dst, [NativeTypeName("const SDL_Rect *")] SDL_Rect* rects, int count, [NativeTypeName("Uint32")] uint color); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_BlitSurface(SDL_Surface* src, [NativeTypeName("const SDL_Rect *")] SDL_Rect* srcrect, SDL_Surface* dst, [NativeTypeName("const SDL_Rect *")] SDL_Rect* dstrect); + public static extern SDLBool SDL_BlitSurface(SDL_Surface* src, [NativeTypeName("const SDL_Rect *")] SDL_Rect* srcrect, SDL_Surface* dst, [NativeTypeName("const SDL_Rect *")] SDL_Rect* dstrect); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_BlitSurfaceUnchecked(SDL_Surface* src, [NativeTypeName("const SDL_Rect *")] SDL_Rect* srcrect, SDL_Surface* dst, [NativeTypeName("const SDL_Rect *")] SDL_Rect* dstrect); + public static extern SDLBool SDL_BlitSurfaceUnchecked(SDL_Surface* src, [NativeTypeName("const SDL_Rect *")] SDL_Rect* srcrect, SDL_Surface* dst, [NativeTypeName("const SDL_Rect *")] SDL_Rect* dstrect); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_BlitSurfaceScaled(SDL_Surface* src, [NativeTypeName("const SDL_Rect *")] SDL_Rect* srcrect, SDL_Surface* dst, [NativeTypeName("const SDL_Rect *")] SDL_Rect* dstrect, SDL_ScaleMode scaleMode); + public static extern SDLBool SDL_BlitSurfaceScaled(SDL_Surface* src, [NativeTypeName("const SDL_Rect *")] SDL_Rect* srcrect, SDL_Surface* dst, [NativeTypeName("const SDL_Rect *")] SDL_Rect* dstrect, SDL_ScaleMode scaleMode); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_BlitSurfaceUncheckedScaled(SDL_Surface* src, [NativeTypeName("const SDL_Rect *")] SDL_Rect* srcrect, SDL_Surface* dst, [NativeTypeName("const SDL_Rect *")] SDL_Rect* dstrect, SDL_ScaleMode scaleMode); + public static extern SDLBool SDL_BlitSurfaceUncheckedScaled(SDL_Surface* src, [NativeTypeName("const SDL_Rect *")] SDL_Rect* srcrect, SDL_Surface* dst, [NativeTypeName("const SDL_Rect *")] SDL_Rect* dstrect, SDL_ScaleMode scaleMode); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_BlitSurfaceTiled(SDL_Surface* src, [NativeTypeName("const SDL_Rect *")] SDL_Rect* srcrect, SDL_Surface* dst, [NativeTypeName("const SDL_Rect *")] SDL_Rect* dstrect); + public static extern SDLBool SDL_BlitSurfaceTiled(SDL_Surface* src, [NativeTypeName("const SDL_Rect *")] SDL_Rect* srcrect, SDL_Surface* dst, [NativeTypeName("const SDL_Rect *")] SDL_Rect* dstrect); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_BlitSurfaceTiledWithScale(SDL_Surface* src, [NativeTypeName("const SDL_Rect *")] SDL_Rect* srcrect, float scale, SDL_ScaleMode scaleMode, SDL_Surface* dst, [NativeTypeName("const SDL_Rect *")] SDL_Rect* dstrect); + public static extern SDLBool SDL_BlitSurfaceTiledWithScale(SDL_Surface* src, [NativeTypeName("const SDL_Rect *")] SDL_Rect* srcrect, float scale, SDL_ScaleMode scaleMode, SDL_Surface* dst, [NativeTypeName("const SDL_Rect *")] SDL_Rect* dstrect); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_BlitSurface9Grid(SDL_Surface* src, [NativeTypeName("const SDL_Rect *")] SDL_Rect* srcrect, int left_width, int right_width, int top_height, int bottom_height, float scale, SDL_ScaleMode scaleMode, SDL_Surface* dst, [NativeTypeName("const SDL_Rect *")] SDL_Rect* dstrect); + public static extern SDLBool SDL_BlitSurface9Grid(SDL_Surface* src, [NativeTypeName("const SDL_Rect *")] SDL_Rect* srcrect, int left_width, int right_width, int top_height, int bottom_height, float scale, SDL_ScaleMode scaleMode, SDL_Surface* dst, [NativeTypeName("const SDL_Rect *")] SDL_Rect* dstrect); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("Uint32")] @@ -265,19 +265,19 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_ReadSurfacePixel(SDL_Surface* surface, int x, int y, [NativeTypeName("Uint8 *")] byte* r, [NativeTypeName("Uint8 *")] byte* g, [NativeTypeName("Uint8 *")] byte* b, [NativeTypeName("Uint8 *")] byte* a); + public static extern SDLBool SDL_ReadSurfacePixel(SDL_Surface* surface, int x, int y, [NativeTypeName("Uint8 *")] byte* r, [NativeTypeName("Uint8 *")] byte* g, [NativeTypeName("Uint8 *")] byte* b, [NativeTypeName("Uint8 *")] byte* a); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_ReadSurfacePixelFloat(SDL_Surface* surface, int x, int y, float* r, float* g, float* b, float* a); + public static extern SDLBool SDL_ReadSurfacePixelFloat(SDL_Surface* surface, int x, int y, float* r, float* g, float* b, float* a); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_WriteSurfacePixel(SDL_Surface* surface, int x, int y, [NativeTypeName("Uint8")] byte r, [NativeTypeName("Uint8")] byte g, [NativeTypeName("Uint8")] byte b, [NativeTypeName("Uint8")] byte a); + public static extern SDLBool SDL_WriteSurfacePixel(SDL_Surface* surface, int x, int y, [NativeTypeName("Uint8")] byte r, [NativeTypeName("Uint8")] byte g, [NativeTypeName("Uint8")] byte b, [NativeTypeName("Uint8")] byte a); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_WriteSurfacePixelFloat(SDL_Surface* surface, int x, int y, float r, float g, float b, float a); + public static extern SDLBool SDL_WriteSurfacePixelFloat(SDL_Surface* surface, int x, int y, float r, float g, float b, float a); [NativeTypeName("#define SDL_SURFACE_PREALLOCATED 0x00000001u")] public const uint SDL_SURFACE_PREALLOCATED = 0x00000001U; diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_system.Android.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_system.Android.g.cs index 53e7d9b..b552f88 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_system.Android.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_system.Android.g.cs @@ -48,17 +48,17 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] [SupportedOSPlatform("Android")] - public static extern byte SDL_IsAndroidTV(); + public static extern SDLBool SDL_IsAndroidTV(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] [SupportedOSPlatform("Android")] - public static extern byte SDL_IsChromebook(); + public static extern SDLBool SDL_IsChromebook(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] [SupportedOSPlatform("Android")] - public static extern byte SDL_IsDeXMode(); + public static extern SDLBool SDL_IsDeXMode(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [SupportedOSPlatform("Android")] @@ -87,17 +87,17 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] [SupportedOSPlatform("Android")] - public static extern byte SDL_RequestAndroidPermission([NativeTypeName("const char *")] byte* permission, [NativeTypeName("SDL_RequestAndroidPermissionCallback")] delegate* unmanaged[Cdecl] cb, [NativeTypeName("void*")] IntPtr userdata); + public static extern SDLBool SDL_RequestAndroidPermission([NativeTypeName("const char *")] byte* permission, [NativeTypeName("SDL_RequestAndroidPermissionCallback")] delegate* unmanaged[Cdecl] cb, [NativeTypeName("void*")] IntPtr userdata); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] [SupportedOSPlatform("Android")] - public static extern byte SDL_ShowAndroidToast([NativeTypeName("const char *")] byte* message, int duration, int gravity, int xoffset, int yoffset); + public static extern SDLBool SDL_ShowAndroidToast([NativeTypeName("const char *")] byte* message, int duration, int gravity, int xoffset, int yoffset); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] [SupportedOSPlatform("Android")] - public static extern byte SDL_SendAndroidMessage([NativeTypeName("Uint32")] uint command, int param1); + public static extern SDLBool SDL_SendAndroidMessage([NativeTypeName("Uint32")] uint command, int param1); [NativeTypeName("#define SDL_ANDROID_EXTERNAL_STORAGE_READ 0x01")] public const int SDL_ANDROID_EXTERNAL_STORAGE_READ = 0x01; diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_system.GDK.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_system.GDK.g.cs index d77ff5c..7d3d93b 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_system.GDK.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_system.GDK.g.cs @@ -41,11 +41,11 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] [SupportedOSPlatform("Windows")] - public static extern byte SDL_GetGDKTaskQueue([NativeTypeName("XTaskQueueHandle *")] XTaskQueueObject** outTaskQueue); + public static extern SDLBool SDL_GetGDKTaskQueue([NativeTypeName("XTaskQueueHandle *")] XTaskQueueObject** outTaskQueue); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] [SupportedOSPlatform("Windows")] - public static extern byte SDL_GetGDKDefaultUser([NativeTypeName("XUserHandle *")] XUser** outUserHandle); + public static extern SDLBool SDL_GetGDKDefaultUser([NativeTypeName("XUserHandle *")] XUser** outUserHandle); } } diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_system.Linux.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_system.Linux.g.cs index 1e4425c..00a3ce3 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_system.Linux.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_system.Linux.g.cs @@ -33,11 +33,11 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] [SupportedOSPlatform("Linux")] - public static extern byte SDL_SetLinuxThreadPriority([NativeTypeName("Sint64")] long threadID, int priority); + public static extern SDLBool SDL_SetLinuxThreadPriority([NativeTypeName("Sint64")] long threadID, int priority); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] [SupportedOSPlatform("Linux")] - public static extern byte SDL_SetLinuxThreadPriorityAndPolicy([NativeTypeName("Sint64")] long threadID, int sdlPriority, int schedPolicy); + public static extern SDLBool SDL_SetLinuxThreadPriorityAndPolicy([NativeTypeName("Sint64")] long threadID, int sdlPriority, int schedPolicy); } } diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_system.Windows.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_system.Windows.g.cs index 024e0eb..dfac178 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_system.Windows.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_system.Windows.g.cs @@ -33,7 +33,7 @@ namespace SDL { [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [SupportedOSPlatform("Windows")] - public static extern void SDL_SetWindowsMessageHook([NativeTypeName("SDL_WindowsMessageHook")] delegate* unmanaged[Cdecl] callback, [NativeTypeName("void*")] IntPtr userdata); + public static extern void SDL_SetWindowsMessageHook([NativeTypeName("SDL_WindowsMessageHook")] delegate* unmanaged[Cdecl] callback, [NativeTypeName("void*")] IntPtr userdata); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [SupportedOSPlatform("Windows")] @@ -42,6 +42,6 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] [SupportedOSPlatform("Windows")] - public static extern byte SDL_GetDXGIOutputInfo(SDL_DisplayID displayID, int* adapterIndex, int* outputIndex); + public static extern SDLBool SDL_GetDXGIOutputInfo(SDL_DisplayID displayID, int* adapterIndex, int* outputIndex); } } diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_system.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_system.g.cs index 239a52f..eed7c36 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_system.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_system.g.cs @@ -31,11 +31,11 @@ namespace SDL public static unsafe partial class SDL3 { [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void SDL_SetX11EventHook([NativeTypeName("SDL_X11EventHook")] delegate* unmanaged[Cdecl] callback, [NativeTypeName("void*")] IntPtr userdata); + public static extern void SDL_SetX11EventHook([NativeTypeName("SDL_X11EventHook")] delegate* unmanaged[Cdecl] callback, [NativeTypeName("void*")] IntPtr userdata); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_IsTablet(); + public static extern SDLBool SDL_IsTablet(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_OnApplicationWillTerminate(); diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_system.iOS.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_system.iOS.g.cs index 2202598..6b5a4c9 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_system.iOS.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_system.iOS.g.cs @@ -34,11 +34,11 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] [SupportedOSPlatform("iOS")] - public static extern byte SDL_SetiOSAnimationCallback(SDL_Window* window, int interval, [NativeTypeName("SDL_iOSAnimationCallback")] delegate* unmanaged[Cdecl] callback, [NativeTypeName("void*")] IntPtr callbackParam); + public static extern SDLBool SDL_SetiOSAnimationCallback(SDL_Window* window, int interval, [NativeTypeName("SDL_iOSAnimationCallback")] delegate* unmanaged[Cdecl] callback, [NativeTypeName("void*")] IntPtr callbackParam); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [SupportedOSPlatform("iOS")] - public static extern void SDL_SetiOSEventPump([NativeTypeName("bool")] byte enabled); + public static extern void SDL_SetiOSEventPump([NativeTypeName("bool")] SDLBool enabled); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [SupportedOSPlatform("iOS")] diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_thread.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_thread.g.cs index c18a8bb..58d41ae 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_thread.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_thread.g.cs @@ -60,7 +60,7 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetThreadPriority(SDL_ThreadPriority priority); + public static extern SDLBool SDL_SetThreadPriority(SDL_ThreadPriority priority); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_WaitThread(SDL_Thread* thread, int* status); @@ -74,7 +74,7 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetTLS(SDL_TLSID* id, [NativeTypeName("const void *")] IntPtr value, [NativeTypeName("SDL_TLSDestructorCallback")] delegate* unmanaged[Cdecl] destructor); + public static extern SDLBool SDL_SetTLS(SDL_TLSID* id, [NativeTypeName("const void *")] IntPtr value, [NativeTypeName("SDL_TLSDestructorCallback")] delegate* unmanaged[Cdecl] destructor); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_CleanupTLS(); diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_time.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_time.g.cs index 9ebc25b..359f5f6 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_time.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_time.g.cs @@ -65,19 +65,19 @@ namespace SDL { [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetDateTimeLocalePreferences(SDL_DateFormat* dateFormat, SDL_TimeFormat* timeFormat); + public static extern SDLBool SDL_GetDateTimeLocalePreferences(SDL_DateFormat* dateFormat, SDL_TimeFormat* timeFormat); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetCurrentTime(SDL_Time* ticks); + public static extern SDLBool SDL_GetCurrentTime(SDL_Time* ticks); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_TimeToDateTime(SDL_Time ticks, SDL_DateTime* dt, [NativeTypeName("bool")] byte localTime); + public static extern SDLBool SDL_TimeToDateTime(SDL_Time ticks, SDL_DateTime* dt, [NativeTypeName("bool")] SDLBool localTime); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_DateTimeToTime([NativeTypeName("const SDL_DateTime *")] SDL_DateTime* dt, SDL_Time* ticks); + public static extern SDLBool SDL_DateTimeToTime([NativeTypeName("const SDL_DateTime *")] SDL_DateTime* dt, SDL_Time* ticks); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_TimeToWindows(SDL_Time ticks, [NativeTypeName("Uint32 *")] uint* dwLowDateTime, [NativeTypeName("Uint32 *")] uint* dwHighDateTime); diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_timer.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_timer.g.cs index 668038e..c2a3c80 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_timer.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_timer.g.cs @@ -60,7 +60,7 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_RemoveTimer(SDL_TimerID id); + public static extern SDLBool SDL_RemoveTimer(SDL_TimerID id); [NativeTypeName("#define SDL_MS_PER_SECOND 1000")] public const int SDL_MS_PER_SECOND = 1000; diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_video.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_video.g.cs index b682fb2..69a7930 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_video.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_video.g.cs @@ -188,11 +188,11 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetDisplayBounds(SDL_DisplayID displayID, SDL_Rect* rect); + public static extern SDLBool SDL_GetDisplayBounds(SDL_DisplayID displayID, SDL_Rect* rect); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetDisplayUsableBounds(SDL_DisplayID displayID, SDL_Rect* rect); + public static extern SDLBool SDL_GetDisplayUsableBounds(SDL_DisplayID displayID, SDL_Rect* rect); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_DisplayOrientation SDL_GetNaturalDisplayOrientation(SDL_DisplayID displayID); @@ -208,7 +208,7 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetClosestFullscreenDisplayMode(SDL_DisplayID displayID, int w, int h, float refresh_rate, [NativeTypeName("bool")] byte include_high_density_modes, SDL_DisplayMode* mode); + public static extern SDLBool SDL_GetClosestFullscreenDisplayMode(SDL_DisplayID displayID, int w, int h, float refresh_rate, [NativeTypeName("bool")] SDLBool include_high_density_modes, SDL_DisplayMode* mode); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("const SDL_DisplayMode *")] @@ -235,7 +235,7 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetWindowFullscreenMode(SDL_Window* window, [NativeTypeName("const SDL_DisplayMode *")] SDL_DisplayMode* mode); + public static extern SDLBool SDL_SetWindowFullscreenMode(SDL_Window* window, [NativeTypeName("const SDL_DisplayMode *")] SDL_DisplayMode* mode); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("const SDL_DisplayMode *")] @@ -277,7 +277,7 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetWindowTitle(SDL_Window* window, [NativeTypeName("const char *")] byte* title); + public static extern SDLBool SDL_SetWindowTitle(SDL_Window* window, [NativeTypeName("const char *")] byte* title); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetWindowTitle", ExactSpelling = true)] [return: NativeTypeName("const char *")] @@ -285,153 +285,153 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetWindowIcon(SDL_Window* window, SDL_Surface* icon); + public static extern SDLBool SDL_SetWindowIcon(SDL_Window* window, SDL_Surface* icon); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetWindowPosition(SDL_Window* window, int x, int y); + public static extern SDLBool SDL_SetWindowPosition(SDL_Window* window, int x, int y); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetWindowPosition(SDL_Window* window, int* x, int* y); + public static extern SDLBool SDL_GetWindowPosition(SDL_Window* window, int* x, int* y); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetWindowSize(SDL_Window* window, int w, int h); + public static extern SDLBool SDL_SetWindowSize(SDL_Window* window, int w, int h); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetWindowSize(SDL_Window* window, int* w, int* h); + public static extern SDLBool SDL_GetWindowSize(SDL_Window* window, int* w, int* h); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetWindowSafeArea(SDL_Window* window, SDL_Rect* rect); + public static extern SDLBool SDL_GetWindowSafeArea(SDL_Window* window, SDL_Rect* rect); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetWindowAspectRatio(SDL_Window* window, float min_aspect, float max_aspect); + public static extern SDLBool SDL_SetWindowAspectRatio(SDL_Window* window, float min_aspect, float max_aspect); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetWindowAspectRatio(SDL_Window* window, float* min_aspect, float* max_aspect); + public static extern SDLBool SDL_GetWindowAspectRatio(SDL_Window* window, float* min_aspect, float* max_aspect); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetWindowBordersSize(SDL_Window* window, int* top, int* left, int* bottom, int* right); + public static extern SDLBool SDL_GetWindowBordersSize(SDL_Window* window, int* top, int* left, int* bottom, int* right); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetWindowSizeInPixels(SDL_Window* window, int* w, int* h); + public static extern SDLBool SDL_GetWindowSizeInPixels(SDL_Window* window, int* w, int* h); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetWindowMinimumSize(SDL_Window* window, int min_w, int min_h); + public static extern SDLBool SDL_SetWindowMinimumSize(SDL_Window* window, int min_w, int min_h); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetWindowMinimumSize(SDL_Window* window, int* w, int* h); + public static extern SDLBool SDL_GetWindowMinimumSize(SDL_Window* window, int* w, int* h); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetWindowMaximumSize(SDL_Window* window, int max_w, int max_h); + public static extern SDLBool SDL_SetWindowMaximumSize(SDL_Window* window, int max_w, int max_h); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetWindowMaximumSize(SDL_Window* window, int* w, int* h); + public static extern SDLBool SDL_GetWindowMaximumSize(SDL_Window* window, int* w, int* h); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetWindowBordered(SDL_Window* window, [NativeTypeName("bool")] byte bordered); + public static extern SDLBool SDL_SetWindowBordered(SDL_Window* window, [NativeTypeName("bool")] SDLBool bordered); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetWindowResizable(SDL_Window* window, [NativeTypeName("bool")] byte resizable); + public static extern SDLBool SDL_SetWindowResizable(SDL_Window* window, [NativeTypeName("bool")] SDLBool resizable); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetWindowAlwaysOnTop(SDL_Window* window, [NativeTypeName("bool")] byte on_top); + public static extern SDLBool SDL_SetWindowAlwaysOnTop(SDL_Window* window, [NativeTypeName("bool")] SDLBool on_top); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_ShowWindow(SDL_Window* window); + public static extern SDLBool SDL_ShowWindow(SDL_Window* window); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_HideWindow(SDL_Window* window); + public static extern SDLBool SDL_HideWindow(SDL_Window* window); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_RaiseWindow(SDL_Window* window); + public static extern SDLBool SDL_RaiseWindow(SDL_Window* window); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_MaximizeWindow(SDL_Window* window); + public static extern SDLBool SDL_MaximizeWindow(SDL_Window* window); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_MinimizeWindow(SDL_Window* window); + public static extern SDLBool SDL_MinimizeWindow(SDL_Window* window); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_RestoreWindow(SDL_Window* window); + public static extern SDLBool SDL_RestoreWindow(SDL_Window* window); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetWindowFullscreen(SDL_Window* window, [NativeTypeName("bool")] byte fullscreen); + public static extern SDLBool SDL_SetWindowFullscreen(SDL_Window* window, [NativeTypeName("bool")] SDLBool fullscreen); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SyncWindow(SDL_Window* window); + public static extern SDLBool SDL_SyncWindow(SDL_Window* window); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_WindowHasSurface(SDL_Window* window); + public static extern SDLBool SDL_WindowHasSurface(SDL_Window* window); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_Surface* SDL_GetWindowSurface(SDL_Window* window); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetWindowSurfaceVSync(SDL_Window* window, int vsync); + public static extern SDLBool SDL_SetWindowSurfaceVSync(SDL_Window* window, int vsync); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetWindowSurfaceVSync(SDL_Window* window, int* vsync); + public static extern SDLBool SDL_GetWindowSurfaceVSync(SDL_Window* window, int* vsync); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_UpdateWindowSurface(SDL_Window* window); + public static extern SDLBool SDL_UpdateWindowSurface(SDL_Window* window); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_UpdateWindowSurfaceRects(SDL_Window* window, [NativeTypeName("const SDL_Rect *")] SDL_Rect* rects, int numrects); + public static extern SDLBool SDL_UpdateWindowSurfaceRects(SDL_Window* window, [NativeTypeName("const SDL_Rect *")] SDL_Rect* rects, int numrects); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_DestroyWindowSurface(SDL_Window* window); + public static extern SDLBool SDL_DestroyWindowSurface(SDL_Window* window); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetWindowKeyboardGrab(SDL_Window* window, [NativeTypeName("bool")] byte grabbed); + public static extern SDLBool SDL_SetWindowKeyboardGrab(SDL_Window* window, [NativeTypeName("bool")] SDLBool grabbed); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetWindowMouseGrab(SDL_Window* window, [NativeTypeName("bool")] byte grabbed); + public static extern SDLBool SDL_SetWindowMouseGrab(SDL_Window* window, [NativeTypeName("bool")] SDLBool grabbed); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetWindowKeyboardGrab(SDL_Window* window); + public static extern SDLBool SDL_GetWindowKeyboardGrab(SDL_Window* window); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetWindowMouseGrab(SDL_Window* window); + public static extern SDLBool SDL_GetWindowMouseGrab(SDL_Window* window); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_Window* SDL_GetGrabbedWindow(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetWindowMouseRect(SDL_Window* window, [NativeTypeName("const SDL_Rect *")] SDL_Rect* rect); + public static extern SDLBool SDL_SetWindowMouseRect(SDL_Window* window, [NativeTypeName("const SDL_Rect *")] SDL_Rect* rect); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("const SDL_Rect *")] @@ -439,57 +439,57 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetWindowOpacity(SDL_Window* window, float opacity); + public static extern SDLBool SDL_SetWindowOpacity(SDL_Window* window, float opacity); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern float SDL_GetWindowOpacity(SDL_Window* window); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetWindowParent(SDL_Window* window, SDL_Window* parent); + public static extern SDLBool SDL_SetWindowParent(SDL_Window* window, SDL_Window* parent); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetWindowModal(SDL_Window* window, [NativeTypeName("bool")] byte modal); + public static extern SDLBool SDL_SetWindowModal(SDL_Window* window, [NativeTypeName("bool")] SDLBool modal); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetWindowFocusable(SDL_Window* window, [NativeTypeName("bool")] byte focusable); + public static extern SDLBool SDL_SetWindowFocusable(SDL_Window* window, [NativeTypeName("bool")] SDLBool focusable); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_ShowWindowSystemMenu(SDL_Window* window, int x, int y); + public static extern SDLBool SDL_ShowWindowSystemMenu(SDL_Window* window, int x, int y); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetWindowHitTest(SDL_Window* window, [NativeTypeName("SDL_HitTest")] delegate* unmanaged[Cdecl] callback, [NativeTypeName("void*")] IntPtr callback_data); + public static extern SDLBool SDL_SetWindowHitTest(SDL_Window* window, [NativeTypeName("SDL_HitTest")] delegate* unmanaged[Cdecl] callback, [NativeTypeName("void*")] IntPtr callback_data); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetWindowShape(SDL_Window* window, SDL_Surface* shape); + public static extern SDLBool SDL_SetWindowShape(SDL_Window* window, SDL_Surface* shape); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_FlashWindow(SDL_Window* window, SDL_FlashOperation operation); + public static extern SDLBool SDL_FlashWindow(SDL_Window* window, SDL_FlashOperation operation); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_DestroyWindow(SDL_Window* window); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_ScreenSaverEnabled(); + public static extern SDLBool SDL_ScreenSaverEnabled(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_EnableScreenSaver(); + public static extern SDLBool SDL_EnableScreenSaver(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_DisableScreenSaver(); + public static extern SDLBool SDL_DisableScreenSaver(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GL_LoadLibrary([NativeTypeName("const char *")] byte* path); + public static extern SDLBool SDL_GL_LoadLibrary([NativeTypeName("const char *")] byte* path); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("SDL_FunctionPointer")] @@ -504,18 +504,18 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GL_ExtensionSupported([NativeTypeName("const char *")] byte* extension); + public static extern SDLBool SDL_GL_ExtensionSupported([NativeTypeName("const char *")] byte* extension); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_GL_ResetAttributes(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GL_SetAttribute(SDL_GLattr attr, int value); + public static extern SDLBool SDL_GL_SetAttribute(SDL_GLattr attr, int value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GL_GetAttribute(SDL_GLattr attr, int* value); + public static extern SDLBool SDL_GL_GetAttribute(SDL_GLattr attr, int* value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("SDL_GLContext")] @@ -523,7 +523,7 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GL_MakeCurrent(SDL_Window* window, [NativeTypeName("SDL_GLContext")] SDL_GLContextState* context); + public static extern SDLBool SDL_GL_MakeCurrent(SDL_Window* window, [NativeTypeName("SDL_GLContext")] SDL_GLContextState* context); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_Window* SDL_GL_GetCurrentWindow(); @@ -549,19 +549,19 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GL_SetSwapInterval(int interval); + public static extern SDLBool SDL_GL_SetSwapInterval(int interval); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GL_GetSwapInterval(int* interval); + public static extern SDLBool SDL_GL_GetSwapInterval(int* interval); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GL_SwapWindow(SDL_Window* window); + public static extern SDLBool SDL_GL_SwapWindow(SDL_Window* window); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GL_DestroyContext([NativeTypeName("SDL_GLContext")] SDL_GLContextState* context); + public static extern SDLBool SDL_GL_DestroyContext([NativeTypeName("SDL_GLContext")] SDL_GLContextState* context); [NativeTypeName("#define SDL_PROP_GLOBAL_VIDEO_WAYLAND_WL_DISPLAY_POINTER \"SDL.video.wayland.wl_display\"")] public static ReadOnlySpan SDL_PROP_GLOBAL_VIDEO_WAYLAND_WL_DISPLAY_POINTER => "SDL.video.wayland.wl_display"u8; diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_vulkan.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_vulkan.g.cs index 0cbe337..492abb7 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_vulkan.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_vulkan.g.cs @@ -48,7 +48,7 @@ namespace SDL { [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_Vulkan_LoadLibrary([NativeTypeName("const char *")] byte* path); + public static extern SDLBool SDL_Vulkan_LoadLibrary([NativeTypeName("const char *")] byte* path); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("SDL_FunctionPointer")] @@ -63,13 +63,13 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_Vulkan_CreateSurface(SDL_Window* window, [NativeTypeName("VkInstance")] VkInstance_T* instance, [NativeTypeName("const struct VkAllocationCallbacks *")] VkAllocationCallbacks* allocator, [NativeTypeName("VkSurfaceKHR *")] VkSurfaceKHR_T** surface); + public static extern SDLBool SDL_Vulkan_CreateSurface(SDL_Window* window, [NativeTypeName("VkInstance")] VkInstance_T* instance, [NativeTypeName("const struct VkAllocationCallbacks *")] VkAllocationCallbacks* allocator, [NativeTypeName("VkSurfaceKHR *")] VkSurfaceKHR_T** surface); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_Vulkan_DestroySurface([NativeTypeName("VkInstance")] VkInstance_T* instance, [NativeTypeName("VkSurfaceKHR")] VkSurfaceKHR_T* surface, [NativeTypeName("const struct VkAllocationCallbacks *")] VkAllocationCallbacks* allocator); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_Vulkan_GetPresentationSupport([NativeTypeName("VkInstance")] VkInstance_T* instance, [NativeTypeName("VkPhysicalDevice")] VkPhysicalDevice_T* physicalDevice, [NativeTypeName("Uint32")] uint queueFamilyIndex); + public static extern SDLBool SDL_Vulkan_GetPresentationSupport([NativeTypeName("VkInstance")] VkInstance_T* instance, [NativeTypeName("VkPhysicalDevice")] VkPhysicalDevice_T* physicalDevice, [NativeTypeName("Uint32")] uint queueFamilyIndex); } } diff --git a/SDL3-CS/SDL3/SDL_clipboard.cs b/SDL3-CS/SDL3/SDL_clipboard.cs index 7869685..4f3abd4 100644 --- a/SDL3-CS/SDL3/SDL_clipboard.cs +++ b/SDL3-CS/SDL3/SDL_clipboard.cs @@ -14,9 +14,9 @@ namespace SDL { [LibraryImport("SDL3", StringMarshalling = StringMarshalling.Utf8)] [UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])] - private static unsafe partial SDL_bool SDL_SetClipboardData(SDL_ClipboardDataCallback callback, SDL_ClipboardCleanupCallback cleanup, IntPtr userdata, string[] mime_types, UIntPtr num_mime_types); + private static unsafe partial SDLBool SDL_SetClipboardData(SDL_ClipboardDataCallback callback, SDL_ClipboardCleanupCallback cleanup, IntPtr userdata, string[] mime_types, UIntPtr num_mime_types); - public static unsafe SDL_bool SDL_SetClipboardData(SDL_ClipboardDataCallback callback, SDL_ClipboardCleanupCallback cleanup, IntPtr userdata, params string[] mime_types) + public static unsafe SDLBool SDL_SetClipboardData(SDL_ClipboardDataCallback callback, SDL_ClipboardCleanupCallback cleanup, IntPtr userdata, params string[] mime_types) => SDL_SetClipboardData(callback, cleanup, userdata, mime_types, (UIntPtr)mime_types.Length); } } diff --git a/SDL3-CS/SDL3/SDL_error.cs b/SDL3-CS/SDL3/SDL_error.cs index e8ad5e0..749bbbc 100644 --- a/SDL3-CS/SDL3/SDL_error.cs +++ b/SDL3-CS/SDL3/SDL_error.cs @@ -6,14 +6,14 @@ namespace SDL public static partial class SDL3 { [Macro] - public static unsafe SDL_bool SDL_Unsupported() + public static unsafe SDLBool SDL_Unsupported() { fixed (byte* fmt = "That operation is not supported"u8) return SDL_SetError(fmt, __arglist()); } [Macro] - public static unsafe SDL_bool SDL_InvalidParamError([NativeTypeName("const char *")] byte* param) + public static unsafe SDLBool SDL_InvalidParamError([NativeTypeName("const char *")] byte* param) { fixed (byte* fmt = "Parameter '%s' is invalid"u8) return SDL_SetError(fmt, __arglist(param)); diff --git a/SDL3-CS/SDL3/SDL_events.cs b/SDL3-CS/SDL3/SDL_events.cs index 17b8aff..dc7b1ba 100644 --- a/SDL3-CS/SDL3/SDL_events.cs +++ b/SDL3-CS/SDL3/SDL_events.cs @@ -58,10 +58,10 @@ namespace SDL return SDL_PeepEvents(eventsPtr, events.Length, action, (uint)minType, (uint)maxType); } - public static SDL_bool SDL_HasEvent(SDL_EventType type) => SDL_HasEvent((uint)type); + public static SDLBool SDL_HasEvent(SDL_EventType type) => SDL_HasEvent((uint)type); public static void SDL_FlushEvent(SDL_EventType type) => SDL_FlushEvent((uint)type); public static void SDL_FlushEvents(SDL_EventType minType, SDL_EventType maxType) => SDL_FlushEvents((uint)minType, (uint)maxType); - public static void SDL_SetEventEnabled(SDL_EventType type, SDL_bool enabled) => SDL_SetEventEnabled((uint)type, enabled); - public static SDL_bool SDL_EventEnabled(SDL_EventType type) => SDL_EventEnabled((uint)type); + public static void SDL_SetEventEnabled(SDL_EventType type, bool enabled) => SDL_SetEventEnabled((uint)type, enabled); + public static SDLBool SDL_EventEnabled(SDL_EventType type) => SDL_EventEnabled((uint)type); } } diff --git a/SDL3-CS/SDL3/SDL_stdinc.cs b/SDL3-CS/SDL3/SDL_stdinc.cs index fc84885..b13d02f 100644 --- a/SDL3-CS/SDL3/SDL_stdinc.cs +++ b/SDL3-CS/SDL3/SDL_stdinc.cs @@ -2,14 +2,40 @@ // See the LICENCE file in the repository root for full licence text. using System; +using System.Text; namespace SDL { - [Typedef] - public enum SDL_bool : byte + public readonly record struct SDLBool { - SDL_FALSE = SDL3.SDL_FALSE, - SDL_TRUE = SDL3.SDL_TRUE + private readonly byte value; + + internal const byte FALSE_VALUE = 0; + internal const byte TRUE_VALUE = 1; + + [Obsolete("Never explicitly construct an SDL bool.")] + public SDLBool() + { + } + + internal SDLBool(byte value) + { + this.value = value; + } + + public static implicit operator bool(SDLBool b) => b.value != FALSE_VALUE; + + public static implicit operator SDLBool(bool b) => new SDLBool(b ? TRUE_VALUE : FALSE_VALUE); + + public bool Equals(SDLBool other) => (bool)other == (bool)this; + + public override int GetHashCode() => ((bool)this).GetHashCode(); + + private bool PrintMembers(StringBuilder builder) + { + builder.Append($"0x{value:x2}"); + return true; + } } [Typedef] diff --git a/SDL3-CS/generate_bindings.py b/SDL3-CS/generate_bindings.py index dc69a13..bb6bc9e 100644 --- a/SDL3-CS/generate_bindings.py +++ b/SDL3-CS/generate_bindings.py @@ -229,6 +229,7 @@ base_command = [ "void*=IntPtr", "char=byte", "wchar_t *=IntPtr", # wchar_t has a platform-defined size + "bool=SDLBool", # treat bool as C# helper type "--define-macro", "SDL_FUNCTION_POINTER_IS_VOID_POINTER",