SDL Wiki
(This is the documentation for SDL3, which is under heavy development and the API is changing! SDL2 is the current stable version!)

SDL_DialogFileCallback

Callback used by file dialog functions.

Header File

Defined in <SDL3/SDL_dialog.h>

Syntax

typedef void(SDLCALL *SDL_DialogFileCallback)(void *userdata, const char * const *filelist, int filter);

Remarks

The specific usage is described in each function.

If filelist is... - NULL, an error occured. Details can be obtained with SDL_GetError(). - A pointer to NULL, the user either didn't choose any file or canceled the dialog. - A pointer to non-NULL, the user chose one or more files. The argument is a null-terminated list of pointers to C strings, each containing a path.

The filelist argument does not need to be freed; it will automatically be freed when the callback returns.

The filter argument is the index of the filter that was selected, or one more than the size of the list (therefore the index of the terminating NULL entry) if no filter was selected, or -1 if the platform or method doesn't support fetching the selected filter.

Version

This datatype is available since SDL 3.0.0.

See Also


CategoryAPI, CategoryAPIDatatype


[ edit | delete | history | feedback | raw ]

[ front page | index | search | recent changes | git repo | offline html ]

All wiki content is licensed under Creative Commons Attribution 4.0 International (CC BY 4.0).
Wiki powered by ghwikipp.