4
4
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
5
<title>Resource lookup functions</title>
6
<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
7
<link rel="start" href="index.html" title="libxfce4util Reference Manual">
6
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
7
<link rel="home" href="index.html" title="libxfce4util Reference Manual">
8
8
<link rel="up" href="libxfce4util-utilities.html" title="Xfce Utilities">
9
9
<link rel="prev" href="libxfce4util-utilities.html" title="Xfce Utilities">
10
10
<link rel="next" href="libxfce4util-Resource-Config-File-Support.html" title="Resource Config File Support">
11
<meta name="generator" content="GTK-Doc V1.10 (XML mode)">
11
<meta name="generator" content="GTK-Doc V1.14 (XML mode)">
12
12
<link rel="stylesheet" href="style.css" type="text/css">
13
<link rel="chapter" href="reference.html" title="libxfce4util Overview">
14
<link rel="chapter" href="libxfce4util-fundamentals.html" title="Xfce Fundamentals">
15
<link rel="chapter" href="libxfce4util-core.html" title="Xfce Core Application support">
16
<link rel="chapter" href="libxfce4util-utilities.html" title="Xfce Utilities">
17
<link rel="chapter" href="libxfce4util-datatypes.html" title="Xfce Data types">
19
14
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
20
15
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
39
36
<td valign="top" align="right"></td>
40
37
</tr></table></div>
41
<div class="refsynopsisdiv">
38
<div class="refsynopsisdiv" title="Synopsis">
42
39
<a name="libxfce4util-Resource-lookup-functions.synopsis"></a><h2>Synopsis</h2>
43
40
<pre class="synopsis">
45
41
#include <libxfce4util/libxfce4util.h>
47
43
enum <a class="link" href="libxfce4util-Resource-lookup-functions.html#XfceResourceType" title="enum XfceResourceType">XfceResourceType</a>;
49
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
50
>gboolean</a> (<a class="link" href="libxfce4util-Resource-lookup-functions.html#XfceMatchFunc" title="XfceMatchFunc ()">*XfceMatchFunc</a>) (const <a
51
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
54
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
57
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
58
>gpointer</a> user_data);
60
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
61
>gchar</a>** <a class="link" href="libxfce4util-Resource-lookup-functions.html#xfce-resource-dirs" title="xfce_resource_dirs ()">xfce_resource_dirs</a> (<a class="link" href="libxfce4util-Resource-lookup-functions.html#XfceResourceType" title="enum XfceResourceType">XfceResourceType</a> type);
63
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
64
>gchar</a>* <a class="link" href="libxfce4util-Resource-lookup-functions.html#xfce-resource-lookup" title="xfce_resource_lookup ()">xfce_resource_lookup</a> (<a class="link" href="libxfce4util-Resource-lookup-functions.html#XfceResourceType" title="enum XfceResourceType">XfceResourceType</a> type,
66
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
67
>gchar</a> *filename);
69
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
70
>gchar</a>** <a class="link" href="libxfce4util-Resource-lookup-functions.html#xfce-resource-lookup-all" title="xfce_resource_lookup_all ()">xfce_resource_lookup_all</a> (<a class="link" href="libxfce4util-Resource-lookup-functions.html#XfceResourceType" title="enum XfceResourceType">XfceResourceType</a> type,
72
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
73
>gchar</a> *filename);
75
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
76
>gchar</a>** <a class="link" href="libxfce4util-Resource-lookup-functions.html#xfce-resource-match" title="xfce_resource_match ()">xfce_resource_match</a> (<a class="link" href="libxfce4util-Resource-lookup-functions.html#XfceResourceType" title="enum XfceResourceType">XfceResourceType</a> type,
78
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
81
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
82
>gboolean</a> unique);
84
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
85
>gchar</a>** <a class="link" href="libxfce4util-Resource-lookup-functions.html#xfce-resource-match-custom" title="xfce_resource_match_custom ()">xfce_resource_match_custom</a> (<a class="link" href="libxfce4util-Resource-lookup-functions.html#XfceResourceType" title="enum XfceResourceType">XfceResourceType</a> type,
87
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
89
<a class="link" href="libxfce4util-Resource-lookup-functions.html#XfceMatchFunc" title="XfceMatchFunc ()">XfceMatchFunc</a> func,
91
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
92
>gpointer</a> user_data);
93
void <a class="link" href="libxfce4util-Resource-lookup-functions.html#xfce-resource-push-path" title="xfce_resource_push_path ()">xfce_resource_push_path</a> (<a class="link" href="libxfce4util-Resource-lookup-functions.html#XfceResourceType" title="enum XfceResourceType">XfceResourceType</a> type,
95
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
97
void <a class="link" href="libxfce4util-Resource-lookup-functions.html#xfce-resource-pop-path" title="xfce_resource_pop_path ()">xfce_resource_pop_path</a> (<a class="link" href="libxfce4util-Resource-lookup-functions.html#XfceResourceType" title="enum XfceResourceType">XfceResourceType</a> type);
99
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
100
>gchar</a>* <a class="link" href="libxfce4util-Resource-lookup-functions.html#xfce-resource-save-location" title="xfce_resource_save_location ()">xfce_resource_save_location</a> (<a class="link" href="libxfce4util-Resource-lookup-functions.html#XfceResourceType" title="enum XfceResourceType">XfceResourceType</a> type,
102
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
105
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
106
>gboolean</a> create);
44
<span class="returnvalue">gboolean</span> (<a class="link" href="libxfce4util-Resource-lookup-functions.html#XfceMatchFunc" title="XfceMatchFunc ()">*XfceMatchFunc</a>) (<em class="parameter"><code>const <span class="type">gchar</span> *basedir</code></em>,
45
<em class="parameter"><code>const <span class="type">gchar</span> *relpath</code></em>,
46
<em class="parameter"><code><span class="type">gpointer</span> user_data</code></em>);
47
<span class="returnvalue">gchar</span>** <a class="link" href="libxfce4util-Resource-lookup-functions.html#xfce-resource-dirs" title="xfce_resource_dirs ()">xfce_resource_dirs</a> (<em class="parameter"><code><a class="link" href="libxfce4util-Resource-lookup-functions.html#XfceResourceType" title="enum XfceResourceType"><span class="type">XfceResourceType</span></a> type</code></em>);
48
<span class="returnvalue">gchar</span>* <a class="link" href="libxfce4util-Resource-lookup-functions.html#xfce-resource-lookup" title="xfce_resource_lookup ()">xfce_resource_lookup</a> (<em class="parameter"><code><a class="link" href="libxfce4util-Resource-lookup-functions.html#XfceResourceType" title="enum XfceResourceType"><span class="type">XfceResourceType</span></a> type</code></em>,
49
<em class="parameter"><code>const <span class="type">gchar</span> *filename</code></em>);
50
<span class="returnvalue">gchar</span>** <a class="link" href="libxfce4util-Resource-lookup-functions.html#xfce-resource-lookup-all" title="xfce_resource_lookup_all ()">xfce_resource_lookup_all</a> (<em class="parameter"><code><a class="link" href="libxfce4util-Resource-lookup-functions.html#XfceResourceType" title="enum XfceResourceType"><span class="type">XfceResourceType</span></a> type</code></em>,
51
<em class="parameter"><code>const <span class="type">gchar</span> *filename</code></em>);
52
<span class="returnvalue">gchar</span>** <a class="link" href="libxfce4util-Resource-lookup-functions.html#xfce-resource-match" title="xfce_resource_match ()">xfce_resource_match</a> (<em class="parameter"><code><a class="link" href="libxfce4util-Resource-lookup-functions.html#XfceResourceType" title="enum XfceResourceType"><span class="type">XfceResourceType</span></a> type</code></em>,
53
<em class="parameter"><code>const <span class="type">gchar</span> *pattern</code></em>,
54
<em class="parameter"><code><span class="type">gboolean</span> unique</code></em>);
55
<span class="returnvalue">gchar</span>** <a class="link" href="libxfce4util-Resource-lookup-functions.html#xfce-resource-match-custom" title="xfce_resource_match_custom ()">xfce_resource_match_custom</a> (<em class="parameter"><code><a class="link" href="libxfce4util-Resource-lookup-functions.html#XfceResourceType" title="enum XfceResourceType"><span class="type">XfceResourceType</span></a> type</code></em>,
56
<em class="parameter"><code><span class="type">gboolean</span> unique</code></em>,
57
<em class="parameter"><code><a class="link" href="libxfce4util-Resource-lookup-functions.html#XfceMatchFunc" title="XfceMatchFunc ()"><span class="type">XfceMatchFunc</span></a> func</code></em>,
58
<em class="parameter"><code><span class="type">gpointer</span> user_data</code></em>);
59
<span class="returnvalue">void</span> <a class="link" href="libxfce4util-Resource-lookup-functions.html#xfce-resource-push-path" title="xfce_resource_push_path ()">xfce_resource_push_path</a> (<em class="parameter"><code><a class="link" href="libxfce4util-Resource-lookup-functions.html#XfceResourceType" title="enum XfceResourceType"><span class="type">XfceResourceType</span></a> type</code></em>,
60
<em class="parameter"><code>const <span class="type">gchar</span> *path</code></em>);
61
<span class="returnvalue">void</span> <a class="link" href="libxfce4util-Resource-lookup-functions.html#xfce-resource-pop-path" title="xfce_resource_pop_path ()">xfce_resource_pop_path</a> (<em class="parameter"><code><a class="link" href="libxfce4util-Resource-lookup-functions.html#XfceResourceType" title="enum XfceResourceType"><span class="type">XfceResourceType</span></a> type</code></em>);
62
<span class="returnvalue">gchar</span>* <a class="link" href="libxfce4util-Resource-lookup-functions.html#xfce-resource-save-location" title="xfce_resource_save_location ()">xfce_resource_save_location</a> (<em class="parameter"><code><a class="link" href="libxfce4util-Resource-lookup-functions.html#XfceResourceType" title="enum XfceResourceType"><span class="type">XfceResourceType</span></a> type</code></em>,
63
<em class="parameter"><code>const <span class="type">gchar</span> *relpath</code></em>,
64
<em class="parameter"><code><span class="type">gboolean</span> create</code></em>);
109
<div class="refsect1" lang="en">
67
<div class="refsect1" title="Description">
110
68
<a name="libxfce4util-Resource-lookup-functions.description"></a><h2>Description</h2>
115
<div class="refsect1" lang="en">
72
<div class="refsect1" title="Details">
116
73
<a name="libxfce4util-Resource-lookup-functions.details"></a><h2>Details</h2>
117
<div class="refsect2" lang="en">
74
<div class="refsect2" title="enum XfceResourceType">
118
75
<a name="XfceResourceType"></a><h3>enum XfceResourceType</h3>
119
76
<pre class="programlisting">typedef enum /*< prefix=XFCE_RESOURCE_ >*/
125
82
XFCE_RESOURCE_THEMES = 4,
126
83
} XfceResourceType;
133
85
<div class="variablelist"><table border="0">
134
86
<col align="left" valign="top">
89
<td><p><a name="XFCE-RESOURCE-DATA:CAPS"></a><span class="term"><code class="literal">XFCE_RESOURCE_DATA</code></span></p></td>
90
<td>where applications store data.
94
<td><p><a name="XFCE-RESOURCE-CONFIG:CAPS"></a><span class="term"><code class="literal">XFCE_RESOURCE_CONFIG</code></span></p></td>
95
<td>configuration files.
99
<td><p><a name="XFCE-RESOURCE-CACHE:CAPS"></a><span class="term"><code class="literal">XFCE_RESOURCE_CACHE</code></span></p></td>
100
<td>cached information.
104
<td><p><a name="XFCE-RESOURCE-ICONS:CAPS"></a><span class="term"><code class="literal">XFCE_RESOURCE_ICONS</code></span></p></td>
105
<td>icon search path.
109
<td><p><a name="XFCE-RESOURCE-THEMES:CAPS"></a><span class="term"><code class="literal">XFCE_RESOURCE_THEMES</code></span></p></td>
110
<td>themes search path.
139
<div class="refsect2" lang="en">
117
<div class="refsect2" title="XfceMatchFunc ()">
140
118
<a name="XfceMatchFunc"></a><h3>XfceMatchFunc ()</h3>
141
<pre class="programlisting"><a
142
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
143
>gboolean</a> (*XfceMatchFunc) (const <a
144
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
147
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
150
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
151
>gpointer</a> user_data);</pre>
119
<pre class="programlisting"><span class="returnvalue">gboolean</span> (*XfceMatchFunc) (<em class="parameter"><code>const <span class="type">gchar</span> *basedir</code></em>,
120
<em class="parameter"><code>const <span class="type">gchar</span> *relpath</code></em>,
121
<em class="parameter"><code><span class="type">gpointer</span> user_data</code></em>);</pre>
157
125
<div class="variablelist"><table border="0">
158
126
<col align="left" valign="top">
161
<td><p><span class="term"><em class="parameter"><code>basedir</code></em> :</span></p></td>
166
<td><p><span class="term"><em class="parameter"><code>relpath</code></em> :</span></p></td>
171
129
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
172
<td> additional user data passed to <a class="link" href="libxfce4util-Resource-lookup-functions.html#xfce-resource-match-custom" title="xfce_resource_match_custom ()"><code class="function">xfce_resource_match_custom()</code></a>.
130
<td>additional user data passed to <a class="link" href="libxfce4util-Resource-lookup-functions.html#xfce-resource-match-custom" title="xfce_resource_match_custom ()"><code class="function">xfce_resource_match_custom()</code></a>.
176
134
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
186
<div class="refsect2" lang="en">
142
<div class="refsect2" title="xfce_resource_dirs ()">
187
143
<a name="xfce-resource-dirs"></a><h3>xfce_resource_dirs ()</h3>
188
<pre class="programlisting"><a
189
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
190
>gchar</a>** xfce_resource_dirs (<a class="link" href="libxfce4util-Resource-lookup-functions.html#XfceResourceType" title="enum XfceResourceType">XfceResourceType</a> type);</pre>
144
<pre class="programlisting"><span class="returnvalue">gchar</span>** xfce_resource_dirs (<em class="parameter"><code><a class="link" href="libxfce4util-Resource-lookup-functions.html#XfceResourceType" title="enum XfceResourceType"><span class="type">XfceResourceType</span></a> type</code></em>);</pre>
192
146
Queries the list of possible directories for the specified <em class="parameter"><code>type</code></em>. The
193
147
first element of the list is always the save location for <em class="parameter"><code>type</code></em>. None
224
<p class="since">Since 4.2
174
<p class="since">Since 4.2</p>
228
<div class="refsect2" lang="en">
177
<div class="refsect2" title="xfce_resource_lookup ()">
229
178
<a name="xfce-resource-lookup"></a><h3>xfce_resource_lookup ()</h3>
230
<pre class="programlisting"><a
231
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
232
>gchar</a>* xfce_resource_lookup (<a class="link" href="libxfce4util-Resource-lookup-functions.html#XfceResourceType" title="enum XfceResourceType">XfceResourceType</a> type,
234
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
235
>gchar</a> *filename);</pre>
179
<pre class="programlisting"><span class="returnvalue">gchar</span>* xfce_resource_lookup (<em class="parameter"><code><a class="link" href="libxfce4util-Resource-lookup-functions.html#XfceResourceType" title="enum XfceResourceType"><span class="type">XfceResourceType</span></a> type</code></em>,
180
<em class="parameter"><code>const <span class="type">gchar</span> *filename</code></em>);</pre>
237
182
Looks for a resource of the specified <em class="parameter"><code>type</code></em> whose relative path matches
238
183
<em class="parameter"><code>filename</code></em>. <em class="parameter"><code>filename</code></em> can either reference a regular file, in which case
240
185
<em class="parameter"><code>filename</code></em> contains a trailing slash character ('/').
243
The caller is responsible to free the returned string using <a
244
href="/usr/share/gtk-doc/html/glib/glib-Memory-Allocation.html#g-free"
245
><code class="function">g_free()</code></a>
246
when no longer needed.</p>
188
The caller is responsible to free the returned string using <code class="function">g_free()</code>
189
when no longer needed.
250
191
<div class="variablelist"><table border="0">
251
192
<col align="left" valign="top">
254
195
<td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
255
<td> type of resource to lookup.
196
<td>type of resource to lookup.
259
200
<td><p><span class="term"><em class="parameter"><code>filename</code></em> :</span></p></td>
260
<td> relative filename of the resource, e.g. "xfwm4/xfwmrc".
201
<td>relative filename of the resource, e.g. "xfwm4/xfwmrc".
264
205
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
265
206
<td> the absolute path to the first file or directory in the
266
search path, that matches <em class="parameter"><code>filename</code></em> or <a
267
href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"
268
><code class="literal">NULL</code></a> if no such
207
search path, that matches <em class="parameter"><code>filename</code></em> or <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a> if no such
269
208
file or directory could be found.
275
<p class="since">Since 4.2
214
<p class="since">Since 4.2</p>
279
<div class="refsect2" lang="en">
217
<div class="refsect2" title="xfce_resource_lookup_all ()">
280
218
<a name="xfce-resource-lookup-all"></a><h3>xfce_resource_lookup_all ()</h3>
281
<pre class="programlisting"><a
282
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
283
>gchar</a>** xfce_resource_lookup_all (<a class="link" href="libxfce4util-Resource-lookup-functions.html#XfceResourceType" title="enum XfceResourceType">XfceResourceType</a> type,
285
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
286
>gchar</a> *filename);</pre>
219
<pre class="programlisting"><span class="returnvalue">gchar</span>** xfce_resource_lookup_all (<em class="parameter"><code><a class="link" href="libxfce4util-Resource-lookup-functions.html#XfceResourceType" title="enum XfceResourceType"><span class="type">XfceResourceType</span></a> type</code></em>,
220
<em class="parameter"><code>const <span class="type">gchar</span> *filename</code></em>);</pre>
288
222
Similar to <a class="link" href="libxfce4util-Resource-lookup-functions.html#xfce-resource-lookup" title="xfce_resource_lookup ()"><code class="function">xfce_resource_lookup()</code></a>, but returns all resource of the specified <em class="parameter"><code>type</code></em>,
289
223
that whose name is <em class="parameter"><code>filename</code></em>.
292
The caller is responsible to free the returned string array using <a
293
href="/usr/share/gtk-doc/html/glib/glib-String-Utility-Functions.html#g-strfreev"
294
><code class="function">g_strfreev()</code></a>
295
when no longer needed.</p>
226
The caller is responsible to free the returned string array using <code class="function">g_strfreev()</code>
227
when no longer needed.
299
229
<div class="variablelist"><table border="0">
300
230
<col align="left" valign="top">
303
233
<td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
304
<td> type of the resource to lookup.
234
<td>type of the resource to lookup.
308
238
<td><p><span class="term"><em class="parameter"><code>filename</code></em> :</span></p></td>
309
<td> relative file path. If <em class="parameter"><code>filename</code></em> contains a trailing slash character
239
<td>relative file path. If <em class="parameter"><code>filename</code></em> contains a trailing slash character
310
240
it is taken to reference a directory, else it is taken to reference
322
<p class="since">Since 4.2
252
<p class="since">Since 4.2</p>
326
<div class="refsect2" lang="en">
255
<div class="refsect2" title="xfce_resource_match ()">
327
256
<a name="xfce-resource-match"></a><h3>xfce_resource_match ()</h3>
328
<pre class="programlisting"><a
329
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
330
>gchar</a>** xfce_resource_match (<a class="link" href="libxfce4util-Resource-lookup-functions.html#XfceResourceType" title="enum XfceResourceType">XfceResourceType</a> type,
332
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
335
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
336
>gboolean</a> unique);</pre>
257
<pre class="programlisting"><span class="returnvalue">gchar</span>** xfce_resource_match (<em class="parameter"><code><a class="link" href="libxfce4util-Resource-lookup-functions.html#XfceResourceType" title="enum XfceResourceType"><span class="type">XfceResourceType</span></a> type</code></em>,
258
<em class="parameter"><code>const <span class="type">gchar</span> *pattern</code></em>,
259
<em class="parameter"><code><span class="type">gboolean</span> unique</code></em>);</pre>
338
261
Tries to find all resources with the specified <em class="parameter"><code>type</code></em>. The function will
339
262
look into all specified directories and return all filenames in these
351
274
Example: xfce_resource_match (XFCE_RESOURCE_CONFIG, "foo/bar*") will probably
352
return ("foo/bar", "foo/barbaz", ...).</p>
275
return ("foo/bar", "foo/barbaz", ...).
356
277
<div class="variablelist"><table border="0">
357
278
<col align="left" valign="top">
360
281
<td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
361
<td> type of the resource to locate directories for.
282
<td>type of the resource to locate directories for.
365
286
<td><p><span class="term"><em class="parameter"><code>pattern</code></em> :</span></p></td>
366
<td> only accept filenames that fit to the pattern. The pattern
287
<td>only accept filenames that fit to the pattern. The pattern
367
288
needs to be a valid GPattern.
371
292
<td><p><span class="term"><em class="parameter"><code>unique</code></em> :</span></p></td>
373
href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"
374
><code class="literal">TRUE</code></a>, only return items which have unique suffixes.
293
<td>if <code class="literal">TRUE</code>, only return items which have unique suffixes.
378
297
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
379
298
<td> string array of all the relative paths whose names matches the
380
299
given <em class="parameter"><code>pattern</code></em>. The return value has to be freed using
382
href="/usr/share/gtk-doc/html/glib/glib-String-Utility-Functions.html#g-strfreev"
383
><code class="function">g_strfreev()</code></a> when no longer needed.
300
<code class="function">g_strfreev()</code> when no longer needed.
389
<p class="since">Since 4.2
306
<p class="since">Since 4.2</p>
393
<div class="refsect2" lang="en">
309
<div class="refsect2" title="xfce_resource_match_custom ()">
394
310
<a name="xfce-resource-match-custom"></a><h3>xfce_resource_match_custom ()</h3>
395
<pre class="programlisting"><a
396
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
397
>gchar</a>** xfce_resource_match_custom (<a class="link" href="libxfce4util-Resource-lookup-functions.html#XfceResourceType" title="enum XfceResourceType">XfceResourceType</a> type,
399
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
400
>gboolean</a> unique,
401
<a class="link" href="libxfce4util-Resource-lookup-functions.html#XfceMatchFunc" title="XfceMatchFunc ()">XfceMatchFunc</a> func,
403
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
404
>gpointer</a> user_data);</pre>
311
<pre class="programlisting"><span class="returnvalue">gchar</span>** xfce_resource_match_custom (<em class="parameter"><code><a class="link" href="libxfce4util-Resource-lookup-functions.html#XfceResourceType" title="enum XfceResourceType"><span class="type">XfceResourceType</span></a> type</code></em>,
312
<em class="parameter"><code><span class="type">gboolean</span> unique</code></em>,
313
<em class="parameter"><code><a class="link" href="libxfce4util-Resource-lookup-functions.html#XfceMatchFunc" title="XfceMatchFunc ()"><span class="type">XfceMatchFunc</span></a> func</code></em>,
314
<em class="parameter"><code><span class="type">gpointer</span> user_data</code></em>);</pre>
406
316
Yet to be implemented!
409
The caller is responsible to free the returned string array using <a
410
href="/usr/share/gtk-doc/html/glib/glib-String-Utility-Functions.html#g-strfreev"
411
><code class="function">g_strfreev()</code></a>
412
when no longer needed.</p>
319
The caller is responsible to free the returned string array using <code class="function">g_strfreev()</code>
320
when no longer needed.
416
322
<div class="variablelist"><table border="0">
417
323
<col align="left" valign="top">
420
326
<td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
421
<td> type of the resource to locate directories for.
327
<td>type of the resource to locate directories for.
425
331
<td><p><span class="term"><em class="parameter"><code>unique</code></em> :</span></p></td>
427
href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"
428
><code class="literal">TRUE</code></a>, only return items which have unique suffixes.
432
<td><p><span class="term"><em class="parameter"><code>func</code></em> :</span></p></td>
437
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
332
<td>if <code class="literal">TRUE</code>, only return items which have unique suffixes.
465
356
For example, if you need to add a specific path to the search path list
466
357
in your MCS, you should call <a class="link" href="libxfce4util-Resource-lookup-functions.html#xfce-resource-push-path" title="xfce_resource_push_path ()"><code class="function">xfce_resource_push_path()</code></a> prior to calling
467
358
one of the resource search functions and call <a class="link" href="libxfce4util-Resource-lookup-functions.html#xfce-resource-pop-path" title="xfce_resource_pop_path ()"><code class="function">xfce_resource_pop_path()</code></a>
468
right afterwards.</p>
472
361
<div class="variablelist"><table border="0">
473
362
<col align="left" valign="top">
476
365
<td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
477
<td> type of the resource which search list should be expanded.
366
<td>type of the resource which search list should be expanded.
481
370
<td><p><span class="term"><em class="parameter"><code>path</code></em> :</span></p></td>
482
<td> search path to add.
371
<td>search path to add.
487
<p class="since">Since 4.2
376
<p class="since">Since 4.2</p>
491
<div class="refsect2" lang="en">
379
<div class="refsect2" title="xfce_resource_pop_path ()">
492
380
<a name="xfce-resource-pop-path"></a><h3>xfce_resource_pop_path ()</h3>
493
<pre class="programlisting">void xfce_resource_pop_path (<a class="link" href="libxfce4util-Resource-lookup-functions.html#XfceResourceType" title="enum XfceResourceType">XfceResourceType</a> type);</pre>
381
<pre class="programlisting"><span class="returnvalue">void</span> xfce_resource_pop_path (<em class="parameter"><code><a class="link" href="libxfce4util-Resource-lookup-functions.html#XfceResourceType" title="enum XfceResourceType"><span class="type">XfceResourceType</span></a> type</code></em>);</pre>
495
383
Undoes the effect of the latest call to <a class="link" href="libxfce4util-Resource-lookup-functions.html#xfce-resource-push-path" title="xfce_resource_push_path ()"><code class="function">xfce_resource_push_path()</code></a>. You
496
384
should take special care to call <a class="link" href="libxfce4util-Resource-lookup-functions.html#xfce-resource-pop-path" title="xfce_resource_pop_path ()"><code class="function">xfce_resource_pop_path()</code></a> exactly same
497
385
times as <a class="link" href="libxfce4util-Resource-lookup-functions.html#xfce-resource-push-path" title="xfce_resource_push_path ()"><code class="function">xfce_resource_push_path()</code></a>, everything else might result in
498
unwanted and maybe even undefined behaviour. You have been warned!</p>
386
unwanted and maybe even undefined behaviour. You have been warned!
502
388
<div class="variablelist"><table border="0">
503
389
<col align="left" valign="top">
505
391
<td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
506
<td> type of the resource which search list should be shrinked.
392
<td>type of the resource which search list should be shrinked.
510
<p class="since">Since 4.2
396
<p class="since">Since 4.2</p>
514
<div class="refsect2" lang="en">
399
<div class="refsect2" title="xfce_resource_save_location ()">
515
400
<a name="xfce-resource-save-location"></a><h3>xfce_resource_save_location ()</h3>
516
<pre class="programlisting"><a
517
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
518
>gchar</a>* xfce_resource_save_location (<a class="link" href="libxfce4util-Resource-lookup-functions.html#XfceResourceType" title="enum XfceResourceType">XfceResourceType</a> type,
520
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
523
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
524
>gboolean</a> create);</pre>
401
<pre class="programlisting"><span class="returnvalue">gchar</span>* xfce_resource_save_location (<em class="parameter"><code><a class="link" href="libxfce4util-Resource-lookup-functions.html#XfceResourceType" title="enum XfceResourceType"><span class="type">XfceResourceType</span></a> type</code></em>,
402
<em class="parameter"><code>const <span class="type">gchar</span> *relpath</code></em>,
403
<em class="parameter"><code><span class="type">gboolean</span> create</code></em>);</pre>
526
405
If <em class="parameter"><code>relpath</code></em> contains a trailing slash ('/') character, <a class="link" href="libxfce4util-Resource-lookup-functions.html#xfce-resource-save-location" title="xfce_resource_save_location ()"><code class="function">xfce_resource_save_location()</code></a>
527
406
finds the directory to save files into for the given type in the user's
528
407
home directory. All directories needed (including those given by
529
<em class="parameter"><code>relpath</code></em>) will be created on demand if <em class="parameter"><code>create</code></em> if <a
530
href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"
531
><code class="literal">TRUE</code></a>.
408
<em class="parameter"><code>relpath</code></em>) will be created on demand if <em class="parameter"><code>create</code></em> if <code class="literal">TRUE</code>.
534
411
If <em class="parameter"><code>relpath</code></em> does not end with a slash ('/') character, it is taken to be
535
412
the name of a file to return the save location for. All the directories
536
needed will be created on demand if <em class="parameter"><code>create</code></em> is <a
537
href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"
538
><code class="literal">TRUE</code></a>.
413
needed will be created on demand if <em class="parameter"><code>create</code></em> is <code class="literal">TRUE</code>.
542
href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"
543
><code class="literal">NULL</code></a> or the empty string for <em class="parameter"><code>relpath</code></em> allows you to discover
416
Specifying <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a> or the empty string for <em class="parameter"><code>relpath</code></em> allows you to discover
544
417
the base path for saving files of the specified <em class="parameter"><code>type</code></em>, though normally
545
you should not need this.</p>
418
you should not need this.
549
420
<div class="variablelist"><table border="0">
550
421
<col align="left" valign="top">
553
424
<td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
554
<td> type of location to return.
425
<td>type of location to return.
558
429
<td><p><span class="term"><em class="parameter"><code>relpath</code></em> :</span></p></td>
559
<td> relative path of the resource.
430
<td>relative path of the resource.
563
434
<td><p><span class="term"><em class="parameter"><code>create</code></em> :</span></p></td>
564
<td> whether to create missing directory.
435
<td>whether to create missing directory.
568
439
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
569
440
<td> the path where resources of the specified <em class="parameter"><code>type</code></em> should be
571
href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"
572
><code class="literal">NULL</code></a> on error. The returned string should be freed
441
saved or <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a> on error. The returned string should be freed
573
442
when no longer needed.
579
<p class="since">Since 4.2
448
<p class="since">Since 4.2</p>
584
452
<div class="footer">
586
Generated by GTK-Doc V1.10</div>
454
Generated by GTK-Doc V1.14</div>
b'\\ No newline at end of file'