From a7e2d40d8297436186f390a2c02c4eaf5ecb87bb Mon Sep 17 00:00:00 2001 From: botoddly <250804054+botoddly@users.noreply.github.com> Date: Tue, 10 Nov 2026 13:57:08 +0100 Subject: [PATCH 1/2] Move to XDL 3.4.20-11, which also binds XDL_SetWindowInputRegion from 3.4.20-10 --- XDL_VERSION | 2 +- src/XdlSharp/Generated/XDL.g.cs | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/XDL_VERSION b/XDL_VERSION index 76001f6..40ad1df 100644 --- a/XDL_VERSION +++ b/XDL_VERSION @@ -1 +1 @@ -3.4.20-9 +3.4.20-11 diff --git a/src/XdlSharp/Generated/XDL.g.cs b/src/XdlSharp/Generated/XDL.g.cs index 10c0773..767f366 100644 --- a/src/XdlSharp/Generated/XDL.g.cs +++ b/src/XdlSharp/Generated/XDL.g.cs @@ -20,9 +20,17 @@ public static bool XDL_SetWindowMousePassthroughEvents(Pointer windo return Raw.XDL_SetWindowMousePassthroughEvents(window, enabled ? (byte)1 : (byte)0) != 0; } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool XDL_SetWindowInputRegion(Pointer window, Pointer rects, int count) + { + return Raw.XDL_SetWindowInputRegion(window, rects, count) != 0; + } + private static unsafe partial class Raw { [DllImport("XDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern byte XDL_SetWindowMousePassthroughEvents(SDL_Window* window, byte enabled); + [DllImport("XDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + public static extern byte XDL_SetWindowInputRegion(SDL_Window* window, SDL_Rect* rects, int count); } } From ca31b49cd0aff8d1ed86184435843a28d14a2195 Mon Sep 17 00:00:00 2001 From: botoddly <250804054+botoddly@users.noreply.github.com> Date: Tue, 10 Nov 2026 13:57:08 +0100 Subject: [PATCH 2/2] Bind XDL_ttf.h with XDL_SetFontCharSpacing, XDL_SetFontFeatures and XDL_SetFontVariations --- src/XdlSharp/Generated/XDL_ttf.g.cs | 44 +++++++++++++++++++++++++ tests/native/xdlsharp_layout.c | 1 + tools/XdlSharp.Generator/generator.json | 1 + 3 files changed, 46 insertions(+) create mode 100644 src/XdlSharp/Generated/XDL_ttf.g.cs diff --git a/src/XdlSharp/Generated/XDL_ttf.g.cs b/src/XdlSharp/Generated/XDL_ttf.g.cs new file mode 100644 index 0000000..fe25682 --- /dev/null +++ b/src/XdlSharp/Generated/XDL_ttf.g.cs @@ -0,0 +1,44 @@ +// +// Generated by tools/XdlSharp.Generator from the XDL headers. Do not edit. + +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +namespace XdlSharp; + +public static unsafe partial class Xdl +{ + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool XDL_SetFontCharSpacing(Pointer font, float spacing) + { + return Raw.XDL_SetFontCharSpacing(font, spacing) != 0; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool XDL_SetFontFeatures(Pointer font, ReadOnlySpan features) + { + fixed (byte* __features = &MemoryMarshal.GetReference(features)) + { + return Raw.XDL_SetFontFeatures(font, __features) != 0; + } + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool XDL_SetFontVariations(Pointer font, ReadOnlySpan variations) + { + fixed (byte* __variations = &MemoryMarshal.GetReference(variations)) + { + return Raw.XDL_SetFontVariations(font, __variations) != 0; + } + } + + private static unsafe partial class Raw + { + [DllImport("XDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + public static extern byte XDL_SetFontCharSpacing(TTF_Font* font, float spacing); + [DllImport("XDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + public static extern byte XDL_SetFontFeatures(TTF_Font* font, byte* features); + [DllImport("XDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + public static extern byte XDL_SetFontVariations(TTF_Font* font, byte* variations); + } +} diff --git a/tests/native/xdlsharp_layout.c b/tests/native/xdlsharp_layout.c index 46d2817..a9ca0fa 100644 --- a/tests/native/xdlsharp_layout.c +++ b/tests/native/xdlsharp_layout.c @@ -6,6 +6,7 @@ #include #include #include +#include #include typedef struct XdlSharpLayout diff --git a/tools/XdlSharp.Generator/generator.json b/tools/XdlSharp.Generator/generator.json index 0274997..af7ec98 100644 --- a/tools/XdlSharp.Generator/generator.json +++ b/tools/XdlSharp.Generator/generator.json @@ -5,6 +5,7 @@ "SDL3_image/SDL_image.h", "SDL3_ttf/SDL_ttf.h", "SDL3_ttf/SDL_textengine.h", + "SDL3_ttf/XDL_ttf.h", "SDL3_mixer/SDL_mixer.h" ], "libraries": {