1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85
|
.TH al_create_native_file_dialog 3 "" "Allegro reference manual"
.SH NAME
.PP
al_create_native_file_dialog \- Allegro 5 API
.SH SYNOPSIS
.IP
.nf
\f[C]
#include\ <allegro5/allegro_native_dialog.h>
ALLEGRO_FILECHOOSER\ *al_create_native_file_dialog(
\ \ \ char\ const\ *initial_path,
\ \ \ char\ const\ *title,
\ \ \ char\ const\ *patterns,
\ \ \ int\ mode)
\f[]
.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
initial_path: 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
title: Title of the dialog.
.IP \[bu] 2
patterns: A list of semi\-colon separated patterns to match.
You should always include the pattern "*.*" as usually the MIME type and
not the file pattern is relevant.
If no file patterns are supported by the native dialog, this parameter
is ignored.
.IP \[bu] 2
mode: 0, or a combination of the flags below.
.PP
Possible flags for the \[aq]flags\[aq] parameter are:
.TP
.B 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.
.RS
.RE
.TP
.B 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 ignored.
.RS
.RE
.TP
.B ALLEGRO_FILECHOOSER_FOLDER
If there is support for a separate dialog to select a folder instead of
a file, it will be used.
.RS
.RE
.TP
.B ALLEGRO_FILECHOOSER_PICTURES
If a different dialog is available for selecting pictures, it is used.
Else ignored.
.RS
.RE
.TP
.B ALLEGRO_FILECHOOSER_SHOW_HIDDEN
If the platform supports it, also hidden files will be shown.
.RS
.RE
.TP
.B ALLEGRO_FILECHOOSER_MULTIPLE
If supported, allow selecting multiple files.
.RS
.RE
.PP
Returns:
.PP
A handle to the dialog which you can pass to
al_show_native_file_dialog(3) to display it, and from which you then can
query the results.
When you are done, call al_destroy_native_file_dialog(3) on it.
.PP
If a dialog window could not be created then this function returns NULL.
|