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

260 lines
11 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="#id2556122" class="shortcut">Top</a>
&#160;|&#160;
<a href="#id2580732" 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="id2556122"></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">
GList* <a href="libgimpconfig-gimpconfig-utils.html#gimp-config-diff">gimp_config_diff</a> (GObject *a,
GObject *b,
GParamFlags flags);
gboolean <a href="libgimpconfig-gimpconfig-utils.html#gimp-config-sync">gimp_config_sync</a> (GObject *src,
GObject *dest,
GParamFlags flags);
void <a href="libgimpconfig-gimpconfig-utils.html#gimp-config-reset-properties">gimp_config_reset_properties</a> (GObject *object);
void <a href="libgimpconfig-gimpconfig-utils.html#gimp-config-reset-property">gimp_config_reset_property</a> (GObject *object,
const gchar *property_name);
void <a href="libgimpconfig-gimpconfig-utils.html#gimp-config-string-append-escaped">gimp_config_string_append_escaped</a> (GString *string,
const gchar *val);
</pre>
</div>
<div class="refsect1" lang="en">
<a name="id2580732"></a><h2>Description</h2>
<p>
Miscellaneous utility functions for libgimpconfig.
</p>
</div>
<div class="refsect1" lang="en">
<a name="id2580748"></a><h2>Details</h2>
<div class="refsect2" lang="en">
<a name="id2580759"></a><h3>
<a name="gimp-config-diff"></a>gimp_config_diff ()</h3>
<a class="indexterm" name="id2564652"></a><pre class="programlisting">GList* gimp_config_diff (GObject *a,
GObject *b,
GParamFlags 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 <span class="type">GObject</span>
</td>
</tr>
<tr>
<td><span class="term"><em class="parameter"><code>b</code></em>&#160;:</span></td>
<td> another <span class="type">GObject</span> 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="id2595126"></a><h3>
<a name="gimp-config-sync"></a>gimp_config_sync ()</h3>
<a class="indexterm" name="id2595141"></a><pre class="programlisting">gboolean gimp_config_sync (GObject *src,
GObject *dest,
GParamFlags 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 <span class="type">GObject</span>
</td>
</tr>
<tr>
<td><span class="term"><em class="parameter"><code>dest</code></em>&#160;:</span></td>
<td> another <span class="type">GObject</span>
</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> <code class="literal">TRUE</code> if <em class="parameter"><code>dest</code></em> was modified, <code class="literal">FALSE</code> otherwise
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since GIMP 2.4
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2595338"></a><h3>
<a name="gimp-config-reset-properties"></a>gimp_config_reset_properties ()</h3>
<a class="indexterm" name="id2595352"></a><pre class="programlisting">void gimp_config_reset_properties (GObject *object);</pre>
<p>
Resets all writable properties of <em class="parameter"><code>object</code></em> to the default values as
defined in their <span class="type">GParamSpec</span>. 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 <span class="type">GObject</span>
</td>
</tr></tbody>
</table></div>
<p class="since">Since GIMP 2.4
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2587038"></a><h3>
<a name="gimp-config-reset-property"></a>gimp_config_reset_property ()</h3>
<a class="indexterm" name="id2587052"></a><pre class="programlisting">void gimp_config_reset_property (GObject *object,
const gchar *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 <span class="type">GObject</span>
</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="id2587145"></a><h3>
<a name="gimp-config-string-append-escaped"></a>gimp_config_string_append_escaped ()</h3>
<a class="indexterm" name="id2587161"></a><pre class="programlisting">void gimp_config_string_append_escaped (GString *string,
const gchar *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 <code class="function">g_strescape()</code> 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 <span class="type">GString</span>
</td>
</tr>
<tr>
<td><span class="term"><em class="parameter"><code>val</code></em>&#160;:</span></td>
<td> a string to append or <code class="literal">NULL</code>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since GIMP 2.4
</p>
</div>
</div>
</div>
</body>
</html>