Files
gimp/devel-docs/libgimpbase/html/libgimpbase-gimpenv.html
2018-04-19 11:58:35 -04:00

763 lines
39 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>gimpenv: GIMP Base Library Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="index.html" title="GIMP Base Library Reference Manual">
<link rel="up" href="pt01.html" title="Part I. GIMP Base Library">
<link rel="prev" href="libgimpbase-gimpdatafiles.html" title="gimpdatafiles">
<link rel="next" href="libgimpbase-gimpmemsize.html" title="gimpmemsize">
<meta name="generator" content="GTK-Doc V1.28 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
<a href="#libgimpbase-gimpenv.description" class="shortcut">Description</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="pt01.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="libgimpbase-gimpdatafiles.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="libgimpbase-gimpmemsize.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="libgimpbase-gimpenv"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="libgimpbase-gimpenv.top_of_page"></a>gimpenv</span></h2>
<p>gimpenv — Functions to access the GIMP environment.</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="libgimpbase-gimpenv.functions"></a><h2>Functions</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="functions_return">
<col class="functions_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="libgimpbase-gimpenv.html#gimp-env-init" title="gimp_env_init ()">gimp_env_init</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
</td>
<td class="function_name">
<a class="link" href="libgimpbase-gimpenv.html#gimp-directory" title="gimp_directory ()">gimp_directory</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
</td>
<td class="function_name">
<a class="link" href="libgimpbase-gimpenv.html#gimp-installation-directory" title="gimp_installation_directory ()">gimp_installation_directory</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
</td>
<td class="function_name">
<a class="link" href="libgimpbase-gimpenv.html#gimp-data-directory" title="gimp_data_directory ()">gimp_data_directory</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
</td>
<td class="function_name">
<a class="link" href="libgimpbase-gimpenv.html#gimp-locale-directory" title="gimp_locale_directory ()">gimp_locale_directory</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
</td>
<td class="function_name">
<a class="link" href="libgimpbase-gimpenv.html#gimp-plug-in-directory" title="gimp_plug_in_directory ()">gimp_plug_in_directory</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
</td>
<td class="function_name">
<a class="link" href="libgimpbase-gimpenv.html#gimp-sysconf-directory" title="gimp_sysconf_directory ()">gimp_sysconf_directory</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../gio/GFile.html#GFile-struct"><span class="returnvalue">GFile</span></a> *
</td>
<td class="function_name">
<a class="link" href="libgimpbase-gimpenv.html#gimp-directory-file" title="gimp_directory_file ()">gimp_directory_file</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../gio/GFile.html#GFile-struct"><span class="returnvalue">GFile</span></a> *
</td>
<td class="function_name">
<a class="link" href="libgimpbase-gimpenv.html#gimp-data-directory-file" title="gimp_data_directory_file ()">gimp_data_directory_file</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../gio/GFile.html#GFile-struct"><span class="returnvalue">GFile</span></a> *
</td>
<td class="function_name">
<a class="link" href="libgimpbase-gimpenv.html#gimp-locale-directory-file" title="gimp_locale_directory_file ()">gimp_locale_directory_file</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../gio/GFile.html#GFile-struct"><span class="returnvalue">GFile</span></a> *
</td>
<td class="function_name">
<a class="link" href="libgimpbase-gimpenv.html#gimp-sysconf-directory-file" title="gimp_sysconf_directory_file ()">gimp_sysconf_directory_file</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../gio/GFile.html#GFile-struct"><span class="returnvalue">GFile</span></a> *
</td>
<td class="function_name">
<a class="link" href="libgimpbase-gimpenv.html#gimp-plug-in-directory-file" title="gimp_plug_in_directory_file ()">gimp_plug_in_directory_file</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
</td>
<td class="function_name">
<a class="link" href="libgimpbase-gimpenv.html#gimp-user-directory" title="gimp_user_directory ()">gimp_user_directory</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
</td>
<td class="function_name">
<a class="link" href="libgimpbase-gimpenv.html#gimp-personal-rc-file" title="gimp_personal_rc_file ()">gimp_personal_rc_file</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
</td>
<td class="function_name">
<a class="link" href="libgimpbase-gimpenv.html#gimp-gtkrc" title="gimp_gtkrc ()">gimp_gtkrc</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib/glib-Doubly-Linked-Lists.html#GList"><span class="returnvalue">GList</span></a> *
</td>
<td class="function_name">
<a class="link" href="libgimpbase-gimpenv.html#gimp-path-parse" title="gimp_path_parse ()">gimp_path_parse</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
</td>
<td class="function_name">
<a class="link" href="libgimpbase-gimpenv.html#gimp-path-to-str" title="gimp_path_to_str ()">gimp_path_to_str</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="libgimpbase-gimpenv.html#gimp-path-free" title="gimp_path_free ()">gimp_path_free</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
</td>
<td class="function_name">
<a class="link" href="libgimpbase-gimpenv.html#gimp-path-get-user-writable-dir" title="gimp_path_get_user_writable_dir ()">gimp_path_get_user_writable_dir</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="libgimpbase-gimpenv.description"></a><h2>Description</h2>
<p>A set of functions to find the locations of GIMP's data directories
and configuration files.</p>
</div>
<div class="refsect1">
<a name="libgimpbase-gimpenv.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="gimp-env-init"></a><h3>gimp_env_init ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gimp_env_init (<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> plug_in</code></em>);</pre>
<p>You don't need to care about this function. It is being called for
you automatically (by means of the <a href="../libgimp/libgimp-gimp.html#MAIN:CAPS"><code class="function">MAIN()</code></a> macro that every plug-in
runs). Calling it again will cause a fatal error.</p>
<div class="refsect3">
<a name="gimp-env-init.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>plug_in</p></td>
<td class="parameter_description"><p>must be <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if this function is called from a plug-in</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-2-4.html#api-index-2.4">2.4</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gimp-directory"></a><h3>gimp_directory ()</h3>
<pre class="programlisting">const <a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
gimp_directory (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Returns the user-specific GIMP settings directory. If the
environment variable GIMP2_DIRECTORY exists, it is used. If it is
an absolute path, it is used as is. If it is a relative path, it
is taken to be a subdirectory of the home directory. If it is a
relative path, and no home directory can be determined, it is taken
to be a subdirectory of <a class="link" href="libgimpbase-gimpenv.html#gimp-data-directory" title="gimp_data_directory ()"><code class="function">gimp_data_directory()</code></a>.</p>
<p>The usual case is that no GIMP2_DIRECTORY environment variable
exists, and then we use the GIMPDIR subdirectory of the local
configuration directory:</p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem"><p>UNIX: $XDG_CONFIG_HOME (defaults to $HOME/.config/)</p></li>
<li class="listitem"><p>Windows: CSIDL_APPDATA</p></li>
<li class="listitem"><p>OSX (UNIX exception): the Application Support Directory.</p></li>
</ul></div>
<p>If neither the configuration nor home directory exist,
<a href="../glib/glib-Miscellaneous-Utility-Functions.html#g-get-user-config-dir"><code class="function">g_get_user_config_dir()</code></a> will return {tmp}/{user_name}/.config/ where
the temporary directory {tmp} and the {user_name} are determined
according to platform rules.</p>
<p>In any case, we always return some non-empty string, whether it
corresponds to an existing directory or not.</p>
<p>The returned string is owned by GIMP and must not be modified or
freed. The returned string is in the encoding used for filenames by
GLib, which isn't necessarily UTF-8 (on Windows it is always
UTF-8.)</p>
<div class="refsect3">
<a name="gimp-directory.returns"></a><h4>Returns</h4>
<p> The user-specific GIMP settings directory.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gimp-installation-directory"></a><h3>gimp_installation_directory ()</h3>
<pre class="programlisting">const <a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
gimp_installation_directory (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Returns the top installation directory of GIMP. On Unix the
compile-time defined installation prefix is used. On Windows, the
installation directory as deduced from the executable's full
filename is used. On OSX we ask [NSBundle mainBundle] for the
resource path to check if GIMP is part of a relocatable bundle.</p>
<p>The returned string is owned by GIMP and must not be modified or
freed. The returned string is in the encoding used for filenames by
GLib, which isn't necessarily UTF-8. (On Windows it always is
UTF-8.)</p>
<div class="refsect3">
<a name="gimp-installation-directory.returns"></a><h4>Returns</h4>
<p> The toplevel installation directory of GIMP.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-8.html#api-index-2.8">2.8</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gimp-data-directory"></a><h3>gimp_data_directory ()</h3>
<pre class="programlisting">const <a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
gimp_data_directory (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Returns the top directory for GIMP data. If the environment
variable GIMP2_DATADIR exists, that is used. It should be an
absolute pathname. Otherwise, on Unix the compile-time defined
directory is used. On Windows, the installation directory as deduced
from the executable's full filename is used.</p>
<p>The returned string is owned by GIMP and must not be modified or
freed. The returned string is in the encoding used for filenames by
GLib, which isn't necessarily UTF-8. (On Windows it always is
UTF-8.)</p>
<div class="refsect3">
<a name="gimp-data-directory.returns"></a><h4>Returns</h4>
<p> The top directory for GIMP data.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gimp-locale-directory"></a><h3>gimp_locale_directory ()</h3>
<pre class="programlisting">const <a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
gimp_locale_directory (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Returns the top directory for GIMP locale files. If the environment
variable GIMP2_LOCALEDIR exists, that is used. It should be an
absolute pathname. Otherwise, on Unix the compile-time defined
directory is used. On Windows, the installation directory as deduced
from the executable's full filename is used.</p>
<p>The returned string is owned by GIMP and must not be modified or
freed. The returned string is in the encoding used for filenames by
the C library, which isn't necessarily UTF-8. (On Windows, unlike
the other similar functions here, the return value from this
function is in the system codepage, never in UTF-8. It can thus be
passed directly to the <code class="function">bindtextdomain()</code> function from libintl which
does not handle UTF-8.)</p>
<div class="refsect3">
<a name="gimp-locale-directory.returns"></a><h4>Returns</h4>
<p> The top directory for GIMP locale files.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gimp-plug-in-directory"></a><h3>gimp_plug_in_directory ()</h3>
<pre class="programlisting">const <a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
gimp_plug_in_directory (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Returns the top directory for GIMP plug_ins and modules. If the
environment variable GIMP2_PLUGINDIR exists, that is used. It
should be an absolute pathname. Otherwise, on Unix the compile-time
defined directory is used. On Windows, the installation directory as
deduced from the executable's full filename is used.</p>
<p>The returned string is owned by GIMP and must not be modified or
freed. The returned string is in the encoding used for filenames by
GLib, which isn't necessarily UTF-8. (On Windows it always is
UTF-8.)</p>
<div class="refsect3">
<a name="gimp-plug-in-directory.returns"></a><h4>Returns</h4>
<p> The top directory for GIMP plug_ins and modules.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gimp-sysconf-directory"></a><h3>gimp_sysconf_directory ()</h3>
<pre class="programlisting">const <a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
gimp_sysconf_directory (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Returns the top directory for GIMP config files. If the environment
variable GIMP2_SYSCONFDIR exists, that is used. It should be an
absolute pathname. Otherwise, on Unix the compile-time defined
directory is used. On Windows, the installation directory as deduced
from the executable's full filename is used.</p>
<p>The returned string is owned by GIMP and must not be modified or
freed. The returned string is in the encoding used for filenames by
GLib, which isn't necessarily UTF-8. (On Windows it always is
UTF-8.).</p>
<div class="refsect3">
<a name="gimp-sysconf-directory.returns"></a><h4>Returns</h4>
<p> The top directory for GIMP config files.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gimp-directory-file"></a><h3>gimp_directory_file ()</h3>
<pre class="programlisting"><a href="../gio/GFile.html#GFile-struct"><span class="returnvalue">GFile</span></a> *
gimp_directory_file (<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *first_element</code></em>,
<em class="parameter"><code>...</code></em>);</pre>
<p>Returns a <a href="../gio/GFile.html#GFile-struct"><span class="type">GFile</span></a> in the user's GIMP directory, or the data
directory itself if <em class="parameter"><code>first_element</code></em>
is <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</p>
<p>See also: <a class="link" href="libgimpbase-gimpenv.html#gimp-directory" title="gimp_directory ()"><code class="function">gimp_directory()</code></a>.</p>
<div class="refsect3">
<a name="gimp-directory-file.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>first_element</p></td>
<td class="parameter_description"><p>the first element of a path to a file in the
user's GIMP directory, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>...</p></td>
<td class="parameter_description"><p>a <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> terminated list of the remaining elements of the path
to the file.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gimp-directory-file.returns"></a><h4>Returns</h4>
<p> a new <em class="parameter"><code>GFile</code></em>
for the path, Free with <a href="../gobject/gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-10.html#api-index-2.10">2.10</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gimp-data-directory-file"></a><h3>gimp_data_directory_file ()</h3>
<pre class="programlisting"><a href="../gio/GFile.html#GFile-struct"><span class="returnvalue">GFile</span></a> *
gimp_data_directory_file (<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *first_element</code></em>,
<em class="parameter"><code>...</code></em>);</pre>
<p>Returns a <a href="../gio/GFile.html#GFile-struct"><span class="type">GFile</span></a> in the data directory, or the data directory
itself if <em class="parameter"><code>first_element</code></em>
is <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</p>
<p>See also: <a class="link" href="libgimpbase-gimpenv.html#gimp-data-directory" title="gimp_data_directory ()"><code class="function">gimp_data_directory()</code></a>.</p>
<div class="refsect3">
<a name="gimp-data-directory-file.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>first_element</p></td>
<td class="parameter_description"><p>the first element of a path to a file in the
data directory, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>...</p></td>
<td class="parameter_description"><p>a <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> terminated list of the remaining elements of the path
to the file.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gimp-data-directory-file.returns"></a><h4>Returns</h4>
<p> a new <em class="parameter"><code>GFile</code></em>
for the path, Free with <a href="../gobject/gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-10.html#api-index-2.10">2.10</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gimp-locale-directory-file"></a><h3>gimp_locale_directory_file ()</h3>
<pre class="programlisting"><a href="../gio/GFile.html#GFile-struct"><span class="returnvalue">GFile</span></a> *
gimp_locale_directory_file (<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *first_element</code></em>,
<em class="parameter"><code>...</code></em>);</pre>
<p>Returns a <a href="../gio/GFile.html#GFile-struct"><span class="type">GFile</span></a> in the locale directory, or the locale directory
itself if <em class="parameter"><code>first_element</code></em>
is <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</p>
<p>See also: <a class="link" href="libgimpbase-gimpenv.html#gimp-locale-directory" title="gimp_locale_directory ()"><code class="function">gimp_locale_directory()</code></a>.</p>
<div class="refsect3">
<a name="gimp-locale-directory-file.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>first_element</p></td>
<td class="parameter_description"><p>the first element of a path to a file in the
locale directory, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>...</p></td>
<td class="parameter_description"><p>a <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> terminated list of the remaining elements of the path
to the file.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gimp-locale-directory-file.returns"></a><h4>Returns</h4>
<p> a new <em class="parameter"><code>GFile</code></em>
for the path, Free with <a href="../gobject/gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-10.html#api-index-2.10">2.10</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gimp-sysconf-directory-file"></a><h3>gimp_sysconf_directory_file ()</h3>
<pre class="programlisting"><a href="../gio/GFile.html#GFile-struct"><span class="returnvalue">GFile</span></a> *
gimp_sysconf_directory_file (<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *first_element</code></em>,
<em class="parameter"><code>...</code></em>);</pre>
<p>Returns a <a href="../gio/GFile.html#GFile-struct"><span class="type">GFile</span></a> in the sysconf directory, or the sysconf directory
itself if <em class="parameter"><code>first_element</code></em>
is <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</p>
<p>See also: <a class="link" href="libgimpbase-gimpenv.html#gimp-sysconf-directory" title="gimp_sysconf_directory ()"><code class="function">gimp_sysconf_directory()</code></a>.</p>
<div class="refsect3">
<a name="gimp-sysconf-directory-file.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>first_element</p></td>
<td class="parameter_description"><p>the first element of a path to a file in the
sysconf directory, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>...</p></td>
<td class="parameter_description"><p>a <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> terminated list of the remaining elements of the path
to the file.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gimp-sysconf-directory-file.returns"></a><h4>Returns</h4>
<p> a new <em class="parameter"><code>GFile</code></em>
for the path, Free with <a href="../gobject/gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-10.html#api-index-2.10">2.10</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gimp-plug-in-directory-file"></a><h3>gimp_plug_in_directory_file ()</h3>
<pre class="programlisting"><a href="../gio/GFile.html#GFile-struct"><span class="returnvalue">GFile</span></a> *
gimp_plug_in_directory_file (<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *first_element</code></em>,
<em class="parameter"><code>...</code></em>);</pre>
<p>Returns a <a href="../gio/GFile.html#GFile-struct"><span class="type">GFile</span></a> in the plug-in directory, or the plug-in directory
itself if <em class="parameter"><code>first_element</code></em>
is <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</p>
<p>See also: <a class="link" href="libgimpbase-gimpenv.html#gimp-plug-in-directory" title="gimp_plug_in_directory ()"><code class="function">gimp_plug_in_directory()</code></a>.</p>
<div class="refsect3">
<a name="gimp-plug-in-directory-file.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>first_element</p></td>
<td class="parameter_description"><p>the first element of a path to a file in the
plug-in directory, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>...</p></td>
<td class="parameter_description"><p>a <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> terminated list of the remaining elements of the path
to the file.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gimp-plug-in-directory-file.returns"></a><h4>Returns</h4>
<p> a new <em class="parameter"><code>GFile</code></em>
for the path, Free with <a href="../gobject/gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-10.html#api-index-2.10">2.10</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gimp-user-directory"></a><h3>gimp_user_directory ()</h3>
<pre class="programlisting">const <a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
gimp_user_directory (<em class="parameter"><code><a class="link" href="libgimpbase-gimpbaseenums.html#GimpUserDirectory" title="enum GimpUserDirectory"><span class="type">GimpUserDirectory</span></a> type</code></em>);</pre>
<div class="warning"><p><code class="literal">gimp_user_directory</code> is deprecated and should not be used in newly-written code.</p></div>
<p>This procedure is deprecated! Use <a href="../glib/glib-Miscellaneous-Utility-Functions.html#g-get-user-special-dir"><code class="function">g_get_user_special_dir()</code></a> instead.</p>
<div class="refsect3">
<a name="gimp-user-directory.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>type</p></td>
<td class="parameter_description"><p>the type of user directory to retrieve</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gimp-user-directory.returns"></a><h4>Returns</h4>
<p> The path to the specified user directory, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the
logical ID was not found.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-4.html#api-index-2.4">2.4</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gimp-personal-rc-file"></a><h3>gimp_personal_rc_file ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
gimp_personal_rc_file (<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *basename</code></em>);</pre>
<p>Returns the name of a file in the user-specific GIMP settings directory.</p>
<p>The returned string is newly allocated and should be freed with
<a href="../glib/glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a> after use. The returned string is in the encoding used for
filenames by GLib, which isn't necessarily UTF-8. (On Windows it
always is UTF-8.)</p>
<div class="refsect3">
<a name="gimp-personal-rc-file.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>basename</p></td>
<td class="parameter_description"><p>The basename of a rc_file.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gimp-personal-rc-file.returns"></a><h4>Returns</h4>
<p> The name of a file in the user-specific GIMP settings directory.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gimp-gtkrc"></a><h3>gimp_gtkrc ()</h3>
<pre class="programlisting">const <a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
gimp_gtkrc (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<div class="warning"><p><code class="literal">gimp_gtkrc</code> is deprecated and should not be used in newly-written code.</p></div>
<p>Returns the name of GIMP's application-specific gtkrc file.</p>
<p>The returned string is owned by GIMP and must not be modified or
freed. The returned string is in the encoding used for filenames by
GLib, which isn't necessarily UTF-8. (On Windows it always is
UTF-8.)</p>
<div class="refsect3">
<a name="gimp-gtkrc.returns"></a><h4>Returns</h4>
<p> The name of GIMP's application-specific gtkrc file.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gimp-path-parse"></a><h3>gimp_path_parse ()</h3>
<pre class="programlisting"><a href="../glib/glib-Doubly-Linked-Lists.html#GList"><span class="returnvalue">GList</span></a> *
gimp_path_parse (<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *path</code></em>,
<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> max_paths</code></em>,
<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> check</code></em>,
<em class="parameter"><code><a href="../glib/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> **check_failed</code></em>);</pre>
<div class="refsect3">
<a name="gimp-path-parse.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>path</p></td>
<td class="parameter_description"><p>A list of directories separated by <a href="../glib/glib-Standard-Macros.html#G-SEARCHPATH-SEPARATOR:CAPS"><span class="type">G_SEARCHPATH_SEPARATOR</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>max_paths</p></td>
<td class="parameter_description"><p>The maximum number of directories to return.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>check</p></td>
<td class="parameter_description"><p><a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if you want the directories to be checked.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>check_failed</p></td>
<td class="parameter_description"><p>Returns a <a href="../glib/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> of path elements for which the
check failed.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gimp-path-parse.returns"></a><h4>Returns</h4>
<p> A <a href="../glib/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> of all directories in <em class="parameter"><code>path</code></em>
.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gimp-path-to-str"></a><h3>gimp_path_to_str ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
gimp_path_to_str (<em class="parameter"><code><a href="../glib/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> *path</code></em>);</pre>
<div class="refsect3">
<a name="gimp-path-to-str.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>path</p></td>
<td class="parameter_description"><p>A list of directories as returned by <a class="link" href="libgimpbase-gimpenv.html#gimp-path-parse" title="gimp_path_parse ()"><code class="function">gimp_path_parse()</code></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gimp-path-to-str.returns"></a><h4>Returns</h4>
<p> A searchpath string separated by <a href="../glib/glib-Standard-Macros.html#G-SEARCHPATH-SEPARATOR:CAPS"><span class="type">G_SEARCHPATH_SEPARATOR</span></a>.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gimp-path-free"></a><h3>gimp_path_free ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gimp_path_free (<em class="parameter"><code><a href="../glib/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> *path</code></em>);</pre>
<p>This function frees the memory allocated for the list and the strings
it contains.</p>
<div class="refsect3">
<a name="gimp-path-free.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>path</p></td>
<td class="parameter_description"><p>A list of directories as returned by <a class="link" href="libgimpbase-gimpenv.html#gimp-path-parse" title="gimp_path_parse ()"><code class="function">gimp_path_parse()</code></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gimp-path-get-user-writable-dir"></a><h3>gimp_path_get_user_writable_dir ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
gimp_path_get_user_writable_dir (<em class="parameter"><code><a href="../glib/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> *path</code></em>);</pre>
<p>Note that you have to <a href="../glib/glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a> the returned string.</p>
<div class="refsect3">
<a name="gimp-path-get-user-writable-dir.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>path</p></td>
<td class="parameter_description"><p>A list of directories as returned by <a class="link" href="libgimpbase-gimpenv.html#gimp-path-parse" title="gimp_path_parse ()"><code class="function">gimp_path_parse()</code></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gimp-path-get-user-writable-dir.returns"></a><h4>Returns</h4>
<p> The first directory in <em class="parameter"><code>path</code></em>
where the user has write permission.</p>
</div>
</div>
</div>
<div class="refsect1">
<a name="libgimpbase-gimpenv.other_details"></a><h2>Types and Values</h2>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.28</div>
</body>
</html>