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 <!-- ##### SECTION Image ##### -->
46 <!-- ##### STRUCT GtkRecentFilter ##### -->
48 The <structname>GtkRecentFilter</structname> struct contains
49 only private fields and should not be directly accessed.
53 <!-- ##### STRUCT GtkRecentFilterInfo ##### -->
55 A <structname>GtkRecentFilterInfo</structname> struct is used
56 to pass information about the tested file to gtk_recent_filter_filter().
59 @contains: Flags indicating which of the following fields need
61 @uri: the URI of the file being tested
62 @display_name: the string that will be used to display the file
64 @mime_type: the mime type of the file
65 @applications: the list of applications that have registered the file
66 @groups: the groups to which the file belongs to
67 @age: the number of days elapsed since the file has been registered
69 <!-- ##### ENUM GtkRecentFilterFlags ##### -->
71 These flags indicate what parts of a #GtkRecentFilterInfo struct
72 are filled or need to be filled.
75 @GTK_RECENT_FILTER_URI: the URI of the file being tested
76 @GTK_RECENT_FILTER_DISPLAY_NAME: the string that will be used to
77 display the file in the recent chooser
78 @GTK_RECENT_FILTER_MIME_TYPE: the mime type of the file
79 @GTK_RECENT_FILTER_APPLICATION: the list of applications that have
81 @GTK_RECENT_FILTER_GROUP: the groups to which the file belongs to
82 @GTK_RECENT_FILTER_AGE: the number of days elapsed since the file
85 <!-- ##### USER_FUNCTION GtkRecentFilterFunc ##### -->
87 The type of function that is used with custom filters,
88 see gtk_recent_filter_add_custom().
91 @filter_info: a #GtkRecentFilterInfo that is filled according
92 to the @needed flags passed to gtk_recent_filter_add_custom()
93 @user_data: user data passed to gtk_recent_filter_add_custom()
94 @Returns: %TRUE if the file should be displayed
97 <!-- ##### FUNCTION gtk_recent_filter_new ##### -->
106 <!-- ##### FUNCTION gtk_recent_filter_get_name ##### -->
115 <!-- ##### FUNCTION gtk_recent_filter_set_name ##### -->
124 <!-- ##### FUNCTION gtk_recent_filter_add_mime_type ##### -->
133 <!-- ##### FUNCTION gtk_recent_filter_add_pattern ##### -->
142 <!-- ##### FUNCTION gtk_recent_filter_add_pixbuf_formats ##### -->
150 <!-- ##### FUNCTION gtk_recent_filter_add_application ##### -->
159 <!-- ##### FUNCTION gtk_recent_filter_add_group ##### -->
168 <!-- ##### FUNCTION gtk_recent_filter_add_age ##### -->
177 <!-- ##### FUNCTION gtk_recent_filter_add_custom ##### -->
189 <!-- ##### FUNCTION gtk_recent_filter_get_needed ##### -->
198 <!-- ##### FUNCTION gtk_recent_filter_filter ##### -->