.\" This manpage content is licensed under Creative Commons .\" Attribution 4.0 International (CC BY 4.0) .\" https://creativecommons.org/licenses/by/4.0/ .\" This manpage was generated from SDL's wiki page for SDL_ShowOpenFileDialog: .\" https://wiki.libsdl.org/SDL_ShowOpenFileDialog .\" Generated with SDL/build-scripts/wikiheaders.pl .\" revision SDL-3.1.0 .\" Please report issues in this manpage's content at: .\" https://github.com/libsdl-org/sdlwiki/issues/new .\" Please report issues in the generation of this manpage from the wiki at: .\" https://github.com/libsdl-org/SDL/issues/new?title=Misgenerated%20manpage%20for%20SDL_ShowOpenFileDialog .\" SDL can be found at https://libsdl.org/ .de URL \$2 \(laURL: \$1 \(ra\$3 .. .if \n[.g] .mso www.tmac .TH SDL_ShowOpenFileDialog 3 "SDL 3.1.0" "SDL" "SDL3 FUNCTIONS" .SH NAME SDL_ShowOpenFileDialog \- Displays a dialog that lets the user select a file on their filesystem\[char46] .SH SYNOPSIS .nf .B #include \(dqSDL3/SDL.h\(dq .PP .BI "void SDL_ShowOpenFileDialog(SDL_DialogFileCallback callback, void *userdata, SDL_Window *window, const SDL_DialogFileFilter *filters, const char *default_location, SDL_bool allow_many); .fi .SH DESCRIPTION This function should only be invoked from the main thread\[char46] This is an asynchronous function; it will return immediately, and the result will be passed to the callback\[char46] The callback will be invoked with a null-terminated list of files the user chose\[char46] The list will be empty if the user canceled the dialog, and it will be NULL if an error occured\[char46] Note that the callback may be called from a different thread than the one the function was invoked on\[char46] Depending on the platform, the user may be allowed to input paths that don't yet exist\[char46] .SH FUNCTION PARAMETERS .TP .I callback The function to be invoked when the user selects a file and accepts, or the user cancels the dialog, or an error occurs\[char46] The first argument is a null-terminated list of C strings, representing the paths chosen by the user\[char46] The list will be empty if the user canceled the dialog, and it will be NULL if an error occured\[char46] If an error occured, it can be fetched with .BR SDL_GetError ()\[char46] The second argument is the userdata pointer passed to the function\[char46] .TP .I userdata An optional pointer to pass extra data to the callback when it will be invoked\[char46] .TP .I window The window that the dialog should be modal for\[char46] May be NULL\[char46] Not all platforms support this option\[char46] .TP .I filters A null-terminated list of .BR SDL_DialogFileFilter 's\[char46] May be NULL\[char46] Not all platforms support this option, and platforms that do support it may allow the user to ignore the filters\[char46] .TP .I default_location The default folder or file to start the dialog at\[char46] May be NULL\[char46] Not all platforms support this option\[char46] .TP .I allow_many If non-zero, the user will be allowed to select multiple entries\[char46] Not all platforms support this option\[char46] .SH AVAILABILITY This function is available since SDL 3\[char46]0\[char46]0\[char46] .SH SEE ALSO .BR SDL_ShowSaveFileDialog (3), .BR SDL_ShowOpenFolderDialog (3)