.\" Automatically generated by Pandoc 2.17.1.1 .\" .\" Define V font for inline verbatim, using C font in formats .\" that render this, and otherwise B font. .ie "\f[CB]x\f[]"x" \{\ . ftr V B . ftr VI BI . ftr VB B . ftr VBI BI .\} .el \{\ . ftr V CR . ftr VI CI . ftr VB CB . ftr VBI CBI .\} .TH "al_create_native_file_dialog" "3alleg5" "" "Allegro reference manual" "" .hy .SH NAME .PP al_create_native_file_dialog - Allegro 5 API .SH SYNOPSIS .IP .nf \f[C] #include ALLEGRO_FILECHOOSER *al_create_native_file_dialog( char const *initial_path, char const *title, char const *patterns, int mode) \f[R] .fi .SH DESCRIPTION .PP Creates a new native file dialog. You should only have one such dialog opened at a time. .PP Parameters: .IP \[bu] 2 \f[V]initial_path\f[R]: The initial search path and filename. Can be NULL. To start with a blank file name the string should end with a directory separator (this should be the common case). .IP \[bu] 2 \f[V]title\f[R]: Title of the dialog. .IP \[bu] 2 \f[V]patterns\f[R]: A list of semi-colon separated patterns to match. This should not contain any whitespace characters. If a pattern contains the `/' character, then it is treated as a MIME type (e.g. `image/png'). Not all platforms support file patterns. If the native dialog does not provide support, this parameter is ignored. .IP \[bu] 2 \f[V]mode\f[R]: 0, or a combination of the following flags: .TP ALLEGRO_FILECHOOSER_FILE_MUST_EXIST If supported by the native dialog, it will not allow entering new names, but just allow existing files to be selected. Else it is ignored. .TP ALLEGRO_FILECHOOSER_SAVE If the native dialog system has a different dialog for saving (for example one which allows creating new directories), it is used. Else it is ignored. .TP ALLEGRO_FILECHOOSER_FOLDER If there is support for a separate dialog to select a folder instead of a file, it will be used. .TP ALLEGRO_FILECHOOSER_PICTURES If a different dialog is available for selecting pictures, it is used. Else it is ignored. .TP ALLEGRO_FILECHOOSER_SHOW_HIDDEN If the platform supports it, also hidden files will be shown. .TP ALLEGRO_FILECHOOSER_MULTIPLE If supported, allow selecting multiple files. .PP Returns: .PP A handle to the dialog which you can pass to al_show_native_file_dialog(3alleg5) to display it, and from which you then can query the results using al_get_native_file_dialog_count(3alleg5) and al_get_native_file_dialog_path(3alleg5). When you are done, call al_destroy_native_file_dialog(3alleg5) on it. .PP If a dialog window could not be created then this function returns NULL.