1
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
4
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
<title>GimpConfig-path</title>
6
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
7
<link rel="home" 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.18 (XML mode)">
12
<link rel="stylesheet" href="style.css" type="text/css">
14
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
15
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
17
<td><a accesskey="p" href="libgimpconfig-GimpConfig-params.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
18
<td><a accesskey="u" href="libgimpconfig.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
19
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
20
<th width="100%" align="center">GIMP Config Library Reference Manual</th>
21
<td><a accesskey="n" href="libgimpconfig-GimpConfig-utils.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
23
<tr><td colspan="5" class="shortcuts">
24
<a href="#libgimpconfig-GimpConfig-path.synopsis" class="shortcut">Top</a>
26
<a href="#libgimpconfig-GimpConfig-path.description" class="shortcut">Description</a>
29
<div class="refentry">
30
<a name="libgimpconfig-GimpConfig-path"></a><div class="titlepage"></div>
31
<div class="refnamediv"><table width="100%"><tr>
33
<h2><span class="refentrytitle"><a name="libgimpconfig-GimpConfig-path.top_of_page"></a>GimpConfig-path</span></h2>
34
<p>GimpConfig-path — File path utilities for libgimpconfig.</p>
36
<td valign="top" align="right"></td>
38
<div class="refsynopsisdiv">
39
<a name="libgimpconfig-GimpConfig-path.synopsis"></a><h2>Synopsis</h2>
40
<pre class="synopsis">typedef <a class="link" href="libgimpconfig-GimpConfig-path.html#GimpConfigPath" title="GimpConfigPath">GimpConfigPath</a>;
41
enum <a class="link" href="libgimpconfig-GimpConfig-path.html#GimpConfigPathType" title="enum GimpConfigPathType">GimpConfigPathType</a>;
42
<span class="returnvalue">GParamSpec</span> * <a class="link" href="libgimpconfig-GimpConfig-path.html#gimp-param-spec-config-path" title="gimp_param_spec_config_path ()">gimp_param_spec_config_path</a> (<em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>,
43
<em class="parameter"><code>const <span class="type">gchar</span> *nick</code></em>,
44
<em class="parameter"><code>const <span class="type">gchar</span> *blurb</code></em>,
45
<em class="parameter"><code><a class="link" href="libgimpconfig-GimpConfig-path.html#GimpConfigPathType" title="enum GimpConfigPathType"><span class="type">GimpConfigPathType</span></a> type</code></em>,
46
<em class="parameter"><code>const <span class="type">gchar</span> *default_value</code></em>,
47
<em class="parameter"><code><span class="type">GParamFlags</span> flags</code></em>);
48
<a class="link" href="libgimpconfig-GimpConfig-path.html#GimpConfigPathType" title="enum GimpConfigPathType"><span class="returnvalue">GimpConfigPathType</span></a> <a class="link" href="libgimpconfig-GimpConfig-path.html#gimp-param-spec-config-path-type" title="gimp_param_spec_config_path_type ()">gimp_param_spec_config_path_type</a> (<em class="parameter"><code><span class="type">GParamSpec</span> *pspec</code></em>);
49
<span class="returnvalue">gchar</span> * <a class="link" href="libgimpconfig-GimpConfig-path.html#gimp-config-path-expand" title="gimp_config_path_expand ()">gimp_config_path_expand</a> (<em class="parameter"><code>const <span class="type">gchar</span> *path</code></em>,
50
<em class="parameter"><code><span class="type">gboolean</span> recode</code></em>,
51
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);
52
<span class="returnvalue">gchar</span> * <a class="link" href="libgimpconfig-GimpConfig-path.html#gimp-config-build-data-path" title="gimp_config_build_data_path ()">gimp_config_build_data_path</a> (<em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>);
53
<span class="returnvalue">gchar</span> * <a class="link" href="libgimpconfig-GimpConfig-path.html#gimp-config-build-writable-path" title="gimp_config_build_writable_path ()">gimp_config_build_writable_path</a> (<em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>);
54
<span class="returnvalue">gchar</span> * <a class="link" href="libgimpconfig-GimpConfig-path.html#gimp-config-build-plug-in-path" title="gimp_config_build_plug_in_path ()">gimp_config_build_plug_in_path</a> (<em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>);
55
#define <a class="link" href="libgimpconfig-GimpConfig-path.html#GIMP-VALUE-HOLDS-CONFIG-PATH:CAPS" title="GIMP_VALUE_HOLDS_CONFIG_PATH()">GIMP_VALUE_HOLDS_CONFIG_PATH</a> (value)
58
<div class="refsect1">
59
<a name="libgimpconfig-GimpConfig-path.description"></a><h2>Description</h2>
61
File path utilities for libgimpconfig.
64
<div class="refsect1">
65
<a name="libgimpconfig-GimpConfig-path.details"></a><h2>Details</h2>
66
<div class="refsect2">
67
<a name="GimpConfigPath"></a><h3>GimpConfigPath</h3>
68
<pre class="programlisting">typedef gchar * GimpConfigPath; /* to satisfy docs */
74
<div class="refsect2">
75
<a name="GimpConfigPathType"></a><h3>enum GimpConfigPathType</h3>
76
<pre class="programlisting">typedef enum {
77
GIMP_CONFIG_PATH_FILE,
78
GIMP_CONFIG_PATH_FILE_LIST,
80
GIMP_CONFIG_PATH_DIR_LIST
87
<div class="refsect2">
88
<a name="gimp-param-spec-config-path"></a><h3>gimp_param_spec_config_path ()</h3>
89
<pre class="programlisting"><span class="returnvalue">GParamSpec</span> * gimp_param_spec_config_path (<em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>,
90
<em class="parameter"><code>const <span class="type">gchar</span> *nick</code></em>,
91
<em class="parameter"><code>const <span class="type">gchar</span> *blurb</code></em>,
92
<em class="parameter"><code><a class="link" href="libgimpconfig-GimpConfig-path.html#GimpConfigPathType" title="enum GimpConfigPathType"><span class="type">GimpConfigPathType</span></a> type</code></em>,
93
<em class="parameter"><code>const <span class="type">gchar</span> *default_value</code></em>,
94
<em class="parameter"><code><span class="type">GParamFlags</span> flags</code></em>);</pre>
96
Creates a param spec to hold a filename, dir name,
97
or list of file or dir names.
98
See <code class="function">g_param_spec_internal()</code> for more information.
100
<div class="variablelist"><table border="0">
101
<col align="left" valign="top">
104
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
105
<td>Canonical name of the param</td>
108
<td><p><span class="term"><em class="parameter"><code>nick</code></em> :</span></p></td>
109
<td>Nickname of the param</td>
112
<td><p><span class="term"><em class="parameter"><code>blurb</code></em> :</span></p></td>
113
<td>Brief desciption of param.</td>
116
<td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
117
<td>a <a class="link" href="libgimpconfig-GimpConfig-path.html#GimpConfigPathType" title="enum GimpConfigPathType"><span class="type">GimpConfigPathType</span></a> value.</td>
120
<td><p><span class="term"><em class="parameter"><code>default_value</code></em> :</span></p></td>
121
<td>Value to use if none is assigned.</td>
124
<td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td>
125
<td>a combination of <span class="type">GParamFlags</span>
129
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
130
<td>a newly allocated <span class="type">GParamSpec</span> instance</td>
134
<p class="since">Since GIMP 2.4</p>
137
<div class="refsect2">
138
<a name="gimp-param-spec-config-path-type"></a><h3>gimp_param_spec_config_path_type ()</h3>
139
<pre class="programlisting"><a class="link" href="libgimpconfig-GimpConfig-path.html#GimpConfigPathType" title="enum GimpConfigPathType"><span class="returnvalue">GimpConfigPathType</span></a> gimp_param_spec_config_path_type (<em class="parameter"><code><span class="type">GParamSpec</span> *pspec</code></em>);</pre>
141
Tells whether the path param encodes a filename,
142
dir name, or list of file or dir names.
144
<div class="variablelist"><table border="0">
145
<col align="left" valign="top">
148
<td><p><span class="term"><em class="parameter"><code>pspec</code></em> :</span></p></td>
149
<td>A <span class="type">GParamSpec</span> for a path param</td>
152
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
153
<td>a <a class="link" href="libgimpconfig-GimpConfig-path.html#GimpConfigPathType" title="enum GimpConfigPathType"><span class="type">GimpConfigPathType</span></a> value</td>
157
<p class="since">Since GIMP 2.4</p>
160
<div class="refsect2">
161
<a name="gimp-config-path-expand"></a><h3>gimp_config_path_expand ()</h3>
162
<pre class="programlisting"><span class="returnvalue">gchar</span> * gimp_config_path_expand (<em class="parameter"><code>const <span class="type">gchar</span> *path</code></em>,
163
<em class="parameter"><code><span class="type">gboolean</span> recode</code></em>,
164
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
166
Paths as stored in the gimprc have to be treated special. The
167
string may contain special identifiers such as for example
168
${gimp_dir} that have to be substituted before use. Also the user's
169
filesystem may be in a different encoding than UTF-8 (which is what
170
is used for the gimprc). This function does the variable
171
substitution for you and can also attempt to convert to the
174
<div class="variablelist"><table border="0">
175
<col align="left" valign="top">
178
<td><p><span class="term"><em class="parameter"><code>path</code></em> :</span></p></td>
179
<td>a NUL-terminated string in UTF-8 encoding</td>
182
<td><p><span class="term"><em class="parameter"><code>recode</code></em> :</span></p></td>
183
<td>whether to convert to the filesystem's encoding</td>
186
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
187
<td>return location for errors</td>
190
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
191
<td>a newly allocated NUL-terminated string</td>
195
<p class="since">Since GIMP 2.4</p>
198
<div class="refsect2">
199
<a name="gimp-config-build-data-path"></a><h3>gimp_config_build_data_path ()</h3>
200
<pre class="programlisting"><span class="returnvalue">gchar</span> * gimp_config_build_data_path (<em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>);</pre>
202
Creates a search path as it is used in the gimprc file. The path
203
returned by <a class="link" href="libgimpconfig-GimpConfig-path.html#gimp-config-build-data-path" title="gimp_config_build_data_path ()"><code class="function">gimp_config_build_data_path()</code></a> includes a directory
204
below the user's gimp directory and one in the system-wide data
208
Note that you cannot use this path directly with <a href="/local/head/share/gtk-doc/html/libgimpbase/libgimpbase-gimpenv.html#gimp-path-parse"><code class="function">gimp_path_parse()</code></a>.
209
As it is in the gimprc notation, you first need to expand and
210
recode it using <a class="link" href="libgimpconfig-GimpConfig-path.html#gimp-config-path-expand" title="gimp_config_path_expand ()"><code class="function">gimp_config_path_expand()</code></a>.
212
<div class="variablelist"><table border="0">
213
<col align="left" valign="top">
216
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
217
<td>directory name (in UTF-8 encoding)</td>
220
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
221
<td>a newly allocated string</td>
225
<p class="since">Since GIMP 2.4</p>
228
<div class="refsect2">
229
<a name="gimp-config-build-writable-path"></a><h3>gimp_config_build_writable_path ()</h3>
230
<pre class="programlisting"><span class="returnvalue">gchar</span> * gimp_config_build_writable_path (<em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>);</pre>
232
Creates a search path as it is used in the gimprc file. The path
233
returned by <a class="link" href="libgimpconfig-GimpConfig-path.html#gimp-config-build-writable-path" title="gimp_config_build_writable_path ()"><code class="function">gimp_config_build_writable_path()</code></a> is just the writable
234
parts of the search path constructed by <a class="link" href="libgimpconfig-GimpConfig-path.html#gimp-config-build-data-path" title="gimp_config_build_data_path ()"><code class="function">gimp_config_build_data_path()</code></a>.
237
Note that you cannot use this path directly with <a href="/local/head/share/gtk-doc/html/libgimpbase/libgimpbase-gimpenv.html#gimp-path-parse"><code class="function">gimp_path_parse()</code></a>.
238
As it is in the gimprc notation, you first need to expand and
239
recode it using <a class="link" href="libgimpconfig-GimpConfig-path.html#gimp-config-path-expand" title="gimp_config_path_expand ()"><code class="function">gimp_config_path_expand()</code></a>.
241
<div class="variablelist"><table border="0">
242
<col align="left" valign="top">
245
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
246
<td>directory name (in UTF-8 encoding)</td>
249
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
250
<td>a newly allocated string</td>
254
<p class="since">Since GIMP 2.4</p>
257
<div class="refsect2">
258
<a name="gimp-config-build-plug-in-path"></a><h3>gimp_config_build_plug_in_path ()</h3>
259
<pre class="programlisting"><span class="returnvalue">gchar</span> * gimp_config_build_plug_in_path (<em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>);</pre>
261
Creates a search path as it is used in the gimprc file. The path
262
returned by <a class="link" href="libgimpconfig-GimpConfig-path.html#gimp-config-build-plug-in-path" title="gimp_config_build_plug_in_path ()"><code class="function">gimp_config_build_plug_in_path()</code></a> includes a directory
263
below the user's gimp directory and one in the system-wide plug-in
267
Note that you cannot use this path directly with <a href="/local/head/share/gtk-doc/html/libgimpbase/libgimpbase-gimpenv.html#gimp-path-parse"><code class="function">gimp_path_parse()</code></a>.
268
As it is in the gimprc notation, you first need to expand and
269
recode it using <a class="link" href="libgimpconfig-GimpConfig-path.html#gimp-config-path-expand" title="gimp_config_path_expand ()"><code class="function">gimp_config_path_expand()</code></a>.
271
<div class="variablelist"><table border="0">
272
<col align="left" valign="top">
275
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
276
<td>directory name (in UTF-8 encoding)</td>
279
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
280
<td>a newly allocated string</td>
284
<p class="since">Since GIMP 2.4</p>
287
<div class="refsect2">
288
<a name="GIMP-VALUE-HOLDS-CONFIG-PATH:CAPS"></a><h3>GIMP_VALUE_HOLDS_CONFIG_PATH()</h3>
289
<pre class="programlisting">#define GIMP_VALUE_HOLDS_CONFIG_PATH(value) (G_TYPE_CHECK_VALUE_TYPE ((value), GIMP_TYPE_CONFIG_PATH))
298
Generated by GTK-Doc V1.18</div>
b'\\ No newline at end of file'