1al_create_native_file_dialog(3)                al_create_native_file_dialog(3)
2
3
4

NAME

6       al_create_native_file_dialog - Allegro 5 API
7

SYNOPSIS

9              #include <allegro5/allegro_native_dialog.h>
10
11              ALLEGRO_FILECHOOSER *al_create_native_file_dialog(
12                 char const *initial_path,
13                 char const *title,
14                 char const *patterns,
15                 int mode)
16

DESCRIPTION

18       Creates a new native file dialog.  You should only have one such dialog
19       opened at a time.
20
21       Parameters:
22
23       • initial_path: The initial search path and filename.  Can be NULL.  To
24         start  with  a blank file name the string should end with a directory
25         separator (this should be the common case).
26
27       • title: Title of the dialog.
28
29       • patterns: A list of semi-colon separated  patterns  to  match.   This
30         should  not contain any whitespace characters.  If a pattern contains
31         the `/' character, then it is treated as  a  MIME  type  (e.g.   `im‐
32         age/png').   Not  all platforms support file patterns.  If the native
33         dialog does not provide support, this parameter is ignored.
34
35       • mode: 0, or a combination of the following flags:
36
37       ALLEGRO_FILECHOOSER_FILE_MUST_EXIST
38         If supported by the native dialog, it will  not  allow  entering  new
39         names,  but just allow existing files to be selected.  Else it is ig‐
40         nored.
41
42       ALLEGRO_FILECHOOSER_SAVE
43         If the native dialog system has a different dialog  for  saving  (for
44         example one which allows creating new directories), it is used.  Else
45         it is ignored.
46
47       ALLEGRO_FILECHOOSER_FOLDER
48         If there is support for a separate dialog to select a folder  instead
49         of a file, it will be used.
50
51       ALLEGRO_FILECHOOSER_PICTURES
52         If  a  different  dialog  is  available for selecting pictures, it is
53         used.  Else it is ignored.
54
55       ALLEGRO_FILECHOOSER_SHOW_HIDDEN
56         If the platform supports it, also hidden files will be shown.
57
58       ALLEGRO_FILECHOOSER_MULTIPLE
59         If supported, allow selecting multiple files.
60
61       Returns:
62
63       A handle to the dialog which you can pass  to  al_show_native_file_dia‐
64       log(3) to display it, and from which you then can query the results us‐
65       ing  al_get_native_file_dialog_count(3)   and   al_get_native_file_dia‐
66       log_path(3).   When you are done, call al_destroy_native_file_dialog(3)
67       on it.
68
69       If a dialog window could not be  created  then  this  function  returns
70       NULL.
71
72
73
74Allegro reference manual                       al_create_native_file_dialog(3)
Impressum