Synopsis#include <gtk/gtk.h> GtkRecentChooser; GtkRecentChooserIface; #define GTK_RECENT_CHOOSER_ERROR enum GtkRecentChooserError; void gtk_recent_chooser_set_show_private (GtkRecentChooser *chooser, gboolean show_private); gboolean gtk_recent_chooser_get_show_private (GtkRecentChooser *chooser); void gtk_recent_chooser_set_show_not_found (GtkRecentChooser *chooser, gboolean show_not_found); gboolean gtk_recent_chooser_get_show_not_found (GtkRecentChooser *chooser); void gtk_recent_chooser_set_show_icons (GtkRecentChooser *chooser, gboolean show_icons); gboolean gtk_recent_chooser_get_show_icons (GtkRecentChooser *chooser); void gtk_recent_chooser_set_select_multiple (GtkRecentChooser *chooser, gboolean select_multiple); gboolean gtk_recent_chooser_get_select_multiple (GtkRecentChooser *chooser); void gtk_recent_chooser_set_local_only (GtkRecentChooser *chooser, gboolean local_only); gboolean gtk_recent_chooser_get_local_only (GtkRecentChooser *chooser); void gtk_recent_chooser_set_limit (GtkRecentChooser *chooser, gint limit); gint gtk_recent_chooser_get_limit (GtkRecentChooser *chooser); void gtk_recent_chooser_set_show_tips (GtkRecentChooser *chooser, gboolean show_tips); gboolean gtk_recent_chooser_get_show_tips (GtkRecentChooser *chooser); void gtk_recent_chooser_set_show_numbers (GtkRecentChooser *chooser, gboolean show_numbers); gboolean gtk_recent_chooser_get_show_numbers (GtkRecentChooser *chooser); enum GtkRecentSortType; void gtk_recent_chooser_set_sort_type (GtkRecentChooser *chooser, GtkRecentSortType sort_type); GtkRecentSortType gtk_recent_chooser_get_sort_type (GtkRecentChooser *chooser); gint (*GtkRecentSortFunc) (GtkRecentInfo *a, GtkRecentInfo *b, gpointer user_data); void gtk_recent_chooser_set_sort_func (GtkRecentChooser *chooser, GtkRecentSortFunc sort_func, gpointer sort_data, GDestroyNotify data_destroy); gboolean gtk_recent_chooser_set_current_uri (GtkRecentChooser *chooser, const gchar *uri, GError **error); gchar* gtk_recent_chooser_get_current_uri (GtkRecentChooser *chooser); GtkRecentInfo* gtk_recent_chooser_get_current_item (GtkRecentChooser *chooser); gboolean gtk_recent_chooser_select_uri (GtkRecentChooser *chooser, const gchar *uri, GError **error); void gtk_recent_chooser_unselect_uri (GtkRecentChooser *chooser, const gchar *uri); void gtk_recent_chooser_select_all (GtkRecentChooser *chooser); void gtk_recent_chooser_unselect_all (GtkRecentChooser *chooser); GList* gtk_recent_chooser_get_items (GtkRecentChooser *chooser); gchar** gtk_recent_chooser_get_uris (GtkRecentChooser *chooser, gsize *length); void gtk_recent_chooser_add_filter (GtkRecentChooser *chooser, GtkRecentFilter *filter); void gtk_recent_chooser_remove_filter (GtkRecentChooser *chooser, GtkRecentFilter *filter); GSList* gtk_recent_chooser_list_filters (GtkRecentChooser *chooser); void gtk_recent_chooser_set_filter (GtkRecentChooser *chooser, GtkRecentFilter *filter); GtkRecentFilter* gtk_recent_chooser_get_filter (GtkRecentChooser *chooser); Known ImplementationsGtkRecentChooser is implemented by GtkRecentChooserMenu, GtkRecentChooserDialog, GtkRecentChooserWidget and GtkRecentAction. Properties"filter" GtkRecentFilter* : Read / Write "limit" gint : Read / Write "local-only" gboolean : Read / Write "recent-manager" GtkRecentManager* : Write / Construct Only "select-multiple" gboolean : Read / Write "show-icons" gboolean : Read / Write "show-not-found" gboolean : Read / Write "show-private" gboolean : Read / Write "show-tips" gboolean : Read / Write "sort-type" GtkRecentSortType : Read / Write DescriptionGtkRecentChooser is an interface that can be implemented by widgets displaying the list of recently used files. In GTK+, the main objects that implement this interface are GtkRecentChooserWidget, GtkRecentChooserDialog and GtkRecentChooserMenu. Recently used files are supported since GTK+ 2.10. DetailsGtkRecentChooserIfacetypedef struct { GTypeInterface base_iface; /* * Methods */ gboolean (* set_current_uri) (GtkRecentChooser *chooser, const gchar *uri, GError **error); gchar * (* get_current_uri) (GtkRecentChooser *chooser); gboolean (* select_uri) (GtkRecentChooser *chooser, const gchar *uri, GError **error); void (* unselect_uri) (GtkRecentChooser *chooser, const gchar *uri); void (* select_all) (GtkRecentChooser *chooser); void (* unselect_all) (GtkRecentChooser *chooser); GList * (* get_items) (GtkRecentChooser *chooser); GtkRecentManager *(* get_recent_manager) (GtkRecentChooser *chooser); void (* add_filter) (GtkRecentChooser *chooser, GtkRecentFilter *filter); void (* remove_filter) (GtkRecentChooser *chooser, GtkRecentFilter *filter); GSList * (* list_filters) (GtkRecentChooser *chooser); void (* set_sort_func) (GtkRecentChooser *chooser, GtkRecentSortFunc sort_func, gpointer data, GDestroyNotify destroy); /* * Signals */ void (* item_activated) (GtkRecentChooser *chooser); void (* selection_changed) (GtkRecentChooser *chooser); } GtkRecentChooserIface;
GTK_RECENT_CHOOSER_ERROR#define GTK_RECENT_CHOOSER_ERROR (gtk_recent_chooser_error_quark ()) Used to get the GError quark for GtkRecentChooser errors. enum GtkRecentChooserErrortypedef enum { GTK_RECENT_CHOOSER_ERROR_NOT_FOUND, GTK_RECENT_CHOOSER_ERROR_INVALID_URI } GtkRecentChooserError; These identify the various errors that can occur while calling GtkRecentChooser functions. gtk_recent_chooser_set_show_private ()void gtk_recent_chooser_set_show_private (GtkRecentChooser *chooser, gboolean show_private); Whether to show recently used resources marked registered as private.
Since 2.10 gtk_recent_chooser_get_show_private ()gboolean gtk_recent_chooser_get_show_private (GtkRecentChooser *chooser);
Returns whether
Since 2.10 gtk_recent_chooser_set_show_not_found ()void gtk_recent_chooser_set_show_not_found (GtkRecentChooser *chooser, gboolean show_not_found);
Sets whether
Since 2.10 gtk_recent_chooser_get_show_not_found ()gboolean gtk_recent_chooser_get_show_not_found (GtkRecentChooser *chooser);
Retrieves whether
Since 2.10 gtk_recent_chooser_set_show_icons ()void gtk_recent_chooser_set_show_icons (GtkRecentChooser *chooser, gboolean show_icons);
Sets whether
Since 2.10 gtk_recent_chooser_get_show_icons ()gboolean gtk_recent_chooser_get_show_icons (GtkRecentChooser *chooser);
Retrieves whether
Since 2.10 gtk_recent_chooser_set_select_multiple ()void gtk_recent_chooser_set_select_multiple (GtkRecentChooser *chooser, gboolean select_multiple);
Sets whether
Since 2.10 gtk_recent_chooser_get_select_multiple ()gboolean gtk_recent_chooser_get_select_multiple (GtkRecentChooser *chooser);
Gets whether
Since 2.10 gtk_recent_chooser_set_local_only ()void gtk_recent_chooser_set_local_only (GtkRecentChooser *chooser, gboolean local_only);
Sets whether only local resources, that is resources using the file:// URI
scheme, should be shown in the recently used resources selector. If
Since 2.10 gtk_recent_chooser_get_local_only ()gboolean gtk_recent_chooser_get_local_only (GtkRecentChooser *chooser);
Gets whether only local resources should be shown in the recently used
resources selector. See
Since 2.10 gtk_recent_chooser_set_limit ()void gtk_recent_chooser_set_limit (GtkRecentChooser *chooser, gint limit);
Sets the number of items that should be returned by
Since 2.10 gtk_recent_chooser_get_limit ()gint gtk_recent_chooser_get_limit (GtkRecentChooser *chooser);
Gets the number of items returned by
Since 2.10 gtk_recent_chooser_set_show_tips ()void gtk_recent_chooser_set_show_tips (GtkRecentChooser *chooser, gboolean show_tips); Sets whether to show a tooltips containing the full path of each recently used resource in a GtkRecentChooser widget.
Since 2.10 gtk_recent_chooser_get_show_tips ()gboolean gtk_recent_chooser_get_show_tips (GtkRecentChooser *chooser);
Gets whether
Since 2.10 gtk_recent_chooser_set_show_numbers ()void gtk_recent_chooser_set_show_numbers (GtkRecentChooser *chooser, gboolean show_numbers); Warning
Whether to show recently used resources prepended by a unique number.
Since 2.10 gtk_recent_chooser_get_show_numbers ()gboolean gtk_recent_chooser_get_show_numbers (GtkRecentChooser *chooser); Warning
Returns whether
Since 2.10 enum GtkRecentSortTypetypedef enum { GTK_RECENT_SORT_NONE = 0, GTK_RECENT_SORT_MRU, GTK_RECENT_SORT_LRU, GTK_RECENT_SORT_CUSTOM } GtkRecentSortType; Used to specify the sorting method to be applyed to the recently used resource list.
gtk_recent_chooser_set_sort_type ()void gtk_recent_chooser_set_sort_type (GtkRecentChooser *chooser, GtkRecentSortType sort_type);
Changes the sorting order of the recently used resources list displayed by
Since 2.10 gtk_recent_chooser_get_sort_type ()GtkRecentSortType gtk_recent_chooser_get_sort_type (GtkRecentChooser *chooser);
Gets the value set by
Since 2.10 GtkRecentSortFunc ()gint (*GtkRecentSortFunc) (GtkRecentInfo *a, GtkRecentInfo *b, gpointer user_data);
gtk_recent_chooser_set_sort_func ()void gtk_recent_chooser_set_sort_func (GtkRecentChooser *chooser, GtkRecentSortFunc sort_func, gpointer sort_data, GDestroyNotify data_destroy);
Sets the comparison function used when sorting to be
To the comparison function will be passed two GtkRecentInfo structs and
Since 2.10 gtk_recent_chooser_set_current_uri ()gboolean gtk_recent_chooser_set_current_uri (GtkRecentChooser *chooser, const gchar *uri, GError **error);
Sets
Since 2.10 gtk_recent_chooser_get_current_uri ()gchar* gtk_recent_chooser_get_current_uri (GtkRecentChooser *chooser);
Gets the URI currently selected by
Since 2.10 gtk_recent_chooser_get_current_item ()GtkRecentInfo* gtk_recent_chooser_get_current_item (GtkRecentChooser *chooser);
Gets the GtkRecentInfo currently selected by
Since 2.10 gtk_recent_chooser_select_uri ()gboolean gtk_recent_chooser_select_uri (GtkRecentChooser *chooser, const gchar *uri, GError **error);
Selects
Since 2.10 gtk_recent_chooser_unselect_uri ()void gtk_recent_chooser_unselect_uri (GtkRecentChooser *chooser, const gchar *uri);
Unselects
Since 2.10 gtk_recent_chooser_select_all ()void gtk_recent_chooser_select_all (GtkRecentChooser *chooser);
Selects all the items inside
Since 2.10 gtk_recent_chooser_unselect_all ()void gtk_recent_chooser_unselect_all (GtkRecentChooser *chooser);
Unselects all the items inside
Since 2.10 gtk_recent_chooser_get_items ()GList* gtk_recent_chooser_get_items (GtkRecentChooser *chooser); Gets the list of recently used resources in form of GtkRecentInfo objects.
The return value of this function is affected by the "sort-type" and
"limit" properties of
Since 2.10 gtk_recent_chooser_get_uris ()gchar** gtk_recent_chooser_get_uris (GtkRecentChooser *chooser, gsize *length); Gets the URI of the recently used resources.
The return value of this function is affected by the "sort-type" and "limit"
properties of
Since the returned array is
Since 2.10 gtk_recent_chooser_add_filter ()void gtk_recent_chooser_add_filter (GtkRecentChooser *chooser, GtkRecentFilter *filter);
Adds
If no previous filter objects were defined, this function will call
Since 2.10 gtk_recent_chooser_remove_filter ()void gtk_recent_chooser_remove_filter (GtkRecentChooser *chooser, GtkRecentFilter *filter);
Removes
Since 2.10 gtk_recent_chooser_list_filters ()GSList* gtk_recent_chooser_list_filters (GtkRecentChooser *chooser);
Gets the GtkRecentFilter objects held by
Since 2.10 gtk_recent_chooser_set_filter ()void gtk_recent_chooser_set_filter (GtkRecentChooser *chooser, GtkRecentFilter *filter);
Sets
Since 2.10 gtk_recent_chooser_get_filter ()GtkRecentFilter* gtk_recent_chooser_get_filter (GtkRecentChooser *chooser);
Gets the GtkRecentFilter object currently used by
Since 2.10 Property DetailsThe
|
|
the object which received the signal |
|
user data set when the signal handler was connected. |
Since 2.10
"selection-changed"
signalvoid user_function (GtkRecentChooser *chooser, gpointer user_data) : Run Last
This signal is emitted when there is a change in the set of selected recently used resources. This can happen when a user modifies the selection with the mouse or the keyboard, or when explicitely calling functions to change the selection.
|
the object which received the signal |
|
user data set when the signal handler was connected. |
Since 2.10