1 | /* GTK - The GIMP Toolkit |
2 | * gtkfilechooserprivate.h: Interface definition for file selector GUIs |
3 | * Copyright (C) 2003, 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_PRIVATE_H__ |
20 | #define __GTK_FILE_CHOOSER_PRIVATE_H__ |
21 | |
22 | #include "gtkfilechooser.h" |
23 | #include "gtkfilesystemmodel.h" |
24 | #include "gtkliststore.h" |
25 | #include "gtkrecentmanager.h" |
26 | #include "gtksearchengineprivate.h" |
27 | #include "gtkquery.h" |
28 | #include "gtksizegroup.h" |
29 | #include "gtktreemodelsort.h" |
30 | #include "gtktreestore.h" |
31 | #include "gtktreeview.h" |
32 | #include "gtkbox.h" |
33 | |
34 | G_BEGIN_DECLS |
35 | |
36 | #define SETTINGS_KEY_LOCATION_MODE "location-mode" |
37 | #define SETTINGS_KEY_SHOW_HIDDEN "show-hidden" |
38 | #define SETTINGS_KEY_SHOW_SIZE_COLUMN "show-size-column" |
39 | #define SETTINGS_KEY_SHOW_TYPE_COLUMN "show-type-column" |
40 | #define SETTINGS_KEY_SORT_COLUMN "sort-column" |
41 | #define SETTINGS_KEY_SORT_ORDER "sort-order" |
42 | #define SETTINGS_KEY_WINDOW_SIZE "window-size" |
43 | #define "sidebar-width" |
44 | #define SETTINGS_KEY_STARTUP_MODE "startup-mode" |
45 | #define SETTINGS_KEY_SORT_DIRECTORIES_FIRST "sort-directories-first" |
46 | #define SETTINGS_KEY_CLOCK_FORMAT "clock-format" |
47 | #define SETTINGS_KEY_DATE_FORMAT "date-format" |
48 | #define SETTINGS_KEY_TYPE_FORMAT "type-format" |
49 | |
50 | #define GTK_FILE_CHOOSER_GET_IFACE(inst) (G_TYPE_INSTANCE_GET_INTERFACE ((inst), GTK_TYPE_FILE_CHOOSER, GtkFileChooserIface)) |
51 | |
52 | typedef struct _GtkFileChooserIface GtkFileChooserIface; |
53 | |
54 | struct _GtkFileChooserIface |
55 | { |
56 | GTypeInterface base_iface; |
57 | |
58 | /* Methods |
59 | */ |
60 | gboolean (*set_current_folder) (GtkFileChooser *chooser, |
61 | GFile *file, |
62 | GError **error); |
63 | GFile * (*get_current_folder) (GtkFileChooser *chooser); |
64 | void (*set_current_name) (GtkFileChooser *chooser, |
65 | const char *name); |
66 | char * (*get_current_name) (GtkFileChooser *chooser); |
67 | gboolean (*select_file) (GtkFileChooser *chooser, |
68 | GFile *file, |
69 | GError **error); |
70 | void (*unselect_file) (GtkFileChooser *chooser, |
71 | GFile *file); |
72 | void (*select_all) (GtkFileChooser *chooser); |
73 | void (*unselect_all) (GtkFileChooser *chooser); |
74 | GListModel * (*get_files) (GtkFileChooser *chooser); |
75 | void (*add_filter) (GtkFileChooser *chooser, |
76 | GtkFileFilter *filter); |
77 | void (*remove_filter) (GtkFileChooser *chooser, |
78 | GtkFileFilter *filter); |
79 | GListModel * (*get_filters) (GtkFileChooser *chooser); |
80 | gboolean (*add_shortcut_folder) (GtkFileChooser *chooser, |
81 | GFile *file, |
82 | GError **error); |
83 | gboolean (*remove_shortcut_folder) (GtkFileChooser *chooser, |
84 | GFile *file, |
85 | GError **error); |
86 | GListModel * (*get_shortcut_folders) (GtkFileChooser *chooser); |
87 | |
88 | /* Signals |
89 | */ |
90 | void (*current_folder_changed) (GtkFileChooser *chooser); |
91 | void (*selection_changed) (GtkFileChooser *chooser); |
92 | void (*update_preview) (GtkFileChooser *chooser); |
93 | void (*file_activated) (GtkFileChooser *chooser); |
94 | |
95 | /* 3.22 additions */ |
96 | void (*add_choice) (GtkFileChooser *chooser, |
97 | const char *id, |
98 | const char *label, |
99 | const char **options, |
100 | const char **option_labels); |
101 | void (*remove_choice) (GtkFileChooser *chooser, |
102 | const char *id); |
103 | void (*set_choice) (GtkFileChooser *chooser, |
104 | const char *id, |
105 | const char *option); |
106 | const char * (*get_choice) (GtkFileChooser *chooser, |
107 | const char *id); |
108 | }; |
109 | |
110 | void gtk_file_chooser_select_all (GtkFileChooser *chooser); |
111 | void gtk_file_chooser_unselect_all (GtkFileChooser *chooser); |
112 | gboolean gtk_file_chooser_select_file (GtkFileChooser *chooser, |
113 | GFile *file, |
114 | GError **error); |
115 | void gtk_file_chooser_unselect_file (GtkFileChooser *chooser, |
116 | GFile *file); |
117 | G_END_DECLS |
118 | |
119 | #endif /* __GTK_FILE_CHOOSER_PRIVATE_H__ */ |
120 | |