Ardour  9.0-pre0-582-g084a23a80d
gtkfilechooserprivate.h
Go to the documentation of this file.
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, write to the
17  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18  * Boston, MA 02111-1307, USA.
19  */
20 
21 #ifndef __GTK_FILE_CHOOSER_PRIVATE_H__
22 #define __GTK_FILE_CHOOSER_PRIVATE_H__
23 
24 #include "gtkfilechooser.h"
25 #include "gtkfilesystem.h"
26 #include "gtkfilesystemmodel.h"
27 #include "gtkliststore.h"
28 #include "gtkrecentmanager.h"
29 #include "gtksearchengine.h"
30 #include "gtkquery.h"
31 #include "gtksizegroup.h"
32 #include "gtktreemodelsort.h"
33 #include "gtktreestore.h"
34 #include "gtktreeview.h"
35 #include "gtkvbox.h"
36 
37 G_BEGIN_DECLS
38 
39 #define GTK_FILE_CHOOSER_GET_IFACE(inst) (G_TYPE_INSTANCE_GET_INTERFACE ((inst), GTK_TYPE_FILE_CHOOSER, GtkFileChooserIface))
40 
42 
44 {
45  GTypeInterface base_iface;
46 
47  /* Methods
48  */
49  gboolean (*set_current_folder) (GtkFileChooser *chooser,
50  GFile *file,
51  GError **error);
52  GFile * (*get_current_folder) (GtkFileChooser *chooser);
53  void (*set_current_name) (GtkFileChooser *chooser,
54  const gchar *name);
55  gboolean (*select_file) (GtkFileChooser *chooser,
56  GFile *file,
57  GError **error);
58  void (*unselect_file) (GtkFileChooser *chooser,
59  GFile *file);
60  void (*select_all) (GtkFileChooser *chooser);
61  void (*unselect_all) (GtkFileChooser *chooser);
62  GSList * (*get_files) (GtkFileChooser *chooser);
63  GFile * (*get_preview_file) (GtkFileChooser *chooser);
64  GtkFileSystem *(*get_file_system) (GtkFileChooser *chooser);
65  void (*add_filter) (GtkFileChooser *chooser,
66  GtkFileFilter *filter);
67  void (*remove_filter) (GtkFileChooser *chooser,
68  GtkFileFilter *filter);
69  GSList * (*list_filters) (GtkFileChooser *chooser);
70  gboolean (*add_shortcut_folder) (GtkFileChooser *chooser,
71  GFile *file,
72  GError **error);
73  gboolean (*remove_shortcut_folder) (GtkFileChooser *chooser,
74  GFile *file,
75  GError **error);
76  GSList * (*list_shortcut_folders) (GtkFileChooser *chooser);
77 
78  /* Signals
79  */
81  void (*selection_changed) (GtkFileChooser *chooser);
82  void (*update_preview) (GtkFileChooser *chooser);
83  void (*file_activated) (GtkFileChooser *chooser);
85 };
86 
89  GFile *folder,
90  GError **error);
92  GFile *folder,
93  GError **error);
95 
96 /* GtkFileChooserDialog private */
97 
99 {
101 
102  char *file_system;
103 
104  /* for use with GtkFileChooserEmbed */
106 };
107 
108 
109 /* GtkFileChooserWidget private */
110 
112 {
114 
115  char *file_system;
116 };
117 
118 
119 /* GtkFileChooserDefault private */
120 
121 typedef enum {
122  LOAD_EMPTY, /* There is no model */
123  LOAD_PRELOAD, /* Model is loading and a timer is running; model isn't inserted into the tree yet */
124  LOAD_LOADING, /* Timeout expired, model is inserted into the tree, but not fully loaded yet */
125  LOAD_FINISHED /* Model is fully loaded and inserted into the tree */
127 
128 typedef enum {
129  RELOAD_EMPTY, /* No folder has been set */
130  RELOAD_HAS_FOLDER /* We have a folder, although it may not be completely loaded yet; no need to reload */
132 
133 typedef enum {
137 
138 typedef enum {
143 
144 typedef enum {
148 
150 {
152 
154 
156 
157  /* Save mode widgets */
160 
162 
163  /* The file browsing widgets */
186 
188 
191 
193 
194  /* OPERATION_MODE_SEARCH */
200 
201  /* OPERATION_MODE_RECENT */
205 
213 
219 
221 
222  /* Filter for the shortcuts pane. We filter out the "current folder" row and
223  * the separator that we use for the "Save in folder" combo.
224  */
226 
227  /* Handles */
236 
240 
242 
244 
246  GSList *filters;
247 
251 
254 
257  GFile *preview_file;
259 
264 
265  GSource *edited_idle;
267 
270 
272 
275 
278 
279 #if 0
280  GdkDragContext *shortcuts_drag_context;
281  GSource *shortcuts_drag_outside_idle;
282 #endif
283 
284  /* Flags */
285 
286  guint local_only : 1;
288  guint use_preview_label : 1;
289  guint select_multiple : 1;
290  guint show_hidden : 1;
293  guint changing_folder : 1;
295  guint has_cwd : 1;
296  guint has_home : 1;
297  guint has_desktop : 1;
298  guint has_search : 1;
299  guint show_size_column : 1;
300  guint create_folders : 1;
301 
302 #if 0
303  guint shortcuts_drag_outside : 1;
304 #endif
305 };
306 
307 
308 G_END_DECLS
309 
310 #endif /* __GTK_FILE_CHOOSER_PRIVATE_H__ */
typedefG_BEGIN_DECLS struct _GdkDragContext GdkDragContext
Definition: gdkdnd.h:38
GtkSortType
Definition: gtkenums.h:477
GtkFileChooserAction
struct _GtkFileChooser GtkFileChooser
GtkFileChooserConfirmation
@ OPERATION_MODE_BROWSE
@ OPERATION_MODE_SEARCH
@ OPERATION_MODE_RECENT
@ STARTUP_MODE_RECENT
@ STARTUP_MODE_CWD
@ LOCATION_MODE_FILENAME_ENTRY
@ LOCATION_MODE_PATH_BAR
gboolean _gtk_file_chooser_add_shortcut_folder(GtkFileChooser *chooser, GFile *folder, GError **error)
GSList * _gtk_file_chooser_list_shortcut_folder_files(GtkFileChooser *chooser)
GtkFileSystem * _gtk_file_chooser_get_file_system(GtkFileChooser *chooser)
gboolean _gtk_file_chooser_remove_shortcut_folder(GtkFileChooser *chooser, GFile *folder, GError **error)
@ RELOAD_HAS_FOLDER
@ RELOAD_EMPTY
@ LOAD_LOADING
@ LOAD_PRELOAD
@ LOAD_FINISHED
struct _GtkFileFilter GtkFileFilter
Definition: gtkfilefilter.h:36
struct _GtkFileSystemModel GtkFileSystemModel
GtkImageIconNameData name
Definition: gtkimage.h:6
struct _GtkTreeModel GtkTreeModel
Definition: gtktreemodel.h:46
Transmitter error
GCancellable * update_current_folder_cancellable
GtkTreeModel * shortcuts_pane_filter_model
GtkWidget * browse_select_a_folder_info_bar
GtkSizeGroup * browse_path_bar_size_group
GtkTreeViewColumn * list_name_column
GCancellable * file_exists_get_info_cancellable
GCancellable * file_list_drag_data_received_cancellable
GCancellable * update_from_entry_cancellable
GtkRecentManager * recent_manager
GtkWidget * browse_shortcuts_popup_menu_rename_item
GCancellable * should_respond_get_info_cancellable
GtkTreeViewColumn * list_mtime_column
GtkWidget * browse_files_popup_menu_add_shortcut_item
GtkWidget * browse_shortcuts_remove_button
GtkWidget * browse_shortcuts_popup_menu_remove_item
GtkWidget * browse_files_popup_menu_hidden_files_item
GCancellable * shortcuts_activate_iter_cancellable
GtkTreeViewColumn * list_size_column
GtkFileSystemModel * recent_model
GtkSearchEngine * search_engine
GtkFileChooserAction action
GtkFileSystemModel * browse_files_model
GtkCellRenderer * list_name_renderer
GtkWidget * browse_files_popup_menu_size_column_item
GtkFileSystemModel * search_model
void(* current_folder_changed)(GtkFileChooser *chooser)
void(* selection_changed)(GtkFileChooser *chooser)
void(* select_all)(GtkFileChooser *chooser)
gboolean(* set_current_folder)(GtkFileChooser *chooser, GFile *file, GError **error)
void(* remove_filter)(GtkFileChooser *chooser, GtkFileFilter *filter)
void(* update_preview)(GtkFileChooser *chooser)
void(* add_filter)(GtkFileChooser *chooser, GtkFileFilter *filter)
void(* unselect_file)(GtkFileChooser *chooser, GFile *file)
GtkFileChooserConfirmation(* confirm_overwrite)(GtkFileChooser *chooser)
gboolean(* remove_shortcut_folder)(GtkFileChooser *chooser, GFile *file, GError **error)
void(* file_activated)(GtkFileChooser *chooser)
void(* unselect_all)(GtkFileChooser *chooser)
gboolean(* select_file)(GtkFileChooser *chooser, GFile *file, GError **error)
void(* set_current_name)(GtkFileChooser *chooser, const gchar *name)
gboolean(* add_shortcut_folder)(GtkFileChooser *chooser, GFile *file, GError **error)