Skip to content

Commit

Permalink
Merge pull request #165 from hwsmm/update
Browse files Browse the repository at this point in the history
Update bindings
  • Loading branch information
smoogipoo authored Oct 15, 2024
2 parents 209d102 + c51cad1 commit 012a3dc
Show file tree
Hide file tree
Showing 15 changed files with 93 additions and 17 deletions.
2 changes: 1 addition & 1 deletion External/SDL
Submodule SDL updated 207 files
4 changes: 4 additions & 0 deletions SDL3-CS/SDL3/ClangSharp/SDL_error.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ public static unsafe partial class SDL3
[return: NativeTypeName("bool")]
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 SDLBool SDL_SetErrorV([NativeTypeName("const char *")] byte* fmt, [NativeTypeName("va_list")] byte* ap);

[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
[return: NativeTypeName("bool")]
public static extern SDLBool SDL_OutOfMemory();
Expand Down
11 changes: 10 additions & 1 deletion SDL3-CS/SDL3/ClangSharp/SDL_events.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -871,7 +871,7 @@ public unsafe partial struct SDL_DropEvent
public byte* data;
}

public partial struct SDL_ClipboardEvent
public unsafe partial struct SDL_ClipboardEvent
{
public SDL_EventType type;

Expand All @@ -880,6 +880,15 @@ public partial struct SDL_ClipboardEvent

[NativeTypeName("Uint64")]
public ulong timestamp;

[NativeTypeName("bool")]
public SDLBool owner;

[NativeTypeName("Sint32")]
public int n_mime_types;

[NativeTypeName("const char **")]
public byte** mime_types;
}

public partial struct SDL_SensorEvent
Expand Down
50 changes: 48 additions & 2 deletions SDL3-CS/SDL3/ClangSharp/SDL_gpu.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,48 @@ public enum SDL_GPUTextureFormat
SDL_GPU_TEXTUREFORMAT_D32_FLOAT,
SDL_GPU_TEXTURE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RGB,
SDL_GPU_TEXTUREFORMAT_ASTC_12x10_UNORM_SRGB,
SDL_GPU_TEXTUREFORMAT_ASTC_12x12_UNORM_SRGB,
SDL_GPU_TEXTUREFORMAT_ASTC_4x4_FLOAT,
SDL_GPU_TEXTUREFORMAT_ASTC_5x4_FLOAT,
SDL_GPU_TEXTUREFORMAT_ASTC_5x5_FLOAT,
SDL_GPU_TEXTUREFORMAT_ASTC_6x5_FLOAT,
SDL_GPU_TEXTUREFORMAT_ASTC_6x6_FLOAT,
SDL_GPU_TEXTUREFORMAT_ASTC_8x5_FLOAT,
SDL_GPU_TEXTUREFORMAT_ASTC_8x6_FLOAT,
SDL_GPU_TEXTUREFORMAT_ASTC_8x8_FLOAT,
SDL_GPU_TEXTUREFORMAT_ASTC_10x5_FLOAT,
SDL_GPU_TEXTUREFORMAT_ASTC_10x6_FLOAT,
SDL_GPU_TEXTUREFORMAT_ASTC_10x8_FLOAT,
SDL_GPU_TEXTUREFORMAT_ASTC_10x10_FLOAT,
SDL_GPU_TEXTUREFORMAT_ASTC_12x10_FLOAT,
SDL_GPU_TEXTUREFORMAT_ASTC_12x12_FLOAT,
}

public enum SDL_GPUTextureType
Expand Down Expand Up @@ -653,10 +695,10 @@ public partial struct SDL_GPUColorTargetBlendState
public SDLBool enable_color_write_mask;

[NativeTypeName("Uint8")]
public byte padding2;
public byte padding1;

[NativeTypeName("Uint8")]
public byte padding3;
public byte padding2;
}

public unsafe partial struct SDL_GPUShaderCreateInfo
Expand Down Expand Up @@ -1334,6 +1376,10 @@ public static unsafe partial class SDL3
[return: NativeTypeName("bool")]
public static extern SDLBool SDL_GPUTextureSupportsSampleCount(SDL_GPUDevice* device, SDL_GPUTextureFormat format, SDL_GPUSampleCount sample_count);

[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
[return: NativeTypeName("Uint32")]
public static extern uint SDL_CalculateGPUTextureFormatSize(SDL_GPUTextureFormat format, [NativeTypeName("Uint32")] uint width, [NativeTypeName("Uint32")] uint height, [NativeTypeName("Uint32")] uint depth_or_layer_count);

[NativeTypeName("#define SDL_GPU_TEXTUREUSAGE_SAMPLER (1u << 0)")]
public const uint SDL_GPU_TEXTUREUSAGE_SAMPLER = (1U << 0);

Expand Down
3 changes: 3 additions & 0 deletions SDL3-CS/SDL3/ClangSharp/SDL_hints.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -442,6 +442,9 @@ public static unsafe partial class SDL3
[NativeTypeName("#define SDL_HINT_MAC_OPENGL_ASYNC_DISPATCH \"SDL_MAC_OPENGL_ASYNC_DISPATCH\"")]
public static ReadOnlySpan<byte> SDL_HINT_MAC_OPENGL_ASYNC_DISPATCH => "SDL_MAC_OPENGL_ASYNC_DISPATCH"u8;

[NativeTypeName("#define SDL_HINT_MAC_SCROLL_MOMENTUM \"SDL_MAC_SCROLL_MOMENTUM\"")]
public static ReadOnlySpan<byte> SDL_HINT_MAC_SCROLL_MOMENTUM => "SDL_MAC_SCROLL_MOMENTUM"u8;

[NativeTypeName("#define SDL_HINT_MAIN_CALLBACK_RATE \"SDL_MAIN_CALLBACK_RATE\"")]
public static ReadOnlySpan<byte> SDL_HINT_MAIN_CALLBACK_RATE => "SDL_MAIN_CALLBACK_RATE"u8;

Expand Down
6 changes: 6 additions & 0 deletions SDL3-CS/SDL3/ClangSharp/SDL_iostream.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,12 @@ public static unsafe partial class SDL3
[NativeTypeName("#define SDL_PROP_IOSTREAM_ANDROID_AASSET_POINTER \"SDL.iostream.android.aasset\"")]
public static ReadOnlySpan<byte> SDL_PROP_IOSTREAM_ANDROID_AASSET_POINTER => "SDL.iostream.android.aasset"u8;

[NativeTypeName("#define SDL_PROP_IOSTREAM_MEMORY_POINTER \"SDL.iostream.memory.base\"")]
public static ReadOnlySpan<byte> SDL_PROP_IOSTREAM_MEMORY_POINTER => "SDL.iostream.memory.base"u8;

[NativeTypeName("#define SDL_PROP_IOSTREAM_MEMORY_SIZE_NUMBER \"SDL.iostream.memory.size\"")]
public static ReadOnlySpan<byte> SDL_PROP_IOSTREAM_MEMORY_SIZE_NUMBER => "SDL.iostream.memory.size"u8;

[NativeTypeName("#define SDL_PROP_IOSTREAM_DYNAMIC_MEMORY_POINTER \"SDL.iostream.dynamic.memory\"")]
public static ReadOnlySpan<byte> SDL_PROP_IOSTREAM_DYNAMIC_MEMORY_POINTER => "SDL.iostream.dynamic.memory"u8;

Expand Down
3 changes: 0 additions & 3 deletions SDL3-CS/SDL3/ClangSharp/SDL_joystick.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -380,9 +380,6 @@ public static unsafe partial class SDL3
[NativeTypeName("#define SDL_JOYSTICK_AXIS_MIN -32768")]
public const int SDL_JOYSTICK_AXIS_MIN = -32768;

[NativeTypeName("#define SDL_IPHONE_MAX_GFORCE 5.0")]
public const double SDL_IPHONE_MAX_GFORCE = 5.0;

[NativeTypeName("#define SDL_PROP_JOYSTICK_CAP_MONO_LED_BOOLEAN \"SDL.joystick.cap.mono_led\"")]
public static ReadOnlySpan<byte> SDL_PROP_JOYSTICK_CAP_MONO_LED_BOOLEAN => "SDL.joystick.cap.mono_led"u8;

Expand Down
4 changes: 4 additions & 0 deletions SDL3-CS/SDL3/ClangSharp/SDL_log.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,10 @@ public static unsafe partial class SDL3
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
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)]
[return: NativeTypeName("SDL_LogOutputFunction")]
public static extern delegate* unmanaged[Cdecl]<IntPtr, int, SDL_LogPriority, byte*, void> SDL_GetDefaultLogOutputFunction();

[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern void SDL_GetLogOutputFunction([NativeTypeName("SDL_LogOutputFunction *")] delegate* unmanaged[Cdecl]<IntPtr, int, SDL_LogPriority, byte*, void>* callback, [NativeTypeName("void **")] IntPtr* userdata);

Expand Down
10 changes: 5 additions & 5 deletions SDL3-CS/SDL3/ClangSharp/SDL_mouse.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -155,19 +155,19 @@ public static unsafe partial class SDL3
[NativeTypeName("#define SDL_BUTTON_X2 5")]
public const int SDL_BUTTON_X2 = 5;

[NativeTypeName("#define SDL_BUTTON_LMASK SDL_BUTTON(SDL_BUTTON_LEFT)")]
[NativeTypeName("#define SDL_BUTTON_LMASK SDL_BUTTON_MASK(SDL_BUTTON_LEFT)")]
public const uint SDL_BUTTON_LMASK = (1U << ((1) - 1));

[NativeTypeName("#define SDL_BUTTON_MMASK SDL_BUTTON(SDL_BUTTON_MIDDLE)")]
[NativeTypeName("#define SDL_BUTTON_MMASK SDL_BUTTON_MASK(SDL_BUTTON_MIDDLE)")]
public const uint SDL_BUTTON_MMASK = (1U << ((2) - 1));

[NativeTypeName("#define SDL_BUTTON_RMASK SDL_BUTTON(SDL_BUTTON_RIGHT)")]
[NativeTypeName("#define SDL_BUTTON_RMASK SDL_BUTTON_MASK(SDL_BUTTON_RIGHT)")]
public const uint SDL_BUTTON_RMASK = (1U << ((3) - 1));

[NativeTypeName("#define SDL_BUTTON_X1MASK SDL_BUTTON(SDL_BUTTON_X1)")]
[NativeTypeName("#define SDL_BUTTON_X1MASK SDL_BUTTON_MASK(SDL_BUTTON_X1)")]
public const uint SDL_BUTTON_X1MASK = (1U << ((4) - 1));

[NativeTypeName("#define SDL_BUTTON_X2MASK SDL_BUTTON(SDL_BUTTON_X2)")]
[NativeTypeName("#define SDL_BUTTON_X2MASK SDL_BUTTON_MASK(SDL_BUTTON_X2)")]
public const uint SDL_BUTTON_X2MASK = (1U << ((5) - 1));
}
}
2 changes: 1 addition & 1 deletion SDL3-CS/SDL3/ClangSharp/SDL_render.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ public static unsafe partial class SDL3

[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
[return: NativeTypeName("bool")]
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);
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, double angle, [NativeTypeName("const SDL_FPoint *")] SDL_FPoint* center, SDL_FlipMode flip);

[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
[return: NativeTypeName("bool")]
Expand Down
4 changes: 4 additions & 0 deletions SDL3-CS/SDL3/ClangSharp/SDL_stdinc.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,10 @@ public static unsafe partial class SDL3
[return: NativeTypeName("Uint32")]
public static extern uint SDL_StepUTF8([NativeTypeName("const char **")] byte** pstr, [NativeTypeName("size_t *")] nuint* pslen);

[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
[return: NativeTypeName("Uint32")]
public static extern uint SDL_StepBackUTF8([NativeTypeName("const char *")] byte* start, [NativeTypeName("const char **")] byte** pstr);

[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_UCS4ToUTF8", ExactSpelling = true)]
[return: NativeTypeName("char *")]
public static extern byte* Unsafe_SDL_UCS4ToUTF8([NativeTypeName("Uint32")] uint codepoint, [NativeTypeName("char *")] byte* dst);
Expand Down
2 changes: 1 addition & 1 deletion SDL3-CS/SDL3/ClangSharp/SDL_thread.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public static unsafe partial class SDL3

[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
[return: NativeTypeName("bool")]
public static extern SDLBool SDL_SetThreadPriority(SDL_ThreadPriority priority);
public static extern SDLBool SDL_SetCurrentThreadPriority(SDL_ThreadPriority priority);

[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern void SDL_WaitThread(SDL_Thread* thread, int* status);
Expand Down
3 changes: 3 additions & 0 deletions SDL3-CS/SDL3/ClangSharp/SDL_timer.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ public static unsafe partial class SDL3
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern void SDL_DelayNS([NativeTypeName("Uint64")] ulong ns);

[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern void SDL_DelayPrecise([NativeTypeName("Uint64")] ulong ns);

[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern SDL_TimerID SDL_AddTimer([NativeTypeName("Uint32")] uint interval, [NativeTypeName("SDL_TimerCallback")] delegate* unmanaged[Cdecl]<IntPtr, SDL_TimerID, uint, uint> callback, [NativeTypeName("void*")] IntPtr userdata);

Expand Down
4 changes: 2 additions & 2 deletions SDL3-CS/SDL3/ClangSharp/SDL_version.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public static unsafe partial class SDL3
[NativeTypeName("#define SDL_MINOR_VERSION 1")]
public const int SDL_MINOR_VERSION = 1;

[NativeTypeName("#define SDL_MICRO_VERSION 2")]
public const int SDL_MICRO_VERSION = 2;
[NativeTypeName("#define SDL_MICRO_VERSION 5")]
public const int SDL_MICRO_VERSION = 5;
}
}
2 changes: 1 addition & 1 deletion SDL3-CS/SDL3/ClangSharp/SDL_video.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,7 @@ public static unsafe partial class SDL3
public static extern IntPtr SDL_EGL_GetWindowSurface(SDL_Window* window);

[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern void SDL_EGL_SetAttributeCallbacks([NativeTypeName("SDL_EGLAttribArrayCallback")] delegate* unmanaged[Cdecl]<IntPtr, nint*> platformAttribCallback, [NativeTypeName("SDL_EGLIntArrayCallback")] delegate* unmanaged[Cdecl]<IntPtr, int*> surfaceAttribCallback, [NativeTypeName("SDL_EGLIntArrayCallback")] delegate* unmanaged[Cdecl]<IntPtr, int*> contextAttribCallback, [NativeTypeName("void*")] IntPtr userdata);
public static extern void SDL_EGL_SetAttributeCallbacks([NativeTypeName("SDL_EGLAttribArrayCallback")] delegate* unmanaged[Cdecl]<IntPtr, nint*> platformAttribCallback, [NativeTypeName("SDL_EGLIntArrayCallback")] delegate* unmanaged[Cdecl]<IntPtr, IntPtr, IntPtr, int*> surfaceAttribCallback, [NativeTypeName("SDL_EGLIntArrayCallback")] delegate* unmanaged[Cdecl]<IntPtr, IntPtr, IntPtr, int*> contextAttribCallback, [NativeTypeName("void*")] IntPtr userdata);

[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
[return: NativeTypeName("bool")]
Expand Down

0 comments on commit 012a3dc

Please sign in to comment.