1al_create_native_file_dialogL(i3b)rary Functions Manaula_lcreate_native_file_dialog(3)
2
3
4
6 al_create_native_file_dialog
7
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
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. You
30 should always include the pattern “*.*” as usually the MIME type and
31 not the file pattern is relevant. If no file patterns are supported
32 by the native dialog, this parameter is ignored.
33
34 · mode: 0, or a combination of the flags below.
35
36 Possible flags for the `flags' parameter are:
37
38 ALLEGRO_FILECHOOSER_FILE_MUST_EXIST
39 If supported by the native dialog, it will not allow entering
40 new names, but just allow existing files to be selected. Else
41 it is ignored.
42
43 ALLEGRO_FILECHOOSER_SAVE
44 If the native dialog system has a different dialog for saving
45 (for example one which allows creating new directories), it is
46 used. Else ignored.
47
48 ALLEGRO_FILECHOOSER_FOLDER
49 If there is support for a separate dialog to select a folder
50 instead of a file, it will be used.
51
52 ALLEGRO_FILECHOOSER_PICTURES
53 If a different dialog is available for selecting pictures, it is
54 used. Else ignored.
55
56 ALLEGRO_FILECHOOSER_SHOW_HIDDEN
57 If the platform supports it, also hidden files will be shown.
58
59 ALLEGRO_FILECHOOSER_MULTIPLE
60 If supported, allow selecting multiple files.
61
62 Returns:
63
64 A handle to the dialog which you can pass to al_show_native_file_dia‐
65 log(3) to display it, and from which you then can query the results.
66 When you are done, call al_destroy_native_file_dialog(3) on it.
67
68 If a dialog window could not be created then this function returns
69 NULL.
70
71
72
73Allegro reference manual al_create_native_file_dialog(3)