Files
gimp/devel-docs/libgimpconfig/html/libgimpconfig-gimpconfig-utils.html
2010-08-11 01:23:08 -04:00

336 lines
13 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>gimpconfig-utils</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.72.0">
<link rel="start" href="index.html" title="GIMP Config Library Reference Manual">
<link rel="up" href="libgimpconfig.html" title="Part&#160;I.&#160;GIMP Config Library">
<link rel="prev" href="libgimpconfig-gimpconfig-path.html" title="gimpconfig-path">
<link rel="next" href="libgimpconfig-GimpConfigWriter.html" title="gimpconfigwriter">
<meta name="generator" content="GTK-Doc V1.8 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
<link rel="part" href="libgimpconfig.html" title="Part&#160;I.&#160;GIMP Config Library">
<link rel="chapter" href="libgimpconfig-hierarchy.html" title="Object Hierarchy">
<link rel="index" href="libgimpconfig-index.html" title="Index">
<link rel="index" href="libgimpconfig-index-new-in-2-4.html" title="Index of new symbols in GIMP 2.4">
<link rel="index" href="libgimpconfig-index-deprecated.html" title="Index of deprecated symbols">
</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="2">
<tr valign="middle">
<td><a accesskey="p" href="libgimpconfig-gimpconfig-path.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="libgimpconfig.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">GIMP Config Library Reference Manual</th>
<td><a accesskey="n" href="libgimpconfig-GimpConfigWriter.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2578791" class="shortcut">Top</a>
&#160;|&#160;
<a href="#id2582907" class="shortcut">Description</a></nobr></td></tr>
</table>
<div class="refentry" lang="en">
<a name="libgimpconfig-gimpconfig-utils"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2>
<a name="id2578791"></a><span class="refentrytitle">gimpconfig-utils</span>
</h2>
<p>gimpconfig-utils &#8212; Miscellaneous utility functions for libgimpconfig.</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<h2>Synopsis</h2>
<pre class="synopsis">
<a
href="../glib/glib-Doubly-Linked-Lists.html#GList"
>GList</a>* <a href="libgimpconfig-gimpconfig-utils.html#gimp-config-diff">gimp_config_diff</a> (<a
href="../gobject/gobject-The-Base-Object-Type.html#GObject"
>GObject</a> *a,
<a
href="../gobject/gobject-The-Base-Object-Type.html#GObject"
>GObject</a> *b,
<a
href="../gobject/gobject-GParamSpec.html#GParamFlags"
>GParamFlags</a> flags);
<a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> <a href="libgimpconfig-gimpconfig-utils.html#gimp-config-sync">gimp_config_sync</a> (<a
href="../gobject/gobject-The-Base-Object-Type.html#GObject"
>GObject</a> *src,
<a
href="../gobject/gobject-The-Base-Object-Type.html#GObject"
>GObject</a> *dest,
<a
href="../gobject/gobject-GParamSpec.html#GParamFlags"
>GParamFlags</a> flags);
void <a href="libgimpconfig-gimpconfig-utils.html#gimp-config-reset-properties">gimp_config_reset_properties</a> (<a
href="../gobject/gobject-The-Base-Object-Type.html#GObject"
>GObject</a> *object);
void <a href="libgimpconfig-gimpconfig-utils.html#gimp-config-reset-property">gimp_config_reset_property</a> (<a
href="../gobject/gobject-The-Base-Object-Type.html#GObject"
>GObject</a> *object,
const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *property_name);
void <a href="libgimpconfig-gimpconfig-utils.html#gimp-config-string-append-escaped">gimp_config_string_append_escaped</a> (<a
href="../glib/glib-Strings.html#GString"
>GString</a> *string,
const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *val);
</pre>
</div>
<div class="refsect1" lang="en">
<a name="id2582907"></a><h2>Description</h2>
<p>
Miscellaneous utility functions for libgimpconfig.
</p>
</div>
<div class="refsect1" lang="en">
<a name="id2582924"></a><h2>Details</h2>
<div class="refsect2" lang="en">
<a name="id2582934"></a><h3>
<a name="gimp-config-diff"></a>gimp_config_diff ()</h3>
<a class="indexterm" name="id2561969"></a><pre class="programlisting"><a
href="../glib/glib-Doubly-Linked-Lists.html#GList"
>GList</a>* gimp_config_diff (<a
href="../gobject/gobject-The-Base-Object-Type.html#GObject"
>GObject</a> *a,
<a
href="../gobject/gobject-The-Base-Object-Type.html#GObject"
>GObject</a> *b,
<a
href="../gobject/gobject-GParamSpec.html#GParamFlags"
>GParamFlags</a> flags);</pre>
<p>
Compares all properties of <em class="parameter"><code>a</code></em> and <em class="parameter"><code>b</code></em> that have all <em class="parameter"><code>flags</code></em> set. If
<em class="parameter"><code>flags</code></em> is 0, all properties are compared.
</p>
<p>
If the two objects are not of the same type, only properties that
exist in both object classes and are of the same value_type are
compared.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><span class="term"><em class="parameter"><code>a</code></em>&#160;:</span></td>
<td> a <a
href="../gobject/gobject-The-Base-Object-Type.html#GObject"
><span class="type">GObject</span></a>
</td>
</tr>
<tr>
<td><span class="term"><em class="parameter"><code>b</code></em>&#160;:</span></td>
<td> another <a
href="../gobject/gobject-The-Base-Object-Type.html#GObject"
><span class="type">GObject</span></a> object
</td>
</tr>
<tr>
<td><span class="term"><em class="parameter"><code>flags</code></em>&#160;:</span></td>
<td> a mask of GParamFlags
</td>
</tr>
<tr>
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> a GList of differing GParamSpecs.
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since GIMP 2.4
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2566405"></a><h3>
<a name="gimp-config-sync"></a>gimp_config_sync ()</h3>
<a class="indexterm" name="id2566420"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> gimp_config_sync (<a
href="../gobject/gobject-The-Base-Object-Type.html#GObject"
>GObject</a> *src,
<a
href="../gobject/gobject-The-Base-Object-Type.html#GObject"
>GObject</a> *dest,
<a
href="../gobject/gobject-GParamSpec.html#GParamFlags"
>GParamFlags</a> flags);</pre>
<p>
Compares all read- and write-able properties from <em class="parameter"><code>src</code></em> and <em class="parameter"><code>dest</code></em>
that have all <em class="parameter"><code>flags</code></em> set. Differing values are then copied from
<em class="parameter"><code>src</code></em> to <em class="parameter"><code>dest</code></em>. If <em class="parameter"><code>flags</code></em> is 0, all differing read/write properties.
</p>
<p>
Properties marked as "construct-only" are not touched.
</p>
<p>
If the two objects are not of the same type, only properties that
exist in both object classes and are of the same value_type are
synchronized</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><span class="term"><em class="parameter"><code>src</code></em>&#160;:</span></td>
<td> a <a
href="../gobject/gobject-The-Base-Object-Type.html#GObject"
><span class="type">GObject</span></a>
</td>
</tr>
<tr>
<td><span class="term"><em class="parameter"><code>dest</code></em>&#160;:</span></td>
<td> another <a
href="../gobject/gobject-The-Base-Object-Type.html#GObject"
><span class="type">GObject</span></a>
</td>
</tr>
<tr>
<td><span class="term"><em class="parameter"><code>flags</code></em>&#160;:</span></td>
<td> a mask of GParamFlags
</td>
</tr>
<tr>
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> <a
href="../glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a> if <em class="parameter"><code>dest</code></em> was modified, <a
href="../glib/glib-Standard-Macros.html#FALSE:CAPS"
><code class="literal">FALSE</code></a> otherwise
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since GIMP 2.4
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2566617"></a><h3>
<a name="gimp-config-reset-properties"></a>gimp_config_reset_properties ()</h3>
<a class="indexterm" name="id2566630"></a><pre class="programlisting">void gimp_config_reset_properties (<a
href="../gobject/gobject-The-Base-Object-Type.html#GObject"
>GObject</a> *object);</pre>
<p>
Resets all writable properties of <em class="parameter"><code>object</code></em> to the default values as
defined in their <a
href="../gobject/gobject-GParamSpec.html#GParamSpec"
><span class="type">GParamSpec</span></a>. Properties marked as "construct-only"
are not touched.
</p>
<p>
If you want to reset a <a href="libgimpconfig-GimpConfig.html#GimpConfig"><span class="type">GimpConfig</span></a> object, please use <a href="libgimpconfig-GimpConfig.html#gimp-config-reset"><code class="function">gimp_config_reset()</code></a>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><span class="term"><em class="parameter"><code>object</code></em>&#160;:</span></td>
<td> a <a
href="../gobject/gobject-The-Base-Object-Type.html#GObject"
><span class="type">GObject</span></a>
</td>
</tr></tbody>
</table></div>
<p class="since">Since GIMP 2.4
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2580922"></a><h3>
<a name="gimp-config-reset-property"></a>gimp_config_reset_property ()</h3>
<a class="indexterm" name="id2580936"></a><pre class="programlisting">void gimp_config_reset_property (<a
href="../gobject/gobject-The-Base-Object-Type.html#GObject"
>GObject</a> *object,
const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *property_name);</pre>
<p>
Resets the property named <em class="parameter"><code>property_name</code></em> to its default value. The
property must be writable and must not be marked as "construct-only".</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><span class="term"><em class="parameter"><code>object</code></em>&#160;:</span></td>
<td> a <a
href="../gobject/gobject-The-Base-Object-Type.html#GObject"
><span class="type">GObject</span></a>
</td>
</tr>
<tr>
<td><span class="term"><em class="parameter"><code>property_name</code></em>&#160;:</span></td>
<td> name of the property to reset
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since GIMP 2.4
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2581029"></a><h3>
<a name="gimp-config-string-append-escaped"></a>gimp_config_string_append_escaped ()</h3>
<a class="indexterm" name="id2581045"></a><pre class="programlisting">void gimp_config_string_append_escaped (<a
href="../glib/glib-Strings.html#GString"
>GString</a> *string,
const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *val);</pre>
<p>
Escapes and quotes <em class="parameter"><code>val</code></em> and appends it to <em class="parameter"><code>string</code></em>. The escape
algorithm is different from the one used by <a
href="../glib/glib-String-Utility-Functions.html#g-strescape"
><code class="function">g_strescape()</code></a> since it
leaves non-ASCII characters intact and thus preserves UTF-8
strings. Only control characters and quotes are being escaped.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><span class="term"><em class="parameter"><code>string</code></em>&#160;:</span></td>
<td> pointer to a <a
href="../glib/glib-Strings.html#GString"
><span class="type">GString</span></a>
</td>
</tr>
<tr>
<td><span class="term"><em class="parameter"><code>val</code></em>&#160;:</span></td>
<td> a string to append or <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since GIMP 2.4
</p>
</div>
</div>
</div>
</body>
</html>