]> Pileus Git - ~andy/gtk/blob - docs/reference/gtk/tmpl/gtkrecentfilter.sgml
c6d601d1aaa600165831c3a3161b5df7ab008c5a
[~andy/gtk] / docs / reference / gtk / tmpl / gtkrecentfilter.sgml
1 <!-- ##### SECTION Title ##### -->
2 GtkRecentFilter
3
4 <!-- ##### SECTION Short_Description ##### -->
5 A filter for selecting a subset of recently used files
6
7 <!-- ##### SECTION Long_Description ##### -->
8 <para>
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()).
15 </para>
16
17 <para>
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/*.
23 </para>
24
25 <para>
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().
29 </para>
30
31 <para>
32 Recently used files are supported since GTK+ 2.10.
33 </para>
34
35 <!-- ##### SECTION See_Also ##### -->
36 <para>
37 #GtkRecentChooser
38 </para>
39
40 <!-- ##### SECTION Stability_Level ##### -->
41
42
43 <!-- ##### STRUCT GtkRecentFilter ##### -->
44 <para>
45 The <structname>GtkRecentFilter</structname> struct contains
46 only private fields and should not be directly accessed.
47 </para>
48
49
50 <!-- ##### STRUCT GtkRecentFilterInfo ##### -->
51 <para>
52 A <structname>GtkRecentFilterInfo</structname> struct is used
53 to pass information about the tested file to gtk_recent_filter_filter().
54 </para>
55
56 @contains: Flags indicating which of the following fields need
57   are filled
58 @uri: the URI of the file being tested
59 @display_name: the string that will be used to display the file
60   in the recent chooser
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
65
66 <!-- ##### ENUM GtkRecentFilterFlags ##### -->
67 <para>
68 These flags indicate what parts of a #GtkRecentFilterInfo struct
69 are filled or need to be filled.
70 </para>
71
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
77   registered the file
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
80   has been registered
81
82 <!-- ##### USER_FUNCTION GtkRecentFilterFunc ##### -->
83 <para>
84 The type of function that is used with custom filters,
85 see gtk_recent_filter_add_custom().
86 </para>
87
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
92
93
94 <!-- ##### FUNCTION gtk_recent_filter_new ##### -->
95 <para>
96
97 </para>
98
99 @Returns: 
100
101
102 <!-- ##### FUNCTION gtk_recent_filter_get_name ##### -->
103 <para>
104
105 </para>
106
107 @filter: 
108 @Returns: 
109
110
111 <!-- ##### FUNCTION gtk_recent_filter_set_name ##### -->
112 <para>
113
114 </para>
115
116 @filter: 
117 @name: 
118
119
120 <!-- ##### FUNCTION gtk_recent_filter_add_mime_type ##### -->
121 <para>
122
123 </para>
124
125 @filter: 
126 @mime_type: 
127
128
129 <!-- ##### FUNCTION gtk_recent_filter_add_pattern ##### -->
130 <para>
131
132 </para>
133
134 @filter: 
135 @pattern: 
136
137
138 <!-- ##### FUNCTION gtk_recent_filter_add_pixbuf_formats ##### -->
139 <para>
140
141 </para>
142
143 @filter: 
144
145
146 <!-- ##### FUNCTION gtk_recent_filter_add_application ##### -->
147 <para>
148
149 </para>
150
151 @filter: 
152 @application: 
153
154
155 <!-- ##### FUNCTION gtk_recent_filter_add_group ##### -->
156 <para>
157
158 </para>
159
160 @filter: 
161 @group: 
162
163
164 <!-- ##### FUNCTION gtk_recent_filter_add_age ##### -->
165 <para>
166
167 </para>
168
169 @filter: 
170 @days: 
171
172
173 <!-- ##### FUNCTION gtk_recent_filter_add_custom ##### -->
174 <para>
175
176 </para>
177
178 @filter: 
179 @needed: 
180 @func: 
181 @data: 
182 @data_destroy: 
183
184
185 <!-- ##### FUNCTION gtk_recent_filter_get_needed ##### -->
186 <para>
187
188 </para>
189
190 @filter: 
191 @Returns: 
192
193
194 <!-- ##### FUNCTION gtk_recent_filter_filter ##### -->
195 <para>
196
197 </para>
198
199 @filter: 
200 @filter_info: 
201 @Returns: 
202
203