File: //usr/local/ssl/share/gtk-doc/html/libbonobo/libbonobo-bonobo-property-bag.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>BonoboPropertyBag</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
<link rel="start" href="index.html" title="Libbonobo Reference Manual">
<link rel="up" href="property-bags.html" title="Property Bags, Events, Listeners">
<link rel="prev" href="libbonobo-bonobo-listener.html" title="bonobo-listener">
<link rel="next" href="libbonobo-bonobo-arg.html" title="bonobo-arg">
<meta name="generator" content="GTK-Doc V1.7 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
<link rel="chapter" href="general.html" title="General">
<link rel="chapter" href="factories.html" title="Objects, Factories, Reference Counting">
<link rel="chapter" href="property-bags.html" title="Property Bags, Events, Listeners">
<link rel="chapter" href="monikers.html" title="Monikers">
<link rel="chapter" href="streams.html" title="Storages and Streams">
<link rel="chapter" href="persist.html" title="Persistency">
<link rel="chapter" href="misc.html" title="Miscellaneous">
</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="libbonobo-bonobo-listener.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="property-bags.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">Libbonobo Reference Manual</th>
<td><a accesskey="n" href="libbonobo-bonobo-arg.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="#id2722109" class="shortcut">Top</a>
 | 
<a href="#id2722726" class="shortcut">Description</a></nobr></td></tr>
</table>
<div class="refentry" lang="en">
<a name="libbonobo-bonobo-property-bag"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2>
<a name="id2722109"></a><span class="refentrytitle">BonoboPropertyBag</span>
</h2>
<p>BonoboPropertyBag — Implements a generic property storage interface</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<h2>Synopsis</h2>
<pre class="synopsis">
<a href="libbonobo-bonobo-property-bag.html#BonoboPropertyBagClass">BonoboPropertyBagClass</a>;
<a href="libbonobo-bonobo-property-bag.html#BonoboPropertyBag">BonoboPropertyBag</a>;
#define <a href="libbonobo-bonobo-property-bag.html#BONOBO-PROPERTY-READABLE:CAPS">BONOBO_PROPERTY_READABLE</a>
#define <a href="libbonobo-bonobo-property-bag.html#BONOBO-PROPERTY-WRITEABLE:CAPS">BONOBO_PROPERTY_WRITEABLE</a>
#define <a href="libbonobo-bonobo-property-bag.html#BONOBO-PROPERTY-WRITABLE:CAPS">BONOBO_PROPERTY_WRITABLE</a>
#define <a href="libbonobo-bonobo-property-bag.html#BONOBO-PROPERTY-NO-LISTENING:CAPS">BONOBO_PROPERTY_NO_LISTENING</a>
#define <a href="libbonobo-bonobo-property-bag.html#BONOBO-PROPERTY-NO-AUTONOTIFY:CAPS">BONOBO_PROPERTY_NO_AUTONOTIFY</a>
<a href="libbonobo-bonobo-property-bag.html#BonoboProperty">BonoboProperty</a>;
void (<a href="libbonobo-bonobo-property-bag.html#BonoboPropertyGetFn">*BonoboPropertyGetFn</a>) (<a href="libbonobo-bonobo-property-bag.html#BonoboPropertyBag">BonoboPropertyBag</a> *bag,
<a href="libbonobo-bonobo-arg.html#BonoboArg">BonoboArg</a> *arg,
<a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"
>guint</a> arg_id,
CORBA_Environment *ev,
<a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
>gpointer</a> user_data);
void (<a href="libbonobo-bonobo-property-bag.html#BonoboPropertySetFn">*BonoboPropertySetFn</a>) (<a href="libbonobo-bonobo-property-bag.html#BonoboPropertyBag">BonoboPropertyBag</a> *bag,
const <a href="libbonobo-bonobo-arg.html#BonoboArg">BonoboArg</a> *arg,
<a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"
>guint</a> arg_id,
CORBA_Environment *ev,
<a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
>gpointer</a> user_data);
<a href="libbonobo-bonobo-property-bag.html#BonoboPropertyBag">BonoboPropertyBag</a>* <a href="libbonobo-bonobo-property-bag.html#bonobo-property-bag-new">bonobo_property_bag_new</a> (<a href="libbonobo-bonobo-property-bag.html#BonoboPropertyGetFn">BonoboPropertyGetFn</a> get_prop_cb,
<a href="libbonobo-bonobo-property-bag.html#BonoboPropertySetFn">BonoboPropertySetFn</a> set_prop_cb,
<a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
>gpointer</a> user_data);
<a href="libbonobo-bonobo-property-bag.html#BonoboPropertyBag">BonoboPropertyBag</a>* <a href="libbonobo-bonobo-property-bag.html#bonobo-property-bag-new-closure">bonobo_property_bag_new_closure</a>
(<a
href="/usr/share/gtk-doc/html/gobject/gobject-Closures.html#GClosure"
>GClosure</a> *get_prop,
<a
href="/usr/share/gtk-doc/html/gobject/gobject-Closures.html#GClosure"
>GClosure</a> *set_prop);
<a href="libbonobo-bonobo-property-bag.html#BonoboPropertyBag">BonoboPropertyBag</a>* <a href="libbonobo-bonobo-property-bag.html#bonobo-property-bag-new-full">bonobo_property_bag_new_full</a>
(<a
href="/usr/share/gtk-doc/html/gobject/gobject-Closures.html#GClosure"
>GClosure</a> *get_prop,
<a
href="/usr/share/gtk-doc/html/gobject/gobject-Closures.html#GClosure"
>GClosure</a> *set_prop,
BonoboEventSource *es);
<a href="libbonobo-bonobo-property-bag.html#BonoboPropertyBag">BonoboPropertyBag</a>* <a href="libbonobo-bonobo-property-bag.html#bonobo-property-bag-construct">bonobo_property_bag_construct</a>
(<a href="libbonobo-bonobo-property-bag.html#BonoboPropertyBag">BonoboPropertyBag</a> *pb,
<a
href="/usr/share/gtk-doc/html/gobject/gobject-Closures.html#GClosure"
>GClosure</a> *get_prop,
<a
href="/usr/share/gtk-doc/html/gobject/gobject-Closures.html#GClosure"
>GClosure</a> *set_prop,
BonoboEventSource *es);
void <a href="libbonobo-bonobo-property-bag.html#bonobo-property-bag-add">bonobo_property_bag_add</a> (<a href="libbonobo-bonobo-property-bag.html#BonoboPropertyBag">BonoboPropertyBag</a> *pb,
const char *name,
int idx,
<a href="libbonobo-bonobo-arg.html#BonoboArgType">BonoboArgType</a> type,
<a href="libbonobo-bonobo-arg.html#BonoboArg">BonoboArg</a> *default_value,
const char *doctitle,
Bonobo_PropertyFlags flags);
void <a href="libbonobo-bonobo-property-bag.html#bonobo-property-bag-add-full">bonobo_property_bag_add_full</a> (<a href="libbonobo-bonobo-property-bag.html#BonoboPropertyBag">BonoboPropertyBag</a> *pb,
const char *name,
int idx,
<a href="libbonobo-bonobo-arg.html#BonoboArgType">BonoboArgType</a> type,
<a href="libbonobo-bonobo-arg.html#BonoboArg">BonoboArg</a> *default_value,
const char *doctitle,
const char *docstring,
Bonobo_PropertyFlags flags,
<a
href="/usr/share/gtk-doc/html/gobject/gobject-Closures.html#GClosure"
>GClosure</a> *get_prop,
<a
href="/usr/share/gtk-doc/html/gobject/gobject-Closures.html#GClosure"
>GClosure</a> *set_prop);
void <a href="libbonobo-bonobo-property-bag.html#bonobo-property-bag-remove">bonobo_property_bag_remove</a> (<a href="libbonobo-bonobo-property-bag.html#BonoboPropertyBag">BonoboPropertyBag</a> *pb,
const char *name);
void <a href="libbonobo-bonobo-property-bag.html#bonobo-property-bag-map-params">bonobo_property_bag_map_params</a> (<a href="libbonobo-bonobo-property-bag.html#BonoboPropertyBag">BonoboPropertyBag</a> *pb,
<a
href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GObject"
>GObject</a> *on_instance,
const <a
href="/usr/share/gtk-doc/html/gobject/gobject-GParamSpec.html#GParamSpec"
>GParamSpec</a> **pspecs,
<a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"
>guint</a> n_params);
<a
href="/usr/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html#GList"
>GList</a>* <a href="libbonobo-bonobo-property-bag.html#bonobo-property-bag-get-prop-list">bonobo_property_bag_get_prop_list</a>
(<a href="libbonobo-bonobo-property-bag.html#BonoboPropertyBag">BonoboPropertyBag</a> *pb);
</pre>
</div>
<div class="refsect1" lang="en">
<a name="id2722726"></a><h2>Description</h2>
<p>
The PropertyBag is used for many things, particularly for
the customization of controls. The important thing to
remember about the BonoboPropertyBag implementation is that
no live data is stored in the bag. ie. the Model for the
properties is your code.
</p>
<p>
Consequently when someone requests a properties value,
or sets a property the callbacks you supply at bag
construction time are called, and the code therein must
supply the property. Similarly, when a property changes
value inside your object you need to notify the property
bag's listeners that it has changed with a call to
<code class="function">bonobo_event_source_notify_listeners_full</code>.
</p>
<p>
Here is a simple example use of the property bag:
</p>
<div class="example">
<a name="id2722762"></a><p class="title"><b>Example 3. PropertyBag Callbacks</b></p>
<pre class="programlisting">
enum {
PROP_RUNNING,
PROP_COLOUR
} MyArgs;
static void
get_prop (BonoboPropertyBag *bag,
BonoboArg *arg,
guint arg_id,
CORBA_Environment *ev,
gpointer user_data)
{
GtkObject *clock = user_data;
switch (arg_id) {
case PROP_RUNNING:
BONOBO_ARG_SET_BOOLEAN (arg, clock->is_running);
break;
case PROP_COLOUR:
BONOBO_ARG_SET_STRING (arg, clock->color);
break;
default:
bonobo_exception_set (ev, ex_Bonobo_PropertyBag_NotFound);
break;
}
}
static void
set_prop (BonoboPropertyBag *bag,
const BonoboArg *arg,
guint arg_id,
CORBA_Environment *ev,
gpointer user_data)
{
GtkClock *clock = user_data;
switch (arg_id) {
case PROP_RUNNING: {
guint i = BONOBO_ARG_GET_BOOLEAN (arg);
if (i)
gtk_clock_start (clock);
else
gtk_clock_stop (clock);
break;
}
case PROP_COLOUR:
gtk_clock_set_color (clock, BONOBO_ARG_GET_STRING (arg));
default:
bonobo_exception_set (ev, ex_Bonobo_PropertyBag_NotFound);
break;
}
}
</pre>
</div>
<p>
</p>
<p>
Then to instantiate the property bag interface and associate it with
a control perhaps we do:
</p>
<div class="example">
<a name="id2722797"></a><p class="title"><b>Example 4. Adding a PropertyBag to a control</b></p>
<pre class="programlisting">
BonoboPropertyBag *pb;
pb = bonobo_property_bag_new (get_prop, set_prop, clock);
bonobo_control_set_properties (control, pb);
bonobo_property_bag_add (pb, "running", PROP_RUNNING,
BONOBO_ARG_BOOLEAN, NULL,
_("Whether or not the clock is running"),
0);
bonobo_property_bag_add (pb, "colour", PROP_COLOUR,
BONOBO_ARG_STRING, NULL,
_("The colour of the clock face"),
0);
bonobo_object_unref (BONOBO_OBJECT (pb));
</pre>
</div>
<p>
And finally we need to notify listeners of changes in various properties
so we could perhaps do:
</p>
<div class="example">
<a name="id2722820"></a><p class="title"><b>Example 5. Notifying proterty bag listeners</b></p>
<pre class="programlisting">
static void
signal_handler (GtkClock *clock, BonoboPropertyBag *pb)
{
BonoboArg *arg = bonobo_arg_new (TC_string);
BONOBO_ARG_SET_STRING (arg, gtk_clock_get_color (clock));
bonobo_event_source_notify_listeners_full (pb->es,
"Bonobo/Property",
"change",
"colour",
arg, NULL);
bonobo_arg_release (arg);
}
...
gtk_signal_connect (GTK_OBJECT (clock), "color_changed",
GTK_SIGNAL_FUNC (signal_handler), pb);
</pre>
</div>
<p>
See also <a href="libbonobo-bonobo-arg.html#BonoboArg"><span class="type">BonoboArg</span></a>.
</p>
</div>
<div class="refsect1" lang="en">
<a name="id2722851"></a><h2>Details</h2>
<div class="refsect2" lang="en">
<a name="id2722861"></a><h3>
<a name="BonoboPropertyBagClass"></a>BonoboPropertyBagClass</h3>
<a class="indexterm" name="id2722874"></a><pre class="programlisting">typedef struct {
BonoboObjectClass parent;
POA_Bonobo_PropertyBag__epv epv;
} BonoboPropertyBagClass;
</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2722891"></a><h3>
<a name="BonoboPropertyBag"></a>BonoboPropertyBag</h3>
<a class="indexterm" name="id2722903"></a><pre class="programlisting">typedef struct {
BonoboObject parent;
BonoboPropertyBagPrivate *priv;
BonoboEventSource *es;
} BonoboPropertyBag;
</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2722920"></a><h3>
<a name="BONOBO-PROPERTY-READABLE:CAPS"></a>BONOBO_PROPERTY_READABLE</h3>
<a class="indexterm" name="id2722935"></a><pre class="programlisting">#define BONOBO_PROPERTY_READABLE Bonobo_PROPERTY_READABLE
</pre>
<p>
If this flag is set, the property allows consulting its value.
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2722952"></a><h3>
<a name="BONOBO-PROPERTY-WRITEABLE:CAPS"></a>BONOBO_PROPERTY_WRITEABLE</h3>
<a class="indexterm" name="id2722965"></a><pre class="programlisting">#define BONOBO_PROPERTY_WRITEABLE Bonobo_PROPERTY_WRITEABLE
</pre>
<p>
If this flag is set, the property supports modification of its value.
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2722982"></a><h3>
<a name="BONOBO-PROPERTY-WRITABLE:CAPS"></a>BONOBO_PROPERTY_WRITABLE</h3>
<a class="indexterm" name="id2722996"></a><pre class="programlisting">#define BONOBO_PROPERTY_WRITABLE Bonobo_PROPERTY_WRITEABLE
</pre>
<p>
Misspelling of <a href="libbonobo-bonobo-property-bag.html#BONOBO-PROPERTY-WRITEABLE:CAPS"><span class="type">BONOBO_PROPERTY_WRITEABLE</span></a>.
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2723021"></a><h3>
<a name="BONOBO-PROPERTY-NO-LISTENING:CAPS"></a>BONOBO_PROPERTY_NO_LISTENING</h3>
<a class="indexterm" name="id2723034"></a><pre class="programlisting">#define BONOBO_PROPERTY_NO_LISTENING Bonobo_PROPERTY_NO_LISTENING
</pre>
<p>
If this flag set, when the property changes its value its
listeners will *not* be notified.
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2723052"></a><h3>
<a name="BONOBO-PROPERTY-NO-AUTONOTIFY:CAPS"></a>BONOBO_PROPERTY_NO_AUTONOTIFY</h3>
<a class="indexterm" name="id2723065"></a><pre class="programlisting">#define BONOBO_PROPERTY_NO_AUTONOTIFY Bonobo_PROPERTY_NO_AUTONOTIFY
</pre>
<p>
If this flag set, when the property changes its value its
listeners will *not* be notified.
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2723083"></a><h3>
<a name="BonoboProperty"></a>BonoboProperty</h3>
<a class="indexterm" name="id2723096"></a><pre class="programlisting">typedef struct {
char *name;
int idx;
BonoboArgType type;
BonoboArg *default_value;
char *doctitle;
char *docstring;
Bonobo_PropertyFlags flags;
BonoboPropertyPrivate *priv;
} BonoboProperty;
</pre>
<p>
Structure that holds information about a property in a <a href="libbonobo-bonobo-property-bag.html#BonoboPropertyBag"><span class="type">BonoboPropertyBag</span></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term">char *<em class="structfield"><code>name</code></em>;</span></td>
<td>the canonic name of the property
</td>
</tr>
<tr>
<td>
<span class="term">int <em class="structfield"><code>idx</code></em>;</span></td>
<td>unique numeric identifier of the property within the property bag
</td>
</tr>
<tr>
<td>
<span class="term"><a href="libbonobo-bonobo-arg.html#BonoboArgType">BonoboArgType</a> <em class="structfield"><code>type</code></em>;</span></td>
<td>type of value contained by this property
</td>
</tr>
<tr>
<td>
<span class="term"><a href="libbonobo-bonobo-arg.html#BonoboArg">BonoboArg</a> *<em class="structfield"><code>default_value</code></em>;</span></td>
<td>the default value
</td>
</tr>
<tr>
<td>
<span class="term">char *<em class="structfield"><code>doctitle</code></em>;</span></td>
<td>documentation string title
</td>
</tr>
<tr>
<td>
<span class="term">char *<em class="structfield"><code>docstring</code></em>;</span></td>
<td>documentation string
</td>
</tr>
<tr>
<td>
<span class="term">Bonobo_PropertyFlags <em class="structfield"><code>flags</code></em>;</span></td>
<td>property flags (read/write, etc.)
</td>
</tr>
<tr>
<td>
<span class="term">BonoboPropertyPrivate *<em class="structfield"><code>priv</code></em>;</span></td>
<td>implementation private data
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2723296"></a><h3>
<a name="BonoboPropertyGetFn"></a>BonoboPropertyGetFn ()</h3>
<a class="indexterm" name="id2723310"></a><pre class="programlisting">void (*BonoboPropertyGetFn) (<a href="libbonobo-bonobo-property-bag.html#BonoboPropertyBag">BonoboPropertyBag</a> *bag,
<a href="libbonobo-bonobo-arg.html#BonoboArg">BonoboArg</a> *arg,
<a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"
>guint</a> arg_id,
CORBA_Environment *ev,
<a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
>gpointer</a> user_data);</pre>
<p>
Property getter function.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>bag</code></em> :</span></td>
<td>the property bag
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>arg</code></em> :</span></td>
<td>output parameter; the caller must place here the property value
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>arg_id</code></em> :</span></td>
<td>unique numeric identifier of the property within the property bag
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>ev</code></em> :</span></td>
<td>the relevant CORBA environment
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>user_data</code></em> :</span></td>
<td>user data
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2723444"></a><h3>
<a name="BonoboPropertySetFn"></a>BonoboPropertySetFn ()</h3>
<a class="indexterm" name="id2723458"></a><pre class="programlisting">void (*BonoboPropertySetFn) (<a href="libbonobo-bonobo-property-bag.html#BonoboPropertyBag">BonoboPropertyBag</a> *bag,
const <a href="libbonobo-bonobo-arg.html#BonoboArg">BonoboArg</a> *arg,
<a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"
>guint</a> arg_id,
CORBA_Environment *ev,
<a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
>gpointer</a> user_data);</pre>
<p>
Property setter function.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>bag</code></em> :</span></td>
<td>the property bag
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>arg</code></em> :</span></td>
<td>the new property value to be set
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>arg_id</code></em> :</span></td>
<td>unique numeric identifier of the property within the property bag
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>ev</code></em> :</span></td>
<td>the relevant CORBA environment
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>user_data</code></em> :</span></td>
<td>user data
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2723592"></a><h3>
<a name="bonobo-property-bag-new"></a>bonobo_property_bag_new ()</h3>
<a class="indexterm" name="id2723605"></a><pre class="programlisting"><a href="libbonobo-bonobo-property-bag.html#BonoboPropertyBag">BonoboPropertyBag</a>* bonobo_property_bag_new (<a href="libbonobo-bonobo-property-bag.html#BonoboPropertyGetFn">BonoboPropertyGetFn</a> get_prop_cb,
<a href="libbonobo-bonobo-property-bag.html#BonoboPropertySetFn">BonoboPropertySetFn</a> set_prop_cb,
<a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
>gpointer</a> user_data);</pre>
<p>
Creates a new property bag with the specified callbacks.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>get_prop_cb</code></em> :</span></td>
<td> the property get callback
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>set_prop_cb</code></em> :</span></td>
<td> the property set callback
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>user_data</code></em> :</span></td>
<td> user data for the callbacks
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> A new <a href="libbonobo-bonobo-property-bag.html#BonoboPropertyBag"><span class="type">BonoboPropertyBag</span></a> object.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2723720"></a><h3>
<a name="bonobo-property-bag-new-closure"></a>bonobo_property_bag_new_closure ()</h3>
<a class="indexterm" name="id2723734"></a><pre class="programlisting"><a href="libbonobo-bonobo-property-bag.html#BonoboPropertyBag">BonoboPropertyBag</a>* bonobo_property_bag_new_closure
(<a
href="/usr/share/gtk-doc/html/gobject/gobject-Closures.html#GClosure"
>GClosure</a> *get_prop,
<a
href="/usr/share/gtk-doc/html/gobject/gobject-Closures.html#GClosure"
>GClosure</a> *set_prop);</pre>
<p>
Creates a new property bag with the specified callbacks.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>get_prop</code></em> :</span></td>
<td> the property get closure
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>set_prop</code></em> :</span></td>
<td> the property set closure
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> A new <a href="libbonobo-bonobo-property-bag.html#BonoboPropertyBag"><span class="type">BonoboPropertyBag</span></a> object.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2723826"></a><h3>
<a name="bonobo-property-bag-new-full"></a>bonobo_property_bag_new_full ()</h3>
<a class="indexterm" name="id2723840"></a><pre class="programlisting"><a href="libbonobo-bonobo-property-bag.html#BonoboPropertyBag">BonoboPropertyBag</a>* bonobo_property_bag_new_full
(<a
href="/usr/share/gtk-doc/html/gobject/gobject-Closures.html#GClosure"
>GClosure</a> *get_prop,
<a
href="/usr/share/gtk-doc/html/gobject/gobject-Closures.html#GClosure"
>GClosure</a> *set_prop,
BonoboEventSource *es);</pre>
<p>
Creates a new property bag with the specified callbacks.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>get_prop</code></em> :</span></td>
<td> the property get closure
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>set_prop</code></em> :</span></td>
<td> the property set closure
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>es</code></em> :</span></td>
<td> an event source to aggregate
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> A new <a href="libbonobo-bonobo-property-bag.html#BonoboPropertyBag"><span class="type">BonoboPropertyBag</span></a> object.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2723954"></a><h3>
<a name="bonobo-property-bag-construct"></a>bonobo_property_bag_construct ()</h3>
<a class="indexterm" name="id2723968"></a><pre class="programlisting"><a href="libbonobo-bonobo-property-bag.html#BonoboPropertyBag">BonoboPropertyBag</a>* bonobo_property_bag_construct
(<a href="libbonobo-bonobo-property-bag.html#BonoboPropertyBag">BonoboPropertyBag</a> *pb,
<a
href="/usr/share/gtk-doc/html/gobject/gobject-Closures.html#GClosure"
>GClosure</a> *get_prop,
<a
href="/usr/share/gtk-doc/html/gobject/gobject-Closures.html#GClosure"
>GClosure</a> *set_prop,
BonoboEventSource *es);</pre>
<p>
Constructor, only for use in wrappers and object derivation, please
refer to the <a href="libbonobo-bonobo-property-bag.html#bonobo-property-bag-new"><span class="type">bonobo_property_bag_new</span></a> for normal use.
</p>
<p>
This function returns <em class="parameter"><code>pb</code></em>, or <a
href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"
><code class="literal">NULL</code></a> in case of error. If it returns <a
href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"
><code class="literal">NULL</code></a>,
the passed in <em class="parameter"><code>pb</code></em> is unrefed.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>pb</code></em> :</span></td>
<td> <a href="libbonobo-bonobo-property-bag.html#BonoboPropertyBag"><span class="type">BonoboPropertyBag</span></a> to construct
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>get_prop</code></em> :</span></td>
<td> the property get closure
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>set_prop</code></em> :</span></td>
<td> the property set closure
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>es</code></em> :</span></td>
<td> an event source to aggregate
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> <a href="libbonobo-bonobo-property-bag.html#BonoboPropertyBag"><span class="type">BonoboPropertyBag</span></a> pointer or <a
href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"
><code class="literal">NULL</code></a>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2724168"></a><h3>
<a name="bonobo-property-bag-add"></a>bonobo_property_bag_add ()</h3>
<a class="indexterm" name="id2724182"></a><pre class="programlisting">void bonobo_property_bag_add (<a href="libbonobo-bonobo-property-bag.html#BonoboPropertyBag">BonoboPropertyBag</a> *pb,
const char *name,
int idx,
<a href="libbonobo-bonobo-arg.html#BonoboArgType">BonoboArgType</a> type,
<a href="libbonobo-bonobo-arg.html#BonoboArg">BonoboArg</a> *default_value,
const char *doctitle,
Bonobo_PropertyFlags flags);</pre>
<p>
Adds a property to the property bag.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>pb</code></em> :</span></td>
<td> property bag to add to
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>name</code></em> :</span></td>
<td> name of new property
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>idx</code></em> :</span></td>
<td> integer index for fast callback switch statement
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>type</code></em> :</span></td>
<td> the CORBA type eg. TC_long
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>default_value</code></em> :</span></td>
<td> the default value or NULL
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>doctitle</code></em> :</span></td>
<td> the translated documentation string
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>flags</code></em> :</span></td>
<td> various flags
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2724364"></a><h3>
<a name="bonobo-property-bag-add-full"></a>bonobo_property_bag_add_full ()</h3>
<a class="indexterm" name="id2724377"></a><pre class="programlisting">void bonobo_property_bag_add_full (<a href="libbonobo-bonobo-property-bag.html#BonoboPropertyBag">BonoboPropertyBag</a> *pb,
const char *name,
int idx,
<a href="libbonobo-bonobo-arg.html#BonoboArgType">BonoboArgType</a> type,
<a href="libbonobo-bonobo-arg.html#BonoboArg">BonoboArg</a> *default_value,
const char *doctitle,
const char *docstring,
Bonobo_PropertyFlags flags,
<a
href="/usr/share/gtk-doc/html/gobject/gobject-Closures.html#GClosure"
>GClosure</a> *get_prop,
<a
href="/usr/share/gtk-doc/html/gobject/gobject-Closures.html#GClosure"
>GClosure</a> *set_prop);</pre>
<p>
This adds a property to <em class="parameter"><code>pb</code></em> at the full tilt of complexity.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>pb</code></em> :</span></td>
<td> property bag to add to
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>name</code></em> :</span></td>
<td> name of new property
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>idx</code></em> :</span></td>
<td> integer index for fast callback switch statement
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>type</code></em> :</span></td>
<td> the CORBA type eg. TC_long
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>default_value</code></em> :</span></td>
<td> the default value or NULL
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>doctitle</code></em> :</span></td>
<td> the translated documentation title
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>docstring</code></em> :</span></td>
<td> the translated documentation string
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>flags</code></em> :</span></td>
<td> various flags
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>get_prop</code></em> :</span></td>
<td> a per property get callback
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>set_prop</code></em> :</span></td>
<td> a per property set callback
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2724632"></a><h3>
<a name="bonobo-property-bag-remove"></a>bonobo_property_bag_remove ()</h3>
<a class="indexterm" name="id2724645"></a><pre class="programlisting">void bonobo_property_bag_remove (<a href="libbonobo-bonobo-property-bag.html#BonoboPropertyBag">BonoboPropertyBag</a> *pb,
const char *name);</pre>
<p>
removes the property with <em class="parameter"><code>name</code></em> from <em class="parameter"><code>b</code></em>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>pb</code></em> :</span></td>
<td> the property bag
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>name</code></em> :</span></td>
<td> name of property to remove.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2724729"></a><h3>
<a name="bonobo-property-bag-map-params"></a>bonobo_property_bag_map_params ()</h3>
<a class="indexterm" name="id2724742"></a><pre class="programlisting">void bonobo_property_bag_map_params (<a href="libbonobo-bonobo-property-bag.html#BonoboPropertyBag">BonoboPropertyBag</a> *pb,
<a
href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GObject"
>GObject</a> *on_instance,
const <a
href="/usr/share/gtk-doc/html/gobject/gobject-GParamSpec.html#GParamSpec"
>GParamSpec</a> **pspecs,
<a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"
>guint</a> n_params);</pre>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>pb</code></em> :</span></td>
<td>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>on_instance</code></em> :</span></td>
<td>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>pspecs</code></em> :</span></td>
<td>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>n_params</code></em> :</span></td>
<td>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2724852"></a><h3>
<a name="bonobo-property-bag-get-prop-list"></a>bonobo_property_bag_get_prop_list ()</h3>
<a class="indexterm" name="id2724866"></a><pre class="programlisting"><a
href="/usr/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html#GList"
>GList</a>* bonobo_property_bag_get_prop_list
(<a href="libbonobo-bonobo-property-bag.html#BonoboPropertyBag">BonoboPropertyBag</a> *pb);</pre>
<p>
</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>pb</code></em> :</span></td>
<td> A <a href="libbonobo-bonobo-property-bag.html#BonoboPropertyBag"><span class="type">BonoboPropertyBag</span></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td>a <a
href="/usr/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html#GList"
><span class="type">GList</span></a> of <a href="libbonobo-bonobo-property-bag.html#BonoboProperty"><span class="type">BonoboProperty</span></a> structures. This function is
private and should only be used internally, or in a PropertyBag
persistence implementation. You should not touch the
<a href="libbonobo-bonobo-property-bag.html#BonoboProperty"><span class="type">BonoboProperty</span></a> structure unless you know what you're doing.
</td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
</body>
</html>