mirror of https://github.com/ppy/SDL3-CS.git
Merge pull request #184 from Susko3/update-bindings
Update SDL bindings
This commit is contained in:
commit
7137484799
|
|
@ -1 +1 @@
|
|||
Subproject commit e027b85cc457556071cbb2f3f1bcf8803c1bc001
|
||||
Subproject commit 6fa6297441e387abdc565daa44a04e07acd55624
|
||||
|
|
@ -87,6 +87,14 @@ namespace SDL
|
|||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_AudioDeviceID SDL_OpenAudioDevice(SDL_AudioDeviceID devid, [NativeTypeName("const SDL_AudioSpec *")] SDL_AudioSpec* spec);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool SDL_IsAudioDevicePhysical(SDL_AudioDeviceID devid);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool SDL_IsAudioDevicePlayback(SDL_AudioDeviceID devid);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool SDL_PauseAudioDevice(SDL_AudioDeviceID dev);
|
||||
|
|
|
|||
|
|
@ -37,6 +37,13 @@ namespace SDL
|
|||
public byte* pattern;
|
||||
}
|
||||
|
||||
public enum SDL_FileDialogType
|
||||
{
|
||||
SDL_FILEDIALOG_OPENFILE,
|
||||
SDL_FILEDIALOG_SAVEFILE,
|
||||
SDL_FILEDIALOG_OPENFOLDER,
|
||||
}
|
||||
|
||||
public static unsafe partial class SDL3
|
||||
{
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
|
|
@ -47,5 +54,32 @@ namespace SDL
|
|||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern void SDL_ShowOpenFolderDialog([NativeTypeName("SDL_DialogFileCallback")] delegate* unmanaged[Cdecl]<IntPtr, byte**, int, void> callback, [NativeTypeName("void*")] IntPtr userdata, SDL_Window* window, [NativeTypeName("const char *")] byte* default_location, [NativeTypeName("bool")] SDLBool allow_many);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern void SDL_ShowFileDialogWithProperties(SDL_FileDialogType type, [NativeTypeName("SDL_DialogFileCallback")] delegate* unmanaged[Cdecl]<IntPtr, byte**, int, void> callback, [NativeTypeName("void*")] IntPtr userdata, SDL_PropertiesID props);
|
||||
|
||||
[NativeTypeName("#define SDL_PROP_FILE_DIALOG_FILTERS_POINTER \"SDL.filedialog.filters\"")]
|
||||
public static ReadOnlySpan<byte> SDL_PROP_FILE_DIALOG_FILTERS_POINTER => "SDL.filedialog.filters"u8;
|
||||
|
||||
[NativeTypeName("#define SDL_PROP_FILE_DIALOG_NFILTERS_NUMBER \"SDL.filedialog.nfilters\"")]
|
||||
public static ReadOnlySpan<byte> SDL_PROP_FILE_DIALOG_NFILTERS_NUMBER => "SDL.filedialog.nfilters"u8;
|
||||
|
||||
[NativeTypeName("#define SDL_PROP_FILE_DIALOG_WINDOW_POINTER \"SDL.filedialog.window\"")]
|
||||
public static ReadOnlySpan<byte> SDL_PROP_FILE_DIALOG_WINDOW_POINTER => "SDL.filedialog.window"u8;
|
||||
|
||||
[NativeTypeName("#define SDL_PROP_FILE_DIALOG_LOCATION_STRING \"SDL.filedialog.location\"")]
|
||||
public static ReadOnlySpan<byte> SDL_PROP_FILE_DIALOG_LOCATION_STRING => "SDL.filedialog.location"u8;
|
||||
|
||||
[NativeTypeName("#define SDL_PROP_FILE_DIALOG_MANY_BOOLEAN \"SDL.filedialog.many\"")]
|
||||
public static ReadOnlySpan<byte> SDL_PROP_FILE_DIALOG_MANY_BOOLEAN => "SDL.filedialog.many"u8;
|
||||
|
||||
[NativeTypeName("#define SDL_PROP_FILE_DIALOG_TITLE_STRING \"SDL.filedialog.title\"")]
|
||||
public static ReadOnlySpan<byte> SDL_PROP_FILE_DIALOG_TITLE_STRING => "SDL.filedialog.title"u8;
|
||||
|
||||
[NativeTypeName("#define SDL_PROP_FILE_DIALOG_ACCEPT_STRING \"SDL.filedialog.accept\"")]
|
||||
public static ReadOnlySpan<byte> SDL_PROP_FILE_DIALOG_ACCEPT_STRING => "SDL.filedialog.accept"u8;
|
||||
|
||||
[NativeTypeName("#define SDL_PROP_FILE_DIALOG_CANCEL_STRING \"SDL.filedialog.cancel\"")]
|
||||
public static ReadOnlySpan<byte> SDL_PROP_FILE_DIALOG_CANCEL_STRING => "SDL.filedialog.cancel"u8;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -711,6 +711,19 @@ namespace SDL
|
|||
public SDL_CameraID which;
|
||||
}
|
||||
|
||||
public partial struct SDL_RenderEvent
|
||||
{
|
||||
public SDL_EventType type;
|
||||
|
||||
[NativeTypeName("Uint32")]
|
||||
public uint reserved;
|
||||
|
||||
[NativeTypeName("Uint64")]
|
||||
public ulong timestamp;
|
||||
|
||||
public SDL_WindowID windowID;
|
||||
}
|
||||
|
||||
public partial struct SDL_TouchFingerEvent
|
||||
{
|
||||
public SDL_EventType type;
|
||||
|
|
@ -1064,6 +1077,9 @@ namespace SDL
|
|||
[FieldOffset(0)]
|
||||
public SDL_PenAxisEvent paxis;
|
||||
|
||||
[FieldOffset(0)]
|
||||
public SDL_RenderEvent render;
|
||||
|
||||
[FieldOffset(0)]
|
||||
public SDL_DropEvent drop;
|
||||
|
||||
|
|
|
|||
|
|
@ -115,6 +115,10 @@ namespace SDL
|
|||
[return: NativeTypeName("char **")]
|
||||
public static extern byte** SDL_GlobDirectory([NativeTypeName("const char *")] byte* path, [NativeTypeName("const char *")] byte* pattern, SDL_GlobFlags flags, int* count);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetCurrentDirectory", ExactSpelling = true)]
|
||||
[return: NativeTypeName("char *")]
|
||||
public static extern byte* Unsafe_SDL_GetCurrentDirectory();
|
||||
|
||||
[NativeTypeName("#define SDL_GLOB_CASEINSENSITIVE (1u << 0)")]
|
||||
public const uint SDL_GLOB_CASEINSENSITIVE = (1U << 0);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1335,6 +1335,10 @@ namespace SDL
|
|||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool SDL_SetGPUSwapchainParameters(SDL_GPUDevice* device, SDL_Window* window, SDL_GPUSwapchainComposition swapchain_composition, SDL_GPUPresentMode present_mode);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool SDL_SetGPUAllowedFramesInFlight(SDL_GPUDevice* device, [NativeTypeName("Uint32")] uint allowed_frames_in_flight);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_GPUTextureFormat SDL_GetGPUSwapchainTextureFormat(SDL_GPUDevice* device, SDL_Window* window);
|
||||
|
||||
|
|
@ -1342,6 +1346,14 @@ namespace SDL
|
|||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool SDL_AcquireGPUSwapchainTexture(SDL_GPUCommandBuffer* command_buffer, SDL_Window* window, SDL_GPUTexture** swapchain_texture, [NativeTypeName("Uint32 *")] uint* swapchain_texture_width, [NativeTypeName("Uint32 *")] uint* swapchain_texture_height);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool SDL_WaitForGPUSwapchain(SDL_GPUDevice* device, SDL_Window* window);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool SDL_WaitAndAcquireGPUSwapchainTexture(SDL_GPUCommandBuffer* command_buffer, SDL_Window* window, SDL_GPUTexture** swapchain_texture, [NativeTypeName("Uint32 *")] uint* swapchain_texture_width, [NativeTypeName("Uint32 *")] uint* swapchain_texture_height);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool SDL_SubmitGPUCommandBuffer(SDL_GPUCommandBuffer* command_buffer);
|
||||
|
|
|
|||
|
|
@ -97,6 +97,12 @@ namespace SDL
|
|||
[NativeTypeName("#define SDL_HINT_AUDIO_ALSA_DEFAULT_DEVICE \"SDL_AUDIO_ALSA_DEFAULT_DEVICE\"")]
|
||||
public static ReadOnlySpan<byte> SDL_HINT_AUDIO_ALSA_DEFAULT_DEVICE => "SDL_AUDIO_ALSA_DEFAULT_DEVICE"u8;
|
||||
|
||||
[NativeTypeName("#define SDL_HINT_AUDIO_ALSA_DEFAULT_PLAYBACK_DEVICE \"SDL_AUDIO_ALSA_DEFAULT_PLAYBACK_DEVICE\"")]
|
||||
public static ReadOnlySpan<byte> SDL_HINT_AUDIO_ALSA_DEFAULT_PLAYBACK_DEVICE => "SDL_AUDIO_ALSA_DEFAULT_PLAYBACK_DEVICE"u8;
|
||||
|
||||
[NativeTypeName("#define SDL_HINT_AUDIO_ALSA_DEFAULT_RECORDING_DEVICE \"SDL_AUDIO_ALSA_DEFAULT_RECORDING_DEVICE\"")]
|
||||
public static ReadOnlySpan<byte> SDL_HINT_AUDIO_ALSA_DEFAULT_RECORDING_DEVICE => "SDL_AUDIO_ALSA_DEFAULT_RECORDING_DEVICE"u8;
|
||||
|
||||
[NativeTypeName("#define SDL_HINT_AUDIO_CATEGORY \"SDL_AUDIO_CATEGORY\"")]
|
||||
public static ReadOnlySpan<byte> SDL_HINT_AUDIO_CATEGORY => "SDL_AUDIO_CATEGORY"u8;
|
||||
|
||||
|
|
@ -334,6 +340,9 @@ namespace SDL
|
|||
[NativeTypeName("#define SDL_HINT_JOYSTICK_HIDAPI_STEAM \"SDL_JOYSTICK_HIDAPI_STEAM\"")]
|
||||
public static ReadOnlySpan<byte> SDL_HINT_JOYSTICK_HIDAPI_STEAM => "SDL_JOYSTICK_HIDAPI_STEAM"u8;
|
||||
|
||||
[NativeTypeName("#define SDL_HINT_JOYSTICK_HIDAPI_STEAM_HOME_LED \"SDL_JOYSTICK_HIDAPI_STEAM_HOME_LED\"")]
|
||||
public static ReadOnlySpan<byte> SDL_HINT_JOYSTICK_HIDAPI_STEAM_HOME_LED => "SDL_JOYSTICK_HIDAPI_STEAM_HOME_LED"u8;
|
||||
|
||||
[NativeTypeName("#define SDL_HINT_JOYSTICK_HIDAPI_STEAMDECK \"SDL_JOYSTICK_HIDAPI_STEAMDECK\"")]
|
||||
public static ReadOnlySpan<byte> SDL_HINT_JOYSTICK_HIDAPI_STEAMDECK => "SDL_JOYSTICK_HIDAPI_STEAMDECK"u8;
|
||||
|
||||
|
|
@ -460,6 +469,9 @@ namespace SDL
|
|||
[NativeTypeName("#define SDL_HINT_MOUSE_DOUBLE_CLICK_TIME \"SDL_MOUSE_DOUBLE_CLICK_TIME\"")]
|
||||
public static ReadOnlySpan<byte> SDL_HINT_MOUSE_DOUBLE_CLICK_TIME => "SDL_MOUSE_DOUBLE_CLICK_TIME"u8;
|
||||
|
||||
[NativeTypeName("#define SDL_HINT_MOUSE_DEFAULT_SYSTEM_CURSOR \"SDL_MOUSE_DEFAULT_SYSTEM_CURSOR\"")]
|
||||
public static ReadOnlySpan<byte> SDL_HINT_MOUSE_DEFAULT_SYSTEM_CURSOR => "SDL_MOUSE_DEFAULT_SYSTEM_CURSOR"u8;
|
||||
|
||||
[NativeTypeName("#define SDL_HINT_MOUSE_EMULATE_WARP_WITH_RELATIVE \"SDL_MOUSE_EMULATE_WARP_WITH_RELATIVE\"")]
|
||||
public static ReadOnlySpan<byte> SDL_HINT_MOUSE_EMULATE_WARP_WITH_RELATIVE => "SDL_MOUSE_EMULATE_WARP_WITH_RELATIVE"u8;
|
||||
|
||||
|
|
|
|||
|
|
@ -54,6 +54,14 @@ namespace SDL
|
|||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern void SDL_Quit();
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool SDL_IsMainThread();
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool SDL_RunOnMainThread([NativeTypeName("SDL_MainThreadCallback")] delegate* unmanaged[Cdecl]<IntPtr, void> callback, [NativeTypeName("void*")] IntPtr userdata, [NativeTypeName("bool")] SDLBool wait_complete);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool SDL_SetAppMetadata([NativeTypeName("const char *")] byte* appname, [NativeTypeName("const char *")] byte* appversion, [NativeTypeName("const char *")] byte* appidentifier);
|
||||
|
|
|
|||
|
|
@ -344,6 +344,10 @@ namespace SDL
|
|||
[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, double angle, [NativeTypeName("const SDL_FPoint *")] SDL_FPoint* center, SDL_FlipMode flip);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool SDL_RenderTextureAffine(SDL_Renderer* renderer, SDL_Texture* texture, [NativeTypeName("const SDL_FRect *")] SDL_FRect* srcrect, [NativeTypeName("const SDL_FPoint *")] SDL_FPoint* origin, [NativeTypeName("const SDL_FPoint *")] SDL_FPoint* right, [NativeTypeName("const SDL_FPoint *")] SDL_FPoint* down);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool SDL_RenderTextureTiled(SDL_Renderer* renderer, SDL_Texture* texture, [NativeTypeName("const SDL_FRect *")] SDL_FRect* srcrect, float scale, [NativeTypeName("const SDL_FRect *")] SDL_FRect* dstrect);
|
||||
|
|
|
|||
Loading…
Reference in New Issue