.\" 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_DialogFileCallback:
.\"   https://wiki.libsdl.org/SDL_DialogFileCallback
.\" Generated with SDL/build-scripts/wikiheaders.pl
.\" 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_DialogFileCallback
.\" SDL can be found at https://libsdl.org/
.de URL
\$2 \(laURL: \$1 \(ra\$3
..
.if \n[.g] .mso www.tmac
.TH SDL_DialogFileCallback 3type "SDL 3.2.5" "Simple Directmedia Layer" "SDL3 DATATYPES"
.SH NAME
SDL_DialogFileCallback \- Callback used by file dialog functions\[char46]
.SH HEADER FILE
Defined in SDL3/SDL_dialog\[char46]h

.SH SYNOPSIS
.nf
.B #include \(dqSDL3/SDL.h\(dq
.PP
.BI "typedef void (SDLCALL *SDL_DialogFileCallback)(void *userdata, const char * const *filelist, int filter);
.fi
.SH DESCRIPTION
The specific usage is described in each function\[char46]

If
.BR filelist
is:


\(bu NULL, an error occurred\[char46] Details can be obtained with
  
.BR SDL_GetError
()\[char46]

\(bu A pointer to NULL, the user either didn't choose any file or canceled the
  dialog\[char46]

\(bu A pointer to non-
.BR NULL
, the user chose one or more files\[char46] The argument
  is a null-terminated list of pointers to C strings, each containing a
  path\[char46]

The filelist argument should not be freed; it will automatically be freed
when the callback returns\[char46]

The filter argument is the index of the filter that was selected, or -1 if
no filter was selected or if the platform or method doesn't support
fetching the selected filter\[char46]

In Android, the
.BR filelist
are
.BR content://
URIs\[char46] They should be opened
using 
.BR SDL_IOFromFile
() with appropriate modes\[char46] This
applies both to open and save file dialog\[char46]

.SH FUNCTION PARAMETERS
.TP
.I userdata
an app-provided pointer, for the callback's use\[char46]
.TP
.I filelist
the file(s) chosen by the user\[char46]
.TP
.I filter
index of the selected filter\[char46]
.SH AVAILABILITY
This datatype is available since SDL 3\[char46]2\[char46]0\[char46]

.SH SEE ALSO
.BR \(bu (3),
.BR SDL_DialogFileFilter (3type),
.BR \(bu (3),
.BR SDL_ShowOpenFileDialog (3),
.BR \(bu (3),
.BR SDL_ShowSaveFileDialog (3),
.BR \(bu (3),
.BR SDL_ShowOpenFolderDialog (3),
.BR \(bu (3),
.BR SDL_ShowFileDialogWithProperties (3)