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

321 lines
15 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>gimpconfig-utils</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="index.html" title="GIMP Config Library Reference Manual">
<link rel="up" href="libgimpconfig.html" title="Part I. 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.11 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
<link rel="part" href="libgimpconfig.html" title="Part I. 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-new-in-2-6.html" title="Index of new symbols in GIMP 2.6">
<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">
<a href="#libgimpconfig-gimpconfig-utils.synopsis" class="shortcut">Top</a>
 | 
<a href="#libgimpconfig-gimpconfig-utils.description" class="shortcut">Description</a>
</td></tr>
</table>
<div class="refentry" title="gimpconfig-utils">
<a name="libgimpconfig-gimpconfig-utils"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="libgimpconfig-gimpconfig-utils.top_of_page"></a>gimpconfig-utils</span></h2>
<p>gimpconfig-utils — Miscellaneous utility functions for libgimpconfig.</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv" title="Synopsis">
<a name="libgimpconfig-gimpconfig-utils.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">
<a
href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"
>GList</a> * <a class="link" href="libgimpconfig-gimpconfig-utils.html#gimp-config-diff" title="gimp_config_diff ()">gimp_config_diff</a> (<a
href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject"
>GObject</a> *a,
<a
href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject"
>GObject</a> *b,
<a
href="http://library.gnome.org/devel/gobject/unstable/gobject-GParamSpec.html#GParamFlags"
>GParamFlags</a> flags);
<a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
>gboolean</a> <a class="link" href="libgimpconfig-gimpconfig-utils.html#gimp-config-sync" title="gimp_config_sync ()">gimp_config_sync</a> (<a
href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject"
>GObject</a> *src,
<a
href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject"
>GObject</a> *dest,
<a
href="http://library.gnome.org/devel/gobject/unstable/gobject-GParamSpec.html#GParamFlags"
>GParamFlags</a> flags);
void <a class="link" href="libgimpconfig-gimpconfig-utils.html#gimp-config-reset-properties" title="gimp_config_reset_properties ()">gimp_config_reset_properties</a> (<a
href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject"
>GObject</a> *object);
void <a class="link" href="libgimpconfig-gimpconfig-utils.html#gimp-config-reset-property" title="gimp_config_reset_property ()">gimp_config_reset_property</a> (<a
href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject"
>GObject</a> *object,
const <a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"
>gchar</a> *property_name);
void <a class="link" href="libgimpconfig-gimpconfig-utils.html#gimp-config-string-append-escaped" title="gimp_config_string_append_escaped ()">gimp_config_string_append_escaped</a> (<a
href="http://library.gnome.org/devel/glib/unstable/glib-Strings.html#GString"
>GString</a> *string,
const <a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"
>gchar</a> *val);
</pre>
</div>
<div class="refsect1" title="Description">
<a name="libgimpconfig-gimpconfig-utils.description"></a><h2>Description</h2>
<p>
Miscellaneous utility functions for libgimpconfig.
</p>
</div>
<div class="refsect1" title="Details">
<a name="libgimpconfig-gimpconfig-utils.details"></a><h2>Details</h2>
<div class="refsect2" title="gimp_config_diff ()">
<a name="gimp-config-diff"></a><h3>gimp_config_diff ()</h3>
<pre class="programlisting"><a
href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"
>GList</a> * gimp_config_diff (<a
href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject"
>GObject</a> *a,
<a
href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject"
>GObject</a> *b,
<a
href="http://library.gnome.org/devel/gobject/unstable/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><p><span class="term"><em class="parameter"><code>a</code></em> :</span></p></td>
<td> a <a
href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject"
><span class="type">GObject</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>b</code></em> :</span></p></td>
<td> another <a
href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject"
><span class="type">GObject</span></a> object
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td>
<td> a mask of GParamFlags
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></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" title="gimp_config_sync ()">
<a name="gimp-config-sync"></a><h3>gimp_config_sync ()</h3>
<pre class="programlisting"><a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
>gboolean</a> gimp_config_sync (<a
href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject"
>GObject</a> *src,
<a
href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject"
>GObject</a> *dest,
<a
href="http://library.gnome.org/devel/gobject/unstable/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><p><span class="term"><em class="parameter"><code>src</code></em> :</span></p></td>
<td> a <a
href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject"
><span class="type">GObject</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>dest</code></em> :</span></p></td>
<td> another <a
href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject"
><span class="type">GObject</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td>
<td> a mask of GParamFlags
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> <a
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE--CAPS"
><code class="literal">TRUE</code></a> if <em class="parameter"><code>dest</code></em> was modified, <a
href="http://library.gnome.org/devel/glib/unstable/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" title="gimp_config_reset_properties ()">
<a name="gimp-config-reset-properties"></a><h3>gimp_config_reset_properties ()</h3>
<pre class="programlisting">void gimp_config_reset_properties (<a
href="http://library.gnome.org/devel/gobject/unstable/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="http://library.gnome.org/devel/gobject/unstable/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 class="link" href="libgimpconfig-GimpConfig.html#GimpConfig" title="GimpConfig"><span class="type">GimpConfig</span></a> object, please use <a class="link" href="libgimpconfig-GimpConfig.html#gimp-config-reset" title="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><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
<td> a <a
href="http://library.gnome.org/devel/gobject/unstable/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" title="gimp_config_reset_property ()">
<a name="gimp-config-reset-property"></a><h3>gimp_config_reset_property ()</h3>
<pre class="programlisting">void gimp_config_reset_property (<a
href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject"
>GObject</a> *object,
const <a
href="http://library.gnome.org/devel/glib/unstable/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><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
<td> a <a
href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject"
><span class="type">GObject</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>property_name</code></em> :</span></p></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" title="gimp_config_string_append_escaped ()">
<a name="gimp-config-string-append-escaped"></a><h3>gimp_config_string_append_escaped ()</h3>
<pre class="programlisting">void gimp_config_string_append_escaped (<a
href="http://library.gnome.org/devel/glib/unstable/glib-Strings.html#GString"
>GString</a> *string,
const <a
href="http://library.gnome.org/devel/glib/unstable/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="http://library.gnome.org/devel/glib/unstable/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><p><span class="term"><em class="parameter"><code>string</code></em> :</span></p></td>
<td> pointer to a <a
href="http://library.gnome.org/devel/glib/unstable/glib-Strings.html#GString"
><span class="type">GString</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>val</code></em> :</span></p></td>
<td> a string to append or <a
href="http://library.gnome.org/devel/glib/unstable/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>
<div class="footer">
<hr>
Generated by GTK-Doc V1.11</div>
</body>
</html>