mirror of https://github.com/ppy/SDL3-CS.git
86 lines
4.8 KiB
C#
86 lines
4.8 KiB
C#
/*
|
|
<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 unsafe partial struct SDL_DialogFileFilter
|
|
{
|
|
[NativeTypeName("const char *")]
|
|
public byte* name;
|
|
|
|
[NativeTypeName("const char *")]
|
|
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)]
|
|
public static extern void SDL_ShowOpenFileDialog([NativeTypeName("SDL_DialogFileCallback")] delegate* unmanaged[Cdecl]<IntPtr, byte**, int, void> callback, [NativeTypeName("void*")] IntPtr userdata, SDL_Window* window, [NativeTypeName("const SDL_DialogFileFilter *")] SDL_DialogFileFilter* filters, int nfilters, [NativeTypeName("const char *")] byte* default_location, [NativeTypeName("bool")] SDLBool allow_many);
|
|
|
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
public static extern void SDL_ShowSaveFileDialog([NativeTypeName("SDL_DialogFileCallback")] delegate* unmanaged[Cdecl]<IntPtr, byte**, int, void> callback, [NativeTypeName("void*")] IntPtr userdata, SDL_Window* window, [NativeTypeName("const SDL_DialogFileFilter *")] SDL_DialogFileFilter* filters, int nfilters, [NativeTypeName("const char *")] byte* default_location);
|
|
|
|
[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;
|
|
}
|
|
}
|