Add SDLBool with implicit bool conversions

This commit is contained in:
Susko3 2024-09-22 02:03:16 +01:00
parent fa7121a2c4
commit 4f32e5fb4e
55 changed files with 613 additions and 556 deletions

View File

@ -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));
}

View File

@ -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<MyWindow>(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<MyWindow>(userdata);
if (handle.GetTarget(out var window))
return window.handleEventFromFilter(e);
return SDL_bool.SDL_TRUE;
return true;
}
public Action<SDL_Event>? 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:

View File

@ -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 ");

View File

@ -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);

View File

@ -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;
}

View File

@ -1,6 +1,7 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. 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));
}
}
}

View File

@ -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*")]

View File

@ -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]<IntPtr, SDL_AudioStream*, int, int, void> callback, [NativeTypeName("void*")] IntPtr userdata);
public static extern SDLBool SDL_SetAudioStreamGetCallback(SDL_AudioStream* stream, [NativeTypeName("SDL_AudioStreamCallback")] delegate* unmanaged[Cdecl]<IntPtr, SDL_AudioStream*, int, int, void> 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]<IntPtr, SDL_AudioStream*, int, int, void> callback, [NativeTypeName("void*")] IntPtr userdata);
public static extern SDLBool SDL_SetAudioStreamPutCallback(SDL_AudioStream* stream, [NativeTypeName("SDL_AudioStreamCallback")] delegate* unmanaged[Cdecl]<IntPtr, SDL_AudioStream*, int, int, void> 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]<IntPtr, SDL_AudioSpec*, float*, int, void> callback, [NativeTypeName("void*")] IntPtr userdata);
public static extern SDLBool SDL_SetAudioPostmixCallback(SDL_AudioDeviceID devid, [NativeTypeName("SDL_AudioPostmixCallback")] delegate* unmanaged[Cdecl]<IntPtr, SDL_AudioSpec*, float*, int, void> 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 *")]

View File

@ -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);

View File

@ -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]<IntPtr, byte*, nuint*, IntPtr> callback, [NativeTypeName("SDL_ClipboardCleanupCallback")] delegate* unmanaged[Cdecl]<IntPtr, void> 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]<IntPtr, byte*, nuint*, IntPtr> callback, [NativeTypeName("SDL_ClipboardCleanupCallback")] delegate* unmanaged[Cdecl]<IntPtr, void> 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);
}
}

View File

@ -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();

View File

@ -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]<IntPtr, byte**, int, void> 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]<IntPtr, byte**, int, void> 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]<IntPtr, byte**, int, void> 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]<IntPtr, byte**, int, void> 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]<IntPtr, byte**, int, void> callback, [NativeTypeName("void*")] IntPtr userdata, SDL_Window* window, [NativeTypeName("const char *")] byte* default_location, [NativeTypeName("bool")] SDLBool allow_many);
}
}

View File

@ -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();
}
}

View File

@ -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]<IntPtr, SDL_Event*, byte> filter, [NativeTypeName("void*")] IntPtr userdata);
public static extern void SDL_SetEventFilter([NativeTypeName("SDL_EventFilter")] delegate* unmanaged[Cdecl]<IntPtr, SDL_Event*, SDLBool> 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]<IntPtr, SDL_Event*, byte>* filter, [NativeTypeName("void **")] IntPtr* userdata);
public static extern SDLBool SDL_GetEventFilter([NativeTypeName("SDL_EventFilter *")] delegate* unmanaged[Cdecl]<IntPtr, SDL_Event*, SDLBool>* 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]<IntPtr, SDL_Event*, byte> filter, [NativeTypeName("void*")] IntPtr userdata);
public static extern SDLBool SDL_AddEventWatch([NativeTypeName("SDL_EventFilter")] delegate* unmanaged[Cdecl]<IntPtr, SDL_Event*, SDLBool> filter, [NativeTypeName("void*")] IntPtr userdata);
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern void SDL_RemoveEventWatch([NativeTypeName("SDL_EventFilter")] delegate* unmanaged[Cdecl]<IntPtr, SDL_Event*, byte> filter, [NativeTypeName("void*")] IntPtr userdata);
public static extern void SDL_RemoveEventWatch([NativeTypeName("SDL_EventFilter")] delegate* unmanaged[Cdecl]<IntPtr, SDL_Event*, SDLBool> filter, [NativeTypeName("void*")] IntPtr userdata);
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern void SDL_FilterEvents([NativeTypeName("SDL_EventFilter")] delegate* unmanaged[Cdecl]<IntPtr, SDL_Event*, byte> filter, [NativeTypeName("void*")] IntPtr userdata);
public static extern void SDL_FilterEvents([NativeTypeName("SDL_EventFilter")] delegate* unmanaged[Cdecl]<IntPtr, SDL_Event*, SDLBool> 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")]

View File

@ -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]<IntPtr, byte*, byte*, int> callback, [NativeTypeName("void*")] IntPtr userdata);
public static extern SDLBool SDL_EnumerateDirectory([NativeTypeName("const char *")] byte* path, [NativeTypeName("SDL_EnumerateDirectoryCallback")] delegate* unmanaged[Cdecl]<IntPtr, byte*, byte*, int> 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 **")]

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);
}
}

View File

@ -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]<IntPtr, byte*, byte*, byte*, void> callback, [NativeTypeName("void*")] IntPtr userdata);
public static extern SDLBool SDL_AddHintCallback([NativeTypeName("const char *")] byte* name, [NativeTypeName("SDL_HintCallback")] delegate* unmanaged[Cdecl]<IntPtr, byte*, byte*, byte*, void> 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]<IntPtr, byte*, byte*, byte*, void> callback, [NativeTypeName("void*")] IntPtr userdata);

View File

@ -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 *")]

View File

@ -63,10 +63,10 @@ namespace SDL
public delegate* unmanaged[Cdecl]<IntPtr, IntPtr, nuint, SDL_IOStatus*, nuint> write;
[NativeTypeName("bool (*)(void *, SDL_IOStatus *)")]
public delegate* unmanaged[Cdecl]<IntPtr, SDL_IOStatus*, byte> flush;
public delegate* unmanaged[Cdecl]<IntPtr, SDL_IOStatus*, SDLBool> flush;
[NativeTypeName("bool (*)(void *)")]
public delegate* unmanaged[Cdecl]<IntPtr, byte> close;
public delegate* unmanaged[Cdecl]<IntPtr, SDLBool> 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<byte> SDL_PROP_IOSTREAM_WINDOWS_HANDLE_POINTER => "SDL.iostream.windows.handle"u8;

View File

@ -141,19 +141,19 @@ namespace SDL
public delegate* unmanaged[Cdecl]<IntPtr, int, void> SetPlayerIndex;
[NativeTypeName("bool (*)(void *, Uint16, Uint16)")]
public delegate* unmanaged[Cdecl]<IntPtr, ushort, ushort, byte> Rumble;
public delegate* unmanaged[Cdecl]<IntPtr, ushort, ushort, SDLBool> Rumble;
[NativeTypeName("bool (*)(void *, Uint16, Uint16)")]
public delegate* unmanaged[Cdecl]<IntPtr, ushort, ushort, byte> RumbleTriggers;
public delegate* unmanaged[Cdecl]<IntPtr, ushort, ushort, SDLBool> RumbleTriggers;
[NativeTypeName("bool (*)(void *, Uint8, Uint8, Uint8)")]
public delegate* unmanaged[Cdecl]<IntPtr, byte, byte, byte, byte> SetLED;
public delegate* unmanaged[Cdecl]<IntPtr, byte, byte, byte, SDLBool> SetLED;
[NativeTypeName("bool (*)(void *, const void *, int)")]
public delegate* unmanaged[Cdecl]<IntPtr, IntPtr, int, byte> SendEffect;
public delegate* unmanaged[Cdecl]<IntPtr, IntPtr, int, SDLBool> SendEffect;
[NativeTypeName("bool (*)(void *, bool)")]
public delegate* unmanaged[Cdecl]<IntPtr, byte, byte> SetSensorsEnabled;
public delegate* unmanaged[Cdecl]<IntPtr, SDLBool, SDLBool> SetSensorsEnabled;
[NativeTypeName("void (*)(void *)")]
public delegate* unmanaged[Cdecl]<IntPtr, void> 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);

View File

@ -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<byte> SDL_PROP_TEXTINPUT_TYPE_NUMBER => "SDL.textinput.type"u8;

View File

@ -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);

View File

@ -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")]

View File

@ -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;

View File

@ -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);
}
}

View File

@ -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;

View File

@ -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);
}
}

View File

@ -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);

View File

@ -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);

View File

@ -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]<IntPtr, IntPtr, void> 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]<IntPtr, IntPtr, void> 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]<IntPtr, SDL_PropertiesID, byte*, void> callback, [NativeTypeName("void*")] IntPtr userdata);
public static extern SDLBool SDL_EnumerateProperties(SDL_PropertiesID props, [NativeTypeName("SDL_EnumeratePropertiesCallback")] delegate* unmanaged[Cdecl]<IntPtr, SDL_PropertiesID, byte*, void> callback, [NativeTypeName("void*")] IntPtr userdata);
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern void SDL_DestroyProperties(SDL_PropertiesID props);

View File

@ -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);
}
}

View File

@ -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<byte> SDL_SOFTWARE_RENDERER => "software"u8;

View File

@ -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);

View File

@ -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]<nuint, IntPtr> malloc_func, [NativeTypeName("SDL_calloc_func")] delegate* unmanaged[Cdecl]<nuint, nuint, IntPtr> calloc_func, [NativeTypeName("SDL_realloc_func")] delegate* unmanaged[Cdecl]<IntPtr, nuint, IntPtr> realloc_func, [NativeTypeName("SDL_free_func")] delegate* unmanaged[Cdecl]<IntPtr, void> free_func);
public static extern SDLBool SDL_SetMemoryFunctions([NativeTypeName("SDL_malloc_func")] delegate* unmanaged[Cdecl]<nuint, IntPtr> malloc_func, [NativeTypeName("SDL_calloc_func")] delegate* unmanaged[Cdecl]<nuint, nuint, IntPtr> calloc_func, [NativeTypeName("SDL_realloc_func")] delegate* unmanaged[Cdecl]<IntPtr, nuint, IntPtr> realloc_func, [NativeTypeName("SDL_free_func")] delegate* unmanaged[Cdecl]<IntPtr, void> 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)
{

View File

@ -34,34 +34,34 @@ namespace SDL
public uint version;
[NativeTypeName("bool (*)(void *)")]
public delegate* unmanaged[Cdecl]<IntPtr, byte> close;
public delegate* unmanaged[Cdecl]<IntPtr, SDLBool> close;
[NativeTypeName("bool (*)(void *)")]
public delegate* unmanaged[Cdecl]<IntPtr, byte> ready;
public delegate* unmanaged[Cdecl]<IntPtr, SDLBool> ready;
[NativeTypeName("bool (*)(void *, const char *, SDL_EnumerateDirectoryCallback, void *)")]
public delegate* unmanaged[Cdecl]<IntPtr, byte*, delegate* unmanaged[Cdecl]<IntPtr, byte*, byte*, int>, IntPtr, byte> enumerate;
public delegate* unmanaged[Cdecl]<IntPtr, byte*, delegate* unmanaged[Cdecl]<IntPtr, byte*, byte*, int>, IntPtr, SDLBool> enumerate;
[NativeTypeName("bool (*)(void *, const char *, SDL_PathInfo *)")]
public delegate* unmanaged[Cdecl]<IntPtr, byte*, SDL_PathInfo*, byte> info;
public delegate* unmanaged[Cdecl]<IntPtr, byte*, SDL_PathInfo*, SDLBool> info;
[NativeTypeName("bool (*)(void *, const char *, void *, Uint64)")]
public delegate* unmanaged[Cdecl]<IntPtr, byte*, IntPtr, ulong, byte> read_file;
public delegate* unmanaged[Cdecl]<IntPtr, byte*, IntPtr, ulong, SDLBool> read_file;
[NativeTypeName("bool (*)(void *, const char *, const void *, Uint64)")]
public delegate* unmanaged[Cdecl]<IntPtr, byte*, IntPtr, ulong, byte> write_file;
public delegate* unmanaged[Cdecl]<IntPtr, byte*, IntPtr, ulong, SDLBool> write_file;
[NativeTypeName("bool (*)(void *, const char *)")]
public delegate* unmanaged[Cdecl]<IntPtr, byte*, byte> mkdir;
public delegate* unmanaged[Cdecl]<IntPtr, byte*, SDLBool> mkdir;
[NativeTypeName("bool (*)(void *, const char *)")]
public delegate* unmanaged[Cdecl]<IntPtr, byte*, byte> remove;
public delegate* unmanaged[Cdecl]<IntPtr, byte*, SDLBool> remove;
[NativeTypeName("bool (*)(void *, const char *, const char *)")]
public delegate* unmanaged[Cdecl]<IntPtr, byte*, byte*, byte> rename;
public delegate* unmanaged[Cdecl]<IntPtr, byte*, byte*, SDLBool> rename;
[NativeTypeName("bool (*)(void *, const char *, const char *)")]
public delegate* unmanaged[Cdecl]<IntPtr, byte*, byte*, byte> copy;
public delegate* unmanaged[Cdecl]<IntPtr, byte*, byte*, SDLBool> copy;
[NativeTypeName("Uint64 (*)(void *)")]
public delegate* unmanaged[Cdecl]<IntPtr, ulong> 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]<IntPtr, byte*, byte*, int> 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]<IntPtr, byte*, byte*, int> 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")]

View File

@ -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;

View File

@ -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]<IntPtr, byte*, byte, void> cb, [NativeTypeName("void*")] IntPtr userdata);
public static extern SDLBool SDL_RequestAndroidPermission([NativeTypeName("const char *")] byte* permission, [NativeTypeName("SDL_RequestAndroidPermissionCallback")] delegate* unmanaged[Cdecl]<IntPtr, byte*, SDLBool, void> 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;

View File

@ -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);
}
}

View File

@ -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);
}
}

View File

@ -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]<IntPtr, MSG*, byte> callback, [NativeTypeName("void*")] IntPtr userdata);
public static extern void SDL_SetWindowsMessageHook([NativeTypeName("SDL_WindowsMessageHook")] delegate* unmanaged[Cdecl]<IntPtr, MSG*, SDLBool> 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);
}
}

View File

@ -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]<IntPtr, IntPtr, byte> callback, [NativeTypeName("void*")] IntPtr userdata);
public static extern void SDL_SetX11EventHook([NativeTypeName("SDL_X11EventHook")] delegate* unmanaged[Cdecl]<IntPtr, IntPtr, SDLBool> 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();

View File

@ -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]<IntPtr, void> callback, [NativeTypeName("void*")] IntPtr callbackParam);
public static extern SDLBool SDL_SetiOSAnimationCallback(SDL_Window* window, int interval, [NativeTypeName("SDL_iOSAnimationCallback")] delegate* unmanaged[Cdecl]<IntPtr, void> 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")]

View File

@ -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]<IntPtr, void> destructor);
public static extern SDLBool SDL_SetTLS(SDL_TLSID* id, [NativeTypeName("const void *")] IntPtr value, [NativeTypeName("SDL_TLSDestructorCallback")] delegate* unmanaged[Cdecl]<IntPtr, void> destructor);
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern void SDL_CleanupTLS();

View File

@ -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);

View File

@ -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;

View File

@ -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]<SDL_Window*, SDL_Point*, IntPtr, SDL_HitTestResult> callback, [NativeTypeName("void*")] IntPtr callback_data);
public static extern SDLBool SDL_SetWindowHitTest(SDL_Window* window, [NativeTypeName("SDL_HitTest")] delegate* unmanaged[Cdecl]<SDL_Window*, SDL_Point*, IntPtr, SDL_HitTestResult> 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<byte> SDL_PROP_GLOBAL_VIDEO_WAYLAND_WL_DISPLAY_POINTER => "SDL.video.wayland.wl_display"u8;

View File

@ -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);
}
}

View File

@ -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);
}
}

View File

@ -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));

View File

@ -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);
}
}

View File

@ -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]

View File

@ -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",