Functions
gtk_recent_filter_get_name ()
const gchar *
gtk_recent_filter_get_name (GtkRecentFilter *filter);
Gets the human-readable name for the filter.
See gtk_recent_filter_set_name().
Returns
the name of the filter, or NULL. The returned string
is owned by the filter object and should not be freed.
[nullable]
Since: 2.10
gtk_recent_filter_set_name ()
void
gtk_recent_filter_set_name (GtkRecentFilter *filter,
const gchar *name);
Sets the human-readable name of the filter; this is the string
that will be displayed in the recently used resources selector
user interface if there is a selectable list of filters.
Since: 2.10
gtk_recent_filter_add_mime_type ()
void
gtk_recent_filter_add_mime_type (GtkRecentFilter *filter,
const gchar *mime_type);
Adds a rule that allows resources based on their registered MIME type.
Since: 2.10
gtk_recent_filter_add_pattern ()
void
gtk_recent_filter_add_pattern (GtkRecentFilter *filter,
const gchar *pattern);
Adds a rule that allows resources based on a pattern matching their
display name.
Since: 2.10
gtk_recent_filter_add_pixbuf_formats ()
void
gtk_recent_filter_add_pixbuf_formats (GtkRecentFilter *filter);
Adds a rule allowing image files in the formats supported
by GdkPixbuf.
Since: 2.10
gtk_recent_filter_add_application ()
void
gtk_recent_filter_add_application (GtkRecentFilter *filter,
const gchar *application);
Adds a rule that allows resources based on the name of the application
that has registered them.
Since: 2.10
gtk_recent_filter_add_group ()
void
gtk_recent_filter_add_group (GtkRecentFilter *filter,
const gchar *group);
Adds a rule that allows resources based on the name of the group
to which they belong
Since: 2.10
gtk_recent_filter_add_age ()
void
gtk_recent_filter_add_age (GtkRecentFilter *filter,
gint days);
Adds a rule that allows resources based on their age - that is, the number
of days elapsed since they were last modified.
Since: 2.10
gtk_recent_filter_add_custom ()
void
gtk_recent_filter_add_custom (GtkRecentFilter *filter,
GtkRecentFilterFlags needed,
GtkRecentFilterFunc func,
gpointer data,
GDestroyNotify data_destroy);
Adds a rule to a filter that allows resources based on a custom callback
function. The bitfield needed
which is passed in provides information
about what sorts of information that the filter function needs;
this allows GTK+ to avoid retrieving expensive information when
it isn’t needed by the filter.
Since: 2.10
Types and Values
GtkRecentFilter
typedef struct _GtkRecentFilter GtkRecentFilter;
struct GtkRecentFilterInfo
struct GtkRecentFilterInfo {
GtkRecentFilterFlags contains;
const gchar *uri;
const gchar *display_name;
const gchar *mime_type;
const gchar **applications;
const gchar **groups;
gint age;
};
A GtkRecentFilterInfo struct is used
to pass information about the tested file to gtk_recent_filter_filter().
enum GtkRecentFilterFlags
These flags indicate what parts of a GtkRecentFilterInfo struct
are filled or need to be filled.