1/* GTK - The GIMP Toolkit
2 * gtkfilechoosernativeprivate.h: Native File selector dialog
3 * Copyright (C) 2015, Red Hat, Inc.
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19#ifndef __GTK_FILE_CHOOSER_NATIVE_PRIVATE_H__
20#define __GTK_FILE_CHOOSER_NATIVE_PRIVATE_H__
21
22#include <gtk/gtkfilechoosernative.h>
23
24G_BEGIN_DECLS
25
26typedef struct {
27 char *id;
28 char *label;
29 char **options;
30 char **option_labels;
31 char *selected;
32} GtkFileChooserNativeChoice;
33
34struct _GtkFileChooserNative
35{
36 GtkNativeDialog parent_instance;
37
38 char *accept_label;
39 char *cancel_label;
40
41 int mode;
42 GSList *custom_files;
43
44 GFile *current_folder;
45 GFile *current_file;
46 char *current_name;
47 GtkFileFilter *current_filter;
48 GSList *choices;
49
50 /* Fallback mode */
51 GtkWidget *dialog;
52 GtkWidget *accept_button;
53 GtkWidget *cancel_button;
54
55 gpointer mode_data;
56};
57
58gboolean gtk_file_chooser_native_win32_show (GtkFileChooserNative *self);
59void gtk_file_chooser_native_win32_hide (GtkFileChooserNative *self);
60
61gboolean gtk_file_chooser_native_quartz_show (GtkFileChooserNative *self);
62void gtk_file_chooser_native_quartz_hide (GtkFileChooserNative *self);
63
64typedef void (* PortalErrorHandler) (GtkFileChooserNative *self);
65gboolean gtk_file_chooser_native_portal_show (GtkFileChooserNative *self,
66 PortalErrorHandler error_handler);
67void gtk_file_chooser_native_portal_hide (GtkFileChooserNative *self);
68
69G_END_DECLS
70
71#endif /* __GTK_FILE_CHOOSER_NATIVE_PRIVATE_H__ */
72

source code of gtk/gtk/gtkfilechoosernativeprivate.h