1
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
4
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
5
<title>gimpconfig-path</title>
6
<meta name="generator" content="DocBook XSL Stylesheets V1.72.0">
7
<link rel="start" href="index.html" title="GIMP Config Library Reference Manual">
8
<link rel="up" href="libgimpconfig.html" title="Part I. GIMP Config Library">
9
<link rel="prev" href="libgimpconfig-gimpconfig-params.html" title="gimpconfig-params">
10
<link rel="next" href="libgimpconfig-gimpconfig-utils.html" title="gimpconfig-utils">
11
<meta name="generator" content="GTK-Doc V1.8 (XML mode)">
12
<link rel="stylesheet" href="style.css" type="text/css">
13
<link rel="part" href="libgimpconfig.html" title="Part I. GIMP Config Library">
14
<link rel="chapter" href="libgimpconfig-hierarchy.html" title="Object Hierarchy">
15
<link rel="index" href="libgimpconfig-index.html" title="Index">
16
<link rel="index" href="libgimpconfig-index-new-in-2-4.html" title="Index of new symbols in GIMP 2.4">
17
<link rel="index" href="libgimpconfig-index-deprecated.html" title="Index of deprecated symbols">
19
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
20
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
22
<td><a accesskey="p" href="libgimpconfig-gimpconfig-params.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
23
<td><a accesskey="u" href="libgimpconfig.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
24
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
25
<th width="100%" align="center">GIMP Config Library Reference Manual</th>
26
<td><a accesskey="n" href="libgimpconfig-gimpconfig-utils.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
28
<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2556226" class="shortcut">Top</a>
30
<a href="#id2571470" class="shortcut">Description</a></nobr></td></tr>
32
<div class="refentry" lang="en">
33
<a name="libgimpconfig-gimpconfig-path"></a><div class="titlepage"></div>
34
<div class="refnamediv"><table width="100%"><tr>
37
<a name="id2556226"></a><span class="refentrytitle">gimpconfig-path</span>
39
<p>gimpconfig-path</p>
41
<td valign="top" align="right"></td>
43
<div class="refsynopsisdiv">
45
<pre class="synopsis">
49
enum <a href="libgimpconfig-gimpconfig-path.html#GimpConfigPathType">GimpConfigPathType</a>;
50
GParamSpec* <a href="libgimpconfig-gimpconfig-path.html#gimp-param-spec-config-path">gimp_param_spec_config_path</a> (const gchar *name,
53
<a href="libgimpconfig-gimpconfig-path.html#GimpConfigPathType">GimpConfigPathType</a> type,
54
const gchar *default_value,
56
<a href="libgimpconfig-gimpconfig-path.html#GimpConfigPathType">GimpConfigPathType</a> <a href="libgimpconfig-gimpconfig-path.html#gimp-param-spec-config-path-type">gimp_param_spec_config_path_type</a> (GParamSpec *pspec);
57
gchar* <a href="libgimpconfig-gimpconfig-path.html#gimp-config-path-expand">gimp_config_path_expand</a> (const gchar *path,
60
gchar* <a href="libgimpconfig-gimpconfig-path.html#gimp-config-build-data-path">gimp_config_build_data_path</a> (const gchar *name);
61
gchar* <a href="libgimpconfig-gimpconfig-path.html#gimp-config-build-writable-path">gimp_config_build_writable_path</a> (const gchar *name);
62
gchar* <a href="libgimpconfig-gimpconfig-path.html#gimp-config-build-plug-in-path">gimp_config_build_plug_in_path</a> (const gchar *name);
63
#define <a href="libgimpconfig-gimpconfig-path.html#GIMP-VALUE-HOLDS-CONFIG-PATH:CAPS">GIMP_VALUE_HOLDS_CONFIG_PATH</a> (value)
67
<div class="refsect1" lang="en">
68
<a name="id2571470"></a><h2>Description</h2>
73
<div class="refsect1" lang="en">
74
<a name="id2571486"></a><h2>Details</h2>
75
<div class="refsect2" lang="en">
76
<a name="id2557500"></a><h3>
77
<a name="GimpConfigPathType"></a>enum GimpConfigPathType</h3>
78
<a class="indexterm" name="id2557513"></a><pre class="programlisting">typedef enum
80
GIMP_CONFIG_PATH_FILE,
81
GIMP_CONFIG_PATH_FILE_LIST,
83
GIMP_CONFIG_PATH_DIR_LIST
91
<div class="refsect2" lang="en">
92
<a name="id2557530"></a><h3>
93
<a name="gimp-param-spec-config-path"></a>gimp_param_spec_config_path ()</h3>
94
<a class="indexterm" name="id2557544"></a><pre class="programlisting">GParamSpec* gimp_param_spec_config_path (const gchar *name,
97
<a href="libgimpconfig-gimpconfig-path.html#GimpConfigPathType">GimpConfigPathType</a> type,
98
const gchar *default_value,
99
GParamFlags flags);</pre>
101
Creates a param spec to hold a filename, dir name,
102
or list of file or dir names.
103
See <code class="function">g_param_spec_internal()</code> for more information.</p>
107
<div class="variablelist"><table border="0">
108
<col align="left" valign="top">
111
<td><span class="term"><em class="parameter"><code>name</code></em> :</span></td>
112
<td> Canonical name of the param
116
<td><span class="term"><em class="parameter"><code>nick</code></em> :</span></td>
117
<td> Nickname of the param
121
<td><span class="term"><em class="parameter"><code>blurb</code></em> :</span></td>
122
<td> Brief desciption of param.
126
<td><span class="term"><em class="parameter"><code>type</code></em> :</span></td>
127
<td> a <span class="type">GimpParamConfigPathType</span> value.
131
<td><span class="term"><em class="parameter"><code>default_value</code></em> :</span></td>
132
<td> Value to use if none is assigned.
136
<td><span class="term"><em class="parameter"><code>flags</code></em> :</span></td>
137
<td> a combination of <span class="type">GParamFlags</span>
141
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
142
<td> a newly allocated <span class="type">GParamSpec</span> instance
148
<p class="since">Since GIMP 2.4
152
<div class="refsect2" lang="en">
153
<a name="id2557748"></a><h3>
154
<a name="gimp-param-spec-config-path-type"></a>gimp_param_spec_config_path_type ()</h3>
155
<a class="indexterm" name="id2601835"></a><pre class="programlisting"><a href="libgimpconfig-gimpconfig-path.html#GimpConfigPathType">GimpConfigPathType</a> gimp_param_spec_config_path_type (GParamSpec *pspec);</pre>
157
Tells whether the path param encodes a filename,
158
dir name, or list of file or dir names.</p>
162
<div class="variablelist"><table border="0">
163
<col align="left" valign="top">
166
<td><span class="term"><em class="parameter"><code>pspec</code></em> :</span></td>
167
<td> A <span class="type">GParamSpec</span> for a path param
171
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
172
<td> a <a href="libgimpconfig-gimpconfig-path.html#GimpConfigPathType"><span class="type">GimpConfigPathType</span></a> value
178
<p class="since">Since GIMP 2.4
182
<div class="refsect2" lang="en">
183
<a name="id2601918"></a><h3>
184
<a name="gimp-config-path-expand"></a>gimp_config_path_expand ()</h3>
185
<a class="indexterm" name="id2601931"></a><pre class="programlisting">gchar* gimp_config_path_expand (const gchar *path,
187
GError **error);</pre>
189
Paths as stored in the gimprc have to be treated special. The
190
string may contain special identifiers such as for example
191
${gimp_dir} that have to be substituted before use. Also the user's
192
filesystem may be in a different encoding than UTF-8 (which is what
193
is used for the gimprc). This function does the variable
194
substitution for you and can also attempt to convert to the
195
filesystem encoding.</p>
199
<div class="variablelist"><table border="0">
200
<col align="left" valign="top">
203
<td><span class="term"><em class="parameter"><code>path</code></em> :</span></td>
204
<td> a <code class="literal">NUL</code>-terminated string in UTF-8 encoding
208
<td><span class="term"><em class="parameter"><code>recode</code></em> :</span></td>
209
<td> whether to convert to the filesystem's encoding
213
<td><span class="term"><em class="parameter"><code>error</code></em> :</span></td>
214
<td> return location for errors
218
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
219
<td> a newly allocated <code class="literal">NUL</code>-terminated string
225
<p class="since">Since GIMP 2.4
229
<div class="refsect2" lang="en">
230
<a name="id2602067"></a><h3>
231
<a name="gimp-config-build-data-path"></a>gimp_config_build_data_path ()</h3>
232
<a class="indexterm" name="id2602081"></a><pre class="programlisting">gchar* gimp_config_build_data_path (const gchar *name);</pre>
234
Creates a search path as it is used in the gimprc file. The path
235
returned by <a href="libgimpconfig-gimpconfig-path.html#gimp-config-build-data-path"><code class="function">gimp_config_build_data_path()</code></a> includes a directory
236
below the user's gimp directory and one in the system-wide data
240
Note that you cannot use this path directly with <a
241
href="../libgimpbase/libgimpbase-gimpenv.html#gimp-path-parse"
242
><code class="function">gimp_path_parse()</code></a>.
243
As it is in the gimprc notation, you first need to expand and
244
recode it using <a href="libgimpconfig-gimpconfig-path.html#gimp-config-path-expand"><code class="function">gimp_config_path_expand()</code></a>.</p>
248
<div class="variablelist"><table border="0">
249
<col align="left" valign="top">
252
<td><span class="term"><em class="parameter"><code>name</code></em> :</span></td>
253
<td> directory name (in UTF-8 encoding)
257
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
258
<td> a newly allocated string
264
<p class="since">Since GIMP 2.4
268
<div class="refsect2" lang="en">
269
<a name="id2590391"></a><h3>
270
<a name="gimp-config-build-writable-path"></a>gimp_config_build_writable_path ()</h3>
271
<a class="indexterm" name="id2590407"></a><pre class="programlisting">gchar* gimp_config_build_writable_path (const gchar *name);</pre>
273
Creates a search path as it is used in the gimprc file. The path
274
returned by <a href="libgimpconfig-gimpconfig-path.html#gimp-config-build-writable-path"><code class="function">gimp_config_build_writable_path()</code></a> is just the writable
275
parts of the search path constructed by <a href="libgimpconfig-gimpconfig-path.html#gimp-config-build-data-path"><code class="function">gimp_config_build_data_path()</code></a>.
278
Note that you cannot use this path directly with <a
279
href="../libgimpbase/libgimpbase-gimpenv.html#gimp-path-parse"
280
><code class="function">gimp_path_parse()</code></a>.
281
As it is in the gimprc notation, you first need to expand and
282
recode it using <a href="libgimpconfig-gimpconfig-path.html#gimp-config-path-expand"><code class="function">gimp_config_path_expand()</code></a>.</p>
286
<div class="variablelist"><table border="0">
287
<col align="left" valign="top">
290
<td><span class="term"><em class="parameter"><code>name</code></em> :</span></td>
291
<td> directory name (in UTF-8 encoding)
295
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
296
<td> a newly allocated string
302
<p class="since">Since GIMP 2.4
306
<div class="refsect2" lang="en">
307
<a name="id2590521"></a><h3>
308
<a name="gimp-config-build-plug-in-path"></a>gimp_config_build_plug_in_path ()</h3>
309
<a class="indexterm" name="id2590536"></a><pre class="programlisting">gchar* gimp_config_build_plug_in_path (const gchar *name);</pre>
311
Creates a search path as it is used in the gimprc file. The path
312
returned by <a href="libgimpconfig-gimpconfig-path.html#gimp-config-build-plug-in-path"><code class="function">gimp_config_build_plug_in_path()</code></a> includes a directory
313
below the user's gimp directory and one in the system-wide plug-in
317
Note that you cannot use this path directly with <a
318
href="../libgimpbase/libgimpbase-gimpenv.html#gimp-path-parse"
319
><code class="function">gimp_path_parse()</code></a>.
320
As it is in the gimprc notation, you first need to expand and
321
recode it using <a href="libgimpconfig-gimpconfig-path.html#gimp-config-path-expand"><code class="function">gimp_config_path_expand()</code></a>.</p>
325
<div class="variablelist"><table border="0">
326
<col align="left" valign="top">
329
<td><span class="term"><em class="parameter"><code>name</code></em> :</span></td>
330
<td> directory name (in UTF-8 encoding)
334
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
335
<td> a newly allocated string
341
<p class="since">Since GIMP 2.4
345
<div class="refsect2" lang="en">
346
<a name="id2603875"></a><h3>
347
<a name="GIMP-VALUE-HOLDS-CONFIG-PATH:CAPS"></a>GIMP_VALUE_HOLDS_CONFIG_PATH()</h3>
348
<a class="indexterm" name="id2603887"></a><pre class="programlisting">#define GIMP_VALUE_HOLDS_CONFIG_PATH(value) (G_TYPE_CHECK_VALUE_TYPE ((value), GIMP_TYPE_CONFIG_PATH))
353
<div class="variablelist"><table border="0">
354
<col align="left" valign="top">
356
<td><span class="term"><em class="parameter"><code>value</code></em> :</span></td>