mirror of https://github.com/ppy/SDL3-CS.git
commit
365fe5c594
|
|
@ -1 +1 @@
|
||||||
Subproject commit 6fa6297441e387abdc565daa44a04e07acd55624
|
Subproject commit c030e6f782d8641e7bd8c1dc2d58788cab4f2e4d
|
||||||
|
|
@ -119,14 +119,14 @@ namespace SDL
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
[return: NativeTypeName("bool")]
|
||||||
public static extern SDLBool SDL_BindAudioStreams(SDL_AudioDeviceID devid, SDL_AudioStream** streams, int num_streams);
|
public static extern SDLBool SDL_BindAudioStreams(SDL_AudioDeviceID devid, [NativeTypeName("SDL_AudioStream *const *")] SDL_AudioStream** streams, int num_streams);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
[return: NativeTypeName("bool")]
|
||||||
public static extern SDLBool 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)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern void SDL_UnbindAudioStreams(SDL_AudioStream** streams, int num_streams);
|
public static extern void SDL_UnbindAudioStreams([NativeTypeName("SDL_AudioStream *const *")] SDL_AudioStream** streams, int num_streams);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern void SDL_UnbindAudioStream(SDL_AudioStream* stream);
|
public static extern void SDL_UnbindAudioStream(SDL_AudioStream* stream);
|
||||||
|
|
|
||||||
|
|
@ -117,12 +117,12 @@ namespace SDL
|
||||||
{
|
{
|
||||||
public SDL_GamepadBindingType input_type;
|
public SDL_GamepadBindingType input_type;
|
||||||
|
|
||||||
[NativeTypeName("__AnonymousRecord_SDL_gamepad_L247_C5")]
|
[NativeTypeName("__AnonymousRecord_SDL_gamepad_L259_C5")]
|
||||||
public _input_e__Union input;
|
public _input_e__Union input;
|
||||||
|
|
||||||
public SDL_GamepadBindingType output_type;
|
public SDL_GamepadBindingType output_type;
|
||||||
|
|
||||||
[NativeTypeName("__AnonymousRecord_SDL_gamepad_L267_C5")]
|
[NativeTypeName("__AnonymousRecord_SDL_gamepad_L279_C5")]
|
||||||
public _output_e__Union output;
|
public _output_e__Union output;
|
||||||
|
|
||||||
[StructLayout(LayoutKind.Explicit)]
|
[StructLayout(LayoutKind.Explicit)]
|
||||||
|
|
@ -132,11 +132,11 @@ namespace SDL
|
||||||
public int button;
|
public int button;
|
||||||
|
|
||||||
[FieldOffset(0)]
|
[FieldOffset(0)]
|
||||||
[NativeTypeName("__AnonymousRecord_SDL_gamepad_L251_C9")]
|
[NativeTypeName("__AnonymousRecord_SDL_gamepad_L263_C9")]
|
||||||
public _axis_e__Struct axis;
|
public _axis_e__Struct axis;
|
||||||
|
|
||||||
[FieldOffset(0)]
|
[FieldOffset(0)]
|
||||||
[NativeTypeName("__AnonymousRecord_SDL_gamepad_L258_C9")]
|
[NativeTypeName("__AnonymousRecord_SDL_gamepad_L270_C9")]
|
||||||
public _hat_e__Struct hat;
|
public _hat_e__Struct hat;
|
||||||
|
|
||||||
public partial struct _axis_e__Struct
|
public partial struct _axis_e__Struct
|
||||||
|
|
@ -163,7 +163,7 @@ namespace SDL
|
||||||
public SDL_GamepadButton button;
|
public SDL_GamepadButton button;
|
||||||
|
|
||||||
[FieldOffset(0)]
|
[FieldOffset(0)]
|
||||||
[NativeTypeName("__AnonymousRecord_SDL_gamepad_L271_C9")]
|
[NativeTypeName("__AnonymousRecord_SDL_gamepad_L283_C9")]
|
||||||
public _axis_e__Struct axis;
|
public _axis_e__Struct axis;
|
||||||
|
|
||||||
public partial struct _axis_e__Struct
|
public partial struct _axis_e__Struct
|
||||||
|
|
|
||||||
|
|
@ -403,7 +403,7 @@ namespace SDL
|
||||||
SDL_GPU_SWAPCHAINCOMPOSITION_SDR,
|
SDL_GPU_SWAPCHAINCOMPOSITION_SDR,
|
||||||
SDL_GPU_SWAPCHAINCOMPOSITION_SDR_LINEAR,
|
SDL_GPU_SWAPCHAINCOMPOSITION_SDR_LINEAR,
|
||||||
SDL_GPU_SWAPCHAINCOMPOSITION_HDR_EXTENDED_LINEAR,
|
SDL_GPU_SWAPCHAINCOMPOSITION_HDR_EXTENDED_LINEAR,
|
||||||
SDL_GPU_SWAPCHAINCOMPOSITION_HDR10_ST2048,
|
SDL_GPU_SWAPCHAINCOMPOSITION_HDR10_ST2084,
|
||||||
}
|
}
|
||||||
|
|
||||||
public partial struct SDL_GPUViewport
|
public partial struct SDL_GPUViewport
|
||||||
|
|
@ -1468,24 +1468,6 @@ namespace SDL
|
||||||
[NativeTypeName("#define SDL_GPU_COLORCOMPONENT_A (1u << 3)")]
|
[NativeTypeName("#define SDL_GPU_COLORCOMPONENT_A (1u << 3)")]
|
||||||
public const uint SDL_GPU_COLORCOMPONENT_A = (1U << 3);
|
public const uint SDL_GPU_COLORCOMPONENT_A = (1U << 3);
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_PROP_GPU_CREATETEXTURE_D3D12_CLEAR_R_FLOAT \"SDL.gpu.createtexture.d3d12.clear.r\"")]
|
|
||||||
public static ReadOnlySpan<byte> SDL_PROP_GPU_CREATETEXTURE_D3D12_CLEAR_R_FLOAT => "SDL.gpu.createtexture.d3d12.clear.r"u8;
|
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_PROP_GPU_CREATETEXTURE_D3D12_CLEAR_G_FLOAT \"SDL.gpu.createtexture.d3d12.clear.g\"")]
|
|
||||||
public static ReadOnlySpan<byte> SDL_PROP_GPU_CREATETEXTURE_D3D12_CLEAR_G_FLOAT => "SDL.gpu.createtexture.d3d12.clear.g"u8;
|
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_PROP_GPU_CREATETEXTURE_D3D12_CLEAR_B_FLOAT \"SDL.gpu.createtexture.d3d12.clear.b\"")]
|
|
||||||
public static ReadOnlySpan<byte> SDL_PROP_GPU_CREATETEXTURE_D3D12_CLEAR_B_FLOAT => "SDL.gpu.createtexture.d3d12.clear.b"u8;
|
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_PROP_GPU_CREATETEXTURE_D3D12_CLEAR_A_FLOAT \"SDL.gpu.createtexture.d3d12.clear.a\"")]
|
|
||||||
public static ReadOnlySpan<byte> SDL_PROP_GPU_CREATETEXTURE_D3D12_CLEAR_A_FLOAT => "SDL.gpu.createtexture.d3d12.clear.a"u8;
|
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_PROP_GPU_CREATETEXTURE_D3D12_CLEAR_DEPTH_FLOAT \"SDL.gpu.createtexture.d3d12.clear.depth\"")]
|
|
||||||
public static ReadOnlySpan<byte> SDL_PROP_GPU_CREATETEXTURE_D3D12_CLEAR_DEPTH_FLOAT => "SDL.gpu.createtexture.d3d12.clear.depth"u8;
|
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_PROP_GPU_CREATETEXTURE_D3D12_CLEAR_STENCIL_UINT8 \"SDL.gpu.createtexture.d3d12.clear.stencil\"")]
|
|
||||||
public static ReadOnlySpan<byte> SDL_PROP_GPU_CREATETEXTURE_D3D12_CLEAR_STENCIL_UINT8 => "SDL.gpu.createtexture.d3d12.clear.stencil"u8;
|
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_PROP_GPU_DEVICE_CREATE_DEBUGMODE_BOOLEAN \"SDL.gpu.device.create.debugmode\"")]
|
[NativeTypeName("#define SDL_PROP_GPU_DEVICE_CREATE_DEBUGMODE_BOOLEAN \"SDL.gpu.device.create.debugmode\"")]
|
||||||
public static ReadOnlySpan<byte> SDL_PROP_GPU_DEVICE_CREATE_DEBUGMODE_BOOLEAN => "SDL.gpu.device.create.debugmode"u8;
|
public static ReadOnlySpan<byte> SDL_PROP_GPU_DEVICE_CREATE_DEBUGMODE_BOOLEAN => "SDL.gpu.device.create.debugmode"u8;
|
||||||
|
|
||||||
|
|
@ -1515,5 +1497,23 @@ namespace SDL
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_PROP_GPU_DEVICE_CREATE_D3D12_SEMANTIC_NAME_STRING \"SDL.gpu.device.create.d3d12.semantic\"")]
|
[NativeTypeName("#define SDL_PROP_GPU_DEVICE_CREATE_D3D12_SEMANTIC_NAME_STRING \"SDL.gpu.device.create.d3d12.semantic\"")]
|
||||||
public static ReadOnlySpan<byte> SDL_PROP_GPU_DEVICE_CREATE_D3D12_SEMANTIC_NAME_STRING => "SDL.gpu.device.create.d3d12.semantic"u8;
|
public static ReadOnlySpan<byte> SDL_PROP_GPU_DEVICE_CREATE_D3D12_SEMANTIC_NAME_STRING => "SDL.gpu.device.create.d3d12.semantic"u8;
|
||||||
|
|
||||||
|
[NativeTypeName("#define SDL_PROP_GPU_CREATETEXTURE_D3D12_CLEAR_R_FLOAT \"SDL.gpu.createtexture.d3d12.clear.r\"")]
|
||||||
|
public static ReadOnlySpan<byte> SDL_PROP_GPU_CREATETEXTURE_D3D12_CLEAR_R_FLOAT => "SDL.gpu.createtexture.d3d12.clear.r"u8;
|
||||||
|
|
||||||
|
[NativeTypeName("#define SDL_PROP_GPU_CREATETEXTURE_D3D12_CLEAR_G_FLOAT \"SDL.gpu.createtexture.d3d12.clear.g\"")]
|
||||||
|
public static ReadOnlySpan<byte> SDL_PROP_GPU_CREATETEXTURE_D3D12_CLEAR_G_FLOAT => "SDL.gpu.createtexture.d3d12.clear.g"u8;
|
||||||
|
|
||||||
|
[NativeTypeName("#define SDL_PROP_GPU_CREATETEXTURE_D3D12_CLEAR_B_FLOAT \"SDL.gpu.createtexture.d3d12.clear.b\"")]
|
||||||
|
public static ReadOnlySpan<byte> SDL_PROP_GPU_CREATETEXTURE_D3D12_CLEAR_B_FLOAT => "SDL.gpu.createtexture.d3d12.clear.b"u8;
|
||||||
|
|
||||||
|
[NativeTypeName("#define SDL_PROP_GPU_CREATETEXTURE_D3D12_CLEAR_A_FLOAT \"SDL.gpu.createtexture.d3d12.clear.a\"")]
|
||||||
|
public static ReadOnlySpan<byte> SDL_PROP_GPU_CREATETEXTURE_D3D12_CLEAR_A_FLOAT => "SDL.gpu.createtexture.d3d12.clear.a"u8;
|
||||||
|
|
||||||
|
[NativeTypeName("#define SDL_PROP_GPU_CREATETEXTURE_D3D12_CLEAR_DEPTH_FLOAT \"SDL.gpu.createtexture.d3d12.clear.depth\"")]
|
||||||
|
public static ReadOnlySpan<byte> SDL_PROP_GPU_CREATETEXTURE_D3D12_CLEAR_DEPTH_FLOAT => "SDL.gpu.createtexture.d3d12.clear.depth"u8;
|
||||||
|
|
||||||
|
[NativeTypeName("#define SDL_PROP_GPU_CREATETEXTURE_D3D12_CLEAR_STENCIL_UINT8 \"SDL.gpu.createtexture.d3d12.clear.stencil\"")]
|
||||||
|
public static ReadOnlySpan<byte> SDL_PROP_GPU_CREATETEXTURE_D3D12_CLEAR_STENCIL_UINT8 => "SDL.gpu.createtexture.d3d12.clear.stencil"u8;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -484,9 +484,6 @@ namespace SDL
|
||||||
[NativeTypeName("#define SDL_HINT_MOUSE_RELATIVE_MODE_CENTER \"SDL_MOUSE_RELATIVE_MODE_CENTER\"")]
|
[NativeTypeName("#define SDL_HINT_MOUSE_RELATIVE_MODE_CENTER \"SDL_MOUSE_RELATIVE_MODE_CENTER\"")]
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_MOUSE_RELATIVE_MODE_CENTER => "SDL_MOUSE_RELATIVE_MODE_CENTER"u8;
|
public static ReadOnlySpan<byte> SDL_HINT_MOUSE_RELATIVE_MODE_CENTER => "SDL_MOUSE_RELATIVE_MODE_CENTER"u8;
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HINT_MOUSE_RELATIVE_MODE_WARP \"SDL_MOUSE_RELATIVE_MODE_WARP\"")]
|
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_MOUSE_RELATIVE_MODE_WARP => "SDL_MOUSE_RELATIVE_MODE_WARP"u8;
|
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HINT_MOUSE_RELATIVE_SPEED_SCALE \"SDL_MOUSE_RELATIVE_SPEED_SCALE\"")]
|
[NativeTypeName("#define SDL_HINT_MOUSE_RELATIVE_SPEED_SCALE \"SDL_MOUSE_RELATIVE_SPEED_SCALE\"")]
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_MOUSE_RELATIVE_SPEED_SCALE => "SDL_MOUSE_RELATIVE_SPEED_SCALE"u8;
|
public static ReadOnlySpan<byte> SDL_HINT_MOUSE_RELATIVE_SPEED_SCALE => "SDL_MOUSE_RELATIVE_SPEED_SCALE"u8;
|
||||||
|
|
||||||
|
|
@ -499,9 +496,6 @@ namespace SDL
|
||||||
[NativeTypeName("#define SDL_HINT_MOUSE_RELATIVE_CURSOR_VISIBLE \"SDL_MOUSE_RELATIVE_CURSOR_VISIBLE\"")]
|
[NativeTypeName("#define SDL_HINT_MOUSE_RELATIVE_CURSOR_VISIBLE \"SDL_MOUSE_RELATIVE_CURSOR_VISIBLE\"")]
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_MOUSE_RELATIVE_CURSOR_VISIBLE => "SDL_MOUSE_RELATIVE_CURSOR_VISIBLE"u8;
|
public static ReadOnlySpan<byte> SDL_HINT_MOUSE_RELATIVE_CURSOR_VISIBLE => "SDL_MOUSE_RELATIVE_CURSOR_VISIBLE"u8;
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HINT_MOUSE_RELATIVE_CLIP_INTERVAL \"SDL_MOUSE_RELATIVE_CLIP_INTERVAL\"")]
|
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_MOUSE_RELATIVE_CLIP_INTERVAL => "SDL_MOUSE_RELATIVE_CLIP_INTERVAL"u8;
|
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HINT_MOUSE_TOUCH_EVENTS \"SDL_MOUSE_TOUCH_EVENTS\"")]
|
[NativeTypeName("#define SDL_HINT_MOUSE_TOUCH_EVENTS \"SDL_MOUSE_TOUCH_EVENTS\"")]
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_MOUSE_TOUCH_EVENTS => "SDL_MOUSE_TOUCH_EVENTS"u8;
|
public static ReadOnlySpan<byte> SDL_HINT_MOUSE_TOUCH_EVENTS => "SDL_MOUSE_TOUCH_EVENTS"u8;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,37 +0,0 @@
|
||||||
/*
|
|
||||||
<auto-generated/>
|
|
||||||
C# bindings for Simple DirectMedia Layer.
|
|
||||||
Original copyright notice of input files:
|
|
||||||
|
|
||||||
Simple DirectMedia Layer
|
|
||||||
Copyright (C) 1997-2024 Sam Lantinga <slouken@libsdl.org>
|
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
|
||||||
warranty. In no event will the authors be held liable for any damages
|
|
||||||
arising from the use of this software.
|
|
||||||
|
|
||||||
Permission is granted to anyone to use this software for any purpose,
|
|
||||||
including commercial applications, and to alter it and redistribute it
|
|
||||||
freely, subject to the following restrictions:
|
|
||||||
|
|
||||||
1. The origin of this software must not be misrepresented; you must not
|
|
||||||
claim that you wrote the original software. If you use this software
|
|
||||||
in a product, an acknowledgment in the product documentation would be
|
|
||||||
appreciated but is not required.
|
|
||||||
2. Altered source versions must be plainly marked as such, and must not be
|
|
||||||
misrepresented as being the original software.
|
|
||||||
3. This notice may not be removed or altered from any source distribution.
|
|
||||||
*/
|
|
||||||
|
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
using System.Runtime.Versioning;
|
|
||||||
|
|
||||||
namespace SDL
|
|
||||||
{
|
|
||||||
public static partial class SDL3
|
|
||||||
{
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
||||||
[SupportedOSPlatform("Windows")]
|
|
||||||
public static extern void SDL_GDKSuspendComplete();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -38,5 +38,8 @@ namespace SDL
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern int SDL_EnterAppMainCallbacks(int argc, [NativeTypeName("char *[]")] byte** argv, [NativeTypeName("SDL_AppInit_func")] delegate* unmanaged[Cdecl]<IntPtr*, int, byte**, SDL_AppResult> appinit, [NativeTypeName("SDL_AppIterate_func")] delegate* unmanaged[Cdecl]<IntPtr, SDL_AppResult> appiter, [NativeTypeName("SDL_AppEvent_func")] delegate* unmanaged[Cdecl]<IntPtr, SDL_Event*, SDL_AppResult> appevent, [NativeTypeName("SDL_AppQuit_func")] delegate* unmanaged[Cdecl]<IntPtr, SDL_AppResult, void> appquit);
|
public static extern int SDL_EnterAppMainCallbacks(int argc, [NativeTypeName("char *[]")] byte** argv, [NativeTypeName("SDL_AppInit_func")] delegate* unmanaged[Cdecl]<IntPtr*, int, byte**, SDL_AppResult> appinit, [NativeTypeName("SDL_AppIterate_func")] delegate* unmanaged[Cdecl]<IntPtr, SDL_AppResult> appiter, [NativeTypeName("SDL_AppEvent_func")] delegate* unmanaged[Cdecl]<IntPtr, SDL_Event*, SDL_AppResult> appevent, [NativeTypeName("SDL_AppQuit_func")] delegate* unmanaged[Cdecl]<IntPtr, SDL_AppResult, void> appquit);
|
||||||
|
|
||||||
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
|
public static extern void SDL_GDKSuspendComplete();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -405,6 +405,10 @@ namespace SDL
|
||||||
[return: NativeTypeName("bool")]
|
[return: NativeTypeName("bool")]
|
||||||
public static extern SDLBool SDL_RenderDebugText(SDL_Renderer* renderer, float x, float y, [NativeTypeName("const char *")] byte* str);
|
public static extern SDLBool SDL_RenderDebugText(SDL_Renderer* renderer, float x, float y, [NativeTypeName("const char *")] byte* str);
|
||||||
|
|
||||||
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
|
[return: NativeTypeName("bool")]
|
||||||
|
public static extern SDLBool SDL_RenderDebugTextFormat(SDL_Renderer* renderer, float x, float y, [NativeTypeName("const char *")] byte* fmt, __arglist);
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_SOFTWARE_RENDERER \"software\"")]
|
[NativeTypeName("#define SDL_SOFTWARE_RENDERER \"software\"")]
|
||||||
public static ReadOnlySpan<byte> SDL_SOFTWARE_RENDERER => "software"u8;
|
public static ReadOnlySpan<byte> SDL_SOFTWARE_RENDERER => "software"u8;
|
||||||
|
|
||||||
|
|
@ -510,6 +514,9 @@ namespace SDL
|
||||||
[NativeTypeName("#define SDL_PROP_RENDERER_VULKAN_SWAPCHAIN_IMAGE_COUNT_NUMBER \"SDL.renderer.vulkan.swapchain_image_count\"")]
|
[NativeTypeName("#define SDL_PROP_RENDERER_VULKAN_SWAPCHAIN_IMAGE_COUNT_NUMBER \"SDL.renderer.vulkan.swapchain_image_count\"")]
|
||||||
public static ReadOnlySpan<byte> SDL_PROP_RENDERER_VULKAN_SWAPCHAIN_IMAGE_COUNT_NUMBER => "SDL.renderer.vulkan.swapchain_image_count"u8;
|
public static ReadOnlySpan<byte> SDL_PROP_RENDERER_VULKAN_SWAPCHAIN_IMAGE_COUNT_NUMBER => "SDL.renderer.vulkan.swapchain_image_count"u8;
|
||||||
|
|
||||||
|
[NativeTypeName("#define SDL_PROP_RENDERER_GPU_DEVICE_POINTER \"SDL.renderer.gpu.device\"")]
|
||||||
|
public static ReadOnlySpan<byte> SDL_PROP_RENDERER_GPU_DEVICE_POINTER => "SDL.renderer.gpu.device"u8;
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_PROP_TEXTURE_CREATE_COLORSPACE_NUMBER \"SDL.texture.create.colorspace\"")]
|
[NativeTypeName("#define SDL_PROP_TEXTURE_CREATE_COLORSPACE_NUMBER \"SDL.texture.create.colorspace\"")]
|
||||||
public static ReadOnlySpan<byte> SDL_PROP_TEXTURE_CREATE_COLORSPACE_NUMBER => "SDL.texture.create.colorspace"u8;
|
public static ReadOnlySpan<byte> SDL_PROP_TEXTURE_CREATE_COLORSPACE_NUMBER => "SDL.texture.create.colorspace"u8;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -322,7 +322,7 @@ namespace SDL
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_strtok_r", ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_strtok_r", ExactSpelling = true)]
|
||||||
[return: NativeTypeName("char *")]
|
[return: NativeTypeName("char *")]
|
||||||
public static extern byte* Unsafe_SDL_strtok_r([NativeTypeName("char *")] byte* s1, [NativeTypeName("const char *")] byte* s2, [NativeTypeName("char **")] byte** saveptr);
|
public static extern byte* Unsafe_SDL_strtok_r([NativeTypeName("char *")] byte* str, [NativeTypeName("const char *")] byte* delim, [NativeTypeName("char **")] byte** saveptr);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("size_t")]
|
[return: NativeTypeName("size_t")]
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,14 @@ namespace SDL
|
||||||
SDL_THREAD_PRIORITY_TIME_CRITICAL,
|
SDL_THREAD_PRIORITY_TIME_CRITICAL,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public enum SDL_ThreadState
|
||||||
|
{
|
||||||
|
SDL_THREAD_UNKNOWN,
|
||||||
|
SDL_THREAD_ALIVE,
|
||||||
|
SDL_THREAD_DETACHED,
|
||||||
|
SDL_THREAD_COMPLETE,
|
||||||
|
}
|
||||||
|
|
||||||
public static unsafe partial class SDL3
|
public static unsafe partial class SDL3
|
||||||
{
|
{
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
|
|
@ -65,6 +73,9 @@ namespace SDL
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern void SDL_WaitThread(SDL_Thread* thread, int* status);
|
public static extern void SDL_WaitThread(SDL_Thread* thread, int* status);
|
||||||
|
|
||||||
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
|
public static extern SDL_ThreadState SDL_GetThreadState(SDL_Thread* thread);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern void SDL_DetachThread(SDL_Thread* thread);
|
public static extern void SDL_DetachThread(SDL_Thread* thread);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,127 @@
|
||||||
|
/*
|
||||||
|
<auto-generated/>
|
||||||
|
C# bindings for Simple DirectMedia Layer.
|
||||||
|
Original copyright notice of input files:
|
||||||
|
|
||||||
|
Simple DirectMedia Layer
|
||||||
|
Copyright (C) 1997-2024 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
|
This software is provided 'as-is', without any express or implied
|
||||||
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
arising from the use of this software.
|
||||||
|
|
||||||
|
Permission is granted to anyone to use this software for any purpose,
|
||||||
|
including commercial applications, and to alter it and redistribute it
|
||||||
|
freely, subject to the following restrictions:
|
||||||
|
|
||||||
|
1. The origin of this software must not be misrepresented; you must not
|
||||||
|
claim that you wrote the original software. If you use this software
|
||||||
|
in a product, an acknowledgment in the product documentation would be
|
||||||
|
appreciated but is not required.
|
||||||
|
2. Altered source versions must be plainly marked as such, and must not be
|
||||||
|
misrepresented as being the original software.
|
||||||
|
3. This notice may not be removed or altered from any source distribution.
|
||||||
|
*/
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
|
namespace SDL
|
||||||
|
{
|
||||||
|
public partial struct SDL_Tray
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public partial struct SDL_TrayMenu
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public partial struct SDL_TrayEntry
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public static unsafe partial class SDL3
|
||||||
|
{
|
||||||
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
|
public static extern SDL_Tray* SDL_CreateTray(SDL_Surface* icon, [NativeTypeName("const char *")] byte* tooltip);
|
||||||
|
|
||||||
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
|
public static extern void SDL_SetTrayIcon(SDL_Tray* tray, SDL_Surface* icon);
|
||||||
|
|
||||||
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
|
public static extern void SDL_SetTrayTooltip(SDL_Tray* tray, [NativeTypeName("const char *")] byte* tooltip);
|
||||||
|
|
||||||
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
|
public static extern SDL_TrayMenu* SDL_CreateTrayMenu(SDL_Tray* tray);
|
||||||
|
|
||||||
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
|
public static extern SDL_TrayMenu* SDL_CreateTraySubmenu(SDL_TrayEntry* entry);
|
||||||
|
|
||||||
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
|
public static extern SDL_TrayMenu* SDL_GetTrayMenu(SDL_Tray* tray);
|
||||||
|
|
||||||
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
|
public static extern SDL_TrayMenu* SDL_GetTraySubmenu(SDL_TrayEntry* entry);
|
||||||
|
|
||||||
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
|
[return: NativeTypeName("const SDL_TrayEntry **")]
|
||||||
|
public static extern SDL_TrayEntry** SDL_GetTrayEntries(SDL_TrayMenu* menu, int* size);
|
||||||
|
|
||||||
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
|
public static extern void SDL_RemoveTrayEntry(SDL_TrayEntry* entry);
|
||||||
|
|
||||||
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
|
public static extern SDL_TrayEntry* SDL_InsertTrayEntryAt(SDL_TrayMenu* menu, int pos, [NativeTypeName("const char *")] byte* label, SDL_TrayEntryFlags flags);
|
||||||
|
|
||||||
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
|
public static extern void SDL_SetTrayEntryLabel(SDL_TrayEntry* entry, [NativeTypeName("const char *")] byte* label);
|
||||||
|
|
||||||
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetTrayEntryLabel", ExactSpelling = true)]
|
||||||
|
[return: NativeTypeName("const char *")]
|
||||||
|
public static extern byte* Unsafe_SDL_GetTrayEntryLabel(SDL_TrayEntry* entry);
|
||||||
|
|
||||||
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
|
public static extern void SDL_SetTrayEntryChecked(SDL_TrayEntry* entry, [NativeTypeName("bool")] SDLBool @checked);
|
||||||
|
|
||||||
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
|
[return: NativeTypeName("bool")]
|
||||||
|
public static extern SDLBool SDL_GetTrayEntryChecked(SDL_TrayEntry* entry);
|
||||||
|
|
||||||
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
|
public static extern void SDL_SetTrayEntryEnabled(SDL_TrayEntry* entry, [NativeTypeName("bool")] SDLBool enabled);
|
||||||
|
|
||||||
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
|
[return: NativeTypeName("bool")]
|
||||||
|
public static extern SDLBool SDL_GetTrayEntryEnabled(SDL_TrayEntry* entry);
|
||||||
|
|
||||||
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
|
public static extern void SDL_SetTrayEntryCallback(SDL_TrayEntry* entry, [NativeTypeName("SDL_TrayCallback")] delegate* unmanaged[Cdecl]<IntPtr, SDL_TrayEntry*, void> callback, [NativeTypeName("void*")] IntPtr userdata);
|
||||||
|
|
||||||
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
|
public static extern void SDL_DestroyTray(SDL_Tray* tray);
|
||||||
|
|
||||||
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
|
public static extern SDL_TrayMenu* SDL_GetTrayEntryParent(SDL_TrayEntry* entry);
|
||||||
|
|
||||||
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
|
public static extern SDL_TrayEntry* SDL_GetTrayMenuParentEntry(SDL_TrayMenu* menu);
|
||||||
|
|
||||||
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
|
public static extern SDL_Tray* SDL_GetTrayMenuParentTray(SDL_TrayMenu* menu);
|
||||||
|
|
||||||
|
[NativeTypeName("#define SDL_TRAYENTRY_BUTTON 0x00000001u")]
|
||||||
|
public const uint SDL_TRAYENTRY_BUTTON = 0x00000001U;
|
||||||
|
|
||||||
|
[NativeTypeName("#define SDL_TRAYENTRY_CHECKBOX 0x00000002u")]
|
||||||
|
public const uint SDL_TRAYENTRY_CHECKBOX = 0x00000002U;
|
||||||
|
|
||||||
|
[NativeTypeName("#define SDL_TRAYENTRY_SUBMENU 0x00000004u")]
|
||||||
|
public const uint SDL_TRAYENTRY_SUBMENU = 0x00000004U;
|
||||||
|
|
||||||
|
[NativeTypeName("#define SDL_TRAYENTRY_DISABLED 0x80000000u")]
|
||||||
|
public const uint SDL_TRAYENTRY_DISABLED = 0x80000000U;
|
||||||
|
|
||||||
|
[NativeTypeName("#define SDL_TRAYENTRY_CHECKED 0x40000000u")]
|
||||||
|
public const uint SDL_TRAYENTRY_CHECKED = 0x40000000U;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,30 @@
|
||||||
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||||
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
|
using System;
|
||||||
|
|
||||||
|
namespace SDL
|
||||||
|
{
|
||||||
|
[Flags]
|
||||||
|
[Typedef]
|
||||||
|
public enum SDL_TrayEntryFlags : UInt32
|
||||||
|
{
|
||||||
|
SDL_TRAYENTRY_BUTTON = SDL3.SDL_TRAYENTRY_BUTTON,
|
||||||
|
SDL_TRAYENTRY_CHECKBOX = SDL3.SDL_TRAYENTRY_CHECKBOX,
|
||||||
|
SDL_TRAYENTRY_SUBMENU = SDL3.SDL_TRAYENTRY_SUBMENU,
|
||||||
|
SDL_TRAYENTRY_DISABLED = SDL3.SDL_TRAYENTRY_DISABLED,
|
||||||
|
SDL_TRAYENTRY_CHECKED = SDL3.SDL_TRAYENTRY_CHECKED,
|
||||||
|
}
|
||||||
|
|
||||||
|
public static partial class SDL3
|
||||||
|
{
|
||||||
|
// The code below is currently incorrect because of https://github.com/libsdl-org/SDL/issues/11787.
|
||||||
|
// [MustDisposeResource]
|
||||||
|
// public static unsafe SDLOpaquePointerArray<SDL_TrayEntry>? SDL_GetTrayEntries(SDL_TrayMenu* menu)
|
||||||
|
// {
|
||||||
|
// int count;
|
||||||
|
// var array = SDL_GetTrayEntries(menu, &count);
|
||||||
|
// return SDLArray.CreateOpaque(array, count);
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -156,6 +156,7 @@ headers = [
|
||||||
add("SDL3/SDL_thread.h"),
|
add("SDL3/SDL_thread.h"),
|
||||||
add("SDL3/SDL_time.h"),
|
add("SDL3/SDL_time.h"),
|
||||||
add("SDL3/SDL_timer.h"),
|
add("SDL3/SDL_timer.h"),
|
||||||
|
add("SDL3/SDL_tray.h"),
|
||||||
add("SDL3/SDL_touch.h"),
|
add("SDL3/SDL_touch.h"),
|
||||||
add("SDL3/SDL_version.h"),
|
add("SDL3/SDL_version.h"),
|
||||||
add("SDL3/SDL_video.h"),
|
add("SDL3/SDL_video.h"),
|
||||||
|
|
@ -398,7 +399,6 @@ def main():
|
||||||
if not should_skip(solo_headers, main_header):
|
if not should_skip(solo_headers, main_header):
|
||||||
generate_platform_specific_headers(sdl_api, main_header, [
|
generate_platform_specific_headers(sdl_api, main_header, [
|
||||||
(["SDL_PLATFORM_WINDOWS"], "Windows", "Windows"),
|
(["SDL_PLATFORM_WINDOWS"], "Windows", "Windows"),
|
||||||
(["SDL_PLATFORM_GDK"], "GDK", "Windows"),
|
|
||||||
])
|
])
|
||||||
|
|
||||||
system_header = add("SDL3/SDL_system.h")
|
system_header = add("SDL3/SDL_system.h")
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue