glib2.0_2.20.1
[mer:glib2_0.git] / docs / reference / gobject / html / gobject-The-Base-Object-Type.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <html>
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <title>The Base Object Type</title>
6 <meta name="generator" content="DocBook XSL Stylesheets V1.74.3">
7 <link rel="home" href="index.html" title="GObject Reference Manual">
8 <link rel="up" href="rn01.html" title="API Reference">
9 <link rel="prev" href="GTypeModule.html" title="GTypeModule">
10 <link rel="next" href="gobject-Enumeration-and-Flag-Types.html" title="Enumeration and Flag Types">
11 <meta name="generator" content="GTK-Doc V1.11 (XML mode)">
12 <link rel="stylesheet" href="style.css" type="text/css">
13 <link rel="preface" href="pr01.html" title="Introduction">
14 <link rel="part" href="pt01.html" title="Part I. Concepts">
15 <link rel="chapter" href="chapter-intro.html" title="Background">
16 <link rel="chapter" href="chapter-gtype.html" title="The GLib Dynamic Type System">
17 <link rel="chapter" href="chapter-gobject.html" title="The GObject base class">
18 <link rel="chapter" href="chapter-signal.html" title="The GObject messaging system">
19 <link rel="reference" href="rn01.html" title="API Reference">
20 <link rel="reference" href="rn02.html" title="Tools Reference">
21 <link rel="part" href="pt02.html" title="Part IV. Tutorial">
22 <link rel="chapter" href="howto-gobject.html" title="How to define and implement a new GObject">
23 <link rel="chapter" href="howto-interface.html" title="How to define and implement interfaces">
24 <link rel="chapter" href="howto-signals.html" title="How to create and use signals">
25 <link rel="part" href="pt03.html" title="Part V. Related Tools">
26 <link rel="chapter" href="tools-vala.html" title="Vala">
27 <link rel="chapter" href="tools-gob.html" title="GObject builder">
28 <link rel="chapter" href="tools-ginspector.html" title="Graphical inspection of GObjects">
29 <link rel="chapter" href="tools-refdb.html" title="Debugging reference count problems">
30 <link rel="chapter" href="tools-gtkdoc.html" title="Writing API docs">
31 <link rel="index" href="ix01.html" title="Index">
32 <link rel="index" href="ix02.html" title="Index of deprecated symbols">
33 <link rel="index" href="ix03.html" title="Index of new symbols in 2.2">
34 <link rel="index" href="ix04.html" title="Index of new symbols in 2.4">
35 <link rel="index" href="ix05.html" title="Index of new symbols in 2.6">
36 <link rel="index" href="ix06.html" title="Index of new symbols in 2.8">
37 <link rel="index" href="ix07.html" title="Index of new symbols in 2.10">
38 <link rel="index" href="ix08.html" title="Index of new symbols in 2.12">
39 <link rel="index" href="ix09.html" title="Index of new symbols in 2.14">
40 <link rel="index" href="ix10.html" title="Index of new symbols in 2.18">
41 </head>
42 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
43 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
44 <tr valign="middle">
45 <td><a accesskey="p" href="GTypeModule.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
46 <td><a accesskey="u" href="rn01.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
47 <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
48 <th width="100%" align="center">GObject Reference Manual</th>
49 <td><a accesskey="n" href="gobject-Enumeration-and-Flag-Types.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
50 </tr>
51 <tr><td colspan="5" class="shortcuts">
52 <a href="#gobject-The-Base-Object-Type.synopsis" class="shortcut">Top</a>
53                  | 
54                 <a href="#gobject-The-Base-Object-Type.description" class="shortcut">Description</a>
55                  | 
56                 <a href="#gobject-The-Base-Object-Type.object-hierarchy" class="shortcut">Object Hierarchy</a>
57                  | 
58                 <a href="#gobject-The-Base-Object-Type.signals" class="shortcut">Signals</a>
59 </td></tr>
60 </table>
61 <div class="refentry" lang="en">
62 <a name="gobject-The-Base-Object-Type"></a><div class="titlepage"></div>
63 <div class="refnamediv"><table width="100%"><tr>
64 <td valign="top">
65 <h2><span class="refentrytitle"><a name="gobject-The-Base-Object-Type.top_of_page"></a>The Base Object Type</span></h2>
66 <p>The Base Object Type — The base object type</p>
67 </td>
68 <td valign="top" align="right"></td>
69 </tr></table></div>
70 <div class="refsynopsisdiv">
71 <a name="gobject-The-Base-Object-Type.synopsis"></a><h2>Synopsis</h2>
72 <a name="GObject"></a><pre class="synopsis">
73
74 #include &lt;glib-object.h&gt;
75
76                     <a class="link" href="gobject-The-Base-Object-Type.html#GObject-struct" title="GObject">GObject</a>;
77                     <a class="link" href="gobject-The-Base-Object-Type.html#GObjectClass" title="GObjectClass">GObjectClass</a>;
78                     <a class="link" href="gobject-The-Base-Object-Type.html#GObjectConstructParam" title="GObjectConstructParam">GObjectConstructParam</a>;
79 void                (<a class="link" href="gobject-The-Base-Object-Type.html#GObjectGetPropertyFunc" title="GObjectGetPropertyFunc ()">*GObjectGetPropertyFunc</a>)           (<a class="link" href="gobject-The-Base-Object-Type.html#GObject">GObject</a> *object,
80                                                          <a
81 href="./../glib/glib/glib-Basic-Types.html#guint"
82 >guint</a> property_id,
83                                                          <a class="link" href="gobject-Generic-values.html#GValue" title="GValue">GValue</a> *value,
84                                                          <a class="link" href="gobject-GParamSpec.html#GParamSpec" title="GParamSpec">GParamSpec</a> *pspec);
85 void                (<a class="link" href="gobject-The-Base-Object-Type.html#GObjectSetPropertyFunc" title="GObjectSetPropertyFunc ()">*GObjectSetPropertyFunc</a>)           (<a class="link" href="gobject-The-Base-Object-Type.html#GObject">GObject</a> *object,
86                                                          <a
87 href="./../glib/glib/glib-Basic-Types.html#guint"
88 >guint</a> property_id,
89                                                          const <a class="link" href="gobject-Generic-values.html#GValue" title="GValue">GValue</a> *value,
90                                                          <a class="link" href="gobject-GParamSpec.html#GParamSpec" title="GParamSpec">GParamSpec</a> *pspec);
91 void                (<a class="link" href="gobject-The-Base-Object-Type.html#GObjectFinalizeFunc" title="GObjectFinalizeFunc ()">*GObjectFinalizeFunc</a>)              (<a class="link" href="gobject-The-Base-Object-Type.html#GObject">GObject</a> *object);
92 #define             <a class="link" href="gobject-The-Base-Object-Type.html#G-TYPE-IS-OBJECT--CAPS" title="G_TYPE_IS_OBJECT()">G_TYPE_IS_OBJECT</a>                    (type)
93 #define             <a class="link" href="gobject-The-Base-Object-Type.html#G-OBJECT--CAPS" title="G_OBJECT()">G_OBJECT</a>                            (object)
94 #define             <a class="link" href="gobject-The-Base-Object-Type.html#G-IS-OBJECT--CAPS" title="G_IS_OBJECT()">G_IS_OBJECT</a>                         (object)
95 #define             <a class="link" href="gobject-The-Base-Object-Type.html#G-OBJECT-CLASS--CAPS" title="G_OBJECT_CLASS()">G_OBJECT_CLASS</a>                      (class)
96 #define             <a class="link" href="gobject-The-Base-Object-Type.html#G-IS-OBJECT-CLASS--CAPS" title="G_IS_OBJECT_CLASS()">G_IS_OBJECT_CLASS</a>                   (class)
97 #define             <a class="link" href="gobject-The-Base-Object-Type.html#G-OBJECT-GET-CLASS--CAPS" title="G_OBJECT_GET_CLASS()">G_OBJECT_GET_CLASS</a>                  (object)
98 #define             <a class="link" href="gobject-The-Base-Object-Type.html#G-OBJECT-TYPE--CAPS" title="G_OBJECT_TYPE()">G_OBJECT_TYPE</a>                       (object)
99 #define             <a class="link" href="gobject-The-Base-Object-Type.html#G-OBJECT-TYPE-NAME--CAPS" title="G_OBJECT_TYPE_NAME()">G_OBJECT_TYPE_NAME</a>                  (object)
100 #define             <a class="link" href="gobject-The-Base-Object-Type.html#G-OBJECT-CLASS-TYPE--CAPS" title="G_OBJECT_CLASS_TYPE()">G_OBJECT_CLASS_TYPE</a>                 (class)
101 #define             <a class="link" href="gobject-The-Base-Object-Type.html#G-OBJECT-CLASS-NAME--CAPS" title="G_OBJECT_CLASS_NAME()">G_OBJECT_CLASS_NAME</a>                 (class)
102 void                <a class="link" href="gobject-The-Base-Object-Type.html#g-object-class-install-property" title="g_object_class_install_property ()">g_object_class_install_property</a>     (<a class="link" href="gobject-The-Base-Object-Type.html#GObjectClass" title="GObjectClass">GObjectClass</a> *oclass,
103                                                          <a
104 href="./../glib/glib/glib-Basic-Types.html#guint"
105 >guint</a> property_id,
106                                                          <a class="link" href="gobject-GParamSpec.html#GParamSpec" title="GParamSpec">GParamSpec</a> *pspec);
107 <a class="link" href="gobject-GParamSpec.html#GParamSpec" title="GParamSpec">GParamSpec</a>*         <a class="link" href="gobject-The-Base-Object-Type.html#g-object-class-find-property" title="g_object_class_find_property ()">g_object_class_find_property</a>        (<a class="link" href="gobject-The-Base-Object-Type.html#GObjectClass" title="GObjectClass">GObjectClass</a> *oclass,
108                                                          const <a
109 href="./../glib/glib/glib-Basic-Types.html#gchar"
110 >gchar</a> *property_name);
111 <a class="link" href="gobject-GParamSpec.html#GParamSpec" title="GParamSpec">GParamSpec</a>**        <a class="link" href="gobject-The-Base-Object-Type.html#g-object-class-list-properties" title="g_object_class_list_properties ()">g_object_class_list_properties</a>      (<a class="link" href="gobject-The-Base-Object-Type.html#GObjectClass" title="GObjectClass">GObjectClass</a> *oclass,
112                                                          <a
113 href="./../glib/glib/glib-Basic-Types.html#guint"
114 >guint</a> *n_properties);
115 void                <a class="link" href="gobject-The-Base-Object-Type.html#g-object-class-override-property" title="g_object_class_override_property ()">g_object_class_override_property</a>    (<a class="link" href="gobject-The-Base-Object-Type.html#GObjectClass" title="GObjectClass">GObjectClass</a> *oclass,
116                                                          <a
117 href="./../glib/glib/glib-Basic-Types.html#guint"
118 >guint</a> property_id,
119                                                          const <a
120 href="./../glib/glib/glib-Basic-Types.html#gchar"
121 >gchar</a> *name);
122 void                <a class="link" href="gobject-The-Base-Object-Type.html#g-object-interface-install-property" title="g_object_interface_install_property ()">g_object_interface_install_property</a> (<a
123 href="./../glib/glib/glib-Basic-Types.html#gpointer"
124 >gpointer</a> g_iface,
125                                                          <a class="link" href="gobject-GParamSpec.html#GParamSpec" title="GParamSpec">GParamSpec</a> *pspec);
126 <a class="link" href="gobject-GParamSpec.html#GParamSpec" title="GParamSpec">GParamSpec</a>*         <a class="link" href="gobject-The-Base-Object-Type.html#g-object-interface-find-property" title="g_object_interface_find_property ()">g_object_interface_find_property</a>    (<a
127 href="./../glib/glib/glib-Basic-Types.html#gpointer"
128 >gpointer</a> g_iface,
129                                                          const <a
130 href="./../glib/glib/glib-Basic-Types.html#gchar"
131 >gchar</a> *property_name);
132 <a class="link" href="gobject-GParamSpec.html#GParamSpec" title="GParamSpec">GParamSpec</a>**        <a class="link" href="gobject-The-Base-Object-Type.html#g-object-interface-list-properties" title="g_object_interface_list_properties ()">g_object_interface_list_properties</a>  (<a
133 href="./../glib/glib/glib-Basic-Types.html#gpointer"
134 >gpointer</a> g_iface,
135                                                          <a
136 href="./../glib/glib/glib-Basic-Types.html#guint"
137 >guint</a> *n_properties_p);
138 <a
139 href="./../glib/glib/glib-Basic-Types.html#gpointer"
140 >gpointer</a>            <a class="link" href="gobject-The-Base-Object-Type.html#g-object-new" title="g_object_new ()">g_object_new</a>                        (<a class="link" href="gobject-Type-Information.html#GType" title="GType">GType</a> object_type,
141                                                          const <a
142 href="./../glib/glib/glib-Basic-Types.html#gchar"
143 >gchar</a> *first_property_name,
144                                                          ...);
145 <a
146 href="./../glib/glib/glib-Basic-Types.html#gpointer"
147 >gpointer</a>            <a class="link" href="gobject-The-Base-Object-Type.html#g-object-newv" title="g_object_newv ()">g_object_newv</a>                       (<a class="link" href="gobject-Type-Information.html#GType" title="GType">GType</a> object_type,
148                                                          <a
149 href="./../glib/glib/glib-Basic-Types.html#guint"
150 >guint</a> n_parameters,
151                                                          <a class="link" href="gobject-The-Base-Object-Type.html#GParameter" title="GParameter">GParameter</a> *parameters);
152                     <a class="link" href="gobject-The-Base-Object-Type.html#GParameter" title="GParameter">GParameter</a>;
153 <a
154 href="./../glib/glib/glib-Basic-Types.html#gpointer"
155 >gpointer</a>            <a class="link" href="gobject-The-Base-Object-Type.html#g-object-ref" title="g_object_ref ()">g_object_ref</a>                        (<a
156 href="./../glib/glib/glib-Basic-Types.html#gpointer"
157 >gpointer</a> object);
158 void                <a class="link" href="gobject-The-Base-Object-Type.html#g-object-unref" title="g_object_unref ()">g_object_unref</a>                      (<a
159 href="./../glib/glib/glib-Basic-Types.html#gpointer"
160 >gpointer</a> object);
161 <a
162 href="./../glib/glib/glib-Basic-Types.html#gpointer"
163 >gpointer</a>            <a class="link" href="gobject-The-Base-Object-Type.html#g-object-ref-sink" title="g_object_ref_sink ()">g_object_ref_sink</a>                   (<a
164 href="./../glib/glib/glib-Basic-Types.html#gpointer"
165 >gpointer</a> object);
166 typedef             <a class="link" href="gobject-The-Base-Object-Type.html#GInitiallyUnowned" title="GInitiallyUnowned">GInitiallyUnowned</a>;
167 typedef             <a class="link" href="gobject-The-Base-Object-Type.html#GInitiallyUnownedClass" title="GInitiallyUnownedClass">GInitiallyUnownedClass</a>;
168 #define             <a class="link" href="gobject-The-Base-Object-Type.html#G-TYPE-INITIALLY-UNOWNED--CAPS" title="G_TYPE_INITIALLY_UNOWNED">G_TYPE_INITIALLY_UNOWNED</a>
169 <a
170 href="./../glib/glib/glib-Basic-Types.html#gboolean"
171 >gboolean</a>            <a class="link" href="gobject-The-Base-Object-Type.html#g-object-is-floating" title="g_object_is_floating ()">g_object_is_floating</a>                (<a
172 href="./../glib/glib/glib-Basic-Types.html#gpointer"
173 >gpointer</a> object);
174 void                <a class="link" href="gobject-The-Base-Object-Type.html#g-object-force-floating" title="g_object_force_floating ()">g_object_force_floating</a>             (<a class="link" href="gobject-The-Base-Object-Type.html#GObject">GObject</a> *object);
175 void                (<a class="link" href="gobject-The-Base-Object-Type.html#GWeakNotify" title="GWeakNotify ()">*GWeakNotify</a>)                      (<a
176 href="./../glib/glib/glib-Basic-Types.html#gpointer"
177 >gpointer</a> data,
178                                                          <a class="link" href="gobject-The-Base-Object-Type.html#GObject">GObject</a> *where_the_object_was);
179 void                <a class="link" href="gobject-The-Base-Object-Type.html#g-object-weak-ref" title="g_object_weak_ref ()">g_object_weak_ref</a>                   (<a class="link" href="gobject-The-Base-Object-Type.html#GObject">GObject</a> *object,
180                                                          <a class="link" href="gobject-The-Base-Object-Type.html#GWeakNotify" title="GWeakNotify ()">GWeakNotify</a> notify,
181                                                          <a
182 href="./../glib/glib/glib-Basic-Types.html#gpointer"
183 >gpointer</a> data);
184 void                <a class="link" href="gobject-The-Base-Object-Type.html#g-object-weak-unref" title="g_object_weak_unref ()">g_object_weak_unref</a>                 (<a class="link" href="gobject-The-Base-Object-Type.html#GObject">GObject</a> *object,
185                                                          <a class="link" href="gobject-The-Base-Object-Type.html#GWeakNotify" title="GWeakNotify ()">GWeakNotify</a> notify,
186                                                          <a
187 href="./../glib/glib/glib-Basic-Types.html#gpointer"
188 >gpointer</a> data);
189 void                <a class="link" href="gobject-The-Base-Object-Type.html#g-object-add-weak-pointer" title="g_object_add_weak_pointer ()">g_object_add_weak_pointer</a>           (<a class="link" href="gobject-The-Base-Object-Type.html#GObject">GObject</a> *object,
190                                                          <a
191 href="./../glib/glib/glib-Basic-Types.html#gpointer"
192 >gpointer</a> *weak_pointer_location);
193 void                <a class="link" href="gobject-The-Base-Object-Type.html#g-object-remove-weak-pointer" title="g_object_remove_weak_pointer ()">g_object_remove_weak_pointer</a>        (<a class="link" href="gobject-The-Base-Object-Type.html#GObject">GObject</a> *object,
194                                                          <a
195 href="./../glib/glib/glib-Basic-Types.html#gpointer"
196 >gpointer</a> *weak_pointer_location);
197 void                (<a class="link" href="gobject-The-Base-Object-Type.html#GToggleNotify" title="GToggleNotify ()">*GToggleNotify</a>)                    (<a
198 href="./../glib/glib/glib-Basic-Types.html#gpointer"
199 >gpointer</a> data,
200                                                          <a class="link" href="gobject-The-Base-Object-Type.html#GObject">GObject</a> *object,
201                                                          <a
202 href="./../glib/glib/glib-Basic-Types.html#gboolean"
203 >gboolean</a> is_last_ref);
204 void                <a class="link" href="gobject-The-Base-Object-Type.html#g-object-add-toggle-ref" title="g_object_add_toggle_ref ()">g_object_add_toggle_ref</a>             (<a class="link" href="gobject-The-Base-Object-Type.html#GObject">GObject</a> *object,
205                                                          <a class="link" href="gobject-The-Base-Object-Type.html#GToggleNotify" title="GToggleNotify ()">GToggleNotify</a> notify,
206                                                          <a
207 href="./../glib/glib/glib-Basic-Types.html#gpointer"
208 >gpointer</a> data);
209 void                <a class="link" href="gobject-The-Base-Object-Type.html#g-object-remove-toggle-ref" title="g_object_remove_toggle_ref ()">g_object_remove_toggle_ref</a>          (<a class="link" href="gobject-The-Base-Object-Type.html#GObject">GObject</a> *object,
210                                                          <a class="link" href="gobject-The-Base-Object-Type.html#GToggleNotify" title="GToggleNotify ()">GToggleNotify</a> notify,
211                                                          <a
212 href="./../glib/glib/glib-Basic-Types.html#gpointer"
213 >gpointer</a> data);
214 <a
215 href="./../glib/glib/glib-Basic-Types.html#gpointer"
216 >gpointer</a>            <a class="link" href="gobject-The-Base-Object-Type.html#g-object-connect" title="g_object_connect ()">g_object_connect</a>                    (<a
217 href="./../glib/glib/glib-Basic-Types.html#gpointer"
218 >gpointer</a> object,
219                                                          const <a
220 href="./../glib/glib/glib-Basic-Types.html#gchar"
221 >gchar</a> *signal_spec,
222                                                          ...);
223 void                <a class="link" href="gobject-The-Base-Object-Type.html#g-object-disconnect" title="g_object_disconnect ()">g_object_disconnect</a>                 (<a
224 href="./../glib/glib/glib-Basic-Types.html#gpointer"
225 >gpointer</a> object,
226                                                          const <a
227 href="./../glib/glib/glib-Basic-Types.html#gchar"
228 >gchar</a> *signal_spec,
229                                                          ...);
230 void                <a class="link" href="gobject-The-Base-Object-Type.html#g-object-set" title="g_object_set ()">g_object_set</a>                        (<a
231 href="./../glib/glib/glib-Basic-Types.html#gpointer"
232 >gpointer</a> object,
233                                                          const <a
234 href="./../glib/glib/glib-Basic-Types.html#gchar"
235 >gchar</a> *first_property_name,
236                                                          ...);
237 void                <a class="link" href="gobject-The-Base-Object-Type.html#g-object-get" title="g_object_get ()">g_object_get</a>                        (<a
238 href="./../glib/glib/glib-Basic-Types.html#gpointer"
239 >gpointer</a> object,
240                                                          const <a
241 href="./../glib/glib/glib-Basic-Types.html#gchar"
242 >gchar</a> *first_property_name,
243                                                          ...);
244 void                <a class="link" href="gobject-The-Base-Object-Type.html#g-object-notify" title="g_object_notify ()">g_object_notify</a>                     (<a class="link" href="gobject-The-Base-Object-Type.html#GObject">GObject</a> *object,
245                                                          const <a
246 href="./../glib/glib/glib-Basic-Types.html#gchar"
247 >gchar</a> *property_name);
248 void                <a class="link" href="gobject-The-Base-Object-Type.html#g-object-freeze-notify" title="g_object_freeze_notify ()">g_object_freeze_notify</a>              (<a class="link" href="gobject-The-Base-Object-Type.html#GObject">GObject</a> *object);
249 void                <a class="link" href="gobject-The-Base-Object-Type.html#g-object-thaw-notify" title="g_object_thaw_notify ()">g_object_thaw_notify</a>                (<a class="link" href="gobject-The-Base-Object-Type.html#GObject">GObject</a> *object);
250 <a
251 href="./../glib/glib/glib-Basic-Types.html#gpointer"
252 >gpointer</a>            <a class="link" href="gobject-The-Base-Object-Type.html#g-object-get-data" title="g_object_get_data ()">g_object_get_data</a>                   (<a class="link" href="gobject-The-Base-Object-Type.html#GObject">GObject</a> *object,
253                                                          const <a
254 href="./../glib/glib/glib-Basic-Types.html#gchar"
255 >gchar</a> *key);
256 void                <a class="link" href="gobject-The-Base-Object-Type.html#g-object-set-data" title="g_object_set_data ()">g_object_set_data</a>                   (<a class="link" href="gobject-The-Base-Object-Type.html#GObject">GObject</a> *object,
257                                                          const <a
258 href="./../glib/glib/glib-Basic-Types.html#gchar"
259 >gchar</a> *key,
260                                                          <a
261 href="./../glib/glib/glib-Basic-Types.html#gpointer"
262 >gpointer</a> data);
263 void                <a class="link" href="gobject-The-Base-Object-Type.html#g-object-set-data-full" title="g_object_set_data_full ()">g_object_set_data_full</a>              (<a class="link" href="gobject-The-Base-Object-Type.html#GObject">GObject</a> *object,
264                                                          const <a
265 href="./../glib/glib/glib-Basic-Types.html#gchar"
266 >gchar</a> *key,
267                                                          <a
268 href="./../glib/glib/glib-Basic-Types.html#gpointer"
269 >gpointer</a> data,
270                                                          <a
271 href="./../glib/glib/glib-Datasets.html#GDestroyNotify"
272 >GDestroyNotify</a> destroy);
273 <a
274 href="./../glib/glib/glib-Basic-Types.html#gpointer"
275 >gpointer</a>            <a class="link" href="gobject-The-Base-Object-Type.html#g-object-steal-data" title="g_object_steal_data ()">g_object_steal_data</a>                 (<a class="link" href="gobject-The-Base-Object-Type.html#GObject">GObject</a> *object,
276                                                          const <a
277 href="./../glib/glib/glib-Basic-Types.html#gchar"
278 >gchar</a> *key);
279 <a
280 href="./../glib/glib/glib-Basic-Types.html#gpointer"
281 >gpointer</a>            <a class="link" href="gobject-The-Base-Object-Type.html#g-object-get-qdata" title="g_object_get_qdata ()">g_object_get_qdata</a>                  (<a class="link" href="gobject-The-Base-Object-Type.html#GObject">GObject</a> *object,
282                                                          <a
283 href="./../glib/glib/glib-Quarks.html#GQuark"
284 >GQuark</a> quark);
285 void                <a class="link" href="gobject-The-Base-Object-Type.html#g-object-set-qdata" title="g_object_set_qdata ()">g_object_set_qdata</a>                  (<a class="link" href="gobject-The-Base-Object-Type.html#GObject">GObject</a> *object,
286                                                          <a
287 href="./../glib/glib/glib-Quarks.html#GQuark"
288 >GQuark</a> quark,
289                                                          <a
290 href="./../glib/glib/glib-Basic-Types.html#gpointer"
291 >gpointer</a> data);
292 void                <a class="link" href="gobject-The-Base-Object-Type.html#g-object-set-qdata-full" title="g_object_set_qdata_full ()">g_object_set_qdata_full</a>             (<a class="link" href="gobject-The-Base-Object-Type.html#GObject">GObject</a> *object,
293                                                          <a
294 href="./../glib/glib/glib-Quarks.html#GQuark"
295 >GQuark</a> quark,
296                                                          <a
297 href="./../glib/glib/glib-Basic-Types.html#gpointer"
298 >gpointer</a> data,
299                                                          <a
300 href="./../glib/glib/glib-Datasets.html#GDestroyNotify"
301 >GDestroyNotify</a> destroy);
302 <a
303 href="./../glib/glib/glib-Basic-Types.html#gpointer"
304 >gpointer</a>            <a class="link" href="gobject-The-Base-Object-Type.html#g-object-steal-qdata" title="g_object_steal_qdata ()">g_object_steal_qdata</a>                (<a class="link" href="gobject-The-Base-Object-Type.html#GObject">GObject</a> *object,
305                                                          <a
306 href="./../glib/glib/glib-Quarks.html#GQuark"
307 >GQuark</a> quark);
308 void                <a class="link" href="gobject-The-Base-Object-Type.html#g-object-set-property" title="g_object_set_property ()">g_object_set_property</a>               (<a class="link" href="gobject-The-Base-Object-Type.html#GObject">GObject</a> *object,
309                                                          const <a
310 href="./../glib/glib/glib-Basic-Types.html#gchar"
311 >gchar</a> *property_name,
312                                                          const <a class="link" href="gobject-Generic-values.html#GValue" title="GValue">GValue</a> *value);
313 void                <a class="link" href="gobject-The-Base-Object-Type.html#g-object-get-property" title="g_object_get_property ()">g_object_get_property</a>               (<a class="link" href="gobject-The-Base-Object-Type.html#GObject">GObject</a> *object,
314                                                          const <a
315 href="./../glib/glib/glib-Basic-Types.html#gchar"
316 >gchar</a> *property_name,
317                                                          <a class="link" href="gobject-Generic-values.html#GValue" title="GValue">GValue</a> *value);
318 <a class="link" href="gobject-The-Base-Object-Type.html#GObject">GObject</a>*            <a class="link" href="gobject-The-Base-Object-Type.html#g-object-new-valist" title="g_object_new_valist ()">g_object_new_valist</a>                 (<a class="link" href="gobject-Type-Information.html#GType" title="GType">GType</a> object_type,
319                                                          const <a
320 href="./../glib/glib/glib-Basic-Types.html#gchar"
321 >gchar</a> *first_property_name,
322                                                          va_list var_args);
323 void                <a class="link" href="gobject-The-Base-Object-Type.html#g-object-set-valist" title="g_object_set_valist ()">g_object_set_valist</a>                 (<a class="link" href="gobject-The-Base-Object-Type.html#GObject">GObject</a> *object,
324                                                          const <a
325 href="./../glib/glib/glib-Basic-Types.html#gchar"
326 >gchar</a> *first_property_name,
327                                                          va_list var_args);
328 void                <a class="link" href="gobject-The-Base-Object-Type.html#g-object-get-valist" title="g_object_get_valist ()">g_object_get_valist</a>                 (<a class="link" href="gobject-The-Base-Object-Type.html#GObject">GObject</a> *object,
329                                                          const <a
330 href="./../glib/glib/glib-Basic-Types.html#gchar"
331 >gchar</a> *first_property_name,
332                                                          va_list var_args);
333 void                <a class="link" href="gobject-The-Base-Object-Type.html#g-object-watch-closure" title="g_object_watch_closure ()">g_object_watch_closure</a>              (<a class="link" href="gobject-The-Base-Object-Type.html#GObject">GObject</a> *object,
334                                                          <a class="link" href="gobject-Closures.html#GClosure" title="GClosure">GClosure</a> *closure);
335 void                <a class="link" href="gobject-The-Base-Object-Type.html#g-object-run-dispose" title="g_object_run_dispose ()">g_object_run_dispose</a>                (<a class="link" href="gobject-The-Base-Object-Type.html#GObject">GObject</a> *object);
336 #define             <a class="link" href="gobject-The-Base-Object-Type.html#G-OBJECT-WARN-INVALID-PROPERTY-ID--CAPS" title="G_OBJECT_WARN_INVALID_PROPERTY_ID()">G_OBJECT_WARN_INVALID_PROPERTY_ID</a>   (object, property_id, pspec)
337 </pre>
338 </div>
339 <div class="refsect1" lang="en">
340 <a name="gobject-The-Base-Object-Type.object-hierarchy"></a><h2>Object Hierarchy</h2>
341 <pre class="synopsis">
342   GObject
343    +----<a class="link" href="GTypeModule.html" title="GTypeModule">GTypeModule</a>
344 </pre>
345 </div>
346 <div class="refsect1" lang="en">
347 <a name="gobject-The-Base-Object-Type.signals"></a><h2>Signals</h2>
348 <pre class="synopsis">
349   "<a class="link" href="gobject-The-Base-Object-Type.html#GObject-notify" title='The "notify" signal'>notify</a>"                                         : Run First / No Recursion / Has Details / Action / No Hooks
350 </pre>
351 </div>
352 <div class="refsect1" lang="en">
353 <a name="gobject-The-Base-Object-Type.description"></a><h2>Description</h2>
354 <p>
355 GObject is the fundamental type providing the common attributes and
356 methods for all object types in GTK+, Pango and other libraries
357 based on GObject.  The GObject class provides methods for object
358 construction and destruction, property access methods, and signal
359 support.  Signals are described in detail in <a class="xref" href="gobject-Signals.html" title="Signals"><span class="refentrytitle"><a name="gobject-Signals.top_of_page"></a>Signals</span>(3)</a>.
360 </p>
361 <p>
362 </p>
363 <p><a name="floating-ref"></a>
364 <a class="link" href="gobject-The-Base-Object-Type.html#GInitiallyUnowned" title="GInitiallyUnowned"><span class="type">GInitiallyUnowned</span></a> is derived from <a class="link" href="gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a>. The only difference between
365 the two is that the initial reference of a <a class="link" href="gobject-The-Base-Object-Type.html#GInitiallyUnowned" title="GInitiallyUnowned"><span class="type">GInitiallyUnowned</span></a> is flagged
366 as a <em class="firstterm">floating</em> reference.
367 This means that it is not specifically claimed to be "owned" by
368 any code portion. The main motivation for providing floating references is
369 C convenience. In particular, it allows code to be written as:
370 </p>
371 <div class="informalexample"><pre class="programlisting">
372 container = create_container();
373 container_add_child (container, create_child());
374 </pre></div>
375 <p>
376 If <code class="function"><code class="function">container_add_child()</code></code> will <a class="link" href="gobject-The-Base-Object-Type.html#g-object-ref-sink" title="g_object_ref_sink ()"><code class="function">g_object_ref_sink()</code></a> the
377 passed in child, no reference of the newly created child is leaked.
378 Without floating references, <code class="function"><code class="function">container_add_child()</code></code>
379 can only <a class="link" href="gobject-The-Base-Object-Type.html#g-object-ref" title="g_object_ref ()"><code class="function">g_object_ref()</code></a> the new child, so to implement this code without
380 reference leaks, it would have to be written as:
381 </p>
382 <div class="informalexample"><pre class="programlisting">
383 Child *child;
384 container = create_container();
385 child = create_child();
386 container_add_child (container, child);
387 g_object_unref (child);
388 </pre></div>
389 <p>
390 The floating reference can be converted into
391 an ordinary reference by calling <a class="link" href="gobject-The-Base-Object-Type.html#g-object-ref-sink" title="g_object_ref_sink ()"><code class="function">g_object_ref_sink()</code></a>.
392 For already sunken objects (objects that don't have a floating reference
393 anymore), <a class="link" href="gobject-The-Base-Object-Type.html#g-object-ref-sink" title="g_object_ref_sink ()"><code class="function">g_object_ref_sink()</code></a> is equivalent to <a class="link" href="gobject-The-Base-Object-Type.html#g-object-ref" title="g_object_ref ()"><code class="function">g_object_ref()</code></a> and returns
394 a new reference.
395 Since floating references are useful almost exclusively for C convenience,
396 language bindings that provide automated reference and memory ownership
397 maintenance (such as smart pointers or garbage collection) therefore don't
398 need to expose floating references in their API.
399 </p>
400 <p>
401 </p>
402 <p>
403 Some object implementations may need to save an objects floating state
404 across certain code portions (an example is <a
405 href="http://library.gnome.org/devel/gtk/unstable/GtkMenu.html"
406 ><span class="type">GtkMenu</span></a>), to achive this, the
407 following sequence can be used:
408 </p>
409 <p>
410 </p>
411 <div class="informalexample"><pre class="programlisting">
412 // save floating state
413 gboolean was_floating = g_object_is_floating (object);
414 g_object_ref_sink (object);
415 // protected code portion
416 ...;
417 // restore floating state
418 if (was_floating)
419   g_object_force_floating (object);
420 g_obejct_unref (object); // release previously acquired reference
421 </pre></div>
422 <p>
423 </p>
424 </div>
425 <div class="refsect1" lang="en">
426 <a name="gobject-The-Base-Object-Type.details"></a><h2>Details</h2>
427 <div class="refsect2" lang="en">
428 <a name="GObject-struct"></a><h3>GObject</h3>
429 <pre class="programlisting">typedef struct _GObject GObject;</pre>
430 <p>
431 All the fields in the <span class="structname">GObject</span> structure are private 
432 to the <a class="link" href="gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> implementation and should never be accessed directly.</p>
433 <p>
434 </p>
435 </div>
436 <hr>
437 <div class="refsect2" lang="en">
438 <a name="GObjectClass"></a><h3>GObjectClass</h3>
439 <pre class="programlisting">typedef struct {
440   GTypeClass   g_type_class;
441
442   /* seldomly overidden */
443   GObject*   (*constructor)     (GType                  type,
444                                  guint                  n_construct_properties,
445                                  GObjectConstructParam *construct_properties);
446   /* overridable methods */
447   void       (*set_property)            (GObject        *object,
448                                          guint           property_id,
449                                          const GValue   *value,
450                                          GParamSpec     *pspec);
451   void       (*get_property)            (GObject        *object,
452                                          guint           property_id,
453                                          GValue         *value,
454                                          GParamSpec     *pspec);
455   void       (*dispose)                 (GObject        *object);
456   void       (*finalize)                (GObject        *object);
457   /* seldomly overidden */
458   void       (*dispatch_properties_changed) (GObject      *object,
459                                              guint         n_pspecs,
460                                              GParamSpec  **pspecs);
461   /* signals */
462   void       (*notify)                  (GObject        *object,
463                                          GParamSpec     *pspec);
464
465   /* called when done constructing */
466   void       (*constructed)             (GObject        *object);
467 } GObjectClass;
468 </pre>
469 <p>
470 The class structure for the <span class="structname">GObject</span> type.
471 </p>
472 <p>
473 </p>
474 <div class="example">
475 <a name="id635141"></a><p class="title"><b>Example 1. Implementing singletons using a constructor</b></p>
476 <div class="example-contents"><pre class="programlisting">
477 static MySingleton *the_singleton = NULL;
478
479 static GObject*
480 my_singleton_constructor (GType                  type,
481                           guint                  n_construct_params,
482                           GObjectConstructParam *construct_params)
483 {
484   GObject *object;
485   
486   if (!the_singleton)
487     {
488       object = G_OBJECT_CLASS (parent_class)-&gt;constructor (type,
489                                                            n_construct_params,
490                                                            construct_params);
491       the_singleton = MY_SINGLETON (object);
492     }
493   else
494     object = g_object_ref (G_OBJECT (the_singleton));
495
496   return object;
497 }
498 </pre></div>
499 </div>
500 <p><br class="example-break"></p>
501 <p>
502 </p>
503 <div class="variablelist"><table border="0">
504 <col align="left" valign="top">
505 <tbody>
506 <tr>
507 <td><p><span class="term"><a class="link" href="gobject-Type-Information.html#GTypeClass" title="GTypeClass">GTypeClass</a> <em class="structfield"><code>g_type_class</code></em>;</span></p></td>
508 <td> the parent class
509 </td>
510 </tr>
511 <tr>
512 <td><p><span class="term"><em class="structfield"><code>constructor</code></em> ()</span></p></td>
513 <td> the <em class="parameter"><code>constructor</code></em> function is called by <a class="link" href="gobject-The-Base-Object-Type.html#g-object-new" title="g_object_new ()"><code class="function">g_object_new()</code></a> to 
514  complete the object initialization after all the construction properties are
515  set. The first thing a <em class="parameter"><code>constructor</code></em> implementation must do is chain up to the
516  <em class="parameter"><code>constructor</code></em> of the parent class. Overriding <em class="parameter"><code>constructor</code></em> should be rarely 
517  needed, e.g. to handle construct properties, or to implement singletons.
518 </td>
519 </tr>
520 <tr>
521 <td><p><span class="term"><em class="structfield"><code>set_property</code></em> ()</span></p></td>
522 <td> the generic setter for all properties of this type. Should be
523  overridden for every type with properties. Implementations of <em class="parameter"><code>set_property</code></em>
524  don't need to emit property change notification explicitly, this is handled
525  by the type system.
526 </td>
527 </tr>
528 <tr>
529 <td><p><span class="term"><em class="structfield"><code>get_property</code></em> ()</span></p></td>
530 <td> the generic getter for all properties of this type. Should be
531  overridden for every type with properties.
532 </td>
533 </tr>
534 <tr>
535 <td><p><span class="term"><em class="structfield"><code>dispose</code></em> ()</span></p></td>
536 <td> the <em class="parameter"><code>dispose</code></em> function is supposed to drop all references to other 
537  objects, but keep the instance otherwise intact, so that client method 
538  invocations still work. It may be run multiple times (due to reference 
539  loops). Before returning, <em class="parameter"><code>dispose</code></em> should chain up to the <em class="parameter"><code>dispose</code></em> method 
540  of the parent class.
541 </td>
542 </tr>
543 <tr>
544 <td><p><span class="term"><em class="structfield"><code>finalize</code></em> ()</span></p></td>
545 <td> instance finalization function, should finish the finalization of 
546  the instance begun in <em class="parameter"><code>dispose</code></em> and chain up to the <em class="parameter"><code>finalize</code></em> method of the 
547  parent class.
548 </td>
549 </tr>
550 <tr>
551 <td><p><span class="term"><em class="structfield"><code>dispatch_properties_changed</code></em> ()</span></p></td>
552 <td> emits property change notification for a bunch
553  of properties. Overriding <em class="parameter"><code>dispatch_properties_changed</code></em> should be rarely 
554  needed.
555 </td>
556 </tr>
557 <tr>
558 <td><p><span class="term"><em class="structfield"><code>notify</code></em> ()</span></p></td>
559 <td> the class closure for the notify signal
560 </td>
561 </tr>
562 <tr>
563 <td><p><span class="term"><em class="structfield"><code>constructed</code></em> ()</span></p></td>
564 <td> the <em class="parameter"><code>constructed</code></em> function is called by <a class="link" href="gobject-The-Base-Object-Type.html#g-object-new" title="g_object_new ()"><code class="function">g_object_new()</code></a> as the
565  final step of the object creation process.  At the point of the call, all
566  construction properties have been set on the object.  The purpose of this
567  call is to allow for object initialisation steps that can only be performed
568  after construction properties have been set.  <em class="parameter"><code>constructed</code></em> implementors
569  should chain up to the <em class="parameter"><code>constructed</code></em> call of their parent class to allow it
570  to complete its initialisation.
571 </td>
572 </tr>
573 </tbody>
574 </table></div>
575 </div>
576 <hr>
577 <div class="refsect2" lang="en">
578 <a name="GObjectConstructParam"></a><h3>GObjectConstructParam</h3>
579 <pre class="programlisting">typedef struct {
580   GParamSpec *pspec;
581   GValue     *value;
582 } GObjectConstructParam;
583 </pre>
584 <p>
585 The <span class="structname">GObjectConstructParam</span> struct is an auxiliary 
586 structure used to hand <a class="link" href="gobject-GParamSpec.html#GParamSpec" title="GParamSpec"><span class="type">GParamSpec</span></a>/<a class="link" href="gobject-Generic-values.html#GValue" title="GValue"><span class="type">GValue</span></a> pairs to the <em class="parameter"><code>constructor</code></em> of
587 a <a class="link" href="gobject-The-Base-Object-Type.html#GObjectClass" title="GObjectClass"><span class="type">GObjectClass</span></a>.</p>
588 <p>
589 </p>
590 <div class="variablelist"><table border="0">
591 <col align="left" valign="top">
592 <tbody>
593 <tr>
594 <td><p><span class="term"><a class="link" href="gobject-GParamSpec.html#GParamSpec" title="GParamSpec">GParamSpec</a> *<em class="structfield"><code>pspec</code></em>;</span></p></td>
595 <td> the <a class="link" href="gobject-GParamSpec.html#GParamSpec" title="GParamSpec"><span class="type">GParamSpec</span></a> of the construct parameter
596 </td>
597 </tr>
598 <tr>
599 <td><p><span class="term"><a class="link" href="gobject-Generic-values.html#GValue" title="GValue">GValue</a> *<em class="structfield"><code>value</code></em>;</span></p></td>
600 <td> the value to set the parameter to
601 </td>
602 </tr>
603 </tbody>
604 </table></div>
605 </div>
606 <hr>
607 <div class="refsect2" lang="en">
608 <a name="GObjectGetPropertyFunc"></a><h3>GObjectGetPropertyFunc ()</h3>
609 <pre class="programlisting">void                (*GObjectGetPropertyFunc)           (<a class="link" href="gobject-The-Base-Object-Type.html#GObject">GObject</a> *object,
610                                                          <a
611 href="./../glib/glib/glib-Basic-Types.html#guint"
612 >guint</a> property_id,
613                                                          <a class="link" href="gobject-Generic-values.html#GValue" title="GValue">GValue</a> *value,
614                                                          <a class="link" href="gobject-GParamSpec.html#GParamSpec" title="GParamSpec">GParamSpec</a> *pspec);</pre>
615 <p>
616 The type of the <em class="parameter"><code>get_property</code></em> function of <a class="link" href="gobject-The-Base-Object-Type.html#GObjectClass" title="GObjectClass"><span class="type">GObjectClass</span></a>.</p>
617 <p>
618 </p>
619 <div class="variablelist"><table border="0">
620 <col align="left" valign="top">
621 <tbody>
622 <tr>
623 <td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
624 <td> a <a class="link" href="gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a>
625 </td>
626 </tr>
627 <tr>
628 <td><p><span class="term"><em class="parameter"><code>property_id</code></em> :</span></p></td>
629 <td> the numeric id under which the property was registered with
630  <a class="link" href="gobject-The-Base-Object-Type.html#g-object-class-install-property" title="g_object_class_install_property ()"><code class="function">g_object_class_install_property()</code></a>.
631 </td>
632 </tr>
633 <tr>
634 <td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
635 <td> a <a class="link" href="gobject-Generic-values.html#GValue" title="GValue"><span class="type">GValue</span></a> to return the property value in
636 </td>
637 </tr>
638 <tr>
639 <td><p><span class="term"><em class="parameter"><code>pspec</code></em> :</span></p></td>
640 <td> the <a class="link" href="gobject-GParamSpec.html#GParamSpec" title="GParamSpec"><span class="type">GParamSpec</span></a> describing the property
641 </td>
642 </tr>
643 </tbody>
644 </table></div>
645 </div>
646 <hr>
647 <div class="refsect2" lang="en">
648 <a name="GObjectSetPropertyFunc"></a><h3>GObjectSetPropertyFunc ()</h3>
649 <pre class="programlisting">void                (*GObjectSetPropertyFunc)           (<a class="link" href="gobject-The-Base-Object-Type.html#GObject">GObject</a> *object,
650                                                          <a
651 href="./../glib/glib/glib-Basic-Types.html#guint"
652 >guint</a> property_id,
653                                                          const <a class="link" href="gobject-Generic-values.html#GValue" title="GValue">GValue</a> *value,
654                                                          <a class="link" href="gobject-GParamSpec.html#GParamSpec" title="GParamSpec">GParamSpec</a> *pspec);</pre>
655 <p>
656 The type of the <em class="parameter"><code>set_property</code></em> function of <a class="link" href="gobject-The-Base-Object-Type.html#GObjectClass" title="GObjectClass"><span class="type">GObjectClass</span></a>.</p>
657 <p>
658 </p>
659 <div class="variablelist"><table border="0">
660 <col align="left" valign="top">
661 <tbody>
662 <tr>
663 <td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
664 <td> a <a class="link" href="gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a>
665 </td>
666 </tr>
667 <tr>
668 <td><p><span class="term"><em class="parameter"><code>property_id</code></em> :</span></p></td>
669 <td> the numeric id under which the property was registered with
670  <a class="link" href="gobject-The-Base-Object-Type.html#g-object-class-install-property" title="g_object_class_install_property ()"><code class="function">g_object_class_install_property()</code></a>.
671 </td>
672 </tr>
673 <tr>
674 <td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
675 <td> the new value for the property
676 </td>
677 </tr>
678 <tr>
679 <td><p><span class="term"><em class="parameter"><code>pspec</code></em> :</span></p></td>
680 <td> the <a class="link" href="gobject-GParamSpec.html#GParamSpec" title="GParamSpec"><span class="type">GParamSpec</span></a> describing the property
681 </td>
682 </tr>
683 </tbody>
684 </table></div>
685 </div>
686 <hr>
687 <div class="refsect2" lang="en">
688 <a name="GObjectFinalizeFunc"></a><h3>GObjectFinalizeFunc ()</h3>
689 <pre class="programlisting">void                (*GObjectFinalizeFunc)              (<a class="link" href="gobject-The-Base-Object-Type.html#GObject">GObject</a> *object);</pre>
690 <p>
691 The type of the <em class="parameter"><code>finalize</code></em> function of <a class="link" href="gobject-The-Base-Object-Type.html#GObjectClass" title="GObjectClass"><span class="type">GObjectClass</span></a>.</p>
692 <p>
693 </p>
694 <div class="variablelist"><table border="0">
695 <col align="left" valign="top">
696 <tbody><tr>
697 <td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
698 <td> the <a class="link" href="gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> being finalized
699 </td>
700 </tr></tbody>
701 </table></div>
702 </div>
703 <hr>
704 <div class="refsect2" lang="en">
705 <a name="G-TYPE-IS-OBJECT--CAPS"></a><h3>G_TYPE_IS_OBJECT()</h3>
706 <pre class="programlisting">#define G_TYPE_IS_OBJECT(type)      (G_TYPE_FUNDAMENTAL (type) == G_TYPE_OBJECT)
707 </pre>
708 <p>
709 Check if the passed in type id 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> or derived from it.</p>
710 <p>
711 </p>
712 <div class="variablelist"><table border="0">
713 <col align="left" valign="top">
714 <tbody><tr>
715 <td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
716 <td> Type id to check
717 </td>
718 </tr></tbody>
719 </table></div>
720 </div>
721 <hr>
722 <div class="refsect2" lang="en">
723 <a name="G-OBJECT--CAPS"></a><h3>G_OBJECT()</h3>
724 <pre class="programlisting">#define G_OBJECT(object)            (G_TYPE_CHECK_INSTANCE_CAST ((object), G_TYPE_OBJECT, GObject))
725 </pre>
726 <p>
727 Casts a <a class="link" href="gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> or derived pointer into a (GObject*) pointer.
728 Depending on the current debugging level, this function may invoke
729 certain runtime checks to identify invalid casts.</p>
730 <p>
731 </p>
732 <div class="variablelist"><table border="0">
733 <col align="left" valign="top">
734 <tbody><tr>
735 <td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
736 <td> Object which is subject to casting.
737 </td>
738 </tr></tbody>
739 </table></div>
740 </div>
741 <hr>
742 <div class="refsect2" lang="en">
743 <a name="G-IS-OBJECT--CAPS"></a><h3>G_IS_OBJECT()</h3>
744 <pre class="programlisting">#define G_IS_OBJECT(object)         (G_TYPE_CHECK_INSTANCE_TYPE ((object), G_TYPE_OBJECT))
745 </pre>
746 <p>
747 Checks whether a valid <a class="link" href="gobject-Type-Information.html#GTypeInstance" title="GTypeInstance"><span class="type">GTypeInstance</span></a> pointer is of type <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>
748 <p>
749 </p>
750 <div class="variablelist"><table border="0">
751 <col align="left" valign="top">
752 <tbody><tr>
753 <td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
754 <td> Instance to check for being 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>.
755 </td>
756 </tr></tbody>
757 </table></div>
758 </div>
759 <hr>
760 <div class="refsect2" lang="en">
761 <a name="G-OBJECT-CLASS--CAPS"></a><h3>G_OBJECT_CLASS()</h3>
762 <pre class="programlisting">#define G_OBJECT_CLASS(class)       (G_TYPE_CHECK_CLASS_CAST ((class), G_TYPE_OBJECT, GObjectClass))
763 </pre>
764 <p>
765 Casts a derived <a class="link" href="gobject-The-Base-Object-Type.html#GObjectClass" title="GObjectClass"><span class="type">GObjectClass</span></a> structure into a <a class="link" href="gobject-The-Base-Object-Type.html#GObjectClass" title="GObjectClass"><span class="type">GObjectClass</span></a> structure.</p>
766 <p>
767 </p>
768 <div class="variablelist"><table border="0">
769 <col align="left" valign="top">
770 <tbody><tr>
771 <td><p><span class="term"><em class="parameter"><code>class</code></em> :</span></p></td>
772 <td> a valid <a class="link" href="gobject-The-Base-Object-Type.html#GObjectClass" title="GObjectClass"><span class="type">GObjectClass</span></a>
773 </td>
774 </tr></tbody>
775 </table></div>
776 </div>
777 <hr>
778 <div class="refsect2" lang="en">
779 <a name="G-IS-OBJECT-CLASS--CAPS"></a><h3>G_IS_OBJECT_CLASS()</h3>
780 <pre class="programlisting">#define G_IS_OBJECT_CLASS(class)    (G_TYPE_CHECK_CLASS_TYPE ((class), G_TYPE_OBJECT))
781 </pre>
782 <p>
783 Checks whether <em class="parameter"><code>class</code></em> "is a" valid <a class="link" href="gobject-The-Base-Object-Type.html#GObjectClass" title="GObjectClass"><span class="type">GObjectClass</span></a> structure of type
784 <a class="link" href="gobject-Type-Information.html#G-TYPE-OBJECT--CAPS" title="G_TYPE_OBJECT"><code class="literal">G_TYPE_OBJECT</code></a> or derived.</p>
785 <p>
786 </p>
787 <div class="variablelist"><table border="0">
788 <col align="left" valign="top">
789 <tbody><tr>
790 <td><p><span class="term"><em class="parameter"><code>class</code></em> :</span></p></td>
791 <td> a <a class="link" href="gobject-The-Base-Object-Type.html#GObjectClass" title="GObjectClass"><span class="type">GObjectClass</span></a>
792 </td>
793 </tr></tbody>
794 </table></div>
795 </div>
796 <hr>
797 <div class="refsect2" lang="en">
798 <a name="G-OBJECT-GET-CLASS--CAPS"></a><h3>G_OBJECT_GET_CLASS()</h3>
799 <pre class="programlisting">#define G_OBJECT_GET_CLASS(object)  (G_TYPE_INSTANCE_GET_CLASS ((object), G_TYPE_OBJECT, GObjectClass))
800 </pre>
801 <p>
802 Get the class structure associated to a <a class="link" href="gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> instance.</p>
803 <p>
804 </p>
805 <div class="variablelist"><table border="0">
806 <col align="left" valign="top">
807 <tbody><tr>
808 <td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
809 <td> a <a class="link" href="gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> instance.
810 </td>
811 </tr></tbody>
812 </table></div>
813 </div>
814 <hr>
815 <div class="refsect2" lang="en">
816 <a name="G-OBJECT-TYPE--CAPS"></a><h3>G_OBJECT_TYPE()</h3>
817 <pre class="programlisting">#define G_OBJECT_TYPE(object)       (G_TYPE_FROM_INSTANCE (object))
818 </pre>
819 <p>
820 Get the type id of an object.</p>
821 <p>
822 </p>
823 <div class="variablelist"><table border="0">
824 <col align="left" valign="top">
825 <tbody><tr>
826 <td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
827 <td> Object to return the type id for.
828 </td>
829 </tr></tbody>
830 </table></div>
831 </div>
832 <hr>
833 <div class="refsect2" lang="en">
834 <a name="G-OBJECT-TYPE-NAME--CAPS"></a><h3>G_OBJECT_TYPE_NAME()</h3>
835 <pre class="programlisting">#define G_OBJECT_TYPE_NAME(object)  (g_type_name (G_OBJECT_TYPE (object)))
836 </pre>
837 <p>
838 Get the name of an object's type.</p>
839 <p>
840 </p>
841 <div class="variablelist"><table border="0">
842 <col align="left" valign="top">
843 <tbody><tr>
844 <td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
845 <td> Object to return the type name for.
846 </td>
847 </tr></tbody>
848 </table></div>
849 </div>
850 <hr>
851 <div class="refsect2" lang="en">
852 <a name="G-OBJECT-CLASS-TYPE--CAPS"></a><h3>G_OBJECT_CLASS_TYPE()</h3>
853 <pre class="programlisting">#define G_OBJECT_CLASS_TYPE(class)  (G_TYPE_FROM_CLASS (class))
854 </pre>
855 <p>
856 Get the type id of a class structure.</p>
857 <p>
858 </p>
859 <div class="variablelist"><table border="0">
860 <col align="left" valign="top">
861 <tbody><tr>
862 <td><p><span class="term"><em class="parameter"><code>class</code></em> :</span></p></td>
863 <td> a valid <a class="link" href="gobject-The-Base-Object-Type.html#GObjectClass" title="GObjectClass"><span class="type">GObjectClass</span></a>
864 </td>
865 </tr></tbody>
866 </table></div>
867 </div>
868 <hr>
869 <div class="refsect2" lang="en">
870 <a name="G-OBJECT-CLASS-NAME--CAPS"></a><h3>G_OBJECT_CLASS_NAME()</h3>
871 <pre class="programlisting">#define G_OBJECT_CLASS_NAME(class)  (g_type_name (G_OBJECT_CLASS_TYPE (class)))
872 </pre>
873 <p>
874 Return the name of a class structure's type.</p>
875 <p>
876 </p>
877 <div class="variablelist"><table border="0">
878 <col align="left" valign="top">
879 <tbody><tr>
880 <td><p><span class="term"><em class="parameter"><code>class</code></em> :</span></p></td>
881 <td> a valid <a class="link" href="gobject-The-Base-Object-Type.html#GObjectClass" title="GObjectClass"><span class="type">GObjectClass</span></a>
882 </td>
883 </tr></tbody>
884 </table></div>
885 </div>
886 <hr>
887 <div class="refsect2" lang="en">
888 <a name="g-object-class-install-property"></a><h3>g_object_class_install_property ()</h3>
889 <pre class="programlisting">void                g_object_class_install_property     (<a class="link" href="gobject-The-Base-Object-Type.html#GObjectClass" title="GObjectClass">GObjectClass</a> *oclass,
890                                                          <a
891 href="./../glib/glib/glib-Basic-Types.html#guint"
892 >guint</a> property_id,
893                                                          <a class="link" href="gobject-GParamSpec.html#GParamSpec" title="GParamSpec">GParamSpec</a> *pspec);</pre>
894 <p>
895 Installs a new property. This is usually done in the class initializer.
896 </p>
897 <p>
898 Note that it is possible to redefine a property in a derived class,
899 by installing a property with the same name. This can be useful at times,
900 e.g. to change the range of allowed values or the default value.</p>
901 <p>
902 </p>
903 <div class="variablelist"><table border="0">
904 <col align="left" valign="top">
905 <tbody>
906 <tr>
907 <td><p><span class="term"><em class="parameter"><code>oclass</code></em> :</span></p></td>
908 <td> a <a class="link" href="gobject-The-Base-Object-Type.html#GObjectClass" title="GObjectClass"><span class="type">GObjectClass</span></a>
909 </td>
910 </tr>
911 <tr>
912 <td><p><span class="term"><em class="parameter"><code>property_id</code></em> :</span></p></td>
913 <td> the id for the new property
914 </td>
915 </tr>
916 <tr>
917 <td><p><span class="term"><em class="parameter"><code>pspec</code></em> :</span></p></td>
918 <td> the <a class="link" href="gobject-GParamSpec.html#GParamSpec" title="GParamSpec"><span class="type">GParamSpec</span></a> for the new property
919 </td>
920 </tr>
921 </tbody>
922 </table></div>
923 </div>
924 <hr>
925 <div class="refsect2" lang="en">
926 <a name="g-object-class-find-property"></a><h3>g_object_class_find_property ()</h3>
927 <pre class="programlisting"><a class="link" href="gobject-GParamSpec.html#GParamSpec" title="GParamSpec">GParamSpec</a>*         g_object_class_find_property        (<a class="link" href="gobject-The-Base-Object-Type.html#GObjectClass" title="GObjectClass">GObjectClass</a> *oclass,
928                                                          const <a
929 href="./../glib/glib/glib-Basic-Types.html#gchar"
930 >gchar</a> *property_name);</pre>
931 <p>
932 Looks up the <a class="link" href="gobject-GParamSpec.html#GParamSpec" title="GParamSpec"><span class="type">GParamSpec</span></a> for a property of a class.</p>
933 <p>
934 </p>
935 <div class="variablelist"><table border="0">
936 <col align="left" valign="top">
937 <tbody>
938 <tr>
939 <td><p><span class="term"><em class="parameter"><code>oclass</code></em> :</span></p></td>
940 <td> a <a class="link" href="gobject-The-Base-Object-Type.html#GObjectClass" title="GObjectClass"><span class="type">GObjectClass</span></a>
941 </td>
942 </tr>
943 <tr>
944 <td><p><span class="term"><em class="parameter"><code>property_name</code></em> :</span></p></td>
945 <td> the name of the property to look up
946 </td>
947 </tr>
948 <tr>
949 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
950 <td> the <a class="link" href="gobject-GParamSpec.html#GParamSpec" title="GParamSpec"><span class="type">GParamSpec</span></a> for the property, or <a
951 href="./../glib/glib/glib-Standard-Macros.html#NULL--CAPS"
952 ><code class="literal">NULL</code></a> if the class
953          doesn't have a property of that name
954 </td>
955 </tr>
956 </tbody>
957 </table></div>
958 </div>
959 <hr>
960 <div class="refsect2" lang="en">
961 <a name="g-object-class-list-properties"></a><h3>g_object_class_list_properties ()</h3>
962 <pre class="programlisting"><a class="link" href="gobject-GParamSpec.html#GParamSpec" title="GParamSpec">GParamSpec</a>**        g_object_class_list_properties      (<a class="link" href="gobject-The-Base-Object-Type.html#GObjectClass" title="GObjectClass">GObjectClass</a> *oclass,
963                                                          <a
964 href="./../glib/glib/glib-Basic-Types.html#guint"
965 >guint</a> *n_properties);</pre>
966 <p>
967 Get an array of <a class="link" href="gobject-GParamSpec.html#GParamSpec" title="GParamSpec"><span class="type">GParamSpec</span></a>* for all properties of a class.</p>
968 <p>
969 </p>
970 <div class="variablelist"><table border="0">
971 <col align="left" valign="top">
972 <tbody>
973 <tr>
974 <td><p><span class="term"><em class="parameter"><code>oclass</code></em> :</span></p></td>
975 <td> a <a class="link" href="gobject-The-Base-Object-Type.html#GObjectClass" title="GObjectClass"><span class="type">GObjectClass</span></a>
976 </td>
977 </tr>
978 <tr>
979 <td><p><span class="term"><em class="parameter"><code>n_properties</code></em> :</span></p></td>
980 <td> return location for the length of the returned array
981 </td>
982 </tr>
983 <tr>
984 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
985 <td> an array of <a class="link" href="gobject-GParamSpec.html#GParamSpec" title="GParamSpec"><span class="type">GParamSpec</span></a>* which should be freed after use
986 </td>
987 </tr>
988 </tbody>
989 </table></div>
990 </div>
991 <hr>
992 <div class="refsect2" lang="en">
993 <a name="g-object-class-override-property"></a><h3>g_object_class_override_property ()</h3>
994 <pre class="programlisting">void                g_object_class_override_property    (<a class="link" href="gobject-The-Base-Object-Type.html#GObjectClass" title="GObjectClass">GObjectClass</a> *oclass,
995                                                          <a
996 href="./../glib/glib/glib-Basic-Types.html#guint"
997 >guint</a> property_id,
998                                                          const <a
999 href="./../glib/glib/glib-Basic-Types.html#gchar"
1000 >gchar</a> *name);</pre>
1001 <p>
1002 Registers <em class="parameter"><code>property_id</code></em> as referring to a property with the
1003 name <em class="parameter"><code>name</code></em> in a parent class or in an interface implemented
1004 by <em class="parameter"><code>oclass</code></em>. This allows this class to <em class="firstterm">override</em>
1005 a property implementation in a parent class or to provide
1006 the implementation of a property from an interface.
1007 </p>
1008 <p>
1009 </p>
1010 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
1011 <h3 class="title">Note</h3>
1012 Internally, overriding is implemented by creating a property of type
1013 <a class="link" href="gobject-Standard-Parameter-and-Value-Types.html#GParamSpecOverride" title="GParamSpecOverride"><span class="type">GParamSpecOverride</span></a>; generally operations that query the properties of
1014 the object class, such as <a class="link" href="gobject-The-Base-Object-Type.html#g-object-class-find-property" title="g_object_class_find_property ()"><code class="function">g_object_class_find_property()</code></a> or
1015 <a class="link" href="gobject-The-Base-Object-Type.html#g-object-class-list-properties" title="g_object_class_list_properties ()"><code class="function">g_object_class_list_properties()</code></a> will return the overridden
1016 property. However, in one case, the <em class="parameter"><code>construct_properties</code></em> argument of
1017 the <em class="parameter"><code>constructor</code></em> virtual function, the <a class="link" href="gobject-Standard-Parameter-and-Value-Types.html#GParamSpecOverride" title="GParamSpecOverride"><span class="type">GParamSpecOverride</span></a> is passed
1018 instead, so that the <em class="parameter"><code>param_id</code></em> field of the <a class="link" href="gobject-GParamSpec.html#GParamSpec" title="GParamSpec"><span class="type">GParamSpec</span></a> will be
1019 correct.  For virtually all uses, this makes no difference. If you
1020 need to get the overridden property, you can call
1021 <a class="link" href="gobject-GParamSpec.html#g-param-spec-get-redirect-target" title="g_param_spec_get_redirect_target ()"><code class="function">g_param_spec_get_redirect_target()</code></a>.
1022 </div>
1023 <p>
1024 </p>
1025 <div class="variablelist"><table border="0">
1026 <col align="left" valign="top">
1027 <tbody>
1028 <tr>
1029 <td><p><span class="term"><em class="parameter"><code>oclass</code></em> :</span></p></td>
1030 <td> a <a class="link" href="gobject-The-Base-Object-Type.html#GObjectClass" title="GObjectClass"><span class="type">GObjectClass</span></a>
1031 </td>
1032 </tr>
1033 <tr>
1034 <td><p><span class="term"><em class="parameter"><code>property_id</code></em> :</span></p></td>
1035 <td> the new property ID
1036 </td>
1037 </tr>
1038 <tr>
1039 <td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
1040 <td> the name of a property registered in a parent class or
1041  in an interface of this class.
1042 </td>
1043 </tr>
1044 </tbody>
1045 </table></div>
1046 <p class="since">Since 2.4</p>
1047 </div>
1048 <hr>
1049 <div class="refsect2" lang="en">
1050 <a name="g-object-interface-install-property"></a><h3>g_object_interface_install_property ()</h3>
1051 <pre class="programlisting">void                g_object_interface_install_property (<a
1052 href="./../glib/glib/glib-Basic-Types.html#gpointer"
1053 >gpointer</a> g_iface,
1054                                                          <a class="link" href="gobject-GParamSpec.html#GParamSpec" title="GParamSpec">GParamSpec</a> *pspec);</pre>
1055 <p>
1056 Add a property to an interface; this is only useful for interfaces
1057 that are added to GObject-derived types. Adding a property to an
1058 interface forces all objects classes with that interface to have a
1059 compatible property. The compatible property could be a newly
1060 created <a class="link" href="gobject-GParamSpec.html#GParamSpec" title="GParamSpec"><span class="type">GParamSpec</span></a>, but normally
1061 <a class="link" href="gobject-The-Base-Object-Type.html#g-object-class-override-property" title="g_object_class_override_property ()"><code class="function">g_object_class_override_property()</code></a> will be used so that the object
1062 class only needs to provide an implementation and inherits the
1063 property description, default value, bounds, and so forth from the
1064 interface property.
1065 </p>
1066 <p>
1067 This function is meant to be called from the interface's default
1068 vtable initialization function (the <em class="parameter"><code>class_init</code></em> member of
1069 <a class="link" href="gobject-Type-Information.html#GTypeInfo" title="GTypeInfo"><span class="type">GTypeInfo</span></a>.) It must not be called after after <em class="parameter"><code>class_init</code></em> has
1070 been called for any object types implementing this interface.</p>
1071 <p>
1072 </p>
1073 <div class="variablelist"><table border="0">
1074 <col align="left" valign="top">
1075 <tbody>
1076 <tr>
1077 <td><p><span class="term"><em class="parameter"><code>g_iface</code></em> :</span></p></td>
1078 <td> any interface vtable for the interface, or the default
1079  vtable for the interface.
1080 </td>
1081 </tr>
1082 <tr>
1083 <td><p><span class="term"><em class="parameter"><code>pspec</code></em> :</span></p></td>
1084 <td> the <a class="link" href="gobject-GParamSpec.html#GParamSpec" title="GParamSpec"><span class="type">GParamSpec</span></a> for the new property
1085 </td>
1086 </tr>
1087 </tbody>
1088 </table></div>
1089 <p class="since">Since 2.4</p>
1090 </div>
1091 <hr>
1092 <div class="refsect2" lang="en">
1093 <a name="g-object-interface-find-property"></a><h3>g_object_interface_find_property ()</h3>
1094 <pre class="programlisting"><a class="link" href="gobject-GParamSpec.html#GParamSpec" title="GParamSpec">GParamSpec</a>*         g_object_interface_find_property    (<a
1095 href="./../glib/glib/glib-Basic-Types.html#gpointer"
1096 >gpointer</a> g_iface,
1097                                                          const <a
1098 href="./../glib/glib/glib-Basic-Types.html#gchar"
1099 >gchar</a> *property_name);</pre>
1100 <p>
1101 Find the <a class="link" href="gobject-GParamSpec.html#GParamSpec" title="GParamSpec"><span class="type">GParamSpec</span></a> with the given name for an
1102 interface. Generally, the interface vtable passed in as <em class="parameter"><code>g_iface</code></em>
1103 will be the default vtable from <a class="link" href="gobject-Type-Information.html#g-type-default-interface-ref" title="g_type_default_interface_ref ()"><code class="function">g_type_default_interface_ref()</code></a>, or,
1104 if you know the interface has already been loaded,
1105 <a class="link" href="gobject-Type-Information.html#g-type-default-interface-peek" title="g_type_default_interface_peek ()"><code class="function">g_type_default_interface_peek()</code></a>.</p>
1106 <p>
1107 </p>
1108 <div class="variablelist"><table border="0">
1109 <col align="left" valign="top">
1110 <tbody>
1111 <tr>
1112 <td><p><span class="term"><em class="parameter"><code>g_iface</code></em> :</span></p></td>
1113 <td> any interface vtable for the interface, or the default
1114  vtable for the interface
1115 </td>
1116 </tr>
1117 <tr>
1118 <td><p><span class="term"><em class="parameter"><code>property_name</code></em> :</span></p></td>
1119 <td> name of a property to lookup.
1120 </td>
1121 </tr>
1122 <tr>
1123 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1124 <td> the <a class="link" href="gobject-GParamSpec.html#GParamSpec" title="GParamSpec"><span class="type">GParamSpec</span></a> for the property of the interface with the
1125          name <em class="parameter"><code>property_name</code></em>, or <a
1126 href="./../glib/glib/glib-Standard-Macros.html#NULL--CAPS"
1127 ><code class="literal">NULL</code></a> if no such property exists.
1128 </td>
1129 </tr>
1130 </tbody>
1131 </table></div>
1132 <p class="since">Since 2.4</p>
1133 </div>
1134 <hr>
1135 <div class="refsect2" lang="en">
1136 <a name="g-object-interface-list-properties"></a><h3>g_object_interface_list_properties ()</h3>
1137 <pre class="programlisting"><a class="link" href="gobject-GParamSpec.html#GParamSpec" title="GParamSpec">GParamSpec</a>**        g_object_interface_list_properties  (<a
1138 href="./../glib/glib/glib-Basic-Types.html#gpointer"
1139 >gpointer</a> g_iface,
1140                                                          <a
1141 href="./../glib/glib/glib-Basic-Types.html#guint"
1142 >guint</a> *n_properties_p);</pre>
1143 <p>
1144 Lists the properties of an interface.Generally, the interface
1145 vtable passed in as <em class="parameter"><code>g_iface</code></em> will be the default vtable from
1146 <a class="link" href="gobject-Type-Information.html#g-type-default-interface-ref" title="g_type_default_interface_ref ()"><code class="function">g_type_default_interface_ref()</code></a>, or, if you know the interface has
1147 already been loaded, <a class="link" href="gobject-Type-Information.html#g-type-default-interface-peek" title="g_type_default_interface_peek ()"><code class="function">g_type_default_interface_peek()</code></a>.</p>
1148 <p>
1149 </p>
1150 <div class="variablelist"><table border="0">
1151 <col align="left" valign="top">
1152 <tbody>
1153 <tr>
1154 <td><p><span class="term"><em class="parameter"><code>g_iface</code></em> :</span></p></td>
1155 <td> any interface vtable for the interface, or the default
1156  vtable for the interface
1157 </td>
1158 </tr>
1159 <tr>
1160 <td><p><span class="term"><em class="parameter"><code>n_properties_p</code></em> :</span></p></td>
1161 <td> location to store number of properties returned.
1162 </td>
1163 </tr>
1164 <tr>
1165 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1166 <td> a pointer to an array of pointers to <a class="link" href="gobject-GParamSpec.html#GParamSpec" title="GParamSpec"><span class="type">GParamSpec</span></a>
1167          structures. The paramspecs are owned by GLib, but the
1168          array should be freed with <a
1169 href="./../glib/glib/glib-Memory-Allocation.html#g-free"
1170 ><code class="function">g_free()</code></a> when you are done with
1171          it.
1172 </td>
1173 </tr>
1174 </tbody>
1175 </table></div>
1176 <p class="since">Since 2.4</p>
1177 </div>
1178 <hr>
1179 <div class="refsect2" lang="en">
1180 <a name="g-object-new"></a><h3>g_object_new ()</h3>
1181 <pre class="programlisting"><a
1182 href="./../glib/glib/glib-Basic-Types.html#gpointer"
1183 >gpointer</a>            g_object_new                        (<a class="link" href="gobject-Type-Information.html#GType" title="GType">GType</a> object_type,
1184                                                          const <a
1185 href="./../glib/glib/glib-Basic-Types.html#gchar"
1186 >gchar</a> *first_property_name,
1187                                                          ...);</pre>
1188 <p>
1189 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.
1190 </p>
1191 <p>
1192 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>)
1193 which are not explicitly specified are set to their default values.</p>
1194 <p>
1195 </p>
1196 <div class="variablelist"><table border="0">
1197 <col align="left" valign="top">
1198 <tbody>
1199 <tr>
1200 <td><p><span class="term"><em class="parameter"><code>object_type</code></em> :</span></p></td>
1201 <td> the type id of the <a class="link" href="gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> subtype to instantiate
1202 </td>
1203 </tr>
1204 <tr>
1205 <td><p><span class="term"><em class="parameter"><code>first_property_name</code></em> :</span></p></td>
1206 <td> the name of the first property
1207 </td>
1208 </tr>
1209 <tr>
1210 <td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
1211 <td> the value of the first property, followed optionally by more
1212  name/value pairs, followed by <a
1213 href="./../glib/glib/glib-Standard-Macros.html#NULL--CAPS"
1214 ><code class="literal">NULL</code></a>
1215 </td>
1216 </tr>
1217 <tr>
1218 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1219 <td> a new instance of <em class="parameter"><code>object_type</code></em>
1220 </td>
1221 </tr>
1222 </tbody>
1223 </table></div>
1224 </div>
1225 <hr>
1226 <div class="refsect2" lang="en">
1227 <a name="g-object-newv"></a><h3>g_object_newv ()</h3>
1228 <pre class="programlisting"><a
1229 href="./../glib/glib/glib-Basic-Types.html#gpointer"
1230 >gpointer</a>            g_object_newv                       (<a class="link" href="gobject-Type-Information.html#GType" title="GType">GType</a> object_type,
1231                                                          <a
1232 href="./../glib/glib/glib-Basic-Types.html#guint"
1233 >guint</a> n_parameters,
1234                                                          <a class="link" href="gobject-The-Base-Object-Type.html#GParameter" title="GParameter">GParameter</a> *parameters);</pre>
1235 <p>
1236 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.
1237 </p>
1238 <p>
1239 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>)
1240 which are not explicitly specified are set to their default values.</p>
1241 <p>
1242 </p>
1243 <div class="variablelist"><table border="0">
1244 <col align="left" valign="top">
1245 <tbody>
1246 <tr>
1247 <td><p><span class="term"><em class="parameter"><code>object_type</code></em> :</span></p></td>
1248 <td> the type id of the <a class="link" href="gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> subtype to instantiate
1249 </td>
1250 </tr>
1251 <tr>
1252 <td><p><span class="term"><em class="parameter"><code>n_parameters</code></em> :</span></p></td>
1253 <td> the length of the <em class="parameter"><code>parameters</code></em> array
1254 </td>
1255 </tr>
1256 <tr>
1257 <td><p><span class="term"><em class="parameter"><code>parameters</code></em> :</span></p></td>
1258 <td> an array of <a class="link" href="gobject-The-Base-Object-Type.html#GParameter" title="GParameter"><span class="type">GParameter</span></a>
1259 </td>
1260 </tr>
1261 <tr>
1262 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1263 <td> a new instance of <em class="parameter"><code>object_type</code></em>
1264 </td>
1265 </tr>
1266 </tbody>
1267 </table></div>
1268 </div>
1269 <hr>
1270 <div class="refsect2" lang="en">
1271 <a name="GParameter"></a><h3>GParameter</h3>
1272 <pre class="programlisting">typedef struct {
1273   const gchar *name;
1274   GValue       value;
1275 } GParameter;
1276 </pre>
1277 <p>
1278 The <span class="structname">GParameter</span> struct is an auxiliary structure used
1279 to hand parameter name/value pairs to <a class="link" href="gobject-The-Base-Object-Type.html#g-object-newv" title="g_object_newv ()"><code class="function">g_object_newv()</code></a>.</p>
1280 <p>
1281 </p>
1282 <div class="variablelist"><table border="0">
1283 <col align="left" valign="top">
1284 <tbody>
1285 <tr>
1286 <td><p><span class="term">const <a
1287 href="./../glib/glib/glib-Basic-Types.html#gchar"
1288 >gchar</a> *<em class="structfield"><code>name</code></em>;</span></p></td>
1289 <td> the parameter name
1290 </td>
1291 </tr>
1292 <tr>
1293 <td><p><span class="term"><a class="link" href="gobject-Generic-values.html#GValue" title="GValue">GValue</a> <em class="structfield"><code>value</code></em>;</span></p></td>
1294 <td> the parameter value
1295 </td>
1296 </tr>
1297 </tbody>
1298 </table></div>
1299 </div>
1300 <hr>
1301 <div class="refsect2" lang="en">
1302 <a name="g-object-ref"></a><h3>g_object_ref ()</h3>
1303 <pre class="programlisting"><a
1304 href="./../glib/glib/glib-Basic-Types.html#gpointer"
1305 >gpointer</a>            g_object_ref                        (<a
1306 href="./../glib/glib/glib-Basic-Types.html#gpointer"
1307 >gpointer</a> object);</pre>
1308 <p>
1309 Increases the reference count of <em class="parameter"><code>object</code></em>.</p>
1310 <p>
1311 </p>
1312 <div class="variablelist"><table border="0">
1313 <col align="left" valign="top">
1314 <tbody>
1315 <tr>
1316 <td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
1317 <td> a <a class="link" href="gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a>
1318 </td>
1319 </tr>
1320 <tr>
1321 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1322 <td> the same <em class="parameter"><code>object</code></em>
1323 </td>
1324 </tr>
1325 </tbody>
1326 </table></div>
1327 </div>
1328 <hr>
1329 <div class="refsect2" lang="en">
1330 <a name="g-object-unref"></a><h3>g_object_unref ()</h3>
1331 <pre class="programlisting">void                g_object_unref                      (<a
1332 href="./../glib/glib/glib-Basic-Types.html#gpointer"
1333 >gpointer</a> object);</pre>
1334 <p>
1335 Decreases the reference count of <em class="parameter"><code>object</code></em>. When its reference count
1336 drops to 0, the object is finalized (i.e. its memory is freed).</p>
1337 <p>
1338 </p>
1339 <div class="variablelist"><table border="0">
1340 <col align="left" valign="top">
1341 <tbody><tr>
1342 <td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
1343 <td> a <a class="link" href="gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a>
1344 </td>
1345 </tr></tbody>
1346 </table></div>
1347 </div>
1348 <hr>
1349 <div class="refsect2" lang="en">
1350 <a name="g-object-ref-sink"></a><h3>g_object_ref_sink ()</h3>
1351 <pre class="programlisting"><a
1352 href="./../glib/glib/glib-Basic-Types.html#gpointer"
1353 >gpointer</a>            g_object_ref_sink                   (<a
1354 href="./../glib/glib/glib-Basic-Types.html#gpointer"
1355 >gpointer</a> object);</pre>
1356 <p>
1357 Increase the reference count of <em class="parameter"><code>object</code></em>, and possibly remove the
1358 <a class="link" href="gobject-The-Base-Object-Type.html#floating-ref">floating</a> reference, if <em class="parameter"><code>object</code></em>
1359 has a floating reference.
1360 </p>
1361 <p>
1362 In other words, if the object is floating, then this call "assumes
1363 ownership" of the floating reference, converting it to a normal
1364 reference by clearing the floating flag while leaving the reference
1365 count unchanged.  If the object is not floating, then this call
1366 adds a new normal reference increasing the reference count by one.</p>
1367 <p>
1368 </p>
1369 <div class="variablelist"><table border="0">
1370 <col align="left" valign="top">
1371 <tbody>
1372 <tr>
1373 <td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
1374 <td> a <a class="link" href="gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a>
1375 </td>
1376 </tr>
1377 <tr>
1378 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1379 <td> <em class="parameter"><code>object</code></em>
1380 </td>
1381 </tr>
1382 </tbody>
1383 </table></div>
1384 <p class="since">Since 2.10</p>
1385 </div>
1386 <hr>
1387 <div class="refsect2" lang="en">
1388 <a name="GInitiallyUnowned"></a><h3>GInitiallyUnowned</h3>
1389 <pre class="programlisting">typedef struct _GObject                  GInitiallyUnowned;
1390 </pre>
1391 <p>
1392 All the fields in the <span class="structname">GInitiallyUnowned</span> structure 
1393 are private to the <a class="link" href="gobject-The-Base-Object-Type.html#GInitiallyUnowned" title="GInitiallyUnowned"><span class="type">GInitiallyUnowned</span></a> implementation and should never be 
1394 accessed directly.</p>
1395 <p>
1396 </p>
1397 </div>
1398 <hr>
1399 <div class="refsect2" lang="en">
1400 <a name="GInitiallyUnownedClass"></a><h3>GInitiallyUnownedClass</h3>
1401 <pre class="programlisting">typedef struct _GObjectClass             GInitiallyUnownedClass;
1402 </pre>
1403 <p>
1404 The class structure for the <span class="structname">GInitiallyUnowned</span> type.</p>
1405 <p>
1406 </p>
1407 </div>
1408 <hr>
1409 <div class="refsect2" lang="en">
1410 <a name="G-TYPE-INITIALLY-UNOWNED--CAPS"></a><h3>G_TYPE_INITIALLY_UNOWNED</h3>
1411 <pre class="programlisting">#define G_TYPE_INITIALLY_UNOWNED          (g_initially_unowned_get_type())
1412 </pre>
1413 <p>
1414 The type for <a class="link" href="gobject-The-Base-Object-Type.html#GInitiallyUnowned" title="GInitiallyUnowned"><span class="type">GInitiallyUnowned</span></a>.</p>
1415 <p>
1416 </p>
1417 </div>
1418 <hr>
1419 <div class="refsect2" lang="en">
1420 <a name="g-object-is-floating"></a><h3>g_object_is_floating ()</h3>
1421 <pre class="programlisting"><a
1422 href="./../glib/glib/glib-Basic-Types.html#gboolean"
1423 >gboolean</a>            g_object_is_floating                (<a
1424 href="./../glib/glib/glib-Basic-Types.html#gpointer"
1425 >gpointer</a> object);</pre>
1426 <p>
1427 Checks wether <em class="parameter"><code>object</code></em> has a <a class="link" href="gobject-The-Base-Object-Type.html#floating-ref">floating</a>
1428 reference.</p>
1429 <p>
1430 </p>
1431 <div class="variablelist"><table border="0">
1432 <col align="left" valign="top">
1433 <tbody>
1434 <tr>
1435 <td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
1436 <td> a <a class="link" href="gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a>
1437 </td>
1438 </tr>
1439 <tr>
1440 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1441 <td> <a
1442 href="./../glib/glib/glib-Standard-Macros.html#TRUE--CAPS"
1443 ><code class="literal">TRUE</code></a> if <em class="parameter"><code>object</code></em> has a floating reference
1444 </td>
1445 </tr>
1446 </tbody>
1447 </table></div>
1448 <p class="since">Since 2.10</p>
1449 </div>
1450 <hr>
1451 <div class="refsect2" lang="en">
1452 <a name="g-object-force-floating"></a><h3>g_object_force_floating ()</h3>
1453 <pre class="programlisting">void                g_object_force_floating             (<a class="link" href="gobject-The-Base-Object-Type.html#GObject">GObject</a> *object);</pre>
1454 <p>
1455 This function is intended for <a class="link" href="gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> implementations to re-enforce a
1456 <a class="link" href="gobject-The-Base-Object-Type.html#floating-ref">floating</a> object reference.
1457 Doing this is seldomly required, all
1458 <a class="link" href="gobject-The-Base-Object-Type.html#GInitiallyUnowned" title="GInitiallyUnowned"><span class="type">GInitiallyUnowned</span></a>s are created with a floating reference which
1459 usually just needs to be sunken by calling <a class="link" href="gobject-The-Base-Object-Type.html#g-object-ref-sink" title="g_object_ref_sink ()"><code class="function">g_object_ref_sink()</code></a>.</p>
1460 <p>
1461 </p>
1462 <div class="variablelist"><table border="0">
1463 <col align="left" valign="top">
1464 <tbody><tr>
1465 <td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
1466 <td> a <a class="link" href="gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a>
1467 </td>
1468 </tr></tbody>
1469 </table></div>
1470 <p class="since">Since 2.10</p>
1471 </div>
1472 <hr>
1473 <div class="refsect2" lang="en">
1474 <a name="GWeakNotify"></a><h3>GWeakNotify ()</h3>
1475 <pre class="programlisting">void                (*GWeakNotify)                      (<a
1476 href="./../glib/glib/glib-Basic-Types.html#gpointer"
1477 >gpointer</a> data,
1478                                                          <a class="link" href="gobject-The-Base-Object-Type.html#GObject">GObject</a> *where_the_object_was);</pre>
1479 <p>
1480 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
1481 triggered when the object is finalized. Since the object is already being
1482 finalized when the <a class="link" href="gobject-The-Base-Object-Type.html#GWeakNotify" title="GWeakNotify ()"><span class="type">GWeakNotify</span></a> is called, there's not much you could do 
1483 with the object, apart from e.g. using its adress as hash-index or the like.</p>
1484 <p>
1485 </p>
1486 <div class="variablelist"><table border="0">
1487 <col align="left" valign="top">
1488 <tbody>
1489 <tr>
1490 <td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
1491 <td> data that was provided when the weak reference was established
1492 </td>
1493 </tr>
1494 <tr>
1495 <td><p><span class="term"><em class="parameter"><code>where_the_object_was</code></em> :</span></p></td>
1496 <td> the object being finalized
1497 </td>
1498 </tr>
1499 </tbody>
1500 </table></div>
1501 </div>
1502 <hr>
1503 <div class="refsect2" lang="en">
1504 <a name="g-object-weak-ref"></a><h3>g_object_weak_ref ()</h3>
1505 <pre class="programlisting">void                g_object_weak_ref                   (<a class="link" href="gobject-The-Base-Object-Type.html#GObject">GObject</a> *object,
1506                                                          <a class="link" href="gobject-The-Base-Object-Type.html#GWeakNotify" title="GWeakNotify ()">GWeakNotify</a> notify,
1507                                                          <a
1508 href="./../glib/glib/glib-Basic-Types.html#gpointer"
1509 >gpointer</a> data);</pre>
1510 <p>
1511 Adds a weak reference callback to an object. Weak references are
1512 used for notification when an object is finalized. They are called
1513 "weak references" because they allow you to safely hold a pointer
1514 to an object without calling <a class="link" href="gobject-The-Base-Object-Type.html#g-object-ref" title="g_object_ref ()"><code class="function">g_object_ref()</code></a> (<a class="link" href="gobject-The-Base-Object-Type.html#g-object-ref" title="g_object_ref ()"><code class="function">g_object_ref()</code></a> adds a
1515 strong reference, that is, forces the object to stay alive).</p>
1516 <p>
1517 </p>
1518 <div class="variablelist"><table border="0">
1519 <col align="left" valign="top">
1520 <tbody>
1521 <tr>
1522 <td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
1523 <td> <a class="link" href="gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> to reference weakly
1524 </td>
1525 </tr>
1526 <tr>
1527 <td><p><span class="term"><em class="parameter"><code>notify</code></em> :</span></p></td>
1528 <td> callback to invoke before the object is freed
1529 </td>
1530 </tr>
1531 <tr>
1532 <td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
1533 <td> extra data to pass to notify
1534 </td>
1535 </tr>
1536 </tbody>
1537 </table></div>
1538 </div>
1539 <hr>
1540 <div class="refsect2" lang="en">
1541 <a name="g-object-weak-unref"></a><h3>g_object_weak_unref ()</h3>
1542 <pre class="programlisting">void                g_object_weak_unref                 (<a class="link" href="gobject-The-Base-Object-Type.html#GObject">GObject</a> *object,
1543                                                          <a class="link" href="gobject-The-Base-Object-Type.html#GWeakNotify" title="GWeakNotify ()">GWeakNotify</a> notify,
1544                                                          <a
1545 href="./../glib/glib/glib-Basic-Types.html#gpointer"
1546 >gpointer</a> data);</pre>
1547 <p>
1548 Removes a weak reference callback to an object.</p>
1549 <p>
1550 </p>
1551 <div class="variablelist"><table border="0">
1552 <col align="left" valign="top">
1553 <tbody>
1554 <tr>
1555 <td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
1556 <td> <a class="link" href="gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> to remove a weak reference from
1557 </td>
1558 </tr>
1559 <tr>
1560 <td><p><span class="term"><em class="parameter"><code>notify</code></em> :</span></p></td>
1561 <td> callback to search for
1562 </td>
1563 </tr>
1564 <tr>
1565 <td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
1566 <td> data to search for
1567 </td>
1568 </tr>
1569 </tbody>
1570 </table></div>
1571 </div>
1572 <hr>
1573 <div class="refsect2" lang="en">
1574 <a name="g-object-add-weak-pointer"></a><h3>g_object_add_weak_pointer ()</h3>
1575 <pre class="programlisting">void                g_object_add_weak_pointer           (<a class="link" href="gobject-The-Base-Object-Type.html#GObject">GObject</a> *object,
1576                                                          <a
1577 href="./../glib/glib/glib-Basic-Types.html#gpointer"
1578 >gpointer</a> *weak_pointer_location);</pre>
1579 <p>
1580 Adds a weak reference from weak_pointer to <em class="parameter"><code>object</code></em> to indicate that
1581 the pointer located at <em class="parameter"><code>weak_pointer_location</code></em> is only valid during
1582 the lifetime of <em class="parameter"><code>object</code></em>. When the <em class="parameter"><code>object</code></em> is finalized,
1583 <em class="parameter"><code>weak_pointer</code></em> will be set to <a
1584 href="./../glib/glib/glib-Standard-Macros.html#NULL--CAPS"
1585 ><code class="literal">NULL</code></a>.</p>
1586 <p>
1587 </p>
1588 <div class="variablelist"><table border="0">
1589 <col align="left" valign="top">
1590 <tbody>
1591 <tr>
1592 <td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
1593 <td> The object that should be weak referenced.
1594 </td>
1595 </tr>
1596 <tr>
1597 <td><p><span class="term"><em class="parameter"><code>weak_pointer_location</code></em> :</span></p></td>
1598 <td> The memory address of a pointer.
1599 </td>
1600 </tr>
1601 </tbody>
1602 </table></div>
1603 </div>
1604 <hr>
1605 <div class="refsect2" lang="en">
1606 <a name="g-object-remove-weak-pointer"></a><h3>g_object_remove_weak_pointer ()</h3>
1607 <pre class="programlisting">void                g_object_remove_weak_pointer        (<a class="link" href="gobject-The-Base-Object-Type.html#GObject">GObject</a> *object,
1608                                                          <a
1609 href="./../glib/glib/glib-Basic-Types.html#gpointer"
1610 >gpointer</a> *weak_pointer_location);</pre>
1611 <p>
1612 Removes a weak reference from <em class="parameter"><code>object</code></em> that was previously added
1613 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> has
1614 to match the one used with <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>.</p>
1615 <p>
1616 </p>
1617 <div class="variablelist"><table border="0">
1618 <col align="left" valign="top">
1619 <tbody>
1620 <tr>
1621 <td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
1622 <td> The object that is weak referenced.
1623 </td>
1624 </tr>
1625 <tr>
1626 <td><p><span class="term"><em class="parameter"><code>weak_pointer_location</code></em> :</span></p></td>
1627 <td> The memory address of a pointer.
1628 </td>
1629 </tr>
1630 </tbody>
1631 </table></div>
1632 </div>
1633 <hr>
1634 <div class="refsect2" lang="en">
1635 <a name="GToggleNotify"></a><h3>GToggleNotify ()</h3>
1636 <pre class="programlisting">void                (*GToggleNotify)                    (<a
1637 href="./../glib/glib/glib-Basic-Types.html#gpointer"
1638 >gpointer</a> data,
1639                                                          <a class="link" href="gobject-The-Base-Object-Type.html#GObject">GObject</a> *object,
1640                                                          <a
1641 href="./../glib/glib/glib-Basic-Types.html#gboolean"
1642 >gboolean</a> is_last_ref);</pre>
1643 <p>
1644 A callback function used for notification when the state
1645 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>
1646 <p>
1647 </p>
1648 <div class="variablelist"><table border="0">
1649 <col align="left" valign="top">
1650 <tbody>
1651 <tr>
1652 <td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
1653 <td> Callback data passed to <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>
1654 </td>
1655 </tr>
1656 <tr>
1657 <td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
1658 <td> The object on which <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> was called.
1659 </td>
1660 </tr>
1661 <tr>
1662 <td><p><span class="term"><em class="parameter"><code>is_last_ref</code></em> :</span></p></td>
1663 <td> <a
1664 href="./../glib/glib/glib-Standard-Macros.html#TRUE--CAPS"
1665 ><code class="literal">TRUE</code></a> if the toggle reference is now the
1666  last reference to the object. <a
1667 href="./../glib/glib/glib-Standard-Macros.html#FALSE--CAPS"
1668 ><code class="literal">FALSE</code></a> if the toggle
1669  reference was the last reference and there are now other
1670  references.
1671 </td>
1672 </tr>
1673 </tbody>
1674 </table></div>
1675 </div>
1676 <hr>
1677 <div class="refsect2" lang="en">
1678 <a name="g-object-add-toggle-ref"></a><h3>g_object_add_toggle_ref ()</h3>
1679 <pre class="programlisting">void                g_object_add_toggle_ref             (<a class="link" href="gobject-The-Base-Object-Type.html#GObject">GObject</a> *object,
1680                                                          <a class="link" href="gobject-The-Base-Object-Type.html#GToggleNotify" title="GToggleNotify ()">GToggleNotify</a> notify,
1681                                                          <a
1682 href="./../glib/glib/glib-Basic-Types.html#gpointer"
1683 >gpointer</a> data);</pre>
1684 <p>
1685 Increases the reference count of the object by one and sets a
1686 callback to be called when all other references to the object are
1687 dropped, or when this is already the last reference to the object
1688 and another reference is established.
1689 </p>
1690 <p>
1691 This functionality is intended for binding <em class="parameter"><code>object</code></em> to a proxy
1692 object managed by another memory manager. This is done with two
1693 paired references: the strong reference added by
1694 <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> and a reverse reference to the proxy
1695 object which is either a strong reference or weak reference.
1696 </p>
1697 <p>
1698 The setup is that when there are no other references to <em class="parameter"><code>object</code></em>,
1699 only a weak reference is held in the reverse direction from <em class="parameter"><code>object</code></em>
1700 to the proxy object, but when there are other references held to
1701 <em class="parameter"><code>object</code></em>, a strong reference is held. The <em class="parameter"><code>notify</code></em> callback is called
1702 when the reference from <em class="parameter"><code>object</code></em> to the proxy object should be
1703 <em class="firstterm">toggled</em> from strong to weak (<em class="parameter"><code>is_last_ref</code></em>
1704 true) or weak to strong (<em class="parameter"><code>is_last_ref</code></em> false).
1705 </p>
1706 <p>
1707 Since a (normal) reference must be held to the object before
1708 calling <code class="function">g_object_toggle_ref()</code>, the initial state of the reverse
1709 link is always strong.
1710 </p>
1711 <p>
1712 Multiple toggle references may be added to the same gobject,
1713 however if there are multiple toggle references to an object, none
1714 of them will ever be notified until all but one are removed.  For
1715 this reason, you should only ever use a toggle reference if there
1716 is important state in the proxy object.</p>
1717 <p>
1718 </p>
1719 <div class="variablelist"><table border="0">
1720 <col align="left" valign="top">
1721 <tbody>
1722 <tr>
1723 <td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
1724 <td> a <a class="link" href="gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a>
1725 </td>
1726 </tr>
1727 <tr>
1728 <td><p><span class="term"><em class="parameter"><code>notify</code></em> :</span></p></td>
1729 <td> a function to call when this reference is the
1730  last reference to the object, or is no longer
1731  the last reference.
1732 </td>
1733 </tr>
1734 <tr>
1735 <td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
1736 <td> data to pass to <em class="parameter"><code>notify</code></em>
1737 </td>
1738 </tr>
1739 </tbody>
1740 </table></div>
1741 <p class="since">Since 2.8</p>
1742 </div>
1743 <hr>
1744 <div class="refsect2" lang="en">
1745 <a name="g-object-remove-toggle-ref"></a><h3>g_object_remove_toggle_ref ()</h3>
1746 <pre class="programlisting">void                g_object_remove_toggle_ref          (<a class="link" href="gobject-The-Base-Object-Type.html#GObject">GObject</a> *object,
1747                                                          <a class="link" href="gobject-The-Base-Object-Type.html#GToggleNotify" title="GToggleNotify ()">GToggleNotify</a> notify,
1748                                                          <a
1749 href="./../glib/glib/glib-Basic-Types.html#gpointer"
1750 >gpointer</a> data);</pre>
1751 <p>
1752 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
1753 reference count of the object is decreased by one.</p>
1754 <p>
1755 </p>
1756 <div class="variablelist"><table border="0">
1757 <col align="left" valign="top">
1758 <tbody>
1759 <tr>
1760 <td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
1761 <td> a <a class="link" href="gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a>
1762 </td>
1763 </tr>
1764 <tr>
1765 <td><p><span class="term"><em class="parameter"><code>notify</code></em> :</span></p></td>
1766 <td> a function to call when this reference is the
1767  last reference to the object, or is no longer
1768  the last reference.
1769 </td>
1770 </tr>
1771 <tr>
1772 <td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
1773 <td> data to pass to <em class="parameter"><code>notify</code></em>
1774 </td>
1775 </tr>
1776 </tbody>
1777 </table></div>
1778 <p class="since">Since 2.8</p>
1779 </div>
1780 <hr>
1781 <div class="refsect2" lang="en">
1782 <a name="g-object-connect"></a><h3>g_object_connect ()</h3>
1783 <pre class="programlisting"><a
1784 href="./../glib/glib/glib-Basic-Types.html#gpointer"
1785 >gpointer</a>            g_object_connect                    (<a
1786 href="./../glib/glib/glib-Basic-Types.html#gpointer"
1787 >gpointer</a> object,
1788                                                          const <a
1789 href="./../glib/glib/glib-Basic-Types.html#gchar"
1790 >gchar</a> *signal_spec,
1791                                                          ...);</pre>
1792 <p>
1793 A convenience function to connect multiple signals at once.
1794 </p>
1795 <p>
1796 The signal specs expected by this function have the form
1797 "modifier::signal_name", where modifier can be one of the following:
1798 </p>
1799 <div class="variablelist"><table border="0">
1800 <col align="left" valign="top">
1801 <tbody>
1802 <tr>
1803 <td><p><span class="term">signal</span></p></td>
1804 <td><p>
1805 equivalent to <code class="literal">g_signal_connect_data (..., NULL, 0)</code>
1806 </p></td>
1807 </tr>
1808 <tr>
1809 <td><p><span class="term">object_signal, </span><span class="term">object-signal</span></p></td>
1810 <td><p>
1811 equivalent to <code class="literal">g_signal_connect_object (..., 0)</code>
1812 </p></td>
1813 </tr>
1814 <tr>
1815 <td><p><span class="term">swapped_signal, </span><span class="term">swapped-signal</span></p></td>
1816 <td><p>
1817 equivalent to <code class="literal">g_signal_connect_data (..., NULL, G_CONNECT_SWAPPED)</code>
1818 </p></td>
1819 </tr>
1820 <tr>
1821 <td><p><span class="term">swapped_object_signal, </span><span class="term">swapped-object-signal</span></p></td>
1822 <td><p>
1823 equivalent to <code class="literal">g_signal_connect_object (..., G_CONNECT_SWAPPED)</code>
1824 </p></td>
1825 </tr>
1826 <tr>
1827 <td><p><span class="term">signal_after, </span><span class="term">signal-after</span></p></td>
1828 <td><p>
1829 equivalent to <code class="literal">g_signal_connect_data (..., NULL, G_CONNECT_AFTER)</code>
1830 </p></td>
1831 </tr>
1832 <tr>
1833 <td><p><span class="term">object_signal_after, </span><span class="term">object-signal-after</span></p></td>
1834 <td><p>
1835 equivalent to <code class="literal">g_signal_connect_object (..., G_CONNECT_AFTER)</code>
1836 </p></td>
1837 </tr>
1838 <tr>
1839 <td><p><span class="term">swapped_signal_after, </span><span class="term">swapped-signal-after</span></p></td>
1840 <td><p>
1841 equivalent to <code class="literal">g_signal_connect_data (..., NULL, G_CONNECT_SWAPPED | G_CONNECT_AFTER)</code>
1842 </p></td>
1843 </tr>
1844 <tr>
1845 <td><p><span class="term">swapped_object_signal_after, </span><span class="term">swapped-object-signal-after</span></p></td>
1846 <td><p>
1847 equivalent to <code class="literal">g_signal_connect_object (..., G_CONNECT_SWAPPED | G_CONNECT_AFTER)</code>
1848 </p></td>
1849 </tr>
1850 </tbody>
1851 </table></div>
1852 <p>
1853 </p>
1854 <p>
1855 </p>
1856 <div class="informalexample"><pre class="programlisting">
1857   menu-&gt;toplevel = g_object_connect (g_object_new (GTK_TYPE_WINDOW,
1858                                                    "type", GTK_WINDOW_POPUP,
1859                                                    "child", menu,
1860                                                    NULL),
1861                                      "signal::event", gtk_menu_window_event, menu,
1862                                      "signal::size_request", gtk_menu_window_size_request, menu,
1863                                      "signal::destroy", gtk_widget_destroyed, &amp;menu-&gt;toplevel,
1864                                      NULL);
1865 </pre></div>
1866 <p>
1867 </p>
1868 <div class="variablelist"><table border="0">
1869 <col align="left" valign="top">
1870 <tbody>
1871 <tr>
1872 <td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
1873 <td> a <a class="link" href="gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a>
1874 </td>
1875 </tr>
1876 <tr>
1877 <td><p><span class="term"><em class="parameter"><code>signal_spec</code></em> :</span></p></td>
1878 <td> the spec for the first signal
1879 </td>
1880 </tr>
1881 <tr>
1882 <td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
1883 <td> <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
1884       first signal, followed optionally by more signal
1885       spec/callback/data triples, followed by <a
1886 href="./../glib/glib/glib-Standard-Macros.html#NULL--CAPS"
1887 ><code class="literal">NULL</code></a>
1888 </td>
1889 </tr>
1890 <tr>
1891 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1892 <td> <em class="parameter"><code>object</code></em>
1893 </td>
1894 </tr>
1895 </tbody>
1896 </table></div>
1897 </div>
1898 <hr>
1899 <div class="refsect2" lang="en">
1900 <a name="g-object-disconnect"></a><h3>g_object_disconnect ()</h3>
1901 <pre class="programlisting">void                g_object_disconnect                 (<a
1902 href="./../glib/glib/glib-Basic-Types.html#gpointer"
1903 >gpointer</a> object,
1904                                                          const <a
1905 href="./../glib/glib/glib-Basic-Types.html#gchar"
1906 >gchar</a> *signal_spec,
1907                                                          ...);</pre>
1908 <p>
1909 A convenience function to disconnect multiple signals at once.
1910 </p>
1911 <p>
1912 The signal specs expected by this function have the form
1913 "any_signal", which means to disconnect any signal with matching
1914 callback and data, or "any_signal::signal_name", which only
1915 disconnects the signal named "signal_name".</p>
1916 <p>
1917 </p>
1918 <div class="variablelist"><table border="0">
1919 <col align="left" valign="top">
1920 <tbody>
1921 <tr>
1922 <td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
1923 <td> a <a class="link" href="gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a>
1924 </td>
1925 </tr>
1926 <tr>
1927 <td><p><span class="term"><em class="parameter"><code>signal_spec</code></em> :</span></p></td>
1928 <td> the spec for the first signal
1929 </td>
1930 </tr>
1931 <tr>
1932 <td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
1933 <td> <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,
1934  followed optionally by more signal spec/callback/data triples,
1935  followed by <a
1936 href="./../glib/glib/glib-Standard-Macros.html#NULL--CAPS"
1937 ><code class="literal">NULL</code></a>
1938 </td>
1939 </tr>
1940 </tbody>
1941 </table></div>
1942 </div>
1943 <hr>
1944 <div class="refsect2" lang="en">
1945 <a name="g-object-set"></a><h3>g_object_set ()</h3>
1946 <pre class="programlisting">void                g_object_set                        (<a
1947 href="./../glib/glib/glib-Basic-Types.html#gpointer"
1948 >gpointer</a> object,
1949                                                          const <a
1950 href="./../glib/glib/glib-Basic-Types.html#gchar"
1951 >gchar</a> *first_property_name,
1952                                                          ...);</pre>
1953 <p>
1954 Sets properties on an object.</p>
1955 <p>
1956 </p>
1957 <div class="variablelist"><table border="0">
1958 <col align="left" valign="top">
1959 <tbody>
1960 <tr>
1961 <td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
1962 <td> a <a class="link" href="gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a>
1963 </td>
1964 </tr>
1965 <tr>
1966 <td><p><span class="term"><em class="parameter"><code>first_property_name</code></em> :</span></p></td>
1967 <td> name of the first property to set
1968 </td>
1969 </tr>
1970 <tr>
1971 <td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
1972 <td> value for the first property, followed optionally by more
1973  name/value pairs, followed by <a
1974 href="./../glib/glib/glib-Standard-Macros.html#NULL--CAPS"
1975 ><code class="literal">NULL</code></a>
1976 </td>
1977 </tr>
1978 </tbody>
1979 </table></div>
1980 </div>
1981 <hr>
1982 <div class="refsect2" lang="en">
1983 <a name="g-object-get"></a><h3>g_object_get ()</h3>
1984 <pre class="programlisting">void                g_object_get                        (<a
1985 href="./../glib/glib/glib-Basic-Types.html#gpointer"
1986 >gpointer</a> object,
1987                                                          const <a
1988 href="./../glib/glib/glib-Basic-Types.html#gchar"
1989 >gchar</a> *first_property_name,
1990                                                          ...);</pre>
1991 <p>
1992 Gets properties of an object.
1993 </p>
1994 <p>
1995 In general, a copy is made of the property contents and the caller
1996 is responsible for freeing the memory in the appropriate manner for
1997 the type, for instance by calling <a
1998 href="./../glib/glib/glib-Memory-Allocation.html#g-free"
1999 ><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>.
2000 </p>
2001 <p>
2002 </p>
2003 <div class="example">
2004 <a name="id642778"></a><p class="title"><b>Example 2. Using g_object_get()</b></p>
2005 <div class="example-contents">
2006 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
2007 of three properties - one of type <a class="link" href="gobject-Type-Information.html#G-TYPE-INT--CAPS" title="G_TYPE_INT"><span class="type">G_TYPE_INT</span></a>,
2008 one of type <a class="link" href="gobject-Type-Information.html#G-TYPE-STRING--CAPS" title="G_TYPE_STRING"><span class="type">G_TYPE_STRING</span></a>, and one of type <span class="type">""</span><pre class="programlisting">
2009  gint intval;
2010  gchar *strval;
2011  GObject *objval;
2012
2013  g_object_get (my_object,
2014                "int-property", &amp;intval,
2015                "str-property", &amp;strval,
2016                "obj-property", &amp;objval,
2017                NULL);
2018
2019  // Do something with intval, strval, objval
2020
2021  g_free (strval);
2022  g_object_unref (objval);
2023 </pre>
2024 </div>
2025 </div>
2026 <p><br class="example-break"></p>
2027 <p>
2028 </p>
2029 <div class="variablelist"><table border="0">
2030 <col align="left" valign="top">
2031 <tbody>
2032 <tr>
2033 <td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
2034 <td> a <a class="link" href="gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a>
2035 </td>
2036 </tr>
2037 <tr>
2038 <td><p><span class="term"><em class="parameter"><code>first_property_name</code></em> :</span></p></td>
2039 <td> name of the first property to get
2040 </td>
2041 </tr>
2042 <tr>
2043 <td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
2044 <td> return location for the first property, followed optionally by more
2045  name/return location pairs, followed by <a
2046 href="./../glib/glib/glib-Standard-Macros.html#NULL--CAPS"
2047 ><code class="literal">NULL</code></a>
2048 </td>
2049 </tr>
2050 </tbody>
2051 </table></div>
2052 </div>
2053 <hr>
2054 <div class="refsect2" lang="en">
2055 <a name="g-object-notify"></a><h3>g_object_notify ()</h3>
2056 <pre class="programlisting">void                g_object_notify                     (<a class="link" href="gobject-The-Base-Object-Type.html#GObject">GObject</a> *object,
2057                                                          const <a
2058 href="./../glib/glib/glib-Basic-Types.html#gchar"
2059 >gchar</a> *property_name);</pre>
2060 <p>
2061 Emits a "notify" signal for the property <em class="parameter"><code>property_name</code></em> on <em class="parameter"><code>object</code></em>.</p>
2062 <p>
2063 </p>
2064 <div class="variablelist"><table border="0">
2065 <col align="left" valign="top">
2066 <tbody>
2067 <tr>
2068 <td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
2069 <td> a <a class="link" href="gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a>
2070 </td>
2071 </tr>
2072 <tr>
2073 <td><p><span class="term"><em class="parameter"><code>property_name</code></em> :</span></p></td>
2074 <td> the name of a property installed on the class of <em class="parameter"><code>object</code></em>.
2075 </td>
2076 </tr>
2077 </tbody>
2078 </table></div>
2079 </div>
2080 <hr>
2081 <div class="refsect2" lang="en">
2082 <a name="g-object-freeze-notify"></a><h3>g_object_freeze_notify ()</h3>
2083 <pre class="programlisting">void                g_object_freeze_notify              (<a class="link" href="gobject-The-Base-Object-Type.html#GObject">GObject</a> *object);</pre>
2084 <p>
2085 Increases the freeze count on <em class="parameter"><code>object</code></em>. If the freeze count is
2086 non-zero, the emission of "notify" signals on <em class="parameter"><code>object</code></em> is
2087 stopped. The signals are queued until the freeze count is decreased
2088 to zero.
2089 </p>
2090 <p>
2091 This is necessary for accessors that modify multiple properties to prevent
2092 premature notification while the object is still being modified.</p>
2093 <p>
2094 </p>
2095 <div class="variablelist"><table border="0">
2096 <col align="left" valign="top">
2097 <tbody><tr>
2098 <td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
2099 <td> a <a class="link" href="gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a>
2100 </td>
2101 </tr></tbody>
2102 </table></div>
2103 </div>
2104 <hr>
2105 <div class="refsect2" lang="en">
2106 <a name="g-object-thaw-notify"></a><h3>g_object_thaw_notify ()</h3>
2107 <pre class="programlisting">void                g_object_thaw_notify                (<a class="link" href="gobject-The-Base-Object-Type.html#GObject">GObject</a> *object);</pre>
2108 <p>
2109 Reverts the effect of a previous call to
2110 <a class="link" href="gobject-The-Base-Object-Type.html#g-object-freeze-notify" title="g_object_freeze_notify ()"><code class="function">g_object_freeze_notify()</code></a>. The freeze count is decreased on <em class="parameter"><code>object</code></em>
2111 and when it reaches zero, all queued "notify" signals are emitted.
2112 </p>
2113 <p>
2114 It is an error to call this function when the freeze count is zero.</p>
2115 <p>
2116 </p>
2117 <div class="variablelist"><table border="0">
2118 <col align="left" valign="top">
2119 <tbody><tr>
2120 <td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
2121 <td> a <a class="link" href="gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a>
2122 </td>
2123 </tr></tbody>
2124 </table></div>
2125 </div>
2126 <hr>
2127 <div class="refsect2" lang="en">
2128 <a name="g-object-get-data"></a><h3>g_object_get_data ()</h3>
2129 <pre class="programlisting"><a
2130 href="./../glib/glib/glib-Basic-Types.html#gpointer"
2131 >gpointer</a>            g_object_get_data                   (<a class="link" href="gobject-The-Base-Object-Type.html#GObject">GObject</a> *object,
2132                                                          const <a
2133 href="./../glib/glib/glib-Basic-Types.html#gchar"
2134 >gchar</a> *key);</pre>
2135 <p>
2136 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>
2137 <p>
2138 </p>
2139 <div class="variablelist"><table border="0">
2140 <col align="left" valign="top">
2141 <tbody>
2142 <tr>
2143 <td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
2144 <td> <a class="link" href="gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> containing the associations
2145 </td>
2146 </tr>
2147 <tr>
2148 <td><p><span class="term"><em class="parameter"><code>key</code></em> :</span></p></td>
2149 <td> name of the key for that association
2150 </td>
2151 </tr>
2152 <tr>
2153 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
2154 <td> the data if found, or <a
2155 href="./../glib/glib/glib-Standard-Macros.html#NULL--CAPS"
2156 ><code class="literal">NULL</code></a> if no such data exists.
2157 </td>
2158 </tr>
2159 </tbody>
2160 </table></div>
2161 </div>
2162 <hr>
2163 <div class="refsect2" lang="en">
2164 <a name="g-object-set-data"></a><h3>g_object_set_data ()</h3>
2165 <pre class="programlisting">void                g_object_set_data                   (<a class="link" href="gobject-The-Base-Object-Type.html#GObject">GObject</a> *object,
2166                                                          const <a
2167 href="./../glib/glib/glib-Basic-Types.html#gchar"
2168 >gchar</a> *key,
2169                                                          <a
2170 href="./../glib/glib/glib-Basic-Types.html#gpointer"
2171 >gpointer</a> data);</pre>
2172 <p>
2173 Each object carries around a table of associations from
2174 strings to pointers.  This function lets you set an association.
2175 </p>
2176 <p>
2177 If the object already had an association with that name,
2178 the old association will be destroyed.</p>
2179 <p>
2180 </p>
2181 <div class="variablelist"><table border="0">
2182 <col align="left" valign="top">
2183 <tbody>
2184 <tr>
2185 <td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
2186 <td> <a class="link" href="gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> containing the associations.
2187 </td>
2188 </tr>
2189 <tr>
2190 <td><p><span class="term"><em class="parameter"><code>key</code></em> :</span></p></td>
2191 <td> name of the key
2192 </td>
2193 </tr>
2194 <tr>
2195 <td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
2196 <td> data to associate with that key
2197 </td>
2198 </tr>
2199 </tbody>
2200 </table></div>
2201 </div>
2202 <hr>
2203 <div class="refsect2" lang="en">
2204 <a name="g-object-set-data-full"></a><h3>g_object_set_data_full ()</h3>
2205 <pre class="programlisting">void                g_object_set_data_full              (<a class="link" href="gobject-The-Base-Object-Type.html#GObject">GObject</a> *object,
2206                                                          const <a
2207 href="./../glib/glib/glib-Basic-Types.html#gchar"
2208 >gchar</a> *key,
2209                                                          <a
2210 href="./../glib/glib/glib-Basic-Types.html#gpointer"
2211 >gpointer</a> data,
2212                                                          <a
2213 href="./../glib/glib/glib-Datasets.html#GDestroyNotify"
2214 >GDestroyNotify</a> destroy);</pre>
2215 <p>
2216 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
2217 for when the association is destroyed, either by setting it
2218 to a different value or when the object is destroyed.
2219 </p>
2220 <p>
2221 Note that the <em class="parameter"><code>destroy</code></em> callback is not called if <em class="parameter"><code>data</code></em> is <a
2222 href="./../glib/glib/glib-Standard-Macros.html#NULL--CAPS"
2223 ><code class="literal">NULL</code></a>.</p>
2224 <p>
2225 </p>
2226 <div class="variablelist"><table border="0">
2227 <col align="left" valign="top">
2228 <tbody>
2229 <tr>
2230 <td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
2231 <td> <a class="link" href="gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> containing the associations
2232 </td>
2233 </tr>
2234 <tr>
2235 <td><p><span class="term"><em class="parameter"><code>key</code></em> :</span></p></td>
2236 <td> name of the key
2237 </td>
2238 </tr>
2239 <tr>
2240 <td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
2241 <td> data to associate with that key
2242 </td>
2243 </tr>
2244 <tr>
2245 <td><p><span class="term"><em class="parameter"><code>destroy</code></em> :</span></p></td>
2246 <td> function to call when the association is destroyed
2247 </td>
2248 </tr>
2249 </tbody>
2250 </table></div>
2251 </div>
2252 <hr>
2253 <div class="refsect2" lang="en">
2254 <a name="g-object-steal-data"></a><h3>g_object_steal_data ()</h3>
2255 <pre class="programlisting"><a
2256 href="./../glib/glib/glib-Basic-Types.html#gpointer"
2257 >gpointer</a>            g_object_steal_data                 (<a class="link" href="gobject-The-Base-Object-Type.html#GObject">GObject</a> *object,
2258                                                          const <a
2259 href="./../glib/glib/glib-Basic-Types.html#gchar"
2260 >gchar</a> *key);</pre>
2261 <p>
2262 Remove a specified datum from the object's data associations,
2263 without invoking the association's destroy handler.</p>
2264 <p>
2265 </p>
2266 <div class="variablelist"><table border="0">
2267 <col align="left" valign="top">
2268 <tbody>
2269 <tr>
2270 <td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
2271 <td> <a class="link" href="gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> containing the associations
2272 </td>
2273 </tr>
2274 <tr>
2275 <td><p><span class="term"><em class="parameter"><code>key</code></em> :</span></p></td>
2276 <td> name of the key
2277 </td>
2278 </tr>
2279 <tr>
2280 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
2281 <td> the data if found, or <a
2282 href="./../glib/glib/glib-Standard-Macros.html#NULL--CAPS"
2283 ><code class="literal">NULL</code></a> if no such data exists.
2284 </td>
2285 </tr>
2286 </tbody>
2287 </table></div>
2288 </div>
2289 <hr>
2290 <div class="refsect2" lang="en">
2291 <a name="g-object-get-qdata"></a><h3>g_object_get_qdata ()</h3>
2292 <pre class="programlisting"><a
2293 href="./../glib/glib/glib-Basic-Types.html#gpointer"
2294 >gpointer</a>            g_object_get_qdata                  (<a class="link" href="gobject-The-Base-Object-Type.html#GObject">GObject</a> *object,
2295                                                          <a
2296 href="./../glib/glib/glib-Quarks.html#GQuark"
2297 >GQuark</a> quark);</pre>
2298 <p>
2299 This function gets back user data pointers stored via
2300 <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>
2301 <p>
2302 </p>
2303 <div class="variablelist"><table border="0">
2304 <col align="left" valign="top">
2305 <tbody>
2306 <tr>
2307 <td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
2308 <td> The GObject to get a stored user data pointer from
2309 </td>
2310 </tr>
2311 <tr>
2312 <td><p><span class="term"><em class="parameter"><code>quark</code></em> :</span></p></td>
2313 <td> A <a
2314 href="./../glib/glib/glib-Quarks.html#GQuark"
2315 ><span class="type">GQuark</span></a>, naming the user data pointer
2316 </td>
2317 </tr>
2318 <tr>
2319 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
2320 <td> The user data pointer set, or <a
2321 href="./../glib/glib/glib-Standard-Macros.html#NULL--CAPS"
2322 ><code class="literal">NULL</code></a>
2323 </td>
2324 </tr>
2325 </tbody>
2326 </table></div>
2327 </div>
2328 <hr>
2329 <div class="refsect2" lang="en">
2330 <a name="g-object-set-qdata"></a><h3>g_object_set_qdata ()</h3>
2331 <pre class="programlisting">void                g_object_set_qdata                  (<a class="link" href="gobject-The-Base-Object-Type.html#GObject">GObject</a> *object,
2332                                                          <a
2333 href="./../glib/glib/glib-Quarks.html#GQuark"
2334 >GQuark</a> quark,
2335                                                          <a
2336 href="./../glib/glib/glib-Basic-Types.html#gpointer"
2337 >gpointer</a> data);</pre>
2338 <p>
2339 This sets an opaque, named pointer on an object.
2340 The name is specified through a <a
2341 href="./../glib/glib/glib-Quarks.html#GQuark"
2342 ><span class="type">GQuark</span></a> (retrived e.g. via
2343 <a
2344 href="./../glib/glib/glib-Quarks.html#g-quark-from-static-string"
2345 ><code class="function">g_quark_from_static_string()</code></a>), and the pointer
2346 can be gotten back from the <em class="parameter"><code>object</code></em> 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>
2347 until the <em class="parameter"><code>object</code></em> is finalized.
2348 Setting a previously set user data pointer, overrides (frees)
2349 the old pointer set, using <a
2350 href="./../glib/glib/glib-Standard-Macros.html#NULL--CAPS"
2351 ><span class="type">NULL</span></a> as pointer essentially
2352 removes the data stored.</p>
2353 <p>
2354 </p>
2355 <div class="variablelist"><table border="0">
2356 <col align="left" valign="top">
2357 <tbody>
2358 <tr>
2359 <td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
2360 <td> The GObject to set store a user data pointer
2361 </td>
2362 </tr>
2363 <tr>
2364 <td><p><span class="term"><em class="parameter"><code>quark</code></em> :</span></p></td>
2365 <td> A <a
2366 href="./../glib/glib/glib-Quarks.html#GQuark"
2367 ><span class="type">GQuark</span></a>, naming the user data pointer
2368 </td>
2369 </tr>
2370 <tr>
2371 <td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
2372 <td> An opaque user data pointer
2373 </td>
2374 </tr>
2375 </tbody>
2376 </table></div>
2377 </div>
2378 <hr>
2379 <div class="refsect2" lang="en">
2380 <a name="g-object-set-qdata-full"></a><h3>g_object_set_qdata_full ()</h3>
2381 <pre class="programlisting">void                g_object_set_qdata_full             (<a class="link" href="gobject-The-Base-Object-Type.html#GObject">GObject</a> *object,
2382                                                          <a
2383 href="./../glib/glib/glib-Quarks.html#GQuark"
2384 >GQuark</a> quark,
2385                                                          <a
2386 href="./../glib/glib/glib-Basic-Types.html#gpointer"
2387 >gpointer</a> data,
2388                                                          <a
2389 href="./../glib/glib/glib-Datasets.html#GDestroyNotify"
2390 >GDestroyNotify</a> destroy);</pre>
2391 <p>
2392 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,
2393 a void (*destroy) (gpointer) function may be specified which is
2394 called with <em class="parameter"><code>data</code></em> as argument when the <em class="parameter"><code>object</code></em> is finalized, or
2395 the data is being overwritten by a call to <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>
2396 with the same <em class="parameter"><code>quark</code></em>.</p>
2397 <p>
2398 </p>
2399 <div class="variablelist"><table border="0">
2400 <col align="left" valign="top">
2401 <tbody>
2402 <tr>
2403 <td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
2404 <td> The GObject to set store a user data pointer
2405 </td>
2406 </tr>
2407 <tr>
2408 <td><p><span class="term"><em class="parameter"><code>quark</code></em> :</span></p></td>
2409 <td> A <a
2410 href="./../glib/glib/glib-Quarks.html#GQuark"
2411 ><span class="type">GQuark</span></a>, naming the user data pointer
2412 </td>
2413 </tr>
2414 <tr>
2415 <td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
2416 <td> An opaque user data pointer
2417 </td>
2418 </tr>
2419 <tr>
2420 <td><p><span class="term"><em class="parameter"><code>destroy</code></em> :</span></p></td>
2421 <td> Function to invoke with <em class="parameter"><code>data</code></em> as argument, when <em class="parameter"><code>data</code></em>
2422           needs to be freed
2423 </td>
2424 </tr>
2425 </tbody>
2426 </table></div>
2427 </div>
2428 <hr>
2429 <div class="refsect2" lang="en">
2430 <a name="g-object-steal-qdata"></a><h3>g_object_steal_qdata ()</h3>
2431 <pre class="programlisting"><a
2432 href="./../glib/glib/glib-Basic-Types.html#gpointer"
2433 >gpointer</a>            g_object_steal_qdata                (<a class="link" href="gobject-The-Base-Object-Type.html#GObject">GObject</a> *object,
2434                                                          <a
2435 href="./../glib/glib/glib-Quarks.html#GQuark"
2436 >GQuark</a> quark);</pre>
2437 <p>
2438 This function gets back user data pointers stored via
2439 <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> from object
2440 without invoking its <code class="function">destroy()</code> function (if any was
2441 set).
2442 Usually, calling this function is only required to update
2443 user data pointers with a destroy notifier, for example:
2444 </p>
2445 <div class="informalexample"><pre class="programlisting">
2446 void
2447 object_add_to_user_list (GObject     *object,
2448                          const gchar *new_string)
2449 {
2450   // the quark, naming the object data
2451   GQuark quark_string_list = g_quark_from_static_string ("my-string-list");
2452   // retrive the old string list
2453   GList *list = g_object_steal_qdata (object, quark_string_list);
2454
2455   // prepend new string
2456   list = g_list_prepend (list, g_strdup (new_string));
2457   // this changed 'list', so we need to set it again
2458   g_object_set_qdata_full (object, quark_string_list, list, free_string_list);
2459 }
2460 static void
2461 free_string_list (gpointer data)
2462 {
2463   GList *node, *list = data;
2464
2465   for (node = list; node; node = node-&gt;next)
2466     g_free (node-&gt;data);
2467   g_list_free (list);
2468 }
2469 </pre></div>
2470 <p>
2471 Using <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> in the above example, instead of
2472 <a class="link" href="gobject-The-Base-Object-Type.html#g-object-steal-qdata" title="g_object_steal_qdata ()"><code class="function">g_object_steal_qdata()</code></a> would have left the destroy function set,
2473 and thus the partial string list would have been freed upon
2474 <a class="link" href="gobject-The-Base-Object-Type.html#g-object-set-qdata-full" title="g_object_set_qdata_full ()"><code class="function">g_object_set_qdata_full()</code></a>.</p>
2475 <p>
2476 </p>
2477 <div class="variablelist"><table border="0">
2478 <col align="left" valign="top">
2479 <tbody>
2480 <tr>
2481 <td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
2482 <td> The GObject to get a stored user data pointer from
2483 </td>
2484 </tr>
2485 <tr>
2486 <td><p><span class="term"><em class="parameter"><code>quark</code></em> :</span></p></td>
2487 <td> A <a
2488 href="./../glib/glib/glib-Quarks.html#GQuark"
2489 ><span class="type">GQuark</span></a>, naming the user data pointer
2490 </td>
2491 </tr>
2492 <tr>
2493 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
2494 <td> The user data pointer set, or <a
2495 href="./../glib/glib/glib-Standard-Macros.html#NULL--CAPS"
2496 ><code class="literal">NULL</code></a>
2497 </td>
2498 </tr>
2499 </tbody>
2500 </table></div>
2501 </div>
2502 <hr>
2503 <div class="refsect2" lang="en">
2504 <a name="g-object-set-property"></a><h3>g_object_set_property ()</h3>
2505 <pre class="programlisting">void                g_object_set_property               (<a class="link" href="gobject-The-Base-Object-Type.html#GObject">GObject</a> *object,
2506                                                          const <a
2507 href="./../glib/glib/glib-Basic-Types.html#gchar"
2508 >gchar</a> *property_name,
2509                                                          const <a class="link" href="gobject-Generic-values.html#GValue" title="GValue">GValue</a> *value);</pre>
2510 <p>
2511 Sets a property on an object.</p>
2512 <p>
2513 </p>
2514 <div class="variablelist"><table border="0">
2515 <col align="left" valign="top">
2516 <tbody>
2517 <tr>
2518 <td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
2519 <td> a <a class="link" href="gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a>
2520 </td>
2521 </tr>
2522 <tr>
2523 <td><p><span class="term"><em class="parameter"><code>property_name</code></em> :</span></p></td>
2524 <td> the name of the property to set
2525 </td>
2526 </tr>
2527 <tr>
2528 <td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
2529 <td> the value
2530 </td>
2531 </tr>
2532 </tbody>
2533 </table></div>
2534 </div>
2535 <hr>
2536 <div class="refsect2" lang="en">
2537 <a name="g-object-get-property"></a><h3>g_object_get_property ()</h3>
2538 <pre class="programlisting">void                g_object_get_property               (<a class="link" href="gobject-The-Base-Object-Type.html#GObject">GObject</a> *object,
2539                                                          const <a
2540 href="./../glib/glib/glib-Basic-Types.html#gchar"
2541 >gchar</a> *property_name,
2542                                                          <a class="link" href="gobject-Generic-values.html#GValue" title="GValue">GValue</a> *value);</pre>
2543 <p>
2544 Gets a property of an object.
2545 </p>
2546 <p>
2547 In general, a copy is made of the property contents and the caller is
2548 responsible for freeing the memory by calling <a class="link" href="gobject-Generic-values.html#g-value-unset" title="g_value_unset ()"><code class="function">g_value_unset()</code></a>.
2549 </p>
2550 <p>
2551 Note that <a class="link" href="gobject-The-Base-Object-Type.html#g-object-get-property" title="g_object_get_property ()"><code class="function">g_object_get_property()</code></a> is really intended for language
2552 bindings, <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> is much more convenient for C programming.</p>
2553 <p>
2554 </p>
2555 <div class="variablelist"><table border="0">
2556 <col align="left" valign="top">
2557 <tbody>
2558 <tr>
2559 <td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
2560 <td> a <a class="link" href="gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a>
2561 </td>
2562 </tr>
2563 <tr>
2564 <td><p><span class="term"><em class="parameter"><code>property_name</code></em> :</span></p></td>
2565 <td> the name of the property to get
2566 </td>
2567 </tr>
2568 <tr>
2569 <td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
2570 <td> return location for the property value
2571 </td>
2572 </tr>
2573 </tbody>
2574 </table></div>
2575 </div>
2576 <hr>
2577 <div class="refsect2" lang="en">
2578 <a name="g-object-new-valist"></a><h3>g_object_new_valist ()</h3>
2579 <pre class="programlisting"><a class="link" href="gobject-The-Base-Object-Type.html#GObject">GObject</a>*            g_object_new_valist                 (<a class="link" href="gobject-Type-Information.html#GType" title="GType">GType</a> object_type,
2580                                                          const <a
2581 href="./../glib/glib/glib-Basic-Types.html#gchar"
2582 >gchar</a> *first_property_name,
2583                                                          va_list var_args);</pre>
2584 <p>
2585 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.
2586 </p>
2587 <p>
2588 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>)
2589 which are not explicitly specified are set to their default values.</p>
2590 <p>
2591 </p>
2592 <div class="variablelist"><table border="0">
2593 <col align="left" valign="top">
2594 <tbody>
2595 <tr>
2596 <td><p><span class="term"><em class="parameter"><code>object_type</code></em> :</span></p></td>
2597 <td> the type id of the <a class="link" href="gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> subtype to instantiate
2598 </td>
2599 </tr>
2600 <tr>
2601 <td><p><span class="term"><em class="parameter"><code>first_property_name</code></em> :</span></p></td>
2602 <td> the name of the first property
2603 </td>
2604 </tr>
2605 <tr>
2606 <td><p><span class="term"><em class="parameter"><code>var_args</code></em> :</span></p></td>
2607 <td> the value of the first property, followed optionally by more
2608  name/value pairs, followed by <a
2609 href="./../glib/glib/glib-Standard-Macros.html#NULL--CAPS"
2610 ><code class="literal">NULL</code></a>
2611 </td>
2612 </tr>
2613 <tr>
2614 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
2615 <td> a new instance of <em class="parameter"><code>object_type</code></em>
2616 </td>
2617 </tr>
2618 </tbody>
2619 </table></div>
2620 </div>
2621 <hr>
2622 <div class="refsect2" lang="en">
2623 <a name="g-object-set-valist"></a><h3>g_object_set_valist ()</h3>
2624 <pre class="programlisting">void                g_object_set_valist                 (<a class="link" href="gobject-The-Base-Object-Type.html#GObject">GObject</a> *object,
2625                                                          const <a
2626 href="./../glib/glib/glib-Basic-Types.html#gchar"
2627 >gchar</a> *first_property_name,
2628                                                          va_list var_args);</pre>
2629 <p>
2630 Sets properties on an object.</p>
2631 <p>
2632 </p>
2633 <div class="variablelist"><table border="0">
2634 <col align="left" valign="top">
2635 <tbody>
2636 <tr>
2637 <td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
2638 <td> a <a class="link" href="gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a>
2639 </td>
2640 </tr>
2641 <tr>
2642 <td><p><span class="term"><em class="parameter"><code>first_property_name</code></em> :</span></p></td>
2643 <td> name of the first property to set
2644 </td>
2645 </tr>
2646 <tr>
2647 <td><p><span class="term"><em class="parameter"><code>var_args</code></em> :</span></p></td>
2648 <td> value for the first property, followed optionally by more
2649  name/value pairs, followed by <a
2650 href="./../glib/glib/glib-Standard-Macros.html#NULL--CAPS"
2651 ><code class="literal">NULL</code></a>
2652 </td>
2653 </tr>
2654 </tbody>
2655 </table></div>
2656 </div>
2657 <hr>
2658 <div class="refsect2" lang="en">
2659 <a name="g-object-get-valist"></a><h3>g_object_get_valist ()</h3>
2660 <pre class="programlisting">void                g_object_get_valist                 (<a class="link" href="gobject-The-Base-Object-Type.html#GObject">GObject</a> *object,
2661                                                          const <a
2662 href="./../glib/glib/glib-Basic-Types.html#gchar"
2663 >gchar</a> *first_property_name,
2664                                                          va_list var_args);</pre>
2665 <p>
2666 Gets properties of an object.
2667 </p>
2668 <p>
2669 In general, a copy is made of the property contents and the caller
2670 is responsible for freeing the memory in the appropriate manner for
2671 the type, for instance by calling <a
2672 href="./../glib/glib/glib-Memory-Allocation.html#g-free"
2673 ><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>.
2674 </p>
2675 <p>
2676 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>
2677 <p>
2678 </p>
2679 <div class="variablelist"><table border="0">
2680 <col align="left" valign="top">
2681 <tbody>
2682 <tr>
2683 <td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
2684 <td> a <a class="link" href="gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a>
2685 </td>
2686 </tr>
2687 <tr>
2688 <td><p><span class="term"><em class="parameter"><code>first_property_name</code></em> :</span></p></td>
2689 <td> name of the first property to get
2690 </td>
2691 </tr>
2692 <tr>
2693 <td><p><span class="term"><em class="parameter"><code>var_args</code></em> :</span></p></td>
2694 <td> return location for the first property, followed optionally by more
2695  name/return location pairs, followed by <a
2696 href="./../glib/glib/glib-Standard-Macros.html#NULL--CAPS"
2697 ><code class="literal">NULL</code></a>
2698 </td>
2699 </tr>
2700 </tbody>
2701 </table></div>
2702 </div>
2703 <hr>
2704 <div class="refsect2" lang="en">
2705 <a name="g-object-watch-closure"></a><h3>g_object_watch_closure ()</h3>
2706 <pre class="programlisting">void                g_object_watch_closure              (<a class="link" href="gobject-The-Base-Object-Type.html#GObject">GObject</a> *object,
2707                                                          <a class="link" href="gobject-Closures.html#GClosure" title="GClosure">GClosure</a> *closure);</pre>
2708 <p>
2709 This function essentially limits the life time of the <em class="parameter"><code>closure</code></em> to
2710 the life time of the object. That is, when the object is finalized,
2711 the <em class="parameter"><code>closure</code></em> is invalidated by calling <a class="link" href="gobject-Closures.html#g-closure-invalidate" title="g_closure_invalidate ()"><code class="function">g_closure_invalidate()</code></a> on
2712 it, in order to prevent invocations of the closure with a finalized
2713 (nonexisting) object. Also, <a class="link" href="gobject-The-Base-Object-Type.html#g-object-ref" title="g_object_ref ()"><code class="function">g_object_ref()</code></a> and <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> are
2714 added as marshal guards to the <em class="parameter"><code>closure</code></em>, to ensure that an extra
2715 reference count is held on <em class="parameter"><code>object</code></em> during invocation of the
2716 <em class="parameter"><code>closure</code></em>.  Usually, this function will be called on closures that
2717 use this <em class="parameter"><code>object</code></em> as closure data.</p>
2718 <p>
2719 </p>
2720 <div class="variablelist"><table border="0">
2721 <col align="left" valign="top">
2722 <tbody>
2723 <tr>
2724 <td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
2725 <td> GObject restricting lifetime of <em class="parameter"><code>closure</code></em>
2726 </td>
2727 </tr>
2728 <tr>
2729 <td><p><span class="term"><em class="parameter"><code>closure</code></em> :</span></p></td>
2730 <td> GClosure to watch
2731 </td>
2732 </tr>
2733 </tbody>
2734 </table></div>
2735 </div>
2736 <hr>
2737 <div class="refsect2" lang="en">
2738 <a name="g-object-run-dispose"></a><h3>g_object_run_dispose ()</h3>
2739 <pre class="programlisting">void                g_object_run_dispose                (<a class="link" href="gobject-The-Base-Object-Type.html#GObject">GObject</a> *object);</pre>
2740 <p>
2741 Releases all references to other objects. This can be used to break
2742 reference cycles.
2743 </p>
2744 <p>
2745 This functions should only be called from object system implementations.</p>
2746 <p>
2747 </p>
2748 <div class="variablelist"><table border="0">
2749 <col align="left" valign="top">
2750 <tbody><tr>
2751 <td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
2752 <td> a <a class="link" href="gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a>
2753 </td>
2754 </tr></tbody>
2755 </table></div>
2756 </div>
2757 <hr>
2758 <div class="refsect2" lang="en">
2759 <a name="G-OBJECT-WARN-INVALID-PROPERTY-ID--CAPS"></a><h3>G_OBJECT_WARN_INVALID_PROPERTY_ID()</h3>
2760 <pre class="programlisting">#define             G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec)</pre>
2761 <p>
2762 This macro should be used to emit a standard warning about unexpected 
2763 properties in <code class="function">set_property()</code> and <code class="function">get_property()</code> implementations.</p>
2764 <p>
2765 </p>
2766 <div class="variablelist"><table border="0">
2767 <col align="left" valign="top">
2768 <tbody>
2769 <tr>
2770 <td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
2771 <td> the <a class="link" href="gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> on which <code class="function">set_property()</code> or <code class="function">get_property()</code> was called
2772 </td>
2773 </tr>
2774 <tr>
2775 <td><p><span class="term"><em class="parameter"><code>property_id</code></em> :</span></p></td>
2776 <td> the numeric id of the property
2777 </td>
2778 </tr>
2779 <tr>
2780 <td><p><span class="term"><em class="parameter"><code>pspec</code></em> :</span></p></td>
2781 <td> the <a class="link" href="gobject-GParamSpec.html#GParamSpec" title="GParamSpec"><span class="type">GParamSpec</span></a> of the property
2782 </td>
2783 </tr>
2784 </tbody>
2785 </table></div>
2786 </div>
2787 </div>
2788 <div class="refsect1" lang="en">
2789 <a name="gobject-The-Base-Object-Type.signal-details"></a><h2>Signal Details</h2>
2790 <div class="refsect2" lang="en">
2791 <a name="GObject-notify"></a><h3>The <code class="literal">"notify"</code> signal</h3>
2792 <pre class="programlisting">void                user_function                      (<a class="link" href="gobject-The-Base-Object-Type.html#GObject">GObject</a>    *gobject,
2793                                                         <a class="link" href="gobject-GParamSpec.html#GParamSpec" title="GParamSpec">GParamSpec</a> *pspec,
2794                                                         <a
2795 href="./../glib/glib/glib-Basic-Types.html#gpointer"
2796 >gpointer</a>    user_data)      : Run First / No Recursion / Has Details / Action / No Hooks</pre>
2797 <p>
2798 The notify signal is emitted on an object when one of its
2799 properties has been changed. Note that getting this signal
2800 doesn't guarantee that the value of the property has actually
2801 changed, it may also be emitted when the setter for the property
2802 is called to reinstate the previous value.
2803 </p>
2804 <p>
2805 This signal is typically used to obtain change notification for a
2806 single property, by specifying the property name as a detail in the
2807 <a class="link" href="gobject-Signals.html#g-signal-connect" title="g_signal_connect()"><code class="function">g_signal_connect()</code></a> call, like this:
2808 </p>
2809 <div class="informalexample"><pre class="programlisting">
2810 g_signal_connect (text_view-&gt;buffer, "notify::paste-target-list",
2811                   G_CALLBACK (gtk_text_view_target_list_notify),
2812                   text_view)
2813 </pre></div>
2814 <p>
2815 It is important to note that you must use
2816 <a class="link" href="gobject-GParamSpec.html#canonical-parameter-name">canonical</a> parameter names as
2817 detail strings for the notify signal.</p>
2818 <p>
2819 </p>
2820 <div class="variablelist"><table border="0">
2821 <col align="left" valign="top">
2822 <tbody>
2823 <tr>
2824 <td><p><span class="term"><em class="parameter"><code>gobject</code></em> :</span></p></td>
2825 <td> the object which received the signal.
2826 </td>
2827 </tr>
2828 <tr>
2829 <td><p><span class="term"><em class="parameter"><code>pspec</code></em> :</span></p></td>
2830 <td> the <a class="link" href="gobject-GParamSpec.html#GParamSpec" title="GParamSpec"><span class="type">GParamSpec</span></a> of the property which changed.
2831 </td>
2832 </tr>
2833 <tr>
2834 <td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
2835 <td>user data set when the signal handler was connected.</td>
2836 </tr>
2837 </tbody>
2838 </table></div>
2839 </div>
2840 </div>
2841 <div class="refsect1" lang="en">
2842 <a name="gobject-The-Base-Object-Type.see-also"></a><h2>See Also</h2>
2843 #GParamSpecObject, <a class="link" href="gobject-Standard-Parameter-and-Value-Types.html#g-param-spec-object" title="g_param_spec_object ()"><code class="function">g_param_spec_object()</code></a>
2844 </div>