Ardour  9.0-pre0-582-g084a23a80d
gtkrecentchooser.h
Go to the documentation of this file.
1 /* GTK - The GIMP Toolkit
2  * gtkrecentchooser.h - Abstract interface for recent file selectors GUIs
3  *
4  * Copyright (C) 2006, Emmanuele Bassi
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the
18  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19  * Boston, MA 02111-1307, USA.
20  */
21 
22 #ifndef __GTK_RECENT_CHOOSER_H__
23 #define __GTK_RECENT_CHOOSER_H__
24 
25 #if defined(GTK_DISABLE_SINGLE_INCLUDES) && !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
26 #error "Only <gtk/gtk.h> can be included directly."
27 #endif
28 
29 #include <gtk/gtkwidget.h>
30 #include <gtk/gtkrecentmanager.h>
31 #include <gtk/gtkrecentfilter.h>
32 
33 G_BEGIN_DECLS
34 
35 #define GTK_TYPE_RECENT_CHOOSER (gtk_recent_chooser_get_type ())
36 #define GTK_RECENT_CHOOSER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_RECENT_CHOOSER, GtkRecentChooser))
37 #define GTK_IS_RECENT_CHOOSER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_RECENT_CHOOSER))
38 #define GTK_RECENT_CHOOSER_GET_IFACE(inst) (G_TYPE_INSTANCE_GET_INTERFACE ((inst), GTK_TYPE_RECENT_CHOOSER, GtkRecentChooserIface))
39 
54 typedef enum
55 {
61 
62 typedef gint (*GtkRecentSortFunc) (GtkRecentInfo *a,
63  GtkRecentInfo *b,
64  gpointer user_data);
65 
66 
67 typedef struct _GtkRecentChooser GtkRecentChooser; /* dummy */
69 
70 #define GTK_RECENT_CHOOSER_ERROR (gtk_recent_chooser_error_quark ())
71 
72 typedef enum
73 {
77 
79 
80 
82 {
83  GTypeInterface base_iface;
84 
85  /*
86  * Methods
87  */
88  gboolean (* set_current_uri) (GtkRecentChooser *chooser,
89  const gchar *uri,
90  GError **error);
91  gchar * (* get_current_uri) (GtkRecentChooser *chooser);
92  gboolean (* select_uri) (GtkRecentChooser *chooser,
93  const gchar *uri,
94  GError **error);
95  void (* unselect_uri) (GtkRecentChooser *chooser,
96  const gchar *uri);
97  void (* select_all) (GtkRecentChooser *chooser);
98  void (* unselect_all) (GtkRecentChooser *chooser);
99  GList * (* get_items) (GtkRecentChooser *chooser);
100  GtkRecentManager *(* get_recent_manager) (GtkRecentChooser *chooser);
101  void (* add_filter) (GtkRecentChooser *chooser,
102  GtkRecentFilter *filter);
103  void (* remove_filter) (GtkRecentChooser *chooser,
104  GtkRecentFilter *filter);
105  GSList * (* list_filters) (GtkRecentChooser *chooser);
106  void (* set_sort_func) (GtkRecentChooser *chooser,
107  GtkRecentSortFunc sort_func,
108  gpointer data,
109  GDestroyNotify destroy);
110 
111  /*
112  * Signals
113  */
114  void (* item_activated) (GtkRecentChooser *chooser);
115  void (* selection_changed) (GtkRecentChooser *chooser);
116 };
117 
118 GType gtk_recent_chooser_get_type (void) G_GNUC_CONST;
119 
120 /*
121  * Configuration
122  */
124  gboolean show_private);
127  gboolean show_not_found);
130  gboolean select_multiple);
133  gint limit);
136  gboolean local_only);
139  gboolean show_tips);
141 #ifndef GTK_DISABLE_DEPRECATED
143  gboolean show_numbers);
145 #endif /* GTK_DISABLE_DEPRECATED */
147  gboolean show_icons);
150  GtkRecentSortType sort_type);
153  GtkRecentSortFunc sort_func,
154  gpointer sort_data,
155  GDestroyNotify data_destroy);
156 
157 /*
158  * Items handling
159  */
161  const gchar *uri,
162  GError **error);
166  const gchar *uri,
167  GError **error);
169  const gchar *uri);
174  gsize *length);
175 
176 /*
177  * Filters
178  */
180  GtkRecentFilter *filter);
182  GtkRecentFilter *filter);
185  GtkRecentFilter *filter);
187 
188 
189 G_END_DECLS
190 
191 #endif /* __GTK_RECENT_CHOOSER_H__ */
void gtk_recent_chooser_set_local_only(GtkRecentChooser *chooser, gboolean local_only)
void gtk_recent_chooser_unselect_uri(GtkRecentChooser *chooser, const gchar *uri)
gchar * gtk_recent_chooser_get_current_uri(GtkRecentChooser *chooser)
GType gtk_recent_chooser_get_type(void) G_GNUC_CONST
void gtk_recent_chooser_set_show_icons(GtkRecentChooser *chooser, gboolean show_icons)
void gtk_recent_chooser_unselect_all(GtkRecentChooser *chooser)
void gtk_recent_chooser_add_filter(GtkRecentChooser *chooser, GtkRecentFilter *filter)
gboolean gtk_recent_chooser_get_local_only(GtkRecentChooser *chooser)
gint(* GtkRecentSortFunc)(GtkRecentInfo *a, GtkRecentInfo *b, gpointer user_data)
gint gtk_recent_chooser_get_limit(GtkRecentChooser *chooser)
void gtk_recent_chooser_set_sort_type(GtkRecentChooser *chooser, GtkRecentSortType sort_type)
void gtk_recent_chooser_set_show_numbers(GtkRecentChooser *chooser, gboolean show_numbers)
void gtk_recent_chooser_set_show_not_found(GtkRecentChooser *chooser, gboolean show_not_found)
gboolean gtk_recent_chooser_select_uri(GtkRecentChooser *chooser, const gchar *uri, GError **error)
GtkRecentSortType gtk_recent_chooser_get_sort_type(GtkRecentChooser *chooser)
void gtk_recent_chooser_remove_filter(GtkRecentChooser *chooser, GtkRecentFilter *filter)
gboolean gtk_recent_chooser_get_select_multiple(GtkRecentChooser *chooser)
GQuark gtk_recent_chooser_error_quark(void)
GtkRecentInfo * gtk_recent_chooser_get_current_item(GtkRecentChooser *chooser)
gboolean gtk_recent_chooser_get_show_icons(GtkRecentChooser *chooser)
void gtk_recent_chooser_set_limit(GtkRecentChooser *chooser, gint limit)
void gtk_recent_chooser_set_sort_func(GtkRecentChooser *chooser, GtkRecentSortFunc sort_func, gpointer sort_data, GDestroyNotify data_destroy)
GList * gtk_recent_chooser_get_items(GtkRecentChooser *chooser)
gboolean gtk_recent_chooser_get_show_tips(GtkRecentChooser *chooser)
gchar ** gtk_recent_chooser_get_uris(GtkRecentChooser *chooser, gsize *length)
GtkRecentFilter * gtk_recent_chooser_get_filter(GtkRecentChooser *chooser)
GtkRecentSortType
@ GTK_RECENT_SORT_NONE
@ GTK_RECENT_SORT_CUSTOM
@ GTK_RECENT_SORT_MRU
@ GTK_RECENT_SORT_LRU
gboolean gtk_recent_chooser_get_show_numbers(GtkRecentChooser *chooser)
gboolean gtk_recent_chooser_get_show_private(GtkRecentChooser *chooser)
void gtk_recent_chooser_select_all(GtkRecentChooser *chooser)
void gtk_recent_chooser_set_show_private(GtkRecentChooser *chooser, gboolean show_private)
GtkRecentChooserError
@ GTK_RECENT_CHOOSER_ERROR_INVALID_URI
@ GTK_RECENT_CHOOSER_ERROR_NOT_FOUND
GSList * gtk_recent_chooser_list_filters(GtkRecentChooser *chooser)
gboolean gtk_recent_chooser_set_current_uri(GtkRecentChooser *chooser, const gchar *uri, GError **error)
gboolean gtk_recent_chooser_get_show_not_found(GtkRecentChooser *chooser)
void gtk_recent_chooser_set_select_multiple(GtkRecentChooser *chooser, gboolean select_multiple)
void gtk_recent_chooser_set_filter(GtkRecentChooser *chooser, GtkRecentFilter *filter)
void gtk_recent_chooser_set_show_tips(GtkRecentChooser *chooser, gboolean show_tips)
struct _GtkRecentChooser GtkRecentChooser
struct _GtkRecentFilter GtkRecentFilter
struct _GtkRecentInfo GtkRecentInfo
PBD::PropertyDescriptor< timecnt_t > length
Transmitter error
gboolean(* select_uri)(GtkRecentChooser *chooser, const gchar *uri, GError **error)
void(* select_all)(GtkRecentChooser *chooser)
GTypeInterface base_iface
void(* unselect_all)(GtkRecentChooser *chooser)
gboolean(* set_current_uri)(GtkRecentChooser *chooser, const gchar *uri, GError **error)
void(* item_activated)(GtkRecentChooser *chooser)
void(* selection_changed)(GtkRecentChooser *chooser)
void(* remove_filter)(GtkRecentChooser *chooser, GtkRecentFilter *filter)
void(* unselect_uri)(GtkRecentChooser *chooser, const gchar *uri)
void(* set_sort_func)(GtkRecentChooser *chooser, GtkRecentSortFunc sort_func, gpointer data, GDestroyNotify destroy)
void(* add_filter)(GtkRecentChooser *chooser, GtkRecentFilter *filter)