From 95165b55eacf1e59cc638cd75c8d495db3eb4f76 Mon Sep 17 00:00:00 2001 From: Susko3 Date: Sat, 15 Nov 2025 01:05:22 +0100 Subject: [PATCH] Update SDL bindings --- External/SDL | 2 +- External/SDL_image | 2 +- External/SDL_mixer | 2 +- External/SDL_ttf | 2 +- SDL3-CS/SDL3/ClangSharp/SDL_cpuinfo.g.cs | 3 + SDL3-CS/SDL3/ClangSharp/SDL_events.g.cs | 26 +++- SDL3-CS/SDL3/ClangSharp/SDL_gpu.g.cs | 54 +++++++-- SDL3-CS/SDL3/ClangSharp/SDL_hints.g.cs | 36 +++++- SDL3-CS/SDL3/ClangSharp/SDL_mouse.g.cs | 11 ++ SDL3-CS/SDL3/ClangSharp/SDL_pen.g.cs | 13 ++ SDL3-CS/SDL3/ClangSharp/SDL_properties.g.cs | 3 + SDL3-CS/SDL3/ClangSharp/SDL_render.g.cs | 47 +++++++- SDL3-CS/SDL3/ClangSharp/SDL_surface.g.cs | 23 ++++ SDL3-CS/SDL3/ClangSharp/SDL_version.g.cs | 6 +- SDL3-CS/SDL3/ClangSharp/SDL_video.g.cs | 6 + .../SDL3_image/ClangSharp/SDL_image.g.cs | 111 +++++++++++++----- 16 files changed, 295 insertions(+), 52 deletions(-) diff --git a/External/SDL b/External/SDL index 4efdfd9..cb6272e 160000 --- a/External/SDL +++ b/External/SDL @@ -1 +1 @@ -Subproject commit 4efdfd92a24ff3bbe6780666189000bf5d84ed30 +Subproject commit cb6272ed2d894d597f518d5a116a546e2fc5c7cf diff --git a/External/SDL_image b/External/SDL_image index e47ff6f..07f8eeb 160000 --- a/External/SDL_image +++ b/External/SDL_image @@ -1 +1 @@ -Subproject commit e47ff6fa4e9092eec66c1b95118be0fa574c7933 +Subproject commit 07f8eeba01705497a8bc1d7892b4bef54820afc7 diff --git a/External/SDL_mixer b/External/SDL_mixer index 1729977..4182794 160000 --- a/External/SDL_mixer +++ b/External/SDL_mixer @@ -1 +1 @@ -Subproject commit 172997758bb69c9217a2caec57bd9450d86dc558 +Subproject commit 4182794ea45fe28568728670c6f1583855d0e85c diff --git a/External/SDL_ttf b/External/SDL_ttf index 7285911..cb303d4 160000 --- a/External/SDL_ttf +++ b/External/SDL_ttf @@ -1 +1 @@ -Subproject commit 7285911aea1df44f6522a8c43025a962493c6c24 +Subproject commit cb303d4eb7838122b04b2d6f41c45faff0598374 diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_cpuinfo.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_cpuinfo.g.cs index 88a70be..18c7ec8 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_cpuinfo.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_cpuinfo.g.cs @@ -98,6 +98,9 @@ namespace SDL [return: NativeTypeName("size_t")] public static extern nuint SDL_GetSIMDAlignment(); + [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + public static extern int SDL_GetSystemPageSize(); + [NativeTypeName("#define SDL_CACHELINE_SIZE 128")] public const int SDL_CACHELINE_SIZE = 128; } diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_events.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_events.g.cs index 851880e..e6bdea1 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_events.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_events.g.cs @@ -48,8 +48,9 @@ namespace SDL SDL_EVENT_DISPLAY_DESKTOP_MODE_CHANGED, SDL_EVENT_DISPLAY_CURRENT_MODE_CHANGED, SDL_EVENT_DISPLAY_CONTENT_SCALE_CHANGED, + SDL_EVENT_DISPLAY_USABLE_BOUNDS_CHANGED, SDL_EVENT_DISPLAY_FIRST = SDL_EVENT_DISPLAY_ORIENTATION, - SDL_EVENT_DISPLAY_LAST = SDL_EVENT_DISPLAY_CONTENT_SCALE_CHANGED, + SDL_EVENT_DISPLAY_LAST = SDL_EVENT_DISPLAY_USABLE_BOUNDS_CHANGED, SDL_EVENT_WINDOW_SHOWN = 0x202, SDL_EVENT_WINDOW_HIDDEN, SDL_EVENT_WINDOW_EXPOSED, @@ -85,6 +86,8 @@ namespace SDL SDL_EVENT_KEYBOARD_ADDED, SDL_EVENT_KEYBOARD_REMOVED, SDL_EVENT_TEXT_EDITING_CANDIDATES, + SDL_EVENT_SCREEN_KEYBOARD_SHOWN, + SDL_EVENT_SCREEN_KEYBOARD_HIDDEN, SDL_EVENT_MOUSE_MOTION = 0x400, SDL_EVENT_MOUSE_BUTTON_DOWN, SDL_EVENT_MOUSE_BUTTON_UP, @@ -116,6 +119,9 @@ namespace SDL SDL_EVENT_FINGER_UP, SDL_EVENT_FINGER_MOTION, SDL_EVENT_FINGER_CANCELED, + SDL_EVENT_PINCH_BEGIN = 0x710, + SDL_EVENT_PINCH_UPDATE, + SDL_EVENT_PINCH_END, SDL_EVENT_CLIPBOARD_UPDATE = 0x900, SDL_EVENT_DROP_FILE = 0x1000, SDL_EVENT_DROP_TEXT, @@ -758,6 +764,21 @@ namespace SDL public SDL_WindowID windowID; } + public partial struct SDL_PinchFingerEvent + { + public SDL_EventType type; + + [NativeTypeName("Uint32")] + public uint reserved; + + [NativeTypeName("Uint64")] + public ulong timestamp; + + public float scale; + + public SDL_WindowID windowID; + } + public partial struct SDL_PenProximityEvent { public SDL_EventType type; @@ -1069,6 +1090,9 @@ namespace SDL [FieldOffset(0)] public SDL_TouchFingerEvent tfinger; + [FieldOffset(0)] + public SDL_PinchFingerEvent pinch; + [FieldOffset(0)] public SDL_PenProximityEvent pproximity; diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_gpu.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_gpu.g.cs index d3dc028..23c3f38 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_gpu.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_gpu.g.cs @@ -1008,10 +1008,10 @@ namespace SDL public byte clear_stencil; [NativeTypeName("Uint8")] - public byte padding1; + public byte mip_level; [NativeTypeName("Uint8")] - public byte padding2; + public byte layer; } public partial struct SDL_GPUBlitInfo @@ -1096,6 +1096,30 @@ namespace SDL public byte padding3; } + public unsafe partial struct SDL_GPUVulkanOptions + { + [NativeTypeName("Uint32")] + public uint vulkan_api_version; + + [NativeTypeName("void*")] + public IntPtr feature_list; + + [NativeTypeName("void*")] + public IntPtr vulkan_10_physical_device_features; + + [NativeTypeName("Uint32")] + public uint device_extension_count; + + [NativeTypeName("const char **")] + public byte** device_extension_names; + + [NativeTypeName("Uint32")] + public uint instance_extension_count; + + [NativeTypeName("const char **")] + public byte** instance_extension_names; + } + public static unsafe partial class SDL3 { [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] @@ -1489,6 +1513,18 @@ namespace SDL [NativeTypeName("#define SDL_PROP_GPU_DEVICE_CREATE_NAME_STRING \"SDL.gpu.device.create.name\"")] public static ReadOnlySpan SDL_PROP_GPU_DEVICE_CREATE_NAME_STRING => "SDL.gpu.device.create.name"u8; + [NativeTypeName("#define SDL_PROP_GPU_DEVICE_CREATE_FEATURE_CLIP_DISTANCE_BOOLEAN \"SDL.gpu.device.create.feature.clip_distance\"")] + public static ReadOnlySpan SDL_PROP_GPU_DEVICE_CREATE_FEATURE_CLIP_DISTANCE_BOOLEAN => "SDL.gpu.device.create.feature.clip_distance"u8; + + [NativeTypeName("#define SDL_PROP_GPU_DEVICE_CREATE_FEATURE_DEPTH_CLAMPING_BOOLEAN \"SDL.gpu.device.create.feature.depth_clamping\"")] + public static ReadOnlySpan SDL_PROP_GPU_DEVICE_CREATE_FEATURE_DEPTH_CLAMPING_BOOLEAN => "SDL.gpu.device.create.feature.depth_clamping"u8; + + [NativeTypeName("#define SDL_PROP_GPU_DEVICE_CREATE_FEATURE_INDIRECT_DRAW_FIRST_INSTANCE_BOOLEAN \"SDL.gpu.device.create.feature.indirect_draw_first_instance\"")] + public static ReadOnlySpan SDL_PROP_GPU_DEVICE_CREATE_FEATURE_INDIRECT_DRAW_FIRST_INSTANCE_BOOLEAN => "SDL.gpu.device.create.feature.indirect_draw_first_instance"u8; + + [NativeTypeName("#define SDL_PROP_GPU_DEVICE_CREATE_FEATURE_ANISOTROPY_BOOLEAN \"SDL.gpu.device.create.feature.anisotropy\"")] + public static ReadOnlySpan SDL_PROP_GPU_DEVICE_CREATE_FEATURE_ANISOTROPY_BOOLEAN => "SDL.gpu.device.create.feature.anisotropy"u8; + [NativeTypeName("#define SDL_PROP_GPU_DEVICE_CREATE_SHADERS_PRIVATE_BOOLEAN \"SDL.gpu.device.create.shaders.private\"")] public static ReadOnlySpan SDL_PROP_GPU_DEVICE_CREATE_SHADERS_PRIVATE_BOOLEAN => "SDL.gpu.device.create.shaders.private"u8; @@ -1513,17 +1549,11 @@ namespace SDL [NativeTypeName("#define SDL_PROP_GPU_DEVICE_CREATE_D3D12_SEMANTIC_NAME_STRING \"SDL.gpu.device.create.d3d12.semantic\"")] public static ReadOnlySpan SDL_PROP_GPU_DEVICE_CREATE_D3D12_SEMANTIC_NAME_STRING => "SDL.gpu.device.create.d3d12.semantic"u8; - [NativeTypeName("#define SDL_PROP_GPU_DEVICE_CREATE_VULKAN_SHADERCLIPDISTANCE_BOOLEAN \"SDL.gpu.device.create.vulkan.shaderclipdistance\"")] - public static ReadOnlySpan SDL_PROP_GPU_DEVICE_CREATE_VULKAN_SHADERCLIPDISTANCE_BOOLEAN => "SDL.gpu.device.create.vulkan.shaderclipdistance"u8; + [NativeTypeName("#define SDL_PROP_GPU_DEVICE_CREATE_VULKAN_REQUIRE_HARDWARE_ACCELERATION_BOOLEAN \"SDL.gpu.device.create.vulkan.requirehardwareacceleration\"")] + public static ReadOnlySpan SDL_PROP_GPU_DEVICE_CREATE_VULKAN_REQUIRE_HARDWARE_ACCELERATION_BOOLEAN => "SDL.gpu.device.create.vulkan.requirehardwareacceleration"u8; - [NativeTypeName("#define SDL_PROP_GPU_DEVICE_CREATE_VULKAN_DEPTHCLAMP_BOOLEAN \"SDL.gpu.device.create.vulkan.depthclamp\"")] - public static ReadOnlySpan SDL_PROP_GPU_DEVICE_CREATE_VULKAN_DEPTHCLAMP_BOOLEAN => "SDL.gpu.device.create.vulkan.depthclamp"u8; - - [NativeTypeName("#define SDL_PROP_GPU_DEVICE_CREATE_VULKAN_DRAWINDIRECTFIRST_BOOLEAN \"SDL.gpu.device.create.vulkan.drawindirectfirstinstance\"")] - public static ReadOnlySpan SDL_PROP_GPU_DEVICE_CREATE_VULKAN_DRAWINDIRECTFIRST_BOOLEAN => "SDL.gpu.device.create.vulkan.drawindirectfirstinstance"u8; - - [NativeTypeName("#define SDL_PROP_GPU_DEVICE_CREATE_VULKAN_SAMPLERANISOTROPY_BOOLEAN \"SDL.gpu.device.create.vulkan.sampleranisotropy\"")] - public static ReadOnlySpan SDL_PROP_GPU_DEVICE_CREATE_VULKAN_SAMPLERANISOTROPY_BOOLEAN => "SDL.gpu.device.create.vulkan.sampleranisotropy"u8; + [NativeTypeName("#define SDL_PROP_GPU_DEVICE_CREATE_VULKAN_OPTIONS_POINTER \"SDL.gpu.device.create.vulkan.options\"")] + public static ReadOnlySpan SDL_PROP_GPU_DEVICE_CREATE_VULKAN_OPTIONS_POINTER => "SDL.gpu.device.create.vulkan.options"u8; [NativeTypeName("#define SDL_PROP_GPU_DEVICE_NAME_STRING \"SDL.gpu.device.name\"")] public static ReadOnlySpan SDL_PROP_GPU_DEVICE_NAME_STRING => "SDL.gpu.device.name"u8; diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_hints.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_hints.g.cs index 2d51f25..b287764 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_hints.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_hints.g.cs @@ -121,6 +121,9 @@ namespace SDL [NativeTypeName("#define SDL_HINT_AUDIO_DEVICE_STREAM_ROLE \"SDL_AUDIO_DEVICE_STREAM_ROLE\"")] public static ReadOnlySpan SDL_HINT_AUDIO_DEVICE_STREAM_ROLE => "SDL_AUDIO_DEVICE_STREAM_ROLE"u8; + [NativeTypeName("#define SDL_HINT_AUDIO_DEVICE_RAW_STREAM \"SDL_AUDIO_DEVICE_RAW_STREAM\"")] + public static ReadOnlySpan SDL_HINT_AUDIO_DEVICE_RAW_STREAM => "SDL_AUDIO_DEVICE_RAW_STREAM"u8; + [NativeTypeName("#define SDL_HINT_AUDIO_DISK_INPUT_FILE \"SDL_AUDIO_DISK_INPUT_FILE\"")] public static ReadOnlySpan SDL_HINT_AUDIO_DISK_INPUT_FILE => "SDL_AUDIO_DISK_INPUT_FILE"u8; @@ -169,6 +172,9 @@ namespace SDL [NativeTypeName("#define SDL_HINT_DISPLAY_USABLE_BOUNDS \"SDL_DISPLAY_USABLE_BOUNDS\"")] public static ReadOnlySpan SDL_HINT_DISPLAY_USABLE_BOUNDS => "SDL_DISPLAY_USABLE_BOUNDS"u8; + [NativeTypeName("#define SDL_HINT_INVALID_PARAM_CHECKS \"SDL_INVALID_PARAM_CHECKS\"")] + public static ReadOnlySpan SDL_HINT_INVALID_PARAM_CHECKS => "SDL_INVALID_PARAM_CHECKS"u8; + [NativeTypeName("#define SDL_HINT_EMSCRIPTEN_ASYNCIFY \"SDL_EMSCRIPTEN_ASYNCIFY\"")] public static ReadOnlySpan SDL_HINT_EMSCRIPTEN_ASYNCIFY => "SDL_EMSCRIPTEN_ASYNCIFY"u8; @@ -178,6 +184,9 @@ namespace SDL [NativeTypeName("#define SDL_HINT_EMSCRIPTEN_KEYBOARD_ELEMENT \"SDL_EMSCRIPTEN_KEYBOARD_ELEMENT\"")] public static ReadOnlySpan SDL_HINT_EMSCRIPTEN_KEYBOARD_ELEMENT => "SDL_EMSCRIPTEN_KEYBOARD_ELEMENT"u8; + [NativeTypeName("#define SDL_HINT_EMSCRIPTEN_FILL_DOCUMENT \"SDL_EMSCRIPTEN_FILL_DOCUMENT\"")] + public static ReadOnlySpan SDL_HINT_EMSCRIPTEN_FILL_DOCUMENT => "SDL_EMSCRIPTEN_FILL_DOCUMENT"u8; + [NativeTypeName("#define SDL_HINT_ENABLE_SCREEN_KEYBOARD \"SDL_ENABLE_SCREEN_KEYBOARD\"")] public static ReadOnlySpan SDL_HINT_ENABLE_SCREEN_KEYBOARD => "SDL_ENABLE_SCREEN_KEYBOARD"u8; @@ -355,6 +364,9 @@ namespace SDL [NativeTypeName("#define SDL_HINT_JOYSTICK_HIDAPI_SINPUT \"SDL_JOYSTICK_HIDAPI_SINPUT\"")] public static ReadOnlySpan SDL_HINT_JOYSTICK_HIDAPI_SINPUT => "SDL_JOYSTICK_HIDAPI_SINPUT"u8; + [NativeTypeName("#define SDL_HINT_JOYSTICK_HIDAPI_ZUIKI \"SDL_JOYSTICK_HIDAPI_ZUIKI\"")] + public static ReadOnlySpan SDL_HINT_JOYSTICK_HIDAPI_ZUIKI => "SDL_JOYSTICK_HIDAPI_ZUIKI"u8; + [NativeTypeName("#define SDL_HINT_JOYSTICK_HIDAPI_FLYDIGI \"SDL_JOYSTICK_HIDAPI_FLYDIGI\"")] public static ReadOnlySpan SDL_HINT_JOYSTICK_HIDAPI_FLYDIGI => "SDL_JOYSTICK_HIDAPI_FLYDIGI"u8; @@ -463,6 +475,9 @@ namespace SDL [NativeTypeName("#define SDL_HINT_KMSDRM_REQUIRE_DRM_MASTER \"SDL_KMSDRM_REQUIRE_DRM_MASTER\"")] public static ReadOnlySpan SDL_HINT_KMSDRM_REQUIRE_DRM_MASTER => "SDL_KMSDRM_REQUIRE_DRM_MASTER"u8; + [NativeTypeName("#define SDL_HINT_KMSDRM_ATOMIC \"SDL_KMSDRM_ATOMIC\"")] + public static ReadOnlySpan SDL_HINT_KMSDRM_ATOMIC => "SDL_KMSDRM_ATOMIC"u8; + [NativeTypeName("#define SDL_HINT_LOGGING \"SDL_LOGGING\"")] public static ReadOnlySpan SDL_HINT_LOGGING => "SDL_LOGGING"u8; @@ -592,6 +607,18 @@ namespace SDL [NativeTypeName("#define SDL_HINT_ROG_GAMEPAD_MICE_EXCLUDED \"SDL_ROG_GAMEPAD_MICE_EXCLUDED\"")] public static ReadOnlySpan SDL_HINT_ROG_GAMEPAD_MICE_EXCLUDED => "SDL_ROG_GAMEPAD_MICE_EXCLUDED"u8; + [NativeTypeName("#define SDL_HINT_PS2_GS_WIDTH \"SDL_PS2_GS_WIDTH\"")] + public static ReadOnlySpan SDL_HINT_PS2_GS_WIDTH => "SDL_PS2_GS_WIDTH"u8; + + [NativeTypeName("#define SDL_HINT_PS2_GS_HEIGHT \"SDL_PS2_GS_HEIGHT\"")] + public static ReadOnlySpan SDL_HINT_PS2_GS_HEIGHT => "SDL_PS2_GS_HEIGHT"u8; + + [NativeTypeName("#define SDL_HINT_PS2_GS_PROGRESSIVE \"SDL_PS2_GS_PROGRESSIVE\"")] + public static ReadOnlySpan SDL_HINT_PS2_GS_PROGRESSIVE => "SDL_PS2_GS_PROGRESSIVE"u8; + + [NativeTypeName("#define SDL_HINT_PS2_GS_MODE \"SDL_PS2_GS_MODE\"")] + public static ReadOnlySpan SDL_HINT_PS2_GS_MODE => "SDL_PS2_GS_MODE"u8; + [NativeTypeName("#define SDL_HINT_RPI_VIDEO_LAYER \"SDL_RPI_VIDEO_LAYER\"")] public static ReadOnlySpan SDL_HINT_RPI_VIDEO_LAYER => "SDL_RPI_VIDEO_LAYER"u8; @@ -652,6 +679,9 @@ namespace SDL [NativeTypeName("#define SDL_HINT_VIDEO_MAC_FULLSCREEN_MENU_VISIBILITY \"SDL_VIDEO_MAC_FULLSCREEN_MENU_VISIBILITY\"")] public static ReadOnlySpan SDL_HINT_VIDEO_MAC_FULLSCREEN_MENU_VISIBILITY => "SDL_VIDEO_MAC_FULLSCREEN_MENU_VISIBILITY"u8; + [NativeTypeName("#define SDL_HINT_VIDEO_METAL_AUTO_RESIZE_DRAWABLE \"SDL_VIDEO_METAL_AUTO_RESIZE_DRAWABLE\"")] + public static ReadOnlySpan SDL_HINT_VIDEO_METAL_AUTO_RESIZE_DRAWABLE => "SDL_VIDEO_METAL_AUTO_RESIZE_DRAWABLE"u8; + [NativeTypeName("#define SDL_HINT_VIDEO_MATCH_EXCLUSIVE_MODE_ON_MOVE \"SDL_VIDEO_MATCH_EXCLUSIVE_MODE_ON_MOVE\"")] public static ReadOnlySpan SDL_HINT_VIDEO_MATCH_EXCLUSIVE_MODE_ON_MOVE => "SDL_VIDEO_MATCH_EXCLUSIVE_MODE_ON_MOVE"u8; @@ -772,6 +802,9 @@ namespace SDL [NativeTypeName("#define SDL_HINT_WINDOWS_RAW_KEYBOARD \"SDL_WINDOWS_RAW_KEYBOARD\"")] public static ReadOnlySpan SDL_HINT_WINDOWS_RAW_KEYBOARD => "SDL_WINDOWS_RAW_KEYBOARD"u8; + [NativeTypeName("#define SDL_HINT_WINDOWS_RAW_KEYBOARD_EXCLUDE_HOTKEYS \"SDL_WINDOWS_RAW_KEYBOARD_EXCLUDE_HOTKEYS\"")] + public static ReadOnlySpan SDL_HINT_WINDOWS_RAW_KEYBOARD_EXCLUDE_HOTKEYS => "SDL_WINDOWS_RAW_KEYBOARD_EXCLUDE_HOTKEYS"u8; + [NativeTypeName("#define SDL_HINT_WINDOWS_FORCE_SEMAPHORE_KERNEL \"SDL_WINDOWS_FORCE_SEMAPHORE_KERNEL\"")] public static ReadOnlySpan SDL_HINT_WINDOWS_FORCE_SEMAPHORE_KERNEL => "SDL_WINDOWS_FORCE_SEMAPHORE_KERNEL"u8; @@ -807,8 +840,5 @@ namespace SDL [NativeTypeName("#define SDL_HINT_PEN_TOUCH_EVENTS \"SDL_PEN_TOUCH_EVENTS\"")] public static ReadOnlySpan SDL_HINT_PEN_TOUCH_EVENTS => "SDL_PEN_TOUCH_EVENTS"u8; - - [NativeTypeName("#define SDL_HINT_DEBUG_LOGGING \"SDL_DEBUG_LOGGING\"")] - public static ReadOnlySpan SDL_HINT_DEBUG_LOGGING => "SDL_DEBUG_LOGGING"u8; } } diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_mouse.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_mouse.g.cs index f8da440..3ac233c 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_mouse.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_mouse.g.cs @@ -63,6 +63,14 @@ namespace SDL SDL_MOUSEWHEEL_FLIPPED, } + public unsafe partial struct SDL_CursorFrameInfo + { + public SDL_Surface* surface; + + [NativeTypeName("Uint32")] + public uint duration; + } + public static unsafe partial class SDL3 { [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] @@ -117,6 +125,9 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_Cursor* SDL_CreateColorCursor(SDL_Surface* surface, int hot_x, int hot_y); + [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + public static extern SDL_Cursor* SDL_CreateAnimatedCursor(SDL_CursorFrameInfo* frames, int frame_count, int hot_x, int hot_y); + [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_Cursor* SDL_CreateSystemCursor(SDL_SystemCursor id); diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_pen.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_pen.g.cs index 0d7e382..64b05e3 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_pen.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_pen.g.cs @@ -23,6 +23,8 @@ 3. This notice may not be removed or altered from any source distribution. */ +using System.Runtime.InteropServices; + namespace SDL { public enum SDL_PenAxis @@ -37,8 +39,19 @@ namespace SDL SDL_PEN_AXIS_COUNT, } + public enum SDL_PenDeviceType + { + SDL_PEN_DEVICE_TYPE_INVALID = -1, + SDL_PEN_DEVICE_TYPE_UNKNOWN, + SDL_PEN_DEVICE_TYPE_DIRECT, + SDL_PEN_DEVICE_TYPE_INDIRECT, + } + public static partial class SDL3 { + [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + public static extern SDL_PenDeviceType SDL_GetPenDeviceType(SDL_PenID instance_id); + [NativeTypeName("#define SDL_PEN_INPUT_DOWN (1u << 0)")] public const uint SDL_PEN_INPUT_DOWN = (1U << 0); diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_properties.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_properties.g.cs index dee34c9..f0ba3f6 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_properties.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_properties.g.cs @@ -117,5 +117,8 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_DestroyProperties(SDL_PropertiesID props); + + [NativeTypeName("#define SDL_PROP_NAME_STRING \"SDL.name\"")] + public static ReadOnlySpan SDL_PROP_NAME_STRING => "SDL.name"u8; } } diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_render.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_render.g.cs index c3e0ee9..bece0ce 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_render.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_render.g.cs @@ -125,7 +125,10 @@ namespace SDL public static extern SDL_Renderer* SDL_CreateRendererWithProperties(SDL_PropertiesID props); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_Renderer* SDL_CreateGPURenderer(SDL_Window* window, SDL_GPUShaderFormat format_flags, SDL_GPUDevice** device); + public static extern SDL_Renderer* SDL_CreateGPURenderer(SDL_GPUDevice* device, SDL_Window* window); + + [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + public static extern SDL_GPUDevice* SDL_GetGPURendererDevice(SDL_Renderer* renderer); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_Renderer* SDL_CreateSoftwareRenderer(SDL_Surface* surface); @@ -170,6 +173,13 @@ namespace SDL [return: NativeTypeName("bool")] 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 SDLBool SDL_SetTexturePalette(SDL_Texture* texture, SDL_Palette* palette); + + [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + public static extern SDL_Palette* SDL_GetTexturePalette(SDL_Texture* texture); + [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] public static extern SDLBool SDL_SetTextureColorMod(SDL_Texture* texture, [NativeTypeName("Uint8")] byte r, [NativeTypeName("Uint8")] byte g, [NativeTypeName("Uint8")] byte b); @@ -478,7 +488,7 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern SDLBool SDL_SetRenderGPUState(SDL_Renderer* renderer, SDL_GPURenderState* state); + public static extern SDLBool SDL_SetGPURenderState(SDL_Renderer* renderer, SDL_GPURenderState* state); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_DestroyGPURenderState(SDL_GPURenderState* state); @@ -486,6 +496,9 @@ namespace SDL [NativeTypeName("#define SDL_SOFTWARE_RENDERER \"software\"")] public static ReadOnlySpan SDL_SOFTWARE_RENDERER => "software"u8; + [NativeTypeName("#define SDL_GPU_RENDERER \"gpu\"")] + public static ReadOnlySpan SDL_GPU_RENDERER => "gpu"u8; + [NativeTypeName("#define SDL_PROP_RENDERER_CREATE_NAME_STRING \"SDL.renderer.create.name\"")] public static ReadOnlySpan SDL_PROP_RENDERER_CREATE_NAME_STRING => "SDL.renderer.create.name"u8; @@ -501,6 +514,9 @@ namespace SDL [NativeTypeName("#define SDL_PROP_RENDERER_CREATE_PRESENT_VSYNC_NUMBER \"SDL.renderer.create.present_vsync\"")] public static ReadOnlySpan SDL_PROP_RENDERER_CREATE_PRESENT_VSYNC_NUMBER => "SDL.renderer.create.present_vsync"u8; + [NativeTypeName("#define SDL_PROP_RENDERER_CREATE_GPU_DEVICE_POINTER \"SDL.renderer.create.gpu.device\"")] + public static ReadOnlySpan SDL_PROP_RENDERER_CREATE_GPU_DEVICE_POINTER => "SDL.renderer.create.gpu.device"u8; + [NativeTypeName("#define SDL_PROP_RENDERER_CREATE_GPU_SHADERS_SPIRV_BOOLEAN \"SDL.renderer.create.gpu.shaders_spirv\"")] public static ReadOnlySpan SDL_PROP_RENDERER_CREATE_GPU_SHADERS_SPIRV_BOOLEAN => "SDL.renderer.create.gpu.shaders_spirv"u8; @@ -546,6 +562,9 @@ namespace SDL [NativeTypeName("#define SDL_PROP_RENDERER_TEXTURE_FORMATS_POINTER \"SDL.renderer.texture_formats\"")] public static ReadOnlySpan SDL_PROP_RENDERER_TEXTURE_FORMATS_POINTER => "SDL.renderer.texture_formats"u8; + [NativeTypeName("#define SDL_PROP_RENDERER_TEXTURE_WRAPPING_BOOLEAN \"SDL.renderer.texture_wrapping\"")] + public static ReadOnlySpan SDL_PROP_RENDERER_TEXTURE_WRAPPING_BOOLEAN => "SDL.renderer.texture_wrapping"u8; + [NativeTypeName("#define SDL_PROP_RENDERER_OUTPUT_COLORSPACE_NUMBER \"SDL.renderer.output_colorspace\"")] public static ReadOnlySpan SDL_PROP_RENDERER_OUTPUT_COLORSPACE_NUMBER => "SDL.renderer.output_colorspace"u8; @@ -615,6 +634,9 @@ namespace SDL [NativeTypeName("#define SDL_PROP_TEXTURE_CREATE_HEIGHT_NUMBER \"SDL.texture.create.height\"")] public static ReadOnlySpan SDL_PROP_TEXTURE_CREATE_HEIGHT_NUMBER => "SDL.texture.create.height"u8; + [NativeTypeName("#define SDL_PROP_TEXTURE_CREATE_PALETTE_POINTER \"SDL.texture.create.palette\"")] + public static ReadOnlySpan SDL_PROP_TEXTURE_CREATE_PALETTE_POINTER => "SDL.texture.create.palette"u8; + [NativeTypeName("#define SDL_PROP_TEXTURE_CREATE_SDR_WHITE_POINT_FLOAT \"SDL.texture.create.SDR_white_point\"")] public static ReadOnlySpan SDL_PROP_TEXTURE_CREATE_SDR_WHITE_POINT_FLOAT => "SDL.texture.create.SDR_white_point"u8; @@ -669,6 +691,18 @@ namespace SDL [NativeTypeName("#define SDL_PROP_TEXTURE_CREATE_VULKAN_TEXTURE_NUMBER \"SDL.texture.create.vulkan.texture\"")] public static ReadOnlySpan SDL_PROP_TEXTURE_CREATE_VULKAN_TEXTURE_NUMBER => "SDL.texture.create.vulkan.texture"u8; + [NativeTypeName("#define SDL_PROP_TEXTURE_CREATE_GPU_TEXTURE_POINTER \"SDL.texture.create.gpu.texture\"")] + public static ReadOnlySpan SDL_PROP_TEXTURE_CREATE_GPU_TEXTURE_POINTER => "SDL.texture.create.gpu.texture"u8; + + [NativeTypeName("#define SDL_PROP_TEXTURE_CREATE_GPU_TEXTURE_UV_POINTER \"SDL.texture.create.gpu.texture_uv\"")] + public static ReadOnlySpan SDL_PROP_TEXTURE_CREATE_GPU_TEXTURE_UV_POINTER => "SDL.texture.create.gpu.texture_uv"u8; + + [NativeTypeName("#define SDL_PROP_TEXTURE_CREATE_GPU_TEXTURE_U_POINTER \"SDL.texture.create.gpu.texture_u\"")] + public static ReadOnlySpan SDL_PROP_TEXTURE_CREATE_GPU_TEXTURE_U_POINTER => "SDL.texture.create.gpu.texture_u"u8; + + [NativeTypeName("#define SDL_PROP_TEXTURE_CREATE_GPU_TEXTURE_V_POINTER \"SDL.texture.create.gpu.texture_v\"")] + public static ReadOnlySpan SDL_PROP_TEXTURE_CREATE_GPU_TEXTURE_V_POINTER => "SDL.texture.create.gpu.texture_v"u8; + [NativeTypeName("#define SDL_PROP_TEXTURE_COLORSPACE_NUMBER \"SDL.texture.colorspace\"")] public static ReadOnlySpan SDL_PROP_TEXTURE_COLORSPACE_NUMBER => "SDL.texture.colorspace"u8; @@ -750,6 +784,15 @@ namespace SDL [NativeTypeName("#define SDL_PROP_TEXTURE_GPU_TEXTURE_POINTER \"SDL.texture.gpu.texture\"")] public static ReadOnlySpan SDL_PROP_TEXTURE_GPU_TEXTURE_POINTER => "SDL.texture.gpu.texture"u8; + [NativeTypeName("#define SDL_PROP_TEXTURE_GPU_TEXTURE_UV_POINTER \"SDL.texture.gpu.texture_uv\"")] + public static ReadOnlySpan SDL_PROP_TEXTURE_GPU_TEXTURE_UV_POINTER => "SDL.texture.gpu.texture_uv"u8; + + [NativeTypeName("#define SDL_PROP_TEXTURE_GPU_TEXTURE_U_POINTER \"SDL.texture.gpu.texture_u\"")] + public static ReadOnlySpan SDL_PROP_TEXTURE_GPU_TEXTURE_U_POINTER => "SDL.texture.gpu.texture_u"u8; + + [NativeTypeName("#define SDL_PROP_TEXTURE_GPU_TEXTURE_V_POINTER \"SDL.texture.gpu.texture_v\"")] + public static ReadOnlySpan SDL_PROP_TEXTURE_GPU_TEXTURE_V_POINTER => "SDL.texture.gpu.texture_v"u8; + [NativeTypeName("#define SDL_RENDERER_VSYNC_DISABLED 0")] public const int SDL_RENDERER_VSYNC_DISABLED = 0; diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_surface.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_surface.g.cs index 4bd0370..2218e5b 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_surface.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_surface.g.cs @@ -117,6 +117,12 @@ namespace SDL [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_LoadSurface_IO(SDL_IOStream* src, [NativeTypeName("bool")] SDLBool closeio); + + [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + public static extern SDL_Surface* SDL_LoadSurface([NativeTypeName("const char *")] byte* file); + [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_Surface* SDL_LoadBMP_IO(SDL_IOStream* src, [NativeTypeName("bool")] SDLBool closeio); @@ -131,6 +137,20 @@ namespace SDL [return: NativeTypeName("bool")] public static extern SDLBool SDL_SaveBMP(SDL_Surface* surface, [NativeTypeName("const char *")] byte* file); + [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + public static extern SDL_Surface* SDL_LoadPNG_IO(SDL_IOStream* src, [NativeTypeName("bool")] SDLBool closeio); + + [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + public static extern SDL_Surface* SDL_LoadPNG([NativeTypeName("const char *")] byte* file); + + [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + [return: NativeTypeName("bool")] + public static extern SDLBool SDL_SavePNG_IO(SDL_Surface* surface, SDL_IOStream* dst, [NativeTypeName("bool")] SDLBool closeio); + + [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + [return: NativeTypeName("bool")] + public static extern SDLBool SDL_SavePNG(SDL_Surface* surface, [NativeTypeName("const char *")] byte* file); + [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] public static extern SDLBool SDL_SetSurfaceRLE(SDL_Surface* surface, [NativeTypeName("bool")] SDLBool enabled); @@ -187,6 +207,9 @@ namespace SDL [return: NativeTypeName("bool")] 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_RotateSurface(SDL_Surface* surface, float angle); + [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_Surface* SDL_DuplicateSurface(SDL_Surface* surface); diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_version.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_version.g.cs index bb77da7..0127071 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_version.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_version.g.cs @@ -42,10 +42,10 @@ namespace SDL [NativeTypeName("#define SDL_MINOR_VERSION 3")] public const int SDL_MINOR_VERSION = 3; - [NativeTypeName("#define SDL_MICRO_VERSION 0")] - public const int SDL_MICRO_VERSION = 0; + [NativeTypeName("#define SDL_MICRO_VERSION 3")] + public const int SDL_MICRO_VERSION = 3; [NativeTypeName("#define SDL_VERSION SDL_VERSIONNUM(SDL_MAJOR_VERSION, SDL_MINOR_VERSION, SDL_MICRO_VERSION)")] - public const int SDL_VERSION = ((3) * 1000000 + (3) * 1000 + (0)); + public const int SDL_VERSION = ((3) * 1000000 + (3) * 1000 + (3)); } } diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_video.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_video.g.cs index 5a6d865..043ff78 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_video.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_video.g.cs @@ -800,6 +800,9 @@ namespace SDL [NativeTypeName("#define SDL_PROP_WINDOW_CREATE_EMSCRIPTEN_CANVAS_ID_STRING \"SDL.window.create.emscripten.canvas_id\"")] public static ReadOnlySpan SDL_PROP_WINDOW_CREATE_EMSCRIPTEN_CANVAS_ID_STRING => "SDL.window.create.emscripten.canvas_id"u8; + [NativeTypeName("#define SDL_PROP_WINDOW_CREATE_EMSCRIPTEN_FILL_DOCUMENT_BOOLEAN \"SDL.window.create.emscripten.fill_document\"")] + public static ReadOnlySpan SDL_PROP_WINDOW_CREATE_EMSCRIPTEN_FILL_DOCUMENT_BOOLEAN => "SDL.window.create.emscripten.fill_document"u8; + [NativeTypeName("#define SDL_PROP_WINDOW_CREATE_EMSCRIPTEN_KEYBOARD_ELEMENT_STRING \"SDL.window.create.emscripten.keyboard_element\"")] public static ReadOnlySpan SDL_PROP_WINDOW_CREATE_EMSCRIPTEN_KEYBOARD_ELEMENT_STRING => "SDL.window.create.emscripten.keyboard_element"u8; @@ -911,6 +914,9 @@ namespace SDL [NativeTypeName("#define SDL_PROP_WINDOW_EMSCRIPTEN_CANVAS_ID_STRING \"SDL.window.emscripten.canvas_id\"")] public static ReadOnlySpan SDL_PROP_WINDOW_EMSCRIPTEN_CANVAS_ID_STRING => "SDL.window.emscripten.canvas_id"u8; + [NativeTypeName("#define SDL_PROP_WINDOW_EMSCRIPTEN_FILL_DOCUMENT_BOOLEAN \"SDL.window.emscripten.fill_document\"")] + public static ReadOnlySpan SDL_PROP_WINDOW_EMSCRIPTEN_FILL_DOCUMENT_BOOLEAN => "SDL.window.emscripten.fill_document"u8; + [NativeTypeName("#define SDL_PROP_WINDOW_EMSCRIPTEN_KEYBOARD_ELEMENT_STRING \"SDL.window.emscripten.keyboard_element\"")] public static ReadOnlySpan SDL_PROP_WINDOW_EMSCRIPTEN_KEYBOARD_ELEMENT_STRING => "SDL.window.emscripten.keyboard_element"u8; diff --git a/SDL3_image-CS/SDL3_image/ClangSharp/SDL_image.g.cs b/SDL3_image-CS/SDL3_image/ClangSharp/SDL_image.g.cs index 3f3c5b3..a0e652d 100644 --- a/SDL3_image-CS/SDL3_image/ClangSharp/SDL_image.g.cs +++ b/SDL3_image-CS/SDL3_image/ClangSharp/SDL_image.g.cs @@ -62,15 +62,15 @@ namespace SDL [DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern int IMG_Version(); - [DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_Surface* IMG_LoadTyped_IO(SDL_IOStream* src, [NativeTypeName("bool")] SDLBool closeio, [NativeTypeName("const char *")] byte* type); - [DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_Surface* IMG_Load([NativeTypeName("const char *")] byte* file); [DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_Surface* IMG_Load_IO(SDL_IOStream* src, [NativeTypeName("bool")] SDLBool closeio); + [DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + public static extern SDL_Surface* IMG_LoadTyped_IO(SDL_IOStream* src, [NativeTypeName("bool")] SDLBool closeio, [NativeTypeName("const char *")] byte* type); + [DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_Texture* IMG_LoadTexture(SDL_Renderer* renderer, [NativeTypeName("const char *")] byte* file); @@ -81,12 +81,15 @@ namespace SDL public static extern SDL_Texture* IMG_LoadTextureTyped_IO(SDL_Renderer* renderer, SDL_IOStream* src, [NativeTypeName("bool")] SDLBool closeio, [NativeTypeName("const char *")] byte* type); [DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - [return: NativeTypeName("bool")] - public static extern SDLBool IMG_isAVIF(SDL_IOStream* src); + public static extern SDL_Surface* IMG_GetClipboardImage(); [DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] - public static extern SDLBool IMG_isICO(SDL_IOStream* src); + public static extern SDLBool IMG_isANI(SDL_IOStream* src); + + [DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + [return: NativeTypeName("bool")] + public static extern SDLBool IMG_isAVIF(SDL_IOStream* src); [DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] @@ -100,6 +103,10 @@ namespace SDL [return: NativeTypeName("bool")] public static extern SDLBool IMG_isGIF(SDL_IOStream* src); + [DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + [return: NativeTypeName("bool")] + public static extern SDLBool IMG_isICO(SDL_IOStream* src); + [DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] public static extern SDLBool IMG_isJPG(SDL_IOStream* src); @@ -124,18 +131,22 @@ namespace SDL [return: NativeTypeName("bool")] public static extern SDLBool IMG_isPNM(SDL_IOStream* src); - [DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - [return: NativeTypeName("bool")] - public static extern SDLBool IMG_isSVG(SDL_IOStream* src); - [DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] public static extern SDLBool IMG_isQOI(SDL_IOStream* src); + [DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + [return: NativeTypeName("bool")] + public static extern SDLBool IMG_isSVG(SDL_IOStream* src); + [DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] public static extern SDLBool IMG_isTIF(SDL_IOStream* src); + [DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + [return: NativeTypeName("bool")] + public static extern SDLBool IMG_isWEBP(SDL_IOStream* src); + [DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] public static extern SDLBool IMG_isXCF(SDL_IOStream* src); @@ -148,25 +159,21 @@ namespace SDL [return: NativeTypeName("bool")] public static extern SDLBool IMG_isXV(SDL_IOStream* src); - [DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - [return: NativeTypeName("bool")] - public static extern SDLBool IMG_isWEBP(SDL_IOStream* src); - [DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_Surface* IMG_LoadAVIF_IO(SDL_IOStream* src); - [DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_Surface* IMG_LoadICO_IO(SDL_IOStream* src); - - [DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_Surface* IMG_LoadCUR_IO(SDL_IOStream* src); - [DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_Surface* IMG_LoadBMP_IO(SDL_IOStream* src); + [DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + public static extern SDL_Surface* IMG_LoadCUR_IO(SDL_IOStream* src); + [DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_Surface* IMG_LoadGIF_IO(SDL_IOStream* src); + [DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + public static extern SDL_Surface* IMG_LoadICO_IO(SDL_IOStream* src); + [DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_Surface* IMG_LoadJPG_IO(SDL_IOStream* src); @@ -188,6 +195,9 @@ namespace SDL [DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_Surface* IMG_LoadSVG_IO(SDL_IOStream* src); + [DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + public static extern SDL_Surface* IMG_LoadSizedSVG_IO(SDL_IOStream* src, int width, int height); + [DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_Surface* IMG_LoadQOI_IO(SDL_IOStream* src); @@ -197,6 +207,9 @@ namespace SDL [DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_Surface* IMG_LoadTIF_IO(SDL_IOStream* src); + [DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + public static extern SDL_Surface* IMG_LoadWEBP_IO(SDL_IOStream* src); + [DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_Surface* IMG_LoadXCF_IO(SDL_IOStream* src); @@ -206,12 +219,6 @@ namespace SDL [DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_Surface* IMG_LoadXV_IO(SDL_IOStream* src); - [DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_Surface* IMG_LoadWEBP_IO(SDL_IOStream* src); - - [DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern SDL_Surface* IMG_LoadSizedSVG_IO(SDL_IOStream* src, int width, int height); - [DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern SDL_Surface* IMG_ReadXPMFromArray([NativeTypeName("char **")] byte** xpm); @@ -242,6 +249,14 @@ namespace SDL [return: NativeTypeName("bool")] public static extern SDLBool IMG_SaveBMP_IO(SDL_Surface* surface, SDL_IOStream* dst, [NativeTypeName("bool")] SDLBool closeio); + [DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + [return: NativeTypeName("bool")] + public static extern SDLBool IMG_SaveCUR(SDL_Surface* surface, [NativeTypeName("const char *")] byte* file); + + [DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + [return: NativeTypeName("bool")] + public static extern SDLBool IMG_SaveCUR_IO(SDL_Surface* surface, SDL_IOStream* dst, [NativeTypeName("bool")] SDLBool closeio); + [DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] public static extern SDLBool IMG_SaveGIF(SDL_Surface* surface, [NativeTypeName("const char *")] byte* file); @@ -250,6 +265,14 @@ namespace SDL [return: NativeTypeName("bool")] public static extern SDLBool IMG_SaveGIF_IO(SDL_Surface* surface, SDL_IOStream* dst, [NativeTypeName("bool")] SDLBool closeio); + [DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + [return: NativeTypeName("bool")] + public static extern SDLBool IMG_SaveICO(SDL_Surface* surface, [NativeTypeName("const char *")] byte* file); + + [DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + [return: NativeTypeName("bool")] + public static extern SDLBool IMG_SaveICO_IO(SDL_Surface* surface, SDL_IOStream* dst, [NativeTypeName("bool")] SDLBool closeio); + [DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("bool")] public static extern SDLBool IMG_SaveJPG(SDL_Surface* surface, [NativeTypeName("const char *")] byte* file, int quality); @@ -292,7 +315,7 @@ namespace SDL public static extern IMG_Animation* IMG_LoadAnimationTyped_IO(SDL_IOStream* src, [NativeTypeName("bool")] SDLBool closeio, [NativeTypeName("const char *")] byte* type); [DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void IMG_FreeAnimation(IMG_Animation* anim); + public static extern IMG_Animation* IMG_LoadANIAnimation_IO(SDL_IOStream* src); [DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern IMG_Animation* IMG_LoadAPNGAnimation_IO(SDL_IOStream* src); @@ -306,6 +329,40 @@ namespace SDL [DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern IMG_Animation* IMG_LoadWEBPAnimation_IO(SDL_IOStream* src); + [DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + [return: NativeTypeName("bool")] + public static extern SDLBool IMG_SaveAnimation(IMG_Animation* anim, [NativeTypeName("const char *")] byte* file); + + [DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + [return: NativeTypeName("bool")] + public static extern SDLBool IMG_SaveAnimationTyped_IO(IMG_Animation* anim, SDL_IOStream* dst, [NativeTypeName("bool")] SDLBool closeio, [NativeTypeName("const char *")] byte* type); + + [DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + [return: NativeTypeName("bool")] + public static extern SDLBool IMG_SaveANIAnimation_IO(IMG_Animation* anim, SDL_IOStream* dst, [NativeTypeName("bool")] SDLBool closeio); + + [DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + [return: NativeTypeName("bool")] + public static extern SDLBool IMG_SaveAPNGAnimation_IO(IMG_Animation* anim, SDL_IOStream* dst, [NativeTypeName("bool")] SDLBool closeio); + + [DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + [return: NativeTypeName("bool")] + public static extern SDLBool IMG_SaveAVIFAnimation_IO(IMG_Animation* anim, SDL_IOStream* dst, [NativeTypeName("bool")] SDLBool closeio, int quality); + + [DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + [return: NativeTypeName("bool")] + public static extern SDLBool IMG_SaveGIFAnimation_IO(IMG_Animation* anim, SDL_IOStream* dst, [NativeTypeName("bool")] SDLBool closeio); + + [DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + [return: NativeTypeName("bool")] + public static extern SDLBool IMG_SaveWEBPAnimation_IO(IMG_Animation* anim, SDL_IOStream* dst, [NativeTypeName("bool")] SDLBool closeio, int quality); + + [DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + public static extern SDL_Cursor* IMG_CreateAnimatedCursor(IMG_Animation* anim, int hot_x, int hot_y); + + [DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] + public static extern void IMG_FreeAnimation(IMG_Animation* anim); + [DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern IMG_AnimationEncoder* IMG_CreateAnimationEncoder([NativeTypeName("const char *")] byte* file);