Module dialog

Available on crate feature dep_sdl3 only.
Expand description

File dialog support.

SDL offers file dialogs, to let users select files with native GUI interfaces. There are “open” dialogs, “save” dialogs, and folder selection dialogs. The app can control some details, such as filtering to specific files, or whether multiple files can be selected by the user.

Note that launching a file dialog is a non-blocking operation; control returns to the app immediately, and a callback is called later (possibly in another thread) when the user makes a choice.

Structs§

SDL_DialogFileFilter
An entry for filters for file dialogs.
SDL_FileDialogType
Various types of file dialogs.

Constants§

SDL_FILEDIALOG_OPENFILE
SDL_FILEDIALOG_OPENFOLDER
SDL_FILEDIALOG_SAVEFILE
SDL_PROP_FILE_DIALOG_ACCEPT_STRING
SDL_PROP_FILE_DIALOG_CANCEL_STRING
SDL_PROP_FILE_DIALOG_FILTERS_POINTER
SDL_PROP_FILE_DIALOG_LOCATION_STRING
SDL_PROP_FILE_DIALOG_MANY_BOOLEAN
SDL_PROP_FILE_DIALOG_NFILTERS_NUMBER
SDL_PROP_FILE_DIALOG_TITLE_STRING
SDL_PROP_FILE_DIALOG_WINDOW_POINTER

Functions§

SDL_ShowFileDialogWithProperties
Create and launch a file dialog with the specified properties.
SDL_ShowOpenFileDialog
Displays a dialog that lets the user select a file on their filesystem.
SDL_ShowOpenFolderDialog
Displays a dialog that lets the user select a folder on their filesystem.
SDL_ShowSaveFileDialog
Displays a dialog that lets the user choose a new or existing file on their filesystem.

Type Aliases§

SDL_DialogFileCallback
Callback used by file dialog functions.