193
193
<td class="function_type">
194
<a href="../glib/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>
194
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>
196
196
<td class="function_name">
197
197
<a class="link" href="gobject-The-Base-Object-Type.html#g-object-new" title="g_object_new ()">g_object_new</a> <span class="c_punctuation">()</span>
201
201
<td class="function_type">
202
<a href="../glib/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>
202
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>
204
204
<td class="function_name">
205
205
<a class="link" href="gobject-The-Base-Object-Type.html#g-object-newv" title="g_object_newv ()">g_object_newv</a> <span class="c_punctuation">()</span>
209
209
<td class="function_type">
210
<a href="../glib/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>
210
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>
212
212
<td class="function_name">
213
213
<a class="link" href="gobject-The-Base-Object-Type.html#g-object-ref" title="g_object_ref ()">g_object_ref</a> <span class="c_punctuation">()</span>
225
225
<td class="function_type">
226
<a href="../glib/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>
226
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>
228
228
<td class="function_name">
229
229
<a class="link" href="gobject-The-Base-Object-Type.html#g-object-ref-sink" title="g_object_ref_sink ()">g_object_ref_sink</a> <span class="c_punctuation">()</span>
241
241
<td class="function_type">
242
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
242
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
244
244
<td class="function_name">
245
245
<a class="link" href="gobject-The-Base-Object-Type.html#g-object-is-floating" title="g_object_is_floating ()">g_object_is_floating</a> <span class="c_punctuation">()</span>
321
321
<td class="function_type">
322
<a href="../glib/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>
322
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>
324
324
<td class="function_name">
325
325
<a class="link" href="gobject-The-Base-Object-Type.html#g-object-connect" title="g_object_connect ()">g_object_connect</a> <span class="c_punctuation">()</span>
385
385
<td class="function_type">
386
<a href="../glib/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>
386
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>
388
388
<td class="function_name">
389
389
<a class="link" href="gobject-The-Base-Object-Type.html#g-object-get-data" title="g_object_get_data ()">g_object_get_data</a> <span class="c_punctuation">()</span>
409
409
<td class="function_type">
410
<a href="../glib/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>
410
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>
412
412
<td class="function_name">
413
413
<a class="link" href="gobject-The-Base-Object-Type.html#g-object-steal-data" title="g_object_steal_data ()">g_object_steal_data</a> <span class="c_punctuation">()</span>
417
417
<td class="function_type">
418
<a href="../glib/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>
418
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>
420
420
<td class="function_name">
421
421
<a class="link" href="gobject-The-Base-Object-Type.html#g-object-dup-data" title="g_object_dup_data ()">g_object_dup_data</a> <span class="c_punctuation">()</span>
425
425
<td class="function_type">
426
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
426
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
428
428
<td class="function_name">
429
429
<a class="link" href="gobject-The-Base-Object-Type.html#g-object-replace-data" title="g_object_replace_data ()">g_object_replace_data</a> <span class="c_punctuation">()</span>
433
433
<td class="function_type">
434
<a href="../glib/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>
434
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>
436
436
<td class="function_name">
437
437
<a class="link" href="gobject-The-Base-Object-Type.html#g-object-get-qdata" title="g_object_get_qdata ()">g_object_get_qdata</a> <span class="c_punctuation">()</span>
457
457
<td class="function_type">
458
<a href="../glib/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>
458
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>
460
460
<td class="function_name">
461
461
<a class="link" href="gobject-The-Base-Object-Type.html#g-object-steal-qdata" title="g_object_steal_qdata ()">g_object_steal_qdata</a> <span class="c_punctuation">()</span>
465
465
<td class="function_type">
466
<a href="../glib/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>
466
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>
468
468
<td class="function_name">
469
469
<a class="link" href="gobject-The-Base-Object-Type.html#g-object-dup-qdata" title="g_object_dup_qdata ()">g_object_dup_qdata</a> <span class="c_punctuation">()</span>
473
473
<td class="function_type">
474
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
474
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
476
476
<td class="function_name">
477
477
<a class="link" href="gobject-The-Base-Object-Type.html#g-object-replace-qdata" title="g_object_replace_qdata ()">g_object_replace_qdata</a> <span class="c_punctuation">()</span>
559
559
<td class="function_type">
560
<a href="../glib/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>
560
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>
562
562
<td class="function_name">
563
563
<a class="link" href="gobject-The-Base-Object-Type.html#g-weak-ref-get" title="g_weak_ref_get ()">g_weak_ref_get</a> <span class="c_punctuation">()</span>
707
707
maintenance (such as smart pointers or garbage collection) should not
708
708
expose floating references in their API.</p>
709
709
<p>Some object implementations may need to save an objects floating state
710
across certain code portions (an example is <span class="type">GtkMenu</span>), to achieve this,
710
across certain code portions (an example is <a href="http://developer.gnome.org/gtk2/GtkMenu.html"><span class="type">GtkMenu</span></a>), to achieve this,
711
711
the following sequence can be used:</p>
712
712
<div class="informalexample">
713
713
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
751
751
<a name="GObjectGetPropertyFunc"></a><h3>GObjectGetPropertyFunc ()</h3>
752
752
<pre class="programlisting"><span class="returnvalue">void</span>
753
753
<span class="c_punctuation">(</span>*GObjectGetPropertyFunc<span class="c_punctuation">)</span> (<em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> *object</code></em>,
754
<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> property_id</code></em>,
754
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> property_id</code></em>,
755
755
<em class="parameter"><code><a class="link" href="gobject-Generic-values.html#GValue" title="GValue"><span class="type">GValue</span></a> *value</code></em>,
756
756
<em class="parameter"><code><a class="link" href="gobject-GParamSpec.html#GParamSpec" title="struct GParamSpec"><span class="type">GParamSpec</span></a> *pspec</code></em>);</pre>
757
757
<p>The type of the <em class="parameter"><code>get_property</code></em>
795
795
<a name="GObjectSetPropertyFunc"></a><h3>GObjectSetPropertyFunc ()</h3>
796
796
<pre class="programlisting"><span class="returnvalue">void</span>
797
797
<span class="c_punctuation">(</span>*GObjectSetPropertyFunc<span class="c_punctuation">)</span> (<em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> *object</code></em>,
798
<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> property_id</code></em>,
798
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> property_id</code></em>,
799
799
<em class="parameter"><code>const <a class="link" href="gobject-Generic-values.html#GValue" title="GValue"><span class="type">GValue</span></a> *value</code></em>,
800
800
<em class="parameter"><code><a class="link" href="gobject-GParamSpec.html#GParamSpec" title="struct GParamSpec"><span class="type">GParamSpec</span></a> *pspec</code></em>);</pre>
801
801
<p>The type of the <em class="parameter"><code>set_property</code></em>
881
881
<div class="refsect3">
882
882
<a name="id-1.4.5.10.5.6"></a><h4>Returns</h4>
883
<p> <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> or <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>, indicating whether <em class="parameter"><code>type</code></em>
883
<p> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>, indicating whether <em class="parameter"><code>type</code></em>
884
884
is a <a class="link" href="gobject-Type-Information.html#G-TYPE-OBJECT:CAPS" title="G_TYPE_OBJECT"><code class="literal">G_TYPE_OBJECT</code></a>.</p>
1123
1123
<a name="g-object-class-install-property"></a><h3>g_object_class_install_property ()</h3>
1124
1124
<pre class="programlisting"><span class="returnvalue">void</span>
1125
1125
g_object_class_install_property (<em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GObjectClass" title="struct GObjectClass"><span class="type">GObjectClass</span></a> *oclass</code></em>,
1126
<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> property_id</code></em>,
1126
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> property_id</code></em>,
1127
1127
<em class="parameter"><code><a class="link" href="gobject-GParamSpec.html#GParamSpec" title="struct GParamSpec"><span class="type">GParamSpec</span></a> *pspec</code></em>);</pre>
1128
1128
<p>Installs a new property. This is usually done in the class initializer.</p>
1129
1129
<p>Note that it is possible to redefine a property in a derived class,
1162
1162
<a name="g-object-class-install-properties"></a><h3>g_object_class_install_properties ()</h3>
1163
1163
<pre class="programlisting"><span class="returnvalue">void</span>
1164
1164
g_object_class_install_properties (<em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GObjectClass" title="struct GObjectClass"><span class="type">GObjectClass</span></a> *oclass</code></em>,
1165
<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> n_pspecs</code></em>,
1165
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> n_pspecs</code></em>,
1166
1166
<em class="parameter"><code><a class="link" href="gobject-GParamSpec.html#GParamSpec" title="struct GParamSpec"><span class="type">GParamSpec</span></a> **pspecs</code></em>);</pre>
1167
1167
<p>Installs new properties from an array of <a href="gobject-GParamSpec.html#GParamSpec"><span class="type">GParamSpecs</span></a>. This is
1168
1168
usually done in the class initializer.</p>
1304
1304
<a name="g-object-class-find-property"></a><h3>g_object_class_find_property ()</h3>
1305
1305
<pre class="programlisting"><a class="link" href="gobject-GParamSpec.html#GParamSpec" title="struct GParamSpec"><span class="returnvalue">GParamSpec</span></a> *
1306
1306
g_object_class_find_property (<em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GObjectClass" title="struct GObjectClass"><span class="type">GObjectClass</span></a> *oclass</code></em>,
1307
<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *property_name</code></em>);</pre>
1307
<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *property_name</code></em>);</pre>
1308
1308
<p>Looks up the <a class="link" href="gobject-GParamSpec.html#GParamSpec" title="struct GParamSpec"><span class="type">GParamSpec</span></a> for a property of a class.</p>
1309
1309
<div class="refsect3">
1310
1310
<a name="id-1.4.5.10.17.5"></a><h4>Parameters</h4>
1331
1331
<div class="refsect3">
1332
1332
<a name="id-1.4.5.10.17.6"></a><h4>Returns</h4>
1333
1333
<p> the <a class="link" href="gobject-GParamSpec.html#GParamSpec" title="struct GParamSpec"><span class="type">GParamSpec</span></a> for the property, or
1334
<a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the class doesn't have a property of that name. </p>
1334
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the class doesn't have a property of that name. </p>
1335
1335
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
1340
1340
<a name="g-object-class-list-properties"></a><h3>g_object_class_list_properties ()</h3>
1341
1341
<pre class="programlisting"><a class="link" href="gobject-GParamSpec.html#GParamSpec" title="struct GParamSpec"><span class="returnvalue">GParamSpec</span></a> **
1342
1342
g_object_class_list_properties (<em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GObjectClass" title="struct GObjectClass"><span class="type">GObjectClass</span></a> *oclass</code></em>,
1343
<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> *n_properties</code></em>);</pre>
1343
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> *n_properties</code></em>);</pre>
1344
1344
<p>Get an array of <a class="link" href="gobject-GParamSpec.html#GParamSpec" title="struct GParamSpec"><span class="type">GParamSpec</span></a>* for all properties of a class.</p>
1345
1345
<div class="refsect3">
1346
1346
<a name="id-1.4.5.10.18.5"></a><h4>Parameters</h4>
1376
1376
<a name="g-object-class-override-property"></a><h3>g_object_class_override_property ()</h3>
1377
1377
<pre class="programlisting"><span class="returnvalue">void</span>
1378
1378
g_object_class_override_property (<em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GObjectClass" title="struct GObjectClass"><span class="type">GObjectClass</span></a> *oclass</code></em>,
1379
<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> property_id</code></em>,
1380
<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>);</pre>
1379
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> property_id</code></em>,
1380
<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>);</pre>
1381
1381
<p>Registers <em class="parameter"><code>property_id</code></em>
1382
1382
as referring to a property with the name
1383
1383
<em class="parameter"><code>name</code></em>
1433
1433
<div class="refsect2">
1434
1434
<a name="g-object-interface-install-property"></a><h3>g_object_interface_install_property ()</h3>
1435
1435
<pre class="programlisting"><span class="returnvalue">void</span>
1436
g_object_interface_install_property (<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> g_iface</code></em>,
1436
g_object_interface_install_property (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> g_iface</code></em>,
1437
1437
<em class="parameter"><code><a class="link" href="gobject-GParamSpec.html#GParamSpec" title="struct GParamSpec"><span class="type">GParamSpec</span></a> *pspec</code></em>);</pre>
1438
1438
<p>Add a property to an interface; this is only useful for interfaces
1439
1439
that are added to GObject-derived types. Adding a property to an
1479
1479
<div class="refsect2">
1480
1480
<a name="g-object-interface-find-property"></a><h3>g_object_interface_find_property ()</h3>
1481
1481
<pre class="programlisting"><a class="link" href="gobject-GParamSpec.html#GParamSpec" title="struct GParamSpec"><span class="returnvalue">GParamSpec</span></a> *
1482
g_object_interface_find_property (<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> g_iface</code></em>,
1483
<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *property_name</code></em>);</pre>
1482
g_object_interface_find_property (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> g_iface</code></em>,
1483
<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *property_name</code></em>);</pre>
1484
1484
<p>Find the <a class="link" href="gobject-GParamSpec.html#GParamSpec" title="struct GParamSpec"><span class="type">GParamSpec</span></a> with the given name for an
1485
1485
interface. Generally, the interface vtable passed in as <em class="parameter"><code>g_iface</code></em>
1514
1514
<a name="id-1.4.5.10.21.6"></a><h4>Returns</h4>
1515
1515
<p> the <a class="link" href="gobject-GParamSpec.html#GParamSpec" title="struct GParamSpec"><span class="type">GParamSpec</span></a> for the property of the
1516
1516
interface with the name <em class="parameter"><code>property_name</code></em>
1517
, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if no
1517
, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if no
1518
1518
such property exists. </p>
1519
1519
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
1524
1524
<div class="refsect2">
1525
1525
<a name="g-object-interface-list-properties"></a><h3>g_object_interface_list_properties ()</h3>
1526
1526
<pre class="programlisting"><a class="link" href="gobject-GParamSpec.html#GParamSpec" title="struct GParamSpec"><span class="returnvalue">GParamSpec</span></a> **
1527
g_object_interface_list_properties (<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> g_iface</code></em>,
1528
<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> *n_properties_p</code></em>);</pre>
1527
g_object_interface_list_properties (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> g_iface</code></em>,
1528
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> *n_properties_p</code></em>);</pre>
1529
1529
<p>Lists the properties of an interface.Generally, the interface
1530
1530
vtable passed in as <em class="parameter"><code>g_iface</code></em>
1531
1531
will be the default vtable from
1560
1560
pointer to an array of pointers to <a class="link" href="gobject-GParamSpec.html#GParamSpec" title="struct GParamSpec"><span class="type">GParamSpec</span></a>
1561
1561
structures. The paramspecs are owned by GLib, but the
1562
array should be freed with <a href="../glib/glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a> when you are done with
1562
array should be freed with <a href="http://library.gnome.org/devel/glib/unstable/glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a> when you are done with
1564
1564
<p><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=n_properties_p][<acronym title="Free data container after the code is done."><span class="acronym">transfer container</span></acronym>]</span></p>
1569
1569
<div class="refsect2">
1570
1570
<a name="g-object-new"></a><h3>g_object_new ()</h3>
1571
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>
1571
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>
1572
1572
g_object_new (<em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> object_type</code></em>,
1573
<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *first_property_name</code></em>,
1573
<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *first_property_name</code></em>,
1574
1574
<em class="parameter"><code>...</code></em>);</pre>
1575
1575
<p>Creates a new instance of a <a class="link" href="gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> subtype and sets its properties.</p>
1576
1576
<p>Construction parameters (see <a class="link" href="gobject-GParamSpec.html#G-PARAM-CONSTRUCT:CAPS"><span class="type">G_PARAM_CONSTRUCT</span></a>, <a class="link" href="gobject-GParamSpec.html#G-PARAM-CONSTRUCT-ONLY:CAPS"><span class="type">G_PARAM_CONSTRUCT_ONLY</span></a>)
1598
1598
<td class="parameter_name"><p>...</p></td>
1599
1599
<td class="parameter_description"><p>the value of the first property, followed optionally by more
1600
name/value pairs, followed by <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
1600
name/value pairs, followed by <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
1601
1601
<td class="parameter_annotations"> </td>
1614
1614
<div class="refsect2">
1615
1615
<a name="g-object-newv"></a><h3>g_object_newv ()</h3>
1616
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>
1616
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>
1617
1617
g_object_newv (<em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> object_type</code></em>,
1618
<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> n_parameters</code></em>,
1618
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> n_parameters</code></em>,
1619
1619
<em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GParameter" title="struct GParameter"><span class="type">GParameter</span></a> *parameters</code></em>);</pre>
1620
1620
<p>Creates a new instance of a <a class="link" href="gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> subtype and sets its properties.</p>
1621
1621
<p>Construction parameters (see <a class="link" href="gobject-GParamSpec.html#G-PARAM-CONSTRUCT:CAPS"><span class="type">G_PARAM_CONSTRUCT</span></a>, <a class="link" href="gobject-GParamSpec.html#G-PARAM-CONSTRUCT-ONLY:CAPS"><span class="type">G_PARAM_CONSTRUCT_ONLY</span></a>)
1661
1661
<div class="refsect2">
1662
1662
<a name="g-object-ref"></a><h3>g_object_ref ()</h3>
1663
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>
1664
g_object_ref (<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> object</code></em>);</pre>
1663
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>
1664
g_object_ref (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> object</code></em>);</pre>
1665
1665
<p>Increases the reference count of <em class="parameter"><code>object</code></em>
1667
1667
<div class="refsect3">
1690
1690
<div class="refsect2">
1691
1691
<a name="g-object-unref"></a><h3>g_object_unref ()</h3>
1692
1692
<pre class="programlisting"><span class="returnvalue">void</span>
1693
g_object_unref (<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> object</code></em>);</pre>
1693
g_object_unref (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> object</code></em>);</pre>
1694
1694
<p>Decreases the reference count of <em class="parameter"><code>object</code></em>
1695
1695
. When its reference count
1696
1696
drops to 0, the object is finalized (i.e. its memory is freed).</p>
1714
1714
<div class="refsect2">
1715
1715
<a name="g-object-ref-sink"></a><h3>g_object_ref_sink ()</h3>
1716
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>
1717
g_object_ref_sink (<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> object</code></em>);</pre>
1716
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>
1717
g_object_ref_sink (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> object</code></em>);</pre>
1718
1718
<p>Increase the reference count of <em class="parameter"><code>object</code></em>
1719
1719
, and possibly remove the
1720
1720
<a class="link" href="gobject-The-Base-Object-Type.html#floating-ref" title="Floating references">floating</a> reference, if <em class="parameter"><code>object</code></em>
1754
1754
g_clear_object (<em class="parameter"><code>volatile <a class="link" href="gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> **object_ptr</code></em>);</pre>
1755
1755
<p>Clears a reference to a <a class="link" href="gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a>.</p>
1756
1756
<p><em class="parameter"><code>object_ptr</code></em>
1757
must not be <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</p>
1758
<p>If the reference is <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> then this function does nothing.
1757
must not be <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</p>
1758
<p>If the reference is <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> then this function does nothing.
1759
1759
Otherwise, the reference count of the object is decreased and the
1760
pointer is set to <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</p>
1760
pointer is set to <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</p>
1761
1761
<p>This function is threadsafe and modifies the pointer atomically,
1762
1762
using memory barriers where needed.</p>
1763
1763
<p>A macro is also included that allows this function to be used without
1783
1783
<div class="refsect2">
1784
1784
<a name="g-object-is-floating"></a><h3>g_object_is_floating ()</h3>
1785
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
1786
g_object_is_floating (<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> object</code></em>);</pre>
1785
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
1786
g_object_is_floating (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> object</code></em>);</pre>
1787
1787
<p>Checks whether <em class="parameter"><code>object</code></em>
1788
1788
has a <a class="link" href="gobject-The-Base-Object-Type.html#floating-ref" title="Floating references">floating</a> reference.</p>
1789
1789
<div class="refsect3">
1804
1804
<div class="refsect3">
1805
1805
<a name="id-1.4.5.10.29.6"></a><h4>Returns</h4>
1806
<p> <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>object</code></em>
1806
<p> <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>object</code></em>
1807
1807
has a floating reference</p>
1839
1839
<div class="refsect2">
1840
1840
<a name="GWeakNotify"></a><h3>GWeakNotify ()</h3>
1841
1841
<pre class="programlisting"><span class="returnvalue">void</span>
1842
<span class="c_punctuation">(</span>*GWeakNotify<span class="c_punctuation">)</span> (<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>,
1842
<span class="c_punctuation">(</span>*GWeakNotify<span class="c_punctuation">)</span> (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>,
1843
1843
<em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> *where_the_object_was</code></em>);</pre>
1844
1844
<p>A <a class="link" href="gobject-The-Base-Object-Type.html#GWeakNotify" title="GWeakNotify ()"><span class="type">GWeakNotify</span></a> function can be added to an object as a callback that gets
1845
1845
triggered when the object is finalized. Since the object is already being
1874
1874
<pre class="programlisting"><span class="returnvalue">void</span>
1875
1875
g_object_weak_ref (<em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> *object</code></em>,
1876
1876
<em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GWeakNotify" title="GWeakNotify ()"><span class="type">GWeakNotify</span></a> notify</code></em>,
1877
<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>);</pre>
1877
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>);</pre>
1878
1878
<p>Adds a weak reference callback to an object. Weak references are
1879
1879
used for notification when an object is finalized. They are called
1880
1880
"weak references" because they allow you to safely hold a pointer
1918
1918
<pre class="programlisting"><span class="returnvalue">void</span>
1919
1919
g_object_weak_unref (<em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> *object</code></em>,
1920
1920
<em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GWeakNotify" title="GWeakNotify ()"><span class="type">GWeakNotify</span></a> notify</code></em>,
1921
<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>);</pre>
1921
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>);</pre>
1922
1922
<p>Removes a weak reference callback to an object.</p>
1923
1923
<div class="refsect3">
1924
1924
<a name="id-1.4.5.10.33.5"></a><h4>Parameters</h4>
1953
1953
<a name="g-object-add-weak-pointer"></a><h3>g_object_add_weak_pointer ()</h3>
1954
1954
<pre class="programlisting"><span class="returnvalue">void</span>
1955
1955
g_object_add_weak_pointer (<em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> *object</code></em>,
1956
<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> *weak_pointer_location</code></em>);</pre>
1956
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> *weak_pointer_location</code></em>);</pre>
1957
1957
<p>Adds a weak reference from weak_pointer to <em class="parameter"><code>object</code></em>
1958
1958
to indicate that
1959
1959
the pointer located at <em class="parameter"><code>weak_pointer_location</code></em>
1962
1962
. When the <em class="parameter"><code>object</code></em>
1964
1964
<em class="parameter"><code>weak_pointer</code></em>
1965
will be set to <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</p>
1965
will be set to <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</p>
1966
1966
<p>Note that as with <a class="link" href="gobject-The-Base-Object-Type.html#g-object-weak-ref" title="g_object_weak_ref ()"><code class="function">g_object_weak_ref()</code></a>, the weak references created by
1967
1967
this method are not thread-safe: they cannot safely be used in one
1968
1968
thread if the object's last <a class="link" href="gobject-The-Base-Object-Type.html#g-object-unref" title="g_object_unref ()"><code class="function">g_object_unref()</code></a> might happen in another
1995
1995
<a name="g-object-remove-weak-pointer"></a><h3>g_object_remove_weak_pointer ()</h3>
1996
1996
<pre class="programlisting"><span class="returnvalue">void</span>
1997
1997
g_object_remove_weak_pointer (<em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> *object</code></em>,
1998
<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> *weak_pointer_location</code></em>);</pre>
1998
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> *weak_pointer_location</code></em>);</pre>
1999
1999
<p>Removes a weak reference from <em class="parameter"><code>object</code></em>
2000
2000
that was previously added
2001
2001
using <a class="link" href="gobject-The-Base-Object-Type.html#g-object-add-weak-pointer" title="g_object_add_weak_pointer ()"><code class="function">g_object_add_weak_pointer()</code></a>. The <em class="parameter"><code>weak_pointer_location</code></em>
2028
2028
<div class="refsect2">
2029
2029
<a name="GToggleNotify"></a><h3>GToggleNotify ()</h3>
2030
2030
<pre class="programlisting"><span class="returnvalue">void</span>
2031
<span class="c_punctuation">(</span>*GToggleNotify<span class="c_punctuation">)</span> (<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>,
2031
<span class="c_punctuation">(</span>*GToggleNotify<span class="c_punctuation">)</span> (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>,
2032
2032
<em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> *object</code></em>,
2033
<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> is_last_ref</code></em>);</pre>
2033
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> is_last_ref</code></em>);</pre>
2034
2034
<p>A callback function used for notification when the state
2035
2035
of a toggle reference changes. See <a class="link" href="gobject-The-Base-Object-Type.html#g-object-add-toggle-ref" title="g_object_add_toggle_ref ()"><code class="function">g_object_add_toggle_ref()</code></a>.</p>
2036
2036
<div class="refsect3">
2056
2056
<td class="parameter_name"><p>is_last_ref</p></td>
2057
<td class="parameter_description"><p><a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the toggle reference is now the
2058
last reference to the object. <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if the toggle
2057
<td class="parameter_description"><p><a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the toggle reference is now the
2058
last reference to the object. <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if the toggle
2059
2059
reference was the last reference and there are now other
2060
2060
references.</p></td>
2061
2061
<td class="parameter_annotations"> </td>
2070
2070
<pre class="programlisting"><span class="returnvalue">void</span>
2071
2071
g_object_add_toggle_ref (<em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> *object</code></em>,
2072
2072
<em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GToggleNotify" title="GToggleNotify ()"><span class="type">GToggleNotify</span></a> notify</code></em>,
2073
<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>);</pre>
2073
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>);</pre>
2074
2074
<p>Increases the reference count of the object by one and sets a
2075
2075
callback to be called when all other references to the object are
2076
2076
dropped, or when this is already the last reference to the object
2141
2141
<pre class="programlisting"><span class="returnvalue">void</span>
2142
2142
g_object_remove_toggle_ref (<em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> *object</code></em>,
2143
2143
<em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GToggleNotify" title="GToggleNotify ()"><span class="type">GToggleNotify</span></a> notify</code></em>,
2144
<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>);</pre>
2144
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>);</pre>
2145
2145
<p>Removes a reference added with <a class="link" href="gobject-The-Base-Object-Type.html#g-object-add-toggle-ref" title="g_object_add_toggle_ref ()"><code class="function">g_object_add_toggle_ref()</code></a>. The
2146
2146
reference count of the object is decreased by one.</p>
2147
2147
<div class="refsect3">
2180
2180
<div class="refsect2">
2181
2181
<a name="g-object-connect"></a><h3>g_object_connect ()</h3>
2182
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>
2183
g_object_connect (<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> object</code></em>,
2184
<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *signal_spec</code></em>,
2182
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>
2183
g_object_connect (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> object</code></em>,
2184
<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *signal_spec</code></em>,
2185
2185
<em class="parameter"><code>...</code></em>);</pre>
2186
2186
<p>A convenience function to connect multiple signals at once.</p>
2187
2187
<p>The signal specs expected by this function have the form
2245
2245
<td class="parameter_name"><p>...</p></td>
2246
2246
<td class="parameter_description"><p><a class="link" href="gobject-Closures.html#GCallback" title="GCallback ()"><span class="type">GCallback</span></a> for the first signal, followed by data for the
2247
2247
first signal, followed optionally by more signal
2248
spec/callback/data triples, followed by <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
2248
spec/callback/data triples, followed by <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
2249
2249
<td class="parameter_annotations"> </td>
2262
2262
<div class="refsect2">
2263
2263
<a name="g-object-disconnect"></a><h3>g_object_disconnect ()</h3>
2264
2264
<pre class="programlisting"><span class="returnvalue">void</span>
2265
g_object_disconnect (<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> object</code></em>,
2266
<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *signal_spec</code></em>,
2265
g_object_disconnect (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> object</code></em>,
2266
<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *signal_spec</code></em>,
2267
2267
<em class="parameter"><code>...</code></em>);</pre>
2268
2268
<p>A convenience function to disconnect multiple signals at once.</p>
2269
2269
<p>The signal specs expected by this function have the form
2293
2293
<td class="parameter_name"><p>...</p></td>
2294
2294
<td class="parameter_description"><p><a class="link" href="gobject-Closures.html#GCallback" title="GCallback ()"><span class="type">GCallback</span></a> for the first signal, followed by data for the first signal,
2295
2295
followed optionally by more signal spec/callback/data triples,
2296
followed by <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
2296
followed by <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
2297
2297
<td class="parameter_annotations"> </td>
2304
2304
<div class="refsect2">
2305
2305
<a name="g-object-set"></a><h3>g_object_set ()</h3>
2306
2306
<pre class="programlisting"><span class="returnvalue">void</span>
2307
g_object_set (<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> object</code></em>,
2308
<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *first_property_name</code></em>,
2307
g_object_set (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> object</code></em>,
2308
<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *first_property_name</code></em>,
2309
2309
<em class="parameter"><code>...</code></em>);</pre>
2310
2310
<p>Sets properties on an object.</p>
2311
2311
<p>Note that the "notify" signals are queued and only emitted (in
2334
2334
<td class="parameter_name"><p>...</p></td>
2335
2335
<td class="parameter_description"><p>value for the first property, followed optionally by more
2336
name/value pairs, followed by <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
2336
name/value pairs, followed by <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
2337
2337
<td class="parameter_annotations"> </td>
2344
2344
<div class="refsect2">
2345
2345
<a name="g-object-get"></a><h3>g_object_get ()</h3>
2346
2346
<pre class="programlisting"><span class="returnvalue">void</span>
2347
g_object_get (<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> object</code></em>,
2348
<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *first_property_name</code></em>,
2347
g_object_get (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> object</code></em>,
2348
<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *first_property_name</code></em>,
2349
2349
<em class="parameter"><code>...</code></em>);</pre>
2350
2350
<p>Gets properties of an object.</p>
2351
2351
<p>In general, a copy is made of the property contents and the caller
2352
2352
is responsible for freeing the memory in the appropriate manner for
2353
the type, for instance by calling <a href="../glib/glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a> or <a class="link" href="gobject-The-Base-Object-Type.html#g-object-unref" title="g_object_unref ()"><code class="function">g_object_unref()</code></a>.</p>
2353
the type, for instance by calling <a href="http://library.gnome.org/devel/glib/unstable/glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a> or <a class="link" href="gobject-The-Base-Object-Type.html#g-object-unref" title="g_object_unref ()"><code class="function">g_object_unref()</code></a>.</p>
2354
2354
<p>Here is an example of using <a class="link" href="gobject-The-Base-Object-Type.html#g-object-get" title="g_object_get ()"><code class="function">g_object_get()</code></a> to get the contents
2355
2355
of three properties: an integer, a string and an object:</p>
2356
2356
<div class="informalexample">
2384
2384
<span class="gtkdoc slc">// Do something with intval, strval, objval</span>
2386
<span class="function"><a href="../glib/glib-Memory-Allocation.html#g-free">g_free</a></span> <span class="gtkdoc opt">(</span>strval<span class="gtkdoc opt">);</span>
2386
<span class="function"><a href="http://library.gnome.org/devel/glib/unstable/glib-Memory-Allocation.html#g-free">g_free</a></span> <span class="gtkdoc opt">(</span>strval<span class="gtkdoc opt">);</span>
2387
2387
<span class="function"><a href="gobject-The-Base-Object-Type.html#g-object-unref">g_object_unref</a></span> <span class="gtkdoc opt">(</span>objval<span class="gtkdoc opt">);</span></pre></td>
2414
2414
<td class="parameter_name"><p>...</p></td>
2415
2415
<td class="parameter_description"><p>return location for the first property, followed optionally by more
2416
name/return location pairs, followed by <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
2416
name/return location pairs, followed by <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
2417
2417
<td class="parameter_annotations"> </td>
2425
2425
<a name="g-object-notify"></a><h3>g_object_notify ()</h3>
2426
2426
<pre class="programlisting"><span class="returnvalue">void</span>
2427
2427
g_object_notify (<em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> *object</code></em>,
2428
<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *property_name</code></em>);</pre>
2428
<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *property_name</code></em>);</pre>
2429
2429
<p>Emits a "notify" signal for the property <em class="parameter"><code>property_name</code></em>
2430
2430
on <em class="parameter"><code>object</code></em>
2627
2627
<div class="refsect2">
2628
2628
<a name="g-object-get-data"></a><h3>g_object_get_data ()</h3>
2629
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>
2629
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>
2630
2630
g_object_get_data (<em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> *object</code></em>,
2631
<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *key</code></em>);</pre>
2631
<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *key</code></em>);</pre>
2632
2632
<p>Gets a named field from the objects table of associations (see <a class="link" href="gobject-The-Base-Object-Type.html#g-object-set-data" title="g_object_set_data ()"><code class="function">g_object_set_data()</code></a>).</p>
2633
2633
<div class="refsect3">
2634
2634
<a name="id-1.4.5.10.47.5"></a><h4>Parameters</h4>
2655
2655
<div class="refsect3">
2656
2656
<a name="id-1.4.5.10.47.6"></a><h4>Returns</h4>
2657
<p> the data if found, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if no such data exists. </p>
2657
<p> the data if found, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if no such data exists. </p>
2658
2658
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
2663
2663
<a name="g-object-set-data"></a><h3>g_object_set_data ()</h3>
2664
2664
<pre class="programlisting"><span class="returnvalue">void</span>
2665
2665
g_object_set_data (<em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> *object</code></em>,
2666
<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *key</code></em>,
2667
<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>);</pre>
2666
<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *key</code></em>,
2667
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>);</pre>
2668
2668
<p>Each object carries around a table of associations from
2669
2669
strings to pointers. This function lets you set an association.</p>
2670
2670
<p>If the object already had an association with that name,
2702
2702
<a name="g-object-set-data-full"></a><h3>g_object_set_data_full ()</h3>
2703
2703
<pre class="programlisting"><span class="returnvalue">void</span>
2704
2704
g_object_set_data_full (<em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> *object</code></em>,
2705
<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *key</code></em>,
2706
<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>,
2707
<em class="parameter"><code><a href="../glib/glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> destroy</code></em>);</pre>
2705
<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *key</code></em>,
2706
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>,
2707
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> destroy</code></em>);</pre>
2708
2708
<p>Like <a class="link" href="gobject-The-Base-Object-Type.html#g-object-set-data" title="g_object_set_data ()"><code class="function">g_object_set_data()</code></a> except it adds notification
2709
2709
for when the association is destroyed, either by setting it
2710
2710
to a different value or when the object is destroyed.</p>
2711
2711
<p>Note that the <em class="parameter"><code>destroy</code></em>
2712
2712
callback is not called if <em class="parameter"><code>data</code></em>
2713
is <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</p>
2713
is <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</p>
2714
2714
<div class="refsect3">
2715
2715
<a name="id-1.4.5.10.49.6"></a><h4>Parameters</h4>
2716
2716
<div class="informaltable"><table width="100%" border="0">
2748
2748
<div class="refsect2">
2749
2749
<a name="g-object-steal-data"></a><h3>g_object_steal_data ()</h3>
2750
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>
2750
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>
2751
2751
g_object_steal_data (<em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> *object</code></em>,
2752
<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *key</code></em>);</pre>
2752
<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *key</code></em>);</pre>
2753
2753
<p>Remove a specified datum from the object's data associations,
2754
2754
without invoking the association's destroy handler.</p>
2755
2755
<div class="refsect3">
2777
2777
<div class="refsect3">
2778
2778
<a name="id-1.4.5.10.50.6"></a><h4>Returns</h4>
2779
<p> the data if found, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if no such data exists. </p>
2779
<p> the data if found, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if no such data exists. </p>
2780
2780
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
2784
2784
<div class="refsect2">
2785
2785
<a name="g-object-dup-data"></a><h3>g_object_dup_data ()</h3>
2786
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>
2786
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>
2787
2787
g_object_dup_data (<em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> *object</code></em>,
2788
<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *key</code></em>,
2789
<em class="parameter"><code><a href="../glib/glib-Keyed-Data-Lists.html#GDuplicateFunc"><span class="type">GDuplicateFunc</span></a> dup_func</code></em>,
2790
<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
2788
<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *key</code></em>,
2789
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Keyed-Data-Lists.html#GDuplicateFunc"><span class="type">GDuplicateFunc</span></a> dup_func</code></em>,
2790
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
2791
2791
<p>This is a variant of <a class="link" href="gobject-The-Base-Object-Type.html#g-object-get-data" title="g_object_get_data ()"><code class="function">g_object_get_data()</code></a> which returns
2792
2792
a 'duplicate' of the value. <em class="parameter"><code>dup_func</code></em>
2796
2796
<p>If the <em class="parameter"><code>key</code></em>
2797
2797
is not set on the object then <em class="parameter"><code>dup_func</code></em>
2799
will be called with a <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> argument.</p>
2799
will be called with a <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> argument.</p>
2800
2800
<p>Note that <em class="parameter"><code>dup_func</code></em>
2801
2801
is called while user data of <em class="parameter"><code>object</code></em>
2844
2844
associated with <em class="parameter"><code>key</code></em>
2845
2845
on <em class="parameter"><code>object</code></em>
2846
, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if not set.
2846
, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if not set.
2847
2847
If <em class="parameter"><code>dup_func</code></em>
2848
is <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, the value is returned
2848
is <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, the value is returned
2849
2849
unmodified.</p>
2855
2855
<div class="refsect2">
2856
2856
<a name="g-object-replace-data"></a><h3>g_object_replace_data ()</h3>
2857
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
2857
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
2858
2858
g_object_replace_data (<em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> *object</code></em>,
2859
<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *key</code></em>,
2860
<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> oldval</code></em>,
2861
<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> newval</code></em>,
2862
<em class="parameter"><code><a href="../glib/glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> destroy</code></em>,
2863
<em class="parameter"><code><a href="../glib/glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> *old_destroy</code></em>);</pre>
2859
<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *key</code></em>,
2860
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> oldval</code></em>,
2861
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> newval</code></em>,
2862
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> destroy</code></em>,
2863
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> *old_destroy</code></em>);</pre>
2864
2864
<p>Compares the user data for the key <em class="parameter"><code>key</code></em>
2865
2865
on <em class="parameter"><code>object</code></em>
2880
2880
or may not include using <em class="parameter"><code>old_destroy</code></em>
2881
2881
as sometimes replacement
2882
2882
should not destroy the object in the normal way.</p>
2883
<p>Return: <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the existing value for <em class="parameter"><code>key</code></em>
2883
<p>Return: <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the existing value for <em class="parameter"><code>key</code></em>
2885
2885
by <em class="parameter"><code>newval</code></em>
2886
, <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.</p>
2886
, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.</p>
2887
2887
<div class="refsect3">
2888
2888
<a name="id-1.4.5.10.52.8"></a><h4>Parameters</h4>
2889
2889
<div class="informaltable"><table width="100%" border="0">
2932
2932
<div class="refsect2">
2933
2933
<a name="g-object-get-qdata"></a><h3>g_object_get_qdata ()</h3>
2934
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>
2934
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>
2935
2935
g_object_get_qdata (<em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> *object</code></em>,
2936
<em class="parameter"><code><a href="../glib/glib-Quarks.html#GQuark"><span class="type">GQuark</span></a> quark</code></em>);</pre>
2936
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Quarks.html#GQuark"><span class="type">GQuark</span></a> quark</code></em>);</pre>
2937
2937
<p>This function gets back user data pointers stored via
2938
2938
<a class="link" href="gobject-The-Base-Object-Type.html#g-object-set-qdata" title="g_object_set_qdata ()"><code class="function">g_object_set_qdata()</code></a>.</p>
2939
2939
<div class="refsect3">
2954
2954
<td class="parameter_name"><p>quark</p></td>
2955
<td class="parameter_description"><p>A <a href="../glib/glib-Quarks.html#GQuark"><span class="type">GQuark</span></a>, naming the user data pointer</p></td>
2955
<td class="parameter_description"><p>A <a href="http://library.gnome.org/devel/glib/unstable/glib-Quarks.html#GQuark"><span class="type">GQuark</span></a>, naming the user data pointer</p></td>
2956
2956
<td class="parameter_annotations"> </td>
2961
2961
<div class="refsect3">
2962
2962
<a name="id-1.4.5.10.53.6"></a><h4>Returns</h4>
2963
<p> The user data pointer set, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p>
2963
<p> The user data pointer set, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p>
2964
2964
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
2969
2969
<a name="g-object-set-qdata"></a><h3>g_object_set_qdata ()</h3>
2970
2970
<pre class="programlisting"><span class="returnvalue">void</span>
2971
2971
g_object_set_qdata (<em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> *object</code></em>,
2972
<em class="parameter"><code><a href="../glib/glib-Quarks.html#GQuark"><span class="type">GQuark</span></a> quark</code></em>,
2973
<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>);</pre>
2972
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Quarks.html#GQuark"><span class="type">GQuark</span></a> quark</code></em>,
2973
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>);</pre>
2974
2974
<p>This sets an opaque, named pointer on an object.
2975
The name is specified through a <a href="../glib/glib-Quarks.html#GQuark"><span class="type">GQuark</span></a> (retrived e.g. via
2976
<a href="../glib/glib-Quarks.html#g-quark-from-static-string"><code class="function">g_quark_from_static_string()</code></a>), and the pointer
2975
The name is specified through a <a href="http://library.gnome.org/devel/glib/unstable/glib-Quarks.html#GQuark"><span class="type">GQuark</span></a> (retrived e.g. via
2976
<a href="http://library.gnome.org/devel/glib/unstable/glib-Quarks.html#g-quark-from-static-string"><code class="function">g_quark_from_static_string()</code></a>), and the pointer
2977
2977
can be gotten back from the <em class="parameter"><code>object</code></em>
2978
2978
with <a class="link" href="gobject-The-Base-Object-Type.html#g-object-get-qdata" title="g_object_get_qdata ()"><code class="function">g_object_get_qdata()</code></a>
2979
2979
until the <em class="parameter"><code>object</code></em>
2981
2981
Setting a previously set user data pointer, overrides (frees)
2982
the old pointer set, using <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><span class="type">NULL</span></a> as pointer essentially
2982
the old pointer set, using <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><span class="type">NULL</span></a> as pointer essentially
2983
2983
removes the data stored.</p>
2984
2984
<div class="refsect3">
2985
2985
<a name="id-1.4.5.10.54.5"></a><h4>Parameters</h4>
2999
2999
<td class="parameter_name"><p>quark</p></td>
3000
<td class="parameter_description"><p>A <a href="../glib/glib-Quarks.html#GQuark"><span class="type">GQuark</span></a>, naming the user data pointer</p></td>
3000
<td class="parameter_description"><p>A <a href="http://library.gnome.org/devel/glib/unstable/glib-Quarks.html#GQuark"><span class="type">GQuark</span></a>, naming the user data pointer</p></td>
3001
3001
<td class="parameter_annotations"> </td>
3014
3014
<a name="g-object-set-qdata-full"></a><h3>g_object_set_qdata_full ()</h3>
3015
3015
<pre class="programlisting"><span class="returnvalue">void</span>
3016
3016
g_object_set_qdata_full (<em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> *object</code></em>,
3017
<em class="parameter"><code><a href="../glib/glib-Quarks.html#GQuark"><span class="type">GQuark</span></a> quark</code></em>,
3018
<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>,
3019
<em class="parameter"><code><a href="../glib/glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> destroy</code></em>);</pre>
3017
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Quarks.html#GQuark"><span class="type">GQuark</span></a> quark</code></em>,
3018
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>,
3019
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> destroy</code></em>);</pre>
3020
3020
<p>This function works like <a class="link" href="gobject-The-Base-Object-Type.html#g-object-set-qdata" title="g_object_set_qdata ()"><code class="function">g_object_set_qdata()</code></a>, but in addition,
3021
3021
a void (*destroy) (gpointer) function may be specified which is
3022
3022
called with <em class="parameter"><code>data</code></em>
3043
3043
<td class="parameter_name"><p>quark</p></td>
3044
<td class="parameter_description"><p>A <a href="../glib/glib-Quarks.html#GQuark"><span class="type">GQuark</span></a>, naming the user data pointer</p></td>
3044
<td class="parameter_description"><p>A <a href="http://library.gnome.org/devel/glib/unstable/glib-Quarks.html#GQuark"><span class="type">GQuark</span></a>, naming the user data pointer</p></td>
3045
3045
<td class="parameter_annotations"> </td>
3064
3064
<div class="refsect2">
3065
3065
<a name="g-object-steal-qdata"></a><h3>g_object_steal_qdata ()</h3>
3066
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>
3066
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>
3067
3067
g_object_steal_qdata (<em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> *object</code></em>,
3068
<em class="parameter"><code><a href="../glib/glib-Quarks.html#GQuark"><span class="type">GQuark</span></a> quark</code></em>);</pre>
3068
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Quarks.html#GQuark"><span class="type">GQuark</span></a> quark</code></em>);</pre>
3069
3069
<p>This function gets back user data pointers stored via
3070
3070
<a class="link" href="gobject-The-Base-Object-Type.html#g-object-set-qdata" title="g_object_set_qdata ()"><code class="function">g_object_set_qdata()</code></a> and removes the <em class="parameter"><code>data</code></em>
3105
3105
<span class="gtkdoc kwb">const</span> gchar <span class="gtkdoc opt">*</span>new_string<span class="gtkdoc opt">)</span>
3106
3106
<span class="gtkdoc opt">{</span>
3107
3107
<span class="gtkdoc slc">// the quark, naming the object data</span>
3108
GQuark quark_string_list <span class="gtkdoc opt">=</span> <span class="function"><a href="../glib/glib-Quarks.html#g-quark-from-static-string">g_quark_from_static_string</a></span> <span class="gtkdoc opt">(</span><span class="string">"my-string-list"</span><span class="gtkdoc opt">);</span>
3108
GQuark quark_string_list <span class="gtkdoc opt">=</span> <span class="function"><a href="http://library.gnome.org/devel/glib/unstable/glib-Quarks.html#g-quark-from-static-string">g_quark_from_static_string</a></span> <span class="gtkdoc opt">(</span><span class="string">"my-string-list"</span><span class="gtkdoc opt">);</span>
3109
3109
<span class="gtkdoc slc">// retrive the old string list</span>
3110
3110
GList <span class="gtkdoc opt">*</span>list <span class="gtkdoc opt">=</span> <span class="function"><a href="gobject-The-Base-Object-Type.html#g-object-steal-qdata">g_object_steal_qdata</a></span> <span class="gtkdoc opt">(</span>object<span class="gtkdoc opt">,</span> quark_string_list<span class="gtkdoc opt">);</span>
3112
3112
<span class="gtkdoc slc">// prepend new string</span>
3113
list <span class="gtkdoc opt">=</span> <span class="function"><a href="../glib/glib-Doubly-Linked-Lists.html#g-list-prepend">g_list_prepend</a></span> <span class="gtkdoc opt">(</span>list<span class="gtkdoc opt">,</span> <span class="function"><a href="../glib/glib-String-Utility-Functions.html#g-strdup">g_strdup</a></span> <span class="gtkdoc opt">(</span>new_string<span class="gtkdoc opt">));</span>
3113
list <span class="gtkdoc opt">=</span> <span class="function"><a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#g-list-prepend">g_list_prepend</a></span> <span class="gtkdoc opt">(</span>list<span class="gtkdoc opt">,</span> <span class="function"><a href="http://library.gnome.org/devel/glib/unstable/glib-String-Utility-Functions.html#g-strdup">g_strdup</a></span> <span class="gtkdoc opt">(</span>new_string<span class="gtkdoc opt">));</span>
3114
3114
<span class="gtkdoc slc">// this changed 'list', so we need to set it again</span>
3115
3115
<span class="function"><a href="gobject-The-Base-Object-Type.html#g-object-set-qdata-full">g_object_set_qdata_full</a></span> <span class="gtkdoc opt">(</span>object<span class="gtkdoc opt">,</span> quark_string_list<span class="gtkdoc opt">,</span> list<span class="gtkdoc opt">,</span> free_string_list<span class="gtkdoc opt">);</span>
3116
3116
<span class="gtkdoc opt">}</span>
3120
3120
GList <span class="gtkdoc opt">*</span>node<span class="gtkdoc opt">, *</span>list <span class="gtkdoc opt">=</span> data<span class="gtkdoc opt">;</span>
3122
3122
<span class="keyword">for</span> <span class="gtkdoc opt">(</span>node <span class="gtkdoc opt">=</span> list<span class="gtkdoc opt">;</span> node<span class="gtkdoc opt">;</span> node <span class="gtkdoc opt">=</span> node<span class="gtkdoc opt">-></span>next<span class="gtkdoc opt">)</span>
3123
<span class="function"><a href="../glib/glib-Memory-Allocation.html#g-free">g_free</a></span> <span class="gtkdoc opt">(</span>node<span class="gtkdoc opt">-></span>data<span class="gtkdoc opt">);</span>
3124
<span class="function"><a href="../glib/glib-Doubly-Linked-Lists.html#g-list-free">g_list_free</a></span> <span class="gtkdoc opt">(</span>list<span class="gtkdoc opt">);</span>
3123
<span class="function"><a href="http://library.gnome.org/devel/glib/unstable/glib-Memory-Allocation.html#g-free">g_free</a></span> <span class="gtkdoc opt">(</span>node<span class="gtkdoc opt">-></span>data<span class="gtkdoc opt">);</span>
3124
<span class="function"><a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#g-list-free">g_list_free</a></span> <span class="gtkdoc opt">(</span>list<span class="gtkdoc opt">);</span>
3125
3125
<span class="gtkdoc opt">}</span></pre></td>
3151
3151
<td class="parameter_name"><p>quark</p></td>
3152
<td class="parameter_description"><p>A <a href="../glib/glib-Quarks.html#GQuark"><span class="type">GQuark</span></a>, naming the user data pointer</p></td>
3152
<td class="parameter_description"><p>A <a href="http://library.gnome.org/devel/glib/unstable/glib-Quarks.html#GQuark"><span class="type">GQuark</span></a>, naming the user data pointer</p></td>
3153
3153
<td class="parameter_annotations"> </td>
3158
3158
<div class="refsect3">
3159
3159
<a name="id-1.4.5.10.56.8"></a><h4>Returns</h4>
3160
<p> The user data pointer set, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p>
3160
<p> The user data pointer set, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p>
3161
3161
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
3165
3165
<div class="refsect2">
3166
3166
<a name="g-object-dup-qdata"></a><h3>g_object_dup_qdata ()</h3>
3167
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>
3167
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>
3168
3168
g_object_dup_qdata (<em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> *object</code></em>,
3169
<em class="parameter"><code><a href="../glib/glib-Quarks.html#GQuark"><span class="type">GQuark</span></a> quark</code></em>,
3170
<em class="parameter"><code><a href="../glib/glib-Keyed-Data-Lists.html#GDuplicateFunc"><span class="type">GDuplicateFunc</span></a> dup_func</code></em>,
3171
<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
3169
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Quarks.html#GQuark"><span class="type">GQuark</span></a> quark</code></em>,
3170
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Keyed-Data-Lists.html#GDuplicateFunc"><span class="type">GDuplicateFunc</span></a> dup_func</code></em>,
3171
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
3172
3172
<p>This is a variant of <a class="link" href="gobject-The-Base-Object-Type.html#g-object-get-qdata" title="g_object_get_qdata ()"><code class="function">g_object_get_qdata()</code></a> which returns
3173
3173
a 'duplicate' of the value. <em class="parameter"><code>dup_func</code></em>
3177
3177
<p>If the <em class="parameter"><code>quark</code></em>
3178
3178
is not set on the object then <em class="parameter"><code>dup_func</code></em>
3180
will be called with a <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> argument.</p>
3180
will be called with a <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> argument.</p>
3181
3181
<p>Note that <em class="parameter"><code>dup_func</code></em>
3182
3182
is called while user data of <em class="parameter"><code>object</code></em>
3203
3203
<td class="parameter_name"><p>quark</p></td>
3204
<td class="parameter_description"><p>a <a href="../glib/glib-Quarks.html#GQuark"><span class="type">GQuark</span></a>, naming the user data pointer</p></td>
3204
<td class="parameter_description"><p>a <a href="http://library.gnome.org/devel/glib/unstable/glib-Quarks.html#GQuark"><span class="type">GQuark</span></a>, naming the user data pointer</p></td>
3205
3205
<td class="parameter_annotations"> </td>
3225
3225
associated with <em class="parameter"><code>quark</code></em>
3226
3226
on <em class="parameter"><code>object</code></em>
3227
, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if not set.
3227
, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if not set.
3228
3228
If <em class="parameter"><code>dup_func</code></em>
3229
is <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, the value is returned
3229
is <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, the value is returned
3230
3230
unmodified.</p>
3236
3236
<div class="refsect2">
3237
3237
<a name="g-object-replace-qdata"></a><h3>g_object_replace_qdata ()</h3>
3238
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
3238
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
3239
3239
g_object_replace_qdata (<em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> *object</code></em>,
3240
<em class="parameter"><code><a href="../glib/glib-Quarks.html#GQuark"><span class="type">GQuark</span></a> quark</code></em>,
3241
<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> oldval</code></em>,
3242
<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> newval</code></em>,
3243
<em class="parameter"><code><a href="../glib/glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> destroy</code></em>,
3244
<em class="parameter"><code><a href="../glib/glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> *old_destroy</code></em>);</pre>
3240
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Quarks.html#GQuark"><span class="type">GQuark</span></a> quark</code></em>,
3241
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> oldval</code></em>,
3242
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> newval</code></em>,
3243
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> destroy</code></em>,
3244
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> *old_destroy</code></em>);</pre>
3245
3245
<p>Compares the user data for the key <em class="parameter"><code>quark</code></em>
3246
3246
on <em class="parameter"><code>object</code></em>
3261
3261
or may not include using <em class="parameter"><code>old_destroy</code></em>
3262
3262
as sometimes replacement
3263
3263
should not destroy the object in the normal way.</p>
3264
<p>Return: <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the existing value for <em class="parameter"><code>quark</code></em>
3264
<p>Return: <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the existing value for <em class="parameter"><code>quark</code></em>
3266
3266
by <em class="parameter"><code>newval</code></em>
3267
, <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.</p>
3267
, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.</p>
3268
3268
<div class="refsect3">
3269
3269
<a name="id-1.4.5.10.58.8"></a><h4>Parameters</h4>
3270
3270
<div class="informaltable"><table width="100%" border="0">
3283
3283
<td class="parameter_name"><p>quark</p></td>
3284
<td class="parameter_description"><p>a <a href="../glib/glib-Quarks.html#GQuark"><span class="type">GQuark</span></a>, naming the user data pointer</p></td>
3284
<td class="parameter_description"><p>a <a href="http://library.gnome.org/devel/glib/unstable/glib-Quarks.html#GQuark"><span class="type">GQuark</span></a>, naming the user data pointer</p></td>
3285
3285
<td class="parameter_annotations"> </td>
3314
3314
<a name="g-object-set-property"></a><h3>g_object_set_property ()</h3>
3315
3315
<pre class="programlisting"><span class="returnvalue">void</span>
3316
3316
g_object_set_property (<em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> *object</code></em>,
3317
<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *property_name</code></em>,
3317
<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *property_name</code></em>,
3318
3318
<em class="parameter"><code>const <a class="link" href="gobject-Generic-values.html#GValue" title="GValue"><span class="type">GValue</span></a> *value</code></em>);</pre>
3319
3319
<p>Sets a property on an object.</p>
3320
3320
<div class="refsect3">
3350
3350
<a name="g-object-get-property"></a><h3>g_object_get_property ()</h3>
3351
3351
<pre class="programlisting"><span class="returnvalue">void</span>
3352
3352
g_object_get_property (<em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> *object</code></em>,
3353
<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *property_name</code></em>,
3353
<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *property_name</code></em>,
3354
3354
<em class="parameter"><code><a class="link" href="gobject-Generic-values.html#GValue" title="GValue"><span class="type">GValue</span></a> *value</code></em>);</pre>
3355
3355
<p>Gets a property of an object. <em class="parameter"><code>value</code></em>
3356
3356
must have been initialized to the
3393
3393
<a name="g-object-new-valist"></a><h3>g_object_new_valist ()</h3>
3394
3394
<pre class="programlisting"><a class="link" href="gobject-The-Base-Object-Type.html#GObject"><span class="returnvalue">GObject</span></a> *
3395
3395
g_object_new_valist (<em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> object_type</code></em>,
3396
<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *first_property_name</code></em>,
3396
<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *first_property_name</code></em>,
3397
3397
<em class="parameter"><code><span class="type">va_list</span> var_args</code></em>);</pre>
3398
3398
<p>Creates a new instance of a <a class="link" href="gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> subtype and sets its properties.</p>
3399
3399
<p>Construction parameters (see <a class="link" href="gobject-GParamSpec.html#G-PARAM-CONSTRUCT:CAPS"><span class="type">G_PARAM_CONSTRUCT</span></a>, <a class="link" href="gobject-GParamSpec.html#G-PARAM-CONSTRUCT-ONLY:CAPS"><span class="type">G_PARAM_CONSTRUCT_ONLY</span></a>)
3421
3421
<td class="parameter_name"><p>var_args</p></td>
3422
3422
<td class="parameter_description"><p>the value of the first property, followed optionally by more
3423
name/value pairs, followed by <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
3423
name/value pairs, followed by <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
3424
3424
<td class="parameter_annotations"> </td>
3438
3438
<a name="g-object-set-valist"></a><h3>g_object_set_valist ()</h3>
3439
3439
<pre class="programlisting"><span class="returnvalue">void</span>
3440
3440
g_object_set_valist (<em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> *object</code></em>,
3441
<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *first_property_name</code></em>,
3441
<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *first_property_name</code></em>,
3442
3442
<em class="parameter"><code><span class="type">va_list</span> var_args</code></em>);</pre>
3443
3443
<p>Sets properties on an object.</p>
3444
3444
<div class="refsect3">
3464
3464
<td class="parameter_name"><p>var_args</p></td>
3465
3465
<td class="parameter_description"><p>value for the first property, followed optionally by more
3466
name/value pairs, followed by <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
3466
name/value pairs, followed by <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
3467
3467
<td class="parameter_annotations"> </td>
3475
3475
<a name="g-object-get-valist"></a><h3>g_object_get_valist ()</h3>
3476
3476
<pre class="programlisting"><span class="returnvalue">void</span>
3477
3477
g_object_get_valist (<em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> *object</code></em>,
3478
<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *first_property_name</code></em>,
3478
<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *first_property_name</code></em>,
3479
3479
<em class="parameter"><code><span class="type">va_list</span> var_args</code></em>);</pre>
3480
3480
<p>Gets properties of an object.</p>
3481
3481
<p>In general, a copy is made of the property contents and the caller
3482
3482
is responsible for freeing the memory in the appropriate manner for
3483
the type, for instance by calling <a href="../glib/glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a> or <a class="link" href="gobject-The-Base-Object-Type.html#g-object-unref" title="g_object_unref ()"><code class="function">g_object_unref()</code></a>.</p>
3483
the type, for instance by calling <a href="http://library.gnome.org/devel/glib/unstable/glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a> or <a class="link" href="gobject-The-Base-Object-Type.html#g-object-unref" title="g_object_unref ()"><code class="function">g_object_unref()</code></a>.</p>
3484
3484
<p>See <a class="link" href="gobject-The-Base-Object-Type.html#g-object-get" title="g_object_get ()"><code class="function">g_object_get()</code></a>.</p>
3485
3485
<div class="refsect3">
3486
3486
<a name="id-1.4.5.10.63.7"></a><h4>Parameters</h4>
3505
3505
<td class="parameter_name"><p>var_args</p></td>
3506
3506
<td class="parameter_description"><p>return location for the first property, followed optionally by more
3507
name/return location pairs, followed by <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
3507
name/return location pairs, followed by <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
3508
3508
<td class="parameter_annotations"> </td>
3619
3619
<a name="g-weak-ref-init"></a><h3>g_weak_ref_init ()</h3>
3620
3620
<pre class="programlisting"><span class="returnvalue">void</span>
3621
3621
g_weak_ref_init (<em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GWeakRef" title="GWeakRef"><span class="type">GWeakRef</span></a> *weak_ref</code></em>,
3622
<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> object</code></em>);</pre>
3622
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> object</code></em>);</pre>
3623
3623
<p>Initialise a non-statically-allocated <a class="link" href="gobject-The-Base-Object-Type.html#GWeakRef" title="GWeakRef"><span class="type">GWeakRef</span></a>.</p>
3624
3624
<p>This function also calls <a class="link" href="gobject-The-Base-Object-Type.html#g-weak-ref-set" title="g_weak_ref_set ()"><code class="function">g_weak_ref_set()</code></a> with <em class="parameter"><code>object</code></em>
3647
3647
<td class="parameter_name"><p>object</p></td>
3648
<td class="parameter_description"><p> a <a class="link" href="gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
3648
<td class="parameter_description"><p> a <a class="link" href="gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
3649
3649
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
3684
3684
<div class="refsect2">
3685
3685
<a name="g-weak-ref-get"></a><h3>g_weak_ref_get ()</h3>
3686
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>
3686
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>
3687
3687
g_weak_ref_get (<em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GWeakRef" title="GWeakRef"><span class="type">GWeakRef</span></a> *weak_ref</code></em>);</pre>
3688
3688
<p>If <em class="parameter"><code>weak_ref</code></em>
3689
3689
is not empty, atomically acquire a strong
3712
3712
<a name="id-1.4.5.10.69.8"></a><h4>Returns</h4>
3713
3713
<p> the object pointed to
3714
3714
by <em class="parameter"><code>weak_ref</code></em>
3715
, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if it was empty. </p>
3715
, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if it was empty. </p>
3716
3716
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>][<acronym title="Override the parsed C type with given type."><span class="acronym">type</span></acronym> GObject.Object]</span></p>
3718
3718
<p class="since">Since 2.32</p>
3722
3722
<a name="g-weak-ref-set"></a><h3>g_weak_ref_set ()</h3>
3723
3723
<pre class="programlisting"><span class="returnvalue">void</span>
3724
3724
g_weak_ref_set (<em class="parameter"><code><a class="link" href="gobject-The-Base-Object-Type.html#GWeakRef" title="GWeakRef"><span class="type">GWeakRef</span></a> *weak_ref</code></em>,
3725
<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> object</code></em>);</pre>
3725
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> object</code></em>);</pre>
3726
3726
<p>Change the object to which <em class="parameter"><code>weak_ref</code></em>
3727
3727
points, or set it to
3728
<a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</p>
3728
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</p>
3729
3729
<p>You must own a strong reference on <em class="parameter"><code>object</code></em>
3730
3730
while calling this
3747
3747
<td class="parameter_name"><p>object</p></td>
3748
<td class="parameter_description"><p> a <a class="link" href="gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
3748
<td class="parameter_description"><p> a <a class="link" href="gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
3749
3749
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
3971
<td class="struct_member_name"><p>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *<em class="structfield"><code><a name="GParameter.name"></a>name</code></em>;</p></td>
3971
<td class="struct_member_name"><p>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *<em class="structfield"><code><a name="GParameter.name"></a>name</code></em>;</p></td>
3972
3972
<td class="struct_member_description"><p>the parameter name</p></td>
3973
3973
<td class="struct_member_annotations"> </td>
4013
4013
<p>A structure containing a weak reference to a <a class="link" href="gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a>. It can either
4014
be empty (i.e. point to <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>), or point to an object for as long as
4014
be empty (i.e. point to <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>), or point to an object for as long as
4015
4015
at least one "strong" reference to that object exists. Before the
4016
4016
object's <a class="link" href="gobject-The-Base-Object-Type.html#GObjectClass.dispose"><span class="type">GObjectClass.dispose</span></a> method is called, every <a class="link" href="gobject-The-Base-Object-Type.html#GWeakRef" title="GWeakRef"><span class="type">GWeakRef</span></a>
4017
associated with becomes empty (i.e. points to <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>).</p>
4017
associated with becomes empty (i.e. points to <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>).</p>
4018
4018
<p>Like <a class="link" href="gobject-Generic-values.html#GValue" title="GValue"><span class="type">GValue</span></a>, <a class="link" href="gobject-The-Base-Object-Type.html#GWeakRef" title="GWeakRef"><span class="type">GWeakRef</span></a> can be statically allocated, stack- or
4019
4019
heap-allocated, or embedded in larger structures.</p>
4020
4020
<p>Unlike <a class="link" href="gobject-The-Base-Object-Type.html#g-object-weak-ref" title="g_object_weak_ref ()"><code class="function">g_object_weak_ref()</code></a> and <a class="link" href="gobject-The-Base-Object-Type.html#g-object-add-weak-pointer" title="g_object_add_weak_pointer ()"><code class="function">g_object_add_weak_pointer()</code></a>, this weak
4024
4024
<p>If the object's <a class="link" href="gobject-The-Base-Object-Type.html#GObjectClass.dispose"><span class="type">GObjectClass.dispose</span></a> method results in additional
4025
4025
references to the object being held, any <a href="gobject-The-Base-Object-Type.html#GWeakRef"><span class="type">GWeakRefs</span></a> taken
4026
before it was disposed will continue to point to <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. If
4026
before it was disposed will continue to point to <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. If
4027
4027
<a href="gobject-The-Base-Object-Type.html#GWeakRef"><span class="type">GWeakRefs</span></a> are taken after the object is disposed and
4028
4028
re-referenced, they will continue to point to it until its refcount
4029
4029
goes back to zero, at which point they too will be invalidated.</p>
4036
4036
<pre class="programlisting"><span class="returnvalue">void</span>
4037
4037
user_function (<a class="link" href="gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> *gobject,
4038
4038
<a class="link" href="gobject-GParamSpec.html#GParamSpec" title="struct GParamSpec"><span class="type">GParamSpec</span></a> *pspec,
4039
<a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data)</pre>
4039
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data)</pre>
4040
4040
<p>The notify signal is emitted on an object when one of its
4041
4041
properties has been changed. Note that getting this signal
4042
4042
doesn't guarantee that the value of the property has actually