using System; namespace Brutal.NativeFileDialogApi { internal unsafe struct NfdFilterItem { public byte* Name; public byte* Spec; } internal unsafe struct NfdWindowHandle { public ulong Type; public void* Handle; } internal unsafe struct NfdOpenDialogArgs { public NfdFilterItem* FilterList; public int FilterCount; public byte* DefaultPath; public NfdWindowHandle ParentWindow; } internal unsafe struct NfdSaveDialogArgs { public NfdFilterItem* FilterList; public int FilterCount; public byte* DefaultPath; public byte* DefaultName; public NfdWindowHandle ParentWindow; } internal unsafe struct NfdPickFolderArgs { public byte* DefaultPath; public NfdWindowHandle ParentWindow; } internal struct NfdPathSet; /// /// Filter for a dialog /// public struct FilterItem() { /// /// The user-readable name of the filter /// public string Name = ""; /// /// The specification for the filter /// public string Spec = ""; } /// /// Arguments for a dialog opening file(s) /// public ref struct FileDialogInfo() { /// /// A pointer to a list of filters /// public ReadOnlySpan FilterList = []; /// /// The default path to open /// public string DefaultPath = ""; /// /// A handle to the parent window /// public nint ParentWindow = 0; } /// /// Arguments for a dialog opening file(s) /// public ref struct MultipleFileDialogInfo() { /// /// A pointer to a list of filters /// public ReadOnlySpan FilterList = []; /// /// The default path to open /// public string DefaultPath = ""; /// /// A handle to the parent window /// public nint ParentWindow = 0; } /// /// Arguments for a dialog saving a file /// public ref struct SaveFileDialogInfo() { /// /// A pointer to a list of filters /// public ReadOnlySpan FilterList = []; /// /// The default path to save to /// public string DefaultPath = ""; /// /// The default name of the file /// public string DefaultName = ""; /// /// A handle to the parent window /// public nint ParentWindow = 0; } /// /// Arguments for a dialog picking folder(s) /// public struct FolderDialogInfo() { /// /// The default path to open from /// public string DefaultPath = ""; /// /// A handle to the parent window /// public nint ParentWindow = 0; } /// /// Arguments for a dialog picking folder(s) /// public struct MultipleFolderDialogInfo() { /// /// The default path to open from /// public string DefaultPath = ""; /// /// A handle to the parent window /// public nint ParentWindow = 0; } }