]> Pileus Git - ~andy/gtk/blob - docs/reference/gtk/tmpl/gtkrecentfilter.sgml
Make 3.0 parallel-installable to 2.x
[~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 <!-- ##### SECTION Image ##### -->
44
45
46 <!-- ##### STRUCT GtkRecentFilter ##### -->
47 <para>
48 The <structname>GtkRecentFilter</structname> struct contains
49 only private fields and should not be directly accessed.
50 </para>
51
52
53 <!-- ##### STRUCT GtkRecentFilterInfo ##### -->
54 <para>
55 A <structname>GtkRecentFilterInfo</structname> struct is used
56 to pass information about the tested file to gtk_recent_filter_filter().
57 </para>
58
59 @contains: Flags indicating which of the following fields need
60   are filled
61 @uri: the URI of the file being tested
62 @display_name: the string that will be used to display the file
63   in the recent chooser
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
68
69 <!-- ##### ENUM GtkRecentFilterFlags ##### -->
70 <para>
71 These flags indicate what parts of a #GtkRecentFilterInfo struct
72 are filled or need to be filled.
73 </para>
74
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
80   registered the file
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
83   has been registered
84
85 <!-- ##### USER_FUNCTION GtkRecentFilterFunc ##### -->
86 <para>
87 The type of function that is used with custom filters,
88 see gtk_recent_filter_add_custom().
89 </para>
90
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
95
96
97 <!-- ##### FUNCTION gtk_recent_filter_new ##### -->
98 <para>
99
100 </para>
101
102 @void: 
103 @Returns: 
104
105
106 <!-- ##### FUNCTION gtk_recent_filter_get_name ##### -->
107 <para>
108
109 </para>
110
111 @filter: 
112 @Returns: 
113
114
115 <!-- ##### FUNCTION gtk_recent_filter_set_name ##### -->
116 <para>
117
118 </para>
119
120 @filter: 
121 @name: 
122
123
124 <!-- ##### FUNCTION gtk_recent_filter_add_mime_type ##### -->
125 <para>
126
127 </para>
128
129 @filter: 
130 @mime_type: 
131
132
133 <!-- ##### FUNCTION gtk_recent_filter_add_pattern ##### -->
134 <para>
135
136 </para>
137
138 @filter: 
139 @pattern: 
140
141
142 <!-- ##### FUNCTION gtk_recent_filter_add_pixbuf_formats ##### -->
143 <para>
144
145 </para>
146
147 @filter: 
148
149
150 <!-- ##### FUNCTION gtk_recent_filter_add_application ##### -->
151 <para>
152
153 </para>
154
155 @filter: 
156 @application: 
157
158
159 <!-- ##### FUNCTION gtk_recent_filter_add_group ##### -->
160 <para>
161
162 </para>
163
164 @filter: 
165 @group: 
166
167
168 <!-- ##### FUNCTION gtk_recent_filter_add_age ##### -->
169 <para>
170
171 </para>
172
173 @filter: 
174 @days: 
175
176
177 <!-- ##### FUNCTION gtk_recent_filter_add_custom ##### -->
178 <para>
179
180 </para>
181
182 @filter: 
183 @needed: 
184 @func: 
185 @data: 
186 @data_destroy: 
187
188
189 <!-- ##### FUNCTION gtk_recent_filter_get_needed ##### -->
190 <para>
191
192 </para>
193
194 @filter: 
195 @Returns: 
196
197
198 <!-- ##### FUNCTION gtk_recent_filter_filter ##### -->
199 <para>
200
201 </para>
202
203 @filter: 
204 @filter_info: 
205 @Returns: 
206
207