1 <!-- ##### SECTION Title ##### -->
4 <!-- ##### SECTION Short_Description ##### -->
5 A filter for selecting a subset of recently used files
7 <!-- ##### SECTION Long_Description ##### -->
9 A #GtkRecentFilter can be used to restrict the files being shown
10 in a #GtkRecentChooser. Files can be filtered based on their name
11 (with gtk_recent_filter_add_pattern()), on their mime type (with
12 gtk_file_filter_add_mime_type()), on the application that has
13 registered them (with gtk_recent_filter_add_application()), or by
14 a custom filter function (with gtk_recent_filter_add_custom()).
18 Filtering by mime type handles aliasing and subclassing of mime
19 types; e.g. a filter for text/plain also matches a file with mime
20 type application/rtf, since application/rtf is a subclass of text/plain.
21 Note that #GtkRecentFilter allows wildcards for the subtype of a
22 mime type, so you can e.g. filter for image/*.
26 Normally, filters are used by adding them to a #GtkRecentChooser,
27 see gtk_recent_chooser_add_filter(), but it is also possible to
28 manually use a filter on a file with gtk_recent_filter_filter().
32 Recently used files are supported since GTK+ 2.10.
35 <!-- ##### SECTION See_Also ##### -->
40 <!-- ##### SECTION Stability_Level ##### -->
43 <!-- ##### STRUCT GtkRecentFilter ##### -->
45 The <structname>GtkRecentFilter</structname> struct contains
46 only private fields and should not be directly accessed.
50 <!-- ##### STRUCT GtkRecentFilterInfo ##### -->
52 A <structname>GtkRecentFilterInfo</structname> struct is used
53 to pass information about the tested file to gtk_recent_filter_filter().
56 @contains: Flags indicating which of the following fields need
58 @uri: the URI of the file being tested
59 @display_name: the string that will be used to display the file
61 @mime_type: the mime type of the file
62 @applications: the list of applications that have registered the file
63 @groups: the groups to which the file belongs to
64 @age: the number of days elapsed since the file has been registered
66 <!-- ##### ENUM GtkRecentFilterFlags ##### -->
68 These flags indicate what parts of a #GtkRecentFilterInfo struct
69 are filled or need to be filled.
72 @GTK_RECENT_FILTER_URI: the URI of the file being tested
73 @GTK_RECENT_FILTER_DISPLAY_NAME: the string that will be used to
74 display the file in the recent chooser
75 @GTK_RECENT_FILTER_MIME_TYPE: the mime type of the file
76 @GTK_RECENT_FILTER_APPLICATION: the list of applications that have
78 @GTK_RECENT_FILTER_GROUP: the groups to which the file belongs to
79 @GTK_RECENT_FILTER_AGE: the number of days elapsed since the file
82 <!-- ##### USER_FUNCTION GtkRecentFilterFunc ##### -->
84 The type of function that is used with custom filters,
85 see gtk_recent_filter_add_custom().
88 @filter_info: a #GtkRecentFilterInfo that is filled according
89 to the @needed flags passed to gtk_recent_filter_add_custom()
90 @user_data: user data passed to gtk_recent_filter_add_custom()
91 @Returns: %TRUE if the file should be displayed
94 <!-- ##### FUNCTION gtk_recent_filter_new ##### -->
102 <!-- ##### FUNCTION gtk_recent_filter_get_name ##### -->
111 <!-- ##### FUNCTION gtk_recent_filter_set_name ##### -->
120 <!-- ##### FUNCTION gtk_recent_filter_add_mime_type ##### -->
129 <!-- ##### FUNCTION gtk_recent_filter_add_pattern ##### -->
138 <!-- ##### FUNCTION gtk_recent_filter_add_pixbuf_formats ##### -->
146 <!-- ##### FUNCTION gtk_recent_filter_add_application ##### -->
155 <!-- ##### FUNCTION gtk_recent_filter_add_group ##### -->
164 <!-- ##### FUNCTION gtk_recent_filter_add_age ##### -->
173 <!-- ##### FUNCTION gtk_recent_filter_add_custom ##### -->
185 <!-- ##### FUNCTION gtk_recent_filter_get_needed ##### -->
194 <!-- ##### FUNCTION gtk_recent_filter_filter ##### -->