summaryrefslogtreecommitdiff
path: root/docs/reference/gtk/tmpl/gtkrecentfilter.sgml
blob: c6d601d1aaa600165831c3a3161b5df7ab008c5a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
<!-- ##### SECTION Title ##### -->
GtkRecentFilter

<!-- ##### SECTION Short_Description ##### -->
A filter for selecting a subset of recently used files

<!-- ##### SECTION Long_Description ##### -->
<para>
A #GtkRecentFilter can be used to restrict the files being shown
in a #GtkRecentChooser.  Files can be filtered based on their name
(with gtk_recent_filter_add_pattern()), on their mime type (with
gtk_file_filter_add_mime_type()), on the application that has
registered them (with gtk_recent_filter_add_application()), or by
a custom filter function (with gtk_recent_filter_add_custom()).
</para>

<para>
Filtering by mime type handles aliasing and subclassing of mime
types; e.g. a filter for text/plain also matches a file with mime
type application/rtf, since application/rtf is a subclass of text/plain.
Note that #GtkRecentFilter allows wildcards for the subtype of a
mime type, so you can e.g. filter for image/*.
</para>

<para>
Normally, filters are used by adding them to a #GtkRecentChooser,
see gtk_recent_chooser_add_filter(), but it is also possible to
manually use a filter on a file with gtk_recent_filter_filter().
</para>

<para>
Recently used files are supported since GTK+ 2.10.
</para>

<!-- ##### SECTION See_Also ##### -->
<para>
#GtkRecentChooser
</para>

<!-- ##### SECTION Stability_Level ##### -->


<!-- ##### STRUCT GtkRecentFilter ##### -->
<para>
The <structname>GtkRecentFilter</structname> struct contains
only private fields and should not be directly accessed.
</para>


<!-- ##### STRUCT GtkRecentFilterInfo ##### -->
<para>
A <structname>GtkRecentFilterInfo</structname> struct is used
to pass information about the tested file to gtk_recent_filter_filter().
</para>

@contains: Flags indicating which of the following fields need
  are filled
@uri: the URI of the file being tested
@display_name: the string that will be used to display the file
  in the recent chooser
@mime_type: the mime type of the file
@applications: the list of applications that have registered the file
@groups: the groups to which the file belongs to
@age: the number of days elapsed since the file has been registered

<!-- ##### ENUM GtkRecentFilterFlags ##### -->
<para>
These flags indicate what parts of a #GtkRecentFilterInfo struct
are filled or need to be filled.
</para>

@GTK_RECENT_FILTER_URI: the URI of the file being tested
@GTK_RECENT_FILTER_DISPLAY_NAME: the string that will be used to
  display the file in the recent chooser
@GTK_RECENT_FILTER_MIME_TYPE: the mime type of the file
@GTK_RECENT_FILTER_APPLICATION: the list of applications that have
  registered the file
@GTK_RECENT_FILTER_GROUP: the groups to which the file belongs to
@GTK_RECENT_FILTER_AGE: the number of days elapsed since the file
  has been registered

<!-- ##### USER_FUNCTION GtkRecentFilterFunc ##### -->
<para>
The type of function that is used with custom filters,
see gtk_recent_filter_add_custom().
</para>

@filter_info: a #GtkRecentFilterInfo that is filled according
  to the @needed flags passed to gtk_recent_filter_add_custom()
@user_data: user data passed to gtk_recent_filter_add_custom()
@Returns: %TRUE if the file should be displayed


<!-- ##### FUNCTION gtk_recent_filter_new ##### -->
<para>

</para>

@Returns: 


<!-- ##### FUNCTION gtk_recent_filter_get_name ##### -->
<para>

</para>

@filter: 
@Returns: 


<!-- ##### FUNCTION gtk_recent_filter_set_name ##### -->
<para>

</para>

@filter: 
@name: 


<!-- ##### FUNCTION gtk_recent_filter_add_mime_type ##### -->
<para>

</para>

@filter: 
@mime_type: 


<!-- ##### FUNCTION gtk_recent_filter_add_pattern ##### -->
<para>

</para>

@filter: 
@pattern: 


<!-- ##### FUNCTION gtk_recent_filter_add_pixbuf_formats ##### -->
<para>

</para>

@filter: 


<!-- ##### FUNCTION gtk_recent_filter_add_application ##### -->
<para>

</para>

@filter: 
@application: 


<!-- ##### FUNCTION gtk_recent_filter_add_group ##### -->
<para>

</para>

@filter: 
@group: 


<!-- ##### FUNCTION gtk_recent_filter_add_age ##### -->
<para>

</para>

@filter: 
@days: 


<!-- ##### FUNCTION gtk_recent_filter_add_custom ##### -->
<para>

</para>

@filter: 
@needed: 
@func: 
@data: 
@data_destroy: 


<!-- ##### FUNCTION gtk_recent_filter_get_needed ##### -->
<para>

</para>

@filter: 
@Returns: 


<!-- ##### FUNCTION gtk_recent_filter_filter ##### -->
<para>

</para>

@filter: 
@filter_info: 
@Returns: