| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
SDL3.Sys.Bindgen.Dialog.Unsafe
Synopsis
- sDL_ShowOpenFileDialog :: SDL_DialogFileCallback -> Ptr Void -> Ptr SDL_Window -> PtrConst SDL_DialogFileFilter -> CInt -> PtrConst CChar -> CBool -> IO ()
- sDL_ShowSaveFileDialog :: SDL_DialogFileCallback -> Ptr Void -> Ptr SDL_Window -> PtrConst SDL_DialogFileFilter -> CInt -> PtrConst CChar -> IO ()
- sDL_ShowOpenFolderDialog :: SDL_DialogFileCallback -> Ptr Void -> Ptr SDL_Window -> PtrConst CChar -> CBool -> IO ()
- sDL_ShowFileDialogWithProperties :: SDL_FileDialogType -> SDL_DialogFileCallback -> Ptr Void -> SDL_PropertiesID -> IO ()
Documentation
sDL_ShowOpenFileDialog Source #
Arguments
| :: SDL_DialogFileCallback |
|
| -> Ptr Void |
|
| -> Ptr SDL_Window |
|
| -> PtrConst SDL_DialogFileFilter |
|
| -> CInt |
|
| -> PtrConst CChar |
|
| -> CBool |
|
| -> IO () |
Displays a dialog that lets the user select a file on their filesystem.
This is an asynchronous function; it will return immediately, and the result will be passed to the callback.
The callback will be invoked with a null-terminated list of files the user chose. The list will be empty if the user canceled the dialog, and it will be NULL if an error occurred.
Note that the callback may be called from a different thread than the one the function was invoked on.
Depending on the platform, the user may be allowed to input paths that don't yet exist.
On Linux, dialogs may require XDG Portals, which requires DBus, which requires an event-handling loop. Apps that do not use SDL to handle events should add a call to SDL_PumpEvents in their main loop.
- Thread safety
- This function should be called only from the main thread. The callback may be invoked from the same thread or from a different one, depending on the OS's constraints.
- See also
SDL_DialogFileCallback,SDL_DialogFileFilter,sDL_ShowSaveFileDialog,sDL_ShowOpenFolderDialog,sDL_ShowFileDialogWithProperties- C declaration
SDL_ShowOpenFileDialog, defined atSDL3/SDL_dialog.h 166:34
Since: 3.2.0
sDL_ShowSaveFileDialog Source #
Arguments
| :: SDL_DialogFileCallback |
|
| -> Ptr Void |
|
| -> Ptr SDL_Window |
|
| -> PtrConst SDL_DialogFileFilter |
|
| -> CInt |
|
| -> PtrConst CChar |
|
| -> IO () |
Displays a dialog that lets the user choose a new or existing file on their filesystem.
This is an asynchronous function; it will return immediately, and the result will be passed to the callback.
The callback will be invoked with a null-terminated list of files the user chose. The list will be empty if the user canceled the dialog, and it will be NULL if an error occurred.
Note that the callback may be called from a different thread than the one the function was invoked on.
The chosen file may or may not already exist.
On Linux, dialogs may require XDG Portals, which requires DBus, which requires an event-handling loop. Apps that do not use SDL to handle events should add a call to SDL_PumpEvents in their main loop.
- Thread safety
- This function should be called only from the main thread. The callback may be invoked from the same thread or from a different one, depending on the OS's constraints.
- See also
SDL_DialogFileCallback,SDL_DialogFileFilter,sDL_ShowOpenFileDialog,sDL_ShowOpenFolderDialog,sDL_ShowFileDialogWithProperties- C declaration
SDL_ShowSaveFileDialog, defined atSDL3/SDL_dialog.h 215:34
Since: 3.2.0
sDL_ShowOpenFolderDialog Source #
Arguments
| :: SDL_DialogFileCallback |
|
| -> Ptr Void |
|
| -> Ptr SDL_Window |
|
| -> PtrConst CChar |
|
| -> CBool |
|
| -> IO () |
Displays a dialog that lets the user select a folder on their filesystem.
This is an asynchronous function; it will return immediately, and the result will be passed to the callback.
The callback will be invoked with a null-terminated list of files the user chose. The list will be empty if the user canceled the dialog, and it will be NULL if an error occurred.
Note that the callback may be called from a different thread than the one the function was invoked on.
Depending on the platform, the user may be allowed to input paths that don't yet exist.
On Linux, dialogs may require XDG Portals, which requires DBus, which requires an event-handling loop. Apps that do not use SDL to handle events should add a call to SDL_PumpEvents in their main loop.
- Thread safety
- This function should be called only from the main thread. The callback may be invoked from the same thread or from a different one, depending on the OS's constraints.
- See also
SDL_DialogFileCallback,sDL_ShowOpenFileDialog,sDL_ShowSaveFileDialog,sDL_ShowFileDialogWithProperties- C declaration
SDL_ShowOpenFolderDialog, defined atSDL3/SDL_dialog.h 260:34
Since: 3.2.0
sDL_ShowFileDialogWithProperties Source #
Arguments
| :: SDL_FileDialogType |
|
| -> SDL_DialogFileCallback |
|
| -> Ptr Void |
|
| -> SDL_PropertiesID |
|
| -> IO () |
Create and launch a file dialog with the specified properties.
These are the supported properties:
: a pointer to a list ofsDL_PROP_FILE_DIALOG_FILTERS_POINTERSDL_DialogFileFilterstructs, which will be used as filters for file-based selections. Ignored if the dialog is an "Open Folder" dialog. If non-NULL, the array of filters must remain valid at least until the callback is invoked.: the number of filters in the array of filters, if it exists.sDL_PROP_FILE_DIALOG_NFILTERS_NUMBER: the window that the dialog should be modal for.sDL_PROP_FILE_DIALOG_WINDOW_POINTER: the default folder or file to start the dialog at.sDL_PROP_FILE_DIALOG_LOCATION_STRING: true to allow the user to select more than one entry.sDL_PROP_FILE_DIALOG_MANY_BOOLEAN: the title for the dialog.sDL_PROP_FILE_DIALOG_TITLE_STRING: the label that the accept button should have.sDL_PROP_FILE_DIALOG_ACCEPT_STRING: the label that the cancel button should have.sDL_PROP_FILE_DIALOG_CANCEL_STRING
Note that each platform may or may not support any of the properties.
- Thread safety
- This function should be called only from the main thread. The callback may be invoked from the same thread or from a different one, depending on the OS's constraints.
- See also
SDL_FileDialogType,SDL_DialogFileCallback,SDL_DialogFileFilter,sDL_ShowOpenFileDialog,sDL_ShowSaveFileDialog,sDL_ShowOpenFolderDialog- C declaration
SDL_ShowFileDialogWithProperties, defined atSDL3/SDL_dialog.h 326:34
Since: 3.2.0