From 5fbda17ae9b7d3d2dfdf64b0569d5e6f1edb4603 Mon Sep 17 00:00:00 2001 From: Susko3 Date: Sun, 22 Sep 2024 00:44:50 +0100 Subject: [PATCH 1/4] Fix python formatting --- SDL3-CS/generate_bindings.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/SDL3-CS/generate_bindings.py b/SDL3-CS/generate_bindings.py index 67adf6a..5a5fa6e 100644 --- a/SDL3-CS/generate_bindings.py +++ b/SDL3-CS/generate_bindings.py @@ -27,6 +27,7 @@ SDL3_header_base = "SDL3" # base folder of header files csproj_root = repository_root / "SDL3-CS" + class Header: """Represents a SDL header file that is used in ClangSharp generation.""" @@ -130,20 +131,22 @@ headers = [ add("SDL3/SDL_vulkan.h"), ] + def prepare_sdl_source(): subprocess.run([ "git", "reset", "--hard", "HEAD" - ], cwd = SDL_root) + ], cwd=SDL_root) subprocess.run([ "git", "apply", "--3way", repository_root / "External" / "SDL-use-proper-types.patch" - ], cwd = SDL_root) + ], cwd=SDL_root) + def get_sdl_api_dump(): subprocess.run([ From fb08ccb2cedb4ea765208a6d7e1860be80eebd00 Mon Sep 17 00:00:00 2001 From: Susko3 Date: Sun, 22 Sep 2024 00:51:50 +0100 Subject: [PATCH 2/4] Remove SDL_bool define patche This doesn't compile as true/false can't be converted to `enum SDL_bool` --- External/SDL-use-proper-types.patch | 48 ------------------------- SDL3-CS/SDL3/ClangSharp/SDL_log.g.cs | 4 +-- SDL3-CS/SDL3/ClangSharp/SDL_rect.g.cs | 12 +++---- SDL3-CS/SDL3/ClangSharp/SDL_stdinc.g.cs | 16 ++++----- SDL3-CS/generate_bindings.py | 7 ---- 5 files changed, 16 insertions(+), 71 deletions(-) delete mode 100644 External/SDL-use-proper-types.patch diff --git a/External/SDL-use-proper-types.patch b/External/SDL-use-proper-types.patch deleted file mode 100644 index 97f181f..0000000 --- a/External/SDL-use-proper-types.patch +++ /dev/null @@ -1,48 +0,0 @@ -diff --git a/include/SDL3/SDL.h b/include/SDL3/SDL.h -index 4e18f6382..d737c7a9a 100644 ---- a/include/SDL3/SDL.h -+++ b/include/SDL3/SDL.h -@@ -28,6 +28,8 @@ - #ifndef SDL_h_ - #define SDL_h_ - -+#error Don't build with enum type changes -+ - #include - #include - #include -diff --git a/include/SDL3/SDL_log.h b/include/SDL3/SDL_log.h -index 3c0e80f38..44f58add3 100644 ---- a/include/SDL3/SDL_log.h -+++ b/include/SDL3/SDL_log.h -@@ -407,7 +407,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_LogMessageV(int category, - * - * \since This datatype is available since SDL 3.0.0. - */ --typedef void (SDLCALL *SDL_LogOutputFunction)(void *userdata, int category, SDL_LogPriority priority, const char *message); -+typedef void (SDLCALL *SDL_LogOutputFunction)(void *userdata, SDL_LogCategory category, SDL_LogPriority priority, const char *message); - - /** - * Get the current log output function. -diff --git a/include/SDL3/SDL_stdinc.h b/include/SDL3/SDL_stdinc.h -index 5539f2a81..3155f3f31 100644 ---- a/include/SDL3/SDL_stdinc.h -+++ b/include/SDL3/SDL_stdinc.h -@@ -194,7 +194,7 @@ void *alloca(size_t); - * - * \sa SDL_bool - */ --#define SDL_FALSE false -+#define SDL_FALSE (SDL_bool)0 - - /** - * A boolean true. -@@ -203,7 +203,7 @@ void *alloca(size_t); - * - * \sa SDL_bool - */ --#define SDL_TRUE true -+#define SDL_TRUE (SDL_bool)1 - - /** - * A boolean type: true or false. diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_log.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_log.g.cs index 5ff9d1b..c6d4472 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_log.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_log.g.cs @@ -108,9 +108,9 @@ namespace SDL public static extern void SDL_LogMessageV(int category, SDL_LogPriority priority, [NativeTypeName("const char *")] byte* fmt, [NativeTypeName("va_list")] byte* ap); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void SDL_GetLogOutputFunction([NativeTypeName("SDL_LogOutputFunction *")] delegate* unmanaged[Cdecl]* callback, [NativeTypeName("void **")] IntPtr* userdata); + public static extern void SDL_GetLogOutputFunction([NativeTypeName("SDL_LogOutputFunction *")] delegate* unmanaged[Cdecl]* callback, [NativeTypeName("void **")] IntPtr* userdata); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void SDL_SetLogOutputFunction([NativeTypeName("SDL_LogOutputFunction")] delegate* unmanaged[Cdecl] callback, [NativeTypeName("void*")] IntPtr userdata); + public static extern void SDL_SetLogOutputFunction([NativeTypeName("SDL_LogOutputFunction")] delegate* unmanaged[Cdecl] callback, [NativeTypeName("void*")] IntPtr userdata); } } diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_rect.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_rect.g.cs index c3f6f53..47e65ae 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_rect.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_rect.g.cs @@ -75,17 +75,17 @@ namespace SDL public static SDL_bool 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))) ? (SDL_bool)(1) : (SDL_bool)(0); + 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 SDL_bool SDL_RectEmpty([NativeTypeName("const SDL_Rect *")] SDL_Rect* r) { - return ((r == null) || (r->w <= 0) || (r->h <= 0)) ? (SDL_bool)(1) : (SDL_bool)(0); + return ((r == null) || (r->w <= 0) || (r->h <= 0)) ? true : false; } public static SDL_bool 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)) ? (SDL_bool)(1) : (SDL_bool)(0); + 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)] @@ -105,17 +105,17 @@ namespace SDL public static SDL_bool 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))) ? (SDL_bool)(1) : (SDL_bool)(0); + 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 SDL_bool SDL_RectEmptyFloat([NativeTypeName("const SDL_FRect *")] SDL_FRect* r) { - return ((r == null) || (r->w < 0.0f) || (r->h < 0.0f)) ? (SDL_bool)(1) : (SDL_bool)(0); + return ((r == null) || (r->w < 0.0f) || (r->h < 0.0f)) ? true : false; } public static SDL_bool 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)))) ? (SDL_bool)(1) : (SDL_bool)(0); + 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 SDL_bool SDL_RectsEqualFloat([NativeTypeName("const SDL_FRect *")] SDL_FRect* a, [NativeTypeName("const SDL_FRect *")] SDL_FRect* b) diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_stdinc.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_stdinc.g.cs index d41c1df..a81a2f1 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_stdinc.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_stdinc.g.cs @@ -611,32 +611,32 @@ namespace SDL { if (a != 0 && b > 0xffffffffffffffffUL / a) { - return (SDL_bool)(0); + return false; } *ret = a * b; - return (SDL_bool)(1); + return true; } public static SDL_bool SDL_size_add_check_overflow([NativeTypeName("size_t")] nuint a, [NativeTypeName("size_t")] nuint b, [NativeTypeName("size_t *")] nuint* ret) { if (b > 0xffffffffffffffffUL - a) { - return (SDL_bool)(0); + return false; } *ret = a + b; - return (SDL_bool)(1); + return true; } [NativeTypeName("#define SDL_SIZE_MAX SIZE_MAX")] public const ulong SDL_SIZE_MAX = 0xffffffffffffffffUL; - [NativeTypeName("#define SDL_FALSE (SDL_bool)0")] - public const SDL_bool SDL_FALSE = (SDL_bool)(0); + [NativeTypeName("#define SDL_FALSE false")] + public const bool SDL_FALSE = false; - [NativeTypeName("#define SDL_TRUE (SDL_bool)1")] - public const SDL_bool SDL_TRUE = (SDL_bool)(1); + [NativeTypeName("#define SDL_TRUE true")] + public const bool SDL_TRUE = true; [NativeTypeName("#define SDL_MAX_SINT8 ((Sint8)0x7F)")] public const sbyte SDL_MAX_SINT8 = ((sbyte)(0x7F)); diff --git a/SDL3-CS/generate_bindings.py b/SDL3-CS/generate_bindings.py index 5a5fa6e..dc69a13 100644 --- a/SDL3-CS/generate_bindings.py +++ b/SDL3-CS/generate_bindings.py @@ -140,13 +140,6 @@ def prepare_sdl_source(): "HEAD" ], cwd=SDL_root) - subprocess.run([ - "git", - "apply", - "--3way", - repository_root / "External" / "SDL-use-proper-types.patch" - ], cwd=SDL_root) - def get_sdl_api_dump(): subprocess.run([ From fa7121a2c48a96911b517b779ec29726e5d466c4 Mon Sep 17 00:00:00 2001 From: Susko3 Date: Sun, 22 Sep 2024 01:03:05 +0100 Subject: [PATCH 3/4] Update SDL bindings This brings in the removal of SDL_bool, making it C# `byte` --- External/SDL | 2 +- SDL3-CS/SDL3/ClangSharp/SDL_atomic.g.cs | 37 +++- SDL3-CS/SDL3/ClangSharp/SDL_audio.g.cs | 81 +++++--- SDL3-CS/SDL3/ClangSharp/SDL_camera.g.cs | 3 +- SDL3-CS/SDL3/ClangSharp/SDL_clipboard.g.cs | 21 +- SDL3-CS/SDL3/ClangSharp/SDL_cpuinfo.g.cs | 44 ++-- SDL3-CS/SDL3/ClangSharp/SDL_dialog.g.cs | 4 +- SDL3-CS/SDL3/ClangSharp/SDL_error.g.cs | 9 +- SDL3-CS/SDL3/ClangSharp/SDL_events.g.cs | 65 +++--- SDL3-CS/SDL3/ClangSharp/SDL_filesystem.g.cs | 18 +- SDL3-CS/SDL3/ClangSharp/SDL_gamepad.g.cs | 61 ++++-- SDL3-CS/SDL3/ClangSharp/SDL_gpu.g.cs | 106 ++++++---- SDL3-CS/SDL3/ClangSharp/SDL_haptic.g.cs | 48 +++-- SDL3-CS/SDL3/ClangSharp/SDL_hidapi.g.cs | 2 +- SDL3-CS/SDL3/ClangSharp/SDL_hints.g.cs | 18 +- SDL3-CS/SDL3/ClangSharp/SDL_init.g.cs | 15 +- SDL3-CS/SDL3/ClangSharp/SDL_iostream.g.cs | 100 +++++---- SDL3-CS/SDL3/ClangSharp/SDL_joystick.g.cs | 79 ++++--- SDL3-CS/SDL3/ClangSharp/SDL_keyboard.g.cs | 39 ++-- SDL3-CS/SDL3/ClangSharp/SDL_log.g.cs | 10 +- SDL3-CS/SDL3/ClangSharp/SDL_main.Windows.g.cs | 3 +- SDL3-CS/SDL3/ClangSharp/SDL_messagebox.g.cs | 6 +- SDL3-CS/SDL3/ClangSharp/SDL_misc.g.cs | 3 +- SDL3-CS/SDL3/ClangSharp/SDL_mouse.g.cs | 27 ++- SDL3-CS/SDL3/ClangSharp/SDL_mutex.g.cs | 18 +- SDL3-CS/SDL3/ClangSharp/SDL_pixels.g.cs | 6 +- SDL3-CS/SDL3/ClangSharp/SDL_process.g.cs | 8 +- SDL3-CS/SDL3/ClangSharp/SDL_properties.g.cs | 36 ++-- SDL3-CS/SDL3/ClangSharp/SDL_rect.g.cs | 44 ++-- SDL3-CS/SDL3/ClangSharp/SDL_render.g.cs | 195 ++++++++++++------ SDL3-CS/SDL3/ClangSharp/SDL_sensor.g.cs | 3 +- SDL3-CS/SDL3/ClangSharp/SDL_stdinc.g.cs | 43 ++-- SDL3-CS/SDL3/ClangSharp/SDL_storage.g.cs | 73 ++++--- SDL3-CS/SDL3/ClangSharp/SDL_surface.g.cs | 119 +++++++---- .../SDL3/ClangSharp/SDL_system.Android.g.cs | 18 +- SDL3-CS/SDL3/ClangSharp/SDL_system.GDK.g.cs | 6 +- SDL3-CS/SDL3/ClangSharp/SDL_system.Linux.g.cs | 6 +- .../SDL3/ClangSharp/SDL_system.Windows.g.cs | 5 +- SDL3-CS/SDL3/ClangSharp/SDL_system.g.cs | 5 +- SDL3-CS/SDL3/ClangSharp/SDL_system.iOS.g.cs | 5 +- SDL3-CS/SDL3/ClangSharp/SDL_thread.g.cs | 6 +- SDL3-CS/SDL3/ClangSharp/SDL_time.g.cs | 12 +- SDL3-CS/SDL3/ClangSharp/SDL_timer.g.cs | 3 +- SDL3-CS/SDL3/ClangSharp/SDL_video.g.cs | 183 ++++++++++------ SDL3-CS/SDL3/ClangSharp/SDL_vulkan.g.cs | 9 +- SDL3-CS/SDL3/SDL_atomic.cs | 4 +- SDL3-CS/SDL3/SDL_init.cs | 1 - 47 files changed, 1054 insertions(+), 555 deletions(-) diff --git a/External/SDL b/External/SDL index 93bf534..97d1056 160000 --- a/External/SDL +++ b/External/SDL @@ -1 +1 @@ -Subproject commit 93bf53426840fd052da2aeb6d5a5a6f380f4c21a +Subproject commit 97d1056e16d44f67df3b19e1fac8378399ae5f3d diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_atomic.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_atomic.g.cs index 8013f26..a551810 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_atomic.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_atomic.g.cs @@ -33,10 +33,17 @@ namespace SDL public int value; } + public partial struct SDL_AtomicU32 + { + [NativeTypeName("Uint32")] + public uint value; + } + public static unsafe partial class SDL3 { [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_TryLockSpinlock([NativeTypeName("SDL_SpinLock *")] int* @lock); + [return: NativeTypeName("bool")] + public static extern byte 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); @@ -51,26 +58,40 @@ namespace SDL public static extern void SDL_MemoryBarrierAcquireFunction(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_AtomicCompareAndSwap(SDL_AtomicInt* a, int oldval, int newval); + [return: NativeTypeName("bool")] + public static extern byte SDL_CompareAndSwapAtomicInt(SDL_AtomicInt* a, int oldval, int newval); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern int SDL_AtomicSet(SDL_AtomicInt* a, int v); + public static extern int SDL_SetAtomicInt(SDL_AtomicInt* a, int v); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern int SDL_AtomicGet(SDL_AtomicInt* a); + public static extern int SDL_GetAtomicInt(SDL_AtomicInt* a); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern int SDL_AtomicAdd(SDL_AtomicInt* a, int v); + public static extern int SDL_AddAtomicInt(SDL_AtomicInt* a, int v); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_AtomicCompareAndSwapPointer([NativeTypeName("void **")] IntPtr* a, [NativeTypeName("void*")] IntPtr oldval, [NativeTypeName("void*")] IntPtr newval); + [return: NativeTypeName("bool")] + public static extern byte SDL_CompareAndSwapAtomicU32(SDL_AtomicU32* a, [NativeTypeName("Uint32")] uint oldval, [NativeTypeName("Uint32")] uint newval); + + [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + [return: NativeTypeName("Uint32")] + public static extern uint SDL_SetAtomicU32(SDL_AtomicU32* a, [NativeTypeName("Uint32")] uint v); + + [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + [return: NativeTypeName("Uint32")] + public static extern uint SDL_GetAtomicU32(SDL_AtomicU32* a); + + [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); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("void*")] - public static extern IntPtr SDL_AtomicSetPointer([NativeTypeName("void **")] IntPtr* a, [NativeTypeName("void*")] IntPtr v); + public static extern IntPtr SDL_SetAtomicPointer([NativeTypeName("void **")] IntPtr* a, [NativeTypeName("void*")] IntPtr v); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("void*")] - public static extern IntPtr SDL_AtomicGetPointer([NativeTypeName("void **")] IntPtr* a); + public static extern IntPtr SDL_GetAtomicPointer([NativeTypeName("void **")] IntPtr* a); } } diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_audio.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_audio.g.cs index dcb348e..b6bfcac 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_audio.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_audio.g.cs @@ -79,7 +79,8 @@ namespace SDL public static extern byte* Unsafe_SDL_GetAudioDeviceName(SDL_AudioDeviceID devid); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_GetAudioDeviceFormat(SDL_AudioDeviceID devid, SDL_AudioSpec* spec, int* sample_frames); + [return: NativeTypeName("bool")] + public static extern byte 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); @@ -88,28 +89,34 @@ namespace SDL public static extern SDL_AudioDeviceID SDL_OpenAudioDevice(SDL_AudioDeviceID devid, [NativeTypeName("const SDL_AudioSpec *")] SDL_AudioSpec* spec); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_PauseAudioDevice(SDL_AudioDeviceID dev); + [return: NativeTypeName("bool")] + public static extern byte SDL_PauseAudioDevice(SDL_AudioDeviceID dev); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_ResumeAudioDevice(SDL_AudioDeviceID dev); + [return: NativeTypeName("bool")] + public static extern byte SDL_ResumeAudioDevice(SDL_AudioDeviceID dev); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_AudioDevicePaused(SDL_AudioDeviceID dev); + [return: NativeTypeName("bool")] + public static extern byte 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)] - public static extern SDL_bool SDL_SetAudioDeviceGain(SDL_AudioDeviceID devid, float gain); + [return: NativeTypeName("bool")] + public static extern byte 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)] - public static extern SDL_bool SDL_BindAudioStreams(SDL_AudioDeviceID devid, SDL_AudioStream** streams, int num_streams); + [return: NativeTypeName("bool")] + public static extern byte SDL_BindAudioStreams(SDL_AudioDeviceID devid, SDL_AudioStream** streams, int num_streams); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_BindAudioStream(SDL_AudioDeviceID devid, SDL_AudioStream* stream); + [return: NativeTypeName("bool")] + public static extern byte 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); @@ -127,22 +134,26 @@ namespace SDL public static extern SDL_PropertiesID SDL_GetAudioStreamProperties(SDL_AudioStream* stream); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_GetAudioStreamFormat(SDL_AudioStream* stream, SDL_AudioSpec* src_spec, SDL_AudioSpec* dst_spec); + [return: NativeTypeName("bool")] + public static extern byte SDL_GetAudioStreamFormat(SDL_AudioStream* stream, SDL_AudioSpec* src_spec, SDL_AudioSpec* dst_spec); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_SetAudioStreamFormat(SDL_AudioStream* stream, [NativeTypeName("const SDL_AudioSpec *")] SDL_AudioSpec* src_spec, [NativeTypeName("const SDL_AudioSpec *")] SDL_AudioSpec* dst_spec); + [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); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern float SDL_GetAudioStreamFrequencyRatio(SDL_AudioStream* stream); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_SetAudioStreamFrequencyRatio(SDL_AudioStream* stream, float ratio); + [return: NativeTypeName("bool")] + public static extern byte 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)] - public static extern SDL_bool SDL_SetAudioStreamGain(SDL_AudioStream* stream, float gain); + [return: NativeTypeName("bool")] + public static extern byte 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); @@ -151,13 +162,16 @@ namespace SDL public static extern int* SDL_GetAudioStreamOutputChannelMap(SDL_AudioStream* stream, int* count); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_SetAudioStreamInputChannelMap(SDL_AudioStream* stream, [NativeTypeName("const int *")] int* chmap, int count); + [return: NativeTypeName("bool")] + public static extern byte SDL_SetAudioStreamInputChannelMap(SDL_AudioStream* stream, [NativeTypeName("const int *")] int* chmap, int count); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_SetAudioStreamOutputChannelMap(SDL_AudioStream* stream, [NativeTypeName("const int *")] int* chmap, int count); + [return: NativeTypeName("bool")] + public static extern byte SDL_SetAudioStreamOutputChannelMap(SDL_AudioStream* stream, [NativeTypeName("const int *")] int* chmap, int count); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_PutAudioStreamData(SDL_AudioStream* stream, [NativeTypeName("const void *")] IntPtr buf, int len); + [return: NativeTypeName("bool")] + public static extern byte 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); @@ -169,28 +183,36 @@ namespace SDL public static extern int SDL_GetAudioStreamQueued(SDL_AudioStream* stream); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_FlushAudioStream(SDL_AudioStream* stream); + [return: NativeTypeName("bool")] + public static extern byte SDL_FlushAudioStream(SDL_AudioStream* stream); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_ClearAudioStream(SDL_AudioStream* stream); + [return: NativeTypeName("bool")] + public static extern byte SDL_ClearAudioStream(SDL_AudioStream* stream); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_PauseAudioStreamDevice(SDL_AudioStream* stream); + [return: NativeTypeName("bool")] + public static extern byte SDL_PauseAudioStreamDevice(SDL_AudioStream* stream); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_ResumeAudioStreamDevice(SDL_AudioStream* stream); + [return: NativeTypeName("bool")] + public static extern byte SDL_ResumeAudioStreamDevice(SDL_AudioStream* stream); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_LockAudioStream(SDL_AudioStream* stream); + [return: NativeTypeName("bool")] + public static extern byte SDL_LockAudioStream(SDL_AudioStream* stream); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_UnlockAudioStream(SDL_AudioStream* stream); + [return: NativeTypeName("bool")] + public static extern byte SDL_UnlockAudioStream(SDL_AudioStream* stream); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_SetAudioStreamGetCallback(SDL_AudioStream* stream, [NativeTypeName("SDL_AudioStreamCallback")] delegate* unmanaged[Cdecl] callback, [NativeTypeName("void*")] IntPtr userdata); + [return: NativeTypeName("bool")] + public static extern byte SDL_SetAudioStreamGetCallback(SDL_AudioStream* stream, [NativeTypeName("SDL_AudioStreamCallback")] delegate* unmanaged[Cdecl] callback, [NativeTypeName("void*")] IntPtr userdata); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_SetAudioStreamPutCallback(SDL_AudioStream* stream, [NativeTypeName("SDL_AudioStreamCallback")] delegate* unmanaged[Cdecl] callback, [NativeTypeName("void*")] IntPtr userdata); + [return: NativeTypeName("bool")] + public static extern byte SDL_SetAudioStreamPutCallback(SDL_AudioStream* stream, [NativeTypeName("SDL_AudioStreamCallback")] delegate* unmanaged[Cdecl] callback, [NativeTypeName("void*")] IntPtr userdata); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_DestroyAudioStream(SDL_AudioStream* stream); @@ -199,19 +221,24 @@ namespace SDL public static extern SDL_AudioStream* SDL_OpenAudioDeviceStream(SDL_AudioDeviceID devid, [NativeTypeName("const SDL_AudioSpec *")] SDL_AudioSpec* spec, [NativeTypeName("SDL_AudioStreamCallback")] delegate* unmanaged[Cdecl] callback, [NativeTypeName("void*")] IntPtr userdata); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_SetAudioPostmixCallback(SDL_AudioDeviceID devid, [NativeTypeName("SDL_AudioPostmixCallback")] delegate* unmanaged[Cdecl] callback, [NativeTypeName("void*")] IntPtr userdata); + [return: NativeTypeName("bool")] + public static extern byte SDL_SetAudioPostmixCallback(SDL_AudioDeviceID devid, [NativeTypeName("SDL_AudioPostmixCallback")] delegate* unmanaged[Cdecl] callback, [NativeTypeName("void*")] IntPtr userdata); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_LoadWAV_IO(SDL_IOStream* src, SDL_bool closeio, SDL_AudioSpec* spec, [NativeTypeName("Uint8 **")] byte** audio_buf, [NativeTypeName("Uint32 *")] uint* audio_len); + [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); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_LoadWAV([NativeTypeName("const char *")] byte* path, SDL_AudioSpec* spec, [NativeTypeName("Uint8 **")] byte** audio_buf, [NativeTypeName("Uint32 *")] uint* audio_len); + [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); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_MixAudio([NativeTypeName("Uint8 *")] byte* dst, [NativeTypeName("const Uint8 *")] byte* src, SDL_AudioFormat format, [NativeTypeName("Uint32")] uint len, float volume); + [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); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool 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); + [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); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetAudioFormatName", ExactSpelling = true)] [return: NativeTypeName("const char *")] diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_camera.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_camera.g.cs index 171d832..30202f3 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_camera.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_camera.g.cs @@ -92,7 +92,8 @@ namespace SDL public static extern SDL_PropertiesID SDL_GetCameraProperties(SDL_Camera* camera); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_GetCameraFormat(SDL_Camera* camera, SDL_CameraSpec* spec); + [return: NativeTypeName("bool")] + public static extern byte SDL_GetCameraFormat(SDL_Camera* camera, SDL_CameraSpec* spec); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_Surface* SDL_AcquireCameraFrame(SDL_Camera* camera, [NativeTypeName("Uint64 *")] ulong* timestampNS); diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_clipboard.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_clipboard.g.cs index 3111879..0d2113d 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_clipboard.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_clipboard.g.cs @@ -31,36 +31,43 @@ namespace SDL public static unsafe partial class SDL3 { [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_SetClipboardText([NativeTypeName("const char *")] byte* text); + [return: NativeTypeName("bool")] + public static extern byte SDL_SetClipboardText([NativeTypeName("const char *")] byte* text); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetClipboardText", ExactSpelling = true)] [return: NativeTypeName("char *")] public static extern byte* Unsafe_SDL_GetClipboardText(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_HasClipboardText(); + [return: NativeTypeName("bool")] + public static extern byte SDL_HasClipboardText(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_SetPrimarySelectionText([NativeTypeName("const char *")] byte* text); + [return: NativeTypeName("bool")] + public static extern byte SDL_SetPrimarySelectionText([NativeTypeName("const char *")] byte* text); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetPrimarySelectionText", ExactSpelling = true)] [return: NativeTypeName("char *")] public static extern byte* Unsafe_SDL_GetPrimarySelectionText(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_HasPrimarySelectionText(); + [return: NativeTypeName("bool")] + public static extern byte SDL_HasPrimarySelectionText(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_SetClipboardData([NativeTypeName("SDL_ClipboardDataCallback")] delegate* unmanaged[Cdecl] callback, [NativeTypeName("SDL_ClipboardCleanupCallback")] delegate* unmanaged[Cdecl] cleanup, [NativeTypeName("void*")] IntPtr userdata, [NativeTypeName("const char **")] byte** mime_types, [NativeTypeName("size_t")] nuint num_mime_types); + [return: NativeTypeName("bool")] + public static extern byte SDL_SetClipboardData([NativeTypeName("SDL_ClipboardDataCallback")] delegate* unmanaged[Cdecl] callback, [NativeTypeName("SDL_ClipboardCleanupCallback")] delegate* unmanaged[Cdecl] cleanup, [NativeTypeName("void*")] IntPtr userdata, [NativeTypeName("const char **")] byte** mime_types, [NativeTypeName("size_t")] nuint num_mime_types); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_ClearClipboardData(); + [return: NativeTypeName("bool")] + public static extern byte SDL_ClearClipboardData(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("void*")] public static extern IntPtr SDL_GetClipboardData([NativeTypeName("const char *")] byte* mime_type, [NativeTypeName("size_t *")] nuint* size); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_HasClipboardData([NativeTypeName("const char *")] byte* mime_type); + [return: NativeTypeName("bool")] + public static extern byte SDL_HasClipboardData([NativeTypeName("const char *")] byte* mime_type); } } diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_cpuinfo.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_cpuinfo.g.cs index 8db1c30..7b480ae 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_cpuinfo.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_cpuinfo.g.cs @@ -30,52 +30,66 @@ namespace SDL public static partial class SDL3 { [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern int SDL_GetCPUCount(); + public static extern int SDL_GetNumLogicalCPUCores(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern int SDL_GetCPUCacheLineSize(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_HasAltiVec(); + [return: NativeTypeName("bool")] + public static extern byte SDL_HasAltiVec(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_HasMMX(); + [return: NativeTypeName("bool")] + public static extern byte SDL_HasMMX(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_HasSSE(); + [return: NativeTypeName("bool")] + public static extern byte SDL_HasSSE(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_HasSSE2(); + [return: NativeTypeName("bool")] + public static extern byte SDL_HasSSE2(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_HasSSE3(); + [return: NativeTypeName("bool")] + public static extern byte SDL_HasSSE3(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_HasSSE41(); + [return: NativeTypeName("bool")] + public static extern byte SDL_HasSSE41(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_HasSSE42(); + [return: NativeTypeName("bool")] + public static extern byte SDL_HasSSE42(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_HasAVX(); + [return: NativeTypeName("bool")] + public static extern byte SDL_HasAVX(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_HasAVX2(); + [return: NativeTypeName("bool")] + public static extern byte SDL_HasAVX2(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_HasAVX512F(); + [return: NativeTypeName("bool")] + public static extern byte SDL_HasAVX512F(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_HasARMSIMD(); + [return: NativeTypeName("bool")] + public static extern byte SDL_HasARMSIMD(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_HasNEON(); + [return: NativeTypeName("bool")] + public static extern byte SDL_HasNEON(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_HasLSX(); + [return: NativeTypeName("bool")] + public static extern byte SDL_HasLSX(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_HasLASX(); + [return: NativeTypeName("bool")] + public static extern byte SDL_HasLASX(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern int SDL_GetSystemRAM(); diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_dialog.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_dialog.g.cs index d24bd94..ef97f80 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_dialog.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_dialog.g.cs @@ -40,12 +40,12 @@ namespace SDL public static unsafe partial class SDL3 { [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void SDL_ShowOpenFileDialog([NativeTypeName("SDL_DialogFileCallback")] delegate* unmanaged[Cdecl] callback, [NativeTypeName("void*")] IntPtr userdata, SDL_Window* window, [NativeTypeName("const SDL_DialogFileFilter *")] SDL_DialogFileFilter* filters, int nfilters, [NativeTypeName("const char *")] byte* default_location, SDL_bool allow_many); + public static extern void SDL_ShowOpenFileDialog([NativeTypeName("SDL_DialogFileCallback")] delegate* unmanaged[Cdecl] callback, [NativeTypeName("void*")] IntPtr userdata, SDL_Window* window, [NativeTypeName("const SDL_DialogFileFilter *")] SDL_DialogFileFilter* filters, int nfilters, [NativeTypeName("const char *")] byte* default_location, [NativeTypeName("bool")] byte allow_many); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_ShowSaveFileDialog([NativeTypeName("SDL_DialogFileCallback")] delegate* unmanaged[Cdecl] callback, [NativeTypeName("void*")] IntPtr userdata, SDL_Window* window, [NativeTypeName("const SDL_DialogFileFilter *")] SDL_DialogFileFilter* filters, int nfilters, [NativeTypeName("const char *")] byte* default_location); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void SDL_ShowOpenFolderDialog([NativeTypeName("SDL_DialogFileCallback")] delegate* unmanaged[Cdecl] callback, [NativeTypeName("void*")] IntPtr userdata, SDL_Window* window, [NativeTypeName("const char *")] byte* default_location, SDL_bool allow_many); + public static extern void SDL_ShowOpenFolderDialog([NativeTypeName("SDL_DialogFileCallback")] delegate* unmanaged[Cdecl] callback, [NativeTypeName("void*")] IntPtr userdata, SDL_Window* window, [NativeTypeName("const char *")] byte* default_location, [NativeTypeName("bool")] byte allow_many); } } diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_error.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_error.g.cs index 64a8664..5b63446 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_error.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_error.g.cs @@ -30,16 +30,19 @@ namespace SDL public static unsafe partial class SDL3 { [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_SetError([NativeTypeName("const char *")] byte* fmt, __arglist); + [return: NativeTypeName("bool")] + public static extern byte SDL_SetError([NativeTypeName("const char *")] byte* fmt, __arglist); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_OutOfMemory(); + [return: NativeTypeName("bool")] + public static extern byte SDL_OutOfMemory(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetError", ExactSpelling = true)] [return: NativeTypeName("const char *")] public static extern byte* Unsafe_SDL_GetError(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_ClearError(); + [return: NativeTypeName("bool")] + public static extern byte SDL_ClearError(); } } diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_events.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_events.g.cs index 38c1e0c..bb77e95 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_events.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_events.g.cs @@ -231,9 +231,11 @@ namespace SDL [NativeTypeName("Uint16")] public ushort raw; - public SDL_bool down; + [NativeTypeName("bool")] + public byte down; - public SDL_bool repeat; + [NativeTypeName("bool")] + public byte repeat; } public unsafe partial struct SDL_TextEditingEvent @@ -279,7 +281,8 @@ namespace SDL [NativeTypeName("Sint32")] public int selected_candidate; - public SDL_bool horizontal; + [NativeTypeName("bool")] + public byte horizontal; [NativeTypeName("Uint8")] public byte padding1; @@ -362,7 +365,8 @@ namespace SDL [NativeTypeName("Uint8")] public byte button; - public SDL_bool down; + [NativeTypeName("bool")] + public byte down; [NativeTypeName("Uint8")] public byte clicks; @@ -502,7 +506,8 @@ namespace SDL [NativeTypeName("Uint8")] public byte button; - public SDL_bool down; + [NativeTypeName("bool")] + public byte down; [NativeTypeName("Uint8")] public byte padding1; @@ -587,7 +592,8 @@ namespace SDL [NativeTypeName("Uint8")] public byte button; - public SDL_bool down; + [NativeTypeName("bool")] + public byte down; [NativeTypeName("Uint8")] public byte padding1; @@ -674,7 +680,8 @@ namespace SDL public SDL_AudioDeviceID which; - public SDL_bool recording; + [NativeTypeName("bool")] + public byte recording; [NativeTypeName("Uint8")] public byte padding1; @@ -782,9 +789,11 @@ namespace SDL public float y; - public SDL_bool eraser; + [NativeTypeName("bool")] + public byte eraser; - public SDL_bool down; + [NativeTypeName("bool")] + public byte down; } public partial struct SDL_PenButtonEvent @@ -810,7 +819,8 @@ namespace SDL [NativeTypeName("Uint8")] public byte button; - public SDL_bool down; + [NativeTypeName("bool")] + public byte down; } public partial struct SDL_PenAxisEvent @@ -1073,10 +1083,12 @@ namespace SDL public static extern int SDL_PeepEvents(SDL_Event* events, int numevents, SDL_EventAction action, [NativeTypeName("Uint32")] uint minType, [NativeTypeName("Uint32")] uint maxType); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_HasEvent([NativeTypeName("Uint32")] uint type); + [return: NativeTypeName("bool")] + public static extern byte SDL_HasEvent([NativeTypeName("Uint32")] uint type); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_HasEvents([NativeTypeName("Uint32")] uint minType, [NativeTypeName("Uint32")] uint maxType); + [return: NativeTypeName("bool")] + public static extern byte 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); @@ -1085,37 +1097,44 @@ namespace SDL public static extern void SDL_FlushEvents([NativeTypeName("Uint32")] uint minType, [NativeTypeName("Uint32")] uint maxType); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_PollEvent(SDL_Event* @event); + [return: NativeTypeName("bool")] + public static extern byte SDL_PollEvent(SDL_Event* @event); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_WaitEvent(SDL_Event* @event); + [return: NativeTypeName("bool")] + public static extern byte SDL_WaitEvent(SDL_Event* @event); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_WaitEventTimeout(SDL_Event* @event, [NativeTypeName("Sint32")] int timeoutMS); + [return: NativeTypeName("bool")] + public static extern byte SDL_WaitEventTimeout(SDL_Event* @event, [NativeTypeName("Sint32")] int timeoutMS); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_PushEvent(SDL_Event* @event); + [return: NativeTypeName("bool")] + public static extern byte SDL_PushEvent(SDL_Event* @event); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void SDL_SetEventFilter([NativeTypeName("SDL_EventFilter")] delegate* unmanaged[Cdecl] filter, [NativeTypeName("void*")] IntPtr userdata); + public static extern void SDL_SetEventFilter([NativeTypeName("SDL_EventFilter")] delegate* unmanaged[Cdecl] filter, [NativeTypeName("void*")] IntPtr userdata); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_GetEventFilter([NativeTypeName("SDL_EventFilter *")] delegate* unmanaged[Cdecl]* filter, [NativeTypeName("void **")] IntPtr* userdata); + [return: NativeTypeName("bool")] + public static extern byte SDL_GetEventFilter([NativeTypeName("SDL_EventFilter *")] delegate* unmanaged[Cdecl]* filter, [NativeTypeName("void **")] IntPtr* userdata); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_AddEventWatch([NativeTypeName("SDL_EventFilter")] delegate* unmanaged[Cdecl] filter, [NativeTypeName("void*")] IntPtr userdata); + [return: NativeTypeName("bool")] + public static extern byte SDL_AddEventWatch([NativeTypeName("SDL_EventFilter")] delegate* unmanaged[Cdecl] filter, [NativeTypeName("void*")] IntPtr userdata); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void SDL_RemoveEventWatch([NativeTypeName("SDL_EventFilter")] delegate* unmanaged[Cdecl] filter, [NativeTypeName("void*")] IntPtr userdata); + public static extern void SDL_RemoveEventWatch([NativeTypeName("SDL_EventFilter")] delegate* unmanaged[Cdecl] filter, [NativeTypeName("void*")] IntPtr userdata); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void SDL_FilterEvents([NativeTypeName("SDL_EventFilter")] delegate* unmanaged[Cdecl] filter, [NativeTypeName("void*")] IntPtr userdata); + public static extern void SDL_FilterEvents([NativeTypeName("SDL_EventFilter")] delegate* unmanaged[Cdecl] filter, [NativeTypeName("void*")] IntPtr userdata); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void SDL_SetEventEnabled([NativeTypeName("Uint32")] uint type, SDL_bool enabled); + public static extern void SDL_SetEventEnabled([NativeTypeName("Uint32")] uint type, [NativeTypeName("bool")] byte enabled); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_EventEnabled([NativeTypeName("Uint32")] uint type); + [return: NativeTypeName("bool")] + public static extern byte SDL_EventEnabled([NativeTypeName("Uint32")] uint type); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("Uint32")] diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_filesystem.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_filesystem.g.cs index 7f0dd77..15048d1 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_filesystem.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_filesystem.g.cs @@ -81,22 +81,28 @@ namespace SDL public static extern byte* Unsafe_SDL_GetUserFolder(SDL_Folder folder); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_CreateDirectory([NativeTypeName("const char *")] byte* path); + [return: NativeTypeName("bool")] + public static extern byte SDL_CreateDirectory([NativeTypeName("const char *")] byte* path); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_EnumerateDirectory([NativeTypeName("const char *")] byte* path, [NativeTypeName("SDL_EnumerateDirectoryCallback")] delegate* unmanaged[Cdecl] callback, [NativeTypeName("void*")] IntPtr userdata); + [return: NativeTypeName("bool")] + public static extern byte SDL_EnumerateDirectory([NativeTypeName("const char *")] byte* path, [NativeTypeName("SDL_EnumerateDirectoryCallback")] delegate* unmanaged[Cdecl] callback, [NativeTypeName("void*")] IntPtr userdata); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_RemovePath([NativeTypeName("const char *")] byte* path); + [return: NativeTypeName("bool")] + public static extern byte SDL_RemovePath([NativeTypeName("const char *")] byte* path); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_RenamePath([NativeTypeName("const char *")] byte* oldpath, [NativeTypeName("const char *")] byte* newpath); + [return: NativeTypeName("bool")] + public static extern byte SDL_RenamePath([NativeTypeName("const char *")] byte* oldpath, [NativeTypeName("const char *")] byte* newpath); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_CopyFile([NativeTypeName("const char *")] byte* oldpath, [NativeTypeName("const char *")] byte* newpath); + [return: NativeTypeName("bool")] + public static extern byte SDL_CopyFile([NativeTypeName("const char *")] byte* oldpath, [NativeTypeName("const char *")] byte* newpath); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_GetPathInfo([NativeTypeName("const char *")] byte* path, SDL_PathInfo* info); + [return: NativeTypeName("bool")] + public static extern byte SDL_GetPathInfo([NativeTypeName("const char *")] byte* path, SDL_PathInfo* info); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("char **")] diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_gamepad.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_gamepad.g.cs index ec6880c..1c93dd7 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_gamepad.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_gamepad.g.cs @@ -183,13 +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, SDL_bool closeio); + public static extern int SDL_AddGamepadMappingsFromIO(SDL_IOStream* src, [NativeTypeName("bool")] byte 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)] - public static extern SDL_bool SDL_ReloadGamepadMappings(); + [return: NativeTypeName("bool")] + public static extern byte SDL_ReloadGamepadMappings(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("char **")] @@ -204,16 +205,19 @@ namespace SDL public static extern byte* Unsafe_SDL_GetGamepadMapping(SDL_Gamepad* gamepad); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_SetGamepadMapping(SDL_JoystickID instance_id, [NativeTypeName("const char *")] byte* mapping); + [return: NativeTypeName("bool")] + public static extern byte SDL_SetGamepadMapping(SDL_JoystickID instance_id, [NativeTypeName("const char *")] byte* mapping); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_HasGamepad(); + [return: NativeTypeName("bool")] + public static extern byte 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)] - public static extern SDL_bool SDL_IsGamepad(SDL_JoystickID instance_id); + [return: NativeTypeName("bool")] + public static extern byte SDL_IsGamepad(SDL_JoystickID instance_id); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetGamepadNameForID", ExactSpelling = true)] [return: NativeTypeName("const char *")] @@ -284,7 +288,8 @@ namespace SDL public static extern int SDL_GetGamepadPlayerIndex(SDL_Gamepad* gamepad); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_SetGamepadPlayerIndex(SDL_Gamepad* gamepad, int player_index); + [return: NativeTypeName("bool")] + public static extern byte SDL_SetGamepadPlayerIndex(SDL_Gamepad* gamepad, int player_index); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("Uint16")] @@ -317,16 +322,18 @@ namespace SDL public static extern SDL_PowerState SDL_GetGamepadPowerInfo(SDL_Gamepad* gamepad, int* percent); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_GamepadConnected(SDL_Gamepad* gamepad); + [return: NativeTypeName("bool")] + public static extern byte 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(SDL_bool enabled); + public static extern void SDL_SetGamepadEventsEnabled([NativeTypeName("bool")] byte enabled); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_GamepadEventsEnabled(); + [return: NativeTypeName("bool")] + public static extern byte SDL_GamepadEventsEnabled(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_GamepadBinding** SDL_GetGamepadBindings(SDL_Gamepad* gamepad, int* count); @@ -349,7 +356,8 @@ namespace SDL public static extern byte* Unsafe_SDL_GetGamepadStringForAxis(SDL_GamepadAxis axis); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_GamepadHasAxis(SDL_Gamepad* gamepad, SDL_GamepadAxis axis); + [return: NativeTypeName("bool")] + public static extern byte SDL_GamepadHasAxis(SDL_Gamepad* gamepad, SDL_GamepadAxis axis); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("Sint16")] @@ -363,10 +371,12 @@ namespace SDL public static extern byte* Unsafe_SDL_GetGamepadStringForButton(SDL_GamepadButton button); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_GamepadHasButton(SDL_Gamepad* gamepad, SDL_GamepadButton button); + [return: NativeTypeName("bool")] + public static extern byte SDL_GamepadHasButton(SDL_Gamepad* gamepad, SDL_GamepadButton button); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_GetGamepadButton(SDL_Gamepad* gamepad, SDL_GamepadButton button); + [return: NativeTypeName("bool")] + public static extern byte 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); @@ -381,34 +391,43 @@ namespace SDL public static extern int SDL_GetNumGamepadTouchpadFingers(SDL_Gamepad* gamepad, int touchpad); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_GetGamepadTouchpadFinger(SDL_Gamepad* gamepad, int touchpad, int finger, SDL_bool* down, float* x, float* y, float* pressure); + [return: NativeTypeName("bool")] + public static extern byte SDL_GetGamepadTouchpadFinger(SDL_Gamepad* gamepad, int touchpad, int finger, bool* down, float* x, float* y, float* pressure); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_GamepadHasSensor(SDL_Gamepad* gamepad, SDL_SensorType type); + [return: NativeTypeName("bool")] + public static extern byte SDL_GamepadHasSensor(SDL_Gamepad* gamepad, SDL_SensorType type); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_SetGamepadSensorEnabled(SDL_Gamepad* gamepad, SDL_SensorType type, SDL_bool enabled); + [return: NativeTypeName("bool")] + public static extern byte SDL_SetGamepadSensorEnabled(SDL_Gamepad* gamepad, SDL_SensorType type, [NativeTypeName("bool")] byte enabled); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_GamepadSensorEnabled(SDL_Gamepad* gamepad, SDL_SensorType type); + [return: NativeTypeName("bool")] + public static extern byte 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)] - public static extern SDL_bool SDL_GetGamepadSensorData(SDL_Gamepad* gamepad, SDL_SensorType type, float* data, int num_values); + [return: NativeTypeName("bool")] + public static extern byte SDL_GetGamepadSensorData(SDL_Gamepad* gamepad, SDL_SensorType type, float* data, int num_values); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_RumbleGamepad(SDL_Gamepad* gamepad, [NativeTypeName("Uint16")] ushort low_frequency_rumble, [NativeTypeName("Uint16")] ushort high_frequency_rumble, [NativeTypeName("Uint32")] uint duration_ms); + [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); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_RumbleGamepadTriggers(SDL_Gamepad* gamepad, [NativeTypeName("Uint16")] ushort left_rumble, [NativeTypeName("Uint16")] ushort right_rumble, [NativeTypeName("Uint32")] uint duration_ms); + [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); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_SetGamepadLED(SDL_Gamepad* gamepad, [NativeTypeName("Uint8")] byte red, [NativeTypeName("Uint8")] byte green, [NativeTypeName("Uint8")] byte blue); + [return: NativeTypeName("bool")] + public static extern byte SDL_SetGamepadLED(SDL_Gamepad* gamepad, [NativeTypeName("Uint8")] byte red, [NativeTypeName("Uint8")] byte green, [NativeTypeName("Uint8")] byte blue); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_SendGamepadEffect(SDL_Gamepad* gamepad, [NativeTypeName("const void *")] IntPtr data, int size); + [return: NativeTypeName("bool")] + public static extern byte SDL_SendGamepadEffect(SDL_Gamepad* gamepad, [NativeTypeName("const void *")] IntPtr data, int size); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_CloseGamepad(SDL_Gamepad* gamepad); diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_gpu.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_gpu.g.cs index 81c281c..0b4c0c4 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_gpu.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_gpu.g.cs @@ -100,6 +100,8 @@ namespace SDL { SDL_GPU_STOREOP_STORE, SDL_GPU_STOREOP_DONT_CARE, + SDL_GPU_STOREOP_RESOLVE, + SDL_GPU_STOREOP_RESOLVE_AND_STORE, } public enum SDL_GPUIndexElementSize @@ -553,9 +555,11 @@ namespace SDL public float max_lod; - public SDL_bool enable_anisotropy; + [NativeTypeName("bool")] + public byte enable_anisotropy; - public SDL_bool enable_compare; + [NativeTypeName("bool")] + public byte enable_compare; [NativeTypeName("Uint8")] public byte padding1; @@ -636,9 +640,11 @@ namespace SDL public SDL_GPUColorComponentFlags color_write_mask; - public SDL_bool enable_blend; + [NativeTypeName("bool")] + public byte enable_blend; - public SDL_bool enable_color_write_mask; + [NativeTypeName("bool")] + public byte enable_color_write_mask; [NativeTypeName("Uint8")] public byte padding2; @@ -736,7 +742,8 @@ namespace SDL public float depth_bias_slope_factor; - public SDL_bool enable_depth_bias; + [NativeTypeName("bool")] + public byte enable_depth_bias; [NativeTypeName("Uint8")] public byte padding1; @@ -755,7 +762,8 @@ namespace SDL [NativeTypeName("Uint32")] public uint sample_mask; - public SDL_bool enable_mask; + [NativeTypeName("bool")] + public byte enable_mask; [NativeTypeName("Uint8")] public byte padding1; @@ -781,11 +789,14 @@ namespace SDL [NativeTypeName("Uint8")] public byte write_mask; - public SDL_bool enable_depth_test; + [NativeTypeName("bool")] + public byte enable_depth_test; - public SDL_bool enable_depth_write; + [NativeTypeName("bool")] + public byte enable_depth_write; - public SDL_bool enable_stencil_test; + [NativeTypeName("bool")] + public byte enable_stencil_test; [NativeTypeName("Uint8")] public byte padding1; @@ -804,7 +815,7 @@ namespace SDL public SDL_GPUColorTargetBlendState blend_state; } - public unsafe partial struct SDL_GpuGraphicsPipelineTargetInfo + public unsafe partial struct SDL_GPUGraphicsPipelineTargetInfo { [NativeTypeName("const SDL_GPUColorTargetDescription *")] public SDL_GPUColorTargetDescription* color_target_descriptions; @@ -814,7 +825,8 @@ namespace SDL public SDL_GPUTextureFormat depth_stencil_format; - public SDL_bool has_depth_stencil_target; + [NativeTypeName("bool")] + public byte has_depth_stencil_target; [NativeTypeName("Uint8")] public byte padding1; @@ -842,7 +854,7 @@ namespace SDL public SDL_GPUDepthStencilState depth_stencil_state; - public SDL_GpuGraphicsPipelineTargetInfo target_info; + public SDL_GPUGraphicsPipelineTargetInfo target_info; public SDL_PropertiesID props; } @@ -906,16 +918,25 @@ namespace SDL public SDL_GPUStoreOp store_op; - public SDL_bool cycle; + public SDL_GPUTexture* resolve_texture; + + [NativeTypeName("Uint32")] + public uint resolve_mip_level; + + [NativeTypeName("Uint32")] + public uint resolve_layer; + + [NativeTypeName("bool")] + public byte cycle; + + [NativeTypeName("bool")] + public byte cycle_resolve_texture; [NativeTypeName("Uint8")] public byte padding1; [NativeTypeName("Uint8")] public byte padding2; - - [NativeTypeName("Uint8")] - public byte padding3; } public unsafe partial struct SDL_GPUDepthStencilTargetInfo @@ -932,7 +953,8 @@ namespace SDL public SDL_GPUStoreOp stencil_store_op; - public SDL_bool cycle; + [NativeTypeName("bool")] + public byte cycle; [NativeTypeName("Uint8")] public byte clear_stencil; @@ -958,7 +980,8 @@ namespace SDL public SDL_GPUFilter filter; - public SDL_bool cycle; + [NativeTypeName("bool")] + public byte cycle; [NativeTypeName("Uint8")] public byte padding1; @@ -989,7 +1012,8 @@ namespace SDL { public SDL_GPUBuffer* buffer; - public SDL_bool cycle; + [NativeTypeName("bool")] + public byte cycle; [NativeTypeName("Uint8")] public byte padding1; @@ -1011,7 +1035,8 @@ namespace SDL [NativeTypeName("Uint32")] public uint layer; - public SDL_bool cycle; + [NativeTypeName("bool")] + public byte cycle; [NativeTypeName("Uint8")] public byte padding1; @@ -1026,13 +1051,15 @@ namespace SDL public static unsafe partial class SDL3 { [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_GPUSupportsShaderFormats(SDL_GPUShaderFormat format_flags, [NativeTypeName("const char *")] byte* name); + [return: NativeTypeName("bool")] + public static extern byte SDL_GPUSupportsShaderFormats(SDL_GPUShaderFormat format_flags, [NativeTypeName("const char *")] byte* name); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_GPUSupportsProperties(SDL_PropertiesID props); + [return: NativeTypeName("bool")] + public static extern byte SDL_GPUSupportsProperties(SDL_PropertiesID props); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_GPUDevice* SDL_CreateGPUDevice(SDL_GPUShaderFormat format_flags, SDL_bool debug_mode, [NativeTypeName("const char *")] byte* name); + public static extern SDL_GPUDevice* SDL_CreateGPUDevice(SDL_GPUShaderFormat format_flags, [NativeTypeName("bool")] byte debug_mode, [NativeTypeName("const char *")] byte* name); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_GPUDevice* SDL_CreateGPUDeviceWithProperties(SDL_PropertiesID props); @@ -1206,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, SDL_bool cycle); + public static extern IntPtr SDL_MapGPUTransferBuffer(SDL_GPUDevice* device, SDL_GPUTransferBuffer* transfer_buffer, [NativeTypeName("bool")] byte cycle); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_UnmapGPUTransferBuffer(SDL_GPUDevice* device, SDL_GPUTransferBuffer* transfer_buffer); @@ -1215,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, SDL_bool 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")] byte 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, SDL_bool 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")] byte 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, SDL_bool 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")] byte 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, SDL_bool 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")] byte 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); @@ -1242,19 +1269,23 @@ namespace SDL public static extern void SDL_BlitGPUTexture(SDL_GPUCommandBuffer* command_buffer, [NativeTypeName("const SDL_GPUBlitInfo *")] SDL_GPUBlitInfo* info); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_WindowSupportsGPUSwapchainComposition(SDL_GPUDevice* device, SDL_Window* window, SDL_GPUSwapchainComposition swapchain_composition); + [return: NativeTypeName("bool")] + public static extern byte SDL_WindowSupportsGPUSwapchainComposition(SDL_GPUDevice* device, SDL_Window* window, SDL_GPUSwapchainComposition swapchain_composition); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_WindowSupportsGPUPresentMode(SDL_GPUDevice* device, SDL_Window* window, SDL_GPUPresentMode present_mode); + [return: NativeTypeName("bool")] + public static extern byte SDL_WindowSupportsGPUPresentMode(SDL_GPUDevice* device, SDL_Window* window, SDL_GPUPresentMode present_mode); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_ClaimWindowForGPUDevice(SDL_GPUDevice* device, SDL_Window* window); + [return: NativeTypeName("bool")] + public static extern byte 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)] - public static extern SDL_bool SDL_SetGPUSwapchainParameters(SDL_GPUDevice* device, SDL_Window* window, SDL_GPUSwapchainComposition swapchain_composition, SDL_GPUPresentMode present_mode); + [return: NativeTypeName("bool")] + public static extern byte 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); @@ -1272,10 +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, SDL_bool 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")] byte wait_all, [NativeTypeName("SDL_GPUFence *const *")] SDL_GPUFence** fences, [NativeTypeName("Uint32")] uint num_fences); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_QueryGPUFence(SDL_GPUDevice* device, SDL_GPUFence* fence); + [return: NativeTypeName("bool")] + public static extern byte 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); @@ -1285,10 +1317,12 @@ namespace SDL public static extern uint SDL_GPUTextureFormatTexelBlockSize(SDL_GPUTextureFormat format); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_GPUTextureSupportsFormat(SDL_GPUDevice* device, SDL_GPUTextureFormat format, SDL_GPUTextureType type, SDL_GPUTextureUsageFlags usage); + [return: NativeTypeName("bool")] + public static extern byte SDL_GPUTextureSupportsFormat(SDL_GPUDevice* device, SDL_GPUTextureFormat format, SDL_GPUTextureType type, SDL_GPUTextureUsageFlags usage); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_GPUTextureSupportsSampleCount(SDL_GPUDevice* device, SDL_GPUTextureFormat format, SDL_GPUSampleCount sample_count); + [return: NativeTypeName("bool")] + public static extern byte SDL_GPUTextureSupportsSampleCount(SDL_GPUDevice* device, SDL_GPUTextureFormat format, SDL_GPUSampleCount sample_count); [NativeTypeName("#define SDL_GPU_TEXTUREUSAGE_SAMPLER (1u << 0)")] public const uint SDL_GPU_TEXTUREUSAGE_SAMPLER = (1U << 0); diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_haptic.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_haptic.g.cs index 0337114..0cd0d7a 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_haptic.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_haptic.g.cs @@ -346,13 +346,15 @@ namespace SDL public static extern byte* Unsafe_SDL_GetHapticName(SDL_Haptic* haptic); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_IsMouseHaptic(); + [return: NativeTypeName("bool")] + public static extern byte SDL_IsMouseHaptic(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_Haptic* SDL_OpenHapticFromMouse(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_IsJoystickHaptic(SDL_Joystick* joystick); + [return: NativeTypeName("bool")] + public static extern byte SDL_IsJoystickHaptic(SDL_Joystick* joystick); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_Haptic* SDL_OpenHapticFromJoystick(SDL_Joystick* joystick); @@ -374,52 +376,66 @@ namespace SDL public static extern int SDL_GetNumHapticAxes(SDL_Haptic* haptic); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_HapticEffectSupported(SDL_Haptic* haptic, [NativeTypeName("const SDL_HapticEffect *")] SDL_HapticEffect* effect); + [return: NativeTypeName("bool")] + public static extern byte 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)] - public static extern SDL_bool SDL_UpdateHapticEffect(SDL_Haptic* haptic, int effect, [NativeTypeName("const SDL_HapticEffect *")] SDL_HapticEffect* data); + [return: NativeTypeName("bool")] + public static extern byte SDL_UpdateHapticEffect(SDL_Haptic* haptic, int effect, [NativeTypeName("const SDL_HapticEffect *")] SDL_HapticEffect* data); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_RunHapticEffect(SDL_Haptic* haptic, int effect, [NativeTypeName("Uint32")] uint iterations); + [return: NativeTypeName("bool")] + public static extern byte SDL_RunHapticEffect(SDL_Haptic* haptic, int effect, [NativeTypeName("Uint32")] uint iterations); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_StopHapticEffect(SDL_Haptic* haptic, int effect); + [return: NativeTypeName("bool")] + public static extern byte 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)] - public static extern SDL_bool SDL_GetHapticEffectStatus(SDL_Haptic* haptic, int effect); + [return: NativeTypeName("bool")] + public static extern byte SDL_GetHapticEffectStatus(SDL_Haptic* haptic, int effect); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_SetHapticGain(SDL_Haptic* haptic, int gain); + [return: NativeTypeName("bool")] + public static extern byte SDL_SetHapticGain(SDL_Haptic* haptic, int gain); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_SetHapticAutocenter(SDL_Haptic* haptic, int autocenter); + [return: NativeTypeName("bool")] + public static extern byte SDL_SetHapticAutocenter(SDL_Haptic* haptic, int autocenter); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_PauseHaptic(SDL_Haptic* haptic); + [return: NativeTypeName("bool")] + public static extern byte SDL_PauseHaptic(SDL_Haptic* haptic); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_ResumeHaptic(SDL_Haptic* haptic); + [return: NativeTypeName("bool")] + public static extern byte SDL_ResumeHaptic(SDL_Haptic* haptic); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_StopHapticEffects(SDL_Haptic* haptic); + [return: NativeTypeName("bool")] + public static extern byte SDL_StopHapticEffects(SDL_Haptic* haptic); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_HapticRumbleSupported(SDL_Haptic* haptic); + [return: NativeTypeName("bool")] + public static extern byte SDL_HapticRumbleSupported(SDL_Haptic* haptic); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_InitHapticRumble(SDL_Haptic* haptic); + [return: NativeTypeName("bool")] + public static extern byte SDL_InitHapticRumble(SDL_Haptic* haptic); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_PlayHapticRumble(SDL_Haptic* haptic, float strength, [NativeTypeName("Uint32")] uint length); + [return: NativeTypeName("bool")] + public static extern byte SDL_PlayHapticRumble(SDL_Haptic* haptic, float strength, [NativeTypeName("Uint32")] uint length); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_StopHapticRumble(SDL_Haptic* haptic); + [return: NativeTypeName("bool")] + public static extern byte SDL_StopHapticRumble(SDL_Haptic* haptic); [NativeTypeName("#define SDL_HAPTIC_CONSTANT (1u<<0)")] public const uint SDL_HAPTIC_CONSTANT = (1U << 0); diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_hidapi.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_hidapi.g.cs index 21f3368..1f0ad45 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_hidapi.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_hidapi.g.cs @@ -151,6 +151,6 @@ namespace SDL public static extern int SDL_hid_get_report_descriptor(SDL_hid_device* dev, [NativeTypeName("unsigned char *")] byte* buf, [NativeTypeName("size_t")] nuint buf_size); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void SDL_hid_ble_scan(SDL_bool active); + public static extern void SDL_hid_ble_scan([NativeTypeName("bool")] byte active); } } diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_hints.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_hints.g.cs index ce92dd5..582fb04 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_hints.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_hints.g.cs @@ -38,13 +38,16 @@ namespace SDL public static unsafe partial class SDL3 { [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_SetHintWithPriority([NativeTypeName("const char *")] byte* name, [NativeTypeName("const char *")] byte* value, SDL_HintPriority priority); + [return: NativeTypeName("bool")] + public static extern byte SDL_SetHintWithPriority([NativeTypeName("const char *")] byte* name, [NativeTypeName("const char *")] byte* value, SDL_HintPriority priority); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_SetHint([NativeTypeName("const char *")] byte* name, [NativeTypeName("const char *")] byte* value); + [return: NativeTypeName("bool")] + public static extern byte SDL_SetHint([NativeTypeName("const char *")] byte* name, [NativeTypeName("const char *")] byte* value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_ResetHint([NativeTypeName("const char *")] byte* name); + [return: NativeTypeName("bool")] + public static extern byte SDL_ResetHint([NativeTypeName("const char *")] byte* name); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_ResetHints(); @@ -54,10 +57,12 @@ namespace SDL public static extern byte* Unsafe_SDL_GetHint([NativeTypeName("const char *")] byte* name); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_GetHintBoolean([NativeTypeName("const char *")] byte* name, SDL_bool default_value); + [return: NativeTypeName("bool")] + public static extern byte SDL_GetHintBoolean([NativeTypeName("const char *")] byte* name, [NativeTypeName("bool")] byte default_value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_AddHintCallback([NativeTypeName("const char *")] byte* name, [NativeTypeName("SDL_HintCallback")] delegate* unmanaged[Cdecl] callback, [NativeTypeName("void*")] IntPtr userdata); + [return: NativeTypeName("bool")] + public static extern byte SDL_AddHintCallback([NativeTypeName("const char *")] byte* name, [NativeTypeName("SDL_HintCallback")] delegate* unmanaged[Cdecl] callback, [NativeTypeName("void*")] IntPtr userdata); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_RemoveHintCallback([NativeTypeName("const char *")] byte* name, [NativeTypeName("SDL_HintCallback")] delegate* unmanaged[Cdecl] callback, [NativeTypeName("void*")] IntPtr userdata); @@ -329,6 +334,9 @@ namespace SDL [NativeTypeName("#define SDL_HINT_JOYSTICK_HIDAPI_STEAMDECK \"SDL_JOYSTICK_HIDAPI_STEAMDECK\"")] public static ReadOnlySpan SDL_HINT_JOYSTICK_HIDAPI_STEAMDECK => "SDL_JOYSTICK_HIDAPI_STEAMDECK"u8; + [NativeTypeName("#define SDL_HINT_JOYSTICK_HIDAPI_STEAM_HORI \"SDL_JOYSTICK_HIDAPI_STEAM_HORI\"")] + public static ReadOnlySpan SDL_HINT_JOYSTICK_HIDAPI_STEAM_HORI => "SDL_JOYSTICK_HIDAPI_STEAM_HORI"u8; + [NativeTypeName("#define SDL_HINT_JOYSTICK_HIDAPI_SWITCH \"SDL_JOYSTICK_HIDAPI_SWITCH\"")] public static ReadOnlySpan SDL_HINT_JOYSTICK_HIDAPI_SWITCH => "SDL_JOYSTICK_HIDAPI_SWITCH"u8; diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_init.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_init.g.cs index a471a98..5f31c69 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_init.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_init.g.cs @@ -38,10 +38,12 @@ namespace SDL public static unsafe partial class SDL3 { [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_Init(SDL_InitFlags flags); + [return: NativeTypeName("bool")] + public static extern byte SDL_Init(SDL_InitFlags flags); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_InitSubSystem(SDL_InitFlags flags); + [return: NativeTypeName("bool")] + public static extern byte SDL_InitSubSystem(SDL_InitFlags flags); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_QuitSubSystem(SDL_InitFlags flags); @@ -53,18 +55,17 @@ namespace SDL public static extern void SDL_Quit(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_SetAppMetadata([NativeTypeName("const char *")] byte* appname, [NativeTypeName("const char *")] byte* appversion, [NativeTypeName("const char *")] byte* appidentifier); + [return: NativeTypeName("bool")] + public static extern byte SDL_SetAppMetadata([NativeTypeName("const char *")] byte* appname, [NativeTypeName("const char *")] byte* appversion, [NativeTypeName("const char *")] byte* appidentifier); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_SetAppMetadataProperty([NativeTypeName("const char *")] byte* name, [NativeTypeName("const char *")] byte* value); + [return: NativeTypeName("bool")] + public static extern byte 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 *")] public static extern byte* Unsafe_SDL_GetAppMetadataProperty([NativeTypeName("const char *")] byte* name); - [NativeTypeName("#define SDL_INIT_TIMER 0x00000001u")] - public const uint SDL_INIT_TIMER = 0x00000001U; - [NativeTypeName("#define SDL_INIT_AUDIO 0x00000010u")] public const uint SDL_INIT_AUDIO = 0x00000010U; diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_iostream.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_iostream.g.cs index 192c447..c51d8a5 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_iostream.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_iostream.g.cs @@ -62,11 +62,11 @@ namespace SDL [NativeTypeName("size_t (*)(void *, const void *, size_t, SDL_IOStatus *)")] public delegate* unmanaged[Cdecl] write; - [NativeTypeName("SDL_bool (*)(void *, SDL_IOStatus *)")] - public delegate* unmanaged[Cdecl] flush; + [NativeTypeName("bool (*)(void *, SDL_IOStatus *)")] + public delegate* unmanaged[Cdecl] flush; - [NativeTypeName("SDL_bool (*)(void *)")] - public delegate* unmanaged[Cdecl] close; + [NativeTypeName("bool (*)(void *)")] + public delegate* unmanaged[Cdecl] close; } public partial struct SDL_IOStream @@ -91,7 +91,8 @@ namespace SDL public static extern SDL_IOStream* SDL_OpenIO([NativeTypeName("const SDL_IOStreamInterface *")] SDL_IOStreamInterface* iface, [NativeTypeName("void*")] IntPtr userdata); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_CloseIO(SDL_IOStream* context); + [return: NativeTypeName("bool")] + public static extern byte SDL_CloseIO(SDL_IOStream* context); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_PropertiesID SDL_GetIOProperties(SDL_IOStream* context); @@ -128,99 +129,128 @@ namespace SDL public static extern nuint SDL_IOvprintf(SDL_IOStream* context, [NativeTypeName("const char *")] byte* fmt, [NativeTypeName("va_list")] byte* ap); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_FlushIO(SDL_IOStream* context); + [return: NativeTypeName("bool")] + public static extern byte 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, SDL_bool closeio); + public static extern IntPtr SDL_LoadFile_IO(SDL_IOStream* src, [NativeTypeName("size_t *")] nuint* datasize, [NativeTypeName("bool")] byte closeio); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("void*")] public static extern IntPtr SDL_LoadFile([NativeTypeName("const char *")] byte* file, [NativeTypeName("size_t *")] nuint* datasize); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_ReadU8(SDL_IOStream* src, [NativeTypeName("Uint8 *")] byte* value); + [return: NativeTypeName("bool")] + public static extern byte SDL_ReadU8(SDL_IOStream* src, [NativeTypeName("Uint8 *")] byte* value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_ReadS8(SDL_IOStream* src, [NativeTypeName("Sint8 *")] sbyte* value); + [return: NativeTypeName("bool")] + public static extern byte SDL_ReadS8(SDL_IOStream* src, [NativeTypeName("Sint8 *")] sbyte* value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_ReadU16LE(SDL_IOStream* src, [NativeTypeName("Uint16 *")] ushort* value); + [return: NativeTypeName("bool")] + public static extern byte SDL_ReadU16LE(SDL_IOStream* src, [NativeTypeName("Uint16 *")] ushort* value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_ReadS16LE(SDL_IOStream* src, [NativeTypeName("Sint16 *")] short* value); + [return: NativeTypeName("bool")] + public static extern byte SDL_ReadS16LE(SDL_IOStream* src, [NativeTypeName("Sint16 *")] short* value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_ReadU16BE(SDL_IOStream* src, [NativeTypeName("Uint16 *")] ushort* value); + [return: NativeTypeName("bool")] + public static extern byte SDL_ReadU16BE(SDL_IOStream* src, [NativeTypeName("Uint16 *")] ushort* value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_ReadS16BE(SDL_IOStream* src, [NativeTypeName("Sint16 *")] short* value); + [return: NativeTypeName("bool")] + public static extern byte SDL_ReadS16BE(SDL_IOStream* src, [NativeTypeName("Sint16 *")] short* value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_ReadU32LE(SDL_IOStream* src, [NativeTypeName("Uint32 *")] uint* value); + [return: NativeTypeName("bool")] + public static extern byte SDL_ReadU32LE(SDL_IOStream* src, [NativeTypeName("Uint32 *")] uint* value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_ReadS32LE(SDL_IOStream* src, [NativeTypeName("Sint32 *")] int* value); + [return: NativeTypeName("bool")] + public static extern byte SDL_ReadS32LE(SDL_IOStream* src, [NativeTypeName("Sint32 *")] int* value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_ReadU32BE(SDL_IOStream* src, [NativeTypeName("Uint32 *")] uint* value); + [return: NativeTypeName("bool")] + public static extern byte SDL_ReadU32BE(SDL_IOStream* src, [NativeTypeName("Uint32 *")] uint* value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_ReadS32BE(SDL_IOStream* src, [NativeTypeName("Sint32 *")] int* value); + [return: NativeTypeName("bool")] + public static extern byte SDL_ReadS32BE(SDL_IOStream* src, [NativeTypeName("Sint32 *")] int* value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_ReadU64LE(SDL_IOStream* src, [NativeTypeName("Uint64 *")] ulong* value); + [return: NativeTypeName("bool")] + public static extern byte SDL_ReadU64LE(SDL_IOStream* src, [NativeTypeName("Uint64 *")] ulong* value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_ReadS64LE(SDL_IOStream* src, [NativeTypeName("Sint64 *")] long* value); + [return: NativeTypeName("bool")] + public static extern byte SDL_ReadS64LE(SDL_IOStream* src, [NativeTypeName("Sint64 *")] long* value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_ReadU64BE(SDL_IOStream* src, [NativeTypeName("Uint64 *")] ulong* value); + [return: NativeTypeName("bool")] + public static extern byte SDL_ReadU64BE(SDL_IOStream* src, [NativeTypeName("Uint64 *")] ulong* value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_ReadS64BE(SDL_IOStream* src, [NativeTypeName("Sint64 *")] long* value); + [return: NativeTypeName("bool")] + public static extern byte SDL_ReadS64BE(SDL_IOStream* src, [NativeTypeName("Sint64 *")] long* value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_WriteU8(SDL_IOStream* dst, [NativeTypeName("Uint8")] byte value); + [return: NativeTypeName("bool")] + public static extern byte SDL_WriteU8(SDL_IOStream* dst, [NativeTypeName("Uint8")] byte value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_WriteS8(SDL_IOStream* dst, [NativeTypeName("Sint8")] sbyte value); + [return: NativeTypeName("bool")] + public static extern byte SDL_WriteS8(SDL_IOStream* dst, [NativeTypeName("Sint8")] sbyte value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_WriteU16LE(SDL_IOStream* dst, [NativeTypeName("Uint16")] ushort value); + [return: NativeTypeName("bool")] + public static extern byte SDL_WriteU16LE(SDL_IOStream* dst, [NativeTypeName("Uint16")] ushort value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_WriteS16LE(SDL_IOStream* dst, [NativeTypeName("Sint16")] short value); + [return: NativeTypeName("bool")] + public static extern byte SDL_WriteS16LE(SDL_IOStream* dst, [NativeTypeName("Sint16")] short value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_WriteU16BE(SDL_IOStream* dst, [NativeTypeName("Uint16")] ushort value); + [return: NativeTypeName("bool")] + public static extern byte SDL_WriteU16BE(SDL_IOStream* dst, [NativeTypeName("Uint16")] ushort value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_WriteS16BE(SDL_IOStream* dst, [NativeTypeName("Sint16")] short value); + [return: NativeTypeName("bool")] + public static extern byte SDL_WriteS16BE(SDL_IOStream* dst, [NativeTypeName("Sint16")] short value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_WriteU32LE(SDL_IOStream* dst, [NativeTypeName("Uint32")] uint value); + [return: NativeTypeName("bool")] + public static extern byte SDL_WriteU32LE(SDL_IOStream* dst, [NativeTypeName("Uint32")] uint value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_WriteS32LE(SDL_IOStream* dst, [NativeTypeName("Sint32")] int value); + [return: NativeTypeName("bool")] + public static extern byte SDL_WriteS32LE(SDL_IOStream* dst, [NativeTypeName("Sint32")] int value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_WriteU32BE(SDL_IOStream* dst, [NativeTypeName("Uint32")] uint value); + [return: NativeTypeName("bool")] + public static extern byte SDL_WriteU32BE(SDL_IOStream* dst, [NativeTypeName("Uint32")] uint value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_WriteS32BE(SDL_IOStream* dst, [NativeTypeName("Sint32")] int value); + [return: NativeTypeName("bool")] + public static extern byte SDL_WriteS32BE(SDL_IOStream* dst, [NativeTypeName("Sint32")] int value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_WriteU64LE(SDL_IOStream* dst, [NativeTypeName("Uint64")] ulong value); + [return: NativeTypeName("bool")] + public static extern byte SDL_WriteU64LE(SDL_IOStream* dst, [NativeTypeName("Uint64")] ulong value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_WriteS64LE(SDL_IOStream* dst, [NativeTypeName("Sint64")] long value); + [return: NativeTypeName("bool")] + public static extern byte SDL_WriteS64LE(SDL_IOStream* dst, [NativeTypeName("Sint64")] long value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_WriteU64BE(SDL_IOStream* dst, [NativeTypeName("Uint64")] ulong value); + [return: NativeTypeName("bool")] + public static extern byte SDL_WriteU64BE(SDL_IOStream* dst, [NativeTypeName("Uint64")] ulong value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_WriteS64BE(SDL_IOStream* dst, [NativeTypeName("Sint64")] long value); + [return: NativeTypeName("bool")] + public static extern byte SDL_WriteS64BE(SDL_IOStream* dst, [NativeTypeName("Sint64")] long value); [NativeTypeName("#define SDL_PROP_IOSTREAM_WINDOWS_HANDLE_POINTER \"SDL.iostream.windows.handle\"")] public static ReadOnlySpan SDL_PROP_IOSTREAM_WINDOWS_HANDLE_POINTER => "SDL.iostream.windows.handle"u8; diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_joystick.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_joystick.g.cs index 29b227d..3b2b430 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_joystick.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_joystick.g.cs @@ -140,20 +140,20 @@ namespace SDL [NativeTypeName("void (*)(void *, int)")] public delegate* unmanaged[Cdecl] SetPlayerIndex; - [NativeTypeName("SDL_bool (*)(void *, Uint16, Uint16)")] - public delegate* unmanaged[Cdecl] Rumble; + [NativeTypeName("bool (*)(void *, Uint16, Uint16)")] + public delegate* unmanaged[Cdecl] Rumble; - [NativeTypeName("SDL_bool (*)(void *, Uint16, Uint16)")] - public delegate* unmanaged[Cdecl] RumbleTriggers; + [NativeTypeName("bool (*)(void *, Uint16, Uint16)")] + public delegate* unmanaged[Cdecl] RumbleTriggers; - [NativeTypeName("SDL_bool (*)(void *, Uint8, Uint8, Uint8)")] - public delegate* unmanaged[Cdecl] SetLED; + [NativeTypeName("bool (*)(void *, Uint8, Uint8, Uint8)")] + public delegate* unmanaged[Cdecl] SetLED; - [NativeTypeName("SDL_bool (*)(void *, const void *, int)")] - public delegate* unmanaged[Cdecl] SendEffect; + [NativeTypeName("bool (*)(void *, const void *, int)")] + public delegate* unmanaged[Cdecl] SendEffect; - [NativeTypeName("SDL_bool (*)(void *, SDL_bool)")] - public delegate* unmanaged[Cdecl] SetSensorsEnabled; + [NativeTypeName("bool (*)(void *, bool)")] + public delegate* unmanaged[Cdecl] SetSensorsEnabled; [NativeTypeName("void (*)(void *)")] public delegate* unmanaged[Cdecl] Cleanup; @@ -174,7 +174,8 @@ namespace SDL public static extern void SDL_UnlockJoysticks(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_HasJoystick(); + [return: NativeTypeName("bool")] + public static extern byte SDL_HasJoystick(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_JoystickID* SDL_GetJoysticks(int* count); @@ -221,28 +222,36 @@ namespace SDL public static extern SDL_JoystickID SDL_AttachVirtualJoystick([NativeTypeName("const SDL_VirtualJoystickDesc *")] SDL_VirtualJoystickDesc* desc); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_DetachVirtualJoystick(SDL_JoystickID instance_id); + [return: NativeTypeName("bool")] + public static extern byte SDL_DetachVirtualJoystick(SDL_JoystickID instance_id); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_IsJoystickVirtual(SDL_JoystickID instance_id); + [return: NativeTypeName("bool")] + public static extern byte SDL_IsJoystickVirtual(SDL_JoystickID instance_id); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_SetJoystickVirtualAxis(SDL_Joystick* joystick, int axis, [NativeTypeName("Sint16")] short value); + [return: NativeTypeName("bool")] + public static extern byte SDL_SetJoystickVirtualAxis(SDL_Joystick* joystick, int axis, [NativeTypeName("Sint16")] short value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_SetJoystickVirtualBall(SDL_Joystick* joystick, int ball, [NativeTypeName("Sint16")] short xrel, [NativeTypeName("Sint16")] short yrel); + [return: NativeTypeName("bool")] + public static extern byte SDL_SetJoystickVirtualBall(SDL_Joystick* joystick, int ball, [NativeTypeName("Sint16")] short xrel, [NativeTypeName("Sint16")] short yrel); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_SetJoystickVirtualButton(SDL_Joystick* joystick, int button, SDL_bool down); + [return: NativeTypeName("bool")] + public static extern byte SDL_SetJoystickVirtualButton(SDL_Joystick* joystick, int button, [NativeTypeName("bool")] byte down); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_SetJoystickVirtualHat(SDL_Joystick* joystick, int hat, [NativeTypeName("Uint8")] byte value); + [return: NativeTypeName("bool")] + public static extern byte SDL_SetJoystickVirtualHat(SDL_Joystick* joystick, int hat, [NativeTypeName("Uint8")] byte value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_SetJoystickVirtualTouchpad(SDL_Joystick* joystick, int touchpad, int finger, SDL_bool down, float x, float y, float pressure); + [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); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_SendJoystickVirtualSensorData(SDL_Joystick* joystick, SDL_SensorType type, [NativeTypeName("Uint64")] ulong sensor_timestamp, [NativeTypeName("const float *")] float* data, int num_values); + [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); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_PropertiesID SDL_GetJoystickProperties(SDL_Joystick* joystick); @@ -259,7 +268,8 @@ namespace SDL public static extern int SDL_GetJoystickPlayerIndex(SDL_Joystick* joystick); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_SetJoystickPlayerIndex(SDL_Joystick* joystick, int player_index); + [return: NativeTypeName("bool")] + public static extern byte 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); @@ -291,7 +301,8 @@ namespace SDL public static extern void SDL_GetJoystickGUIDInfo(SDL_GUID guid, [NativeTypeName("Uint16 *")] ushort* vendor, [NativeTypeName("Uint16 *")] ushort* product, [NativeTypeName("Uint16 *")] ushort* version, [NativeTypeName("Uint16 *")] ushort* crc16); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_JoystickConnected(SDL_Joystick* joystick); + [return: NativeTypeName("bool")] + public static extern byte SDL_JoystickConnected(SDL_Joystick* joystick); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_JoystickID SDL_GetJoystickID(SDL_Joystick* joystick); @@ -309,10 +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(SDL_bool enabled); + public static extern void SDL_SetJoystickEventsEnabled([NativeTypeName("bool")] byte enabled); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_JoystickEventsEnabled(); + [return: NativeTypeName("bool")] + public static extern byte SDL_JoystickEventsEnabled(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_UpdateJoysticks(); @@ -322,29 +334,36 @@ namespace SDL public static extern short SDL_GetJoystickAxis(SDL_Joystick* joystick, int axis); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_GetJoystickAxisInitialState(SDL_Joystick* joystick, int axis, [NativeTypeName("Sint16 *")] short* state); + [return: NativeTypeName("bool")] + public static extern byte SDL_GetJoystickAxisInitialState(SDL_Joystick* joystick, int axis, [NativeTypeName("Sint16 *")] short* state); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_GetJoystickBall(SDL_Joystick* joystick, int ball, int* dx, int* dy); + [return: NativeTypeName("bool")] + public static extern byte SDL_GetJoystickBall(SDL_Joystick* joystick, int ball, int* dx, int* dy); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("Uint8")] public static extern byte SDL_GetJoystickHat(SDL_Joystick* joystick, int hat); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_GetJoystickButton(SDL_Joystick* joystick, int button); + [return: NativeTypeName("bool")] + public static extern byte SDL_GetJoystickButton(SDL_Joystick* joystick, int button); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_RumbleJoystick(SDL_Joystick* joystick, [NativeTypeName("Uint16")] ushort low_frequency_rumble, [NativeTypeName("Uint16")] ushort high_frequency_rumble, [NativeTypeName("Uint32")] uint duration_ms); + [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); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_RumbleJoystickTriggers(SDL_Joystick* joystick, [NativeTypeName("Uint16")] ushort left_rumble, [NativeTypeName("Uint16")] ushort right_rumble, [NativeTypeName("Uint32")] uint duration_ms); + [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); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_SetJoystickLED(SDL_Joystick* joystick, [NativeTypeName("Uint8")] byte red, [NativeTypeName("Uint8")] byte green, [NativeTypeName("Uint8")] byte blue); + [return: NativeTypeName("bool")] + public static extern byte SDL_SetJoystickLED(SDL_Joystick* joystick, [NativeTypeName("Uint8")] byte red, [NativeTypeName("Uint8")] byte green, [NativeTypeName("Uint8")] byte blue); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_SendJoystickEffect(SDL_Joystick* joystick, [NativeTypeName("const void *")] IntPtr data, int size); + [return: NativeTypeName("bool")] + public static extern byte SDL_SendJoystickEffect(SDL_Joystick* joystick, [NativeTypeName("const void *")] IntPtr data, int size); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_CloseJoystick(SDL_Joystick* joystick); diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_keyboard.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_keyboard.g.cs index 1f53dd3..066feb9 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_keyboard.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_keyboard.g.cs @@ -52,7 +52,8 @@ namespace SDL public static unsafe partial class SDL3 { [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_HasKeyboard(); + [return: NativeTypeName("bool")] + public static extern byte SDL_HasKeyboard(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_KeyboardID* SDL_GetKeyboards(int* count); @@ -65,8 +66,8 @@ namespace SDL public static extern SDL_Window* SDL_GetKeyboardFocus(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - [return: NativeTypeName("const SDL_bool *")] - public static extern SDL_bool* SDL_GetKeyboardState(int* numkeys); + [return: NativeTypeName("const bool *")] + public static extern bool* SDL_GetKeyboardState(int* numkeys); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_ResetKeyboard(); @@ -78,13 +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, SDL_bool key_event); + public static extern SDL_Keycode SDL_GetKeyFromScancode(SDL_Scancode scancode, SDL_Keymod modstate, [NativeTypeName("bool")] byte 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)] - public static extern SDL_bool SDL_SetScancodeName(SDL_Scancode scancode, [NativeTypeName("const char *")] byte* name); + [return: NativeTypeName("bool")] + public static extern byte SDL_SetScancodeName(SDL_Scancode scancode, [NativeTypeName("const char *")] byte* name); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetScancodeName", ExactSpelling = true)] [return: NativeTypeName("const char *")] @@ -101,31 +103,40 @@ namespace SDL public static extern SDL_Keycode SDL_GetKeyFromName([NativeTypeName("const char *")] byte* name); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_StartTextInput(SDL_Window* window); + [return: NativeTypeName("bool")] + public static extern byte SDL_StartTextInput(SDL_Window* window); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_StartTextInputWithProperties(SDL_Window* window, SDL_PropertiesID props); + [return: NativeTypeName("bool")] + public static extern byte SDL_StartTextInputWithProperties(SDL_Window* window, SDL_PropertiesID props); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_TextInputActive(SDL_Window* window); + [return: NativeTypeName("bool")] + public static extern byte SDL_TextInputActive(SDL_Window* window); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_StopTextInput(SDL_Window* window); + [return: NativeTypeName("bool")] + public static extern byte SDL_StopTextInput(SDL_Window* window); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_ClearComposition(SDL_Window* window); + [return: NativeTypeName("bool")] + public static extern byte SDL_ClearComposition(SDL_Window* window); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_SetTextInputArea(SDL_Window* window, [NativeTypeName("const SDL_Rect *")] SDL_Rect* rect, int cursor); + [return: NativeTypeName("bool")] + public static extern byte SDL_SetTextInputArea(SDL_Window* window, [NativeTypeName("const SDL_Rect *")] SDL_Rect* rect, int cursor); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_GetTextInputArea(SDL_Window* window, SDL_Rect* rect, int* cursor); + [return: NativeTypeName("bool")] + public static extern byte SDL_GetTextInputArea(SDL_Window* window, SDL_Rect* rect, int* cursor); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_HasScreenKeyboardSupport(); + [return: NativeTypeName("bool")] + public static extern byte SDL_HasScreenKeyboardSupport(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_ScreenKeyboardShown(SDL_Window* window); + [return: NativeTypeName("bool")] + public static extern byte SDL_ScreenKeyboardShown(SDL_Window* window); [NativeTypeName("#define SDL_PROP_TEXTINPUT_TYPE_NUMBER \"SDL.textinput.type\"")] public static ReadOnlySpan SDL_PROP_TEXTINPUT_TYPE_NUMBER => "SDL.textinput.type"u8; diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_log.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_log.g.cs index c6d4472..80c803a 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_log.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_log.g.cs @@ -54,7 +54,9 @@ namespace SDL public enum SDL_LogPriority { - SDL_LOG_PRIORITY_VERBOSE = 1, + SDL_LOG_PRIORITY_INVALID, + SDL_LOG_PRIORITY_TRACE, + SDL_LOG_PRIORITY_VERBOSE, SDL_LOG_PRIORITY_DEBUG, SDL_LOG_PRIORITY_INFO, SDL_LOG_PRIORITY_WARN, @@ -78,11 +80,15 @@ namespace SDL public static extern void SDL_ResetLogPriorities(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_SetLogPriorityPrefix(SDL_LogPriority priority, [NativeTypeName("const char *")] byte* prefix); + [return: NativeTypeName("bool")] + public static extern byte 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); + [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + public static extern void SDL_LogTrace(int category, [NativeTypeName("const char *")] byte* fmt, __arglist); + [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_LogVerbose(int category, [NativeTypeName("const char *")] byte* fmt, __arglist); diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_main.Windows.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_main.Windows.g.cs index 9f31b69..9e8a2eb 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_main.Windows.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_main.Windows.g.cs @@ -32,8 +32,9 @@ namespace SDL public static unsafe partial class SDL3 { [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + [return: NativeTypeName("bool")] [SupportedOSPlatform("Windows")] - public static extern SDL_bool SDL_RegisterApp([NativeTypeName("const char *")] byte* name, [NativeTypeName("Uint32")] uint style, [NativeTypeName("void*")] IntPtr hInst); + public static extern byte SDL_RegisterApp([NativeTypeName("const char *")] byte* name, [NativeTypeName("Uint32")] uint style, [NativeTypeName("void*")] IntPtr hInst); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [SupportedOSPlatform("Windows")] diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_messagebox.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_messagebox.g.cs index 32c4d59..55229e4 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_messagebox.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_messagebox.g.cs @@ -96,10 +96,12 @@ namespace SDL public static unsafe partial class SDL3 { [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_ShowMessageBox([NativeTypeName("const SDL_MessageBoxData *")] SDL_MessageBoxData* messageboxdata, int* buttonid); + [return: NativeTypeName("bool")] + public static extern byte SDL_ShowMessageBox([NativeTypeName("const SDL_MessageBoxData *")] SDL_MessageBoxData* messageboxdata, int* buttonid); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_ShowSimpleMessageBox(SDL_MessageBoxFlags flags, [NativeTypeName("const char *")] byte* title, [NativeTypeName("const char *")] byte* message, SDL_Window* window); + [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); [NativeTypeName("#define SDL_MESSAGEBOX_ERROR 0x00000010u")] public const uint SDL_MESSAGEBOX_ERROR = 0x00000010U; diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_misc.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_misc.g.cs index 4ff0b8c..a8cbeb2 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_misc.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_misc.g.cs @@ -30,6 +30,7 @@ namespace SDL public static unsafe partial class SDL3 { [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_OpenURL([NativeTypeName("const char *")] byte* url); + [return: NativeTypeName("bool")] + public static extern byte SDL_OpenURL([NativeTypeName("const char *")] byte* url); } } diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_mouse.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_mouse.g.cs index b9bcb0c..4bf1a43 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_mouse.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_mouse.g.cs @@ -65,7 +65,8 @@ namespace SDL public static unsafe partial class SDL3 { [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_HasMouse(); + [return: NativeTypeName("bool")] + public static extern byte SDL_HasMouse(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_MouseID* SDL_GetMice(int* count); @@ -90,16 +91,20 @@ namespace SDL public static extern void SDL_WarpMouseInWindow(SDL_Window* window, float x, float y); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_WarpMouseGlobal(float x, float y); + [return: NativeTypeName("bool")] + public static extern byte SDL_WarpMouseGlobal(float x, float y); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_SetWindowRelativeMouseMode(SDL_Window* window, SDL_bool enabled); + [return: NativeTypeName("bool")] + public static extern byte SDL_SetWindowRelativeMouseMode(SDL_Window* window, [NativeTypeName("bool")] byte enabled); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_GetWindowRelativeMouseMode(SDL_Window* window); + [return: NativeTypeName("bool")] + public static extern byte SDL_GetWindowRelativeMouseMode(SDL_Window* window); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_CaptureMouse(SDL_bool enabled); + [return: NativeTypeName("bool")] + public static extern byte SDL_CaptureMouse([NativeTypeName("bool")] byte 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); @@ -111,7 +116,8 @@ namespace SDL public static extern SDL_Cursor* SDL_CreateSystemCursor(SDL_SystemCursor id); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_SetCursor(SDL_Cursor* cursor); + [return: NativeTypeName("bool")] + public static extern byte SDL_SetCursor(SDL_Cursor* cursor); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_Cursor* SDL_GetCursor(); @@ -123,13 +129,16 @@ namespace SDL public static extern void SDL_DestroyCursor(SDL_Cursor* cursor); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_ShowCursor(); + [return: NativeTypeName("bool")] + public static extern byte SDL_ShowCursor(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_HideCursor(); + [return: NativeTypeName("bool")] + public static extern byte SDL_HideCursor(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_CursorVisible(); + [return: NativeTypeName("bool")] + public static extern byte SDL_CursorVisible(); [NativeTypeName("#define SDL_BUTTON_LEFT 1")] public const int SDL_BUTTON_LEFT = 1; diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_mutex.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_mutex.g.cs index fbb03d1..6af74fa 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_mutex.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_mutex.g.cs @@ -52,7 +52,8 @@ namespace SDL public static extern void SDL_LockMutex(SDL_Mutex* mutex); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_TryLockMutex(SDL_Mutex* mutex); + [return: NativeTypeName("bool")] + public static extern byte SDL_TryLockMutex(SDL_Mutex* mutex); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_UnlockMutex(SDL_Mutex* mutex); @@ -70,10 +71,12 @@ namespace SDL public static extern void SDL_LockRWLockForWriting(SDL_RWLock* rwlock); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_TryLockRWLockForReading(SDL_RWLock* rwlock); + [return: NativeTypeName("bool")] + public static extern byte SDL_TryLockRWLockForReading(SDL_RWLock* rwlock); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_TryLockRWLockForWriting(SDL_RWLock* rwlock); + [return: NativeTypeName("bool")] + public static extern byte SDL_TryLockRWLockForWriting(SDL_RWLock* rwlock); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_UnlockRWLock(SDL_RWLock* rwlock); @@ -91,10 +94,12 @@ namespace SDL public static extern void SDL_WaitSemaphore(SDL_Semaphore* sem); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_TryWaitSemaphore(SDL_Semaphore* sem); + [return: NativeTypeName("bool")] + public static extern byte SDL_TryWaitSemaphore(SDL_Semaphore* sem); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_WaitSemaphoreTimeout(SDL_Semaphore* sem, [NativeTypeName("Sint32")] int timeoutMS); + [return: NativeTypeName("bool")] + public static extern byte 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); @@ -119,6 +124,7 @@ namespace SDL public static extern void SDL_WaitCondition(SDL_Condition* cond, SDL_Mutex* mutex); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_WaitConditionTimeout(SDL_Condition* cond, SDL_Mutex* mutex, [NativeTypeName("Sint32")] int timeoutMS); + [return: NativeTypeName("bool")] + public static extern byte SDL_WaitConditionTimeout(SDL_Condition* cond, SDL_Mutex* mutex, [NativeTypeName("Sint32")] int timeoutMS); } } diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_pixels.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_pixels.g.cs index 1f3ae04..1dd0792 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_pixels.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_pixels.g.cs @@ -359,7 +359,8 @@ namespace SDL public static extern byte* Unsafe_SDL_GetPixelFormatName(SDL_PixelFormat format); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_GetMasksForPixelFormat(SDL_PixelFormat format, int* bpp, [NativeTypeName("Uint32 *")] uint* Rmask, [NativeTypeName("Uint32 *")] uint* Gmask, [NativeTypeName("Uint32 *")] uint* Bmask, [NativeTypeName("Uint32 *")] uint* Amask); + [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); [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); @@ -372,7 +373,8 @@ namespace SDL public static extern SDL_Palette* SDL_CreatePalette(int ncolors); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_SetPaletteColors(SDL_Palette* palette, [NativeTypeName("const SDL_Color *")] SDL_Color* colors, int firstcolor, int ncolors); + [return: NativeTypeName("bool")] + public static extern byte SDL_SetPaletteColors(SDL_Palette* palette, [NativeTypeName("const SDL_Color *")] SDL_Color* colors, int firstcolor, int ncolors); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_DestroyPalette(SDL_Palette* palette); diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_process.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_process.g.cs index 01d7c5d..b9b691d 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_process.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_process.g.cs @@ -43,7 +43,7 @@ namespace SDL public static unsafe partial class SDL3 { [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_Process* SDL_CreateProcess([NativeTypeName("const char *const *")] byte** args, SDL_bool pipe_stdio); + public static extern SDL_Process* SDL_CreateProcess([NativeTypeName("const char *const *")] byte** args, [NativeTypeName("bool")] byte pipe_stdio); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_Process* SDL_CreateProcessWithProperties(SDL_PropertiesID props); @@ -62,10 +62,12 @@ namespace SDL public static extern SDL_IOStream* SDL_GetProcessOutput(SDL_Process* process); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_KillProcess(SDL_Process* process, SDL_bool force); + [return: NativeTypeName("bool")] + public static extern byte SDL_KillProcess(SDL_Process* process, [NativeTypeName("bool")] byte force); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_WaitProcess(SDL_Process* process, SDL_bool block, int* exitcode); + [return: NativeTypeName("bool")] + public static extern byte SDL_WaitProcess(SDL_Process* process, [NativeTypeName("bool")] byte block, int* exitcode); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_DestroyProcess(SDL_Process* process); diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_properties.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_properties.g.cs index 8919bfa..2446c10 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_properties.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_properties.g.cs @@ -47,34 +47,43 @@ namespace SDL public static extern SDL_PropertiesID SDL_CreateProperties(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_CopyProperties(SDL_PropertiesID src, SDL_PropertiesID dst); + [return: NativeTypeName("bool")] + public static extern byte SDL_CopyProperties(SDL_PropertiesID src, SDL_PropertiesID dst); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_LockProperties(SDL_PropertiesID props); + [return: NativeTypeName("bool")] + public static extern byte 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)] - public static extern SDL_bool SDL_SetPointerPropertyWithCleanup(SDL_PropertiesID props, [NativeTypeName("const char *")] byte* name, [NativeTypeName("void*")] IntPtr value, [NativeTypeName("SDL_CleanupPropertyCallback")] delegate* unmanaged[Cdecl] cleanup, [NativeTypeName("void*")] IntPtr userdata); + [return: NativeTypeName("bool")] + public static extern byte SDL_SetPointerPropertyWithCleanup(SDL_PropertiesID props, [NativeTypeName("const char *")] byte* name, [NativeTypeName("void*")] IntPtr value, [NativeTypeName("SDL_CleanupPropertyCallback")] delegate* unmanaged[Cdecl] cleanup, [NativeTypeName("void*")] IntPtr userdata); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_SetPointerProperty(SDL_PropertiesID props, [NativeTypeName("const char *")] byte* name, [NativeTypeName("void*")] IntPtr value); + [return: NativeTypeName("bool")] + public static extern byte SDL_SetPointerProperty(SDL_PropertiesID props, [NativeTypeName("const char *")] byte* name, [NativeTypeName("void*")] IntPtr value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_SetStringProperty(SDL_PropertiesID props, [NativeTypeName("const char *")] byte* name, [NativeTypeName("const char *")] byte* value); + [return: NativeTypeName("bool")] + public static extern byte SDL_SetStringProperty(SDL_PropertiesID props, [NativeTypeName("const char *")] byte* name, [NativeTypeName("const char *")] byte* value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_SetNumberProperty(SDL_PropertiesID props, [NativeTypeName("const char *")] byte* name, [NativeTypeName("Sint64")] long value); + [return: NativeTypeName("bool")] + public static extern byte SDL_SetNumberProperty(SDL_PropertiesID props, [NativeTypeName("const char *")] byte* name, [NativeTypeName("Sint64")] long value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_SetFloatProperty(SDL_PropertiesID props, [NativeTypeName("const char *")] byte* name, float value); + [return: NativeTypeName("bool")] + public static extern byte SDL_SetFloatProperty(SDL_PropertiesID props, [NativeTypeName("const char *")] byte* name, float value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_SetBooleanProperty(SDL_PropertiesID props, [NativeTypeName("const char *")] byte* name, SDL_bool value); + [return: NativeTypeName("bool")] + public static extern byte SDL_SetBooleanProperty(SDL_PropertiesID props, [NativeTypeName("const char *")] byte* name, [NativeTypeName("bool")] byte value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_HasProperty(SDL_PropertiesID props, [NativeTypeName("const char *")] byte* name); + [return: NativeTypeName("bool")] + public static extern byte 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); @@ -95,13 +104,16 @@ namespace SDL public static extern float SDL_GetFloatProperty(SDL_PropertiesID props, [NativeTypeName("const char *")] byte* name, float default_value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_GetBooleanProperty(SDL_PropertiesID props, [NativeTypeName("const char *")] byte* name, SDL_bool default_value); + [return: NativeTypeName("bool")] + public static extern byte SDL_GetBooleanProperty(SDL_PropertiesID props, [NativeTypeName("const char *")] byte* name, [NativeTypeName("bool")] byte default_value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_ClearProperty(SDL_PropertiesID props, [NativeTypeName("const char *")] byte* name); + [return: NativeTypeName("bool")] + public static extern byte SDL_ClearProperty(SDL_PropertiesID props, [NativeTypeName("const char *")] byte* name); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_EnumerateProperties(SDL_PropertiesID props, [NativeTypeName("SDL_EnumeratePropertiesCallback")] delegate* unmanaged[Cdecl] callback, [NativeTypeName("void*")] IntPtr userdata); + [return: NativeTypeName("bool")] + public static extern byte SDL_EnumerateProperties(SDL_PropertiesID props, [NativeTypeName("SDL_EnumeratePropertiesCallback")] delegate* unmanaged[Cdecl] callback, [NativeTypeName("void*")] IntPtr userdata); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_DestroyProperties(SDL_PropertiesID props); diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_rect.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_rect.g.cs index 47e65ae..19a3f29 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_rect.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_rect.g.cs @@ -73,69 +73,79 @@ namespace SDL frect->h = (float)(rect->h); } - public static SDL_bool SDL_PointInRect([NativeTypeName("const SDL_Point *")] SDL_Point* p, [NativeTypeName("const SDL_Rect *")] SDL_Rect* r) + public static bool 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 SDL_bool SDL_RectEmpty([NativeTypeName("const SDL_Rect *")] SDL_Rect* r) + public static bool SDL_RectEmpty([NativeTypeName("const SDL_Rect *")] SDL_Rect* r) { return ((r == null) || (r->w <= 0) || (r->h <= 0)) ? true : false; } - public static SDL_bool SDL_RectsEqual([NativeTypeName("const SDL_Rect *")] SDL_Rect* a, [NativeTypeName("const SDL_Rect *")] SDL_Rect* b) + public static bool 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)] - public static extern SDL_bool SDL_HasRectIntersection([NativeTypeName("const SDL_Rect *")] SDL_Rect* A, [NativeTypeName("const SDL_Rect *")] SDL_Rect* B); + [return: NativeTypeName("bool")] + public static extern byte SDL_HasRectIntersection([NativeTypeName("const SDL_Rect *")] SDL_Rect* A, [NativeTypeName("const SDL_Rect *")] SDL_Rect* B); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_GetRectIntersection([NativeTypeName("const SDL_Rect *")] SDL_Rect* A, [NativeTypeName("const SDL_Rect *")] SDL_Rect* B, SDL_Rect* result); + [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); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_GetRectUnion([NativeTypeName("const SDL_Rect *")] SDL_Rect* A, [NativeTypeName("const SDL_Rect *")] SDL_Rect* B, SDL_Rect* result); + [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); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_GetRectEnclosingPoints([NativeTypeName("const SDL_Point *")] SDL_Point* points, int count, [NativeTypeName("const SDL_Rect *")] SDL_Rect* clip, SDL_Rect* result); + [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); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_GetRectAndLineIntersection([NativeTypeName("const SDL_Rect *")] SDL_Rect* rect, int* X1, int* Y1, int* X2, int* Y2); + [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 SDL_bool SDL_PointInRectFloat([NativeTypeName("const SDL_FPoint *")] SDL_FPoint* p, [NativeTypeName("const SDL_FRect *")] SDL_FRect* r) + public static bool 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 SDL_bool SDL_RectEmptyFloat([NativeTypeName("const SDL_FRect *")] SDL_FRect* r) + public static bool SDL_RectEmptyFloat([NativeTypeName("const SDL_FRect *")] SDL_FRect* r) { return ((r == null) || (r->w < 0.0f) || (r->h < 0.0f)) ? true : false; } - public static SDL_bool SDL_RectsEqualEpsilon([NativeTypeName("const SDL_FRect *")] SDL_FRect* a, [NativeTypeName("const SDL_FRect *")] SDL_FRect* b, [NativeTypeName("const float")] float epsilon) + 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 ((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 SDL_bool SDL_RectsEqualFloat([NativeTypeName("const SDL_FRect *")] SDL_FRect* a, [NativeTypeName("const SDL_FRect *")] SDL_FRect* b) + public static bool 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)] - public static extern SDL_bool SDL_HasRectIntersectionFloat([NativeTypeName("const SDL_FRect *")] SDL_FRect* A, [NativeTypeName("const SDL_FRect *")] SDL_FRect* B); + [return: NativeTypeName("bool")] + public static extern byte SDL_HasRectIntersectionFloat([NativeTypeName("const SDL_FRect *")] SDL_FRect* A, [NativeTypeName("const SDL_FRect *")] SDL_FRect* B); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_GetRectIntersectionFloat([NativeTypeName("const SDL_FRect *")] SDL_FRect* A, [NativeTypeName("const SDL_FRect *")] SDL_FRect* B, SDL_FRect* result); + [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); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_GetRectUnionFloat([NativeTypeName("const SDL_FRect *")] SDL_FRect* A, [NativeTypeName("const SDL_FRect *")] SDL_FRect* B, SDL_FRect* result); + [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); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_GetRectEnclosingPointsFloat([NativeTypeName("const SDL_FPoint *")] SDL_FPoint* points, int count, [NativeTypeName("const SDL_FRect *")] SDL_FRect* clip, SDL_FRect* result); + [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); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_GetRectAndLineIntersectionFloat([NativeTypeName("const SDL_FRect *")] SDL_FRect* rect, float* X1, float* Y1, float* X2, float* Y2); + [return: NativeTypeName("bool")] + public static extern byte SDL_GetRectAndLineIntersectionFloat([NativeTypeName("const SDL_FRect *")] SDL_FRect* rect, float* X1, float* Y1, float* X2, float* Y2); } } diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_render.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_render.g.cs index 527635a..1019086 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_render.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_render.g.cs @@ -71,7 +71,8 @@ namespace SDL public static extern byte* Unsafe_SDL_GetRenderDriver(int index); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_CreateWindowAndRenderer([NativeTypeName("const char *")] byte* title, int width, int height, SDL_WindowFlags window_flags, SDL_Window** window, SDL_Renderer** renderer); + [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); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_Renderer* SDL_CreateRenderer(SDL_Window* window, [NativeTypeName("const char *")] byte* name); @@ -96,10 +97,12 @@ namespace SDL public static extern SDL_PropertiesID SDL_GetRendererProperties(SDL_Renderer* renderer); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_GetRenderOutputSize(SDL_Renderer* renderer, int* w, int* h); + [return: NativeTypeName("bool")] + public static extern byte SDL_GetRenderOutputSize(SDL_Renderer* renderer, int* w, int* h); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_GetCurrentRenderOutputSize(SDL_Renderer* renderer, int* w, int* h); + [return: NativeTypeName("bool")] + public static extern byte 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); @@ -117,187 +120,245 @@ namespace SDL public static extern SDL_Renderer* SDL_GetRendererFromTexture(SDL_Texture* texture); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_GetTextureSize(SDL_Texture* texture, float* w, float* h); + [return: NativeTypeName("bool")] + public static extern byte SDL_GetTextureSize(SDL_Texture* texture, float* w, float* h); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_SetTextureColorMod(SDL_Texture* texture, [NativeTypeName("Uint8")] byte r, [NativeTypeName("Uint8")] byte g, [NativeTypeName("Uint8")] byte b); + [return: NativeTypeName("bool")] + public static extern byte SDL_SetTextureColorMod(SDL_Texture* texture, [NativeTypeName("Uint8")] byte r, [NativeTypeName("Uint8")] byte g, [NativeTypeName("Uint8")] byte b); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_SetTextureColorModFloat(SDL_Texture* texture, float r, float g, float b); + [return: NativeTypeName("bool")] + public static extern byte SDL_SetTextureColorModFloat(SDL_Texture* texture, float r, float g, float b); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_GetTextureColorMod(SDL_Texture* texture, [NativeTypeName("Uint8 *")] byte* r, [NativeTypeName("Uint8 *")] byte* g, [NativeTypeName("Uint8 *")] byte* b); + [return: NativeTypeName("bool")] + public static extern byte SDL_GetTextureColorMod(SDL_Texture* texture, [NativeTypeName("Uint8 *")] byte* r, [NativeTypeName("Uint8 *")] byte* g, [NativeTypeName("Uint8 *")] byte* b); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_GetTextureColorModFloat(SDL_Texture* texture, float* r, float* g, float* b); + [return: NativeTypeName("bool")] + public static extern byte SDL_GetTextureColorModFloat(SDL_Texture* texture, float* r, float* g, float* b); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_SetTextureAlphaMod(SDL_Texture* texture, [NativeTypeName("Uint8")] byte alpha); + [return: NativeTypeName("bool")] + public static extern byte SDL_SetTextureAlphaMod(SDL_Texture* texture, [NativeTypeName("Uint8")] byte alpha); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_SetTextureAlphaModFloat(SDL_Texture* texture, float alpha); + [return: NativeTypeName("bool")] + public static extern byte SDL_SetTextureAlphaModFloat(SDL_Texture* texture, float alpha); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_GetTextureAlphaMod(SDL_Texture* texture, [NativeTypeName("Uint8 *")] byte* alpha); + [return: NativeTypeName("bool")] + public static extern byte SDL_GetTextureAlphaMod(SDL_Texture* texture, [NativeTypeName("Uint8 *")] byte* alpha); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_GetTextureAlphaModFloat(SDL_Texture* texture, float* alpha); + [return: NativeTypeName("bool")] + public static extern byte SDL_GetTextureAlphaModFloat(SDL_Texture* texture, float* alpha); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_SetTextureBlendMode(SDL_Texture* texture, SDL_BlendMode blendMode); + [return: NativeTypeName("bool")] + public static extern byte SDL_SetTextureBlendMode(SDL_Texture* texture, SDL_BlendMode blendMode); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_GetTextureBlendMode(SDL_Texture* texture, SDL_BlendMode* blendMode); + [return: NativeTypeName("bool")] + public static extern byte SDL_GetTextureBlendMode(SDL_Texture* texture, SDL_BlendMode* blendMode); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_SetTextureScaleMode(SDL_Texture* texture, SDL_ScaleMode scaleMode); + [return: NativeTypeName("bool")] + public static extern byte SDL_SetTextureScaleMode(SDL_Texture* texture, SDL_ScaleMode scaleMode); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_GetTextureScaleMode(SDL_Texture* texture, SDL_ScaleMode* scaleMode); + [return: NativeTypeName("bool")] + public static extern byte SDL_GetTextureScaleMode(SDL_Texture* texture, SDL_ScaleMode* scaleMode); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_UpdateTexture(SDL_Texture* texture, [NativeTypeName("const SDL_Rect *")] SDL_Rect* rect, [NativeTypeName("const void *")] IntPtr pixels, int pitch); + [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); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool 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); + [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); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool 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); + [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); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_LockTexture(SDL_Texture* texture, [NativeTypeName("const SDL_Rect *")] SDL_Rect* rect, [NativeTypeName("void **")] IntPtr* pixels, int* pitch); + [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); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_LockTextureToSurface(SDL_Texture* texture, [NativeTypeName("const SDL_Rect *")] SDL_Rect* rect, SDL_Surface** surface); + [return: NativeTypeName("bool")] + public static extern byte 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)] - public static extern SDL_bool SDL_SetRenderTarget(SDL_Renderer* renderer, SDL_Texture* texture); + [return: NativeTypeName("bool")] + public static extern byte 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)] - public static extern SDL_bool SDL_SetRenderLogicalPresentation(SDL_Renderer* renderer, int w, int h, SDL_RendererLogicalPresentation mode, SDL_ScaleMode scale_mode); + [return: NativeTypeName("bool")] + public static extern byte SDL_SetRenderLogicalPresentation(SDL_Renderer* renderer, int w, int h, SDL_RendererLogicalPresentation mode, SDL_ScaleMode scale_mode); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_GetRenderLogicalPresentation(SDL_Renderer* renderer, int* w, int* h, SDL_RendererLogicalPresentation* mode, SDL_ScaleMode* scale_mode); + [return: NativeTypeName("bool")] + public static extern byte SDL_GetRenderLogicalPresentation(SDL_Renderer* renderer, int* w, int* h, SDL_RendererLogicalPresentation* mode, SDL_ScaleMode* scale_mode); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_GetRenderLogicalPresentationRect(SDL_Renderer* renderer, SDL_FRect* rect); + [return: NativeTypeName("bool")] + public static extern byte SDL_GetRenderLogicalPresentationRect(SDL_Renderer* renderer, SDL_FRect* rect); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_RenderCoordinatesFromWindow(SDL_Renderer* renderer, float window_x, float window_y, float* x, float* y); + [return: NativeTypeName("bool")] + public static extern byte SDL_RenderCoordinatesFromWindow(SDL_Renderer* renderer, float window_x, float window_y, float* x, float* y); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_RenderCoordinatesToWindow(SDL_Renderer* renderer, float x, float y, float* window_x, float* window_y); + [return: NativeTypeName("bool")] + public static extern byte SDL_RenderCoordinatesToWindow(SDL_Renderer* renderer, float x, float y, float* window_x, float* window_y); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_ConvertEventToRenderCoordinates(SDL_Renderer* renderer, SDL_Event* @event); + [return: NativeTypeName("bool")] + public static extern byte SDL_ConvertEventToRenderCoordinates(SDL_Renderer* renderer, SDL_Event* @event); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_SetRenderViewport(SDL_Renderer* renderer, [NativeTypeName("const SDL_Rect *")] SDL_Rect* rect); + [return: NativeTypeName("bool")] + public static extern byte SDL_SetRenderViewport(SDL_Renderer* renderer, [NativeTypeName("const SDL_Rect *")] SDL_Rect* rect); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_GetRenderViewport(SDL_Renderer* renderer, SDL_Rect* rect); + [return: NativeTypeName("bool")] + public static extern byte SDL_GetRenderViewport(SDL_Renderer* renderer, SDL_Rect* rect); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_RenderViewportSet(SDL_Renderer* renderer); + [return: NativeTypeName("bool")] + public static extern byte SDL_RenderViewportSet(SDL_Renderer* renderer); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_GetRenderSafeArea(SDL_Renderer* renderer, SDL_Rect* rect); + [return: NativeTypeName("bool")] + public static extern byte SDL_GetRenderSafeArea(SDL_Renderer* renderer, SDL_Rect* rect); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_SetRenderClipRect(SDL_Renderer* renderer, [NativeTypeName("const SDL_Rect *")] SDL_Rect* rect); + [return: NativeTypeName("bool")] + public static extern byte SDL_SetRenderClipRect(SDL_Renderer* renderer, [NativeTypeName("const SDL_Rect *")] SDL_Rect* rect); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_GetRenderClipRect(SDL_Renderer* renderer, SDL_Rect* rect); + [return: NativeTypeName("bool")] + public static extern byte SDL_GetRenderClipRect(SDL_Renderer* renderer, SDL_Rect* rect); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_RenderClipEnabled(SDL_Renderer* renderer); + [return: NativeTypeName("bool")] + public static extern byte SDL_RenderClipEnabled(SDL_Renderer* renderer); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_SetRenderScale(SDL_Renderer* renderer, float scaleX, float scaleY); + [return: NativeTypeName("bool")] + public static extern byte SDL_SetRenderScale(SDL_Renderer* renderer, float scaleX, float scaleY); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_GetRenderScale(SDL_Renderer* renderer, float* scaleX, float* scaleY); + [return: NativeTypeName("bool")] + public static extern byte SDL_GetRenderScale(SDL_Renderer* renderer, float* scaleX, float* scaleY); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_SetRenderDrawColor(SDL_Renderer* renderer, [NativeTypeName("Uint8")] byte r, [NativeTypeName("Uint8")] byte g, [NativeTypeName("Uint8")] byte b, [NativeTypeName("Uint8")] byte a); + [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); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_SetRenderDrawColorFloat(SDL_Renderer* renderer, float r, float g, float b, float a); + [return: NativeTypeName("bool")] + public static extern byte SDL_SetRenderDrawColorFloat(SDL_Renderer* renderer, float r, float g, float b, float a); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_GetRenderDrawColor(SDL_Renderer* renderer, [NativeTypeName("Uint8 *")] byte* r, [NativeTypeName("Uint8 *")] byte* g, [NativeTypeName("Uint8 *")] byte* b, [NativeTypeName("Uint8 *")] byte* a); + [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); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_GetRenderDrawColorFloat(SDL_Renderer* renderer, float* r, float* g, float* b, float* a); + [return: NativeTypeName("bool")] + public static extern byte SDL_GetRenderDrawColorFloat(SDL_Renderer* renderer, float* r, float* g, float* b, float* a); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_SetRenderColorScale(SDL_Renderer* renderer, float scale); + [return: NativeTypeName("bool")] + public static extern byte SDL_SetRenderColorScale(SDL_Renderer* renderer, float scale); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_GetRenderColorScale(SDL_Renderer* renderer, float* scale); + [return: NativeTypeName("bool")] + public static extern byte SDL_GetRenderColorScale(SDL_Renderer* renderer, float* scale); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_SetRenderDrawBlendMode(SDL_Renderer* renderer, SDL_BlendMode blendMode); + [return: NativeTypeName("bool")] + public static extern byte SDL_SetRenderDrawBlendMode(SDL_Renderer* renderer, SDL_BlendMode blendMode); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_GetRenderDrawBlendMode(SDL_Renderer* renderer, SDL_BlendMode* blendMode); + [return: NativeTypeName("bool")] + public static extern byte SDL_GetRenderDrawBlendMode(SDL_Renderer* renderer, SDL_BlendMode* blendMode); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_RenderClear(SDL_Renderer* renderer); + [return: NativeTypeName("bool")] + public static extern byte SDL_RenderClear(SDL_Renderer* renderer); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_RenderPoint(SDL_Renderer* renderer, float x, float y); + [return: NativeTypeName("bool")] + public static extern byte SDL_RenderPoint(SDL_Renderer* renderer, float x, float y); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_RenderPoints(SDL_Renderer* renderer, [NativeTypeName("const SDL_FPoint *")] SDL_FPoint* points, int count); + [return: NativeTypeName("bool")] + public static extern byte SDL_RenderPoints(SDL_Renderer* renderer, [NativeTypeName("const SDL_FPoint *")] SDL_FPoint* points, int count); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_RenderLine(SDL_Renderer* renderer, float x1, float y1, float x2, float y2); + [return: NativeTypeName("bool")] + public static extern byte SDL_RenderLine(SDL_Renderer* renderer, float x1, float y1, float x2, float y2); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_RenderLines(SDL_Renderer* renderer, [NativeTypeName("const SDL_FPoint *")] SDL_FPoint* points, int count); + [return: NativeTypeName("bool")] + public static extern byte SDL_RenderLines(SDL_Renderer* renderer, [NativeTypeName("const SDL_FPoint *")] SDL_FPoint* points, int count); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_RenderRect(SDL_Renderer* renderer, [NativeTypeName("const SDL_FRect *")] SDL_FRect* rect); + [return: NativeTypeName("bool")] + public static extern byte SDL_RenderRect(SDL_Renderer* renderer, [NativeTypeName("const SDL_FRect *")] SDL_FRect* rect); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_RenderRects(SDL_Renderer* renderer, [NativeTypeName("const SDL_FRect *")] SDL_FRect* rects, int count); + [return: NativeTypeName("bool")] + public static extern byte SDL_RenderRects(SDL_Renderer* renderer, [NativeTypeName("const SDL_FRect *")] SDL_FRect* rects, int count); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_RenderFillRect(SDL_Renderer* renderer, [NativeTypeName("const SDL_FRect *")] SDL_FRect* rect); + [return: NativeTypeName("bool")] + public static extern byte SDL_RenderFillRect(SDL_Renderer* renderer, [NativeTypeName("const SDL_FRect *")] SDL_FRect* rect); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_RenderFillRects(SDL_Renderer* renderer, [NativeTypeName("const SDL_FRect *")] SDL_FRect* rects, int count); + [return: NativeTypeName("bool")] + public static extern byte SDL_RenderFillRects(SDL_Renderer* renderer, [NativeTypeName("const SDL_FRect *")] SDL_FRect* rects, int count); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_RenderTexture(SDL_Renderer* renderer, SDL_Texture* texture, [NativeTypeName("const SDL_FRect *")] SDL_FRect* srcrect, [NativeTypeName("const SDL_FRect *")] SDL_FRect* dstrect); + [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); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool 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); + [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); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_RenderTextureTiled(SDL_Renderer* renderer, SDL_Texture* texture, [NativeTypeName("const SDL_FRect *")] SDL_FRect* srcrect, float scale, [NativeTypeName("const SDL_FRect *")] SDL_FRect* dstrect); + [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); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool 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); + [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); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool 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); + [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); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool 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); + [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); [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)] - public static extern SDL_bool SDL_RenderPresent(SDL_Renderer* renderer); + [return: NativeTypeName("bool")] + public static extern byte SDL_RenderPresent(SDL_Renderer* renderer); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_DestroyTexture(SDL_Texture* texture); @@ -306,7 +367,8 @@ namespace SDL public static extern void SDL_DestroyRenderer(SDL_Renderer* renderer); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_FlushRenderer(SDL_Renderer* renderer); + [return: NativeTypeName("bool")] + public static extern byte SDL_FlushRenderer(SDL_Renderer* renderer); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("void*")] @@ -317,13 +379,16 @@ namespace SDL public static extern IntPtr SDL_GetRenderMetalCommandEncoder(SDL_Renderer* renderer); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_AddVulkanRenderSemaphores(SDL_Renderer* renderer, [NativeTypeName("Uint32")] uint wait_stage_mask, [NativeTypeName("Sint64")] long wait_semaphore, [NativeTypeName("Sint64")] long signal_semaphore); + [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); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_SetRenderVSync(SDL_Renderer* renderer, int vsync); + [return: NativeTypeName("bool")] + public static extern byte SDL_SetRenderVSync(SDL_Renderer* renderer, int vsync); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_GetRenderVSync(SDL_Renderer* renderer, int* vsync); + [return: NativeTypeName("bool")] + public static extern byte SDL_GetRenderVSync(SDL_Renderer* renderer, int* vsync); [NativeTypeName("#define SDL_SOFTWARE_RENDERER \"software\"")] public static ReadOnlySpan SDL_SOFTWARE_RENDERER => "software"u8; diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_sensor.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_sensor.g.cs index 0d1308c..93d0d58 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_sensor.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_sensor.g.cs @@ -81,7 +81,8 @@ namespace SDL public static extern SDL_SensorID SDL_GetSensorID(SDL_Sensor* sensor); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_GetSensorData(SDL_Sensor* sensor, float* data, int num_values); + [return: NativeTypeName("bool")] + public static extern byte SDL_GetSensorData(SDL_Sensor* sensor, float* data, int num_values); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_CloseSensor(SDL_Sensor* sensor); diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_stdinc.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_stdinc.g.cs index a81a2f1..6536b44 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_stdinc.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_stdinc.g.cs @@ -74,7 +74,8 @@ namespace SDL public static extern void SDL_GetMemoryFunctions([NativeTypeName("SDL_malloc_func *")] delegate* unmanaged[Cdecl]* malloc_func, [NativeTypeName("SDL_calloc_func *")] delegate* unmanaged[Cdecl]* calloc_func, [NativeTypeName("SDL_realloc_func *")] delegate* unmanaged[Cdecl]* realloc_func, [NativeTypeName("SDL_free_func *")] delegate* unmanaged[Cdecl]* free_func); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_SetMemoryFunctions([NativeTypeName("SDL_malloc_func")] delegate* unmanaged[Cdecl] malloc_func, [NativeTypeName("SDL_calloc_func")] delegate* unmanaged[Cdecl] calloc_func, [NativeTypeName("SDL_realloc_func")] delegate* unmanaged[Cdecl] realloc_func, [NativeTypeName("SDL_free_func")] delegate* unmanaged[Cdecl] free_func); + [return: NativeTypeName("bool")] + public static extern byte SDL_SetMemoryFunctions([NativeTypeName("SDL_malloc_func")] delegate* unmanaged[Cdecl] malloc_func, [NativeTypeName("SDL_calloc_func")] delegate* unmanaged[Cdecl] calloc_func, [NativeTypeName("SDL_realloc_func")] delegate* unmanaged[Cdecl] realloc_func, [NativeTypeName("SDL_free_func")] delegate* unmanaged[Cdecl] free_func); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("void*")] @@ -90,10 +91,7 @@ namespace SDL public static extern SDL_Environment* SDL_GetEnvironment(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void SDL_CleanupEnvironment(); - - [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_Environment* SDL_CreateEnvironment(SDL_bool populated); + public static extern SDL_Environment* SDL_CreateEnvironment([NativeTypeName("bool")] byte populated); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetEnvironmentVariable", ExactSpelling = true)] [return: NativeTypeName("const char *")] @@ -104,14 +102,20 @@ namespace SDL public static extern byte** SDL_GetEnvironmentVariables(SDL_Environment* env); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_SetEnvironmentVariable(SDL_Environment* env, [NativeTypeName("const char *")] byte* name, [NativeTypeName("const char *")] byte* value, SDL_bool overwrite); + [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); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_UnsetEnvironmentVariable(SDL_Environment* env, [NativeTypeName("const char *")] byte* name); + [return: NativeTypeName("bool")] + public static extern byte 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); + [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_getenv", ExactSpelling = true)] + [return: NativeTypeName("const char *")] + public static extern byte* Unsafe_SDL_getenv([NativeTypeName("const char *")] byte* name); + [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_getenv_unsafe", ExactSpelling = true)] [return: NativeTypeName("const char *")] public static extern byte* Unsafe_SDL_getenv_unsafe([NativeTypeName("const char *")] byte* name); @@ -607,7 +611,7 @@ 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 SDL_bool SDL_size_mul_check_overflow([NativeTypeName("size_t")] nuint a, [NativeTypeName("size_t")] nuint b, [NativeTypeName("size_t *")] nuint* ret) + public static bool 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) { @@ -618,7 +622,7 @@ namespace SDL return true; } - public static SDL_bool SDL_size_add_check_overflow([NativeTypeName("size_t")] nuint a, [NativeTypeName("size_t")] nuint b, [NativeTypeName("size_t *")] nuint* ret) + public static bool SDL_size_add_check_overflow([NativeTypeName("size_t")] nuint a, [NativeTypeName("size_t")] nuint b, [NativeTypeName("size_t *")] nuint* ret) { if (b > 0xffffffffffffffffUL - a) { @@ -632,12 +636,6 @@ namespace SDL [NativeTypeName("#define SDL_SIZE_MAX SIZE_MAX")] public const ulong SDL_SIZE_MAX = 0xffffffffffffffffUL; - [NativeTypeName("#define SDL_FALSE false")] - public const bool SDL_FALSE = false; - - [NativeTypeName("#define SDL_TRUE true")] - public const bool SDL_TRUE = true; - [NativeTypeName("#define SDL_MAX_SINT8 ((Sint8)0x7F)")] public const sbyte SDL_MAX_SINT8 = ((sbyte)(0x7F)); @@ -719,6 +717,21 @@ namespace SDL [NativeTypeName("#define SDL_PRIX32 \"X\"")] public static ReadOnlySpan SDL_PRIX32 => "X"u8; + [NativeTypeName("#define SDL_PRILL_PREFIX \"ll\"")] + public static ReadOnlySpan SDL_PRILL_PREFIX => "ll"u8; + + [NativeTypeName("#define SDL_PRILLd SDL_PRILL_PREFIX \"d\"")] + public static ReadOnlySpan SDL_PRILLd => "lld"u8; + + [NativeTypeName("#define SDL_PRILLu SDL_PRILL_PREFIX \"u\"")] + public static ReadOnlySpan SDL_PRILLu => "llu"u8; + + [NativeTypeName("#define SDL_PRILLx SDL_PRILL_PREFIX \"x\"")] + public static ReadOnlySpan SDL_PRILLx => "llx"u8; + + [NativeTypeName("#define SDL_PRILLX SDL_PRILL_PREFIX \"X\"")] + public static ReadOnlySpan SDL_PRILLX => "llX"u8; + [NativeTypeName("#define SDL_INVALID_UNICODE_CODEPOINT 0xFFFD")] public const int SDL_INVALID_UNICODE_CODEPOINT = 0xFFFD; diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_storage.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_storage.g.cs index 773b785..725e7fa 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_storage.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_storage.g.cs @@ -33,35 +33,35 @@ namespace SDL [NativeTypeName("Uint32")] public uint version; - [NativeTypeName("SDL_bool (*)(void *)")] - public delegate* unmanaged[Cdecl] close; + [NativeTypeName("bool (*)(void *)")] + public delegate* unmanaged[Cdecl] close; - [NativeTypeName("SDL_bool (*)(void *)")] - public delegate* unmanaged[Cdecl] ready; + [NativeTypeName("bool (*)(void *)")] + public delegate* unmanaged[Cdecl] ready; - [NativeTypeName("SDL_bool (*)(void *, const char *, SDL_EnumerateDirectoryCallback, void *)")] - public delegate* unmanaged[Cdecl], IntPtr, SDL_bool> enumerate; + [NativeTypeName("bool (*)(void *, const char *, SDL_EnumerateDirectoryCallback, void *)")] + public delegate* unmanaged[Cdecl], IntPtr, byte> enumerate; - [NativeTypeName("SDL_bool (*)(void *, const char *, SDL_PathInfo *)")] - public delegate* unmanaged[Cdecl] info; + [NativeTypeName("bool (*)(void *, const char *, SDL_PathInfo *)")] + public delegate* unmanaged[Cdecl] info; - [NativeTypeName("SDL_bool (*)(void *, const char *, void *, Uint64)")] - public delegate* unmanaged[Cdecl] read_file; + [NativeTypeName("bool (*)(void *, const char *, void *, Uint64)")] + public delegate* unmanaged[Cdecl] read_file; - [NativeTypeName("SDL_bool (*)(void *, const char *, const void *, Uint64)")] - public delegate* unmanaged[Cdecl] write_file; + [NativeTypeName("bool (*)(void *, const char *, const void *, Uint64)")] + public delegate* unmanaged[Cdecl] write_file; - [NativeTypeName("SDL_bool (*)(void *, const char *)")] - public delegate* unmanaged[Cdecl] mkdir; + [NativeTypeName("bool (*)(void *, const char *)")] + public delegate* unmanaged[Cdecl] mkdir; - [NativeTypeName("SDL_bool (*)(void *, const char *)")] - public delegate* unmanaged[Cdecl] remove; + [NativeTypeName("bool (*)(void *, const char *)")] + public delegate* unmanaged[Cdecl] remove; - [NativeTypeName("SDL_bool (*)(void *, const char *, const char *)")] - public delegate* unmanaged[Cdecl] rename; + [NativeTypeName("bool (*)(void *, const char *, const char *)")] + public delegate* unmanaged[Cdecl] rename; - [NativeTypeName("SDL_bool (*)(void *, const char *, const char *)")] - public delegate* unmanaged[Cdecl] copy; + [NativeTypeName("bool (*)(void *, const char *, const char *)")] + public delegate* unmanaged[Cdecl] copy; [NativeTypeName("Uint64 (*)(void *)")] public delegate* unmanaged[Cdecl] space_remaining; @@ -86,37 +86,48 @@ namespace SDL public static extern SDL_Storage* SDL_OpenStorage([NativeTypeName("const SDL_StorageInterface *")] SDL_StorageInterface* iface, [NativeTypeName("void*")] IntPtr userdata); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_CloseStorage(SDL_Storage* storage); + [return: NativeTypeName("bool")] + public static extern byte SDL_CloseStorage(SDL_Storage* storage); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_StorageReady(SDL_Storage* storage); + [return: NativeTypeName("bool")] + public static extern byte SDL_StorageReady(SDL_Storage* storage); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_GetStorageFileSize(SDL_Storage* storage, [NativeTypeName("const char *")] byte* path, [NativeTypeName("Uint64 *")] ulong* length); + [return: NativeTypeName("bool")] + public static extern byte SDL_GetStorageFileSize(SDL_Storage* storage, [NativeTypeName("const char *")] byte* path, [NativeTypeName("Uint64 *")] ulong* length); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_ReadStorageFile(SDL_Storage* storage, [NativeTypeName("const char *")] byte* path, [NativeTypeName("void*")] IntPtr destination, [NativeTypeName("Uint64")] ulong length); + [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); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_WriteStorageFile(SDL_Storage* storage, [NativeTypeName("const char *")] byte* path, [NativeTypeName("const void *")] IntPtr source, [NativeTypeName("Uint64")] ulong length); + [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); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_CreateStorageDirectory(SDL_Storage* storage, [NativeTypeName("const char *")] byte* path); + [return: NativeTypeName("bool")] + public static extern byte SDL_CreateStorageDirectory(SDL_Storage* storage, [NativeTypeName("const char *")] byte* path); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_EnumerateStorageDirectory(SDL_Storage* storage, [NativeTypeName("const char *")] byte* path, [NativeTypeName("SDL_EnumerateDirectoryCallback")] delegate* unmanaged[Cdecl] callback, [NativeTypeName("void*")] IntPtr userdata); + [return: NativeTypeName("bool")] + public static extern byte SDL_EnumerateStorageDirectory(SDL_Storage* storage, [NativeTypeName("const char *")] byte* path, [NativeTypeName("SDL_EnumerateDirectoryCallback")] delegate* unmanaged[Cdecl] callback, [NativeTypeName("void*")] IntPtr userdata); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_RemoveStoragePath(SDL_Storage* storage, [NativeTypeName("const char *")] byte* path); + [return: NativeTypeName("bool")] + public static extern byte SDL_RemoveStoragePath(SDL_Storage* storage, [NativeTypeName("const char *")] byte* path); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_RenameStoragePath(SDL_Storage* storage, [NativeTypeName("const char *")] byte* oldpath, [NativeTypeName("const char *")] byte* newpath); + [return: NativeTypeName("bool")] + public static extern byte SDL_RenameStoragePath(SDL_Storage* storage, [NativeTypeName("const char *")] byte* oldpath, [NativeTypeName("const char *")] byte* newpath); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_CopyStorageFile(SDL_Storage* storage, [NativeTypeName("const char *")] byte* oldpath, [NativeTypeName("const char *")] byte* newpath); + [return: NativeTypeName("bool")] + public static extern byte SDL_CopyStorageFile(SDL_Storage* storage, [NativeTypeName("const char *")] byte* oldpath, [NativeTypeName("const char *")] byte* newpath); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_GetStoragePathInfo(SDL_Storage* storage, [NativeTypeName("const char *")] byte* path, SDL_PathInfo* info); + [return: NativeTypeName("bool")] + public static extern byte SDL_GetStoragePathInfo(SDL_Storage* storage, [NativeTypeName("const char *")] byte* path, SDL_PathInfo* info); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("Uint64")] diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_surface.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_surface.g.cs index 0cc3683..cb432d0 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_surface.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_surface.g.cs @@ -80,7 +80,8 @@ namespace SDL public static extern SDL_PropertiesID SDL_GetSurfaceProperties(SDL_Surface* surface); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_SetSurfaceColorspace(SDL_Surface* surface, SDL_Colorspace colorspace); + [return: NativeTypeName("bool")] + public static extern byte 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); @@ -89,16 +90,19 @@ namespace SDL public static extern SDL_Palette* SDL_CreateSurfacePalette(SDL_Surface* surface); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_SetSurfacePalette(SDL_Surface* surface, SDL_Palette* palette); + [return: NativeTypeName("bool")] + public static extern byte 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)] - public static extern SDL_bool SDL_AddSurfaceAlternateImage(SDL_Surface* surface, SDL_Surface* image); + [return: NativeTypeName("bool")] + public static extern byte SDL_AddSurfaceAlternateImage(SDL_Surface* surface, SDL_Surface* image); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_SurfaceHasAlternateImages(SDL_Surface* surface); + [return: NativeTypeName("bool")] + public static extern byte SDL_SurfaceHasAlternateImages(SDL_Surface* surface); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_Surface** SDL_GetSurfaceImages(SDL_Surface* surface, int* count); @@ -107,64 +111,81 @@ namespace SDL public static extern void SDL_RemoveSurfaceAlternateImages(SDL_Surface* surface); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_LockSurface(SDL_Surface* surface); + [return: NativeTypeName("bool")] + public static extern byte 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, SDL_bool closeio); + public static extern SDL_Surface* SDL_LoadBMP_IO(SDL_IOStream* src, [NativeTypeName("bool")] byte 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)] - public static extern SDL_bool SDL_SaveBMP_IO(SDL_Surface* surface, SDL_IOStream* dst, SDL_bool closeio); + [return: NativeTypeName("bool")] + public static extern byte SDL_SaveBMP_IO(SDL_Surface* surface, SDL_IOStream* dst, [NativeTypeName("bool")] byte closeio); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_SaveBMP(SDL_Surface* surface, [NativeTypeName("const char *")] byte* file); + [return: NativeTypeName("bool")] + public static extern byte SDL_SaveBMP(SDL_Surface* surface, [NativeTypeName("const char *")] byte* file); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_SetSurfaceRLE(SDL_Surface* surface, SDL_bool enabled); + [return: NativeTypeName("bool")] + public static extern byte SDL_SetSurfaceRLE(SDL_Surface* surface, [NativeTypeName("bool")] byte enabled); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_SurfaceHasRLE(SDL_Surface* surface); + [return: NativeTypeName("bool")] + public static extern byte SDL_SurfaceHasRLE(SDL_Surface* surface); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_SetSurfaceColorKey(SDL_Surface* surface, SDL_bool enabled, [NativeTypeName("Uint32")] uint key); + [return: NativeTypeName("bool")] + public static extern byte SDL_SetSurfaceColorKey(SDL_Surface* surface, [NativeTypeName("bool")] byte enabled, [NativeTypeName("Uint32")] uint key); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_SurfaceHasColorKey(SDL_Surface* surface); + [return: NativeTypeName("bool")] + public static extern byte SDL_SurfaceHasColorKey(SDL_Surface* surface); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_GetSurfaceColorKey(SDL_Surface* surface, [NativeTypeName("Uint32 *")] uint* key); + [return: NativeTypeName("bool")] + public static extern byte SDL_GetSurfaceColorKey(SDL_Surface* surface, [NativeTypeName("Uint32 *")] uint* key); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_SetSurfaceColorMod(SDL_Surface* surface, [NativeTypeName("Uint8")] byte r, [NativeTypeName("Uint8")] byte g, [NativeTypeName("Uint8")] byte b); + [return: NativeTypeName("bool")] + public static extern byte SDL_SetSurfaceColorMod(SDL_Surface* surface, [NativeTypeName("Uint8")] byte r, [NativeTypeName("Uint8")] byte g, [NativeTypeName("Uint8")] byte b); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_GetSurfaceColorMod(SDL_Surface* surface, [NativeTypeName("Uint8 *")] byte* r, [NativeTypeName("Uint8 *")] byte* g, [NativeTypeName("Uint8 *")] byte* b); + [return: NativeTypeName("bool")] + public static extern byte SDL_GetSurfaceColorMod(SDL_Surface* surface, [NativeTypeName("Uint8 *")] byte* r, [NativeTypeName("Uint8 *")] byte* g, [NativeTypeName("Uint8 *")] byte* b); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_SetSurfaceAlphaMod(SDL_Surface* surface, [NativeTypeName("Uint8")] byte alpha); + [return: NativeTypeName("bool")] + public static extern byte SDL_SetSurfaceAlphaMod(SDL_Surface* surface, [NativeTypeName("Uint8")] byte alpha); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_GetSurfaceAlphaMod(SDL_Surface* surface, [NativeTypeName("Uint8 *")] byte* alpha); + [return: NativeTypeName("bool")] + public static extern byte SDL_GetSurfaceAlphaMod(SDL_Surface* surface, [NativeTypeName("Uint8 *")] byte* alpha); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_SetSurfaceBlendMode(SDL_Surface* surface, SDL_BlendMode blendMode); + [return: NativeTypeName("bool")] + public static extern byte SDL_SetSurfaceBlendMode(SDL_Surface* surface, SDL_BlendMode blendMode); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_GetSurfaceBlendMode(SDL_Surface* surface, SDL_BlendMode* blendMode); + [return: NativeTypeName("bool")] + public static extern byte SDL_GetSurfaceBlendMode(SDL_Surface* surface, SDL_BlendMode* blendMode); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_SetSurfaceClipRect(SDL_Surface* surface, [NativeTypeName("const SDL_Rect *")] SDL_Rect* rect); + [return: NativeTypeName("bool")] + public static extern byte SDL_SetSurfaceClipRect(SDL_Surface* surface, [NativeTypeName("const SDL_Rect *")] SDL_Rect* rect); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_GetSurfaceClipRect(SDL_Surface* surface, SDL_Rect* rect); + [return: NativeTypeName("bool")] + public static extern byte SDL_GetSurfaceClipRect(SDL_Surface* surface, SDL_Rect* rect); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_FlipSurface(SDL_Surface* surface, SDL_FlipMode flip); + [return: NativeTypeName("bool")] + public static extern byte 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); @@ -179,46 +200,60 @@ namespace SDL public static extern SDL_Surface* SDL_ConvertSurfaceAndColorspace(SDL_Surface* surface, SDL_PixelFormat format, SDL_Palette* palette, SDL_Colorspace colorspace, SDL_PropertiesID props); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool 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); + [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); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool 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); + [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); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool 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, SDL_bool linear); + [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); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_PremultiplySurfaceAlpha(SDL_Surface* surface, SDL_bool linear); + [return: NativeTypeName("bool")] + public static extern byte SDL_PremultiplySurfaceAlpha(SDL_Surface* surface, [NativeTypeName("bool")] byte linear); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_ClearSurface(SDL_Surface* surface, float r, float g, float b, float a); + [return: NativeTypeName("bool")] + public static extern byte SDL_ClearSurface(SDL_Surface* surface, float r, float g, float b, float a); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_FillSurfaceRect(SDL_Surface* dst, [NativeTypeName("const SDL_Rect *")] SDL_Rect* rect, [NativeTypeName("Uint32")] uint color); + [return: NativeTypeName("bool")] + public static extern byte SDL_FillSurfaceRect(SDL_Surface* dst, [NativeTypeName("const SDL_Rect *")] SDL_Rect* rect, [NativeTypeName("Uint32")] uint color); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_FillSurfaceRects(SDL_Surface* dst, [NativeTypeName("const SDL_Rect *")] SDL_Rect* rects, int count, [NativeTypeName("Uint32")] uint color); + [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); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_BlitSurface(SDL_Surface* src, [NativeTypeName("const SDL_Rect *")] SDL_Rect* srcrect, SDL_Surface* dst, [NativeTypeName("const SDL_Rect *")] SDL_Rect* dstrect); + [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); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_BlitSurfaceUnchecked(SDL_Surface* src, [NativeTypeName("const SDL_Rect *")] SDL_Rect* srcrect, SDL_Surface* dst, [NativeTypeName("const SDL_Rect *")] SDL_Rect* dstrect); + [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); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool 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); + [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); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool 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); + [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); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_BlitSurfaceTiled(SDL_Surface* src, [NativeTypeName("const SDL_Rect *")] SDL_Rect* srcrect, SDL_Surface* dst, [NativeTypeName("const SDL_Rect *")] SDL_Rect* dstrect); + [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); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool 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); + [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); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool 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); + [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); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("Uint32")] @@ -229,16 +264,20 @@ namespace SDL public static extern uint SDL_MapSurfaceRGBA(SDL_Surface* surface, [NativeTypeName("Uint8")] byte r, [NativeTypeName("Uint8")] byte g, [NativeTypeName("Uint8")] byte b, [NativeTypeName("Uint8")] byte a); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool 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); + [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); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_ReadSurfacePixelFloat(SDL_Surface* surface, int x, int y, float* r, float* g, float* b, float* a); + [return: NativeTypeName("bool")] + public static extern byte SDL_ReadSurfacePixelFloat(SDL_Surface* surface, int x, int y, float* r, float* g, float* b, float* a); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool 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); + [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); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_WriteSurfacePixelFloat(SDL_Surface* surface, int x, int y, float r, float g, float b, float a); + [return: NativeTypeName("bool")] + public static extern byte SDL_WriteSurfacePixelFloat(SDL_Surface* surface, int x, int y, float r, float g, float b, float a); [NativeTypeName("#define SDL_SURFACE_PREALLOCATED 0x00000001u")] public const uint SDL_SURFACE_PREALLOCATED = 0x00000001U; diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_system.Android.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_system.Android.g.cs index d0d4209..53e7d9b 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_system.Android.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_system.Android.g.cs @@ -46,16 +46,19 @@ namespace SDL public static extern int SDL_GetAndroidSDKVersion(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + [return: NativeTypeName("bool")] [SupportedOSPlatform("Android")] - public static extern SDL_bool SDL_IsAndroidTV(); + public static extern byte SDL_IsAndroidTV(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + [return: NativeTypeName("bool")] [SupportedOSPlatform("Android")] - public static extern SDL_bool SDL_IsChromebook(); + public static extern byte SDL_IsChromebook(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + [return: NativeTypeName("bool")] [SupportedOSPlatform("Android")] - public static extern SDL_bool SDL_IsDeXMode(); + public static extern byte SDL_IsDeXMode(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [SupportedOSPlatform("Android")] @@ -82,16 +85,19 @@ namespace SDL public static extern byte* Unsafe_SDL_GetAndroidCachePath(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + [return: NativeTypeName("bool")] [SupportedOSPlatform("Android")] - public static extern SDL_bool SDL_RequestAndroidPermission([NativeTypeName("const char *")] byte* permission, [NativeTypeName("SDL_RequestAndroidPermissionCallback")] delegate* unmanaged[Cdecl] cb, [NativeTypeName("void*")] IntPtr userdata); + public static extern byte SDL_RequestAndroidPermission([NativeTypeName("const char *")] byte* permission, [NativeTypeName("SDL_RequestAndroidPermissionCallback")] delegate* unmanaged[Cdecl] cb, [NativeTypeName("void*")] IntPtr userdata); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + [return: NativeTypeName("bool")] [SupportedOSPlatform("Android")] - public static extern SDL_bool SDL_ShowAndroidToast([NativeTypeName("const char *")] byte* message, int duration, int gravity, int xoffset, int yoffset); + public static extern byte 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 SDL_bool SDL_SendAndroidMessage([NativeTypeName("Uint32")] uint command, int param1); + public static extern byte SDL_SendAndroidMessage([NativeTypeName("Uint32")] uint command, int param1); [NativeTypeName("#define SDL_ANDROID_EXTERNAL_STORAGE_READ 0x01")] public const int SDL_ANDROID_EXTERNAL_STORAGE_READ = 0x01; diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_system.GDK.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_system.GDK.g.cs index 3e102be..d77ff5c 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_system.GDK.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_system.GDK.g.cs @@ -39,11 +39,13 @@ namespace SDL public static unsafe partial class SDL3 { [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + [return: NativeTypeName("bool")] [SupportedOSPlatform("Windows")] - public static extern SDL_bool SDL_GetGDKTaskQueue([NativeTypeName("XTaskQueueHandle *")] XTaskQueueObject** outTaskQueue); + public static extern byte SDL_GetGDKTaskQueue([NativeTypeName("XTaskQueueHandle *")] XTaskQueueObject** outTaskQueue); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + [return: NativeTypeName("bool")] [SupportedOSPlatform("Windows")] - public static extern SDL_bool SDL_GetGDKDefaultUser([NativeTypeName("XUserHandle *")] XUser** outUserHandle); + public static extern byte SDL_GetGDKDefaultUser([NativeTypeName("XUserHandle *")] XUser** outUserHandle); } } diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_system.Linux.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_system.Linux.g.cs index d8922a5..1e4425c 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_system.Linux.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_system.Linux.g.cs @@ -31,11 +31,13 @@ namespace SDL public static partial class SDL3 { [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + [return: NativeTypeName("bool")] [SupportedOSPlatform("Linux")] - public static extern SDL_bool SDL_SetLinuxThreadPriority([NativeTypeName("Sint64")] long threadID, int priority); + public static extern byte SDL_SetLinuxThreadPriority([NativeTypeName("Sint64")] long threadID, int priority); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + [return: NativeTypeName("bool")] [SupportedOSPlatform("Linux")] - public static extern SDL_bool SDL_SetLinuxThreadPriorityAndPolicy([NativeTypeName("Sint64")] long threadID, int sdlPriority, int schedPolicy); + public static extern byte SDL_SetLinuxThreadPriorityAndPolicy([NativeTypeName("Sint64")] long threadID, int sdlPriority, int schedPolicy); } } diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_system.Windows.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_system.Windows.g.cs index ff22710..024e0eb 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_system.Windows.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_system.Windows.g.cs @@ -33,14 +33,15 @@ namespace SDL { [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [SupportedOSPlatform("Windows")] - public static extern void SDL_SetWindowsMessageHook([NativeTypeName("SDL_WindowsMessageHook")] delegate* unmanaged[Cdecl] callback, [NativeTypeName("void*")] IntPtr userdata); + public static extern void SDL_SetWindowsMessageHook([NativeTypeName("SDL_WindowsMessageHook")] delegate* unmanaged[Cdecl] callback, [NativeTypeName("void*")] IntPtr userdata); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [SupportedOSPlatform("Windows")] public static extern int SDL_GetDirect3D9AdapterIndex(SDL_DisplayID displayID); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + [return: NativeTypeName("bool")] [SupportedOSPlatform("Windows")] - public static extern SDL_bool SDL_GetDXGIOutputInfo(SDL_DisplayID displayID, int* adapterIndex, int* outputIndex); + public static extern byte SDL_GetDXGIOutputInfo(SDL_DisplayID displayID, int* adapterIndex, int* outputIndex); } } diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_system.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_system.g.cs index 92e2f2d..239a52f 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_system.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_system.g.cs @@ -31,10 +31,11 @@ namespace SDL public static unsafe partial class SDL3 { [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void SDL_SetX11EventHook([NativeTypeName("SDL_X11EventHook")] delegate* unmanaged[Cdecl] callback, [NativeTypeName("void*")] IntPtr userdata); + public static extern void SDL_SetX11EventHook([NativeTypeName("SDL_X11EventHook")] delegate* unmanaged[Cdecl] callback, [NativeTypeName("void*")] IntPtr userdata); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_IsTablet(); + [return: NativeTypeName("bool")] + public static extern byte SDL_IsTablet(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_OnApplicationWillTerminate(); diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_system.iOS.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_system.iOS.g.cs index 21ae4e8..2202598 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_system.iOS.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_system.iOS.g.cs @@ -32,12 +32,13 @@ namespace SDL public static unsafe partial class SDL3 { [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + [return: NativeTypeName("bool")] [SupportedOSPlatform("iOS")] - public static extern SDL_bool SDL_SetiOSAnimationCallback(SDL_Window* window, int interval, [NativeTypeName("SDL_iOSAnimationCallback")] delegate* unmanaged[Cdecl] callback, [NativeTypeName("void*")] IntPtr callbackParam); + public static extern byte SDL_SetiOSAnimationCallback(SDL_Window* window, int interval, [NativeTypeName("SDL_iOSAnimationCallback")] delegate* unmanaged[Cdecl] callback, [NativeTypeName("void*")] IntPtr callbackParam); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [SupportedOSPlatform("iOS")] - public static extern void SDL_SetiOSEventPump(SDL_bool enabled); + public static extern void SDL_SetiOSEventPump([NativeTypeName("bool")] byte enabled); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [SupportedOSPlatform("iOS")] diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_thread.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_thread.g.cs index 9c8e3ee..c18a8bb 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_thread.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_thread.g.cs @@ -59,7 +59,8 @@ namespace SDL public static extern SDL_ThreadID SDL_GetThreadID(SDL_Thread* thread); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_SetThreadPriority(SDL_ThreadPriority priority); + [return: NativeTypeName("bool")] + public static extern byte SDL_SetThreadPriority(SDL_ThreadPriority priority); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_WaitThread(SDL_Thread* thread, int* status); @@ -72,7 +73,8 @@ namespace SDL public static extern IntPtr SDL_GetTLS(SDL_TLSID* id); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_SetTLS(SDL_TLSID* id, [NativeTypeName("const void *")] IntPtr value, [NativeTypeName("SDL_TLSDestructorCallback")] delegate* unmanaged[Cdecl] destructor); + [return: NativeTypeName("bool")] + public static extern byte SDL_SetTLS(SDL_TLSID* id, [NativeTypeName("const void *")] IntPtr value, [NativeTypeName("SDL_TLSDestructorCallback")] delegate* unmanaged[Cdecl] destructor); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_CleanupTLS(); diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_time.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_time.g.cs index 5775450..9ebc25b 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_time.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_time.g.cs @@ -64,16 +64,20 @@ namespace SDL public static unsafe partial class SDL3 { [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_GetDateTimeLocalePreferences(SDL_DateFormat* dateFormat, SDL_TimeFormat* timeFormat); + [return: NativeTypeName("bool")] + public static extern byte SDL_GetDateTimeLocalePreferences(SDL_DateFormat* dateFormat, SDL_TimeFormat* timeFormat); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_GetCurrentTime(SDL_Time* ticks); + [return: NativeTypeName("bool")] + public static extern byte SDL_GetCurrentTime(SDL_Time* ticks); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_TimeToDateTime(SDL_Time ticks, SDL_DateTime* dt, SDL_bool localTime); + [return: NativeTypeName("bool")] + public static extern byte SDL_TimeToDateTime(SDL_Time ticks, SDL_DateTime* dt, [NativeTypeName("bool")] byte localTime); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_DateTimeToTime([NativeTypeName("const SDL_DateTime *")] SDL_DateTime* dt, SDL_Time* ticks); + [return: NativeTypeName("bool")] + public static extern byte SDL_DateTimeToTime([NativeTypeName("const SDL_DateTime *")] SDL_DateTime* dt, SDL_Time* ticks); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_TimeToWindows(SDL_Time ticks, [NativeTypeName("Uint32 *")] uint* dwLowDateTime, [NativeTypeName("Uint32 *")] uint* dwHighDateTime); diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_timer.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_timer.g.cs index 496f5c9..668038e 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_timer.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_timer.g.cs @@ -59,7 +59,8 @@ namespace SDL public static extern SDL_TimerID SDL_AddTimerNS([NativeTypeName("Uint64")] ulong interval, [NativeTypeName("SDL_NSTimerCallback")] delegate* unmanaged[Cdecl] callback, [NativeTypeName("void*")] IntPtr userdata); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_RemoveTimer(SDL_TimerID id); + [return: NativeTypeName("bool")] + public static extern byte SDL_RemoveTimer(SDL_TimerID id); [NativeTypeName("#define SDL_MS_PER_SECOND 1000")] public const int SDL_MS_PER_SECOND = 1000; diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_video.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_video.g.cs index abccae5..b682fb2 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_video.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_video.g.cs @@ -187,10 +187,12 @@ namespace SDL public static extern byte* Unsafe_SDL_GetDisplayName(SDL_DisplayID displayID); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_GetDisplayBounds(SDL_DisplayID displayID, SDL_Rect* rect); + [return: NativeTypeName("bool")] + public static extern byte SDL_GetDisplayBounds(SDL_DisplayID displayID, SDL_Rect* rect); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_GetDisplayUsableBounds(SDL_DisplayID displayID, SDL_Rect* rect); + [return: NativeTypeName("bool")] + public static extern byte 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); @@ -205,7 +207,8 @@ namespace SDL public static extern SDL_DisplayMode** SDL_GetFullscreenDisplayModes(SDL_DisplayID displayID, int* count); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_GetClosestFullscreenDisplayMode(SDL_DisplayID displayID, int w, int h, float refresh_rate, SDL_bool include_high_density_modes, SDL_DisplayMode* mode); + [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); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("const SDL_DisplayMode *")] @@ -231,7 +234,8 @@ namespace SDL public static extern float SDL_GetWindowDisplayScale(SDL_Window* window); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_SetWindowFullscreenMode(SDL_Window* window, [NativeTypeName("const SDL_DisplayMode *")] SDL_DisplayMode* mode); + [return: NativeTypeName("bool")] + public static extern byte SDL_SetWindowFullscreenMode(SDL_Window* window, [NativeTypeName("const SDL_DisplayMode *")] SDL_DisplayMode* mode); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("const SDL_DisplayMode *")] @@ -272,171 +276,220 @@ namespace SDL public static extern SDL_WindowFlags SDL_GetWindowFlags(SDL_Window* window); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_SetWindowTitle(SDL_Window* window, [NativeTypeName("const char *")] byte* title); + [return: NativeTypeName("bool")] + public static extern byte SDL_SetWindowTitle(SDL_Window* window, [NativeTypeName("const char *")] byte* title); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetWindowTitle", ExactSpelling = true)] [return: NativeTypeName("const char *")] public static extern byte* Unsafe_SDL_GetWindowTitle(SDL_Window* window); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_SetWindowIcon(SDL_Window* window, SDL_Surface* icon); + [return: NativeTypeName("bool")] + public static extern byte SDL_SetWindowIcon(SDL_Window* window, SDL_Surface* icon); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_SetWindowPosition(SDL_Window* window, int x, int y); + [return: NativeTypeName("bool")] + public static extern byte SDL_SetWindowPosition(SDL_Window* window, int x, int y); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_GetWindowPosition(SDL_Window* window, int* x, int* y); + [return: NativeTypeName("bool")] + public static extern byte SDL_GetWindowPosition(SDL_Window* window, int* x, int* y); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_SetWindowSize(SDL_Window* window, int w, int h); + [return: NativeTypeName("bool")] + public static extern byte SDL_SetWindowSize(SDL_Window* window, int w, int h); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_GetWindowSize(SDL_Window* window, int* w, int* h); + [return: NativeTypeName("bool")] + public static extern byte SDL_GetWindowSize(SDL_Window* window, int* w, int* h); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_GetWindowSafeArea(SDL_Window* window, SDL_Rect* rect); + [return: NativeTypeName("bool")] + public static extern byte SDL_GetWindowSafeArea(SDL_Window* window, SDL_Rect* rect); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_SetWindowAspectRatio(SDL_Window* window, float min_aspect, float max_aspect); + [return: NativeTypeName("bool")] + public static extern byte SDL_SetWindowAspectRatio(SDL_Window* window, float min_aspect, float max_aspect); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_GetWindowAspectRatio(SDL_Window* window, float* min_aspect, float* max_aspect); + [return: NativeTypeName("bool")] + public static extern byte SDL_GetWindowAspectRatio(SDL_Window* window, float* min_aspect, float* max_aspect); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_GetWindowBordersSize(SDL_Window* window, int* top, int* left, int* bottom, int* right); + [return: NativeTypeName("bool")] + public static extern byte SDL_GetWindowBordersSize(SDL_Window* window, int* top, int* left, int* bottom, int* right); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_GetWindowSizeInPixels(SDL_Window* window, int* w, int* h); + [return: NativeTypeName("bool")] + public static extern byte SDL_GetWindowSizeInPixels(SDL_Window* window, int* w, int* h); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_SetWindowMinimumSize(SDL_Window* window, int min_w, int min_h); + [return: NativeTypeName("bool")] + public static extern byte SDL_SetWindowMinimumSize(SDL_Window* window, int min_w, int min_h); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_GetWindowMinimumSize(SDL_Window* window, int* w, int* h); + [return: NativeTypeName("bool")] + public static extern byte SDL_GetWindowMinimumSize(SDL_Window* window, int* w, int* h); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_SetWindowMaximumSize(SDL_Window* window, int max_w, int max_h); + [return: NativeTypeName("bool")] + public static extern byte SDL_SetWindowMaximumSize(SDL_Window* window, int max_w, int max_h); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_GetWindowMaximumSize(SDL_Window* window, int* w, int* h); + [return: NativeTypeName("bool")] + public static extern byte SDL_GetWindowMaximumSize(SDL_Window* window, int* w, int* h); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_SetWindowBordered(SDL_Window* window, SDL_bool bordered); + [return: NativeTypeName("bool")] + public static extern byte SDL_SetWindowBordered(SDL_Window* window, [NativeTypeName("bool")] byte bordered); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_SetWindowResizable(SDL_Window* window, SDL_bool resizable); + [return: NativeTypeName("bool")] + public static extern byte SDL_SetWindowResizable(SDL_Window* window, [NativeTypeName("bool")] byte resizable); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_SetWindowAlwaysOnTop(SDL_Window* window, SDL_bool on_top); + [return: NativeTypeName("bool")] + public static extern byte SDL_SetWindowAlwaysOnTop(SDL_Window* window, [NativeTypeName("bool")] byte on_top); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_ShowWindow(SDL_Window* window); + [return: NativeTypeName("bool")] + public static extern byte SDL_ShowWindow(SDL_Window* window); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_HideWindow(SDL_Window* window); + [return: NativeTypeName("bool")] + public static extern byte SDL_HideWindow(SDL_Window* window); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_RaiseWindow(SDL_Window* window); + [return: NativeTypeName("bool")] + public static extern byte SDL_RaiseWindow(SDL_Window* window); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_MaximizeWindow(SDL_Window* window); + [return: NativeTypeName("bool")] + public static extern byte SDL_MaximizeWindow(SDL_Window* window); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_MinimizeWindow(SDL_Window* window); + [return: NativeTypeName("bool")] + public static extern byte SDL_MinimizeWindow(SDL_Window* window); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_RestoreWindow(SDL_Window* window); + [return: NativeTypeName("bool")] + public static extern byte SDL_RestoreWindow(SDL_Window* window); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_SetWindowFullscreen(SDL_Window* window, SDL_bool fullscreen); + [return: NativeTypeName("bool")] + public static extern byte SDL_SetWindowFullscreen(SDL_Window* window, [NativeTypeName("bool")] byte fullscreen); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_SyncWindow(SDL_Window* window); + [return: NativeTypeName("bool")] + public static extern byte SDL_SyncWindow(SDL_Window* window); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_WindowHasSurface(SDL_Window* window); + [return: NativeTypeName("bool")] + public static extern byte 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)] - public static extern SDL_bool SDL_SetWindowSurfaceVSync(SDL_Window* window, int vsync); + [return: NativeTypeName("bool")] + public static extern byte SDL_SetWindowSurfaceVSync(SDL_Window* window, int vsync); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_GetWindowSurfaceVSync(SDL_Window* window, int* vsync); + [return: NativeTypeName("bool")] + public static extern byte SDL_GetWindowSurfaceVSync(SDL_Window* window, int* vsync); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_UpdateWindowSurface(SDL_Window* window); + [return: NativeTypeName("bool")] + public static extern byte SDL_UpdateWindowSurface(SDL_Window* window); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_UpdateWindowSurfaceRects(SDL_Window* window, [NativeTypeName("const SDL_Rect *")] SDL_Rect* rects, int numrects); + [return: NativeTypeName("bool")] + public static extern byte SDL_UpdateWindowSurfaceRects(SDL_Window* window, [NativeTypeName("const SDL_Rect *")] SDL_Rect* rects, int numrects); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_DestroyWindowSurface(SDL_Window* window); + [return: NativeTypeName("bool")] + public static extern byte SDL_DestroyWindowSurface(SDL_Window* window); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_SetWindowKeyboardGrab(SDL_Window* window, SDL_bool grabbed); + [return: NativeTypeName("bool")] + public static extern byte SDL_SetWindowKeyboardGrab(SDL_Window* window, [NativeTypeName("bool")] byte grabbed); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_SetWindowMouseGrab(SDL_Window* window, SDL_bool grabbed); + [return: NativeTypeName("bool")] + public static extern byte SDL_SetWindowMouseGrab(SDL_Window* window, [NativeTypeName("bool")] byte grabbed); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_GetWindowKeyboardGrab(SDL_Window* window); + [return: NativeTypeName("bool")] + public static extern byte SDL_GetWindowKeyboardGrab(SDL_Window* window); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_GetWindowMouseGrab(SDL_Window* window); + [return: NativeTypeName("bool")] + public static extern byte 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)] - public static extern SDL_bool SDL_SetWindowMouseRect(SDL_Window* window, [NativeTypeName("const SDL_Rect *")] SDL_Rect* rect); + [return: NativeTypeName("bool")] + public static extern byte SDL_SetWindowMouseRect(SDL_Window* window, [NativeTypeName("const SDL_Rect *")] SDL_Rect* rect); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("const SDL_Rect *")] public static extern SDL_Rect* SDL_GetWindowMouseRect(SDL_Window* window); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_SetWindowOpacity(SDL_Window* window, float opacity); + [return: NativeTypeName("bool")] + public static extern byte 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)] - public static extern SDL_bool SDL_SetWindowParent(SDL_Window* window, SDL_Window* parent); + [return: NativeTypeName("bool")] + public static extern byte SDL_SetWindowParent(SDL_Window* window, SDL_Window* parent); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_SetWindowModal(SDL_Window* window, SDL_bool modal); + [return: NativeTypeName("bool")] + public static extern byte SDL_SetWindowModal(SDL_Window* window, [NativeTypeName("bool")] byte modal); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_SetWindowFocusable(SDL_Window* window, SDL_bool focusable); + [return: NativeTypeName("bool")] + public static extern byte SDL_SetWindowFocusable(SDL_Window* window, [NativeTypeName("bool")] byte focusable); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_ShowWindowSystemMenu(SDL_Window* window, int x, int y); + [return: NativeTypeName("bool")] + public static extern byte SDL_ShowWindowSystemMenu(SDL_Window* window, int x, int y); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_SetWindowHitTest(SDL_Window* window, [NativeTypeName("SDL_HitTest")] delegate* unmanaged[Cdecl] callback, [NativeTypeName("void*")] IntPtr callback_data); + [return: NativeTypeName("bool")] + public static extern byte SDL_SetWindowHitTest(SDL_Window* window, [NativeTypeName("SDL_HitTest")] delegate* unmanaged[Cdecl] callback, [NativeTypeName("void*")] IntPtr callback_data); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_SetWindowShape(SDL_Window* window, SDL_Surface* shape); + [return: NativeTypeName("bool")] + public static extern byte SDL_SetWindowShape(SDL_Window* window, SDL_Surface* shape); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_FlashWindow(SDL_Window* window, SDL_FlashOperation operation); + [return: NativeTypeName("bool")] + public static extern byte 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)] - public static extern SDL_bool SDL_ScreenSaverEnabled(); + [return: NativeTypeName("bool")] + public static extern byte SDL_ScreenSaverEnabled(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_EnableScreenSaver(); + [return: NativeTypeName("bool")] + public static extern byte SDL_EnableScreenSaver(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_DisableScreenSaver(); + [return: NativeTypeName("bool")] + public static extern byte SDL_DisableScreenSaver(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_GL_LoadLibrary([NativeTypeName("const char *")] byte* path); + [return: NativeTypeName("bool")] + public static extern byte SDL_GL_LoadLibrary([NativeTypeName("const char *")] byte* path); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("SDL_FunctionPointer")] @@ -450,23 +503,27 @@ namespace SDL public static extern void SDL_GL_UnloadLibrary(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_GL_ExtensionSupported([NativeTypeName("const char *")] byte* extension); + [return: NativeTypeName("bool")] + public static extern byte 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)] - public static extern SDL_bool SDL_GL_SetAttribute(SDL_GLattr attr, int value); + [return: NativeTypeName("bool")] + public static extern byte SDL_GL_SetAttribute(SDL_GLattr attr, int value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_GL_GetAttribute(SDL_GLattr attr, int* value); + [return: NativeTypeName("bool")] + public static extern byte SDL_GL_GetAttribute(SDL_GLattr attr, int* value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("SDL_GLContext")] public static extern SDL_GLContextState* SDL_GL_CreateContext(SDL_Window* window); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_GL_MakeCurrent(SDL_Window* window, [NativeTypeName("SDL_GLContext")] SDL_GLContextState* context); + [return: NativeTypeName("bool")] + public static extern byte 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(); @@ -491,16 +548,20 @@ namespace SDL public static extern void SDL_EGL_SetAttributeCallbacks([NativeTypeName("SDL_EGLAttribArrayCallback")] delegate* unmanaged[Cdecl] platformAttribCallback, [NativeTypeName("SDL_EGLIntArrayCallback")] delegate* unmanaged[Cdecl] surfaceAttribCallback, [NativeTypeName("SDL_EGLIntArrayCallback")] delegate* unmanaged[Cdecl] contextAttribCallback); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_GL_SetSwapInterval(int interval); + [return: NativeTypeName("bool")] + public static extern byte SDL_GL_SetSwapInterval(int interval); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_GL_GetSwapInterval(int* interval); + [return: NativeTypeName("bool")] + public static extern byte SDL_GL_GetSwapInterval(int* interval); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_GL_SwapWindow(SDL_Window* window); + [return: NativeTypeName("bool")] + public static extern byte SDL_GL_SwapWindow(SDL_Window* window); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_GL_DestroyContext([NativeTypeName("SDL_GLContext")] SDL_GLContextState* context); + [return: NativeTypeName("bool")] + public static extern byte SDL_GL_DestroyContext([NativeTypeName("SDL_GLContext")] SDL_GLContextState* context); [NativeTypeName("#define SDL_PROP_GLOBAL_VIDEO_WAYLAND_WL_DISPLAY_POINTER \"SDL.video.wayland.wl_display\"")] public static ReadOnlySpan SDL_PROP_GLOBAL_VIDEO_WAYLAND_WL_DISPLAY_POINTER => "SDL.video.wayland.wl_display"u8; diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_vulkan.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_vulkan.g.cs index 9033f22..0cbe337 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_vulkan.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_vulkan.g.cs @@ -47,7 +47,8 @@ namespace SDL public static unsafe partial class SDL3 { [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_Vulkan_LoadLibrary([NativeTypeName("const char *")] byte* path); + [return: NativeTypeName("bool")] + public static extern byte SDL_Vulkan_LoadLibrary([NativeTypeName("const char *")] byte* path); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("SDL_FunctionPointer")] @@ -61,12 +62,14 @@ namespace SDL public static extern byte** SDL_Vulkan_GetInstanceExtensions([NativeTypeName("Uint32 *")] uint* count); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_bool SDL_Vulkan_CreateSurface(SDL_Window* window, [NativeTypeName("VkInstance")] VkInstance_T* instance, [NativeTypeName("const struct VkAllocationCallbacks *")] VkAllocationCallbacks* allocator, [NativeTypeName("VkSurfaceKHR *")] VkSurfaceKHR_T** surface); + [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); [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)] - public static extern SDL_bool SDL_Vulkan_GetPresentationSupport([NativeTypeName("VkInstance")] VkInstance_T* instance, [NativeTypeName("VkPhysicalDevice")] VkPhysicalDevice_T* physicalDevice, [NativeTypeName("Uint32")] uint queueFamilyIndex); + [return: NativeTypeName("bool")] + public static extern byte SDL_Vulkan_GetPresentationSupport([NativeTypeName("VkInstance")] VkInstance_T* instance, [NativeTypeName("VkPhysicalDevice")] VkPhysicalDevice_T* physicalDevice, [NativeTypeName("Uint32")] uint queueFamilyIndex); } } diff --git a/SDL3-CS/SDL3/SDL_atomic.cs b/SDL3-CS/SDL3/SDL_atomic.cs index 2feb9f5..cdd109d 100644 --- a/SDL3-CS/SDL3/SDL_atomic.cs +++ b/SDL3-CS/SDL3/SDL_atomic.cs @@ -6,9 +6,9 @@ namespace SDL public unsafe partial class SDL3 { [Macro] - public static int SDL_AtomicIncRef(SDL_AtomicInt* a) => SDL_AtomicAdd(a, 1); + public static int SDL_AtomicIncRef(SDL_AtomicInt* a) => SDL_AddAtomicInt(a, 1); [Macro] - public static bool SDL_AtomicDecRef(SDL_AtomicInt* a) => SDL_AtomicAdd(a, -1) == 1; + public static bool SDL_AtomicDecRef(SDL_AtomicInt* a) => SDL_AddAtomicInt(a, -1) == 1; } } diff --git a/SDL3-CS/SDL3/SDL_init.cs b/SDL3-CS/SDL3/SDL_init.cs index 8695207..7d4aeee 100644 --- a/SDL3-CS/SDL3/SDL_init.cs +++ b/SDL3-CS/SDL3/SDL_init.cs @@ -9,7 +9,6 @@ namespace SDL [Typedef] public enum SDL_InitFlags : UInt32 { - SDL_INIT_TIMER = SDL3.SDL_INIT_TIMER, SDL_INIT_AUDIO = SDL3.SDL_INIT_AUDIO, SDL_INIT_VIDEO = SDL3.SDL_INIT_VIDEO, SDL_INIT_JOYSTICK = SDL3.SDL_INIT_JOYSTICK, From 4f32e5fb4e0ad5866a44bb4da3de181ccbebbddd Mon Sep 17 00:00:00 2001 From: Susko3 Date: Sun, 22 Sep 2024 02:03:16 +0100 Subject: [PATCH 4/4] Add SDLBool with implicit bool conversions --- SDL3-CS.Tests/MainCallbacksTest.cs | 2 +- SDL3-CS.Tests/MyWindow.cs | 24 ++-- SDL3-CS.Tests/Program.cs | 4 +- SDL3-CS.Tests/TestClipboard.cs | 16 +-- .../TestPositionalInputVisualisation.cs | 6 +- SDL3-CS.Tests/TestSDLBool.cs | 37 +++-- SDL3-CS/SDL3/ClangSharp/SDL_atomic.g.cs | 8 +- SDL3-CS/SDL3/ClangSharp/SDL_audio.g.cs | 54 ++++---- SDL3-CS/SDL3/ClangSharp/SDL_camera.g.cs | 2 +- SDL3-CS/SDL3/ClangSharp/SDL_clipboard.g.cs | 14 +- SDL3-CS/SDL3/ClangSharp/SDL_cpuinfo.g.cs | 28 ++-- SDL3-CS/SDL3/ClangSharp/SDL_dialog.g.cs | 4 +- SDL3-CS/SDL3/ClangSharp/SDL_error.g.cs | 6 +- SDL3-CS/SDL3/ClangSharp/SDL_events.g.cs | 46 +++---- SDL3-CS/SDL3/ClangSharp/SDL_filesystem.g.cs | 12 +- SDL3-CS/SDL3/ClangSharp/SDL_gamepad.g.cs | 42 +++--- SDL3-CS/SDL3/ClangSharp/SDL_gpu.g.cs | 64 ++++----- SDL3-CS/SDL3/ClangSharp/SDL_haptic.g.cs | 32 ++--- SDL3-CS/SDL3/ClangSharp/SDL_hidapi.g.cs | 2 +- SDL3-CS/SDL3/ClangSharp/SDL_hints.g.cs | 10 +- SDL3-CS/SDL3/ClangSharp/SDL_init.g.cs | 8 +- SDL3-CS/SDL3/ClangSharp/SDL_iostream.g.cs | 66 ++++----- SDL3-CS/SDL3/ClangSharp/SDL_joystick.g.cs | 50 +++---- SDL3-CS/SDL3/ClangSharp/SDL_keyboard.g.cs | 26 ++-- SDL3-CS/SDL3/ClangSharp/SDL_log.g.cs | 2 +- SDL3-CS/SDL3/ClangSharp/SDL_main.Windows.g.cs | 2 +- SDL3-CS/SDL3/ClangSharp/SDL_messagebox.g.cs | 4 +- SDL3-CS/SDL3/ClangSharp/SDL_misc.g.cs | 2 +- SDL3-CS/SDL3/ClangSharp/SDL_mouse.g.cs | 18 +-- SDL3-CS/SDL3/ClangSharp/SDL_mutex.g.cs | 12 +- SDL3-CS/SDL3/ClangSharp/SDL_pixels.g.cs | 4 +- SDL3-CS/SDL3/ClangSharp/SDL_process.g.cs | 6 +- SDL3-CS/SDL3/ClangSharp/SDL_properties.g.cs | 24 ++-- SDL3-CS/SDL3/ClangSharp/SDL_rect.g.cs | 41 +++--- SDL3-CS/SDL3/ClangSharp/SDL_render.g.cs | 130 +++++++++--------- SDL3-CS/SDL3/ClangSharp/SDL_sensor.g.cs | 2 +- SDL3-CS/SDL3/ClangSharp/SDL_stdinc.g.cs | 14 +- SDL3-CS/SDL3/ClangSharp/SDL_storage.g.cs | 42 +++--- SDL3-CS/SDL3/ClangSharp/SDL_surface.g.cs | 80 +++++------ .../SDL3/ClangSharp/SDL_system.Android.g.cs | 12 +- SDL3-CS/SDL3/ClangSharp/SDL_system.GDK.g.cs | 4 +- SDL3-CS/SDL3/ClangSharp/SDL_system.Linux.g.cs | 4 +- .../SDL3/ClangSharp/SDL_system.Windows.g.cs | 4 +- SDL3-CS/SDL3/ClangSharp/SDL_system.g.cs | 4 +- SDL3-CS/SDL3/ClangSharp/SDL_system.iOS.g.cs | 4 +- SDL3-CS/SDL3/ClangSharp/SDL_thread.g.cs | 4 +- SDL3-CS/SDL3/ClangSharp/SDL_time.g.cs | 8 +- SDL3-CS/SDL3/ClangSharp/SDL_timer.g.cs | 2 +- SDL3-CS/SDL3/ClangSharp/SDL_video.g.cs | 122 ++++++++-------- SDL3-CS/SDL3/ClangSharp/SDL_vulkan.g.cs | 6 +- SDL3-CS/SDL3/SDL_clipboard.cs | 4 +- SDL3-CS/SDL3/SDL_error.cs | 4 +- SDL3-CS/SDL3/SDL_events.cs | 6 +- SDL3-CS/SDL3/SDL_stdinc.cs | 34 ++++- SDL3-CS/generate_bindings.py | 1 + 55 files changed, 613 insertions(+), 556 deletions(-) diff --git a/SDL3-CS.Tests/MainCallbacksTest.cs b/SDL3-CS.Tests/MainCallbacksTest.cs index 34dc62f..d3424f3 100644 --- a/SDL3-CS.Tests/MainCallbacksTest.cs +++ b/SDL3-CS.Tests/MainCallbacksTest.cs @@ -54,7 +54,7 @@ namespace SDL.Tests } [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])] - private static void LogOutput(IntPtr userdata, SDL_LogCategory category, SDL_LogPriority priority, byte* message) + private static void LogOutput(IntPtr userdata, int category, SDL_LogPriority priority, byte* message) { Console.WriteLine(SDL3.PtrToStringUTF8(message)); } diff --git a/SDL3-CS.Tests/MyWindow.cs b/SDL3-CS.Tests/MyWindow.cs index a5ae375..233f5ca 100644 --- a/SDL3-CS.Tests/MyWindow.cs +++ b/SDL3-CS.Tests/MyWindow.cs @@ -19,7 +19,7 @@ namespace SDL.Tests public MyWindow() { - if (SDL_InitSubSystem(init_flags) == SDL_bool.SDL_FALSE) + if (!SDL_InitSubSystem(init_flags)) throw new InvalidOperationException($"failed to initialise SDL. Error: {SDL_GetError()}"); initSuccess = true; @@ -29,7 +29,7 @@ namespace SDL.Tests public void Setup() { - SDL_SetGamepadEventsEnabled(SDL_bool.SDL_TRUE); + SDL_SetGamepadEventsEnabled(true); SDL_SetEventFilter(&nativeFilter, objectHandle.Handle); if (OperatingSystem.IsWindows()) @@ -37,7 +37,7 @@ namespace SDL.Tests } [UnmanagedCallersOnly(CallConvs = new[] { typeof(CallConvCdecl) })] - private static SDL_bool wndProc(IntPtr userdata, MSG* message) + private static SDLBool wndProc(IntPtr userdata, MSG* message) { var handle = new ObjectHandle(userdata); @@ -46,23 +46,23 @@ namespace SDL.Tests Console.WriteLine($"from {window}, message: {message->message}"); } - return SDL_TRUE; // sample use of definition from SDL3 class, not SDL_bool enum + return true; } // ReSharper disable once UseCollectionExpression [UnmanagedCallersOnly(CallConvs = new[] { typeof(CallConvCdecl) })] - private static SDL_bool nativeFilter(IntPtr userdata, SDL_Event* e) + private static SDLBool nativeFilter(IntPtr userdata, SDL_Event* e) { var handle = new ObjectHandle(userdata); if (handle.GetTarget(out var window)) return window.handleEventFromFilter(e); - return SDL_bool.SDL_TRUE; + return true; } public Action? EventFilter; - private SDL_bool handleEventFromFilter(SDL_Event* e) + private bool handleEventFromFilter(SDL_Event* e) { switch (e->Type) { @@ -76,7 +76,7 @@ namespace SDL.Tests break; } - return SDL_bool.SDL_TRUE; + return true; } private void handleKeyFromFilter(SDL_KeyboardEvent e) @@ -105,8 +105,8 @@ namespace SDL.Tests switch (e.key.key) { case SDL_Keycode.SDLK_R: - bool old = SDL_GetWindowRelativeMouseMode(sdlWindowHandle) == SDL_bool.SDL_TRUE; - SDL_SetWindowRelativeMouseMode(sdlWindowHandle, old ? SDL_bool.SDL_FALSE : SDL_bool.SDL_TRUE); + bool old = SDL_GetWindowRelativeMouseMode(sdlWindowHandle); + SDL_SetWindowRelativeMouseMode(sdlWindowHandle, !old); break; case SDL_Keycode.SDLK_V: @@ -115,11 +115,11 @@ namespace SDL.Tests break; case SDL_Keycode.SDLK_F10: - SDL_SetWindowFullscreen(sdlWindowHandle, SDL_bool.SDL_FALSE); + SDL_SetWindowFullscreen(sdlWindowHandle, false); break; case SDL_Keycode.SDLK_F11: - SDL_SetWindowFullscreen(sdlWindowHandle, SDL_bool.SDL_TRUE); + SDL_SetWindowFullscreen(sdlWindowHandle, true); break; case SDL_Keycode.SDLK_J: diff --git a/SDL3-CS.Tests/Program.cs b/SDL3-CS.Tests/Program.cs index 0a63be5..8e44865 100644 --- a/SDL3-CS.Tests/Program.cs +++ b/SDL3-CS.Tests/Program.cs @@ -14,8 +14,8 @@ namespace SDL.Tests if (OperatingSystem.IsWindows()) Console.OutputEncoding = Encoding.UTF8; - Console.WriteLine($"SDL_FALSE is represented as 0x{SDL_OutOfMemory():X} (expected 0x{SDL_bool.SDL_FALSE:X})"); - Console.WriteLine($"SDL_TRUE is represented as 0x{SDL_ClearError():X} (expected 0x{SDL_bool.SDL_TRUE:X})"); + Console.WriteLine($"false is represented as {SDL_OutOfMemory()} (expected 0x{SDLBool.FALSE_VALUE:x2})"); + Console.WriteLine($"true is represented as {SDL_ClearError()} (expected 0x{SDLBool.TRUE_VALUE:x2})"); SDL_SetHint(SDL_HINT_WINDOWS_CLOSE_ON_ALT_F4, "null byte \0 in string"u8); Debug.Assert(SDL_GetHint(SDL_HINT_WINDOWS_CLOSE_ON_ALT_F4) == "null byte "); diff --git a/SDL3-CS.Tests/TestClipboard.cs b/SDL3-CS.Tests/TestClipboard.cs index 674694b..aeb603b 100644 --- a/SDL3-CS.Tests/TestClipboard.cs +++ b/SDL3-CS.Tests/TestClipboard.cs @@ -25,11 +25,11 @@ namespace SDL.Tests public unsafe void TestClipboardData() { var ret = SDL3.SDL_SetClipboardData(&dataCallback, &cleanupCallback, IntPtr.Zero, "test/one", "test/two"); - Assert.That(ret, Is.EqualTo(0), SDL3.SDL_GetError); + Assert.That(ret, SDL3.SDL_GetError); - Assert.That(SDL3.SDL_HasClipboardData("test/one"), Is.EqualTo(SDL_bool.SDL_TRUE)); - Assert.That(SDL3.SDL_HasClipboardData("test/two"), Is.EqualTo(SDL_bool.SDL_TRUE)); - Assert.That(SDL3.SDL_HasClipboardData("test/three"), Is.EqualTo(SDL_bool.SDL_FALSE)); + Assert.That(SDL3.SDL_HasClipboardData("test/one")); + Assert.That(SDL3.SDL_HasClipboardData("test/two")); + Assert.That(!SDL3.SDL_HasClipboardData("test/three")); UIntPtr size; IntPtr data = SDL3.SDL_GetClipboardData("test/one", &size); @@ -46,13 +46,13 @@ namespace SDL.Tests } ret = SDL3.SDL_ClearClipboardData(); - Assert.That(ret, Is.EqualTo(SDL_bool.SDL_TRUE), SDL3.SDL_GetError); + Assert.That(ret, SDL3.SDL_GetError); Assert.That(cleanups, Is.EqualTo(1)); - Assert.That(SDL3.SDL_HasClipboardData("test/one"), Is.EqualTo(SDL_bool.SDL_FALSE)); - Assert.That(SDL3.SDL_HasClipboardData("test/two"), Is.EqualTo(SDL_bool.SDL_FALSE)); - Assert.That(SDL3.SDL_HasClipboardData("test/three"), Is.EqualTo(SDL_bool.SDL_FALSE)); + Assert.That(!SDL3.SDL_HasClipboardData("test/one")); + Assert.That(!SDL3.SDL_HasClipboardData("test/two")); + Assert.That(!SDL3.SDL_HasClipboardData("test/three")); data = SDL3.SDL_GetClipboardData("test/two", &size); diff --git a/SDL3-CS.Tests/TestPositionalInputVisualisation.cs b/SDL3-CS.Tests/TestPositionalInputVisualisation.cs index fa844c9..1515d83 100644 --- a/SDL3-CS.Tests/TestPositionalInputVisualisation.cs +++ b/SDL3-CS.Tests/TestPositionalInputVisualisation.cs @@ -116,15 +116,15 @@ namespace SDL.Tests switch (e.key.key) { case SDL_Keycode.SDLK_R: - SDL_SetWindowRelativeMouseMode(window, SDL_GetWindowRelativeMouseMode(window) == SDL_bool.SDL_TRUE ? SDL_bool.SDL_FALSE : SDL_bool.SDL_TRUE); + SDL_SetWindowRelativeMouseMode(window, !SDL_GetWindowRelativeMouseMode(window)); break; case SDL_Keycode.SDLK_F: - SDL_SetWindowFullscreen(window, SDL_bool.SDL_TRUE); + SDL_SetWindowFullscreen(window, true); break; case SDL_Keycode.SDLK_W: - SDL_SetWindowFullscreen(window, SDL_bool.SDL_FALSE); + SDL_SetWindowFullscreen(window, false); break; } diff --git a/SDL3-CS.Tests/TestSDLBool.cs b/SDL3-CS.Tests/TestSDLBool.cs index a0413c7..53ebfea 100644 --- a/SDL3-CS.Tests/TestSDLBool.cs +++ b/SDL3-CS.Tests/TestSDLBool.cs @@ -1,6 +1,7 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. +using System.Collections; using NUnit.Framework; namespace SDL.Tests @@ -8,32 +9,52 @@ namespace SDL.Tests [TestFixture] public class TestSDLBool { - private SDL_bool invert(SDL_bool value) => value == SDL_bool.SDL_TRUE ? SDL_bool.SDL_FALSE : SDL_bool.SDL_TRUE; - [Test] public void TestFalse() { - Assert.That(SDL3.SDL_OutOfMemory(), Is.EqualTo(SDL_bool.SDL_FALSE)); + Assert.That((bool)SDL3.SDL_OutOfMemory(), Is.EqualTo(false)); } [Test] public void TestTrue() { - Assert.That(SDL3.SDL_ClearError(), Is.EqualTo(SDL_bool.SDL_TRUE)); + Assert.That((bool)SDL3.SDL_ClearError(), Is.EqualTo(true)); } [Test] - public void TestStoreLoad([Values] SDL_bool value) + public void TestStoreLoad([Values] bool value) { var props = SDL3.SDL_CreateProperties(); Assume.That(props, Is.Not.EqualTo(0)); - var ret = SDL3.SDL_SetBooleanProperty(props, "test", value); - Assume.That(ret, Is.EqualTo(SDL_bool.SDL_TRUE)); + bool ret = SDL3.SDL_SetBooleanProperty(props, "test", value); + Assume.That(ret, Is.EqualTo(true)); - Assert.That(SDL3.SDL_GetBooleanProperty(props, "test", invert(value)), Is.EqualTo(value)); + Assert.That((bool)SDL3.SDL_GetBooleanProperty(props, "test", !value), Is.EqualTo(value)); SDL3.SDL_DestroyProperties(props); } + + public static IEnumerable BoolCases() + { + SDLBool[] values = [new SDLBool(4), true, false]; + + foreach (var x in values) + { + foreach (var y in values) + { + yield return new object[] { x, y }; + } + } + } + + [TestCaseSource(typeof(TestSDLBool), nameof(BoolCases))] + public void TestEquals(SDLBool first, SDLBool second) + { + Assert.That((SDLBool)(bool)first, Is.EqualTo(first)); + + Assert.That(first.Equals(second), Is.EqualTo((bool)first == (bool)second)); + Assert.That(first == second, Is.EqualTo((bool)first == (bool)second)); + } } } diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_atomic.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_atomic.g.cs index a551810..d25b34f 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_atomic.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_atomic.g.cs @@ -43,7 +43,7 @@ namespace SDL { [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_TryLockSpinlock([NativeTypeName("SDL_SpinLock *")] int* @lock); + public static extern SDLBool SDL_TryLockSpinlock([NativeTypeName("SDL_SpinLock *")] int* @lock); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_LockSpinlock([NativeTypeName("SDL_SpinLock *")] int* @lock); @@ -59,7 +59,7 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_CompareAndSwapAtomicInt(SDL_AtomicInt* a, int oldval, int newval); + public static extern SDLBool SDL_CompareAndSwapAtomicInt(SDL_AtomicInt* a, int oldval, int newval); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern int SDL_SetAtomicInt(SDL_AtomicInt* a, int v); @@ -72,7 +72,7 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_CompareAndSwapAtomicU32(SDL_AtomicU32* a, [NativeTypeName("Uint32")] uint oldval, [NativeTypeName("Uint32")] uint newval); + public static extern SDLBool SDL_CompareAndSwapAtomicU32(SDL_AtomicU32* a, [NativeTypeName("Uint32")] uint oldval, [NativeTypeName("Uint32")] uint newval); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("Uint32")] @@ -84,7 +84,7 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_CompareAndSwapAtomicPointer([NativeTypeName("void **")] IntPtr* a, [NativeTypeName("void*")] IntPtr oldval, [NativeTypeName("void*")] IntPtr newval); + public static extern SDLBool SDL_CompareAndSwapAtomicPointer([NativeTypeName("void **")] IntPtr* a, [NativeTypeName("void*")] IntPtr oldval, [NativeTypeName("void*")] IntPtr newval); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("void*")] diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_audio.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_audio.g.cs index b6bfcac..addb1b8 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_audio.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_audio.g.cs @@ -80,7 +80,7 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetAudioDeviceFormat(SDL_AudioDeviceID devid, SDL_AudioSpec* spec, int* sample_frames); + public static extern SDLBool SDL_GetAudioDeviceFormat(SDL_AudioDeviceID devid, SDL_AudioSpec* spec, int* sample_frames); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern int* SDL_GetAudioDeviceChannelMap(SDL_AudioDeviceID devid, int* count); @@ -90,33 +90,33 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_PauseAudioDevice(SDL_AudioDeviceID dev); + public static extern SDLBool SDL_PauseAudioDevice(SDL_AudioDeviceID dev); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_ResumeAudioDevice(SDL_AudioDeviceID dev); + public static extern SDLBool SDL_ResumeAudioDevice(SDL_AudioDeviceID dev); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_AudioDevicePaused(SDL_AudioDeviceID dev); + public static extern SDLBool SDL_AudioDevicePaused(SDL_AudioDeviceID dev); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern float SDL_GetAudioDeviceGain(SDL_AudioDeviceID devid); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetAudioDeviceGain(SDL_AudioDeviceID devid, float gain); + public static extern SDLBool SDL_SetAudioDeviceGain(SDL_AudioDeviceID devid, float gain); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_CloseAudioDevice(SDL_AudioDeviceID devid); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_BindAudioStreams(SDL_AudioDeviceID devid, SDL_AudioStream** streams, int num_streams); + public static extern SDLBool SDL_BindAudioStreams(SDL_AudioDeviceID devid, SDL_AudioStream** streams, int num_streams); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_BindAudioStream(SDL_AudioDeviceID devid, SDL_AudioStream* stream); + public static extern SDLBool SDL_BindAudioStream(SDL_AudioDeviceID devid, SDL_AudioStream* stream); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_UnbindAudioStreams(SDL_AudioStream** streams, int num_streams); @@ -135,25 +135,25 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetAudioStreamFormat(SDL_AudioStream* stream, SDL_AudioSpec* src_spec, SDL_AudioSpec* dst_spec); + public static extern SDLBool SDL_GetAudioStreamFormat(SDL_AudioStream* stream, SDL_AudioSpec* src_spec, SDL_AudioSpec* dst_spec); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetAudioStreamFormat(SDL_AudioStream* stream, [NativeTypeName("const SDL_AudioSpec *")] SDL_AudioSpec* src_spec, [NativeTypeName("const SDL_AudioSpec *")] SDL_AudioSpec* dst_spec); + public static extern SDLBool SDL_SetAudioStreamFormat(SDL_AudioStream* stream, [NativeTypeName("const SDL_AudioSpec *")] SDL_AudioSpec* src_spec, [NativeTypeName("const SDL_AudioSpec *")] SDL_AudioSpec* dst_spec); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern float SDL_GetAudioStreamFrequencyRatio(SDL_AudioStream* stream); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetAudioStreamFrequencyRatio(SDL_AudioStream* stream, float ratio); + public static extern SDLBool SDL_SetAudioStreamFrequencyRatio(SDL_AudioStream* stream, float ratio); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern float SDL_GetAudioStreamGain(SDL_AudioStream* stream); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetAudioStreamGain(SDL_AudioStream* stream, float gain); + public static extern SDLBool SDL_SetAudioStreamGain(SDL_AudioStream* stream, float gain); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern int* SDL_GetAudioStreamInputChannelMap(SDL_AudioStream* stream, int* count); @@ -163,15 +163,15 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetAudioStreamInputChannelMap(SDL_AudioStream* stream, [NativeTypeName("const int *")] int* chmap, int count); + public static extern SDLBool SDL_SetAudioStreamInputChannelMap(SDL_AudioStream* stream, [NativeTypeName("const int *")] int* chmap, int count); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetAudioStreamOutputChannelMap(SDL_AudioStream* stream, [NativeTypeName("const int *")] int* chmap, int count); + public static extern SDLBool SDL_SetAudioStreamOutputChannelMap(SDL_AudioStream* stream, [NativeTypeName("const int *")] int* chmap, int count); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_PutAudioStreamData(SDL_AudioStream* stream, [NativeTypeName("const void *")] IntPtr buf, int len); + public static extern SDLBool SDL_PutAudioStreamData(SDL_AudioStream* stream, [NativeTypeName("const void *")] IntPtr buf, int len); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern int SDL_GetAudioStreamData(SDL_AudioStream* stream, [NativeTypeName("void*")] IntPtr buf, int len); @@ -184,35 +184,35 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_FlushAudioStream(SDL_AudioStream* stream); + public static extern SDLBool SDL_FlushAudioStream(SDL_AudioStream* stream); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_ClearAudioStream(SDL_AudioStream* stream); + public static extern SDLBool SDL_ClearAudioStream(SDL_AudioStream* stream); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_PauseAudioStreamDevice(SDL_AudioStream* stream); + public static extern SDLBool SDL_PauseAudioStreamDevice(SDL_AudioStream* stream); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_ResumeAudioStreamDevice(SDL_AudioStream* stream); + public static extern SDLBool SDL_ResumeAudioStreamDevice(SDL_AudioStream* stream); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_LockAudioStream(SDL_AudioStream* stream); + public static extern SDLBool SDL_LockAudioStream(SDL_AudioStream* stream); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_UnlockAudioStream(SDL_AudioStream* stream); + public static extern SDLBool SDL_UnlockAudioStream(SDL_AudioStream* stream); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetAudioStreamGetCallback(SDL_AudioStream* stream, [NativeTypeName("SDL_AudioStreamCallback")] delegate* unmanaged[Cdecl] callback, [NativeTypeName("void*")] IntPtr userdata); + public static extern SDLBool SDL_SetAudioStreamGetCallback(SDL_AudioStream* stream, [NativeTypeName("SDL_AudioStreamCallback")] delegate* unmanaged[Cdecl] callback, [NativeTypeName("void*")] IntPtr userdata); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetAudioStreamPutCallback(SDL_AudioStream* stream, [NativeTypeName("SDL_AudioStreamCallback")] delegate* unmanaged[Cdecl] callback, [NativeTypeName("void*")] IntPtr userdata); + public static extern SDLBool SDL_SetAudioStreamPutCallback(SDL_AudioStream* stream, [NativeTypeName("SDL_AudioStreamCallback")] delegate* unmanaged[Cdecl] callback, [NativeTypeName("void*")] IntPtr userdata); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_DestroyAudioStream(SDL_AudioStream* stream); @@ -222,23 +222,23 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetAudioPostmixCallback(SDL_AudioDeviceID devid, [NativeTypeName("SDL_AudioPostmixCallback")] delegate* unmanaged[Cdecl] callback, [NativeTypeName("void*")] IntPtr userdata); + public static extern SDLBool SDL_SetAudioPostmixCallback(SDL_AudioDeviceID devid, [NativeTypeName("SDL_AudioPostmixCallback")] delegate* unmanaged[Cdecl] callback, [NativeTypeName("void*")] IntPtr userdata); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_LoadWAV_IO(SDL_IOStream* src, [NativeTypeName("bool")] byte closeio, SDL_AudioSpec* spec, [NativeTypeName("Uint8 **")] byte** audio_buf, [NativeTypeName("Uint32 *")] uint* audio_len); + public static extern SDLBool SDL_LoadWAV_IO(SDL_IOStream* src, [NativeTypeName("bool")] SDLBool closeio, SDL_AudioSpec* spec, [NativeTypeName("Uint8 **")] byte** audio_buf, [NativeTypeName("Uint32 *")] uint* audio_len); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_LoadWAV([NativeTypeName("const char *")] byte* path, SDL_AudioSpec* spec, [NativeTypeName("Uint8 **")] byte** audio_buf, [NativeTypeName("Uint32 *")] uint* audio_len); + public static extern SDLBool SDL_LoadWAV([NativeTypeName("const char *")] byte* path, SDL_AudioSpec* spec, [NativeTypeName("Uint8 **")] byte** audio_buf, [NativeTypeName("Uint32 *")] uint* audio_len); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_MixAudio([NativeTypeName("Uint8 *")] byte* dst, [NativeTypeName("const Uint8 *")] byte* src, SDL_AudioFormat format, [NativeTypeName("Uint32")] uint len, float volume); + public static extern SDLBool SDL_MixAudio([NativeTypeName("Uint8 *")] byte* dst, [NativeTypeName("const Uint8 *")] byte* src, SDL_AudioFormat format, [NativeTypeName("Uint32")] uint len, float volume); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_ConvertAudioSamples([NativeTypeName("const SDL_AudioSpec *")] SDL_AudioSpec* src_spec, [NativeTypeName("const Uint8 *")] byte* src_data, int src_len, [NativeTypeName("const SDL_AudioSpec *")] SDL_AudioSpec* dst_spec, [NativeTypeName("Uint8 **")] byte** dst_data, int* dst_len); + public static extern SDLBool SDL_ConvertAudioSamples([NativeTypeName("const SDL_AudioSpec *")] SDL_AudioSpec* src_spec, [NativeTypeName("const Uint8 *")] byte* src_data, int src_len, [NativeTypeName("const SDL_AudioSpec *")] SDL_AudioSpec* dst_spec, [NativeTypeName("Uint8 **")] byte** dst_data, int* dst_len); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetAudioFormatName", ExactSpelling = true)] [return: NativeTypeName("const char *")] diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_camera.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_camera.g.cs index 30202f3..062ecc6 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_camera.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_camera.g.cs @@ -93,7 +93,7 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetCameraFormat(SDL_Camera* camera, SDL_CameraSpec* spec); + public static extern SDLBool SDL_GetCameraFormat(SDL_Camera* camera, SDL_CameraSpec* spec); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_Surface* SDL_AcquireCameraFrame(SDL_Camera* camera, [NativeTypeName("Uint64 *")] ulong* timestampNS); diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_clipboard.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_clipboard.g.cs index 0d2113d..0f41d88 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_clipboard.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_clipboard.g.cs @@ -32,7 +32,7 @@ namespace SDL { [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetClipboardText([NativeTypeName("const char *")] byte* text); + public static extern SDLBool SDL_SetClipboardText([NativeTypeName("const char *")] byte* text); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetClipboardText", ExactSpelling = true)] [return: NativeTypeName("char *")] @@ -40,11 +40,11 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_HasClipboardText(); + public static extern SDLBool SDL_HasClipboardText(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetPrimarySelectionText([NativeTypeName("const char *")] byte* text); + public static extern SDLBool SDL_SetPrimarySelectionText([NativeTypeName("const char *")] byte* text); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetPrimarySelectionText", ExactSpelling = true)] [return: NativeTypeName("char *")] @@ -52,15 +52,15 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_HasPrimarySelectionText(); + public static extern SDLBool SDL_HasPrimarySelectionText(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetClipboardData([NativeTypeName("SDL_ClipboardDataCallback")] delegate* unmanaged[Cdecl] callback, [NativeTypeName("SDL_ClipboardCleanupCallback")] delegate* unmanaged[Cdecl] cleanup, [NativeTypeName("void*")] IntPtr userdata, [NativeTypeName("const char **")] byte** mime_types, [NativeTypeName("size_t")] nuint num_mime_types); + public static extern SDLBool SDL_SetClipboardData([NativeTypeName("SDL_ClipboardDataCallback")] delegate* unmanaged[Cdecl] callback, [NativeTypeName("SDL_ClipboardCleanupCallback")] delegate* unmanaged[Cdecl] cleanup, [NativeTypeName("void*")] IntPtr userdata, [NativeTypeName("const char **")] byte** mime_types, [NativeTypeName("size_t")] nuint num_mime_types); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_ClearClipboardData(); + public static extern SDLBool SDL_ClearClipboardData(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("void*")] @@ -68,6 +68,6 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_HasClipboardData([NativeTypeName("const char *")] byte* mime_type); + public static extern SDLBool SDL_HasClipboardData([NativeTypeName("const char *")] byte* mime_type); } } diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_cpuinfo.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_cpuinfo.g.cs index 7b480ae..88a70be 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_cpuinfo.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_cpuinfo.g.cs @@ -37,59 +37,59 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_HasAltiVec(); + public static extern SDLBool SDL_HasAltiVec(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_HasMMX(); + public static extern SDLBool SDL_HasMMX(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_HasSSE(); + public static extern SDLBool SDL_HasSSE(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_HasSSE2(); + public static extern SDLBool SDL_HasSSE2(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_HasSSE3(); + public static extern SDLBool SDL_HasSSE3(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_HasSSE41(); + public static extern SDLBool SDL_HasSSE41(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_HasSSE42(); + public static extern SDLBool SDL_HasSSE42(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_HasAVX(); + public static extern SDLBool SDL_HasAVX(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_HasAVX2(); + public static extern SDLBool SDL_HasAVX2(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_HasAVX512F(); + public static extern SDLBool SDL_HasAVX512F(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_HasARMSIMD(); + public static extern SDLBool SDL_HasARMSIMD(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_HasNEON(); + public static extern SDLBool SDL_HasNEON(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_HasLSX(); + public static extern SDLBool SDL_HasLSX(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_HasLASX(); + public static extern SDLBool SDL_HasLASX(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern int SDL_GetSystemRAM(); diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_dialog.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_dialog.g.cs index ef97f80..7109c6b 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_dialog.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_dialog.g.cs @@ -40,12 +40,12 @@ namespace SDL public static unsafe partial class SDL3 { [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void SDL_ShowOpenFileDialog([NativeTypeName("SDL_DialogFileCallback")] delegate* unmanaged[Cdecl] callback, [NativeTypeName("void*")] IntPtr userdata, SDL_Window* window, [NativeTypeName("const SDL_DialogFileFilter *")] SDL_DialogFileFilter* filters, int nfilters, [NativeTypeName("const char *")] byte* default_location, [NativeTypeName("bool")] byte allow_many); + public static extern void SDL_ShowOpenFileDialog([NativeTypeName("SDL_DialogFileCallback")] delegate* unmanaged[Cdecl] callback, [NativeTypeName("void*")] IntPtr userdata, SDL_Window* window, [NativeTypeName("const SDL_DialogFileFilter *")] SDL_DialogFileFilter* filters, int nfilters, [NativeTypeName("const char *")] byte* default_location, [NativeTypeName("bool")] SDLBool allow_many); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_ShowSaveFileDialog([NativeTypeName("SDL_DialogFileCallback")] delegate* unmanaged[Cdecl] callback, [NativeTypeName("void*")] IntPtr userdata, SDL_Window* window, [NativeTypeName("const SDL_DialogFileFilter *")] SDL_DialogFileFilter* filters, int nfilters, [NativeTypeName("const char *")] byte* default_location); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void SDL_ShowOpenFolderDialog([NativeTypeName("SDL_DialogFileCallback")] delegate* unmanaged[Cdecl] callback, [NativeTypeName("void*")] IntPtr userdata, SDL_Window* window, [NativeTypeName("const char *")] byte* default_location, [NativeTypeName("bool")] byte allow_many); + public static extern void SDL_ShowOpenFolderDialog([NativeTypeName("SDL_DialogFileCallback")] delegate* unmanaged[Cdecl] callback, [NativeTypeName("void*")] IntPtr userdata, SDL_Window* window, [NativeTypeName("const char *")] byte* default_location, [NativeTypeName("bool")] SDLBool allow_many); } } diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_error.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_error.g.cs index 5b63446..172beef 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_error.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_error.g.cs @@ -31,11 +31,11 @@ namespace SDL { [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetError([NativeTypeName("const char *")] byte* fmt, __arglist); + public static extern SDLBool SDL_SetError([NativeTypeName("const char *")] byte* fmt, __arglist); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_OutOfMemory(); + public static extern SDLBool SDL_OutOfMemory(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetError", ExactSpelling = true)] [return: NativeTypeName("const char *")] @@ -43,6 +43,6 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_ClearError(); + public static extern SDLBool SDL_ClearError(); } } diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_events.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_events.g.cs index bb77e95..d7957c6 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_events.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_events.g.cs @@ -232,10 +232,10 @@ namespace SDL public ushort raw; [NativeTypeName("bool")] - public byte down; + public SDLBool down; [NativeTypeName("bool")] - public byte repeat; + public SDLBool repeat; } public unsafe partial struct SDL_TextEditingEvent @@ -282,7 +282,7 @@ namespace SDL public int selected_candidate; [NativeTypeName("bool")] - public byte horizontal; + public SDLBool horizontal; [NativeTypeName("Uint8")] public byte padding1; @@ -366,7 +366,7 @@ namespace SDL public byte button; [NativeTypeName("bool")] - public byte down; + public SDLBool down; [NativeTypeName("Uint8")] public byte clicks; @@ -507,7 +507,7 @@ namespace SDL public byte button; [NativeTypeName("bool")] - public byte down; + public SDLBool down; [NativeTypeName("Uint8")] public byte padding1; @@ -593,7 +593,7 @@ namespace SDL public byte button; [NativeTypeName("bool")] - public byte down; + public SDLBool down; [NativeTypeName("Uint8")] public byte padding1; @@ -681,7 +681,7 @@ namespace SDL public SDL_AudioDeviceID which; [NativeTypeName("bool")] - public byte recording; + public SDLBool recording; [NativeTypeName("Uint8")] public byte padding1; @@ -790,10 +790,10 @@ namespace SDL public float y; [NativeTypeName("bool")] - public byte eraser; + public SDLBool eraser; [NativeTypeName("bool")] - public byte down; + public SDLBool down; } public partial struct SDL_PenButtonEvent @@ -820,7 +820,7 @@ namespace SDL public byte button; [NativeTypeName("bool")] - public byte down; + public SDLBool down; } public partial struct SDL_PenAxisEvent @@ -1084,11 +1084,11 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_HasEvent([NativeTypeName("Uint32")] uint type); + public static extern SDLBool SDL_HasEvent([NativeTypeName("Uint32")] uint type); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_HasEvents([NativeTypeName("Uint32")] uint minType, [NativeTypeName("Uint32")] uint maxType); + public static extern SDLBool SDL_HasEvents([NativeTypeName("Uint32")] uint minType, [NativeTypeName("Uint32")] uint maxType); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_FlushEvent([NativeTypeName("Uint32")] uint type); @@ -1098,43 +1098,43 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_PollEvent(SDL_Event* @event); + public static extern SDLBool SDL_PollEvent(SDL_Event* @event); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_WaitEvent(SDL_Event* @event); + public static extern SDLBool SDL_WaitEvent(SDL_Event* @event); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_WaitEventTimeout(SDL_Event* @event, [NativeTypeName("Sint32")] int timeoutMS); + public static extern SDLBool SDL_WaitEventTimeout(SDL_Event* @event, [NativeTypeName("Sint32")] int timeoutMS); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_PushEvent(SDL_Event* @event); + public static extern SDLBool SDL_PushEvent(SDL_Event* @event); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void SDL_SetEventFilter([NativeTypeName("SDL_EventFilter")] delegate* unmanaged[Cdecl] filter, [NativeTypeName("void*")] IntPtr userdata); + public static extern void SDL_SetEventFilter([NativeTypeName("SDL_EventFilter")] delegate* unmanaged[Cdecl] filter, [NativeTypeName("void*")] IntPtr userdata); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetEventFilter([NativeTypeName("SDL_EventFilter *")] delegate* unmanaged[Cdecl]* filter, [NativeTypeName("void **")] IntPtr* userdata); + public static extern SDLBool SDL_GetEventFilter([NativeTypeName("SDL_EventFilter *")] delegate* unmanaged[Cdecl]* filter, [NativeTypeName("void **")] IntPtr* userdata); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_AddEventWatch([NativeTypeName("SDL_EventFilter")] delegate* unmanaged[Cdecl] filter, [NativeTypeName("void*")] IntPtr userdata); + public static extern SDLBool SDL_AddEventWatch([NativeTypeName("SDL_EventFilter")] delegate* unmanaged[Cdecl] filter, [NativeTypeName("void*")] IntPtr userdata); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void SDL_RemoveEventWatch([NativeTypeName("SDL_EventFilter")] delegate* unmanaged[Cdecl] filter, [NativeTypeName("void*")] IntPtr userdata); + public static extern void SDL_RemoveEventWatch([NativeTypeName("SDL_EventFilter")] delegate* unmanaged[Cdecl] filter, [NativeTypeName("void*")] IntPtr userdata); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void SDL_FilterEvents([NativeTypeName("SDL_EventFilter")] delegate* unmanaged[Cdecl] filter, [NativeTypeName("void*")] IntPtr userdata); + public static extern void SDL_FilterEvents([NativeTypeName("SDL_EventFilter")] delegate* unmanaged[Cdecl] filter, [NativeTypeName("void*")] IntPtr userdata); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void SDL_SetEventEnabled([NativeTypeName("Uint32")] uint type, [NativeTypeName("bool")] byte enabled); + public static extern void SDL_SetEventEnabled([NativeTypeName("Uint32")] uint type, [NativeTypeName("bool")] SDLBool enabled); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_EventEnabled([NativeTypeName("Uint32")] uint type); + public static extern SDLBool SDL_EventEnabled([NativeTypeName("Uint32")] uint type); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("Uint32")] diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_filesystem.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_filesystem.g.cs index 15048d1..9648af1 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_filesystem.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_filesystem.g.cs @@ -82,27 +82,27 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_CreateDirectory([NativeTypeName("const char *")] byte* path); + public static extern SDLBool SDL_CreateDirectory([NativeTypeName("const char *")] byte* path); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_EnumerateDirectory([NativeTypeName("const char *")] byte* path, [NativeTypeName("SDL_EnumerateDirectoryCallback")] delegate* unmanaged[Cdecl] callback, [NativeTypeName("void*")] IntPtr userdata); + public static extern SDLBool SDL_EnumerateDirectory([NativeTypeName("const char *")] byte* path, [NativeTypeName("SDL_EnumerateDirectoryCallback")] delegate* unmanaged[Cdecl] callback, [NativeTypeName("void*")] IntPtr userdata); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_RemovePath([NativeTypeName("const char *")] byte* path); + public static extern SDLBool SDL_RemovePath([NativeTypeName("const char *")] byte* path); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_RenamePath([NativeTypeName("const char *")] byte* oldpath, [NativeTypeName("const char *")] byte* newpath); + public static extern SDLBool SDL_RenamePath([NativeTypeName("const char *")] byte* oldpath, [NativeTypeName("const char *")] byte* newpath); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_CopyFile([NativeTypeName("const char *")] byte* oldpath, [NativeTypeName("const char *")] byte* newpath); + public static extern SDLBool SDL_CopyFile([NativeTypeName("const char *")] byte* oldpath, [NativeTypeName("const char *")] byte* newpath); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetPathInfo([NativeTypeName("const char *")] byte* path, SDL_PathInfo* info); + public static extern SDLBool SDL_GetPathInfo([NativeTypeName("const char *")] byte* path, SDL_PathInfo* info); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("char **")] diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_gamepad.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_gamepad.g.cs index 1c93dd7..906e827 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_gamepad.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_gamepad.g.cs @@ -183,14 +183,14 @@ namespace SDL public static extern int SDL_AddGamepadMapping([NativeTypeName("const char *")] byte* mapping); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern int SDL_AddGamepadMappingsFromIO(SDL_IOStream* src, [NativeTypeName("bool")] byte closeio); + public static extern int SDL_AddGamepadMappingsFromIO(SDL_IOStream* src, [NativeTypeName("bool")] SDLBool closeio); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern int SDL_AddGamepadMappingsFromFile([NativeTypeName("const char *")] byte* file); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_ReloadGamepadMappings(); + public static extern SDLBool SDL_ReloadGamepadMappings(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("char **")] @@ -206,18 +206,18 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetGamepadMapping(SDL_JoystickID instance_id, [NativeTypeName("const char *")] byte* mapping); + public static extern SDLBool SDL_SetGamepadMapping(SDL_JoystickID instance_id, [NativeTypeName("const char *")] byte* mapping); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_HasGamepad(); + public static extern SDLBool SDL_HasGamepad(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_JoystickID* SDL_GetGamepads(int* count); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_IsGamepad(SDL_JoystickID instance_id); + public static extern SDLBool SDL_IsGamepad(SDL_JoystickID instance_id); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetGamepadNameForID", ExactSpelling = true)] [return: NativeTypeName("const char *")] @@ -289,7 +289,7 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetGamepadPlayerIndex(SDL_Gamepad* gamepad, int player_index); + public static extern SDLBool SDL_SetGamepadPlayerIndex(SDL_Gamepad* gamepad, int player_index); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("Uint16")] @@ -323,17 +323,17 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GamepadConnected(SDL_Gamepad* gamepad); + public static extern SDLBool SDL_GamepadConnected(SDL_Gamepad* gamepad); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_Joystick* SDL_GetGamepadJoystick(SDL_Gamepad* gamepad); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void SDL_SetGamepadEventsEnabled([NativeTypeName("bool")] byte enabled); + public static extern void SDL_SetGamepadEventsEnabled([NativeTypeName("bool")] SDLBool enabled); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GamepadEventsEnabled(); + public static extern SDLBool SDL_GamepadEventsEnabled(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_GamepadBinding** SDL_GetGamepadBindings(SDL_Gamepad* gamepad, int* count); @@ -357,7 +357,7 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GamepadHasAxis(SDL_Gamepad* gamepad, SDL_GamepadAxis axis); + public static extern SDLBool SDL_GamepadHasAxis(SDL_Gamepad* gamepad, SDL_GamepadAxis axis); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("Sint16")] @@ -372,11 +372,11 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GamepadHasButton(SDL_Gamepad* gamepad, SDL_GamepadButton button); + public static extern SDLBool SDL_GamepadHasButton(SDL_Gamepad* gamepad, SDL_GamepadButton button); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetGamepadButton(SDL_Gamepad* gamepad, SDL_GamepadButton button); + public static extern SDLBool SDL_GetGamepadButton(SDL_Gamepad* gamepad, SDL_GamepadButton button); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_GamepadButtonLabel SDL_GetGamepadButtonLabelForType(SDL_GamepadType type, SDL_GamepadButton button); @@ -392,42 +392,42 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetGamepadTouchpadFinger(SDL_Gamepad* gamepad, int touchpad, int finger, bool* down, float* x, float* y, float* pressure); + public static extern SDLBool SDL_GetGamepadTouchpadFinger(SDL_Gamepad* gamepad, int touchpad, int finger, [NativeTypeName("bool *")] SDLBool* down, float* x, float* y, float* pressure); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GamepadHasSensor(SDL_Gamepad* gamepad, SDL_SensorType type); + public static extern SDLBool SDL_GamepadHasSensor(SDL_Gamepad* gamepad, SDL_SensorType type); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetGamepadSensorEnabled(SDL_Gamepad* gamepad, SDL_SensorType type, [NativeTypeName("bool")] byte enabled); + public static extern SDLBool SDL_SetGamepadSensorEnabled(SDL_Gamepad* gamepad, SDL_SensorType type, [NativeTypeName("bool")] SDLBool enabled); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GamepadSensorEnabled(SDL_Gamepad* gamepad, SDL_SensorType type); + public static extern SDLBool SDL_GamepadSensorEnabled(SDL_Gamepad* gamepad, SDL_SensorType type); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern float SDL_GetGamepadSensorDataRate(SDL_Gamepad* gamepad, SDL_SensorType type); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetGamepadSensorData(SDL_Gamepad* gamepad, SDL_SensorType type, float* data, int num_values); + public static extern SDLBool SDL_GetGamepadSensorData(SDL_Gamepad* gamepad, SDL_SensorType type, float* data, int num_values); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_RumbleGamepad(SDL_Gamepad* gamepad, [NativeTypeName("Uint16")] ushort low_frequency_rumble, [NativeTypeName("Uint16")] ushort high_frequency_rumble, [NativeTypeName("Uint32")] uint duration_ms); + public static extern SDLBool SDL_RumbleGamepad(SDL_Gamepad* gamepad, [NativeTypeName("Uint16")] ushort low_frequency_rumble, [NativeTypeName("Uint16")] ushort high_frequency_rumble, [NativeTypeName("Uint32")] uint duration_ms); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_RumbleGamepadTriggers(SDL_Gamepad* gamepad, [NativeTypeName("Uint16")] ushort left_rumble, [NativeTypeName("Uint16")] ushort right_rumble, [NativeTypeName("Uint32")] uint duration_ms); + public static extern SDLBool SDL_RumbleGamepadTriggers(SDL_Gamepad* gamepad, [NativeTypeName("Uint16")] ushort left_rumble, [NativeTypeName("Uint16")] ushort right_rumble, [NativeTypeName("Uint32")] uint duration_ms); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetGamepadLED(SDL_Gamepad* gamepad, [NativeTypeName("Uint8")] byte red, [NativeTypeName("Uint8")] byte green, [NativeTypeName("Uint8")] byte blue); + public static extern SDLBool SDL_SetGamepadLED(SDL_Gamepad* gamepad, [NativeTypeName("Uint8")] byte red, [NativeTypeName("Uint8")] byte green, [NativeTypeName("Uint8")] byte blue); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SendGamepadEffect(SDL_Gamepad* gamepad, [NativeTypeName("const void *")] IntPtr data, int size); + public static extern SDLBool SDL_SendGamepadEffect(SDL_Gamepad* gamepad, [NativeTypeName("const void *")] IntPtr data, int size); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_CloseGamepad(SDL_Gamepad* gamepad); diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_gpu.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_gpu.g.cs index 0b4c0c4..60b46a2 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_gpu.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_gpu.g.cs @@ -556,10 +556,10 @@ namespace SDL public float max_lod; [NativeTypeName("bool")] - public byte enable_anisotropy; + public SDLBool enable_anisotropy; [NativeTypeName("bool")] - public byte enable_compare; + public SDLBool enable_compare; [NativeTypeName("Uint8")] public byte padding1; @@ -641,10 +641,10 @@ namespace SDL public SDL_GPUColorComponentFlags color_write_mask; [NativeTypeName("bool")] - public byte enable_blend; + public SDLBool enable_blend; [NativeTypeName("bool")] - public byte enable_color_write_mask; + public SDLBool enable_color_write_mask; [NativeTypeName("Uint8")] public byte padding2; @@ -743,7 +743,7 @@ namespace SDL public float depth_bias_slope_factor; [NativeTypeName("bool")] - public byte enable_depth_bias; + public SDLBool enable_depth_bias; [NativeTypeName("Uint8")] public byte padding1; @@ -763,7 +763,7 @@ namespace SDL public uint sample_mask; [NativeTypeName("bool")] - public byte enable_mask; + public SDLBool enable_mask; [NativeTypeName("Uint8")] public byte padding1; @@ -790,13 +790,13 @@ namespace SDL public byte write_mask; [NativeTypeName("bool")] - public byte enable_depth_test; + public SDLBool enable_depth_test; [NativeTypeName("bool")] - public byte enable_depth_write; + public SDLBool enable_depth_write; [NativeTypeName("bool")] - public byte enable_stencil_test; + public SDLBool enable_stencil_test; [NativeTypeName("Uint8")] public byte padding1; @@ -826,7 +826,7 @@ namespace SDL public SDL_GPUTextureFormat depth_stencil_format; [NativeTypeName("bool")] - public byte has_depth_stencil_target; + public SDLBool has_depth_stencil_target; [NativeTypeName("Uint8")] public byte padding1; @@ -927,10 +927,10 @@ namespace SDL public uint resolve_layer; [NativeTypeName("bool")] - public byte cycle; + public SDLBool cycle; [NativeTypeName("bool")] - public byte cycle_resolve_texture; + public SDLBool cycle_resolve_texture; [NativeTypeName("Uint8")] public byte padding1; @@ -954,7 +954,7 @@ namespace SDL public SDL_GPUStoreOp stencil_store_op; [NativeTypeName("bool")] - public byte cycle; + public SDLBool cycle; [NativeTypeName("Uint8")] public byte clear_stencil; @@ -981,7 +981,7 @@ namespace SDL public SDL_GPUFilter filter; [NativeTypeName("bool")] - public byte cycle; + public SDLBool cycle; [NativeTypeName("Uint8")] public byte padding1; @@ -1013,7 +1013,7 @@ namespace SDL public SDL_GPUBuffer* buffer; [NativeTypeName("bool")] - public byte cycle; + public SDLBool cycle; [NativeTypeName("Uint8")] public byte padding1; @@ -1036,7 +1036,7 @@ namespace SDL public uint layer; [NativeTypeName("bool")] - public byte cycle; + public SDLBool cycle; [NativeTypeName("Uint8")] public byte padding1; @@ -1052,14 +1052,14 @@ namespace SDL { [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GPUSupportsShaderFormats(SDL_GPUShaderFormat format_flags, [NativeTypeName("const char *")] byte* name); + public static extern SDLBool SDL_GPUSupportsShaderFormats(SDL_GPUShaderFormat format_flags, [NativeTypeName("const char *")] byte* name); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GPUSupportsProperties(SDL_PropertiesID props); + public static extern SDLBool SDL_GPUSupportsProperties(SDL_PropertiesID props); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_GPUDevice* SDL_CreateGPUDevice(SDL_GPUShaderFormat format_flags, [NativeTypeName("bool")] byte debug_mode, [NativeTypeName("const char *")] byte* name); + public static extern SDL_GPUDevice* SDL_CreateGPUDevice(SDL_GPUShaderFormat format_flags, [NativeTypeName("bool")] SDLBool debug_mode, [NativeTypeName("const char *")] byte* name); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_GPUDevice* SDL_CreateGPUDeviceWithProperties(SDL_PropertiesID props); @@ -1233,7 +1233,7 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("void*")] - public static extern IntPtr SDL_MapGPUTransferBuffer(SDL_GPUDevice* device, SDL_GPUTransferBuffer* transfer_buffer, [NativeTypeName("bool")] byte cycle); + public static extern IntPtr SDL_MapGPUTransferBuffer(SDL_GPUDevice* device, SDL_GPUTransferBuffer* transfer_buffer, [NativeTypeName("bool")] SDLBool cycle); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_UnmapGPUTransferBuffer(SDL_GPUDevice* device, SDL_GPUTransferBuffer* transfer_buffer); @@ -1242,16 +1242,16 @@ namespace SDL public static extern SDL_GPUCopyPass* SDL_BeginGPUCopyPass(SDL_GPUCommandBuffer* command_buffer); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void SDL_UploadToGPUTexture(SDL_GPUCopyPass* copy_pass, [NativeTypeName("const SDL_GPUTextureTransferInfo *")] SDL_GPUTextureTransferInfo* source, [NativeTypeName("const SDL_GPUTextureRegion *")] SDL_GPUTextureRegion* destination, [NativeTypeName("bool")] byte cycle); + public static extern void SDL_UploadToGPUTexture(SDL_GPUCopyPass* copy_pass, [NativeTypeName("const SDL_GPUTextureTransferInfo *")] SDL_GPUTextureTransferInfo* source, [NativeTypeName("const SDL_GPUTextureRegion *")] SDL_GPUTextureRegion* destination, [NativeTypeName("bool")] SDLBool cycle); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void SDL_UploadToGPUBuffer(SDL_GPUCopyPass* copy_pass, [NativeTypeName("const SDL_GPUTransferBufferLocation *")] SDL_GPUTransferBufferLocation* source, [NativeTypeName("const SDL_GPUBufferRegion *")] SDL_GPUBufferRegion* destination, [NativeTypeName("bool")] byte cycle); + public static extern void SDL_UploadToGPUBuffer(SDL_GPUCopyPass* copy_pass, [NativeTypeName("const SDL_GPUTransferBufferLocation *")] SDL_GPUTransferBufferLocation* source, [NativeTypeName("const SDL_GPUBufferRegion *")] SDL_GPUBufferRegion* destination, [NativeTypeName("bool")] SDLBool cycle); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void SDL_CopyGPUTextureToTexture(SDL_GPUCopyPass* copy_pass, [NativeTypeName("const SDL_GPUTextureLocation *")] SDL_GPUTextureLocation* source, [NativeTypeName("const SDL_GPUTextureLocation *")] SDL_GPUTextureLocation* destination, [NativeTypeName("Uint32")] uint w, [NativeTypeName("Uint32")] uint h, [NativeTypeName("Uint32")] uint d, [NativeTypeName("bool")] byte cycle); + public static extern void SDL_CopyGPUTextureToTexture(SDL_GPUCopyPass* copy_pass, [NativeTypeName("const SDL_GPUTextureLocation *")] SDL_GPUTextureLocation* source, [NativeTypeName("const SDL_GPUTextureLocation *")] SDL_GPUTextureLocation* destination, [NativeTypeName("Uint32")] uint w, [NativeTypeName("Uint32")] uint h, [NativeTypeName("Uint32")] uint d, [NativeTypeName("bool")] SDLBool cycle); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void SDL_CopyGPUBufferToBuffer(SDL_GPUCopyPass* copy_pass, [NativeTypeName("const SDL_GPUBufferLocation *")] SDL_GPUBufferLocation* source, [NativeTypeName("const SDL_GPUBufferLocation *")] SDL_GPUBufferLocation* destination, [NativeTypeName("Uint32")] uint size, [NativeTypeName("bool")] byte cycle); + public static extern void SDL_CopyGPUBufferToBuffer(SDL_GPUCopyPass* copy_pass, [NativeTypeName("const SDL_GPUBufferLocation *")] SDL_GPUBufferLocation* source, [NativeTypeName("const SDL_GPUBufferLocation *")] SDL_GPUBufferLocation* destination, [NativeTypeName("Uint32")] uint size, [NativeTypeName("bool")] SDLBool cycle); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_DownloadFromGPUTexture(SDL_GPUCopyPass* copy_pass, [NativeTypeName("const SDL_GPUTextureRegion *")] SDL_GPUTextureRegion* source, [NativeTypeName("const SDL_GPUTextureTransferInfo *")] SDL_GPUTextureTransferInfo* destination); @@ -1270,22 +1270,22 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_WindowSupportsGPUSwapchainComposition(SDL_GPUDevice* device, SDL_Window* window, SDL_GPUSwapchainComposition swapchain_composition); + public static extern SDLBool SDL_WindowSupportsGPUSwapchainComposition(SDL_GPUDevice* device, SDL_Window* window, SDL_GPUSwapchainComposition swapchain_composition); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_WindowSupportsGPUPresentMode(SDL_GPUDevice* device, SDL_Window* window, SDL_GPUPresentMode present_mode); + public static extern SDLBool SDL_WindowSupportsGPUPresentMode(SDL_GPUDevice* device, SDL_Window* window, SDL_GPUPresentMode present_mode); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_ClaimWindowForGPUDevice(SDL_GPUDevice* device, SDL_Window* window); + public static extern SDLBool SDL_ClaimWindowForGPUDevice(SDL_GPUDevice* device, SDL_Window* window); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_ReleaseWindowFromGPUDevice(SDL_GPUDevice* device, SDL_Window* window); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetGPUSwapchainParameters(SDL_GPUDevice* device, SDL_Window* window, SDL_GPUSwapchainComposition swapchain_composition, SDL_GPUPresentMode present_mode); + public static extern SDLBool SDL_SetGPUSwapchainParameters(SDL_GPUDevice* device, SDL_Window* window, SDL_GPUSwapchainComposition swapchain_composition, SDL_GPUPresentMode present_mode); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_GPUTextureFormat SDL_GetGPUSwapchainTextureFormat(SDL_GPUDevice* device, SDL_Window* window); @@ -1303,11 +1303,11 @@ namespace SDL public static extern void SDL_WaitForGPUIdle(SDL_GPUDevice* device); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void SDL_WaitForGPUFences(SDL_GPUDevice* device, [NativeTypeName("bool")] byte wait_all, [NativeTypeName("SDL_GPUFence *const *")] SDL_GPUFence** fences, [NativeTypeName("Uint32")] uint num_fences); + public static extern void SDL_WaitForGPUFences(SDL_GPUDevice* device, [NativeTypeName("bool")] SDLBool wait_all, [NativeTypeName("SDL_GPUFence *const *")] SDL_GPUFence** fences, [NativeTypeName("Uint32")] uint num_fences); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_QueryGPUFence(SDL_GPUDevice* device, SDL_GPUFence* fence); + public static extern SDLBool SDL_QueryGPUFence(SDL_GPUDevice* device, SDL_GPUFence* fence); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_ReleaseGPUFence(SDL_GPUDevice* device, SDL_GPUFence* fence); @@ -1318,11 +1318,11 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GPUTextureSupportsFormat(SDL_GPUDevice* device, SDL_GPUTextureFormat format, SDL_GPUTextureType type, SDL_GPUTextureUsageFlags usage); + public static extern SDLBool SDL_GPUTextureSupportsFormat(SDL_GPUDevice* device, SDL_GPUTextureFormat format, SDL_GPUTextureType type, SDL_GPUTextureUsageFlags usage); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GPUTextureSupportsSampleCount(SDL_GPUDevice* device, SDL_GPUTextureFormat format, SDL_GPUSampleCount sample_count); + public static extern SDLBool SDL_GPUTextureSupportsSampleCount(SDL_GPUDevice* device, SDL_GPUTextureFormat format, SDL_GPUSampleCount sample_count); [NativeTypeName("#define SDL_GPU_TEXTUREUSAGE_SAMPLER (1u << 0)")] public const uint SDL_GPU_TEXTUREUSAGE_SAMPLER = (1U << 0); diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_haptic.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_haptic.g.cs index 0cd0d7a..0d99b1f 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_haptic.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_haptic.g.cs @@ -347,14 +347,14 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_IsMouseHaptic(); + public static extern SDLBool SDL_IsMouseHaptic(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_Haptic* SDL_OpenHapticFromMouse(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_IsJoystickHaptic(SDL_Joystick* joystick); + public static extern SDLBool SDL_IsJoystickHaptic(SDL_Joystick* joystick); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_Haptic* SDL_OpenHapticFromJoystick(SDL_Joystick* joystick); @@ -377,65 +377,65 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_HapticEffectSupported(SDL_Haptic* haptic, [NativeTypeName("const SDL_HapticEffect *")] SDL_HapticEffect* effect); + public static extern SDLBool SDL_HapticEffectSupported(SDL_Haptic* haptic, [NativeTypeName("const SDL_HapticEffect *")] SDL_HapticEffect* effect); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern int SDL_CreateHapticEffect(SDL_Haptic* haptic, [NativeTypeName("const SDL_HapticEffect *")] SDL_HapticEffect* effect); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_UpdateHapticEffect(SDL_Haptic* haptic, int effect, [NativeTypeName("const SDL_HapticEffect *")] SDL_HapticEffect* data); + public static extern SDLBool SDL_UpdateHapticEffect(SDL_Haptic* haptic, int effect, [NativeTypeName("const SDL_HapticEffect *")] SDL_HapticEffect* data); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_RunHapticEffect(SDL_Haptic* haptic, int effect, [NativeTypeName("Uint32")] uint iterations); + public static extern SDLBool SDL_RunHapticEffect(SDL_Haptic* haptic, int effect, [NativeTypeName("Uint32")] uint iterations); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_StopHapticEffect(SDL_Haptic* haptic, int effect); + public static extern SDLBool SDL_StopHapticEffect(SDL_Haptic* haptic, int effect); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_DestroyHapticEffect(SDL_Haptic* haptic, int effect); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetHapticEffectStatus(SDL_Haptic* haptic, int effect); + public static extern SDLBool SDL_GetHapticEffectStatus(SDL_Haptic* haptic, int effect); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetHapticGain(SDL_Haptic* haptic, int gain); + public static extern SDLBool SDL_SetHapticGain(SDL_Haptic* haptic, int gain); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetHapticAutocenter(SDL_Haptic* haptic, int autocenter); + public static extern SDLBool SDL_SetHapticAutocenter(SDL_Haptic* haptic, int autocenter); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_PauseHaptic(SDL_Haptic* haptic); + public static extern SDLBool SDL_PauseHaptic(SDL_Haptic* haptic); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_ResumeHaptic(SDL_Haptic* haptic); + public static extern SDLBool SDL_ResumeHaptic(SDL_Haptic* haptic); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_StopHapticEffects(SDL_Haptic* haptic); + public static extern SDLBool SDL_StopHapticEffects(SDL_Haptic* haptic); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_HapticRumbleSupported(SDL_Haptic* haptic); + public static extern SDLBool SDL_HapticRumbleSupported(SDL_Haptic* haptic); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_InitHapticRumble(SDL_Haptic* haptic); + public static extern SDLBool SDL_InitHapticRumble(SDL_Haptic* haptic); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_PlayHapticRumble(SDL_Haptic* haptic, float strength, [NativeTypeName("Uint32")] uint length); + public static extern SDLBool SDL_PlayHapticRumble(SDL_Haptic* haptic, float strength, [NativeTypeName("Uint32")] uint length); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_StopHapticRumble(SDL_Haptic* haptic); + public static extern SDLBool SDL_StopHapticRumble(SDL_Haptic* haptic); [NativeTypeName("#define SDL_HAPTIC_CONSTANT (1u<<0)")] public const uint SDL_HAPTIC_CONSTANT = (1U << 0); diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_hidapi.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_hidapi.g.cs index 1f0ad45..31a3b66 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_hidapi.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_hidapi.g.cs @@ -151,6 +151,6 @@ namespace SDL public static extern int SDL_hid_get_report_descriptor(SDL_hid_device* dev, [NativeTypeName("unsigned char *")] byte* buf, [NativeTypeName("size_t")] nuint buf_size); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void SDL_hid_ble_scan([NativeTypeName("bool")] byte active); + public static extern void SDL_hid_ble_scan([NativeTypeName("bool")] SDLBool active); } } diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_hints.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_hints.g.cs index 582fb04..23cb17f 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_hints.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_hints.g.cs @@ -39,15 +39,15 @@ namespace SDL { [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetHintWithPriority([NativeTypeName("const char *")] byte* name, [NativeTypeName("const char *")] byte* value, SDL_HintPriority priority); + public static extern SDLBool SDL_SetHintWithPriority([NativeTypeName("const char *")] byte* name, [NativeTypeName("const char *")] byte* value, SDL_HintPriority priority); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetHint([NativeTypeName("const char *")] byte* name, [NativeTypeName("const char *")] byte* value); + public static extern SDLBool SDL_SetHint([NativeTypeName("const char *")] byte* name, [NativeTypeName("const char *")] byte* value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_ResetHint([NativeTypeName("const char *")] byte* name); + public static extern SDLBool SDL_ResetHint([NativeTypeName("const char *")] byte* name); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_ResetHints(); @@ -58,11 +58,11 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetHintBoolean([NativeTypeName("const char *")] byte* name, [NativeTypeName("bool")] byte default_value); + public static extern SDLBool SDL_GetHintBoolean([NativeTypeName("const char *")] byte* name, [NativeTypeName("bool")] SDLBool default_value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_AddHintCallback([NativeTypeName("const char *")] byte* name, [NativeTypeName("SDL_HintCallback")] delegate* unmanaged[Cdecl] callback, [NativeTypeName("void*")] IntPtr userdata); + public static extern SDLBool SDL_AddHintCallback([NativeTypeName("const char *")] byte* name, [NativeTypeName("SDL_HintCallback")] delegate* unmanaged[Cdecl] callback, [NativeTypeName("void*")] IntPtr userdata); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_RemoveHintCallback([NativeTypeName("const char *")] byte* name, [NativeTypeName("SDL_HintCallback")] delegate* unmanaged[Cdecl] callback, [NativeTypeName("void*")] IntPtr userdata); diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_init.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_init.g.cs index 5f31c69..058bf20 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_init.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_init.g.cs @@ -39,11 +39,11 @@ namespace SDL { [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_Init(SDL_InitFlags flags); + public static extern SDLBool SDL_Init(SDL_InitFlags flags); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_InitSubSystem(SDL_InitFlags flags); + public static extern SDLBool SDL_InitSubSystem(SDL_InitFlags flags); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_QuitSubSystem(SDL_InitFlags flags); @@ -56,11 +56,11 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetAppMetadata([NativeTypeName("const char *")] byte* appname, [NativeTypeName("const char *")] byte* appversion, [NativeTypeName("const char *")] byte* appidentifier); + public static extern SDLBool SDL_SetAppMetadata([NativeTypeName("const char *")] byte* appname, [NativeTypeName("const char *")] byte* appversion, [NativeTypeName("const char *")] byte* appidentifier); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetAppMetadataProperty([NativeTypeName("const char *")] byte* name, [NativeTypeName("const char *")] byte* value); + public static extern SDLBool SDL_SetAppMetadataProperty([NativeTypeName("const char *")] byte* name, [NativeTypeName("const char *")] byte* value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetAppMetadataProperty", ExactSpelling = true)] [return: NativeTypeName("const char *")] diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_iostream.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_iostream.g.cs index c51d8a5..8ac25ca 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_iostream.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_iostream.g.cs @@ -63,10 +63,10 @@ namespace SDL public delegate* unmanaged[Cdecl] write; [NativeTypeName("bool (*)(void *, SDL_IOStatus *)")] - public delegate* unmanaged[Cdecl] flush; + public delegate* unmanaged[Cdecl] flush; [NativeTypeName("bool (*)(void *)")] - public delegate* unmanaged[Cdecl] close; + public delegate* unmanaged[Cdecl] close; } public partial struct SDL_IOStream @@ -92,7 +92,7 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_CloseIO(SDL_IOStream* context); + public static extern SDLBool SDL_CloseIO(SDL_IOStream* context); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_PropertiesID SDL_GetIOProperties(SDL_IOStream* context); @@ -130,11 +130,11 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_FlushIO(SDL_IOStream* context); + public static extern SDLBool SDL_FlushIO(SDL_IOStream* context); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("void*")] - public static extern IntPtr SDL_LoadFile_IO(SDL_IOStream* src, [NativeTypeName("size_t *")] nuint* datasize, [NativeTypeName("bool")] byte closeio); + public static extern IntPtr SDL_LoadFile_IO(SDL_IOStream* src, [NativeTypeName("size_t *")] nuint* datasize, [NativeTypeName("bool")] SDLBool closeio); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("void*")] @@ -142,115 +142,115 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_ReadU8(SDL_IOStream* src, [NativeTypeName("Uint8 *")] byte* value); + public static extern SDLBool SDL_ReadU8(SDL_IOStream* src, [NativeTypeName("Uint8 *")] byte* value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_ReadS8(SDL_IOStream* src, [NativeTypeName("Sint8 *")] sbyte* value); + public static extern SDLBool SDL_ReadS8(SDL_IOStream* src, [NativeTypeName("Sint8 *")] sbyte* value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_ReadU16LE(SDL_IOStream* src, [NativeTypeName("Uint16 *")] ushort* value); + public static extern SDLBool SDL_ReadU16LE(SDL_IOStream* src, [NativeTypeName("Uint16 *")] ushort* value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_ReadS16LE(SDL_IOStream* src, [NativeTypeName("Sint16 *")] short* value); + public static extern SDLBool SDL_ReadS16LE(SDL_IOStream* src, [NativeTypeName("Sint16 *")] short* value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_ReadU16BE(SDL_IOStream* src, [NativeTypeName("Uint16 *")] ushort* value); + public static extern SDLBool SDL_ReadU16BE(SDL_IOStream* src, [NativeTypeName("Uint16 *")] ushort* value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_ReadS16BE(SDL_IOStream* src, [NativeTypeName("Sint16 *")] short* value); + public static extern SDLBool SDL_ReadS16BE(SDL_IOStream* src, [NativeTypeName("Sint16 *")] short* value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_ReadU32LE(SDL_IOStream* src, [NativeTypeName("Uint32 *")] uint* value); + public static extern SDLBool SDL_ReadU32LE(SDL_IOStream* src, [NativeTypeName("Uint32 *")] uint* value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_ReadS32LE(SDL_IOStream* src, [NativeTypeName("Sint32 *")] int* value); + public static extern SDLBool SDL_ReadS32LE(SDL_IOStream* src, [NativeTypeName("Sint32 *")] int* value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_ReadU32BE(SDL_IOStream* src, [NativeTypeName("Uint32 *")] uint* value); + public static extern SDLBool SDL_ReadU32BE(SDL_IOStream* src, [NativeTypeName("Uint32 *")] uint* value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_ReadS32BE(SDL_IOStream* src, [NativeTypeName("Sint32 *")] int* value); + public static extern SDLBool SDL_ReadS32BE(SDL_IOStream* src, [NativeTypeName("Sint32 *")] int* value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_ReadU64LE(SDL_IOStream* src, [NativeTypeName("Uint64 *")] ulong* value); + public static extern SDLBool SDL_ReadU64LE(SDL_IOStream* src, [NativeTypeName("Uint64 *")] ulong* value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_ReadS64LE(SDL_IOStream* src, [NativeTypeName("Sint64 *")] long* value); + public static extern SDLBool SDL_ReadS64LE(SDL_IOStream* src, [NativeTypeName("Sint64 *")] long* value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_ReadU64BE(SDL_IOStream* src, [NativeTypeName("Uint64 *")] ulong* value); + public static extern SDLBool SDL_ReadU64BE(SDL_IOStream* src, [NativeTypeName("Uint64 *")] ulong* value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_ReadS64BE(SDL_IOStream* src, [NativeTypeName("Sint64 *")] long* value); + public static extern SDLBool SDL_ReadS64BE(SDL_IOStream* src, [NativeTypeName("Sint64 *")] long* value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_WriteU8(SDL_IOStream* dst, [NativeTypeName("Uint8")] byte value); + public static extern SDLBool SDL_WriteU8(SDL_IOStream* dst, [NativeTypeName("Uint8")] byte value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_WriteS8(SDL_IOStream* dst, [NativeTypeName("Sint8")] sbyte value); + public static extern SDLBool SDL_WriteS8(SDL_IOStream* dst, [NativeTypeName("Sint8")] sbyte value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_WriteU16LE(SDL_IOStream* dst, [NativeTypeName("Uint16")] ushort value); + public static extern SDLBool SDL_WriteU16LE(SDL_IOStream* dst, [NativeTypeName("Uint16")] ushort value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_WriteS16LE(SDL_IOStream* dst, [NativeTypeName("Sint16")] short value); + public static extern SDLBool SDL_WriteS16LE(SDL_IOStream* dst, [NativeTypeName("Sint16")] short value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_WriteU16BE(SDL_IOStream* dst, [NativeTypeName("Uint16")] ushort value); + public static extern SDLBool SDL_WriteU16BE(SDL_IOStream* dst, [NativeTypeName("Uint16")] ushort value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_WriteS16BE(SDL_IOStream* dst, [NativeTypeName("Sint16")] short value); + public static extern SDLBool SDL_WriteS16BE(SDL_IOStream* dst, [NativeTypeName("Sint16")] short value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_WriteU32LE(SDL_IOStream* dst, [NativeTypeName("Uint32")] uint value); + public static extern SDLBool SDL_WriteU32LE(SDL_IOStream* dst, [NativeTypeName("Uint32")] uint value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_WriteS32LE(SDL_IOStream* dst, [NativeTypeName("Sint32")] int value); + public static extern SDLBool SDL_WriteS32LE(SDL_IOStream* dst, [NativeTypeName("Sint32")] int value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_WriteU32BE(SDL_IOStream* dst, [NativeTypeName("Uint32")] uint value); + public static extern SDLBool SDL_WriteU32BE(SDL_IOStream* dst, [NativeTypeName("Uint32")] uint value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_WriteS32BE(SDL_IOStream* dst, [NativeTypeName("Sint32")] int value); + public static extern SDLBool SDL_WriteS32BE(SDL_IOStream* dst, [NativeTypeName("Sint32")] int value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_WriteU64LE(SDL_IOStream* dst, [NativeTypeName("Uint64")] ulong value); + public static extern SDLBool SDL_WriteU64LE(SDL_IOStream* dst, [NativeTypeName("Uint64")] ulong value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_WriteS64LE(SDL_IOStream* dst, [NativeTypeName("Sint64")] long value); + public static extern SDLBool SDL_WriteS64LE(SDL_IOStream* dst, [NativeTypeName("Sint64")] long value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_WriteU64BE(SDL_IOStream* dst, [NativeTypeName("Uint64")] ulong value); + public static extern SDLBool SDL_WriteU64BE(SDL_IOStream* dst, [NativeTypeName("Uint64")] ulong value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_WriteS64BE(SDL_IOStream* dst, [NativeTypeName("Sint64")] long value); + public static extern SDLBool SDL_WriteS64BE(SDL_IOStream* dst, [NativeTypeName("Sint64")] long value); [NativeTypeName("#define SDL_PROP_IOSTREAM_WINDOWS_HANDLE_POINTER \"SDL.iostream.windows.handle\"")] public static ReadOnlySpan SDL_PROP_IOSTREAM_WINDOWS_HANDLE_POINTER => "SDL.iostream.windows.handle"u8; diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_joystick.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_joystick.g.cs index 3b2b430..e1f2c7b 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_joystick.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_joystick.g.cs @@ -141,19 +141,19 @@ namespace SDL public delegate* unmanaged[Cdecl] SetPlayerIndex; [NativeTypeName("bool (*)(void *, Uint16, Uint16)")] - public delegate* unmanaged[Cdecl] Rumble; + public delegate* unmanaged[Cdecl] Rumble; [NativeTypeName("bool (*)(void *, Uint16, Uint16)")] - public delegate* unmanaged[Cdecl] RumbleTriggers; + public delegate* unmanaged[Cdecl] RumbleTriggers; [NativeTypeName("bool (*)(void *, Uint8, Uint8, Uint8)")] - public delegate* unmanaged[Cdecl] SetLED; + public delegate* unmanaged[Cdecl] SetLED; [NativeTypeName("bool (*)(void *, const void *, int)")] - public delegate* unmanaged[Cdecl] SendEffect; + public delegate* unmanaged[Cdecl] SendEffect; [NativeTypeName("bool (*)(void *, bool)")] - public delegate* unmanaged[Cdecl] SetSensorsEnabled; + public delegate* unmanaged[Cdecl] SetSensorsEnabled; [NativeTypeName("void (*)(void *)")] public delegate* unmanaged[Cdecl] Cleanup; @@ -175,7 +175,7 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_HasJoystick(); + public static extern SDLBool SDL_HasJoystick(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_JoystickID* SDL_GetJoysticks(int* count); @@ -223,35 +223,35 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_DetachVirtualJoystick(SDL_JoystickID instance_id); + public static extern SDLBool SDL_DetachVirtualJoystick(SDL_JoystickID instance_id); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_IsJoystickVirtual(SDL_JoystickID instance_id); + public static extern SDLBool SDL_IsJoystickVirtual(SDL_JoystickID instance_id); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetJoystickVirtualAxis(SDL_Joystick* joystick, int axis, [NativeTypeName("Sint16")] short value); + public static extern SDLBool SDL_SetJoystickVirtualAxis(SDL_Joystick* joystick, int axis, [NativeTypeName("Sint16")] short value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetJoystickVirtualBall(SDL_Joystick* joystick, int ball, [NativeTypeName("Sint16")] short xrel, [NativeTypeName("Sint16")] short yrel); + public static extern SDLBool SDL_SetJoystickVirtualBall(SDL_Joystick* joystick, int ball, [NativeTypeName("Sint16")] short xrel, [NativeTypeName("Sint16")] short yrel); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetJoystickVirtualButton(SDL_Joystick* joystick, int button, [NativeTypeName("bool")] byte down); + public static extern SDLBool SDL_SetJoystickVirtualButton(SDL_Joystick* joystick, int button, [NativeTypeName("bool")] SDLBool down); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetJoystickVirtualHat(SDL_Joystick* joystick, int hat, [NativeTypeName("Uint8")] byte value); + public static extern SDLBool SDL_SetJoystickVirtualHat(SDL_Joystick* joystick, int hat, [NativeTypeName("Uint8")] byte value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetJoystickVirtualTouchpad(SDL_Joystick* joystick, int touchpad, int finger, [NativeTypeName("bool")] byte down, float x, float y, float pressure); + public static extern SDLBool SDL_SetJoystickVirtualTouchpad(SDL_Joystick* joystick, int touchpad, int finger, [NativeTypeName("bool")] SDLBool down, float x, float y, float pressure); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SendJoystickVirtualSensorData(SDL_Joystick* joystick, SDL_SensorType type, [NativeTypeName("Uint64")] ulong sensor_timestamp, [NativeTypeName("const float *")] float* data, int num_values); + public static extern SDLBool SDL_SendJoystickVirtualSensorData(SDL_Joystick* joystick, SDL_SensorType type, [NativeTypeName("Uint64")] ulong sensor_timestamp, [NativeTypeName("const float *")] float* data, int num_values); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_PropertiesID SDL_GetJoystickProperties(SDL_Joystick* joystick); @@ -269,7 +269,7 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetJoystickPlayerIndex(SDL_Joystick* joystick, int player_index); + public static extern SDLBool SDL_SetJoystickPlayerIndex(SDL_Joystick* joystick, int player_index); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_GUID SDL_GetJoystickGUID(SDL_Joystick* joystick); @@ -302,7 +302,7 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_JoystickConnected(SDL_Joystick* joystick); + public static extern SDLBool SDL_JoystickConnected(SDL_Joystick* joystick); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_JoystickID SDL_GetJoystickID(SDL_Joystick* joystick); @@ -320,11 +320,11 @@ namespace SDL public static extern int SDL_GetNumJoystickButtons(SDL_Joystick* joystick); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void SDL_SetJoystickEventsEnabled([NativeTypeName("bool")] byte enabled); + public static extern void SDL_SetJoystickEventsEnabled([NativeTypeName("bool")] SDLBool enabled); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_JoystickEventsEnabled(); + public static extern SDLBool SDL_JoystickEventsEnabled(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_UpdateJoysticks(); @@ -335,11 +335,11 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetJoystickAxisInitialState(SDL_Joystick* joystick, int axis, [NativeTypeName("Sint16 *")] short* state); + public static extern SDLBool SDL_GetJoystickAxisInitialState(SDL_Joystick* joystick, int axis, [NativeTypeName("Sint16 *")] short* state); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetJoystickBall(SDL_Joystick* joystick, int ball, int* dx, int* dy); + public static extern SDLBool SDL_GetJoystickBall(SDL_Joystick* joystick, int ball, int* dx, int* dy); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("Uint8")] @@ -347,23 +347,23 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetJoystickButton(SDL_Joystick* joystick, int button); + public static extern SDLBool SDL_GetJoystickButton(SDL_Joystick* joystick, int button); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_RumbleJoystick(SDL_Joystick* joystick, [NativeTypeName("Uint16")] ushort low_frequency_rumble, [NativeTypeName("Uint16")] ushort high_frequency_rumble, [NativeTypeName("Uint32")] uint duration_ms); + public static extern SDLBool SDL_RumbleJoystick(SDL_Joystick* joystick, [NativeTypeName("Uint16")] ushort low_frequency_rumble, [NativeTypeName("Uint16")] ushort high_frequency_rumble, [NativeTypeName("Uint32")] uint duration_ms); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_RumbleJoystickTriggers(SDL_Joystick* joystick, [NativeTypeName("Uint16")] ushort left_rumble, [NativeTypeName("Uint16")] ushort right_rumble, [NativeTypeName("Uint32")] uint duration_ms); + public static extern SDLBool SDL_RumbleJoystickTriggers(SDL_Joystick* joystick, [NativeTypeName("Uint16")] ushort left_rumble, [NativeTypeName("Uint16")] ushort right_rumble, [NativeTypeName("Uint32")] uint duration_ms); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetJoystickLED(SDL_Joystick* joystick, [NativeTypeName("Uint8")] byte red, [NativeTypeName("Uint8")] byte green, [NativeTypeName("Uint8")] byte blue); + public static extern SDLBool SDL_SetJoystickLED(SDL_Joystick* joystick, [NativeTypeName("Uint8")] byte red, [NativeTypeName("Uint8")] byte green, [NativeTypeName("Uint8")] byte blue); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SendJoystickEffect(SDL_Joystick* joystick, [NativeTypeName("const void *")] IntPtr data, int size); + public static extern SDLBool SDL_SendJoystickEffect(SDL_Joystick* joystick, [NativeTypeName("const void *")] IntPtr data, int size); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_CloseJoystick(SDL_Joystick* joystick); diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_keyboard.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_keyboard.g.cs index 066feb9..f92b67f 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_keyboard.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_keyboard.g.cs @@ -53,7 +53,7 @@ namespace SDL { [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_HasKeyboard(); + public static extern SDLBool SDL_HasKeyboard(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_KeyboardID* SDL_GetKeyboards(int* count); @@ -67,7 +67,7 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("const bool *")] - public static extern bool* SDL_GetKeyboardState(int* numkeys); + public static extern SDLBool* SDL_GetKeyboardState(int* numkeys); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_ResetKeyboard(); @@ -79,14 +79,14 @@ namespace SDL public static extern void SDL_SetModState(SDL_Keymod modstate); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_Keycode SDL_GetKeyFromScancode(SDL_Scancode scancode, SDL_Keymod modstate, [NativeTypeName("bool")] byte key_event); + public static extern SDL_Keycode SDL_GetKeyFromScancode(SDL_Scancode scancode, SDL_Keymod modstate, [NativeTypeName("bool")] SDLBool key_event); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_Scancode SDL_GetScancodeFromKey(SDL_Keycode key, SDL_Keymod* modstate); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetScancodeName(SDL_Scancode scancode, [NativeTypeName("const char *")] byte* name); + public static extern SDLBool SDL_SetScancodeName(SDL_Scancode scancode, [NativeTypeName("const char *")] byte* name); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetScancodeName", ExactSpelling = true)] [return: NativeTypeName("const char *")] @@ -104,39 +104,39 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_StartTextInput(SDL_Window* window); + public static extern SDLBool SDL_StartTextInput(SDL_Window* window); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_StartTextInputWithProperties(SDL_Window* window, SDL_PropertiesID props); + public static extern SDLBool SDL_StartTextInputWithProperties(SDL_Window* window, SDL_PropertiesID props); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_TextInputActive(SDL_Window* window); + public static extern SDLBool SDL_TextInputActive(SDL_Window* window); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_StopTextInput(SDL_Window* window); + public static extern SDLBool SDL_StopTextInput(SDL_Window* window); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_ClearComposition(SDL_Window* window); + public static extern SDLBool SDL_ClearComposition(SDL_Window* window); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetTextInputArea(SDL_Window* window, [NativeTypeName("const SDL_Rect *")] SDL_Rect* rect, int cursor); + public static extern SDLBool SDL_SetTextInputArea(SDL_Window* window, [NativeTypeName("const SDL_Rect *")] SDL_Rect* rect, int cursor); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetTextInputArea(SDL_Window* window, SDL_Rect* rect, int* cursor); + public static extern SDLBool SDL_GetTextInputArea(SDL_Window* window, SDL_Rect* rect, int* cursor); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_HasScreenKeyboardSupport(); + public static extern SDLBool SDL_HasScreenKeyboardSupport(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_ScreenKeyboardShown(SDL_Window* window); + public static extern SDLBool SDL_ScreenKeyboardShown(SDL_Window* window); [NativeTypeName("#define SDL_PROP_TEXTINPUT_TYPE_NUMBER \"SDL.textinput.type\"")] public static ReadOnlySpan SDL_PROP_TEXTINPUT_TYPE_NUMBER => "SDL.textinput.type"u8; diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_log.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_log.g.cs index 80c803a..fe5d1b7 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_log.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_log.g.cs @@ -81,7 +81,7 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetLogPriorityPrefix(SDL_LogPriority priority, [NativeTypeName("const char *")] byte* prefix); + public static extern SDLBool SDL_SetLogPriorityPrefix(SDL_LogPriority priority, [NativeTypeName("const char *")] byte* prefix); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_Log([NativeTypeName("const char *")] byte* fmt, __arglist); diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_main.Windows.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_main.Windows.g.cs index 9e8a2eb..ded252e 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_main.Windows.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_main.Windows.g.cs @@ -34,7 +34,7 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] [SupportedOSPlatform("Windows")] - public static extern byte SDL_RegisterApp([NativeTypeName("const char *")] byte* name, [NativeTypeName("Uint32")] uint style, [NativeTypeName("void*")] IntPtr hInst); + public static extern SDLBool SDL_RegisterApp([NativeTypeName("const char *")] byte* name, [NativeTypeName("Uint32")] uint style, [NativeTypeName("void*")] IntPtr hInst); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [SupportedOSPlatform("Windows")] diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_messagebox.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_messagebox.g.cs index 55229e4..3313d0f 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_messagebox.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_messagebox.g.cs @@ -97,11 +97,11 @@ namespace SDL { [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_ShowMessageBox([NativeTypeName("const SDL_MessageBoxData *")] SDL_MessageBoxData* messageboxdata, int* buttonid); + public static extern SDLBool SDL_ShowMessageBox([NativeTypeName("const SDL_MessageBoxData *")] SDL_MessageBoxData* messageboxdata, int* buttonid); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_ShowSimpleMessageBox(SDL_MessageBoxFlags flags, [NativeTypeName("const char *")] byte* title, [NativeTypeName("const char *")] byte* message, SDL_Window* window); + public static extern SDLBool SDL_ShowSimpleMessageBox(SDL_MessageBoxFlags flags, [NativeTypeName("const char *")] byte* title, [NativeTypeName("const char *")] byte* message, SDL_Window* window); [NativeTypeName("#define SDL_MESSAGEBOX_ERROR 0x00000010u")] public const uint SDL_MESSAGEBOX_ERROR = 0x00000010U; diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_misc.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_misc.g.cs index a8cbeb2..f370ab7 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_misc.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_misc.g.cs @@ -31,6 +31,6 @@ namespace SDL { [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_OpenURL([NativeTypeName("const char *")] byte* url); + public static extern SDLBool SDL_OpenURL([NativeTypeName("const char *")] byte* url); } } diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_mouse.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_mouse.g.cs index 4bf1a43..995ec0d 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_mouse.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_mouse.g.cs @@ -66,7 +66,7 @@ namespace SDL { [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_HasMouse(); + public static extern SDLBool SDL_HasMouse(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_MouseID* SDL_GetMice(int* count); @@ -92,19 +92,19 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_WarpMouseGlobal(float x, float y); + public static extern SDLBool SDL_WarpMouseGlobal(float x, float y); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetWindowRelativeMouseMode(SDL_Window* window, [NativeTypeName("bool")] byte enabled); + public static extern SDLBool SDL_SetWindowRelativeMouseMode(SDL_Window* window, [NativeTypeName("bool")] SDLBool enabled); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetWindowRelativeMouseMode(SDL_Window* window); + public static extern SDLBool SDL_GetWindowRelativeMouseMode(SDL_Window* window); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_CaptureMouse([NativeTypeName("bool")] byte enabled); + public static extern SDLBool SDL_CaptureMouse([NativeTypeName("bool")] SDLBool enabled); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_Cursor* SDL_CreateCursor([NativeTypeName("const Uint8 *")] byte* data, [NativeTypeName("const Uint8 *")] byte* mask, int w, int h, int hot_x, int hot_y); @@ -117,7 +117,7 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetCursor(SDL_Cursor* cursor); + public static extern SDLBool SDL_SetCursor(SDL_Cursor* cursor); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_Cursor* SDL_GetCursor(); @@ -130,15 +130,15 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_ShowCursor(); + public static extern SDLBool SDL_ShowCursor(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_HideCursor(); + public static extern SDLBool SDL_HideCursor(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_CursorVisible(); + public static extern SDLBool SDL_CursorVisible(); [NativeTypeName("#define SDL_BUTTON_LEFT 1")] public const int SDL_BUTTON_LEFT = 1; diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_mutex.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_mutex.g.cs index 6af74fa..355c23e 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_mutex.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_mutex.g.cs @@ -53,7 +53,7 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_TryLockMutex(SDL_Mutex* mutex); + public static extern SDLBool SDL_TryLockMutex(SDL_Mutex* mutex); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_UnlockMutex(SDL_Mutex* mutex); @@ -72,11 +72,11 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_TryLockRWLockForReading(SDL_RWLock* rwlock); + public static extern SDLBool SDL_TryLockRWLockForReading(SDL_RWLock* rwlock); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_TryLockRWLockForWriting(SDL_RWLock* rwlock); + public static extern SDLBool SDL_TryLockRWLockForWriting(SDL_RWLock* rwlock); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_UnlockRWLock(SDL_RWLock* rwlock); @@ -95,11 +95,11 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_TryWaitSemaphore(SDL_Semaphore* sem); + public static extern SDLBool SDL_TryWaitSemaphore(SDL_Semaphore* sem); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_WaitSemaphoreTimeout(SDL_Semaphore* sem, [NativeTypeName("Sint32")] int timeoutMS); + public static extern SDLBool SDL_WaitSemaphoreTimeout(SDL_Semaphore* sem, [NativeTypeName("Sint32")] int timeoutMS); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_SignalSemaphore(SDL_Semaphore* sem); @@ -125,6 +125,6 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_WaitConditionTimeout(SDL_Condition* cond, SDL_Mutex* mutex, [NativeTypeName("Sint32")] int timeoutMS); + public static extern SDLBool SDL_WaitConditionTimeout(SDL_Condition* cond, SDL_Mutex* mutex, [NativeTypeName("Sint32")] int timeoutMS); } } diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_pixels.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_pixels.g.cs index 1dd0792..44faf9b 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_pixels.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_pixels.g.cs @@ -360,7 +360,7 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetMasksForPixelFormat(SDL_PixelFormat format, int* bpp, [NativeTypeName("Uint32 *")] uint* Rmask, [NativeTypeName("Uint32 *")] uint* Gmask, [NativeTypeName("Uint32 *")] uint* Bmask, [NativeTypeName("Uint32 *")] uint* Amask); + public static extern SDLBool SDL_GetMasksForPixelFormat(SDL_PixelFormat format, int* bpp, [NativeTypeName("Uint32 *")] uint* Rmask, [NativeTypeName("Uint32 *")] uint* Gmask, [NativeTypeName("Uint32 *")] uint* Bmask, [NativeTypeName("Uint32 *")] uint* Amask); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_PixelFormat SDL_GetPixelFormatForMasks(int bpp, [NativeTypeName("Uint32")] uint Rmask, [NativeTypeName("Uint32")] uint Gmask, [NativeTypeName("Uint32")] uint Bmask, [NativeTypeName("Uint32")] uint Amask); @@ -374,7 +374,7 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetPaletteColors(SDL_Palette* palette, [NativeTypeName("const SDL_Color *")] SDL_Color* colors, int firstcolor, int ncolors); + public static extern SDLBool SDL_SetPaletteColors(SDL_Palette* palette, [NativeTypeName("const SDL_Color *")] SDL_Color* colors, int firstcolor, int ncolors); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_DestroyPalette(SDL_Palette* palette); diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_process.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_process.g.cs index b9b691d..1d3e3df 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_process.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_process.g.cs @@ -43,7 +43,7 @@ namespace SDL public static unsafe partial class SDL3 { [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_Process* SDL_CreateProcess([NativeTypeName("const char *const *")] byte** args, [NativeTypeName("bool")] byte pipe_stdio); + public static extern SDL_Process* SDL_CreateProcess([NativeTypeName("const char *const *")] byte** args, [NativeTypeName("bool")] SDLBool pipe_stdio); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_Process* SDL_CreateProcessWithProperties(SDL_PropertiesID props); @@ -63,11 +63,11 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_KillProcess(SDL_Process* process, [NativeTypeName("bool")] byte force); + public static extern SDLBool SDL_KillProcess(SDL_Process* process, [NativeTypeName("bool")] SDLBool force); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_WaitProcess(SDL_Process* process, [NativeTypeName("bool")] byte block, int* exitcode); + public static extern SDLBool SDL_WaitProcess(SDL_Process* process, [NativeTypeName("bool")] SDLBool block, int* exitcode); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_DestroyProcess(SDL_Process* process); diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_properties.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_properties.g.cs index 2446c10..dee34c9 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_properties.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_properties.g.cs @@ -48,42 +48,42 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_CopyProperties(SDL_PropertiesID src, SDL_PropertiesID dst); + public static extern SDLBool SDL_CopyProperties(SDL_PropertiesID src, SDL_PropertiesID dst); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_LockProperties(SDL_PropertiesID props); + public static extern SDLBool SDL_LockProperties(SDL_PropertiesID props); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_UnlockProperties(SDL_PropertiesID props); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetPointerPropertyWithCleanup(SDL_PropertiesID props, [NativeTypeName("const char *")] byte* name, [NativeTypeName("void*")] IntPtr value, [NativeTypeName("SDL_CleanupPropertyCallback")] delegate* unmanaged[Cdecl] cleanup, [NativeTypeName("void*")] IntPtr userdata); + public static extern SDLBool SDL_SetPointerPropertyWithCleanup(SDL_PropertiesID props, [NativeTypeName("const char *")] byte* name, [NativeTypeName("void*")] IntPtr value, [NativeTypeName("SDL_CleanupPropertyCallback")] delegate* unmanaged[Cdecl] cleanup, [NativeTypeName("void*")] IntPtr userdata); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetPointerProperty(SDL_PropertiesID props, [NativeTypeName("const char *")] byte* name, [NativeTypeName("void*")] IntPtr value); + public static extern SDLBool SDL_SetPointerProperty(SDL_PropertiesID props, [NativeTypeName("const char *")] byte* name, [NativeTypeName("void*")] IntPtr value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetStringProperty(SDL_PropertiesID props, [NativeTypeName("const char *")] byte* name, [NativeTypeName("const char *")] byte* value); + public static extern SDLBool SDL_SetStringProperty(SDL_PropertiesID props, [NativeTypeName("const char *")] byte* name, [NativeTypeName("const char *")] byte* value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetNumberProperty(SDL_PropertiesID props, [NativeTypeName("const char *")] byte* name, [NativeTypeName("Sint64")] long value); + public static extern SDLBool SDL_SetNumberProperty(SDL_PropertiesID props, [NativeTypeName("const char *")] byte* name, [NativeTypeName("Sint64")] long value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetFloatProperty(SDL_PropertiesID props, [NativeTypeName("const char *")] byte* name, float value); + public static extern SDLBool SDL_SetFloatProperty(SDL_PropertiesID props, [NativeTypeName("const char *")] byte* name, float value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetBooleanProperty(SDL_PropertiesID props, [NativeTypeName("const char *")] byte* name, [NativeTypeName("bool")] byte value); + public static extern SDLBool SDL_SetBooleanProperty(SDL_PropertiesID props, [NativeTypeName("const char *")] byte* name, [NativeTypeName("bool")] SDLBool value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_HasProperty(SDL_PropertiesID props, [NativeTypeName("const char *")] byte* name); + public static extern SDLBool SDL_HasProperty(SDL_PropertiesID props, [NativeTypeName("const char *")] byte* name); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_PropertyType SDL_GetPropertyType(SDL_PropertiesID props, [NativeTypeName("const char *")] byte* name); @@ -105,15 +105,15 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetBooleanProperty(SDL_PropertiesID props, [NativeTypeName("const char *")] byte* name, [NativeTypeName("bool")] byte default_value); + public static extern SDLBool SDL_GetBooleanProperty(SDL_PropertiesID props, [NativeTypeName("const char *")] byte* name, [NativeTypeName("bool")] SDLBool default_value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_ClearProperty(SDL_PropertiesID props, [NativeTypeName("const char *")] byte* name); + public static extern SDLBool SDL_ClearProperty(SDL_PropertiesID props, [NativeTypeName("const char *")] byte* name); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_EnumerateProperties(SDL_PropertiesID props, [NativeTypeName("SDL_EnumeratePropertiesCallback")] delegate* unmanaged[Cdecl] callback, [NativeTypeName("void*")] IntPtr userdata); + public static extern SDLBool SDL_EnumerateProperties(SDL_PropertiesID props, [NativeTypeName("SDL_EnumeratePropertiesCallback")] delegate* unmanaged[Cdecl] callback, [NativeTypeName("void*")] IntPtr userdata); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_DestroyProperties(SDL_PropertiesID props); diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_rect.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_rect.g.cs index 19a3f29..f4db088 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_rect.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_rect.g.cs @@ -73,79 +73,86 @@ namespace SDL frect->h = (float)(rect->h); } - public static bool SDL_PointInRect([NativeTypeName("const SDL_Point *")] SDL_Point* p, [NativeTypeName("const SDL_Rect *")] SDL_Rect* r) + [return: NativeTypeName("bool")] + public static SDLBool SDL_PointInRect([NativeTypeName("const SDL_Point *")] SDL_Point* p, [NativeTypeName("const SDL_Rect *")] SDL_Rect* r) { return ((p) != null && (r) != null && (p->x >= r->x) && (p->x < (r->x + r->w)) && (p->y >= r->y) && (p->y < (r->y + r->h))) ? true : false; } - public static bool SDL_RectEmpty([NativeTypeName("const SDL_Rect *")] SDL_Rect* r) + [return: NativeTypeName("bool")] + public static SDLBool SDL_RectEmpty([NativeTypeName("const SDL_Rect *")] SDL_Rect* r) { return ((r == null) || (r->w <= 0) || (r->h <= 0)) ? true : false; } - public static bool SDL_RectsEqual([NativeTypeName("const SDL_Rect *")] SDL_Rect* a, [NativeTypeName("const SDL_Rect *")] SDL_Rect* b) + [return: NativeTypeName("bool")] + public static SDLBool SDL_RectsEqual([NativeTypeName("const SDL_Rect *")] SDL_Rect* a, [NativeTypeName("const SDL_Rect *")] SDL_Rect* b) { return ((a) != null && (b) != null && (a->x == b->x) && (a->y == b->y) && (a->w == b->w) && (a->h == b->h)) ? true : false; } [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_HasRectIntersection([NativeTypeName("const SDL_Rect *")] SDL_Rect* A, [NativeTypeName("const SDL_Rect *")] SDL_Rect* B); + public static extern SDLBool SDL_HasRectIntersection([NativeTypeName("const SDL_Rect *")] SDL_Rect* A, [NativeTypeName("const SDL_Rect *")] SDL_Rect* B); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetRectIntersection([NativeTypeName("const SDL_Rect *")] SDL_Rect* A, [NativeTypeName("const SDL_Rect *")] SDL_Rect* B, SDL_Rect* result); + public static extern SDLBool SDL_GetRectIntersection([NativeTypeName("const SDL_Rect *")] SDL_Rect* A, [NativeTypeName("const SDL_Rect *")] SDL_Rect* B, SDL_Rect* result); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetRectUnion([NativeTypeName("const SDL_Rect *")] SDL_Rect* A, [NativeTypeName("const SDL_Rect *")] SDL_Rect* B, SDL_Rect* result); + public static extern SDLBool SDL_GetRectUnion([NativeTypeName("const SDL_Rect *")] SDL_Rect* A, [NativeTypeName("const SDL_Rect *")] SDL_Rect* B, SDL_Rect* result); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetRectEnclosingPoints([NativeTypeName("const SDL_Point *")] SDL_Point* points, int count, [NativeTypeName("const SDL_Rect *")] SDL_Rect* clip, SDL_Rect* result); + public static extern SDLBool SDL_GetRectEnclosingPoints([NativeTypeName("const SDL_Point *")] SDL_Point* points, int count, [NativeTypeName("const SDL_Rect *")] SDL_Rect* clip, SDL_Rect* result); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetRectAndLineIntersection([NativeTypeName("const SDL_Rect *")] SDL_Rect* rect, int* X1, int* Y1, int* X2, int* Y2); + public static extern SDLBool SDL_GetRectAndLineIntersection([NativeTypeName("const SDL_Rect *")] SDL_Rect* rect, int* X1, int* Y1, int* X2, int* Y2); - public static bool SDL_PointInRectFloat([NativeTypeName("const SDL_FPoint *")] SDL_FPoint* p, [NativeTypeName("const SDL_FRect *")] SDL_FRect* r) + [return: NativeTypeName("bool")] + public static SDLBool SDL_PointInRectFloat([NativeTypeName("const SDL_FPoint *")] SDL_FPoint* p, [NativeTypeName("const SDL_FRect *")] SDL_FRect* r) { return ((p) != null && (r) != null && (p->x >= r->x) && (p->x <= (r->x + r->w)) && (p->y >= r->y) && (p->y <= (r->y + r->h))) ? true : false; } - public static bool SDL_RectEmptyFloat([NativeTypeName("const SDL_FRect *")] SDL_FRect* r) + [return: NativeTypeName("bool")] + public static SDLBool SDL_RectEmptyFloat([NativeTypeName("const SDL_FRect *")] SDL_FRect* r) { return ((r == null) || (r->w < 0.0f) || (r->h < 0.0f)) ? true : false; } - public static bool SDL_RectsEqualEpsilon([NativeTypeName("const SDL_FRect *")] SDL_FRect* a, [NativeTypeName("const SDL_FRect *")] SDL_FRect* b, [NativeTypeName("const float")] float epsilon) + [return: NativeTypeName("bool")] + public static SDLBool SDL_RectsEqualEpsilon([NativeTypeName("const SDL_FRect *")] SDL_FRect* a, [NativeTypeName("const SDL_FRect *")] SDL_FRect* b, [NativeTypeName("const float")] float epsilon) { return ((a) != null && (b) != null && ((a == b) || ((SDL_fabsf(a->x - b->x) <= epsilon) && (SDL_fabsf(a->y - b->y) <= epsilon) && (SDL_fabsf(a->w - b->w) <= epsilon) && (SDL_fabsf(a->h - b->h) <= epsilon)))) ? true : false; } - public static bool SDL_RectsEqualFloat([NativeTypeName("const SDL_FRect *")] SDL_FRect* a, [NativeTypeName("const SDL_FRect *")] SDL_FRect* b) + [return: NativeTypeName("bool")] + public static SDLBool SDL_RectsEqualFloat([NativeTypeName("const SDL_FRect *")] SDL_FRect* a, [NativeTypeName("const SDL_FRect *")] SDL_FRect* b) { return SDL_RectsEqualEpsilon(a, b, 1.1920928955078125e-07F); } [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_HasRectIntersectionFloat([NativeTypeName("const SDL_FRect *")] SDL_FRect* A, [NativeTypeName("const SDL_FRect *")] SDL_FRect* B); + public static extern SDLBool SDL_HasRectIntersectionFloat([NativeTypeName("const SDL_FRect *")] SDL_FRect* A, [NativeTypeName("const SDL_FRect *")] SDL_FRect* B); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetRectIntersectionFloat([NativeTypeName("const SDL_FRect *")] SDL_FRect* A, [NativeTypeName("const SDL_FRect *")] SDL_FRect* B, SDL_FRect* result); + public static extern SDLBool SDL_GetRectIntersectionFloat([NativeTypeName("const SDL_FRect *")] SDL_FRect* A, [NativeTypeName("const SDL_FRect *")] SDL_FRect* B, SDL_FRect* result); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetRectUnionFloat([NativeTypeName("const SDL_FRect *")] SDL_FRect* A, [NativeTypeName("const SDL_FRect *")] SDL_FRect* B, SDL_FRect* result); + public static extern SDLBool SDL_GetRectUnionFloat([NativeTypeName("const SDL_FRect *")] SDL_FRect* A, [NativeTypeName("const SDL_FRect *")] SDL_FRect* B, SDL_FRect* result); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetRectEnclosingPointsFloat([NativeTypeName("const SDL_FPoint *")] SDL_FPoint* points, int count, [NativeTypeName("const SDL_FRect *")] SDL_FRect* clip, SDL_FRect* result); + public static extern SDLBool SDL_GetRectEnclosingPointsFloat([NativeTypeName("const SDL_FPoint *")] SDL_FPoint* points, int count, [NativeTypeName("const SDL_FRect *")] SDL_FRect* clip, SDL_FRect* result); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetRectAndLineIntersectionFloat([NativeTypeName("const SDL_FRect *")] SDL_FRect* rect, float* X1, float* Y1, float* X2, float* Y2); + public static extern SDLBool SDL_GetRectAndLineIntersectionFloat([NativeTypeName("const SDL_FRect *")] SDL_FRect* rect, float* X1, float* Y1, float* X2, float* Y2); } } diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_render.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_render.g.cs index 1019086..de381da 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_render.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_render.g.cs @@ -72,7 +72,7 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_CreateWindowAndRenderer([NativeTypeName("const char *")] byte* title, int width, int height, SDL_WindowFlags window_flags, SDL_Window** window, SDL_Renderer** renderer); + public static extern SDLBool SDL_CreateWindowAndRenderer([NativeTypeName("const char *")] byte* title, int width, int height, SDL_WindowFlags window_flags, SDL_Window** window, SDL_Renderer** renderer); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_Renderer* SDL_CreateRenderer(SDL_Window* window, [NativeTypeName("const char *")] byte* name); @@ -98,11 +98,11 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetRenderOutputSize(SDL_Renderer* renderer, int* w, int* h); + public static extern SDLBool SDL_GetRenderOutputSize(SDL_Renderer* renderer, int* w, int* h); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetCurrentRenderOutputSize(SDL_Renderer* renderer, int* w, int* h); + public static extern SDLBool SDL_GetCurrentRenderOutputSize(SDL_Renderer* renderer, int* w, int* h); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_Texture* SDL_CreateTexture(SDL_Renderer* renderer, SDL_PixelFormat format, SDL_TextureAccess access, int w, int h); @@ -121,244 +121,244 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetTextureSize(SDL_Texture* texture, float* w, float* h); + public static extern SDLBool SDL_GetTextureSize(SDL_Texture* texture, float* w, float* h); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetTextureColorMod(SDL_Texture* texture, [NativeTypeName("Uint8")] byte r, [NativeTypeName("Uint8")] byte g, [NativeTypeName("Uint8")] byte b); + public static extern SDLBool SDL_SetTextureColorMod(SDL_Texture* texture, [NativeTypeName("Uint8")] byte r, [NativeTypeName("Uint8")] byte g, [NativeTypeName("Uint8")] byte b); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetTextureColorModFloat(SDL_Texture* texture, float r, float g, float b); + public static extern SDLBool SDL_SetTextureColorModFloat(SDL_Texture* texture, float r, float g, float b); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetTextureColorMod(SDL_Texture* texture, [NativeTypeName("Uint8 *")] byte* r, [NativeTypeName("Uint8 *")] byte* g, [NativeTypeName("Uint8 *")] byte* b); + public static extern SDLBool SDL_GetTextureColorMod(SDL_Texture* texture, [NativeTypeName("Uint8 *")] byte* r, [NativeTypeName("Uint8 *")] byte* g, [NativeTypeName("Uint8 *")] byte* b); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetTextureColorModFloat(SDL_Texture* texture, float* r, float* g, float* b); + public static extern SDLBool SDL_GetTextureColorModFloat(SDL_Texture* texture, float* r, float* g, float* b); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetTextureAlphaMod(SDL_Texture* texture, [NativeTypeName("Uint8")] byte alpha); + public static extern SDLBool SDL_SetTextureAlphaMod(SDL_Texture* texture, [NativeTypeName("Uint8")] byte alpha); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetTextureAlphaModFloat(SDL_Texture* texture, float alpha); + public static extern SDLBool SDL_SetTextureAlphaModFloat(SDL_Texture* texture, float alpha); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetTextureAlphaMod(SDL_Texture* texture, [NativeTypeName("Uint8 *")] byte* alpha); + public static extern SDLBool SDL_GetTextureAlphaMod(SDL_Texture* texture, [NativeTypeName("Uint8 *")] byte* alpha); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetTextureAlphaModFloat(SDL_Texture* texture, float* alpha); + public static extern SDLBool SDL_GetTextureAlphaModFloat(SDL_Texture* texture, float* alpha); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetTextureBlendMode(SDL_Texture* texture, SDL_BlendMode blendMode); + public static extern SDLBool SDL_SetTextureBlendMode(SDL_Texture* texture, SDL_BlendMode blendMode); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetTextureBlendMode(SDL_Texture* texture, SDL_BlendMode* blendMode); + public static extern SDLBool SDL_GetTextureBlendMode(SDL_Texture* texture, SDL_BlendMode* blendMode); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetTextureScaleMode(SDL_Texture* texture, SDL_ScaleMode scaleMode); + public static extern SDLBool SDL_SetTextureScaleMode(SDL_Texture* texture, SDL_ScaleMode scaleMode); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetTextureScaleMode(SDL_Texture* texture, SDL_ScaleMode* scaleMode); + public static extern SDLBool SDL_GetTextureScaleMode(SDL_Texture* texture, SDL_ScaleMode* scaleMode); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_UpdateTexture(SDL_Texture* texture, [NativeTypeName("const SDL_Rect *")] SDL_Rect* rect, [NativeTypeName("const void *")] IntPtr pixels, int pitch); + public static extern SDLBool SDL_UpdateTexture(SDL_Texture* texture, [NativeTypeName("const SDL_Rect *")] SDL_Rect* rect, [NativeTypeName("const void *")] IntPtr pixels, int pitch); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_UpdateYUVTexture(SDL_Texture* texture, [NativeTypeName("const SDL_Rect *")] SDL_Rect* rect, [NativeTypeName("const Uint8 *")] byte* Yplane, int Ypitch, [NativeTypeName("const Uint8 *")] byte* Uplane, int Upitch, [NativeTypeName("const Uint8 *")] byte* Vplane, int Vpitch); + public static extern SDLBool SDL_UpdateYUVTexture(SDL_Texture* texture, [NativeTypeName("const SDL_Rect *")] SDL_Rect* rect, [NativeTypeName("const Uint8 *")] byte* Yplane, int Ypitch, [NativeTypeName("const Uint8 *")] byte* Uplane, int Upitch, [NativeTypeName("const Uint8 *")] byte* Vplane, int Vpitch); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_UpdateNVTexture(SDL_Texture* texture, [NativeTypeName("const SDL_Rect *")] SDL_Rect* rect, [NativeTypeName("const Uint8 *")] byte* Yplane, int Ypitch, [NativeTypeName("const Uint8 *")] byte* UVplane, int UVpitch); + public static extern SDLBool SDL_UpdateNVTexture(SDL_Texture* texture, [NativeTypeName("const SDL_Rect *")] SDL_Rect* rect, [NativeTypeName("const Uint8 *")] byte* Yplane, int Ypitch, [NativeTypeName("const Uint8 *")] byte* UVplane, int UVpitch); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_LockTexture(SDL_Texture* texture, [NativeTypeName("const SDL_Rect *")] SDL_Rect* rect, [NativeTypeName("void **")] IntPtr* pixels, int* pitch); + public static extern SDLBool SDL_LockTexture(SDL_Texture* texture, [NativeTypeName("const SDL_Rect *")] SDL_Rect* rect, [NativeTypeName("void **")] IntPtr* pixels, int* pitch); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_LockTextureToSurface(SDL_Texture* texture, [NativeTypeName("const SDL_Rect *")] SDL_Rect* rect, SDL_Surface** surface); + public static extern SDLBool SDL_LockTextureToSurface(SDL_Texture* texture, [NativeTypeName("const SDL_Rect *")] SDL_Rect* rect, SDL_Surface** surface); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_UnlockTexture(SDL_Texture* texture); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetRenderTarget(SDL_Renderer* renderer, SDL_Texture* texture); + public static extern SDLBool SDL_SetRenderTarget(SDL_Renderer* renderer, SDL_Texture* texture); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_Texture* SDL_GetRenderTarget(SDL_Renderer* renderer); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetRenderLogicalPresentation(SDL_Renderer* renderer, int w, int h, SDL_RendererLogicalPresentation mode, SDL_ScaleMode scale_mode); + public static extern SDLBool SDL_SetRenderLogicalPresentation(SDL_Renderer* renderer, int w, int h, SDL_RendererLogicalPresentation mode, SDL_ScaleMode scale_mode); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetRenderLogicalPresentation(SDL_Renderer* renderer, int* w, int* h, SDL_RendererLogicalPresentation* mode, SDL_ScaleMode* scale_mode); + public static extern SDLBool SDL_GetRenderLogicalPresentation(SDL_Renderer* renderer, int* w, int* h, SDL_RendererLogicalPresentation* mode, SDL_ScaleMode* scale_mode); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetRenderLogicalPresentationRect(SDL_Renderer* renderer, SDL_FRect* rect); + public static extern SDLBool SDL_GetRenderLogicalPresentationRect(SDL_Renderer* renderer, SDL_FRect* rect); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_RenderCoordinatesFromWindow(SDL_Renderer* renderer, float window_x, float window_y, float* x, float* y); + public static extern SDLBool SDL_RenderCoordinatesFromWindow(SDL_Renderer* renderer, float window_x, float window_y, float* x, float* y); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_RenderCoordinatesToWindow(SDL_Renderer* renderer, float x, float y, float* window_x, float* window_y); + public static extern SDLBool SDL_RenderCoordinatesToWindow(SDL_Renderer* renderer, float x, float y, float* window_x, float* window_y); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_ConvertEventToRenderCoordinates(SDL_Renderer* renderer, SDL_Event* @event); + public static extern SDLBool SDL_ConvertEventToRenderCoordinates(SDL_Renderer* renderer, SDL_Event* @event); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetRenderViewport(SDL_Renderer* renderer, [NativeTypeName("const SDL_Rect *")] SDL_Rect* rect); + public static extern SDLBool SDL_SetRenderViewport(SDL_Renderer* renderer, [NativeTypeName("const SDL_Rect *")] SDL_Rect* rect); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetRenderViewport(SDL_Renderer* renderer, SDL_Rect* rect); + public static extern SDLBool SDL_GetRenderViewport(SDL_Renderer* renderer, SDL_Rect* rect); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_RenderViewportSet(SDL_Renderer* renderer); + public static extern SDLBool SDL_RenderViewportSet(SDL_Renderer* renderer); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetRenderSafeArea(SDL_Renderer* renderer, SDL_Rect* rect); + public static extern SDLBool SDL_GetRenderSafeArea(SDL_Renderer* renderer, SDL_Rect* rect); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetRenderClipRect(SDL_Renderer* renderer, [NativeTypeName("const SDL_Rect *")] SDL_Rect* rect); + public static extern SDLBool SDL_SetRenderClipRect(SDL_Renderer* renderer, [NativeTypeName("const SDL_Rect *")] SDL_Rect* rect); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetRenderClipRect(SDL_Renderer* renderer, SDL_Rect* rect); + public static extern SDLBool SDL_GetRenderClipRect(SDL_Renderer* renderer, SDL_Rect* rect); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_RenderClipEnabled(SDL_Renderer* renderer); + public static extern SDLBool SDL_RenderClipEnabled(SDL_Renderer* renderer); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetRenderScale(SDL_Renderer* renderer, float scaleX, float scaleY); + public static extern SDLBool SDL_SetRenderScale(SDL_Renderer* renderer, float scaleX, float scaleY); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetRenderScale(SDL_Renderer* renderer, float* scaleX, float* scaleY); + public static extern SDLBool SDL_GetRenderScale(SDL_Renderer* renderer, float* scaleX, float* scaleY); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetRenderDrawColor(SDL_Renderer* renderer, [NativeTypeName("Uint8")] byte r, [NativeTypeName("Uint8")] byte g, [NativeTypeName("Uint8")] byte b, [NativeTypeName("Uint8")] byte a); + public static extern SDLBool SDL_SetRenderDrawColor(SDL_Renderer* renderer, [NativeTypeName("Uint8")] byte r, [NativeTypeName("Uint8")] byte g, [NativeTypeName("Uint8")] byte b, [NativeTypeName("Uint8")] byte a); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetRenderDrawColorFloat(SDL_Renderer* renderer, float r, float g, float b, float a); + public static extern SDLBool SDL_SetRenderDrawColorFloat(SDL_Renderer* renderer, float r, float g, float b, float a); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetRenderDrawColor(SDL_Renderer* renderer, [NativeTypeName("Uint8 *")] byte* r, [NativeTypeName("Uint8 *")] byte* g, [NativeTypeName("Uint8 *")] byte* b, [NativeTypeName("Uint8 *")] byte* a); + public static extern SDLBool SDL_GetRenderDrawColor(SDL_Renderer* renderer, [NativeTypeName("Uint8 *")] byte* r, [NativeTypeName("Uint8 *")] byte* g, [NativeTypeName("Uint8 *")] byte* b, [NativeTypeName("Uint8 *")] byte* a); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetRenderDrawColorFloat(SDL_Renderer* renderer, float* r, float* g, float* b, float* a); + public static extern SDLBool SDL_GetRenderDrawColorFloat(SDL_Renderer* renderer, float* r, float* g, float* b, float* a); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetRenderColorScale(SDL_Renderer* renderer, float scale); + public static extern SDLBool SDL_SetRenderColorScale(SDL_Renderer* renderer, float scale); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetRenderColorScale(SDL_Renderer* renderer, float* scale); + public static extern SDLBool SDL_GetRenderColorScale(SDL_Renderer* renderer, float* scale); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetRenderDrawBlendMode(SDL_Renderer* renderer, SDL_BlendMode blendMode); + public static extern SDLBool SDL_SetRenderDrawBlendMode(SDL_Renderer* renderer, SDL_BlendMode blendMode); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetRenderDrawBlendMode(SDL_Renderer* renderer, SDL_BlendMode* blendMode); + public static extern SDLBool SDL_GetRenderDrawBlendMode(SDL_Renderer* renderer, SDL_BlendMode* blendMode); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_RenderClear(SDL_Renderer* renderer); + public static extern SDLBool SDL_RenderClear(SDL_Renderer* renderer); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_RenderPoint(SDL_Renderer* renderer, float x, float y); + public static extern SDLBool SDL_RenderPoint(SDL_Renderer* renderer, float x, float y); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_RenderPoints(SDL_Renderer* renderer, [NativeTypeName("const SDL_FPoint *")] SDL_FPoint* points, int count); + public static extern SDLBool SDL_RenderPoints(SDL_Renderer* renderer, [NativeTypeName("const SDL_FPoint *")] SDL_FPoint* points, int count); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_RenderLine(SDL_Renderer* renderer, float x1, float y1, float x2, float y2); + public static extern SDLBool SDL_RenderLine(SDL_Renderer* renderer, float x1, float y1, float x2, float y2); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_RenderLines(SDL_Renderer* renderer, [NativeTypeName("const SDL_FPoint *")] SDL_FPoint* points, int count); + public static extern SDLBool SDL_RenderLines(SDL_Renderer* renderer, [NativeTypeName("const SDL_FPoint *")] SDL_FPoint* points, int count); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_RenderRect(SDL_Renderer* renderer, [NativeTypeName("const SDL_FRect *")] SDL_FRect* rect); + public static extern SDLBool SDL_RenderRect(SDL_Renderer* renderer, [NativeTypeName("const SDL_FRect *")] SDL_FRect* rect); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_RenderRects(SDL_Renderer* renderer, [NativeTypeName("const SDL_FRect *")] SDL_FRect* rects, int count); + public static extern SDLBool SDL_RenderRects(SDL_Renderer* renderer, [NativeTypeName("const SDL_FRect *")] SDL_FRect* rects, int count); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_RenderFillRect(SDL_Renderer* renderer, [NativeTypeName("const SDL_FRect *")] SDL_FRect* rect); + public static extern SDLBool SDL_RenderFillRect(SDL_Renderer* renderer, [NativeTypeName("const SDL_FRect *")] SDL_FRect* rect); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_RenderFillRects(SDL_Renderer* renderer, [NativeTypeName("const SDL_FRect *")] SDL_FRect* rects, int count); + public static extern SDLBool SDL_RenderFillRects(SDL_Renderer* renderer, [NativeTypeName("const SDL_FRect *")] SDL_FRect* rects, int count); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_RenderTexture(SDL_Renderer* renderer, SDL_Texture* texture, [NativeTypeName("const SDL_FRect *")] SDL_FRect* srcrect, [NativeTypeName("const SDL_FRect *")] SDL_FRect* dstrect); + public static extern SDLBool SDL_RenderTexture(SDL_Renderer* renderer, SDL_Texture* texture, [NativeTypeName("const SDL_FRect *")] SDL_FRect* srcrect, [NativeTypeName("const SDL_FRect *")] SDL_FRect* dstrect); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_RenderTextureRotated(SDL_Renderer* renderer, SDL_Texture* texture, [NativeTypeName("const SDL_FRect *")] SDL_FRect* srcrect, [NativeTypeName("const SDL_FRect *")] SDL_FRect* dstrect, [NativeTypeName("const double")] double angle, [NativeTypeName("const SDL_FPoint *")] SDL_FPoint* center, [NativeTypeName("const SDL_FlipMode")] SDL_FlipMode flip); + public static extern SDLBool SDL_RenderTextureRotated(SDL_Renderer* renderer, SDL_Texture* texture, [NativeTypeName("const SDL_FRect *")] SDL_FRect* srcrect, [NativeTypeName("const SDL_FRect *")] SDL_FRect* dstrect, [NativeTypeName("const double")] double angle, [NativeTypeName("const SDL_FPoint *")] SDL_FPoint* center, [NativeTypeName("const SDL_FlipMode")] SDL_FlipMode flip); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_RenderTextureTiled(SDL_Renderer* renderer, SDL_Texture* texture, [NativeTypeName("const SDL_FRect *")] SDL_FRect* srcrect, float scale, [NativeTypeName("const SDL_FRect *")] SDL_FRect* dstrect); + public static extern SDLBool SDL_RenderTextureTiled(SDL_Renderer* renderer, SDL_Texture* texture, [NativeTypeName("const SDL_FRect *")] SDL_FRect* srcrect, float scale, [NativeTypeName("const SDL_FRect *")] SDL_FRect* dstrect); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_RenderTexture9Grid(SDL_Renderer* renderer, SDL_Texture* texture, [NativeTypeName("const SDL_FRect *")] SDL_FRect* srcrect, float left_width, float right_width, float top_height, float bottom_height, float scale, [NativeTypeName("const SDL_FRect *")] SDL_FRect* dstrect); + public static extern SDLBool SDL_RenderTexture9Grid(SDL_Renderer* renderer, SDL_Texture* texture, [NativeTypeName("const SDL_FRect *")] SDL_FRect* srcrect, float left_width, float right_width, float top_height, float bottom_height, float scale, [NativeTypeName("const SDL_FRect *")] SDL_FRect* dstrect); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_RenderGeometry(SDL_Renderer* renderer, SDL_Texture* texture, [NativeTypeName("const SDL_Vertex *")] SDL_Vertex* vertices, int num_vertices, [NativeTypeName("const int *")] int* indices, int num_indices); + public static extern SDLBool SDL_RenderGeometry(SDL_Renderer* renderer, SDL_Texture* texture, [NativeTypeName("const SDL_Vertex *")] SDL_Vertex* vertices, int num_vertices, [NativeTypeName("const int *")] int* indices, int num_indices); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_RenderGeometryRaw(SDL_Renderer* renderer, SDL_Texture* texture, [NativeTypeName("const float *")] float* xy, int xy_stride, [NativeTypeName("const SDL_FColor *")] SDL_FColor* color, int color_stride, [NativeTypeName("const float *")] float* uv, int uv_stride, int num_vertices, [NativeTypeName("const void *")] IntPtr indices, int num_indices, int size_indices); + public static extern SDLBool SDL_RenderGeometryRaw(SDL_Renderer* renderer, SDL_Texture* texture, [NativeTypeName("const float *")] float* xy, int xy_stride, [NativeTypeName("const SDL_FColor *")] SDL_FColor* color, int color_stride, [NativeTypeName("const float *")] float* uv, int uv_stride, int num_vertices, [NativeTypeName("const void *")] IntPtr indices, int num_indices, int size_indices); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_Surface* SDL_RenderReadPixels(SDL_Renderer* renderer, [NativeTypeName("const SDL_Rect *")] SDL_Rect* rect); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_RenderPresent(SDL_Renderer* renderer); + public static extern SDLBool SDL_RenderPresent(SDL_Renderer* renderer); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_DestroyTexture(SDL_Texture* texture); @@ -368,7 +368,7 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_FlushRenderer(SDL_Renderer* renderer); + public static extern SDLBool SDL_FlushRenderer(SDL_Renderer* renderer); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("void*")] @@ -380,15 +380,15 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_AddVulkanRenderSemaphores(SDL_Renderer* renderer, [NativeTypeName("Uint32")] uint wait_stage_mask, [NativeTypeName("Sint64")] long wait_semaphore, [NativeTypeName("Sint64")] long signal_semaphore); + public static extern SDLBool SDL_AddVulkanRenderSemaphores(SDL_Renderer* renderer, [NativeTypeName("Uint32")] uint wait_stage_mask, [NativeTypeName("Sint64")] long wait_semaphore, [NativeTypeName("Sint64")] long signal_semaphore); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetRenderVSync(SDL_Renderer* renderer, int vsync); + public static extern SDLBool SDL_SetRenderVSync(SDL_Renderer* renderer, int vsync); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetRenderVSync(SDL_Renderer* renderer, int* vsync); + public static extern SDLBool SDL_GetRenderVSync(SDL_Renderer* renderer, int* vsync); [NativeTypeName("#define SDL_SOFTWARE_RENDERER \"software\"")] public static ReadOnlySpan SDL_SOFTWARE_RENDERER => "software"u8; diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_sensor.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_sensor.g.cs index 93d0d58..a761cab 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_sensor.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_sensor.g.cs @@ -82,7 +82,7 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetSensorData(SDL_Sensor* sensor, float* data, int num_values); + public static extern SDLBool SDL_GetSensorData(SDL_Sensor* sensor, float* data, int num_values); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_CloseSensor(SDL_Sensor* sensor); diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_stdinc.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_stdinc.g.cs index 6536b44..ce169ba 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_stdinc.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_stdinc.g.cs @@ -75,7 +75,7 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetMemoryFunctions([NativeTypeName("SDL_malloc_func")] delegate* unmanaged[Cdecl] malloc_func, [NativeTypeName("SDL_calloc_func")] delegate* unmanaged[Cdecl] calloc_func, [NativeTypeName("SDL_realloc_func")] delegate* unmanaged[Cdecl] realloc_func, [NativeTypeName("SDL_free_func")] delegate* unmanaged[Cdecl] free_func); + public static extern SDLBool SDL_SetMemoryFunctions([NativeTypeName("SDL_malloc_func")] delegate* unmanaged[Cdecl] malloc_func, [NativeTypeName("SDL_calloc_func")] delegate* unmanaged[Cdecl] calloc_func, [NativeTypeName("SDL_realloc_func")] delegate* unmanaged[Cdecl] realloc_func, [NativeTypeName("SDL_free_func")] delegate* unmanaged[Cdecl] free_func); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("void*")] @@ -91,7 +91,7 @@ namespace SDL public static extern SDL_Environment* SDL_GetEnvironment(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_Environment* SDL_CreateEnvironment([NativeTypeName("bool")] byte populated); + public static extern SDL_Environment* SDL_CreateEnvironment([NativeTypeName("bool")] SDLBool populated); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetEnvironmentVariable", ExactSpelling = true)] [return: NativeTypeName("const char *")] @@ -103,11 +103,11 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetEnvironmentVariable(SDL_Environment* env, [NativeTypeName("const char *")] byte* name, [NativeTypeName("const char *")] byte* value, [NativeTypeName("bool")] byte overwrite); + public static extern SDLBool SDL_SetEnvironmentVariable(SDL_Environment* env, [NativeTypeName("const char *")] byte* name, [NativeTypeName("const char *")] byte* value, [NativeTypeName("bool")] SDLBool overwrite); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_UnsetEnvironmentVariable(SDL_Environment* env, [NativeTypeName("const char *")] byte* name); + public static extern SDLBool SDL_UnsetEnvironmentVariable(SDL_Environment* env, [NativeTypeName("const char *")] byte* name); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_DestroyEnvironment(SDL_Environment* env); @@ -611,7 +611,8 @@ namespace SDL [return: NativeTypeName("char *")] public static extern byte* Unsafe_SDL_iconv_string([NativeTypeName("const char *")] byte* tocode, [NativeTypeName("const char *")] byte* fromcode, [NativeTypeName("const char *")] byte* inbuf, [NativeTypeName("size_t")] nuint inbytesleft); - public static bool SDL_size_mul_check_overflow([NativeTypeName("size_t")] nuint a, [NativeTypeName("size_t")] nuint b, [NativeTypeName("size_t *")] nuint* ret) + [return: NativeTypeName("bool")] + public static SDLBool SDL_size_mul_check_overflow([NativeTypeName("size_t")] nuint a, [NativeTypeName("size_t")] nuint b, [NativeTypeName("size_t *")] nuint* ret) { if (a != 0 && b > 0xffffffffffffffffUL / a) { @@ -622,7 +623,8 @@ namespace SDL return true; } - public static bool SDL_size_add_check_overflow([NativeTypeName("size_t")] nuint a, [NativeTypeName("size_t")] nuint b, [NativeTypeName("size_t *")] nuint* ret) + [return: NativeTypeName("bool")] + public static SDLBool SDL_size_add_check_overflow([NativeTypeName("size_t")] nuint a, [NativeTypeName("size_t")] nuint b, [NativeTypeName("size_t *")] nuint* ret) { if (b > 0xffffffffffffffffUL - a) { diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_storage.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_storage.g.cs index 725e7fa..6013cb0 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_storage.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_storage.g.cs @@ -34,34 +34,34 @@ namespace SDL public uint version; [NativeTypeName("bool (*)(void *)")] - public delegate* unmanaged[Cdecl] close; + public delegate* unmanaged[Cdecl] close; [NativeTypeName("bool (*)(void *)")] - public delegate* unmanaged[Cdecl] ready; + public delegate* unmanaged[Cdecl] ready; [NativeTypeName("bool (*)(void *, const char *, SDL_EnumerateDirectoryCallback, void *)")] - public delegate* unmanaged[Cdecl], IntPtr, byte> enumerate; + public delegate* unmanaged[Cdecl], IntPtr, SDLBool> enumerate; [NativeTypeName("bool (*)(void *, const char *, SDL_PathInfo *)")] - public delegate* unmanaged[Cdecl] info; + public delegate* unmanaged[Cdecl] info; [NativeTypeName("bool (*)(void *, const char *, void *, Uint64)")] - public delegate* unmanaged[Cdecl] read_file; + public delegate* unmanaged[Cdecl] read_file; [NativeTypeName("bool (*)(void *, const char *, const void *, Uint64)")] - public delegate* unmanaged[Cdecl] write_file; + public delegate* unmanaged[Cdecl] write_file; [NativeTypeName("bool (*)(void *, const char *)")] - public delegate* unmanaged[Cdecl] mkdir; + public delegate* unmanaged[Cdecl] mkdir; [NativeTypeName("bool (*)(void *, const char *)")] - public delegate* unmanaged[Cdecl] remove; + public delegate* unmanaged[Cdecl] remove; [NativeTypeName("bool (*)(void *, const char *, const char *)")] - public delegate* unmanaged[Cdecl] rename; + public delegate* unmanaged[Cdecl] rename; [NativeTypeName("bool (*)(void *, const char *, const char *)")] - public delegate* unmanaged[Cdecl] copy; + public delegate* unmanaged[Cdecl] copy; [NativeTypeName("Uint64 (*)(void *)")] public delegate* unmanaged[Cdecl] space_remaining; @@ -87,47 +87,47 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_CloseStorage(SDL_Storage* storage); + public static extern SDLBool SDL_CloseStorage(SDL_Storage* storage); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_StorageReady(SDL_Storage* storage); + public static extern SDLBool SDL_StorageReady(SDL_Storage* storage); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetStorageFileSize(SDL_Storage* storage, [NativeTypeName("const char *")] byte* path, [NativeTypeName("Uint64 *")] ulong* length); + public static extern SDLBool SDL_GetStorageFileSize(SDL_Storage* storage, [NativeTypeName("const char *")] byte* path, [NativeTypeName("Uint64 *")] ulong* length); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_ReadStorageFile(SDL_Storage* storage, [NativeTypeName("const char *")] byte* path, [NativeTypeName("void*")] IntPtr destination, [NativeTypeName("Uint64")] ulong length); + public static extern SDLBool SDL_ReadStorageFile(SDL_Storage* storage, [NativeTypeName("const char *")] byte* path, [NativeTypeName("void*")] IntPtr destination, [NativeTypeName("Uint64")] ulong length); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_WriteStorageFile(SDL_Storage* storage, [NativeTypeName("const char *")] byte* path, [NativeTypeName("const void *")] IntPtr source, [NativeTypeName("Uint64")] ulong length); + public static extern SDLBool SDL_WriteStorageFile(SDL_Storage* storage, [NativeTypeName("const char *")] byte* path, [NativeTypeName("const void *")] IntPtr source, [NativeTypeName("Uint64")] ulong length); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_CreateStorageDirectory(SDL_Storage* storage, [NativeTypeName("const char *")] byte* path); + public static extern SDLBool SDL_CreateStorageDirectory(SDL_Storage* storage, [NativeTypeName("const char *")] byte* path); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_EnumerateStorageDirectory(SDL_Storage* storage, [NativeTypeName("const char *")] byte* path, [NativeTypeName("SDL_EnumerateDirectoryCallback")] delegate* unmanaged[Cdecl] callback, [NativeTypeName("void*")] IntPtr userdata); + public static extern SDLBool SDL_EnumerateStorageDirectory(SDL_Storage* storage, [NativeTypeName("const char *")] byte* path, [NativeTypeName("SDL_EnumerateDirectoryCallback")] delegate* unmanaged[Cdecl] callback, [NativeTypeName("void*")] IntPtr userdata); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_RemoveStoragePath(SDL_Storage* storage, [NativeTypeName("const char *")] byte* path); + public static extern SDLBool SDL_RemoveStoragePath(SDL_Storage* storage, [NativeTypeName("const char *")] byte* path); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_RenameStoragePath(SDL_Storage* storage, [NativeTypeName("const char *")] byte* oldpath, [NativeTypeName("const char *")] byte* newpath); + public static extern SDLBool SDL_RenameStoragePath(SDL_Storage* storage, [NativeTypeName("const char *")] byte* oldpath, [NativeTypeName("const char *")] byte* newpath); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_CopyStorageFile(SDL_Storage* storage, [NativeTypeName("const char *")] byte* oldpath, [NativeTypeName("const char *")] byte* newpath); + public static extern SDLBool SDL_CopyStorageFile(SDL_Storage* storage, [NativeTypeName("const char *")] byte* oldpath, [NativeTypeName("const char *")] byte* newpath); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetStoragePathInfo(SDL_Storage* storage, [NativeTypeName("const char *")] byte* path, SDL_PathInfo* info); + public static extern SDLBool SDL_GetStoragePathInfo(SDL_Storage* storage, [NativeTypeName("const char *")] byte* path, SDL_PathInfo* info); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("Uint64")] diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_surface.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_surface.g.cs index cb432d0..1951a05 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_surface.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_surface.g.cs @@ -81,7 +81,7 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetSurfaceColorspace(SDL_Surface* surface, SDL_Colorspace colorspace); + public static extern SDLBool SDL_SetSurfaceColorspace(SDL_Surface* surface, SDL_Colorspace colorspace); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_Colorspace SDL_GetSurfaceColorspace(SDL_Surface* surface); @@ -91,18 +91,18 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetSurfacePalette(SDL_Surface* surface, SDL_Palette* palette); + public static extern SDLBool SDL_SetSurfacePalette(SDL_Surface* surface, SDL_Palette* palette); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_Palette* SDL_GetSurfacePalette(SDL_Surface* surface); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_AddSurfaceAlternateImage(SDL_Surface* surface, SDL_Surface* image); + public static extern SDLBool SDL_AddSurfaceAlternateImage(SDL_Surface* surface, SDL_Surface* image); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SurfaceHasAlternateImages(SDL_Surface* surface); + public static extern SDLBool SDL_SurfaceHasAlternateImages(SDL_Surface* surface); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_Surface** SDL_GetSurfaceImages(SDL_Surface* surface, int* count); @@ -112,80 +112,80 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_LockSurface(SDL_Surface* surface); + public static extern SDLBool SDL_LockSurface(SDL_Surface* surface); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_UnlockSurface(SDL_Surface* surface); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_Surface* SDL_LoadBMP_IO(SDL_IOStream* src, [NativeTypeName("bool")] byte closeio); + public static extern SDL_Surface* SDL_LoadBMP_IO(SDL_IOStream* src, [NativeTypeName("bool")] SDLBool closeio); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_Surface* SDL_LoadBMP([NativeTypeName("const char *")] byte* file); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SaveBMP_IO(SDL_Surface* surface, SDL_IOStream* dst, [NativeTypeName("bool")] byte closeio); + public static extern SDLBool SDL_SaveBMP_IO(SDL_Surface* surface, SDL_IOStream* dst, [NativeTypeName("bool")] SDLBool closeio); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SaveBMP(SDL_Surface* surface, [NativeTypeName("const char *")] byte* file); + public static extern SDLBool SDL_SaveBMP(SDL_Surface* surface, [NativeTypeName("const char *")] byte* file); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetSurfaceRLE(SDL_Surface* surface, [NativeTypeName("bool")] byte enabled); + public static extern SDLBool SDL_SetSurfaceRLE(SDL_Surface* surface, [NativeTypeName("bool")] SDLBool enabled); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SurfaceHasRLE(SDL_Surface* surface); + public static extern SDLBool SDL_SurfaceHasRLE(SDL_Surface* surface); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetSurfaceColorKey(SDL_Surface* surface, [NativeTypeName("bool")] byte enabled, [NativeTypeName("Uint32")] uint key); + public static extern SDLBool SDL_SetSurfaceColorKey(SDL_Surface* surface, [NativeTypeName("bool")] SDLBool enabled, [NativeTypeName("Uint32")] uint key); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SurfaceHasColorKey(SDL_Surface* surface); + public static extern SDLBool SDL_SurfaceHasColorKey(SDL_Surface* surface); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetSurfaceColorKey(SDL_Surface* surface, [NativeTypeName("Uint32 *")] uint* key); + public static extern SDLBool SDL_GetSurfaceColorKey(SDL_Surface* surface, [NativeTypeName("Uint32 *")] uint* key); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetSurfaceColorMod(SDL_Surface* surface, [NativeTypeName("Uint8")] byte r, [NativeTypeName("Uint8")] byte g, [NativeTypeName("Uint8")] byte b); + public static extern SDLBool SDL_SetSurfaceColorMod(SDL_Surface* surface, [NativeTypeName("Uint8")] byte r, [NativeTypeName("Uint8")] byte g, [NativeTypeName("Uint8")] byte b); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetSurfaceColorMod(SDL_Surface* surface, [NativeTypeName("Uint8 *")] byte* r, [NativeTypeName("Uint8 *")] byte* g, [NativeTypeName("Uint8 *")] byte* b); + public static extern SDLBool SDL_GetSurfaceColorMod(SDL_Surface* surface, [NativeTypeName("Uint8 *")] byte* r, [NativeTypeName("Uint8 *")] byte* g, [NativeTypeName("Uint8 *")] byte* b); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetSurfaceAlphaMod(SDL_Surface* surface, [NativeTypeName("Uint8")] byte alpha); + public static extern SDLBool SDL_SetSurfaceAlphaMod(SDL_Surface* surface, [NativeTypeName("Uint8")] byte alpha); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetSurfaceAlphaMod(SDL_Surface* surface, [NativeTypeName("Uint8 *")] byte* alpha); + public static extern SDLBool SDL_GetSurfaceAlphaMod(SDL_Surface* surface, [NativeTypeName("Uint8 *")] byte* alpha); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetSurfaceBlendMode(SDL_Surface* surface, SDL_BlendMode blendMode); + public static extern SDLBool SDL_SetSurfaceBlendMode(SDL_Surface* surface, SDL_BlendMode blendMode); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetSurfaceBlendMode(SDL_Surface* surface, SDL_BlendMode* blendMode); + public static extern SDLBool SDL_GetSurfaceBlendMode(SDL_Surface* surface, SDL_BlendMode* blendMode); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetSurfaceClipRect(SDL_Surface* surface, [NativeTypeName("const SDL_Rect *")] SDL_Rect* rect); + public static extern SDLBool SDL_SetSurfaceClipRect(SDL_Surface* surface, [NativeTypeName("const SDL_Rect *")] SDL_Rect* rect); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetSurfaceClipRect(SDL_Surface* surface, SDL_Rect* rect); + public static extern SDLBool SDL_GetSurfaceClipRect(SDL_Surface* surface, SDL_Rect* rect); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_FlipSurface(SDL_Surface* surface, SDL_FlipMode flip); + public static extern SDLBool SDL_FlipSurface(SDL_Surface* surface, SDL_FlipMode flip); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_Surface* SDL_DuplicateSurface(SDL_Surface* surface); @@ -201,59 +201,59 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_ConvertPixels(int width, int height, SDL_PixelFormat src_format, [NativeTypeName("const void *")] IntPtr src, int src_pitch, SDL_PixelFormat dst_format, [NativeTypeName("void*")] IntPtr dst, int dst_pitch); + public static extern SDLBool SDL_ConvertPixels(int width, int height, SDL_PixelFormat src_format, [NativeTypeName("const void *")] IntPtr src, int src_pitch, SDL_PixelFormat dst_format, [NativeTypeName("void*")] IntPtr dst, int dst_pitch); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_ConvertPixelsAndColorspace(int width, int height, SDL_PixelFormat src_format, SDL_Colorspace src_colorspace, SDL_PropertiesID src_properties, [NativeTypeName("const void *")] IntPtr src, int src_pitch, SDL_PixelFormat dst_format, SDL_Colorspace dst_colorspace, SDL_PropertiesID dst_properties, [NativeTypeName("void*")] IntPtr dst, int dst_pitch); + public static extern SDLBool SDL_ConvertPixelsAndColorspace(int width, int height, SDL_PixelFormat src_format, SDL_Colorspace src_colorspace, SDL_PropertiesID src_properties, [NativeTypeName("const void *")] IntPtr src, int src_pitch, SDL_PixelFormat dst_format, SDL_Colorspace dst_colorspace, SDL_PropertiesID dst_properties, [NativeTypeName("void*")] IntPtr dst, int dst_pitch); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_PremultiplyAlpha(int width, int height, SDL_PixelFormat src_format, [NativeTypeName("const void *")] IntPtr src, int src_pitch, SDL_PixelFormat dst_format, [NativeTypeName("void*")] IntPtr dst, int dst_pitch, [NativeTypeName("bool")] byte linear); + public static extern SDLBool SDL_PremultiplyAlpha(int width, int height, SDL_PixelFormat src_format, [NativeTypeName("const void *")] IntPtr src, int src_pitch, SDL_PixelFormat dst_format, [NativeTypeName("void*")] IntPtr dst, int dst_pitch, [NativeTypeName("bool")] SDLBool linear); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_PremultiplySurfaceAlpha(SDL_Surface* surface, [NativeTypeName("bool")] byte linear); + public static extern SDLBool SDL_PremultiplySurfaceAlpha(SDL_Surface* surface, [NativeTypeName("bool")] SDLBool linear); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_ClearSurface(SDL_Surface* surface, float r, float g, float b, float a); + public static extern SDLBool SDL_ClearSurface(SDL_Surface* surface, float r, float g, float b, float a); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_FillSurfaceRect(SDL_Surface* dst, [NativeTypeName("const SDL_Rect *")] SDL_Rect* rect, [NativeTypeName("Uint32")] uint color); + public static extern SDLBool SDL_FillSurfaceRect(SDL_Surface* dst, [NativeTypeName("const SDL_Rect *")] SDL_Rect* rect, [NativeTypeName("Uint32")] uint color); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_FillSurfaceRects(SDL_Surface* dst, [NativeTypeName("const SDL_Rect *")] SDL_Rect* rects, int count, [NativeTypeName("Uint32")] uint color); + public static extern SDLBool SDL_FillSurfaceRects(SDL_Surface* dst, [NativeTypeName("const SDL_Rect *")] SDL_Rect* rects, int count, [NativeTypeName("Uint32")] uint color); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_BlitSurface(SDL_Surface* src, [NativeTypeName("const SDL_Rect *")] SDL_Rect* srcrect, SDL_Surface* dst, [NativeTypeName("const SDL_Rect *")] SDL_Rect* dstrect); + public static extern SDLBool SDL_BlitSurface(SDL_Surface* src, [NativeTypeName("const SDL_Rect *")] SDL_Rect* srcrect, SDL_Surface* dst, [NativeTypeName("const SDL_Rect *")] SDL_Rect* dstrect); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_BlitSurfaceUnchecked(SDL_Surface* src, [NativeTypeName("const SDL_Rect *")] SDL_Rect* srcrect, SDL_Surface* dst, [NativeTypeName("const SDL_Rect *")] SDL_Rect* dstrect); + public static extern SDLBool SDL_BlitSurfaceUnchecked(SDL_Surface* src, [NativeTypeName("const SDL_Rect *")] SDL_Rect* srcrect, SDL_Surface* dst, [NativeTypeName("const SDL_Rect *")] SDL_Rect* dstrect); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_BlitSurfaceScaled(SDL_Surface* src, [NativeTypeName("const SDL_Rect *")] SDL_Rect* srcrect, SDL_Surface* dst, [NativeTypeName("const SDL_Rect *")] SDL_Rect* dstrect, SDL_ScaleMode scaleMode); + public static extern SDLBool SDL_BlitSurfaceScaled(SDL_Surface* src, [NativeTypeName("const SDL_Rect *")] SDL_Rect* srcrect, SDL_Surface* dst, [NativeTypeName("const SDL_Rect *")] SDL_Rect* dstrect, SDL_ScaleMode scaleMode); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_BlitSurfaceUncheckedScaled(SDL_Surface* src, [NativeTypeName("const SDL_Rect *")] SDL_Rect* srcrect, SDL_Surface* dst, [NativeTypeName("const SDL_Rect *")] SDL_Rect* dstrect, SDL_ScaleMode scaleMode); + public static extern SDLBool SDL_BlitSurfaceUncheckedScaled(SDL_Surface* src, [NativeTypeName("const SDL_Rect *")] SDL_Rect* srcrect, SDL_Surface* dst, [NativeTypeName("const SDL_Rect *")] SDL_Rect* dstrect, SDL_ScaleMode scaleMode); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_BlitSurfaceTiled(SDL_Surface* src, [NativeTypeName("const SDL_Rect *")] SDL_Rect* srcrect, SDL_Surface* dst, [NativeTypeName("const SDL_Rect *")] SDL_Rect* dstrect); + public static extern SDLBool SDL_BlitSurfaceTiled(SDL_Surface* src, [NativeTypeName("const SDL_Rect *")] SDL_Rect* srcrect, SDL_Surface* dst, [NativeTypeName("const SDL_Rect *")] SDL_Rect* dstrect); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_BlitSurfaceTiledWithScale(SDL_Surface* src, [NativeTypeName("const SDL_Rect *")] SDL_Rect* srcrect, float scale, SDL_ScaleMode scaleMode, SDL_Surface* dst, [NativeTypeName("const SDL_Rect *")] SDL_Rect* dstrect); + public static extern SDLBool SDL_BlitSurfaceTiledWithScale(SDL_Surface* src, [NativeTypeName("const SDL_Rect *")] SDL_Rect* srcrect, float scale, SDL_ScaleMode scaleMode, SDL_Surface* dst, [NativeTypeName("const SDL_Rect *")] SDL_Rect* dstrect); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_BlitSurface9Grid(SDL_Surface* src, [NativeTypeName("const SDL_Rect *")] SDL_Rect* srcrect, int left_width, int right_width, int top_height, int bottom_height, float scale, SDL_ScaleMode scaleMode, SDL_Surface* dst, [NativeTypeName("const SDL_Rect *")] SDL_Rect* dstrect); + public static extern SDLBool SDL_BlitSurface9Grid(SDL_Surface* src, [NativeTypeName("const SDL_Rect *")] SDL_Rect* srcrect, int left_width, int right_width, int top_height, int bottom_height, float scale, SDL_ScaleMode scaleMode, SDL_Surface* dst, [NativeTypeName("const SDL_Rect *")] SDL_Rect* dstrect); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("Uint32")] @@ -265,19 +265,19 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_ReadSurfacePixel(SDL_Surface* surface, int x, int y, [NativeTypeName("Uint8 *")] byte* r, [NativeTypeName("Uint8 *")] byte* g, [NativeTypeName("Uint8 *")] byte* b, [NativeTypeName("Uint8 *")] byte* a); + public static extern SDLBool SDL_ReadSurfacePixel(SDL_Surface* surface, int x, int y, [NativeTypeName("Uint8 *")] byte* r, [NativeTypeName("Uint8 *")] byte* g, [NativeTypeName("Uint8 *")] byte* b, [NativeTypeName("Uint8 *")] byte* a); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_ReadSurfacePixelFloat(SDL_Surface* surface, int x, int y, float* r, float* g, float* b, float* a); + public static extern SDLBool SDL_ReadSurfacePixelFloat(SDL_Surface* surface, int x, int y, float* r, float* g, float* b, float* a); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_WriteSurfacePixel(SDL_Surface* surface, int x, int y, [NativeTypeName("Uint8")] byte r, [NativeTypeName("Uint8")] byte g, [NativeTypeName("Uint8")] byte b, [NativeTypeName("Uint8")] byte a); + public static extern SDLBool SDL_WriteSurfacePixel(SDL_Surface* surface, int x, int y, [NativeTypeName("Uint8")] byte r, [NativeTypeName("Uint8")] byte g, [NativeTypeName("Uint8")] byte b, [NativeTypeName("Uint8")] byte a); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_WriteSurfacePixelFloat(SDL_Surface* surface, int x, int y, float r, float g, float b, float a); + public static extern SDLBool SDL_WriteSurfacePixelFloat(SDL_Surface* surface, int x, int y, float r, float g, float b, float a); [NativeTypeName("#define SDL_SURFACE_PREALLOCATED 0x00000001u")] public const uint SDL_SURFACE_PREALLOCATED = 0x00000001U; diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_system.Android.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_system.Android.g.cs index 53e7d9b..b552f88 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_system.Android.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_system.Android.g.cs @@ -48,17 +48,17 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] [SupportedOSPlatform("Android")] - public static extern byte SDL_IsAndroidTV(); + public static extern SDLBool SDL_IsAndroidTV(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] [SupportedOSPlatform("Android")] - public static extern byte SDL_IsChromebook(); + public static extern SDLBool SDL_IsChromebook(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] [SupportedOSPlatform("Android")] - public static extern byte SDL_IsDeXMode(); + public static extern SDLBool SDL_IsDeXMode(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [SupportedOSPlatform("Android")] @@ -87,17 +87,17 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] [SupportedOSPlatform("Android")] - public static extern byte SDL_RequestAndroidPermission([NativeTypeName("const char *")] byte* permission, [NativeTypeName("SDL_RequestAndroidPermissionCallback")] delegate* unmanaged[Cdecl] cb, [NativeTypeName("void*")] IntPtr userdata); + public static extern SDLBool SDL_RequestAndroidPermission([NativeTypeName("const char *")] byte* permission, [NativeTypeName("SDL_RequestAndroidPermissionCallback")] delegate* unmanaged[Cdecl] cb, [NativeTypeName("void*")] IntPtr userdata); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] [SupportedOSPlatform("Android")] - public static extern byte SDL_ShowAndroidToast([NativeTypeName("const char *")] byte* message, int duration, int gravity, int xoffset, int yoffset); + public static extern SDLBool SDL_ShowAndroidToast([NativeTypeName("const char *")] byte* message, int duration, int gravity, int xoffset, int yoffset); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] [SupportedOSPlatform("Android")] - public static extern byte SDL_SendAndroidMessage([NativeTypeName("Uint32")] uint command, int param1); + public static extern SDLBool SDL_SendAndroidMessage([NativeTypeName("Uint32")] uint command, int param1); [NativeTypeName("#define SDL_ANDROID_EXTERNAL_STORAGE_READ 0x01")] public const int SDL_ANDROID_EXTERNAL_STORAGE_READ = 0x01; diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_system.GDK.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_system.GDK.g.cs index d77ff5c..7d3d93b 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_system.GDK.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_system.GDK.g.cs @@ -41,11 +41,11 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] [SupportedOSPlatform("Windows")] - public static extern byte SDL_GetGDKTaskQueue([NativeTypeName("XTaskQueueHandle *")] XTaskQueueObject** outTaskQueue); + public static extern SDLBool SDL_GetGDKTaskQueue([NativeTypeName("XTaskQueueHandle *")] XTaskQueueObject** outTaskQueue); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] [SupportedOSPlatform("Windows")] - public static extern byte SDL_GetGDKDefaultUser([NativeTypeName("XUserHandle *")] XUser** outUserHandle); + public static extern SDLBool SDL_GetGDKDefaultUser([NativeTypeName("XUserHandle *")] XUser** outUserHandle); } } diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_system.Linux.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_system.Linux.g.cs index 1e4425c..00a3ce3 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_system.Linux.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_system.Linux.g.cs @@ -33,11 +33,11 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] [SupportedOSPlatform("Linux")] - public static extern byte SDL_SetLinuxThreadPriority([NativeTypeName("Sint64")] long threadID, int priority); + public static extern SDLBool SDL_SetLinuxThreadPriority([NativeTypeName("Sint64")] long threadID, int priority); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] [SupportedOSPlatform("Linux")] - public static extern byte SDL_SetLinuxThreadPriorityAndPolicy([NativeTypeName("Sint64")] long threadID, int sdlPriority, int schedPolicy); + public static extern SDLBool SDL_SetLinuxThreadPriorityAndPolicy([NativeTypeName("Sint64")] long threadID, int sdlPriority, int schedPolicy); } } diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_system.Windows.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_system.Windows.g.cs index 024e0eb..dfac178 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_system.Windows.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_system.Windows.g.cs @@ -33,7 +33,7 @@ namespace SDL { [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [SupportedOSPlatform("Windows")] - public static extern void SDL_SetWindowsMessageHook([NativeTypeName("SDL_WindowsMessageHook")] delegate* unmanaged[Cdecl] callback, [NativeTypeName("void*")] IntPtr userdata); + public static extern void SDL_SetWindowsMessageHook([NativeTypeName("SDL_WindowsMessageHook")] delegate* unmanaged[Cdecl] callback, [NativeTypeName("void*")] IntPtr userdata); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [SupportedOSPlatform("Windows")] @@ -42,6 +42,6 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] [SupportedOSPlatform("Windows")] - public static extern byte SDL_GetDXGIOutputInfo(SDL_DisplayID displayID, int* adapterIndex, int* outputIndex); + public static extern SDLBool SDL_GetDXGIOutputInfo(SDL_DisplayID displayID, int* adapterIndex, int* outputIndex); } } diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_system.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_system.g.cs index 239a52f..eed7c36 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_system.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_system.g.cs @@ -31,11 +31,11 @@ namespace SDL public static unsafe partial class SDL3 { [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void SDL_SetX11EventHook([NativeTypeName("SDL_X11EventHook")] delegate* unmanaged[Cdecl] callback, [NativeTypeName("void*")] IntPtr userdata); + public static extern void SDL_SetX11EventHook([NativeTypeName("SDL_X11EventHook")] delegate* unmanaged[Cdecl] callback, [NativeTypeName("void*")] IntPtr userdata); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_IsTablet(); + public static extern SDLBool SDL_IsTablet(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_OnApplicationWillTerminate(); diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_system.iOS.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_system.iOS.g.cs index 2202598..6b5a4c9 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_system.iOS.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_system.iOS.g.cs @@ -34,11 +34,11 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] [SupportedOSPlatform("iOS")] - public static extern byte SDL_SetiOSAnimationCallback(SDL_Window* window, int interval, [NativeTypeName("SDL_iOSAnimationCallback")] delegate* unmanaged[Cdecl] callback, [NativeTypeName("void*")] IntPtr callbackParam); + public static extern SDLBool SDL_SetiOSAnimationCallback(SDL_Window* window, int interval, [NativeTypeName("SDL_iOSAnimationCallback")] delegate* unmanaged[Cdecl] callback, [NativeTypeName("void*")] IntPtr callbackParam); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [SupportedOSPlatform("iOS")] - public static extern void SDL_SetiOSEventPump([NativeTypeName("bool")] byte enabled); + public static extern void SDL_SetiOSEventPump([NativeTypeName("bool")] SDLBool enabled); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [SupportedOSPlatform("iOS")] diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_thread.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_thread.g.cs index c18a8bb..58d41ae 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_thread.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_thread.g.cs @@ -60,7 +60,7 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetThreadPriority(SDL_ThreadPriority priority); + public static extern SDLBool SDL_SetThreadPriority(SDL_ThreadPriority priority); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_WaitThread(SDL_Thread* thread, int* status); @@ -74,7 +74,7 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetTLS(SDL_TLSID* id, [NativeTypeName("const void *")] IntPtr value, [NativeTypeName("SDL_TLSDestructorCallback")] delegate* unmanaged[Cdecl] destructor); + public static extern SDLBool SDL_SetTLS(SDL_TLSID* id, [NativeTypeName("const void *")] IntPtr value, [NativeTypeName("SDL_TLSDestructorCallback")] delegate* unmanaged[Cdecl] destructor); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_CleanupTLS(); diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_time.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_time.g.cs index 9ebc25b..359f5f6 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_time.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_time.g.cs @@ -65,19 +65,19 @@ namespace SDL { [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetDateTimeLocalePreferences(SDL_DateFormat* dateFormat, SDL_TimeFormat* timeFormat); + public static extern SDLBool SDL_GetDateTimeLocalePreferences(SDL_DateFormat* dateFormat, SDL_TimeFormat* timeFormat); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetCurrentTime(SDL_Time* ticks); + public static extern SDLBool SDL_GetCurrentTime(SDL_Time* ticks); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_TimeToDateTime(SDL_Time ticks, SDL_DateTime* dt, [NativeTypeName("bool")] byte localTime); + public static extern SDLBool SDL_TimeToDateTime(SDL_Time ticks, SDL_DateTime* dt, [NativeTypeName("bool")] SDLBool localTime); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_DateTimeToTime([NativeTypeName("const SDL_DateTime *")] SDL_DateTime* dt, SDL_Time* ticks); + public static extern SDLBool SDL_DateTimeToTime([NativeTypeName("const SDL_DateTime *")] SDL_DateTime* dt, SDL_Time* ticks); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_TimeToWindows(SDL_Time ticks, [NativeTypeName("Uint32 *")] uint* dwLowDateTime, [NativeTypeName("Uint32 *")] uint* dwHighDateTime); diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_timer.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_timer.g.cs index 668038e..c2a3c80 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_timer.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_timer.g.cs @@ -60,7 +60,7 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_RemoveTimer(SDL_TimerID id); + public static extern SDLBool SDL_RemoveTimer(SDL_TimerID id); [NativeTypeName("#define SDL_MS_PER_SECOND 1000")] public const int SDL_MS_PER_SECOND = 1000; diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_video.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_video.g.cs index b682fb2..69a7930 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_video.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_video.g.cs @@ -188,11 +188,11 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetDisplayBounds(SDL_DisplayID displayID, SDL_Rect* rect); + public static extern SDLBool SDL_GetDisplayBounds(SDL_DisplayID displayID, SDL_Rect* rect); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetDisplayUsableBounds(SDL_DisplayID displayID, SDL_Rect* rect); + public static extern SDLBool SDL_GetDisplayUsableBounds(SDL_DisplayID displayID, SDL_Rect* rect); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_DisplayOrientation SDL_GetNaturalDisplayOrientation(SDL_DisplayID displayID); @@ -208,7 +208,7 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetClosestFullscreenDisplayMode(SDL_DisplayID displayID, int w, int h, float refresh_rate, [NativeTypeName("bool")] byte include_high_density_modes, SDL_DisplayMode* mode); + public static extern SDLBool SDL_GetClosestFullscreenDisplayMode(SDL_DisplayID displayID, int w, int h, float refresh_rate, [NativeTypeName("bool")] SDLBool include_high_density_modes, SDL_DisplayMode* mode); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("const SDL_DisplayMode *")] @@ -235,7 +235,7 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetWindowFullscreenMode(SDL_Window* window, [NativeTypeName("const SDL_DisplayMode *")] SDL_DisplayMode* mode); + public static extern SDLBool SDL_SetWindowFullscreenMode(SDL_Window* window, [NativeTypeName("const SDL_DisplayMode *")] SDL_DisplayMode* mode); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("const SDL_DisplayMode *")] @@ -277,7 +277,7 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetWindowTitle(SDL_Window* window, [NativeTypeName("const char *")] byte* title); + public static extern SDLBool SDL_SetWindowTitle(SDL_Window* window, [NativeTypeName("const char *")] byte* title); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetWindowTitle", ExactSpelling = true)] [return: NativeTypeName("const char *")] @@ -285,153 +285,153 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetWindowIcon(SDL_Window* window, SDL_Surface* icon); + public static extern SDLBool SDL_SetWindowIcon(SDL_Window* window, SDL_Surface* icon); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetWindowPosition(SDL_Window* window, int x, int y); + public static extern SDLBool SDL_SetWindowPosition(SDL_Window* window, int x, int y); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetWindowPosition(SDL_Window* window, int* x, int* y); + public static extern SDLBool SDL_GetWindowPosition(SDL_Window* window, int* x, int* y); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetWindowSize(SDL_Window* window, int w, int h); + public static extern SDLBool SDL_SetWindowSize(SDL_Window* window, int w, int h); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetWindowSize(SDL_Window* window, int* w, int* h); + public static extern SDLBool SDL_GetWindowSize(SDL_Window* window, int* w, int* h); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetWindowSafeArea(SDL_Window* window, SDL_Rect* rect); + public static extern SDLBool SDL_GetWindowSafeArea(SDL_Window* window, SDL_Rect* rect); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetWindowAspectRatio(SDL_Window* window, float min_aspect, float max_aspect); + public static extern SDLBool SDL_SetWindowAspectRatio(SDL_Window* window, float min_aspect, float max_aspect); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetWindowAspectRatio(SDL_Window* window, float* min_aspect, float* max_aspect); + public static extern SDLBool SDL_GetWindowAspectRatio(SDL_Window* window, float* min_aspect, float* max_aspect); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetWindowBordersSize(SDL_Window* window, int* top, int* left, int* bottom, int* right); + public static extern SDLBool SDL_GetWindowBordersSize(SDL_Window* window, int* top, int* left, int* bottom, int* right); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetWindowSizeInPixels(SDL_Window* window, int* w, int* h); + public static extern SDLBool SDL_GetWindowSizeInPixels(SDL_Window* window, int* w, int* h); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetWindowMinimumSize(SDL_Window* window, int min_w, int min_h); + public static extern SDLBool SDL_SetWindowMinimumSize(SDL_Window* window, int min_w, int min_h); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetWindowMinimumSize(SDL_Window* window, int* w, int* h); + public static extern SDLBool SDL_GetWindowMinimumSize(SDL_Window* window, int* w, int* h); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetWindowMaximumSize(SDL_Window* window, int max_w, int max_h); + public static extern SDLBool SDL_SetWindowMaximumSize(SDL_Window* window, int max_w, int max_h); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetWindowMaximumSize(SDL_Window* window, int* w, int* h); + public static extern SDLBool SDL_GetWindowMaximumSize(SDL_Window* window, int* w, int* h); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetWindowBordered(SDL_Window* window, [NativeTypeName("bool")] byte bordered); + public static extern SDLBool SDL_SetWindowBordered(SDL_Window* window, [NativeTypeName("bool")] SDLBool bordered); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetWindowResizable(SDL_Window* window, [NativeTypeName("bool")] byte resizable); + public static extern SDLBool SDL_SetWindowResizable(SDL_Window* window, [NativeTypeName("bool")] SDLBool resizable); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetWindowAlwaysOnTop(SDL_Window* window, [NativeTypeName("bool")] byte on_top); + public static extern SDLBool SDL_SetWindowAlwaysOnTop(SDL_Window* window, [NativeTypeName("bool")] SDLBool on_top); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_ShowWindow(SDL_Window* window); + public static extern SDLBool SDL_ShowWindow(SDL_Window* window); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_HideWindow(SDL_Window* window); + public static extern SDLBool SDL_HideWindow(SDL_Window* window); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_RaiseWindow(SDL_Window* window); + public static extern SDLBool SDL_RaiseWindow(SDL_Window* window); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_MaximizeWindow(SDL_Window* window); + public static extern SDLBool SDL_MaximizeWindow(SDL_Window* window); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_MinimizeWindow(SDL_Window* window); + public static extern SDLBool SDL_MinimizeWindow(SDL_Window* window); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_RestoreWindow(SDL_Window* window); + public static extern SDLBool SDL_RestoreWindow(SDL_Window* window); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetWindowFullscreen(SDL_Window* window, [NativeTypeName("bool")] byte fullscreen); + public static extern SDLBool SDL_SetWindowFullscreen(SDL_Window* window, [NativeTypeName("bool")] SDLBool fullscreen); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SyncWindow(SDL_Window* window); + public static extern SDLBool SDL_SyncWindow(SDL_Window* window); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_WindowHasSurface(SDL_Window* window); + public static extern SDLBool SDL_WindowHasSurface(SDL_Window* window); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_Surface* SDL_GetWindowSurface(SDL_Window* window); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetWindowSurfaceVSync(SDL_Window* window, int vsync); + public static extern SDLBool SDL_SetWindowSurfaceVSync(SDL_Window* window, int vsync); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetWindowSurfaceVSync(SDL_Window* window, int* vsync); + public static extern SDLBool SDL_GetWindowSurfaceVSync(SDL_Window* window, int* vsync); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_UpdateWindowSurface(SDL_Window* window); + public static extern SDLBool SDL_UpdateWindowSurface(SDL_Window* window); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_UpdateWindowSurfaceRects(SDL_Window* window, [NativeTypeName("const SDL_Rect *")] SDL_Rect* rects, int numrects); + public static extern SDLBool SDL_UpdateWindowSurfaceRects(SDL_Window* window, [NativeTypeName("const SDL_Rect *")] SDL_Rect* rects, int numrects); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_DestroyWindowSurface(SDL_Window* window); + public static extern SDLBool SDL_DestroyWindowSurface(SDL_Window* window); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetWindowKeyboardGrab(SDL_Window* window, [NativeTypeName("bool")] byte grabbed); + public static extern SDLBool SDL_SetWindowKeyboardGrab(SDL_Window* window, [NativeTypeName("bool")] SDLBool grabbed); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetWindowMouseGrab(SDL_Window* window, [NativeTypeName("bool")] byte grabbed); + public static extern SDLBool SDL_SetWindowMouseGrab(SDL_Window* window, [NativeTypeName("bool")] SDLBool grabbed); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetWindowKeyboardGrab(SDL_Window* window); + public static extern SDLBool SDL_GetWindowKeyboardGrab(SDL_Window* window); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GetWindowMouseGrab(SDL_Window* window); + public static extern SDLBool SDL_GetWindowMouseGrab(SDL_Window* window); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_Window* SDL_GetGrabbedWindow(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetWindowMouseRect(SDL_Window* window, [NativeTypeName("const SDL_Rect *")] SDL_Rect* rect); + public static extern SDLBool SDL_SetWindowMouseRect(SDL_Window* window, [NativeTypeName("const SDL_Rect *")] SDL_Rect* rect); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("const SDL_Rect *")] @@ -439,57 +439,57 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetWindowOpacity(SDL_Window* window, float opacity); + public static extern SDLBool SDL_SetWindowOpacity(SDL_Window* window, float opacity); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern float SDL_GetWindowOpacity(SDL_Window* window); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetWindowParent(SDL_Window* window, SDL_Window* parent); + public static extern SDLBool SDL_SetWindowParent(SDL_Window* window, SDL_Window* parent); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetWindowModal(SDL_Window* window, [NativeTypeName("bool")] byte modal); + public static extern SDLBool SDL_SetWindowModal(SDL_Window* window, [NativeTypeName("bool")] SDLBool modal); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetWindowFocusable(SDL_Window* window, [NativeTypeName("bool")] byte focusable); + public static extern SDLBool SDL_SetWindowFocusable(SDL_Window* window, [NativeTypeName("bool")] SDLBool focusable); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_ShowWindowSystemMenu(SDL_Window* window, int x, int y); + public static extern SDLBool SDL_ShowWindowSystemMenu(SDL_Window* window, int x, int y); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetWindowHitTest(SDL_Window* window, [NativeTypeName("SDL_HitTest")] delegate* unmanaged[Cdecl] callback, [NativeTypeName("void*")] IntPtr callback_data); + public static extern SDLBool SDL_SetWindowHitTest(SDL_Window* window, [NativeTypeName("SDL_HitTest")] delegate* unmanaged[Cdecl] callback, [NativeTypeName("void*")] IntPtr callback_data); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_SetWindowShape(SDL_Window* window, SDL_Surface* shape); + public static extern SDLBool SDL_SetWindowShape(SDL_Window* window, SDL_Surface* shape); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_FlashWindow(SDL_Window* window, SDL_FlashOperation operation); + public static extern SDLBool SDL_FlashWindow(SDL_Window* window, SDL_FlashOperation operation); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_DestroyWindow(SDL_Window* window); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_ScreenSaverEnabled(); + public static extern SDLBool SDL_ScreenSaverEnabled(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_EnableScreenSaver(); + public static extern SDLBool SDL_EnableScreenSaver(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_DisableScreenSaver(); + public static extern SDLBool SDL_DisableScreenSaver(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GL_LoadLibrary([NativeTypeName("const char *")] byte* path); + public static extern SDLBool SDL_GL_LoadLibrary([NativeTypeName("const char *")] byte* path); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("SDL_FunctionPointer")] @@ -504,18 +504,18 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GL_ExtensionSupported([NativeTypeName("const char *")] byte* extension); + public static extern SDLBool SDL_GL_ExtensionSupported([NativeTypeName("const char *")] byte* extension); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_GL_ResetAttributes(); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GL_SetAttribute(SDL_GLattr attr, int value); + public static extern SDLBool SDL_GL_SetAttribute(SDL_GLattr attr, int value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GL_GetAttribute(SDL_GLattr attr, int* value); + public static extern SDLBool SDL_GL_GetAttribute(SDL_GLattr attr, int* value); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("SDL_GLContext")] @@ -523,7 +523,7 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GL_MakeCurrent(SDL_Window* window, [NativeTypeName("SDL_GLContext")] SDL_GLContextState* context); + public static extern SDLBool SDL_GL_MakeCurrent(SDL_Window* window, [NativeTypeName("SDL_GLContext")] SDL_GLContextState* context); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_Window* SDL_GL_GetCurrentWindow(); @@ -549,19 +549,19 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GL_SetSwapInterval(int interval); + public static extern SDLBool SDL_GL_SetSwapInterval(int interval); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GL_GetSwapInterval(int* interval); + public static extern SDLBool SDL_GL_GetSwapInterval(int* interval); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GL_SwapWindow(SDL_Window* window); + public static extern SDLBool SDL_GL_SwapWindow(SDL_Window* window); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_GL_DestroyContext([NativeTypeName("SDL_GLContext")] SDL_GLContextState* context); + public static extern SDLBool SDL_GL_DestroyContext([NativeTypeName("SDL_GLContext")] SDL_GLContextState* context); [NativeTypeName("#define SDL_PROP_GLOBAL_VIDEO_WAYLAND_WL_DISPLAY_POINTER \"SDL.video.wayland.wl_display\"")] public static ReadOnlySpan SDL_PROP_GLOBAL_VIDEO_WAYLAND_WL_DISPLAY_POINTER => "SDL.video.wayland.wl_display"u8; diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_vulkan.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_vulkan.g.cs index 0cbe337..492abb7 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_vulkan.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_vulkan.g.cs @@ -48,7 +48,7 @@ namespace SDL { [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_Vulkan_LoadLibrary([NativeTypeName("const char *")] byte* path); + public static extern SDLBool SDL_Vulkan_LoadLibrary([NativeTypeName("const char *")] byte* path); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("SDL_FunctionPointer")] @@ -63,13 +63,13 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_Vulkan_CreateSurface(SDL_Window* window, [NativeTypeName("VkInstance")] VkInstance_T* instance, [NativeTypeName("const struct VkAllocationCallbacks *")] VkAllocationCallbacks* allocator, [NativeTypeName("VkSurfaceKHR *")] VkSurfaceKHR_T** surface); + public static extern SDLBool SDL_Vulkan_CreateSurface(SDL_Window* window, [NativeTypeName("VkInstance")] VkInstance_T* instance, [NativeTypeName("const struct VkAllocationCallbacks *")] VkAllocationCallbacks* allocator, [NativeTypeName("VkSurfaceKHR *")] VkSurfaceKHR_T** surface); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_Vulkan_DestroySurface([NativeTypeName("VkInstance")] VkInstance_T* instance, [NativeTypeName("VkSurfaceKHR")] VkSurfaceKHR_T* surface, [NativeTypeName("const struct VkAllocationCallbacks *")] VkAllocationCallbacks* allocator); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern byte SDL_Vulkan_GetPresentationSupport([NativeTypeName("VkInstance")] VkInstance_T* instance, [NativeTypeName("VkPhysicalDevice")] VkPhysicalDevice_T* physicalDevice, [NativeTypeName("Uint32")] uint queueFamilyIndex); + public static extern SDLBool SDL_Vulkan_GetPresentationSupport([NativeTypeName("VkInstance")] VkInstance_T* instance, [NativeTypeName("VkPhysicalDevice")] VkPhysicalDevice_T* physicalDevice, [NativeTypeName("Uint32")] uint queueFamilyIndex); } } diff --git a/SDL3-CS/SDL3/SDL_clipboard.cs b/SDL3-CS/SDL3/SDL_clipboard.cs index 7869685..4f3abd4 100644 --- a/SDL3-CS/SDL3/SDL_clipboard.cs +++ b/SDL3-CS/SDL3/SDL_clipboard.cs @@ -14,9 +14,9 @@ namespace SDL { [LibraryImport("SDL3", StringMarshalling = StringMarshalling.Utf8)] [UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])] - private static unsafe partial SDL_bool SDL_SetClipboardData(SDL_ClipboardDataCallback callback, SDL_ClipboardCleanupCallback cleanup, IntPtr userdata, string[] mime_types, UIntPtr num_mime_types); + private static unsafe partial SDLBool SDL_SetClipboardData(SDL_ClipboardDataCallback callback, SDL_ClipboardCleanupCallback cleanup, IntPtr userdata, string[] mime_types, UIntPtr num_mime_types); - public static unsafe SDL_bool SDL_SetClipboardData(SDL_ClipboardDataCallback callback, SDL_ClipboardCleanupCallback cleanup, IntPtr userdata, params string[] mime_types) + public static unsafe SDLBool SDL_SetClipboardData(SDL_ClipboardDataCallback callback, SDL_ClipboardCleanupCallback cleanup, IntPtr userdata, params string[] mime_types) => SDL_SetClipboardData(callback, cleanup, userdata, mime_types, (UIntPtr)mime_types.Length); } } diff --git a/SDL3-CS/SDL3/SDL_error.cs b/SDL3-CS/SDL3/SDL_error.cs index e8ad5e0..749bbbc 100644 --- a/SDL3-CS/SDL3/SDL_error.cs +++ b/SDL3-CS/SDL3/SDL_error.cs @@ -6,14 +6,14 @@ namespace SDL public static partial class SDL3 { [Macro] - public static unsafe SDL_bool SDL_Unsupported() + public static unsafe SDLBool SDL_Unsupported() { fixed (byte* fmt = "That operation is not supported"u8) return SDL_SetError(fmt, __arglist()); } [Macro] - public static unsafe SDL_bool SDL_InvalidParamError([NativeTypeName("const char *")] byte* param) + public static unsafe SDLBool SDL_InvalidParamError([NativeTypeName("const char *")] byte* param) { fixed (byte* fmt = "Parameter '%s' is invalid"u8) return SDL_SetError(fmt, __arglist(param)); diff --git a/SDL3-CS/SDL3/SDL_events.cs b/SDL3-CS/SDL3/SDL_events.cs index 17b8aff..dc7b1ba 100644 --- a/SDL3-CS/SDL3/SDL_events.cs +++ b/SDL3-CS/SDL3/SDL_events.cs @@ -58,10 +58,10 @@ namespace SDL return SDL_PeepEvents(eventsPtr, events.Length, action, (uint)minType, (uint)maxType); } - public static SDL_bool SDL_HasEvent(SDL_EventType type) => SDL_HasEvent((uint)type); + public static SDLBool SDL_HasEvent(SDL_EventType type) => SDL_HasEvent((uint)type); public static void SDL_FlushEvent(SDL_EventType type) => SDL_FlushEvent((uint)type); public static void SDL_FlushEvents(SDL_EventType minType, SDL_EventType maxType) => SDL_FlushEvents((uint)minType, (uint)maxType); - public static void SDL_SetEventEnabled(SDL_EventType type, SDL_bool enabled) => SDL_SetEventEnabled((uint)type, enabled); - public static SDL_bool SDL_EventEnabled(SDL_EventType type) => SDL_EventEnabled((uint)type); + public static void SDL_SetEventEnabled(SDL_EventType type, bool enabled) => SDL_SetEventEnabled((uint)type, enabled); + public static SDLBool SDL_EventEnabled(SDL_EventType type) => SDL_EventEnabled((uint)type); } } diff --git a/SDL3-CS/SDL3/SDL_stdinc.cs b/SDL3-CS/SDL3/SDL_stdinc.cs index fc84885..b13d02f 100644 --- a/SDL3-CS/SDL3/SDL_stdinc.cs +++ b/SDL3-CS/SDL3/SDL_stdinc.cs @@ -2,14 +2,40 @@ // See the LICENCE file in the repository root for full licence text. using System; +using System.Text; namespace SDL { - [Typedef] - public enum SDL_bool : byte + public readonly record struct SDLBool { - SDL_FALSE = SDL3.SDL_FALSE, - SDL_TRUE = SDL3.SDL_TRUE + private readonly byte value; + + internal const byte FALSE_VALUE = 0; + internal const byte TRUE_VALUE = 1; + + [Obsolete("Never explicitly construct an SDL bool.")] + public SDLBool() + { + } + + internal SDLBool(byte value) + { + this.value = value; + } + + public static implicit operator bool(SDLBool b) => b.value != FALSE_VALUE; + + public static implicit operator SDLBool(bool b) => new SDLBool(b ? TRUE_VALUE : FALSE_VALUE); + + public bool Equals(SDLBool other) => (bool)other == (bool)this; + + public override int GetHashCode() => ((bool)this).GetHashCode(); + + private bool PrintMembers(StringBuilder builder) + { + builder.Append($"0x{value:x2}"); + return true; + } } [Typedef] diff --git a/SDL3-CS/generate_bindings.py b/SDL3-CS/generate_bindings.py index dc69a13..bb6bc9e 100644 --- a/SDL3-CS/generate_bindings.py +++ b/SDL3-CS/generate_bindings.py @@ -229,6 +229,7 @@ base_command = [ "void*=IntPtr", "char=byte", "wchar_t *=IntPtr", # wchar_t has a platform-defined size + "bool=SDLBool", # treat bool as C# helper type "--define-macro", "SDL_FUNCTION_POINTER_IS_VOID_POINTER",