diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_system.Android.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_system.Android.g.cs index bb0a852..589c1dc 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_system.Android.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_system.Android.g.cs @@ -29,15 +29,6 @@ using System.Runtime.Versioning; namespace SDL { - public enum SDL_Sandbox - { - SDL_SANDBOX_NONE = 0, - SDL_SANDBOX_UNKNOWN_CONTAINER, - SDL_SANDBOX_FLATPAK, - SDL_SANDBOX_SNAP, - SDL_SANDBOX_MACOS, - } - public static unsafe partial class SDL3 { [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_system.GDK.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_system.GDK.g.cs index 5b6466a..7d3d93b 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_system.GDK.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_system.GDK.g.cs @@ -28,15 +28,6 @@ using System.Runtime.Versioning; namespace SDL { - public enum SDL_Sandbox - { - SDL_SANDBOX_NONE = 0, - SDL_SANDBOX_UNKNOWN_CONTAINER, - SDL_SANDBOX_FLATPAK, - SDL_SANDBOX_SNAP, - SDL_SANDBOX_MACOS, - } - public partial struct XTaskQueueObject { } diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_system.Linux.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_system.Linux.g.cs index ffc7a41..00a3ce3 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_system.Linux.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_system.Linux.g.cs @@ -28,15 +28,6 @@ using System.Runtime.Versioning; namespace SDL { - public enum SDL_Sandbox - { - SDL_SANDBOX_NONE = 0, - SDL_SANDBOX_UNKNOWN_CONTAINER, - SDL_SANDBOX_FLATPAK, - SDL_SANDBOX_SNAP, - SDL_SANDBOX_MACOS, - } - public static partial class SDL3 { [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_system.Windows.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_system.Windows.g.cs index 0f47345..dfac178 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_system.Windows.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_system.Windows.g.cs @@ -29,15 +29,6 @@ using System.Runtime.Versioning; namespace SDL { - public enum SDL_Sandbox - { - SDL_SANDBOX_NONE = 0, - SDL_SANDBOX_UNKNOWN_CONTAINER, - SDL_SANDBOX_FLATPAK, - SDL_SANDBOX_SNAP, - SDL_SANDBOX_MACOS, - } - public static unsafe partial class SDL3 { [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_system.iOS.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_system.iOS.g.cs index 4a11bfe..6b5a4c9 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_system.iOS.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_system.iOS.g.cs @@ -29,15 +29,6 @@ using System.Runtime.Versioning; namespace SDL { - public enum SDL_Sandbox - { - SDL_SANDBOX_NONE = 0, - SDL_SANDBOX_UNKNOWN_CONTAINER, - SDL_SANDBOX_FLATPAK, - SDL_SANDBOX_SNAP, - SDL_SANDBOX_MACOS, - } - public static unsafe partial class SDL3 { [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] diff --git a/SDL3-CS/generate_bindings.py b/SDL3-CS/generate_bindings.py index 233a022..862b1c9 100644 --- a/SDL3-CS/generate_bindings.py +++ b/SDL3-CS/generate_bindings.py @@ -289,13 +289,13 @@ def run_clangsharp(command, header: Header): # regex for ClangSharp-generated SDL functions -generated_function_regex = re.compile(r"public static extern \w+\** (SDL_\w+)\(") +generated_symbol_regex = re.compile(r"public (enum|static extern \w+\**) (SDL_\w+)") -def get_generated_functions(file): +def get_generated_symbols(file): with open(file, "r", encoding="utf-8") as f: - for match in generated_function_regex.finditer(f.read()): - yield match.group(1) + for match in generated_symbol_regex.finditer(f.read()): + yield match.group(2) def generate_platform_specific_headers(sdl_api, header: Header, platforms): @@ -303,15 +303,15 @@ def generate_platform_specific_headers(sdl_api, header: Header, platforms): print(f"💠 {header} platform agnostic") platform_agnostic_cs = run_clangsharp(base_command, header) - platform_agnostic_functions = list(get_generated_functions(platform_agnostic_cs)) + platform_agnostic_symbols = list(get_generated_symbols(platform_agnostic_cs)) output_files = [platform_agnostic_cs] for (defines, suffix, platform_name) in platforms: command = base_command + ["--define-macro"] + defines - if platform_agnostic_functions: + if platform_agnostic_symbols: command.append("--exclude") - command.extend(platform_agnostic_functions) + command.extend(platform_agnostic_symbols) if all_functions: command.append("--with-attribute")