]> Pileus Git - ~andy/gtk/blob - gtk/gtkfilechooserprivate.h
Add gboolean return values and GError arguments to ::set_current_folder()
[~andy/gtk] / gtk / gtkfilechooserprivate.h
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
27 G_BEGIN_DECLS
28
29 #define GTK_FILE_CHOOSER_GET_IFACE(inst)  (G_TYPE_INSTANCE_GET_INTERFACE ((inst), GTK_TYPE_FILE_CHOOSER, GtkFileChooserIface))
30
31 typedef struct _GtkFileChooserIface GtkFileChooserIface;
32
33 struct _GtkFileChooserIface
34 {
35   GTypeInterface base_iface;
36
37   /* Methods
38    */
39   gboolean       (*set_current_folder)     (GtkFileChooser    *chooser,
40                                             const GtkFilePath *path,
41                                             GError           **error);
42   GtkFilePath *  (*get_current_folder)     (GtkFileChooser    *chooser);
43   void           (*set_current_name)       (GtkFileChooser    *chooser,
44                                             const gchar       *name);
45   gboolean       (*select_path)            (GtkFileChooser    *chooser,
46                                             const GtkFilePath *path,
47                                             GError           **error);
48   void           (*unselect_path)          (GtkFileChooser    *chooser,
49                                             const GtkFilePath *path);
50   void           (*select_all)             (GtkFileChooser    *chooser);
51   void           (*unselect_all)           (GtkFileChooser    *chooser);
52   GSList *       (*get_paths)              (GtkFileChooser    *chooser);
53   GtkFilePath *  (*get_preview_path)       (GtkFileChooser    *chooser);
54   GtkFileSystem *(*get_file_system)        (GtkFileChooser    *chooser);
55   void           (*add_filter)             (GtkFileChooser    *chooser,
56                                             GtkFileFilter     *filter);
57   void           (*remove_filter)          (GtkFileChooser    *chooser,
58                                             GtkFileFilter     *filter);
59   GSList *       (*list_filters)           (GtkFileChooser    *chooser);
60   gboolean       (*add_shortcut_folder)    (GtkFileChooser    *chooser,
61                                             const GtkFilePath *path,
62                                             GError           **error);
63   gboolean       (*remove_shortcut_folder) (GtkFileChooser    *chooser,
64                                             const GtkFilePath *path,
65                                             GError           **error);
66   GSList *       (*list_shortcut_folders)  (GtkFileChooser    *chooser);
67   
68   /* Signals
69    */
70   void (*current_folder_changed) (GtkFileChooser *chooser);
71   void (*selection_changed)      (GtkFileChooser *chooser);
72   void (*update_preview)         (GtkFileChooser *chooser);
73   void (*file_activated)         (GtkFileChooser *chooser);
74 };
75
76 GtkFileSystem *_gtk_file_chooser_get_file_system         (GtkFileChooser    *chooser);
77 gboolean       _gtk_file_chooser_set_current_folder_path (GtkFileChooser    *chooser,
78                                                           const GtkFilePath *path,
79                                                           GError           **error);
80 GtkFilePath *  _gtk_file_chooser_get_current_folder_path (GtkFileChooser    *chooser);
81 gboolean       _gtk_file_chooser_select_path             (GtkFileChooser    *chooser,
82                                                           const GtkFilePath *path,
83                                                           GError           **error);
84 void           _gtk_file_chooser_unselect_path           (GtkFileChooser    *chooser,
85                                                           const GtkFilePath *path);
86 GSList *       _gtk_file_chooser_get_paths               (GtkFileChooser    *chooser);
87 GtkFilePath *  _gtk_file_chooser_get_preview_path        (GtkFileChooser    *chooser);
88 gboolean       _gtk_file_chooser_add_shortcut_folder     (GtkFileChooser    *chooser,
89                                                           const GtkFilePath *path,
90                                                           GError           **error);
91 gboolean       _gtk_file_chooser_remove_shortcut_folder  (GtkFileChooser    *chooser,
92                                                           const GtkFilePath *path,
93                                                           GError           **error);
94
95 G_END_DECLS
96
97 #endif /* __GTK_FILE_CHOOSER_PRIVATE_H__ */