~ubuntu-branches/ubuntu/utopic/glib2.0/utopic

« back to all changes in this revision

Viewing changes to docs/reference/gobject/html/gobject-Type-Information.html

Tags: upstream-2.12.12
ImportĀ upstreamĀ versionĀ 2.12.12

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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=US-ASCII">
 
5
<title>GType</title>
 
6
<meta name="generator" content="DocBook XSL Stylesheets V1.72.0">
 
7
<link rel="start" href="index.html" title="GObject Reference Manual">
 
8
<link rel="up" href="rn01.html" title="API Reference">
 
9
<link rel="prev" href="rn01.html" title="API Reference">
 
10
<link rel="next" href="GTypePlugin.html" title="GTypePlugin">
 
11
<meta name="generator" content="GTK-Doc V1.7 (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&#160;I.&#160;Concepts">
 
15
<link rel="chapter" href="ch01.html" title="Background">
 
16
<link rel="chapter" href="ch02.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&#160;IV.&#160;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="Howto create and use signals">
 
25
<link rel="part" href="pt03.html" title="Part&#160;V.&#160;Related Tools">
 
26
<link rel="chapter" href="tools-gob.html" title="GObject builder">
 
27
<link rel="chapter" href="tools-ginspector.html" title="Graphical inspection of Gobjects">
 
28
<link rel="chapter" href="tools-refdb.html" title="Debugging reference count problems">
 
29
<link rel="chapter" href="tools-gtkdoc.html" title="Writing API docs">
 
30
<link rel="index" href="ix01.html" title="Index">
 
31
<link rel="index" href="ix02.html" title="Index of deprecated symbols">
 
32
<link rel="index" href="ix03.html" title="Index of new symbols in 2.2">
 
33
<link rel="index" href="ix04.html" title="Index of new symbols in 2.4">
 
34
<link rel="index" href="ix05.html" title="Index of new symbols in 2.6">
 
35
<link rel="index" href="ix06.html" title="Index of new symbols in 2.8">
 
36
<link rel="index" href="ix07.html" title="Index of new symbols in 2.10">
 
37
<link rel="index" href="ix08.html" title="Index of new symbols in 2.12">
 
38
</head>
 
39
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
 
40
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
 
41
<tr valign="middle">
 
42
<td><a accesskey="p" href="rn01.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
 
43
<td><a accesskey="u" href="rn01.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
 
44
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
 
45
<th width="100%" align="center">GObject Reference Manual</th>
 
46
<td><a accesskey="n" href="GTypePlugin.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
 
47
</tr>
 
48
<tr><td colspan="5" class="shortcuts"><nobr><a href="#id3021948" class="shortcut">Top</a>
 
49
                  &#160;|&#160;
 
50
                  <a href="#id3024162" class="shortcut">Description</a></nobr></td></tr>
 
51
</table>
 
52
<div class="refentry" lang="en">
 
53
<a name="gobject-Type-Information"></a><div class="titlepage"></div>
 
54
<div class="refnamediv"><table width="100%"><tr>
 
55
<td valign="top">
 
56
<h2>
 
57
<a name="id3021948"></a><span class="refentrytitle">GType</span>
 
58
</h2>
 
59
<p>GType &#8212; The GLib Runtime type identification and management system</p>
 
60
</td>
 
61
<td valign="top" align="right"></td>
 
62
</tr></table></div>
 
63
<div class="refsynopsisdiv">
 
64
<h2>Synopsis</h2>
 
65
<pre class="synopsis">
 
66
 
 
67
#include &lt;glib-object.h&gt;
 
68
 
 
69
 
 
70
typedef             <a href="gobject-Type-Information.html#GType">GType</a>;
 
71
#define             <a href="gobject-Type-Information.html#G-TYPE-FUNDAMENTAL:CAPS">G_TYPE_FUNDAMENTAL</a>                  (type)
 
72
#define             <a href="gobject-Type-Information.html#G-TYPE-FUNDAMENTAL-MAX:CAPS">G_TYPE_FUNDAMENTAL_MAX</a>
 
73
#define             <a href="gobject-Type-Information.html#G-TYPE-MAKE-FUNDAMENTAL:CAPS">G_TYPE_MAKE_FUNDAMENTAL</a>             (x)
 
74
#define             <a href="gobject-Type-Information.html#G-TYPE-IS-ABSTRACT:CAPS">G_TYPE_IS_ABSTRACT</a>                  (type)
 
75
#define             <a href="gobject-Type-Information.html#G-TYPE-IS-DERIVED:CAPS">G_TYPE_IS_DERIVED</a>                   (type)
 
76
#define             <a href="gobject-Type-Information.html#G-TYPE-IS-FUNDAMENTAL:CAPS">G_TYPE_IS_FUNDAMENTAL</a>               (type)
 
77
#define             <a href="gobject-Type-Information.html#G-TYPE-IS-VALUE-TYPE:CAPS">G_TYPE_IS_VALUE_TYPE</a>                (type)
 
78
#define             <a href="gobject-Type-Information.html#G-TYPE-HAS-VALUE-TABLE:CAPS">G_TYPE_HAS_VALUE_TABLE</a>              (type)
 
79
#define             <a href="gobject-Type-Information.html#G-TYPE-IS-CLASSED:CAPS">G_TYPE_IS_CLASSED</a>                   (type)
 
80
#define             <a href="gobject-Type-Information.html#G-TYPE-IS-INSTANTIATABLE:CAPS">G_TYPE_IS_INSTANTIATABLE</a>            (type)
 
81
#define             <a href="gobject-Type-Information.html#G-TYPE-IS-DERIVABLE:CAPS">G_TYPE_IS_DERIVABLE</a>                 (type)
 
82
#define             <a href="gobject-Type-Information.html#G-TYPE-IS-DEEP-DERIVABLE:CAPS">G_TYPE_IS_DEEP_DERIVABLE</a>            (type)
 
83
#define             <a href="gobject-Type-Information.html#G-TYPE-IS-INTERFACE:CAPS">G_TYPE_IS_INTERFACE</a>                 (type)
 
84
                    <a href="gobject-Type-Information.html#GTypeInterface">GTypeInterface</a>;
 
85
                    <a href="gobject-Type-Information.html#GTypeInstance">GTypeInstance</a>;
 
86
                    <a href="gobject-Type-Information.html#GTypeClass">GTypeClass</a>;
 
87
                    <a href="gobject-Type-Information.html#GTypeInfo">GTypeInfo</a>;
 
88
                    <a href="gobject-Type-Information.html#GTypeFundamentalInfo">GTypeFundamentalInfo</a>;
 
89
                    <a href="gobject-Type-Information.html#GInterfaceInfo">GInterfaceInfo</a>;
 
90
                    <a href="gobject-Type-Information.html#GTypeValueTable">GTypeValueTable</a>;
 
91
#define             <a href="gobject-Type-Information.html#G-TYPE-FROM-INSTANCE:CAPS">G_TYPE_FROM_INSTANCE</a>                (instance)
 
92
#define             <a href="gobject-Type-Information.html#G-TYPE-FROM-CLASS:CAPS">G_TYPE_FROM_CLASS</a>                   (g_class)
 
93
#define             <a href="gobject-Type-Information.html#G-TYPE-FROM-INTERFACE:CAPS">G_TYPE_FROM_INTERFACE</a>               (g_iface)
 
94
#define             <a href="gobject-Type-Information.html#G-TYPE-INSTANCE-GET-CLASS:CAPS">G_TYPE_INSTANCE_GET_CLASS</a>           (instance, g_type, c_type)
 
95
#define             <a href="gobject-Type-Information.html#G-TYPE-INSTANCE-GET-INTERFACE:CAPS">G_TYPE_INSTANCE_GET_INTERFACE</a>       (instance, g_type, c_type)
 
96
#define             <a href="gobject-Type-Information.html#G-TYPE-INSTANCE-GET-PRIVATE:CAPS">G_TYPE_INSTANCE_GET_PRIVATE</a>         (instance, g_type, c_type)
 
97
#define             <a href="gobject-Type-Information.html#G-TYPE-CHECK-INSTANCE:CAPS">G_TYPE_CHECK_INSTANCE</a>               (instance)
 
98
#define             <a href="gobject-Type-Information.html#G-TYPE-CHECK-INSTANCE-CAST:CAPS">G_TYPE_CHECK_INSTANCE_CAST</a>          (instance, g_type, c_type)
 
99
#define             <a href="gobject-Type-Information.html#G-TYPE-CHECK-INSTANCE-TYPE:CAPS">G_TYPE_CHECK_INSTANCE_TYPE</a>          (instance, g_type)
 
100
#define             <a href="gobject-Type-Information.html#G-TYPE-CHECK-CLASS-CAST:CAPS">G_TYPE_CHECK_CLASS_CAST</a>             (g_class, g_type, c_type)
 
101
#define             <a href="gobject-Type-Information.html#G-TYPE-CHECK-CLASS-TYPE:CAPS">G_TYPE_CHECK_CLASS_TYPE</a>             (g_class, g_type)
 
102
#define             <a href="gobject-Type-Information.html#G-TYPE-CHECK-VALUE:CAPS">G_TYPE_CHECK_VALUE</a>                  (value)
 
103
#define             <a href="gobject-Type-Information.html#G-TYPE-CHECK-VALUE-TYPE:CAPS">G_TYPE_CHECK_VALUE_TYPE</a>             (value, g_type)
 
104
#define             <a href="gobject-Type-Information.html#G-TYPE-FLAG-RESERVED-ID-BIT:CAPS">G_TYPE_FLAG_RESERVED_ID_BIT</a>
 
105
void                <a href="gobject-Type-Information.html#g-type-init">g_type_init</a>                         (void);
 
106
enum                <a href="gobject-Type-Information.html#GTypeDebugFlags">GTypeDebugFlags</a>;
 
107
void                <a href="gobject-Type-Information.html#g-type-init-with-debug-flags">g_type_init_with_debug_flags</a>        (<a href="gobject-Type-Information.html#GTypeDebugFlags">GTypeDebugFlags</a> debug_flags);
 
108
const <a
 
109
href="../glib/glib-Basic-Types.html#gchar"
 
110
>gchar</a>*        <a href="gobject-Type-Information.html#g-type-name">g_type_name</a>                         (<a href="gobject-Type-Information.html#GType">GType</a> type);
 
111
<a
 
112
href="../glib/glib-Quarks.html#GQuark"
 
113
>GQuark</a>              <a href="gobject-Type-Information.html#g-type-qname">g_type_qname</a>                        (<a href="gobject-Type-Information.html#GType">GType</a> type);
 
114
<a href="gobject-Type-Information.html#GType">GType</a>               <a href="gobject-Type-Information.html#g-type-from-name">g_type_from_name</a>                    (const <a
 
115
href="../glib/glib-Basic-Types.html#gchar"
 
116
>gchar</a> *name);
 
117
<a href="gobject-Type-Information.html#GType">GType</a>               <a href="gobject-Type-Information.html#g-type-parent">g_type_parent</a>                       (<a href="gobject-Type-Information.html#GType">GType</a> type);
 
118
<a
 
119
href="../glib/glib-Basic-Types.html#guint"
 
120
>guint</a>               <a href="gobject-Type-Information.html#g-type-depth">g_type_depth</a>                        (<a href="gobject-Type-Information.html#GType">GType</a> type);
 
121
<a href="gobject-Type-Information.html#GType">GType</a>               <a href="gobject-Type-Information.html#g-type-next-base">g_type_next_base</a>                    (<a href="gobject-Type-Information.html#GType">GType</a> leaf_type,
 
122
                                                         <a href="gobject-Type-Information.html#GType">GType</a> root_type);
 
123
<a
 
124
href="../glib/glib-Basic-Types.html#gboolean"
 
125
>gboolean</a>            <a href="gobject-Type-Information.html#g-type-is-a">g_type_is_a</a>                         (<a href="gobject-Type-Information.html#GType">GType</a> type,
 
126
                                                         <a href="gobject-Type-Information.html#GType">GType</a> is_a_type);
 
127
<a
 
128
href="../glib/glib-Basic-Types.html#gpointer"
 
129
>gpointer</a>            <a href="gobject-Type-Information.html#g-type-class-ref">g_type_class_ref</a>                    (<a href="gobject-Type-Information.html#GType">GType</a> type);
 
130
<a
 
131
href="../glib/glib-Basic-Types.html#gpointer"
 
132
>gpointer</a>            <a href="gobject-Type-Information.html#g-type-class-peek">g_type_class_peek</a>                   (<a href="gobject-Type-Information.html#GType">GType</a> type);
 
133
<a
 
134
href="../glib/glib-Basic-Types.html#gpointer"
 
135
>gpointer</a>            <a href="gobject-Type-Information.html#g-type-class-peek-static">g_type_class_peek_static</a>            (<a href="gobject-Type-Information.html#GType">GType</a> type);
 
136
void                <a href="gobject-Type-Information.html#g-type-class-unref">g_type_class_unref</a>                  (<a
 
137
href="../glib/glib-Basic-Types.html#gpointer"
 
138
>gpointer</a> g_class);
 
139
<a
 
140
href="../glib/glib-Basic-Types.html#gpointer"
 
141
>gpointer</a>            <a href="gobject-Type-Information.html#g-type-class-peek-parent">g_type_class_peek_parent</a>            (<a
 
142
href="../glib/glib-Basic-Types.html#gpointer"
 
143
>gpointer</a> g_class);
 
144
void                <a href="gobject-Type-Information.html#g-type-class-add-private">g_type_class_add_private</a>            (<a
 
145
href="../glib/glib-Basic-Types.html#gpointer"
 
146
>gpointer</a> g_class,
 
147
                                                         <a
 
148
href="../glib/glib-Basic-Types.html#gsize"
 
149
>gsize</a> private_size);
 
150
<a
 
151
href="../glib/glib-Basic-Types.html#gpointer"
 
152
>gpointer</a>            <a href="gobject-Type-Information.html#g-type-interface-peek">g_type_interface_peek</a>               (<a
 
153
href="../glib/glib-Basic-Types.html#gpointer"
 
154
>gpointer</a> instance_class,
 
155
                                                         <a href="gobject-Type-Information.html#GType">GType</a> iface_type);
 
156
<a
 
157
href="../glib/glib-Basic-Types.html#gpointer"
 
158
>gpointer</a>            <a href="gobject-Type-Information.html#g-type-interface-peek-parent">g_type_interface_peek_parent</a>        (<a
 
159
href="../glib/glib-Basic-Types.html#gpointer"
 
160
>gpointer</a> g_iface);
 
161
<a
 
162
href="../glib/glib-Basic-Types.html#gpointer"
 
163
>gpointer</a>            <a href="gobject-Type-Information.html#g-type-default-interface-ref">g_type_default_interface_ref</a>        (<a href="gobject-Type-Information.html#GType">GType</a> g_type);
 
164
<a
 
165
href="../glib/glib-Basic-Types.html#gpointer"
 
166
>gpointer</a>            <a href="gobject-Type-Information.html#g-type-default-interface-peek">g_type_default_interface_peek</a>       (<a href="gobject-Type-Information.html#GType">GType</a> g_type);
 
167
void                <a href="gobject-Type-Information.html#g-type-default-interface-unref">g_type_default_interface_unref</a>      (<a
 
168
href="../glib/glib-Basic-Types.html#gpointer"
 
169
>gpointer</a> g_iface);
 
170
<a href="gobject-Type-Information.html#GType">GType</a>*              <a href="gobject-Type-Information.html#g-type-children">g_type_children</a>                     (<a href="gobject-Type-Information.html#GType">GType</a> type,
 
171
                                                         <a
 
172
href="../glib/glib-Basic-Types.html#guint"
 
173
>guint</a> *n_children);
 
174
<a href="gobject-Type-Information.html#GType">GType</a>*              <a href="gobject-Type-Information.html#g-type-interfaces">g_type_interfaces</a>                   (<a href="gobject-Type-Information.html#GType">GType</a> type,
 
175
                                                         <a
 
176
href="../glib/glib-Basic-Types.html#guint"
 
177
>guint</a> *n_interfaces);
 
178
<a href="gobject-Type-Information.html#GType">GType</a>*              <a href="gobject-Type-Information.html#g-type-interface-prerequisites">g_type_interface_prerequisites</a>      (<a href="gobject-Type-Information.html#GType">GType</a> interface_type,
 
179
                                                         <a
 
180
href="../glib/glib-Basic-Types.html#guint"
 
181
>guint</a> *n_prerequisites);
 
182
void                <a href="gobject-Type-Information.html#g-type-set-qdata">g_type_set_qdata</a>                    (<a href="gobject-Type-Information.html#GType">GType</a> type,
 
183
                                                         <a
 
184
href="../glib/glib-Quarks.html#GQuark"
 
185
>GQuark</a> quark,
 
186
                                                         <a
 
187
href="../glib/glib-Basic-Types.html#gpointer"
 
188
>gpointer</a> data);
 
189
<a
 
190
href="../glib/glib-Basic-Types.html#gpointer"
 
191
>gpointer</a>            <a href="gobject-Type-Information.html#g-type-get-qdata">g_type_get_qdata</a>                    (<a href="gobject-Type-Information.html#GType">GType</a> type,
 
192
                                                         <a
 
193
href="../glib/glib-Quarks.html#GQuark"
 
194
>GQuark</a> quark);
 
195
void                <a href="gobject-Type-Information.html#g-type-query">g_type_query</a>                        (<a href="gobject-Type-Information.html#GType">GType</a> type,
 
196
                                                         <a href="gobject-Type-Information.html#GTypeQuery">GTypeQuery</a> *query);
 
197
                    <a href="gobject-Type-Information.html#GTypeQuery">GTypeQuery</a>;
 
198
void                (<a href="gobject-Type-Information.html#GBaseInitFunc">*GBaseInitFunc</a>)                    (<a
 
199
href="../glib/glib-Basic-Types.html#gpointer"
 
200
>gpointer</a> g_class);
 
201
void                (<a href="gobject-Type-Information.html#GBaseFinalizeFunc">*GBaseFinalizeFunc</a>)                (<a
 
202
href="../glib/glib-Basic-Types.html#gpointer"
 
203
>gpointer</a> g_class);
 
204
void                (<a href="gobject-Type-Information.html#GClassInitFunc">*GClassInitFunc</a>)                   (<a
 
205
href="../glib/glib-Basic-Types.html#gpointer"
 
206
>gpointer</a> g_class,
 
207
                                                         <a
 
208
href="../glib/glib-Basic-Types.html#gpointer"
 
209
>gpointer</a> class_data);
 
210
void                (<a href="gobject-Type-Information.html#GClassFinalizeFunc">*GClassFinalizeFunc</a>)               (<a
 
211
href="../glib/glib-Basic-Types.html#gpointer"
 
212
>gpointer</a> g_class,
 
213
                                                         <a
 
214
href="../glib/glib-Basic-Types.html#gpointer"
 
215
>gpointer</a> class_data);
 
216
void                (<a href="gobject-Type-Information.html#GInstanceInitFunc">*GInstanceInitFunc</a>)                (<a href="gobject-Type-Information.html#GTypeInstance">GTypeInstance</a> *instance,
 
217
                                                         <a
 
218
href="../glib/glib-Basic-Types.html#gpointer"
 
219
>gpointer</a> g_class);
 
220
void                (<a href="gobject-Type-Information.html#GInterfaceInitFunc">*GInterfaceInitFunc</a>)               (<a
 
221
href="../glib/glib-Basic-Types.html#gpointer"
 
222
>gpointer</a> g_iface,
 
223
                                                         <a
 
224
href="../glib/glib-Basic-Types.html#gpointer"
 
225
>gpointer</a> iface_data);
 
226
void                (<a href="gobject-Type-Information.html#GInterfaceFinalizeFunc">*GInterfaceFinalizeFunc</a>)           (<a
 
227
href="../glib/glib-Basic-Types.html#gpointer"
 
228
>gpointer</a> g_iface,
 
229
                                                         <a
 
230
href="../glib/glib-Basic-Types.html#gpointer"
 
231
>gpointer</a> iface_data);
 
232
<a
 
233
href="../glib/glib-Basic-Types.html#gboolean"
 
234
>gboolean</a>            (<a href="gobject-Type-Information.html#GTypeClassCacheFunc">*GTypeClassCacheFunc</a>)              (<a
 
235
href="../glib/glib-Basic-Types.html#gpointer"
 
236
>gpointer</a> cache_data,
 
237
                                                         <a href="gobject-Type-Information.html#GTypeClass">GTypeClass</a> *g_class);
 
238
enum                <a href="gobject-Type-Information.html#GTypeFlags">GTypeFlags</a>;
 
239
enum                <a href="gobject-Type-Information.html#GTypeFundamentalFlags">GTypeFundamentalFlags</a>;
 
240
<a href="gobject-Type-Information.html#GType">GType</a>               <a href="gobject-Type-Information.html#g-type-register-static">g_type_register_static</a>              (<a href="gobject-Type-Information.html#GType">GType</a> parent_type,
 
241
                                                         const <a
 
242
href="../glib/glib-Basic-Types.html#gchar"
 
243
>gchar</a> *type_name,
 
244
                                                         const <a href="gobject-Type-Information.html#GTypeInfo">GTypeInfo</a> *info,
 
245
                                                         <a href="gobject-Type-Information.html#GTypeFlags">GTypeFlags</a> flags);
 
246
<a href="gobject-Type-Information.html#GType">GType</a>               <a href="gobject-Type-Information.html#g-type-register-static-simple">g_type_register_static_simple</a>       (<a href="gobject-Type-Information.html#GType">GType</a> parent_type,
 
247
                                                         const <a
 
248
href="../glib/glib-Basic-Types.html#gchar"
 
249
>gchar</a> *type_name,
 
250
                                                         <a
 
251
href="../glib/glib-Basic-Types.html#guint"
 
252
>guint</a> class_size,
 
253
                                                         <a href="gobject-Type-Information.html#GClassInitFunc">GClassInitFunc</a> class_init,
 
254
                                                         <a
 
255
href="../glib/glib-Basic-Types.html#guint"
 
256
>guint</a> instance_size,
 
257
                                                         <a href="gobject-Type-Information.html#GInstanceInitFunc">GInstanceInitFunc</a> instance_init,
 
258
                                                         <a href="gobject-Type-Information.html#GTypeFlags">GTypeFlags</a> flags);
 
259
<a href="gobject-Type-Information.html#GType">GType</a>               <a href="gobject-Type-Information.html#g-type-register-dynamic">g_type_register_dynamic</a>             (<a href="gobject-Type-Information.html#GType">GType</a> parent_type,
 
260
                                                         const <a
 
261
href="../glib/glib-Basic-Types.html#gchar"
 
262
>gchar</a> *type_name,
 
263
                                                         <a href="GTypePlugin.html" title="GTypePlugin">GTypePlugin</a> *plugin,
 
264
                                                         <a href="gobject-Type-Information.html#GTypeFlags">GTypeFlags</a> flags);
 
265
<a href="gobject-Type-Information.html#GType">GType</a>               <a href="gobject-Type-Information.html#g-type-register-fundamental">g_type_register_fundamental</a>         (<a href="gobject-Type-Information.html#GType">GType</a> type_id,
 
266
                                                         const <a
 
267
href="../glib/glib-Basic-Types.html#gchar"
 
268
>gchar</a> *type_name,
 
269
                                                         const <a href="gobject-Type-Information.html#GTypeInfo">GTypeInfo</a> *info,
 
270
                                                         const <a href="gobject-Type-Information.html#GTypeFundamentalInfo">GTypeFundamentalInfo</a> *finfo,
 
271
                                                         <a href="gobject-Type-Information.html#GTypeFlags">GTypeFlags</a> flags);
 
272
void                <a href="gobject-Type-Information.html#g-type-add-interface-static">g_type_add_interface_static</a>         (<a href="gobject-Type-Information.html#GType">GType</a> instance_type,
 
273
                                                         <a href="gobject-Type-Information.html#GType">GType</a> interface_type,
 
274
                                                         const <a href="gobject-Type-Information.html#GInterfaceInfo">GInterfaceInfo</a> *info);
 
275
void                <a href="gobject-Type-Information.html#g-type-add-interface-dynamic">g_type_add_interface_dynamic</a>        (<a href="gobject-Type-Information.html#GType">GType</a> instance_type,
 
276
                                                         <a href="gobject-Type-Information.html#GType">GType</a> interface_type,
 
277
                                                         <a href="GTypePlugin.html" title="GTypePlugin">GTypePlugin</a> *plugin);
 
278
void                <a href="gobject-Type-Information.html#g-type-interface-add-prerequisite">g_type_interface_add_prerequisite</a>   (<a href="gobject-Type-Information.html#GType">GType</a> interface_type,
 
279
                                                         <a href="gobject-Type-Information.html#GType">GType</a> prerequisite_type);
 
280
<a href="GTypePlugin.html" title="GTypePlugin">GTypePlugin</a>*        <a href="gobject-Type-Information.html#g-type-get-plugin">g_type_get_plugin</a>                   (<a href="gobject-Type-Information.html#GType">GType</a> type);
 
281
<a href="GTypePlugin.html" title="GTypePlugin">GTypePlugin</a>*        <a href="gobject-Type-Information.html#g-type-interface-get-plugin">g_type_interface_get_plugin</a>         (<a href="gobject-Type-Information.html#GType">GType</a> instance_type,
 
282
                                                         <a href="gobject-Type-Information.html#GType">GType</a> interface_type);
 
283
<a href="gobject-Type-Information.html#GType">GType</a>               <a href="gobject-Type-Information.html#g-type-fundamental-next">g_type_fundamental_next</a>             (void);
 
284
<a href="gobject-Type-Information.html#GType">GType</a>               <a href="gobject-Type-Information.html#g-type-fundamental">g_type_fundamental</a>                  (<a href="gobject-Type-Information.html#GType">GType</a> type_id);
 
285
<a href="gobject-Type-Information.html#GTypeInstance">GTypeInstance</a>*      <a href="gobject-Type-Information.html#g-type-create-instance">g_type_create_instance</a>              (<a href="gobject-Type-Information.html#GType">GType</a> type);
 
286
void                <a href="gobject-Type-Information.html#g-type-free-instance">g_type_free_instance</a>                (<a href="gobject-Type-Information.html#GTypeInstance">GTypeInstance</a> *instance);
 
287
void                <a href="gobject-Type-Information.html#g-type-add-class-cache-func">g_type_add_class_cache_func</a>         (<a
 
288
href="../glib/glib-Basic-Types.html#gpointer"
 
289
>gpointer</a> cache_data,
 
290
                                                         <a href="gobject-Type-Information.html#GTypeClassCacheFunc">GTypeClassCacheFunc</a> cache_func);
 
291
void                <a href="gobject-Type-Information.html#g-type-remove-class-cache-func">g_type_remove_class_cache_func</a>      (<a
 
292
href="../glib/glib-Basic-Types.html#gpointer"
 
293
>gpointer</a> cache_data,
 
294
                                                         <a href="gobject-Type-Information.html#GTypeClassCacheFunc">GTypeClassCacheFunc</a> cache_func);
 
295
void                <a href="gobject-Type-Information.html#g-type-class-unref-uncached">g_type_class_unref_uncached</a>         (<a
 
296
href="../glib/glib-Basic-Types.html#gpointer"
 
297
>gpointer</a> g_class);
 
298
void                <a href="gobject-Type-Information.html#g-type-add-interface-check">g_type_add_interface_check</a>          (<a
 
299
href="../glib/glib-Basic-Types.html#gpointer"
 
300
>gpointer</a> check_data,
 
301
                                                         <a href="gobject-Type-Information.html#GTypeInterfaceCheckFunc">GTypeInterfaceCheckFunc</a> check_func);
 
302
void                <a href="gobject-Type-Information.html#g-type-remove-interface-check">g_type_remove_interface_check</a>       (<a
 
303
href="../glib/glib-Basic-Types.html#gpointer"
 
304
>gpointer</a> check_data,
 
305
                                                         <a href="gobject-Type-Information.html#GTypeInterfaceCheckFunc">GTypeInterfaceCheckFunc</a> check_func);
 
306
void                (<a href="gobject-Type-Information.html#GTypeInterfaceCheckFunc">*GTypeInterfaceCheckFunc</a>)          (<a
 
307
href="../glib/glib-Basic-Types.html#gpointer"
 
308
>gpointer</a> check_data,
 
309
                                                         <a
 
310
href="../glib/glib-Basic-Types.html#gpointer"
 
311
>gpointer</a> g_iface);
 
312
<a href="gobject-Type-Information.html#GTypeValueTable">GTypeValueTable</a>*    <a href="gobject-Type-Information.html#g-type-value-table-peek">g_type_value_table_peek</a>             (<a href="gobject-Type-Information.html#GType">GType</a> type);
 
313
#define             <a href="gobject-Type-Information.html#G-DEFINE-TYPE:CAPS">G_DEFINE_TYPE</a>                       (TN, t_n, T_P)
 
314
#define             <a href="gobject-Type-Information.html#G-DEFINE-TYPE-WITH-CODE:CAPS">G_DEFINE_TYPE_WITH_CODE</a>             (TN, t_n, T_P, _C_)
 
315
#define             <a href="gobject-Type-Information.html#G-DEFINE-ABSTRACT-TYPE:CAPS">G_DEFINE_ABSTRACT_TYPE</a>              (TN, t_n, T_P)
 
316
#define             <a href="gobject-Type-Information.html#G-DEFINE-ABSTRACT-TYPE-WITH-CODE:CAPS">G_DEFINE_ABSTRACT_TYPE_WITH_CODE</a>    (TN, t_n, T_P, _C_)
 
317
#define             <a href="gobject-Type-Information.html#G-IMPLEMENT-INTERFACE:CAPS">G_IMPLEMENT_INTERFACE</a>               (TYPE_IFACE, iface_init)
 
318
#define             <a href="gobject-Type-Information.html#G-DEFINE-TYPE-EXTENDED:CAPS">G_DEFINE_TYPE_EXTENDED</a>              (TN, t_n, T_P, _f_, _C_)
 
319
 
 
320
 
 
321
#define             <a href="gobject-Type-Information.html#G-TYPE-INVALID:CAPS">G_TYPE_INVALID</a>
 
322
#define             <a href="gobject-Type-Information.html#G-TYPE-NONE:CAPS">G_TYPE_NONE</a>
 
323
#define             <a href="gobject-Type-Information.html#G-TYPE-INTERFACE:CAPS">G_TYPE_INTERFACE</a>
 
324
#define             <a href="gobject-Type-Information.html#G-TYPE-CHAR:CAPS">G_TYPE_CHAR</a>
 
325
#define             <a href="gobject-Type-Information.html#G-TYPE-UCHAR:CAPS">G_TYPE_UCHAR</a>
 
326
#define             <a href="gobject-Type-Information.html#G-TYPE-BOOLEAN:CAPS">G_TYPE_BOOLEAN</a>
 
327
#define             <a href="gobject-Type-Information.html#G-TYPE-INT:CAPS">G_TYPE_INT</a>
 
328
#define             <a href="gobject-Type-Information.html#G-TYPE-UINT:CAPS">G_TYPE_UINT</a>
 
329
#define             <a href="gobject-Type-Information.html#G-TYPE-LONG:CAPS">G_TYPE_LONG</a>
 
330
#define             <a href="gobject-Type-Information.html#G-TYPE-ULONG:CAPS">G_TYPE_ULONG</a>
 
331
#define             <a href="gobject-Type-Information.html#G-TYPE-INT64:CAPS">G_TYPE_INT64</a>
 
332
#define             <a href="gobject-Type-Information.html#G-TYPE-UINT64:CAPS">G_TYPE_UINT64</a>
 
333
#define             <a href="gobject-Type-Information.html#G-TYPE-ENUM:CAPS">G_TYPE_ENUM</a>
 
334
#define             <a href="gobject-Type-Information.html#G-TYPE-FLAGS:CAPS">G_TYPE_FLAGS</a>
 
335
#define             <a href="gobject-Type-Information.html#G-TYPE-FLOAT:CAPS">G_TYPE_FLOAT</a>
 
336
#define             <a href="gobject-Type-Information.html#G-TYPE-DOUBLE:CAPS">G_TYPE_DOUBLE</a>
 
337
#define             <a href="gobject-Type-Information.html#G-TYPE-STRING:CAPS">G_TYPE_STRING</a>
 
338
#define             <a href="gobject-Type-Information.html#G-TYPE-POINTER:CAPS">G_TYPE_POINTER</a>
 
339
#define             <a href="gobject-Type-Information.html#G-TYPE-BOXED:CAPS">G_TYPE_BOXED</a>
 
340
#define             <a href="gobject-Type-Information.html#G-TYPE-PARAM:CAPS">G_TYPE_PARAM</a>
 
341
#define             <a href="gobject-Type-Information.html#G-TYPE-OBJECT:CAPS">G_TYPE_OBJECT</a>
 
342
#define             <a href="gobject-Type-Information.html#G-TYPE-GTYPE:CAPS">G_TYPE_GTYPE</a>
 
343
 
 
344
#define             <a href="gobject-Type-Information.html#G-TYPE-RESERVED-GLIB-FIRST:CAPS">G_TYPE_RESERVED_GLIB_FIRST</a>
 
345
#define             <a href="gobject-Type-Information.html#G-TYPE-RESERVED-GLIB-LAST:CAPS">G_TYPE_RESERVED_GLIB_LAST</a>
 
346
#define             <a href="gobject-Type-Information.html#G-TYPE-RESERVED-BSE-FIRST:CAPS">G_TYPE_RESERVED_BSE_FIRST</a>
 
347
#define             <a href="gobject-Type-Information.html#G-TYPE-RESERVED-BSE-LAST:CAPS">G_TYPE_RESERVED_BSE_LAST</a>
 
348
#define             <a href="gobject-Type-Information.html#G-TYPE-RESERVED-USER-FIRST:CAPS">G_TYPE_RESERVED_USER_FIRST</a>
 
349
 
 
350
</pre>
 
351
</div>
 
352
<div class="refsect1" lang="en">
 
353
<a name="id3024162"></a><h2>Description</h2>
 
354
<p>
 
355
The GType API is the foundation of the GObject system.  It provides the
 
356
facilities for registering and managing all fundamental data types,
 
357
user-defined object and interface types.  Before using any GType
 
358
or GObject functions, <a href="gobject-Type-Information.html#g-type-init"><code class="function">g_type_init()</code></a> must be called to initialize the
 
359
type system.
 
360
</p>
 
361
<p>
 
362
For type creation and registration purposes, all types fall into one of
 
363
two categories: static or dynamic.  Static types are never loaded or
 
364
unloaded at run-time as dynamic types may be.  Static types are created
 
365
with <a href="gobject-Type-Information.html#g-type-register-static"><code class="function">g_type_register_static()</code></a> that gets type specific information passed
 
366
in via a <a href="gobject-Type-Information.html#GTypeInfo"><span class="type">GTypeInfo</span></a> structure.
 
367
Dynamic types are created with <a href="gobject-Type-Information.html#g-type-register-dynamic"><code class="function">g_type_register_dynamic()</code></a> which takes a
 
368
<a href="GTypePlugin.html" title="GTypePlugin"><span class="type">GTypePlugin</span></a> structure instead. The remaining type information (the
 
369
<a href="gobject-Type-Information.html#GTypeInfo"><span class="type">GTypeInfo</span></a> structure) is retrieved during runtime through <a href="GTypePlugin.html" title="GTypePlugin"><span class="type">GTypePlugin</span></a>
 
370
and the g_type_plugin_*() API.
 
371
These registration functions are usually called only once from a 
 
372
function whose only purpose is to return the type identifier for a 
 
373
specific class.  Once the type (or class or interface) is registered,
 
374
it may be instantiated, inherited, or implemented depending on exactly
 
375
what sort of type it is.
 
376
There is also a third registration function for registering fundamental
 
377
types called <a href="gobject-Type-Information.html#g-type-register-fundamental"><code class="function">g_type_register_fundamental()</code></a> which requires both a <a href="gobject-Type-Information.html#GTypeInfo"><span class="type">GTypeInfo</span></a>
 
378
structure and a <a href="gobject-Type-Information.html#GTypeFundamentalInfo"><span class="type">GTypeFundamentalInfo</span></a> structure but it is seldom used
 
379
since most fundamental types are predefined rather than user-defined.
 
380
</p>
 
381
<p>
 
382
A final word about type names.
 
383
Such an identifier needs to be at least three characters long. There is no
 
384
upper length limit. The first character needs to be a letter (a-z or A-Z)
 
385
or an underscore '_'. Subsequent characters can be letters, numbers or
 
386
any of '-_+'.
 
387
</p>
 
388
</div>
 
389
<div class="refsect1" lang="en">
 
390
<a name="id3021834"></a><h2>Details</h2>
 
391
<div class="refsect2" lang="en">
 
392
<a name="id3021845"></a><h3>
 
393
<a name="GType"></a>GType</h3>
 
394
<a class="indexterm" name="id3021857"></a><p>
 
395
A numerical value which represents the unique identifier of a registered
 
396
type.
 
397
</p>
 
398
</div>
 
399
<hr>
 
400
<div class="refsect2" lang="en">
 
401
<a name="id3021867"></a><h3>
 
402
<a name="G-TYPE-FUNDAMENTAL:CAPS"></a>G_TYPE_FUNDAMENTAL()</h3>
 
403
<a class="indexterm" name="id3021880"></a><pre class="programlisting">#define G_TYPE_FUNDAMENTAL(type)  (g_type_fundamental (type))
 
404
</pre>
 
405
<p>
 
406
Returns the fundamental type which is the ancestor of <em class="parameter"><code>type</code></em>.
 
407
Fundamental types are types that serve as ultimate bases for the derived types, 
 
408
thus they are the roots of distinct inheritance hierarchies.
 
409
</p>
 
410
<div class="variablelist"><table border="0">
 
411
<col align="left" valign="top">
 
412
<tbody><tr>
 
413
<td><span class="term"><em class="parameter"><code>type</code></em>&#160;:</span></td>
 
414
<td>A <a href="gobject-Type-Information.html#GType"><span class="type">GType</span></a> value.
 
415
 
 
416
 
 
417
</td>
 
418
</tr></tbody>
 
419
</table></div>
 
420
</div>
 
421
<hr>
 
422
<div class="refsect2" lang="en">
 
423
<a name="id3024537"></a><h3>
 
424
<a name="G-TYPE-FUNDAMENTAL-MAX:CAPS"></a>G_TYPE_FUNDAMENTAL_MAX</h3>
 
425
<a class="indexterm" name="id3024550"></a><pre class="programlisting">#define   G_TYPE_FUNDAMENTAL_MAX          (255 &lt;&lt; G_TYPE_FUNDAMENTAL_SHIFT)
 
426
</pre>
 
427
<p>
 
428
An integer constant that represents the number of identifiers reserved
 
429
for types that are assigned at compile-time.
 
430
</p>
 
431
</div>
 
432
<hr>
 
433
<div class="refsect2" lang="en">
 
434
<a name="id3024568"></a><h3>
 
435
<a name="G-TYPE-MAKE-FUNDAMENTAL:CAPS"></a>G_TYPE_MAKE_FUNDAMENTAL()</h3>
 
436
<a class="indexterm" name="id3024581"></a><pre class="programlisting">#define   G_TYPE_MAKE_FUNDAMENTAL(x)      ((GType) ((x) &lt;&lt; G_TYPE_FUNDAMENTAL_SHIFT))
 
437
</pre>
 
438
<p>
 
439
Returns the type ID for the fundamental type number <em class="parameter"><code>x</code></em>.
 
440
Use <a href="gobject-Type-Information.html#g-type-fundamental-next"><code class="function">g_type_fundamental_next()</code></a> instead of this macro to create new fundamental 
 
441
types.
 
442
</p>
 
443
<div class="variablelist"><table border="0">
 
444
<col align="left" valign="top">
 
445
<tbody><tr>
 
446
<td><span class="term"><em class="parameter"><code>x</code></em>&#160;:</span></td>
 
447
<td>the fundamental type number.
 
448
 
 
449
 
 
450
</td>
 
451
</tr></tbody>
 
452
</table></div>
 
453
</div>
 
454
<hr>
 
455
<div class="refsect2" lang="en">
 
456
<a name="id3024634"></a><h3>
 
457
<a name="G-TYPE-IS-ABSTRACT:CAPS"></a>G_TYPE_IS_ABSTRACT()</h3>
 
458
<a class="indexterm" name="id3024647"></a><pre class="programlisting">#define G_TYPE_IS_ABSTRACT(type)                (g_type_test_flags ((type), G_TYPE_FLAG_ABSTRACT))
 
459
</pre>
 
460
<p>
 
461
Returns <a
 
462
href="../glib/glib-Standard-Macros.html#TRUE:CAPS"
 
463
><code class="literal">TRUE</code></a> if <em class="parameter"><code>type</code></em> is an abstract type.  An abstract type can not be
 
464
instantiated and is normally used as an abstract base class for
 
465
derived classes.
 
466
</p>
 
467
<div class="variablelist"><table border="0">
 
468
<col align="left" valign="top">
 
469
<tbody><tr>
 
470
<td><span class="term"><em class="parameter"><code>type</code></em>&#160;:</span></td>
 
471
<td>A <a href="gobject-Type-Information.html#GType"><span class="type">GType</span></a> value.
 
472
 
 
473
 
 
474
</td>
 
475
</tr></tbody>
 
476
</table></div>
 
477
</div>
 
478
<hr>
 
479
<div class="refsect2" lang="en">
 
480
<a name="id3024709"></a><h3>
 
481
<a name="G-TYPE-IS-DERIVED:CAPS"></a>G_TYPE_IS_DERIVED()</h3>
 
482
<a class="indexterm" name="id3024722"></a><pre class="programlisting">#define G_TYPE_IS_DERIVED(type)                 ((type) &gt; G_TYPE_FUNDAMENTAL_MAX)
 
483
</pre>
 
484
<p>
 
485
Returns <a
 
486
href="../glib/glib-Standard-Macros.html#TRUE:CAPS"
 
487
><code class="literal">TRUE</code></a> if <em class="parameter"><code>type</code></em> is derived (or in object-oriented terminology:
 
488
inherited) from another type (this holds true for all non-fundamental
 
489
types).
 
490
</p>
 
491
<div class="variablelist"><table border="0">
 
492
<col align="left" valign="top">
 
493
<tbody><tr>
 
494
<td><span class="term"><em class="parameter"><code>type</code></em>&#160;:</span></td>
 
495
<td>A <a href="gobject-Type-Information.html#GType"><span class="type">GType</span></a> value.
 
496
 
 
497
 
 
498
</td>
 
499
</tr></tbody>
 
500
</table></div>
 
501
</div>
 
502
<hr>
 
503
<div class="refsect2" lang="en">
 
504
<a name="id3024784"></a><h3>
 
505
<a name="G-TYPE-IS-FUNDAMENTAL:CAPS"></a>G_TYPE_IS_FUNDAMENTAL()</h3>
 
506
<a class="indexterm" name="id3024796"></a><pre class="programlisting">#define G_TYPE_IS_FUNDAMENTAL(type)             ((type) &lt;= G_TYPE_FUNDAMENTAL_MAX)
 
507
</pre>
 
508
<p>
 
509
Returns <a
 
510
href="../glib/glib-Standard-Macros.html#TRUE:CAPS"
 
511
><code class="literal">TRUE</code></a> if <em class="parameter"><code>type</code></em> is a fundamental type.
 
512
</p>
 
513
<div class="variablelist"><table border="0">
 
514
<col align="left" valign="top">
 
515
<tbody><tr>
 
516
<td><span class="term"><em class="parameter"><code>type</code></em>&#160;:</span></td>
 
517
<td>A <a href="gobject-Type-Information.html#GType"><span class="type">GType</span></a> value.
 
518
 
 
519
 
 
520
</td>
 
521
</tr></tbody>
 
522
</table></div>
 
523
</div>
 
524
<hr>
 
525
<div class="refsect2" lang="en">
 
526
<a name="id3024855"></a><h3>
 
527
<a name="G-TYPE-IS-VALUE-TYPE:CAPS"></a>G_TYPE_IS_VALUE_TYPE()</h3>
 
528
<a class="indexterm" name="id3024869"></a><pre class="programlisting">#define G_TYPE_IS_VALUE_TYPE(type)              (g_type_check_is_value_type (type))
 
529
</pre>
 
530
<p>
 
531
Returns <a
 
532
href="../glib/glib-Standard-Macros.html#TRUE:CAPS"
 
533
><code class="literal">TRUE</code></a> if <em class="parameter"><code>type</code></em> is a value type and can be used with
 
534
<a href="gobject-Generic-values.html#g-value-init"><code class="function">g_value_init()</code></a>. 
 
535
</p>
 
536
<div class="variablelist"><table border="0">
 
537
<col align="left" valign="top">
 
538
<tbody><tr>
 
539
<td><span class="term"><em class="parameter"><code>type</code></em>&#160;:</span></td>
 
540
<td>A <a href="gobject-Type-Information.html#GType"><span class="type">GType</span></a> value.
 
541
 
 
542
 
 
543
</td>
 
544
</tr></tbody>
 
545
</table></div>
 
546
</div>
 
547
<hr>
 
548
<div class="refsect2" lang="en">
 
549
<a name="id3024939"></a><h3>
 
550
<a name="G-TYPE-HAS-VALUE-TABLE:CAPS"></a>G_TYPE_HAS_VALUE_TABLE()</h3>
 
551
<a class="indexterm" name="id3024952"></a><pre class="programlisting">#define G_TYPE_HAS_VALUE_TABLE(type)            (g_type_value_table_peek (type) != NULL)
 
552
</pre>
 
553
<p>
 
554
Returns <a
 
555
href="../glib/glib-Standard-Macros.html#TRUE:CAPS"
 
556
><code class="literal">TRUE</code></a> if <em class="parameter"><code>type</code></em> has a <a href="gobject-Type-Information.html#GTypeValueTable"><span class="type">GTypeValueTable</span></a>.
 
557
</p>
 
558
<div class="variablelist"><table border="0">
 
559
<col align="left" valign="top">
 
560
<tbody><tr>
 
561
<td><span class="term"><em class="parameter"><code>type</code></em>&#160;:</span></td>
 
562
<td>A <a href="gobject-Type-Information.html#GType"><span class="type">GType</span></a> value.
 
563
 
 
564
 
 
565
</td>
 
566
</tr></tbody>
 
567
</table></div>
 
568
</div>
 
569
<hr>
 
570
<div class="refsect2" lang="en">
 
571
<a name="id3025019"></a><h3>
 
572
<a name="G-TYPE-IS-CLASSED:CAPS"></a>G_TYPE_IS_CLASSED()</h3>
 
573
<a class="indexterm" name="id3025032"></a><pre class="programlisting">#define G_TYPE_IS_CLASSED(type)                 (g_type_test_flags ((type), G_TYPE_FLAG_CLASSED))
 
574
</pre>
 
575
<p>
 
576
Returns <a
 
577
href="../glib/glib-Standard-Macros.html#TRUE:CAPS"
 
578
><code class="literal">TRUE</code></a> if <em class="parameter"><code>type</code></em> is a classed type.
 
579
</p>
 
580
<div class="variablelist"><table border="0">
 
581
<col align="left" valign="top">
 
582
<tbody><tr>
 
583
<td><span class="term"><em class="parameter"><code>type</code></em>&#160;:</span></td>
 
584
<td>A <a href="gobject-Type-Information.html#GType"><span class="type">GType</span></a> value.
 
585
 
 
586
 
 
587
</td>
 
588
</tr></tbody>
 
589
</table></div>
 
590
</div>
 
591
<hr>
 
592
<div class="refsect2" lang="en">
 
593
<a name="id3025091"></a><h3>
 
594
<a name="G-TYPE-IS-INSTANTIATABLE:CAPS"></a>G_TYPE_IS_INSTANTIATABLE()</h3>
 
595
<a class="indexterm" name="id3025105"></a><pre class="programlisting">#define G_TYPE_IS_INSTANTIATABLE(type)          (g_type_test_flags ((type), G_TYPE_FLAG_INSTANTIATABLE))
 
596
</pre>
 
597
<p>
 
598
Returns <a
 
599
href="../glib/glib-Standard-Macros.html#TRUE:CAPS"
 
600
><code class="literal">TRUE</code></a> if <em class="parameter"><code>type</code></em> can be instantiated.  Instantiation is the
 
601
process of creating an instance (object) of this type.
 
602
</p>
 
603
<div class="variablelist"><table border="0">
 
604
<col align="left" valign="top">
 
605
<tbody><tr>
 
606
<td><span class="term"><em class="parameter"><code>type</code></em>&#160;:</span></td>
 
607
<td>A <a href="gobject-Type-Information.html#GType"><span class="type">GType</span></a> value.
 
608
 
 
609
 
 
610
</td>
 
611
</tr></tbody>
 
612
</table></div>
 
613
</div>
 
614
<hr>
 
615
<div class="refsect2" lang="en">
 
616
<a name="id3025165"></a><h3>
 
617
<a name="G-TYPE-IS-DERIVABLE:CAPS"></a>G_TYPE_IS_DERIVABLE()</h3>
 
618
<a class="indexterm" name="id3025179"></a><pre class="programlisting">#define G_TYPE_IS_DERIVABLE(type)               (g_type_test_flags ((type), G_TYPE_FLAG_DERIVABLE))
 
619
</pre>
 
620
<p>
 
621
Returns <a
 
622
href="../glib/glib-Standard-Macros.html#TRUE:CAPS"
 
623
><code class="literal">TRUE</code></a> if <em class="parameter"><code>type</code></em> is a derivable type.  A derivable type can
 
624
be used as the base class of a flat (single-level) class hierarchy.
 
625
</p>
 
626
<div class="variablelist"><table border="0">
 
627
<col align="left" valign="top">
 
628
<tbody><tr>
 
629
<td><span class="term"><em class="parameter"><code>type</code></em>&#160;:</span></td>
 
630
<td>A <a href="gobject-Type-Information.html#GType"><span class="type">GType</span></a> value.
 
631
 
 
632
 
 
633
</td>
 
634
</tr></tbody>
 
635
</table></div>
 
636
</div>
 
637
<hr>
 
638
<div class="refsect2" lang="en">
 
639
<a name="id3025239"></a><h3>
 
640
<a name="G-TYPE-IS-DEEP-DERIVABLE:CAPS"></a>G_TYPE_IS_DEEP_DERIVABLE()</h3>
 
641
<a class="indexterm" name="id3025252"></a><pre class="programlisting">#define G_TYPE_IS_DEEP_DERIVABLE(type)          (g_type_test_flags ((type), G_TYPE_FLAG_DEEP_DERIVABLE))
 
642
</pre>
 
643
<p>
 
644
Returns <a
 
645
href="../glib/glib-Standard-Macros.html#TRUE:CAPS"
 
646
><code class="literal">TRUE</code></a> if <em class="parameter"><code>type</code></em> is a deep derivable type.  A deep derivable type
 
647
can be used as the base class of a deep (multi-level) class hierarchy.
 
648
</p>
 
649
<div class="variablelist"><table border="0">
 
650
<col align="left" valign="top">
 
651
<tbody><tr>
 
652
<td><span class="term"><em class="parameter"><code>type</code></em>&#160;:</span></td>
 
653
<td>A <a href="gobject-Type-Information.html#GType"><span class="type">GType</span></a> value.
 
654
 
 
655
 
 
656
</td>
 
657
</tr></tbody>
 
658
</table></div>
 
659
</div>
 
660
<hr>
 
661
<div class="refsect2" lang="en">
 
662
<a name="id3025313"></a><h3>
 
663
<a name="G-TYPE-IS-INTERFACE:CAPS"></a>G_TYPE_IS_INTERFACE()</h3>
 
664
<a class="indexterm" name="id3025326"></a><pre class="programlisting">#define G_TYPE_IS_INTERFACE(type)               (G_TYPE_FUNDAMENTAL (type) == G_TYPE_INTERFACE)
 
665
</pre>
 
666
<p>
 
667
Returns <a
 
668
href="../glib/glib-Standard-Macros.html#TRUE:CAPS"
 
669
><code class="literal">TRUE</code></a> if <em class="parameter"><code>type</code></em> is an interface type.
 
670
An interface type provides a pure API, the implementation
 
671
of which is provided by another type (which is then said to conform
 
672
to the interface).  GLib interfaces are somewhat analogous to Java
 
673
interfaces and C++ classes containing only pure virtual functions, 
 
674
with the difference that GType interfaces are not derivable (but see
 
675
<a href="gobject-Type-Information.html#g-type-interface-add-prerequisite"><code class="function">g_type_interface_add_prerequisite()</code></a> for an alternative).
 
676
</p>
 
677
<div class="variablelist"><table border="0">
 
678
<col align="left" valign="top">
 
679
<tbody><tr>
 
680
<td><span class="term"><em class="parameter"><code>type</code></em>&#160;:</span></td>
 
681
<td>A <a href="gobject-Type-Information.html#GType"><span class="type">GType</span></a> value.
 
682
 
 
683
 
 
684
</td>
 
685
</tr></tbody>
 
686
</table></div>
 
687
</div>
 
688
<hr>
 
689
<div class="refsect2" lang="en">
 
690
<a name="id3025402"></a><h3>
 
691
<a name="GTypeInterface"></a>GTypeInterface</h3>
 
692
<a class="indexterm" name="id3025414"></a><pre class="programlisting">typedef struct {
 
693
} GTypeInterface;
 
694
</pre>
 
695
<p>
 
696
An opaque structure used as the base of all interface types.
 
697
</p>
 
698
</div>
 
699
<hr>
 
700
<div class="refsect2" lang="en">
 
701
<a name="id3025431"></a><h3>
 
702
<a name="GTypeInstance"></a>GTypeInstance</h3>
 
703
<a class="indexterm" name="id3025443"></a><pre class="programlisting">typedef struct {
 
704
} GTypeInstance;
 
705
</pre>
 
706
<p>
 
707
An opaque structure used as the base of all type instances.
 
708
</p>
 
709
</div>
 
710
<hr>
 
711
<div class="refsect2" lang="en">
 
712
<a name="id3025460"></a><h3>
 
713
<a name="GTypeClass"></a>GTypeClass</h3>
 
714
<a class="indexterm" name="id3025472"></a><pre class="programlisting">typedef struct {
 
715
} GTypeClass;
 
716
</pre>
 
717
<p>
 
718
An opaque structure used as the base of all classes.
 
719
</p>
 
720
</div>
 
721
<hr>
 
722
<div class="refsect2" lang="en">
 
723
<a name="id3025488"></a><h3>
 
724
<a name="GTypeInfo"></a>GTypeInfo</h3>
 
725
<a class="indexterm" name="id3025500"></a><pre class="programlisting">typedef struct {
 
726
  /* interface types, classed types, instantiated types */
 
727
  guint16                class_size;
 
728
  
 
729
  GBaseInitFunc          base_init;
 
730
  GBaseFinalizeFunc      base_finalize;
 
731
  
 
732
  /* interface types, classed types, instantiated types */
 
733
  GClassInitFunc         class_init;
 
734
  GClassFinalizeFunc     class_finalize;
 
735
  gconstpointer          class_data;
 
736
  
 
737
  /* instantiated types */
 
738
  guint16                instance_size;
 
739
  guint16                n_preallocs;
 
740
  GInstanceInitFunc      instance_init;
 
741
  
 
742
  /* value handling */
 
743
  const GTypeValueTable *value_table;
 
744
} GTypeInfo;
 
745
</pre>
 
746
<p>
 
747
This structure is used to provide the type system with the information
 
748
required to initialize and destruct (finalize) a type's class and
 
749
its instances.
 
750
The initialized structure is passed to the <a href="gobject-Type-Information.html#g-type-register-static"><code class="function">g_type_register_static()</code></a> function
 
751
(or is copied into the provided <a href="gobject-Type-Information.html#GTypeInfo"><span class="type">GTypeInfo</span></a> structure in the
 
752
<a href="GTypePlugin.html#g-type-plugin-complete-type-info"><code class="function">g_type_plugin_complete_type_info()</code></a>). The type system will perform a deep
 
753
copy of this structure, so its memory does not need to be persistent
 
754
across invocation of <a href="gobject-Type-Information.html#g-type-register-static"><code class="function">g_type_register_static()</code></a>.
 
755
</p>
 
756
<div class="variablelist"><table border="0">
 
757
<col align="left" valign="top">
 
758
<tbody>
 
759
<tr>
 
760
<td><span class="term"><a
 
761
href="../glib/glib-Basic-Types.html#guint16"
 
762
>guint16</a>&#160;<em class="structfield"><code>class_size</code></em>;</span></td>
 
763
<td>     Size of the class structure (required for interface, classed and instantiatable types).
 
764
</td>
 
765
</tr>
 
766
<tr>
 
767
<td><span class="term"><a href="gobject-Type-Information.html#GBaseInitFunc">GBaseInitFunc</a>&#160;<em class="structfield"><code>base_init</code></em>;</span></td>
 
768
<td>     Location of the base initialization function (optional).
 
769
</td>
 
770
</tr>
 
771
<tr>
 
772
<td><span class="term"><a href="gobject-Type-Information.html#GBaseFinalizeFunc">GBaseFinalizeFunc</a>&#160;<em class="structfield"><code>base_finalize</code></em>;</span></td>
 
773
<td> Location of the base finalization function (optional).
 
774
</td>
 
775
</tr>
 
776
<tr>
 
777
<td><span class="term"><a href="gobject-Type-Information.html#GClassInitFunc">GClassInitFunc</a>&#160;<em class="structfield"><code>class_init</code></em>;</span></td>
 
778
<td>     Location of the class initialization function for
 
779
  classed and types. Location of the default vtable inititalization
 
780
  function for interface types. (optional) This function is used both
 
781
  to fill in virtual functions in the class or default vtable, and
 
782
  to do type-specific setup such as registering signals and object
 
783
  properties.
 
784
</td>
 
785
</tr>
 
786
<tr>
 
787
<td><span class="term"><a href="gobject-Type-Information.html#GClassFinalizeFunc">GClassFinalizeFunc</a>&#160;<em class="structfield"><code>class_finalize</code></em>;</span></td>
 
788
<td>Location of the class finalization function for
 
789
  classed and types. Location fo the default vtable finalization
 
790
  function for interface types. (optional)
 
791
</td>
 
792
</tr>
 
793
<tr>
 
794
<td><span class="term"><a
 
795
href="../glib/glib-Basic-Types.html#gconstpointer"
 
796
>gconstpointer</a>&#160;<em class="structfield"><code>class_data</code></em>;</span></td>
 
797
<td>     User-supplied data passed to the class init/finalize functions.
 
798
</td>
 
799
</tr>
 
800
<tr>
 
801
<td><span class="term"><a
 
802
href="../glib/glib-Basic-Types.html#guint16"
 
803
>guint16</a>&#160;<em class="structfield"><code>instance_size</code></em>;</span></td>
 
804
<td> Size of the instance (object) structure (required for instantiatable types only).
 
805
</td>
 
806
</tr>
 
807
<tr>
 
808
<td><span class="term"><a
 
809
href="../glib/glib-Basic-Types.html#guint16"
 
810
>guint16</a>&#160;<em class="structfield"><code>n_preallocs</code></em>;</span></td>
 
811
<td>     Prior to GLib 2.10, it specified the number of pre-allocated (cached) instances to reserve memory for (0 indicates no caching). Since GLib 2.10, it is ignored, since instances are allocated with the <a
 
812
href="../glib/glib-Memory-Slices.html"
 
813
>slice allocator</a> now.
 
814
</td>
 
815
</tr>
 
816
<tr>
 
817
<td><span class="term"><a href="gobject-Type-Information.html#GInstanceInitFunc">GInstanceInitFunc</a>&#160;<em class="structfield"><code>instance_init</code></em>;</span></td>
 
818
<td> Location of the instance initialization function (optional, for instantiatable types only).
 
819
</td>
 
820
</tr>
 
821
<tr>
 
822
<td><span class="term">const&#160;<a href="gobject-Type-Information.html#GTypeValueTable">GTypeValueTable</a>&#160;*<em class="structfield"><code>value_table</code></em>;</span></td>
 
823
<td>     A <a href="gobject-Type-Information.html#GTypeValueTable"><span class="type">GTypeValueTable</span></a> function table for generic handling of GValues of this type (usually only
 
824
                 useful for fundamental types).
 
825
 
 
826
</td>
 
827
</tr>
 
828
</tbody>
 
829
</table></div>
 
830
</div>
 
831
<hr>
 
832
<div class="refsect2" lang="en">
 
833
<a name="id3025823"></a><h3>
 
834
<a name="GTypeFundamentalInfo"></a>GTypeFundamentalInfo</h3>
 
835
<a class="indexterm" name="id3025836"></a><pre class="programlisting">typedef struct {
 
836
  GTypeFundamentalFlags  type_flags;
 
837
} GTypeFundamentalInfo;
 
838
</pre>
 
839
<p>
 
840
A structure that provides information to the type system which is
 
841
used specifically for managing fundamental types.  
 
842
</p>
 
843
<div class="variablelist"><table border="0">
 
844
<col align="left" valign="top">
 
845
<tbody><tr>
 
846
<td><span class="term"><a href="gobject-Type-Information.html#GTypeFundamentalFlags">GTypeFundamentalFlags</a>&#160;<em class="structfield"><code>type_flags</code></em>;</span></td>
 
847
<td>
 
848
<a href="gobject-Type-Information.html#GTypeFundamentalFlags"><span class="type">GTypeFundamentalFlags</span></a> describing the characteristics of the fundamental type
 
849
 
 
850
</td>
 
851
</tr></tbody>
 
852
</table></div>
 
853
</div>
 
854
<hr>
 
855
<div class="refsect2" lang="en">
 
856
<a name="id3025888"></a><h3>
 
857
<a name="GInterfaceInfo"></a>GInterfaceInfo</h3>
 
858
<a class="indexterm" name="id3025900"></a><pre class="programlisting">typedef struct {
 
859
  GInterfaceInitFunc     interface_init;
 
860
  GInterfaceFinalizeFunc interface_finalize;
 
861
  gpointer               interface_data;
 
862
} GInterfaceInfo;
 
863
</pre>
 
864
<p>
 
865
A structure that provides information to the type system which is
 
866
used specifically for managing interface types.
 
867
</p>
 
868
<div class="variablelist"><table border="0">
 
869
<col align="left" valign="top">
 
870
<tbody>
 
871
<tr>
 
872
<td><span class="term"><a href="gobject-Type-Information.html#GInterfaceInitFunc">GInterfaceInitFunc</a>&#160;<em class="structfield"><code>interface_init</code></em>;</span></td>
 
873
<td>location of the interface initialization function
 
874
</td>
 
875
</tr>
 
876
<tr>
 
877
<td><span class="term"><a href="gobject-Type-Information.html#GInterfaceFinalizeFunc">GInterfaceFinalizeFunc</a>&#160;<em class="structfield"><code>interface_finalize</code></em>;</span></td>
 
878
<td>location of the interface finalization function
 
879
</td>
 
880
</tr>
 
881
<tr>
 
882
<td><span class="term"><a
 
883
href="../glib/glib-Basic-Types.html#gpointer"
 
884
>gpointer</a>&#160;<em class="structfield"><code>interface_data</code></em>;</span></td>
 
885
<td>user-supplied data passed to the interface init/finalize functions
 
886
 
 
887
</td>
 
888
</tr>
 
889
</tbody>
 
890
</table></div>
 
891
</div>
 
892
<hr>
 
893
<div class="refsect2" lang="en">
 
894
<a name="id3025989"></a><h3>
 
895
<a name="GTypeValueTable"></a>GTypeValueTable</h3>
 
896
<a class="indexterm" name="id3026001"></a><pre class="programlisting">typedef struct {
 
897
  void     (*value_init)         (GValue       *value);
 
898
  void     (*value_free)         (GValue       *value);
 
899
  void     (*value_copy)         (const GValue *src_value,
 
900
                                  GValue       *dest_value);
 
901
  /* varargs functionality (optional) */
 
902
  gpointer (*value_peek_pointer) (const GValue *value);
 
903
  gchar     *collect_format;
 
904
  gchar*   (*collect_value)      (GValue       *value,
 
905
                                  guint         n_collect_values,
 
906
                                  GTypeCValue  *collect_values,
 
907
                                  guint         collect_flags);
 
908
  gchar     *lcopy_format;
 
909
  gchar*   (*lcopy_value)        (const GValue *value,
 
910
                                  guint         n_collect_values,
 
911
                                  GTypeCValue  *collect_values,
 
912
                                  guint         collect_flags);
 
913
} GTypeValueTable;
 
914
</pre>
 
915
<p>
 
916
The <a href="gobject-Type-Information.html#GTypeValueTable"><span class="type">GTypeValueTable</span></a> provides the functions required by the <a href="gobject-Generic-values.html#GValue"><span class="type">GValue</span></a> implementation,
 
917
to serve as a container for values of a type.
 
918
</p>
 
919
<div class="variablelist"><table border="0">
 
920
<col align="left" valign="top">
 
921
<tbody>
 
922
<tr>
 
923
<td><span class="term"><em class="structfield"><code>value_init</code></em>&#160;()</span></td>
 
924
<td>            Default initialize <em class="parameter"><code>values</code></em> contents by poking values
 
925
                        directly into the value-&gt;data array. The data array of
 
926
                        the <a href="gobject-Generic-values.html#GValue"><span class="type">GValue</span></a> passed into this function was zero-filled
 
927
                        with <code class="function"><code class="function">memset()</code></code>, so no care has to
 
928
                        be taken to free any
 
929
                        old contents. E.g. for the implementation of a string
 
930
                        value that may never be <a
 
931
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
 
932
><code class="literal">NULL</code></a>, the implementation might
 
933
                        look like:
 
934
<pre class="programlisting">
 
935
{
 
936
  value-&gt;data[0].v_pointer = g_strdup ("");
 
937
}
 
938
</pre>
 
939
</td>
 
940
</tr>
 
941
<tr>
 
942
<td><span class="term"><em class="structfield"><code>value_free</code></em>&#160;()</span></td>
 
943
<td>            Free any old contents that might be left in the
 
944
                        data array of the passed in <em class="parameter"><code>value</code></em>. No resources may
 
945
                        remain allocated through the <a href="gobject-Generic-values.html#GValue"><span class="type">GValue</span></a> contents after
 
946
                        this function returns. E.g. for our above string type:
 
947
<pre class="programlisting">
 
948
{
 
949
  /* only free strings without a specific flag for static storage */
 
950
  if (!(value-&gt;data[1].v_uint &amp; G_VALUE_NOCOPY_CONTENTS))
 
951
    g_free (value-&gt;data[0].v_pointer);
 
952
}
 
953
</pre>
 
954
</td>
 
955
</tr>
 
956
<tr>
 
957
<td><span class="term"><em class="structfield"><code>value_copy</code></em>&#160;()</span></td>
 
958
<td>            <em class="parameter"><code>dest_value</code></em> is a <a href="gobject-Generic-values.html#GValue"><span class="type">GValue</span></a> with zero-filled data section
 
959
                        and <em class="parameter"><code>src_value</code></em> is a properly setup <a href="gobject-Generic-values.html#GValue"><span class="type">GValue</span></a> of same or
 
960
                        derived type.
 
961
                        The purpose of this function is to copy the contents of
 
962
                        <em class="parameter"><code>src_value</code></em> into <em class="parameter"><code>dest_value</code></em> in a way, that even after
 
963
                        <em class="parameter"><code>src_value</code></em> has been freed, the contents of <em class="parameter"><code>dest_value</code></em>
 
964
                        remain valid. String type example:
 
965
<pre class="programlisting">
 
966
{
 
967
  dest_value-&gt;data[0].v_pointer = g_strdup (src_value-&gt;data[0].v_pointer);
 
968
}
 
969
</pre>
 
970
</td>
 
971
</tr>
 
972
<tr>
 
973
<td><span class="term"><em class="structfield"><code>value_peek_pointer</code></em>&#160;()</span></td>
 
974
<td>    If the value contents fit into a pointer, such as objects
 
975
                        or strings, return this pointer, so the caller can peek at
 
976
                        the current contents. To extend on our above string example:
 
977
<pre class="programlisting">
 
978
{
 
979
  return value-&gt;data[0].v_pointer;
 
980
}
 
981
</pre>
 
982
</td>
 
983
</tr>
 
984
<tr>
 
985
<td><span class="term"><a
 
986
href="../glib/glib-Basic-Types.html#gchar"
 
987
>gchar</a>&#160;*<em class="structfield"><code>collect_format</code></em>;</span></td>
 
988
<td>    A string format describing how to collect the contents of
 
989
                        this value bit-by-bit. Each character in the format represents
 
990
                        an argument to be collected, and the characters themselves indicate
 
991
                        the type of the argument. Currently supported arguments are:
 
992
<div class="variablelist"><table border="0">
 
993
<col align="left" valign="top">
 
994
<tbody>
 
995
<tr>
 
996
<td><span class="term"></span></td>
 
997
<td><p>
 
998
        'i' - Integers. passed as collect_values[].v_int.
 
999
  </p></td>
 
1000
</tr>
 
1001
<tr>
 
1002
<td><span class="term"></span></td>
 
1003
<td><p>
 
1004
        'l' - Longs. passed as collect_values[].v_long.
 
1005
  </p></td>
 
1006
</tr>
 
1007
<tr>
 
1008
<td><span class="term"></span></td>
 
1009
<td><p>
 
1010
        'd' - Doubles. passed as collect_values[].v_double.
 
1011
  </p></td>
 
1012
</tr>
 
1013
<tr>
 
1014
<td><span class="term"></span></td>
 
1015
<td><p>
 
1016
        'p' - Pointers. passed as collect_values[].v_pointer.
 
1017
  </p></td>
 
1018
</tr>
 
1019
</tbody>
 
1020
</table></div>
 
1021
                        It should be noted that for variable argument list construction,
 
1022
                        ANSI C promotes every type smaller than an integer to an int, and
 
1023
                        floats to doubles. So for collection of short int or char, 'i'
 
1024
                        needs to be used, and for collection of floats 'd'.
 
1025
</td>
 
1026
</tr>
 
1027
<tr>
 
1028
<td><span class="term"><em class="structfield"><code>collect_value</code></em>&#160;()</span></td>
 
1029
<td>    The <code class="function">collect_value()</code> function is responsible for converting the
 
1030
                        values collected from a variable argument list into contents
 
1031
                        suitable for storage in a GValue. This function should setup
 
1032
                        <em class="parameter"><code>value</code></em> similar to <code class="function">value_init()</code>; e.g. for a string value that
 
1033
                        does not allow <a
 
1034
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
 
1035
><code class="literal">NULL</code></a> pointers, it needs to either spew an error,
 
1036
                        or do an implicit conversion by storing an empty string.
 
1037
                        The <em class="parameter"><code>value</code></em> passed in to this function has a zero-filled data
 
1038
                        array, so just like for <code class="function">value_init()</code> it is guaranteed to not
 
1039
                        contain any old contents that might need freeing.
 
1040
                        <em class="parameter"><code>n_collect_values</code></em> is exactly the string length of <em class="parameter"><code>collect_format</code></em>,
 
1041
                        and <em class="parameter"><code>collect_values</code></em> is an array of unions <a href="gobject-Varargs-Value-Collection.html#GTypeCValue"><span class="type">GTypeCValue</span></a> with
 
1042
                        length <em class="parameter"><code>n_collect_values</code></em>, containing the collected values
 
1043
                        according to <em class="parameter"><code>collect_format</code></em>.
 
1044
                        <em class="parameter"><code>collect_flags</code></em> is an argument provided as a hint by the caller.
 
1045
                        It may contain the flag <span class="type">G_VALUE_NOCOPY_CONTENTS</span> indicating,
 
1046
                        that the collected value contents may be considered "static"
 
1047
                        for the duration of the <em class="parameter"><code>value</code></em> lifetime.
 
1048
                        Thus an extra copy of the contents stored in <em class="parameter"><code>collect_values</code></em> is
 
1049
                        not required for assignment to <em class="parameter"><code>value</code></em>.
 
1050
                        For our above string example, we continue with:
 
1051
<pre class="programlisting">
 
1052
{
 
1053
  if (!collect_values[0].v_pointer)
 
1054
    value-&gt;data[0].v_pointer = g_strdup ("");
 
1055
  else if (collect_flags &amp; G_VALUE_NOCOPY_CONTENTS)
 
1056
    {
 
1057
      value-&gt;data[0].v_pointer = collect_values[0].v_pointer;
 
1058
      /* keep a flag for the value_free() implementation to not free this string */
 
1059
      value-&gt;data[1].v_uint = G_VALUE_NOCOPY_CONTENTS;
 
1060
    }
 
1061
  else
 
1062
    value-&gt;data[0].v_pointer = g_strdup (collect_values[0].v_pointer);
 
1063
 
 
1064
  return NULL;
 
1065
}
 
1066
</pre>
 
1067
                        It should be noted, that it is generally a bad idea to follow the
 
1068
                        <span class="type">G_VALUE_NOCOPY_CONTENTS</span> hint for reference counted types. Due to
 
1069
                        reentrancy requirements and reference count assertions performed
 
1070
                        by the <span class="type">GSignal</span> code, reference counts should always be incremented
 
1071
                        for reference counted contents stored in the value-&gt;data array.
 
1072
                        To deviate from our string example for a moment, and taking a look
 
1073
                        at an exemplary implementation for <code class="function">collect_value()</code> of <span class="type">GObject:</span>
 
1074
<pre class="programlisting">
 
1075
{
 
1076
  if (collect_values[0].v_pointer)
 
1077
    {
 
1078
      GObject *object = G_OBJECT (collect_values[0].v_pointer);
 
1079
 
 
1080
      /* never honour G_VALUE_NOCOPY_CONTENTS for ref-counted types */
 
1081
      value-&gt;data[0].v_pointer = g_object_ref (object);
 
1082
      return NULL;
 
1083
    }
 
1084
  else
 
1085
    return g_strdup_printf ("Object passed as invalid NULL pointer");
 
1086
}
 
1087
</pre>
 
1088
                        The reference count for valid objects is always incremented,
 
1089
                        regardless of <em class="parameter"><code>collect_flags</code></em>. For invalid objects, the example
 
1090
                        returns a newly allocated string without altering <em class="parameter"><code>value</code></em>.
 
1091
                        Upon success, <code class="function">collect_value()</code> needs to return <a
 
1092
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
 
1093
><code class="literal">NULL</code></a>. If, however,
 
1094
                        an error condition occurred, <code class="function">collect_value()</code> may spew an
 
1095
                        error by returning a newly allocated non-<a
 
1096
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
 
1097
><code class="literal">NULL</code></a> string, giving
 
1098
                        a suitable description of the error condition.
 
1099
                        The calling code makes no assumptions about the <em class="parameter"><code>value</code></em>
 
1100
                        contents being valid upon error returns, <em class="parameter"><code>value</code></em>
 
1101
                        is simply thrown away without further freeing. As such, it is
 
1102
                        a good idea to not allocate <a href="gobject-Generic-values.html#GValue"><span class="type">GValue</span></a> contents, prior to returning
 
1103
                        an error, however, <code class="function">collect_values()</code> is not obliged to return
 
1104
                        a correctly setup <em class="parameter"><code>value</code></em> for error returns, simply because
 
1105
                        any non-<a
 
1106
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
 
1107
><code class="literal">NULL</code></a> return is considered a fatal condition so further
 
1108
                        program behaviour is undefined.
 
1109
</td>
 
1110
</tr>
 
1111
<tr>
 
1112
<td><span class="term"><a
 
1113
href="../glib/glib-Basic-Types.html#gchar"
 
1114
>gchar</a>&#160;*<em class="structfield"><code>lcopy_format</code></em>;</span></td>
 
1115
<td>            Format description of the arguments to collect for <em class="parameter"><code>lcopy_value</code></em>,
 
1116
                        analogous to <em class="parameter"><code>collect_format</code></em>. Usually, <em class="parameter"><code>lcopy_format</code></em> string consists
 
1117
                        only of 'p's to provide <code class="function">lcopy_value()</code> with pointers to storage locations.
 
1118
</td>
 
1119
</tr>
 
1120
<tr>
 
1121
<td><span class="term"><em class="structfield"><code>lcopy_value</code></em>&#160;()</span></td>
 
1122
<td>            This function is responsible for storing the <em class="parameter"><code>value</code></em> contents into
 
1123
                        arguments passed through a variable argument list which got
 
1124
                        collected into <em class="parameter"><code>collect_values</code></em> according to <em class="parameter"><code>lcopy_format</code></em>.
 
1125
                        <em class="parameter"><code>n_collect_values</code></em> equals the string length of <em class="parameter"><code>lcopy_format</code></em>,
 
1126
                        and <em class="parameter"><code>collect_flags</code></em> may contain <span class="type">G_VALUE_NOCOPY_CONTENTS</span>.
 
1127
                        In contrast to <code class="function">collect_value()</code>, <code class="function">lcopy_value()</code> is obliged to
 
1128
                        always properly support <span class="type">G_VALUE_NOCOPY_CONTENTS</span>.
 
1129
                        Similar to <code class="function">collect_value()</code> the function may prematurely abort
 
1130
                        by returning a newly allocated string describing an error condition.
 
1131
                        To complete the string example:
 
1132
<pre class="programlisting">
 
1133
{
 
1134
  gchar **string_p = collect_values[0].v_pointer;
 
1135
 
 
1136
  if (!string_p)
 
1137
    return g_strdup_printf ("string location passed as NULL");
 
1138
 
 
1139
  if (collect_flags &amp; G_VALUE_NOCOPY_CONTENTS)
 
1140
    *string_p = value-&gt;data[0].v_pointer;
 
1141
  else
 
1142
    *string_p = g_strdup (value-&gt;data[0].v_pointer);
 
1143
 
 
1144
}
 
1145
</pre>
 
1146
                        And an illustrative version of <code class="function">lcopy_value()</code> for
 
1147
                        reference-counted types:
 
1148
<pre class="programlisting">
 
1149
{
 
1150
  GObject **object_p = collect_values[0].v_pointer;
 
1151
 
 
1152
  if (!object_p)
 
1153
    return g_strdup_printf ("object location passed as NULL");
 
1154
  if (!value-&gt;data[0].v_pointer)
 
1155
    *object_p = NULL;
 
1156
  else if (collect_flags &amp; G_VALUE_NOCOPY_CONTENTS) /* always honour */
 
1157
    *object_p = value-&gt;data[0].v_pointer;
 
1158
  else
 
1159
    *object_p = g_object_ref (value-&gt;data[0].v_pointer);
 
1160
  return NULL;
 
1161
}
 
1162
</pre>
 
1163
 
 
1164
</td>
 
1165
</tr>
 
1166
</tbody>
 
1167
</table></div>
 
1168
</div>
 
1169
<hr>
 
1170
<div class="refsect2" lang="en">
 
1171
<a name="id3026876"></a><h3>
 
1172
<a name="G-TYPE-FROM-INSTANCE:CAPS"></a>G_TYPE_FROM_INSTANCE()</h3>
 
1173
<a class="indexterm" name="id3026889"></a><pre class="programlisting">#define G_TYPE_FROM_INSTANCE(instance)                          (G_TYPE_FROM_CLASS (((GTypeInstance*) (instance))-&gt;g_class))
 
1174
</pre>
 
1175
<p>
 
1176
Returns the type identifier from a given <em class="parameter"><code>instance</code></em> structure. 
 
1177
</p>
 
1178
<p>
 
1179
</p>
 
1180
<p>
 
1181
This macro should only be used in type implementations.
 
1182
</p>
 
1183
<div class="variablelist"><table border="0">
 
1184
<col align="left" valign="top">
 
1185
<tbody><tr>
 
1186
<td><span class="term"><em class="parameter"><code>instance</code></em>&#160;:</span></td>
 
1187
<td>Location of a valid <a href="gobject-Type-Information.html#GTypeInstance"><span class="type">GTypeInstance</span></a> structure.
 
1188
 
 
1189
 
 
1190
</td>
 
1191
</tr></tbody>
 
1192
</table></div>
 
1193
</div>
 
1194
<hr>
 
1195
<div class="refsect2" lang="en">
 
1196
<a name="id3026946"></a><h3>
 
1197
<a name="G-TYPE-FROM-CLASS:CAPS"></a>G_TYPE_FROM_CLASS()</h3>
 
1198
<a class="indexterm" name="id3026959"></a><pre class="programlisting">#define G_TYPE_FROM_CLASS(g_class)                              (((GTypeClass*) (g_class))-&gt;g_type)
 
1199
</pre>
 
1200
<p>
 
1201
Returns the type identifier from a given <em class="parameter"><code>class</code></em> structure.
 
1202
</p>
 
1203
<p>
 
1204
</p>
 
1205
<p>
 
1206
This macro should only be used in type implementations.
 
1207
</p>
 
1208
<div class="variablelist"><table border="0">
 
1209
<col align="left" valign="top">
 
1210
<tbody><tr>
 
1211
<td><span class="term"><em class="parameter"><code>g_class</code></em>&#160;:</span></td>
 
1212
<td>Location of a valid <a href="gobject-Type-Information.html#GTypeClass"><span class="type">GTypeClass</span></a> structure.
 
1213
 
 
1214
 
 
1215
</td>
 
1216
</tr></tbody>
 
1217
</table></div>
 
1218
</div>
 
1219
<hr>
 
1220
<div class="refsect2" lang="en">
 
1221
<a name="id3027014"></a><h3>
 
1222
<a name="G-TYPE-FROM-INTERFACE:CAPS"></a>G_TYPE_FROM_INTERFACE()</h3>
 
1223
<a class="indexterm" name="id3027027"></a><pre class="programlisting">#define G_TYPE_FROM_INTERFACE(g_iface)                          (((GTypeInterface*) (g_iface))-&gt;g_type)
 
1224
</pre>
 
1225
<p>
 
1226
Returns the type identifier from a given <em class="parameter"><code>interface</code></em> structure.
 
1227
</p>
 
1228
<p>
 
1229
</p>
 
1230
<p>
 
1231
This macro should only be used in type implementations.
 
1232
</p>
 
1233
<div class="variablelist"><table border="0">
 
1234
<col align="left" valign="top">
 
1235
<tbody><tr>
 
1236
<td><span class="term"><em class="parameter"><code>g_iface</code></em>&#160;:</span></td>
 
1237
<td>Location of a valid <a href="gobject-Type-Information.html#GTypeInterface"><span class="type">GTypeInterface</span></a> structure.
 
1238
 
 
1239
 
 
1240
</td>
 
1241
</tr></tbody>
 
1242
</table></div>
 
1243
</div>
 
1244
<hr>
 
1245
<div class="refsect2" lang="en">
 
1246
<a name="id3027084"></a><h3>
 
1247
<a name="G-TYPE-INSTANCE-GET-CLASS:CAPS"></a>G_TYPE_INSTANCE_GET_CLASS()</h3>
 
1248
<a class="indexterm" name="id3027097"></a><pre class="programlisting">#define G_TYPE_INSTANCE_GET_CLASS(instance, g_type, c_type)     (_G_TYPE_IGC ((instance), (g_type), c_type))
 
1249
</pre>
 
1250
<p>
 
1251
Returns the class structure of a given <em class="parameter"><code>instance</code></em>, casted
 
1252
to a specified ancestor type <em class="parameter"><code>g_type</code></em> of the instance.
 
1253
</p>
 
1254
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
 
1255
<h3 class="title">Warning</h3>
 
1256
<p>Note
 
1257
that while calling a <a href="gobject-Type-Information.html#GInstanceInitFunc"><code class="function">GInstanceInitFunc()</code></a>, the class pointer gets
 
1258
modified, so it might not always return the expected pointer.
 
1259
</p>
 
1260
</div>
 
1261
<p>
 
1262
This macro should only be used in type implementations.
 
1263
</p>
 
1264
<div class="variablelist"><table border="0">
 
1265
<col align="left" valign="top">
 
1266
<tbody>
 
1267
<tr>
 
1268
<td><span class="term"><em class="parameter"><code>instance</code></em>&#160;:</span></td>
 
1269
<td>    Location of the <a href="gobject-Type-Information.html#GTypeInstance"><span class="type">GTypeInstance</span></a> structure.
 
1270
</td>
 
1271
</tr>
 
1272
<tr>
 
1273
<td><span class="term"><em class="parameter"><code>g_type</code></em>&#160;:</span></td>
 
1274
<td>    The anchestor type of the class to be returned.
 
1275
</td>
 
1276
</tr>
 
1277
<tr>
 
1278
<td><span class="term"><em class="parameter"><code>c_type</code></em>&#160;:</span></td>
 
1279
<td>    The corresponding C type of <em class="parameter"><code>g_type</code></em>.
 
1280
 
 
1281
 
 
1282
</td>
 
1283
</tr>
 
1284
</tbody>
 
1285
</table></div>
 
1286
</div>
 
1287
<hr>
 
1288
<div class="refsect2" lang="en">
 
1289
<a name="id3027209"></a><h3>
 
1290
<a name="G-TYPE-INSTANCE-GET-INTERFACE:CAPS"></a>G_TYPE_INSTANCE_GET_INTERFACE()</h3>
 
1291
<a class="indexterm" name="id3027223"></a><pre class="programlisting">#define G_TYPE_INSTANCE_GET_INTERFACE(instance, g_type, c_type) (_G_TYPE_IGI ((instance), (g_type), c_type))
 
1292
</pre>
 
1293
<p>
 
1294
Returns the interface structure for interface <em class="parameter"><code>g_type</code></em> of a given <em class="parameter"><code>instance</code></em>.
 
1295
</p>
 
1296
<p>
 
1297
</p>
 
1298
<p>
 
1299
This macro should only be used in type implementations.
 
1300
</p>
 
1301
<div class="variablelist"><table border="0">
 
1302
<col align="left" valign="top">
 
1303
<tbody>
 
1304
<tr>
 
1305
<td><span class="term"><em class="parameter"><code>instance</code></em>&#160;:</span></td>
 
1306
<td>Location of the <a href="gobject-Type-Information.html#GTypeInstance"><span class="type">GTypeInstance</span></a> structure.
 
1307
</td>
 
1308
</tr>
 
1309
<tr>
 
1310
<td><span class="term"><em class="parameter"><code>g_type</code></em>&#160;:</span></td>
 
1311
<td>The interface type to be returned.
 
1312
</td>
 
1313
</tr>
 
1314
<tr>
 
1315
<td><span class="term"><em class="parameter"><code>c_type</code></em>&#160;:</span></td>
 
1316
<td>The corresponding C type of <em class="parameter"><code>g_type</code></em>.
 
1317
 
 
1318
 
 
1319
</td>
 
1320
</tr>
 
1321
</tbody>
 
1322
</table></div>
 
1323
</div>
 
1324
<hr>
 
1325
<div class="refsect2" lang="en">
 
1326
<a name="id3027318"></a><h3>
 
1327
<a name="G-TYPE-INSTANCE-GET-PRIVATE:CAPS"></a>G_TYPE_INSTANCE_GET_PRIVATE()</h3>
 
1328
<a class="indexterm" name="id3027333"></a><pre class="programlisting">#define G_TYPE_INSTANCE_GET_PRIVATE(instance, g_type, c_type)   ((c_type*) g_type_instance_get_private ((GTypeInstance*) (instance), (g_type)))
 
1329
</pre>
 
1330
<p>
 
1331
Gets the private structure for a particular type.
 
1332
The private structure must have been registered in the
 
1333
class_init function with <a href="gobject-Type-Information.html#g-type-class-add-private"><code class="function">g_type_class_add_private()</code></a>.
 
1334
</p>
 
1335
<p>
 
1336
This macro should only be used in type implementations.
 
1337
</p>
 
1338
<div class="variablelist"><table border="0">
 
1339
<col align="left" valign="top">
 
1340
<tbody>
 
1341
<tr>
 
1342
<td><span class="term"><em class="parameter"><code>instance</code></em>&#160;:</span></td>
 
1343
<td>the instance of a type deriving from <em class="parameter"><code>private_type</code></em>.
 
1344
</td>
 
1345
</tr>
 
1346
<tr>
 
1347
<td><span class="term"><em class="parameter"><code>g_type</code></em>&#160;:</span></td>
 
1348
<td>the type identifying which private data to retrieve.
 
1349
</td>
 
1350
</tr>
 
1351
<tr>
 
1352
<td><span class="term"><em class="parameter"><code>c_type</code></em>&#160;:</span></td>
 
1353
<td>The C type for the private structure.
 
1354
</td>
 
1355
</tr>
 
1356
</tbody>
 
1357
</table></div>
 
1358
<p class="since">Since 2.4
 
1359
 
 
1360
 
 
1361
</p>
 
1362
</div>
 
1363
<hr>
 
1364
<div class="refsect2" lang="en">
 
1365
<a name="id3027428"></a><h3>
 
1366
<a name="G-TYPE-CHECK-INSTANCE:CAPS"></a>G_TYPE_CHECK_INSTANCE()</h3>
 
1367
<a class="indexterm" name="id3027441"></a><pre class="programlisting">#define G_TYPE_CHECK_INSTANCE(instance)                           (_G_TYPE_CHI ((GTypeInstance*) (instance)))
 
1368
</pre>
 
1369
<p>
 
1370
Returns <a
 
1371
href="../glib/glib-Standard-Macros.html#TRUE:CAPS"
 
1372
><code class="literal">TRUE</code></a> if <em class="parameter"><code>instance</code></em> is a valid <a href="gobject-Type-Information.html#GTypeInstance"><span class="type">GTypeInstance</span></a> structure,
 
1373
otherwise emits a warning and returns <a
 
1374
href="../glib/glib-Standard-Macros.html#FALSE:CAPS"
 
1375
><code class="literal">FALSE</code></a>.
 
1376
</p>
 
1377
<p>
 
1378
</p>
 
1379
<p>
 
1380
This macro should only be used in type implementations.
 
1381
</p>
 
1382
<div class="variablelist"><table border="0">
 
1383
<col align="left" valign="top">
 
1384
<tbody><tr>
 
1385
<td><span class="term"><em class="parameter"><code>instance</code></em>&#160;:</span></td>
 
1386
<td>Location of a <a href="gobject-Type-Information.html#GTypeInstance"><span class="type">GTypeInstance</span></a> structure.
 
1387
 
 
1388
 
 
1389
</td>
 
1390
</tr></tbody>
 
1391
</table></div>
 
1392
</div>
 
1393
<hr>
 
1394
<div class="refsect2" lang="en">
 
1395
<a name="id3027525"></a><h3>
 
1396
<a name="G-TYPE-CHECK-INSTANCE-CAST:CAPS"></a>G_TYPE_CHECK_INSTANCE_CAST()</h3>
 
1397
<a class="indexterm" name="id3027538"></a><pre class="programlisting">#define G_TYPE_CHECK_INSTANCE_CAST(instance, g_type, c_type)    (_G_TYPE_CIC ((instance), (g_type), c_type))
 
1398
</pre>
 
1399
<p>
 
1400
Checks that <em class="parameter"><code>instance</code></em> is an instance of the type identified by <em class="parameter"><code>g_type</code></em>
 
1401
and emits a warning if this is not the case. Returns <em class="parameter"><code>instance</code></em> casted 
 
1402
to a pointer to <em class="parameter"><code>c_type</code></em>.
 
1403
</p>
 
1404
<p>
 
1405
This macro should only be used in type implementations.
 
1406
</p>
 
1407
<div class="variablelist"><table border="0">
 
1408
<col align="left" valign="top">
 
1409
<tbody>
 
1410
<tr>
 
1411
<td><span class="term"><em class="parameter"><code>instance</code></em>&#160;:</span></td>
 
1412
<td>Location of a <a href="gobject-Type-Information.html#GTypeInstance"><span class="type">GTypeInstance</span></a> structure.
 
1413
</td>
 
1414
</tr>
 
1415
<tr>
 
1416
<td><span class="term"><em class="parameter"><code>g_type</code></em>&#160;:</span></td>
 
1417
<td>The type to be returned.
 
1418
</td>
 
1419
</tr>
 
1420
<tr>
 
1421
<td><span class="term"><em class="parameter"><code>c_type</code></em>&#160;:</span></td>
 
1422
<td>The corresponding C type of <em class="parameter"><code>g_type</code></em>.
 
1423
 
 
1424
 
 
1425
</td>
 
1426
</tr>
 
1427
</tbody>
 
1428
</table></div>
 
1429
</div>
 
1430
<hr>
 
1431
<div class="refsect2" lang="en">
 
1432
<a name="id3027646"></a><h3>
 
1433
<a name="G-TYPE-CHECK-INSTANCE-TYPE:CAPS"></a>G_TYPE_CHECK_INSTANCE_TYPE()</h3>
 
1434
<a class="indexterm" name="id3027659"></a><pre class="programlisting">#define G_TYPE_CHECK_INSTANCE_TYPE(instance, g_type)            (_G_TYPE_CIT ((instance), (g_type)))
 
1435
</pre>
 
1436
<p>
 
1437
Returns <a
 
1438
href="../glib/glib-Standard-Macros.html#TRUE:CAPS"
 
1439
><code class="literal">TRUE</code></a> if <em class="parameter"><code>instance</code></em> is an instance of the type identified by <em class="parameter"><code>g_type</code></em>.
 
1440
Otherwise emits a warning and returns <a
 
1441
href="../glib/glib-Standard-Macros.html#FALSE:CAPS"
 
1442
><code class="literal">FALSE</code></a>.
 
1443
</p>
 
1444
<p>
 
1445
This macro should only be used in type implementations.
 
1446
</p>
 
1447
<div class="variablelist"><table border="0">
 
1448
<col align="left" valign="top">
 
1449
<tbody>
 
1450
<tr>
 
1451
<td><span class="term"><em class="parameter"><code>instance</code></em>&#160;:</span></td>
 
1452
<td>Location of a <a href="gobject-Type-Information.html#GTypeInstance"><span class="type">GTypeInstance</span></a> structure.
 
1453
</td>
 
1454
</tr>
 
1455
<tr>
 
1456
<td><span class="term"><em class="parameter"><code>g_type</code></em>&#160;:</span></td>
 
1457
<td>The type to be checked
 
1458
 
 
1459
 
 
1460
</td>
 
1461
</tr>
 
1462
</tbody>
 
1463
</table></div>
 
1464
</div>
 
1465
<hr>
 
1466
<div class="refsect2" lang="en">
 
1467
<a name="id3027754"></a><h3>
 
1468
<a name="G-TYPE-CHECK-CLASS-CAST:CAPS"></a>G_TYPE_CHECK_CLASS_CAST()</h3>
 
1469
<a class="indexterm" name="id3027768"></a><pre class="programlisting">#define G_TYPE_CHECK_CLASS_CAST(g_class, g_type, c_type)        (_G_TYPE_CCC ((g_class), (g_type), c_type))
 
1470
</pre>
 
1471
<p>
 
1472
Checks that <em class="parameter"><code>g_class</code></em> is a class structure of the type identified by <em class="parameter"><code>g_type</code></em>
 
1473
and emits a warning if this is not the case. Returns <em class="parameter"><code>g_class</code></em> casted 
 
1474
to a pointer to <em class="parameter"><code>c_type</code></em>.
 
1475
</p>
 
1476
<p>
 
1477
This macro should only be used in type implementations.
 
1478
</p>
 
1479
<div class="variablelist"><table border="0">
 
1480
<col align="left" valign="top">
 
1481
<tbody>
 
1482
<tr>
 
1483
<td><span class="term"><em class="parameter"><code>g_class</code></em>&#160;:</span></td>
 
1484
<td>Location of a <a href="gobject-Type-Information.html#GTypeClass"><span class="type">GTypeClass</span></a> structure.
 
1485
</td>
 
1486
</tr>
 
1487
<tr>
 
1488
<td><span class="term"><em class="parameter"><code>g_type</code></em>&#160;:</span></td>
 
1489
<td>The type to be returned.
 
1490
</td>
 
1491
</tr>
 
1492
<tr>
 
1493
<td><span class="term"><em class="parameter"><code>c_type</code></em>&#160;:</span></td>
 
1494
<td>The corresponding C type of class structure of <em class="parameter"><code>g_type</code></em>.
 
1495
 
 
1496
 
 
1497
</td>
 
1498
</tr>
 
1499
</tbody>
 
1500
</table></div>
 
1501
</div>
 
1502
<hr>
 
1503
<div class="refsect2" lang="en">
 
1504
<a name="id3027876"></a><h3>
 
1505
<a name="G-TYPE-CHECK-CLASS-TYPE:CAPS"></a>G_TYPE_CHECK_CLASS_TYPE()</h3>
 
1506
<a class="indexterm" name="id3027890"></a><pre class="programlisting">#define G_TYPE_CHECK_CLASS_TYPE(g_class, g_type)                (_G_TYPE_CCT ((g_class), (g_type)))
 
1507
</pre>
 
1508
<p>
 
1509
Returns <a
 
1510
href="../glib/glib-Standard-Macros.html#TRUE:CAPS"
 
1511
><code class="literal">TRUE</code></a> if <em class="parameter"><code>g_class</code></em> is a class structure of the type identified by 
 
1512
<em class="parameter"><code>g_type</code></em>. Otherwise emits a warning and returns <a
 
1513
href="../glib/glib-Standard-Macros.html#FALSE:CAPS"
 
1514
><code class="literal">FALSE</code></a>.
 
1515
</p>
 
1516
<p>
 
1517
This macro should only be used in type implementations.
 
1518
</p>
 
1519
<div class="variablelist"><table border="0">
 
1520
<col align="left" valign="top">
 
1521
<tbody>
 
1522
<tr>
 
1523
<td><span class="term"><em class="parameter"><code>g_class</code></em>&#160;:</span></td>
 
1524
<td>Location of a <a href="gobject-Type-Information.html#GTypeClass"><span class="type">GTypeClass</span></a> structure.
 
1525
</td>
 
1526
</tr>
 
1527
<tr>
 
1528
<td><span class="term"><em class="parameter"><code>g_type</code></em>&#160;:</span></td>
 
1529
<td>The type to be checked.
 
1530
 
 
1531
 
 
1532
</td>
 
1533
</tr>
 
1534
</tbody>
 
1535
</table></div>
 
1536
</div>
 
1537
<hr>
 
1538
<div class="refsect2" lang="en">
 
1539
<a name="id3027985"></a><h3>
 
1540
<a name="G-TYPE-CHECK-VALUE:CAPS"></a>G_TYPE_CHECK_VALUE()</h3>
 
1541
<a class="indexterm" name="id3027997"></a><pre class="programlisting">#define G_TYPE_CHECK_VALUE(value)                         (_G_TYPE_CHV ((value)))
 
1542
</pre>
 
1543
<p>
 
1544
Returns <a
 
1545
href="../glib/glib-Standard-Macros.html#TRUE:CAPS"
 
1546
><code class="literal">TRUE</code></a> if <em class="parameter"><code>value</code></em> has been initialized to hold values
 
1547
of a value type.
 
1548
</p>
 
1549
<p>
 
1550
This macro should only be used in type implementations.
 
1551
</p>
 
1552
<div class="variablelist"><table border="0">
 
1553
<col align="left" valign="top">
 
1554
<tbody><tr>
 
1555
<td><span class="term"><em class="parameter"><code>value</code></em>&#160;:</span></td>
 
1556
<td>a <a href="gobject-Generic-values.html#GValue"><span class="type">GValue</span></a>
 
1557
 
 
1558
 
 
1559
</td>
 
1560
</tr></tbody>
 
1561
</table></div>
 
1562
</div>
 
1563
<hr>
 
1564
<div class="refsect2" lang="en">
 
1565
<a name="id3028060"></a><h3>
 
1566
<a name="G-TYPE-CHECK-VALUE-TYPE:CAPS"></a>G_TYPE_CHECK_VALUE_TYPE()</h3>
 
1567
<a class="indexterm" name="id3028074"></a><pre class="programlisting">#define G_TYPE_CHECK_VALUE_TYPE(value, g_type)                    (_G_TYPE_CVH ((value), (g_type)))
 
1568
</pre>
 
1569
<p>
 
1570
Returns <a
 
1571
href="../glib/glib-Standard-Macros.html#TRUE:CAPS"
 
1572
><code class="literal">TRUE</code></a> if <em class="parameter"><code>value</code></em> has been initialized to hold values
 
1573
of type <em class="parameter"><code>g_type</code></em>. 
 
1574
</p>
 
1575
<p>
 
1576
This macro should only be used in type implementations.
 
1577
</p>
 
1578
<div class="variablelist"><table border="0">
 
1579
<col align="left" valign="top">
 
1580
<tbody>
 
1581
<tr>
 
1582
<td><span class="term"><em class="parameter"><code>value</code></em>&#160;:</span></td>
 
1583
<td>a <a href="gobject-Generic-values.html#GValue"><span class="type">GValue</span></a>
 
1584
</td>
 
1585
</tr>
 
1586
<tr>
 
1587
<td><span class="term"><em class="parameter"><code>g_type</code></em>&#160;:</span></td>
 
1588
<td>The type to be checked.
 
1589
 
 
1590
 
 
1591
</td>
 
1592
</tr>
 
1593
</tbody>
 
1594
</table></div>
 
1595
</div>
 
1596
<hr>
 
1597
<div class="refsect2" lang="en">
 
1598
<a name="id3028157"></a><h3>
 
1599
<a name="G-TYPE-FLAG-RESERVED-ID-BIT:CAPS"></a>G_TYPE_FLAG_RESERVED_ID_BIT</h3>
 
1600
<a class="indexterm" name="id3028170"></a><pre class="programlisting">#define   G_TYPE_FLAG_RESERVED_ID_BIT     ((GType) (1 &lt;&lt; 0))
 
1601
</pre>
 
1602
<p>
 
1603
A bit in the type number that's supposed to be left untouched.
 
1604
</p>
 
1605
</div>
 
1606
<hr>
 
1607
<div class="refsect2" lang="en">
 
1608
<a name="id3028187"></a><h3>
 
1609
<a name="g-type-init"></a>g_type_init ()</h3>
 
1610
<a class="indexterm" name="id3028200"></a><pre class="programlisting">void                g_type_init                         (void);</pre>
 
1611
<p>
 
1612
Prior to any use of the type system, <a href="gobject-Type-Information.html#g-type-init"><code class="function">g_type_init()</code></a> has to be called to initialize
 
1613
the type system and assorted other code portions (such as the various fundamental
 
1614
type implementations or the signal system).
 
1615
</p>
 
1616
</div>
 
1617
<hr>
 
1618
<div class="refsect2" lang="en">
 
1619
<a name="id3028234"></a><h3>
 
1620
<a name="GTypeDebugFlags"></a>enum GTypeDebugFlags</h3>
 
1621
<a class="indexterm" name="id3028248"></a><pre class="programlisting">typedef enum      /*&lt; skip &gt;*/
 
1622
{
 
1623
  G_TYPE_DEBUG_NONE     = 0,
 
1624
  G_TYPE_DEBUG_OBJECTS  = 1 &lt;&lt; 0,
 
1625
  G_TYPE_DEBUG_SIGNALS  = 1 &lt;&lt; 1,
 
1626
  G_TYPE_DEBUG_MASK     = 0x03
 
1627
} GTypeDebugFlags;
 
1628
</pre>
 
1629
<p>
 
1630
The <span class="type">GTypeDebugFlags</span> enumeration values can be passed to
 
1631
<a href="gobject-Type-Information.html#g-type-init-with-debug-flags"><code class="function">g_type_init_with_debug_flags()</code></a> to trigger debugging messages during runtime.
 
1632
Note that the messages can also be triggered by setting the
 
1633
<code class="envar">GOBJECT_DEBUG</code> environment variable to a ':'-separated list of 
 
1634
"objects" and "signals".
 
1635
 
 
1636
</p>
 
1637
<div class="variablelist"><table border="0">
 
1638
<col align="left" valign="top">
 
1639
<tbody>
 
1640
<tr>
 
1641
<td><span class="term"><a name="G-TYPE-DEBUG-NONE:CAPS"></a><code class="literal">G_TYPE_DEBUG_NONE</code></span></td>
 
1642
<td>Print no messages.
 
1643
</td>
 
1644
</tr>
 
1645
<tr>
 
1646
<td><span class="term"><a name="G-TYPE-DEBUG-OBJECTS:CAPS"></a><code class="literal">G_TYPE_DEBUG_OBJECTS</code></span></td>
 
1647
<td>Print messages about object bookkeeping.
 
1648
</td>
 
1649
</tr>
 
1650
<tr>
 
1651
<td><span class="term"><a name="G-TYPE-DEBUG-SIGNALS:CAPS"></a><code class="literal">G_TYPE_DEBUG_SIGNALS</code></span></td>
 
1652
<td>Print messages about signal emissions.
 
1653
</td>
 
1654
</tr>
 
1655
<tr>
 
1656
<td><span class="term"><a name="G-TYPE-DEBUG-MASK:CAPS"></a><code class="literal">G_TYPE_DEBUG_MASK</code></span></td>
 
1657
<td>Mask covering all debug flags.
 
1658
 
 
1659
</td>
 
1660
</tr>
 
1661
</tbody>
 
1662
</table></div>
 
1663
</div>
 
1664
<hr>
 
1665
<div class="refsect2" lang="en">
 
1666
<a name="id3028382"></a><h3>
 
1667
<a name="g-type-init-with-debug-flags"></a>g_type_init_with_debug_flags ()</h3>
 
1668
<a class="indexterm" name="id3028395"></a><pre class="programlisting">void                g_type_init_with_debug_flags        (<a href="gobject-Type-Information.html#GTypeDebugFlags">GTypeDebugFlags</a> debug_flags);</pre>
 
1669
<p>
 
1670
Similar to <a href="gobject-Type-Information.html#g-type-init"><code class="function">g_type_init()</code></a>, but additionally sets debug flags.
 
1671
</p>
 
1672
<div class="variablelist"><table border="0">
 
1673
<col align="left" valign="top">
 
1674
<tbody><tr>
 
1675
<td><span class="term"><em class="parameter"><code>debug_flags</code></em>&#160;:</span></td>
 
1676
<td>Bitwise combination of <a href="gobject-Type-Information.html#GTypeDebugFlags"><span class="type">GTypeDebugFlags</span></a> values for debugging purposes.
 
1677
 
 
1678
 
 
1679
</td>
 
1680
</tr></tbody>
 
1681
</table></div>
 
1682
</div>
 
1683
<hr>
 
1684
<div class="refsect2" lang="en">
 
1685
<a name="id3028463"></a><h3>
 
1686
<a name="g-type-name"></a>g_type_name ()</h3>
 
1687
<a class="indexterm" name="id3028475"></a><pre class="programlisting">const <a
 
1688
href="../glib/glib-Basic-Types.html#gchar"
 
1689
>gchar</a>*        g_type_name                         (<a href="gobject-Type-Information.html#GType">GType</a> type);</pre>
 
1690
<p>
 
1691
Returns the unique name that is assigned to a type ID (this is the preferred method
 
1692
to find out whether a specific type has been registered for the passed in ID yet).
 
1693
</p>
 
1694
<div class="variablelist"><table border="0">
 
1695
<col align="left" valign="top">
 
1696
<tbody>
 
1697
<tr>
 
1698
<td><span class="term"><em class="parameter"><code>type</code></em>&#160;:</span></td>
 
1699
<td>            Type to return name for.
 
1700
</td>
 
1701
</tr>
 
1702
<tr>
 
1703
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 
1704
<td>    Static type name or <a
 
1705
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
 
1706
><code class="literal">NULL</code></a>.
 
1707
 
 
1708
 
 
1709
</td>
 
1710
</tr>
 
1711
</tbody>
 
1712
</table></div>
 
1713
</div>
 
1714
<hr>
 
1715
<div class="refsect2" lang="en">
 
1716
<a name="id3028546"></a><h3>
 
1717
<a name="g-type-qname"></a>g_type_qname ()</h3>
 
1718
<a class="indexterm" name="id3028559"></a><pre class="programlisting"><a
 
1719
href="../glib/glib-Quarks.html#GQuark"
 
1720
>GQuark</a>              g_type_qname                        (<a href="gobject-Type-Information.html#GType">GType</a> type);</pre>
 
1721
<p>
 
1722
Return the corresponding quark of the type IDs name.
 
1723
</p>
 
1724
<div class="variablelist"><table border="0">
 
1725
<col align="left" valign="top">
 
1726
<tbody>
 
1727
<tr>
 
1728
<td><span class="term"><em class="parameter"><code>type</code></em>&#160;:</span></td>
 
1729
<td>   Type to return quark of type name for.
 
1730
</td>
 
1731
</tr>
 
1732
<tr>
 
1733
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 
1734
<td>The type names quark or 0.
 
1735
 
 
1736
 
 
1737
</td>
 
1738
</tr>
 
1739
</tbody>
 
1740
</table></div>
 
1741
</div>
 
1742
<hr>
 
1743
<div class="refsect2" lang="en">
 
1744
<a name="id3028618"></a><h3>
 
1745
<a name="g-type-from-name"></a>g_type_from_name ()</h3>
 
1746
<a class="indexterm" name="id3028630"></a><pre class="programlisting"><a href="gobject-Type-Information.html#GType">GType</a>               g_type_from_name                    (const <a
 
1747
href="../glib/glib-Basic-Types.html#gchar"
 
1748
>gchar</a> *name);</pre>
 
1749
<p>
 
1750
Lookup the type ID from a given type name, returning 0 if no type has been registered under this name
 
1751
(this is the preferred method to find out by name whether a specific type has been registered yet).
 
1752
</p>
 
1753
<div class="variablelist"><table border="0">
 
1754
<col align="left" valign="top">
 
1755
<tbody>
 
1756
<tr>
 
1757
<td><span class="term"><em class="parameter"><code>name</code></em>&#160;:</span></td>
 
1758
<td>   Type name to lookup.
 
1759
</td>
 
1760
</tr>
 
1761
<tr>
 
1762
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 
1763
<td>Corresponding type ID or 0.
 
1764
 
 
1765
 
 
1766
</td>
 
1767
</tr>
 
1768
</tbody>
 
1769
</table></div>
 
1770
</div>
 
1771
<hr>
 
1772
<div class="refsect2" lang="en">
 
1773
<a name="id3028691"></a><h3>
 
1774
<a name="g-type-parent"></a>g_type_parent ()</h3>
 
1775
<a class="indexterm" name="id3028704"></a><pre class="programlisting"><a href="gobject-Type-Information.html#GType">GType</a>               g_type_parent                       (<a href="gobject-Type-Information.html#GType">GType</a> type);</pre>
 
1776
<p>
 
1777
Return the direct parent type of the passed in type.
 
1778
If the passed in type has no parent, i.e. is a fundamental type, 0 is returned.
 
1779
</p>
 
1780
<div class="variablelist"><table border="0">
 
1781
<col align="left" valign="top">
 
1782
<tbody>
 
1783
<tr>
 
1784
<td><span class="term"><em class="parameter"><code>type</code></em>&#160;:</span></td>
 
1785
<td>   The derived type.
 
1786
</td>
 
1787
</tr>
 
1788
<tr>
 
1789
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 
1790
<td>The parent type.
 
1791
 
 
1792
 
 
1793
</td>
 
1794
</tr>
 
1795
</tbody>
 
1796
</table></div>
 
1797
</div>
 
1798
<hr>
 
1799
<div class="refsect2" lang="en">
 
1800
<a name="id3028763"></a><h3>
 
1801
<a name="g-type-depth"></a>g_type_depth ()</h3>
 
1802
<a class="indexterm" name="id3028776"></a><pre class="programlisting"><a
 
1803
href="../glib/glib-Basic-Types.html#guint"
 
1804
>guint</a>               g_type_depth                        (<a href="gobject-Type-Information.html#GType">GType</a> type);</pre>
 
1805
<p>
 
1806
Returns the length of the ancestry of the passed in type. This includes the
 
1807
type itself, so that e.g. a fundamental type has depth 1.
 
1808
</p>
 
1809
<div class="variablelist"><table border="0">
 
1810
<col align="left" valign="top">
 
1811
<tbody>
 
1812
<tr>
 
1813
<td><span class="term"><em class="parameter"><code>type</code></em>&#160;:</span></td>
 
1814
<td>   A <a href="gobject-Type-Information.html#GType"><span class="type">GType</span></a> value.
 
1815
</td>
 
1816
</tr>
 
1817
<tr>
 
1818
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 
1819
<td>The depth of <em class="parameter"><code>type</code></em>.
 
1820
 
 
1821
 
 
1822
</td>
 
1823
</tr>
 
1824
</tbody>
 
1825
</table></div>
 
1826
</div>
 
1827
<hr>
 
1828
<div class="refsect2" lang="en">
 
1829
<a name="id3028850"></a><h3>
 
1830
<a name="g-type-next-base"></a>g_type_next_base ()</h3>
 
1831
<a class="indexterm" name="id3028862"></a><pre class="programlisting"><a href="gobject-Type-Information.html#GType">GType</a>               g_type_next_base                    (<a href="gobject-Type-Information.html#GType">GType</a> leaf_type,
 
1832
                                                         <a href="gobject-Type-Information.html#GType">GType</a> root_type);</pre>
 
1833
<p>
 
1834
Given a <em class="parameter"><code>leaf_type</code></em> and a <em class="parameter"><code>root_type</code></em> which is contained in its anchestry, return
 
1835
the type that <em class="parameter"><code>root_type</code></em> is the immediate parent of.
 
1836
In other words, this function determines the type that is derived directly from
 
1837
<em class="parameter"><code>root_type</code></em> which is also a base class of <em class="parameter"><code>leaf_type</code></em>.  Given a root type and a
 
1838
leaf type, this function can be used to determine the types and order in which
 
1839
the leaf type is descended from the root type.
 
1840
</p>
 
1841
<div class="variablelist"><table border="0">
 
1842
<col align="left" valign="top">
 
1843
<tbody>
 
1844
<tr>
 
1845
<td><span class="term"><em class="parameter"><code>leaf_type</code></em>&#160;:</span></td>
 
1846
<td>    Descendant of <em class="parameter"><code>root_type</code></em> and the type to be returned.
 
1847
</td>
 
1848
</tr>
 
1849
<tr>
 
1850
<td><span class="term"><em class="parameter"><code>root_type</code></em>&#160;:</span></td>
 
1851
<td>    Immediate parent of the returned type.
 
1852
</td>
 
1853
</tr>
 
1854
<tr>
 
1855
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 
1856
<td>    Immediate child of <em class="parameter"><code>root_type</code></em> and anchestor of <em class="parameter"><code>leaf_type</code></em>.
 
1857
 
 
1858
 
 
1859
</td>
 
1860
</tr>
 
1861
</tbody>
 
1862
</table></div>
 
1863
</div>
 
1864
<hr>
 
1865
<div class="refsect2" lang="en">
 
1866
<a name="id3028996"></a><h3>
 
1867
<a name="g-type-is-a"></a>g_type_is_a ()</h3>
 
1868
<a class="indexterm" name="id3029008"></a><pre class="programlisting"><a
 
1869
href="../glib/glib-Basic-Types.html#gboolean"
 
1870
>gboolean</a>            g_type_is_a                         (<a href="gobject-Type-Information.html#GType">GType</a> type,
 
1871
                                                         <a href="gobject-Type-Information.html#GType">GType</a> is_a_type);</pre>
 
1872
<p>
 
1873
If <em class="parameter"><code>is_a_type</code></em> is a derivable type, check whether <em class="parameter"><code>type</code></em> is a descendant of <em class="parameter"><code>is_a_type</code></em>.
 
1874
If <em class="parameter"><code>is_a_type</code></em> is an interface, check whether <em class="parameter"><code>type</code></em> conforms to it.
 
1875
</p>
 
1876
<div class="variablelist"><table border="0">
 
1877
<col align="left" valign="top">
 
1878
<tbody>
 
1879
<tr>
 
1880
<td><span class="term"><em class="parameter"><code>type</code></em>&#160;:</span></td>
 
1881
<td>     Type to check anchestry for.
 
1882
</td>
 
1883
</tr>
 
1884
<tr>
 
1885
<td><span class="term"><em class="parameter"><code>is_a_type</code></em>&#160;:</span></td>
 
1886
<td>Possible anchestor of <em class="parameter"><code>type</code></em> or interface <em class="parameter"><code>type</code></em> could conform to.
 
1887
</td>
 
1888
</tr>
 
1889
<tr>
 
1890
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 
1891
<td>  <a
 
1892
href="../glib/glib-Standard-Macros.html#TRUE:CAPS"
 
1893
><code class="literal">TRUE</code></a> if <em class="parameter"><code>type</code></em> is_a <em class="parameter"><code>is_a_type</code></em> holds true.
 
1894
 
 
1895
 
 
1896
</td>
 
1897
</tr>
 
1898
</tbody>
 
1899
</table></div>
 
1900
</div>
 
1901
<hr>
 
1902
<div class="refsect2" lang="en">
 
1903
<a name="id3029153"></a><h3>
 
1904
<a name="g-type-class-ref"></a>g_type_class_ref ()</h3>
 
1905
<a class="indexterm" name="id3029166"></a><pre class="programlisting"><a
 
1906
href="../glib/glib-Basic-Types.html#gpointer"
 
1907
>gpointer</a>            g_type_class_ref                    (<a href="gobject-Type-Information.html#GType">GType</a> type);</pre>
 
1908
<p>
 
1909
Increments the reference count of the class structure belonging to
 
1910
<em class="parameter"><code>type</code></em>. This function will demand-create the class if it doesn't
 
1911
exist already.
 
1912
</p>
 
1913
<div class="variablelist"><table border="0">
 
1914
<col align="left" valign="top">
 
1915
<tbody>
 
1916
<tr>
 
1917
<td><span class="term"><em class="parameter"><code>type</code></em>&#160;:</span></td>
 
1918
<td>      Type ID of a classed type.
 
1919
</td>
 
1920
</tr>
 
1921
<tr>
 
1922
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 
1923
<td>The <a href="gobject-Type-Information.html#GTypeClass"><span class="type">GTypeClass</span></a> structure for the given type ID.
 
1924
 
 
1925
 
 
1926
</td>
 
1927
</tr>
 
1928
</tbody>
 
1929
</table></div>
 
1930
</div>
 
1931
<hr>
 
1932
<div class="refsect2" lang="en">
 
1933
<a name="id3029240"></a><h3>
 
1934
<a name="g-type-class-peek"></a>g_type_class_peek ()</h3>
 
1935
<a class="indexterm" name="id3029253"></a><pre class="programlisting"><a
 
1936
href="../glib/glib-Basic-Types.html#gpointer"
 
1937
>gpointer</a>            g_type_class_peek                   (<a href="gobject-Type-Information.html#GType">GType</a> type);</pre>
 
1938
<p>
 
1939
This function is essentially the same as <a href="gobject-Type-Information.html#g-type-class-ref"><code class="function">g_type_class_ref()</code></a>, except that
 
1940
the classes reference count isn't incremented. As a consequence, this function
 
1941
may return <a
 
1942
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
 
1943
><code class="literal">NULL</code></a> if the class of the type passed in does not currently
 
1944
exist (hasn't been referenced before).
 
1945
</p>
 
1946
<div class="variablelist"><table border="0">
 
1947
<col align="left" valign="top">
 
1948
<tbody>
 
1949
<tr>
 
1950
<td><span class="term"><em class="parameter"><code>type</code></em>&#160;:</span></td>
 
1951
<td>            Type ID of a classed type.
 
1952
</td>
 
1953
</tr>
 
1954
<tr>
 
1955
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 
1956
<td>    The <a href="gobject-Type-Information.html#GTypeClass"><span class="type">GTypeClass</span></a> structure for the given type ID or <a
 
1957
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
 
1958
><code class="literal">NULL</code></a>
 
1959
                if the class does not currently exist.
 
1960
 
 
1961
 
 
1962
</td>
 
1963
</tr>
 
1964
</tbody>
 
1965
</table></div>
 
1966
</div>
 
1967
<hr>
 
1968
<div class="refsect2" lang="en">
 
1969
<a name="id3029354"></a><h3>
 
1970
<a name="g-type-class-peek-static"></a>g_type_class_peek_static ()</h3>
 
1971
<a class="indexterm" name="id3029369"></a><pre class="programlisting"><a
 
1972
href="../glib/glib-Basic-Types.html#gpointer"
 
1973
>gpointer</a>            g_type_class_peek_static            (<a href="gobject-Type-Information.html#GType">GType</a> type);</pre>
 
1974
<p>
 
1975
A more efficient version of <a href="gobject-Type-Information.html#g-type-class-peek"><code class="function">g_type_class_peek()</code></a> which works only for
 
1976
static types.
 
1977
</p>
 
1978
<div class="variablelist"><table border="0">
 
1979
<col align="left" valign="top">
 
1980
<tbody>
 
1981
<tr>
 
1982
<td><span class="term"><em class="parameter"><code>type</code></em>&#160;:</span></td>
 
1983
<td>Type ID of a classed type.
 
1984
</td>
 
1985
</tr>
 
1986
<tr>
 
1987
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 
1988
<td>The <a href="gobject-Type-Information.html#GTypeClass"><span class="type">GTypeClass</span></a> structure for the given type ID or <a
 
1989
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
 
1990
><code class="literal">NULL</code></a>
 
1991
   if the class does not currently exist or is dynamically loaded.
 
1992
</td>
 
1993
</tr>
 
1994
</tbody>
 
1995
</table></div>
 
1996
<p class="since">Since 2.4
 
1997
 
 
1998
 
 
1999
</p>
 
2000
</div>
 
2001
<hr>
 
2002
<div class="refsect2" lang="en">
 
2003
<a name="id3029465"></a><h3>
 
2004
<a name="g-type-class-unref"></a>g_type_class_unref ()</h3>
 
2005
<a class="indexterm" name="id3029478"></a><pre class="programlisting">void                g_type_class_unref                  (<a
 
2006
href="../glib/glib-Basic-Types.html#gpointer"
 
2007
>gpointer</a> g_class);</pre>
 
2008
<p>
 
2009
Decrements the reference count of the class structure being passed in.
 
2010
Once the last reference count of a class has been released, classes
 
2011
may be finalized by the type system, so further dereferencing of a
 
2012
class pointer after <a href="gobject-Type-Information.html#g-type-class-unref"><code class="function">g_type_class_unref()</code></a> are invalid.
 
2013
</p>
 
2014
<div class="variablelist"><table border="0">
 
2015
<col align="left" valign="top">
 
2016
<tbody><tr>
 
2017
<td><span class="term"><em class="parameter"><code>g_class</code></em>&#160;:</span></td>
 
2018
<td>    The <a href="gobject-Type-Information.html#GTypeClass"><span class="type">GTypeClass</span></a> structure to unreference.
 
2019
 
 
2020
 
 
2021
</td>
 
2022
</tr></tbody>
 
2023
</table></div>
 
2024
</div>
 
2025
<hr>
 
2026
<div class="refsect2" lang="en">
 
2027
<a name="id3029547"></a><h3>
 
2028
<a name="g-type-class-peek-parent"></a>g_type_class_peek_parent ()</h3>
 
2029
<a class="indexterm" name="id3029560"></a><pre class="programlisting"><a
 
2030
href="../glib/glib-Basic-Types.html#gpointer"
 
2031
>gpointer</a>            g_type_class_peek_parent            (<a
 
2032
href="../glib/glib-Basic-Types.html#gpointer"
 
2033
>gpointer</a> g_class);</pre>
 
2034
<p>
 
2035
This is a convenience function often needed in class initializers.
 
2036
It returns the class structure of the immediate parent type of the class passed in.
 
2037
Since derived classes hold
 
2038
a reference count on their parent classes as long as they are instantiated,
 
2039
the returned class will always exist. This function is essentially
 
2040
equivalent to:
 
2041
 
 
2042
</p>
 
2043
<pre class="programlisting">
 
2044
g_type_class_peek (g_type_parent (G_TYPE_FROM_CLASS (g_class)));
 
2045
</pre>
 
2046
<p>
 
2047
 
 
2048
</p>
 
2049
<div class="variablelist"><table border="0">
 
2050
<col align="left" valign="top">
 
2051
<tbody>
 
2052
<tr>
 
2053
<td><span class="term"><em class="parameter"><code>g_class</code></em>&#160;:</span></td>
 
2054
<td>The <a href="gobject-Type-Information.html#GTypeClass"><span class="type">GTypeClass</span></a> structure to retrieve the parent class for.
 
2055
</td>
 
2056
</tr>
 
2057
<tr>
 
2058
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 
2059
<td>The parent class of <em class="parameter"><code>g_class</code></em>.
 
2060
 
 
2061
 
 
2062
</td>
 
2063
</tr>
 
2064
</tbody>
 
2065
</table></div>
 
2066
</div>
 
2067
<hr>
 
2068
<div class="refsect2" lang="en">
 
2069
<a name="id3029644"></a><h3>
 
2070
<a name="g-type-class-add-private"></a>g_type_class_add_private ()</h3>
 
2071
<a class="indexterm" name="id3029659"></a><pre class="programlisting">void                g_type_class_add_private            (<a
 
2072
href="../glib/glib-Basic-Types.html#gpointer"
 
2073
>gpointer</a> g_class,
 
2074
                                                         <a
 
2075
href="../glib/glib-Basic-Types.html#gsize"
 
2076
>gsize</a> private_size);</pre>
 
2077
<p>
 
2078
Registers a private structure for a instantiatable type;
 
2079
when an object is allocated, the private structures for
 
2080
the type and and all of its parent types are allocated
 
2081
sequentially in the same memory block as the public
 
2082
structures. This function should be called in the
 
2083
type's <a href="gtype-instantiable-classed.html#class-init"><code class="function">class_init()</code></a> function. The private structure can
 
2084
be retrieved using the <a href="gobject-Type-Information.html#G-TYPE-INSTANCE-GET-PRIVATE:CAPS"><code class="function">G_TYPE_INSTANCE_GET_PRIVATE()</code></a> macro.
 
2085
The following example shows attaching a private structure
 
2086
<span class="structname">MyObjectPrivate</span> to an object
 
2087
<span class="structname">MyObject</span> defined in the standard GObject
 
2088
fashion.
 
2089
</p>
 
2090
<pre class="programlisting">
 
2091
typedef struct _MyObjectPrivate MyObjectPrivate;
 
2092
 
 
2093
struct _MyObjectPrivate {
 
2094
  int some_field;
 
2095
};
 
2096
 
 
2097
#define MY_OBJECT_GET_PRIVATE(o)  \
 
2098
   (G_TYPE_INSTANCE_GET_PRIVATE ((o), MY_TYPE_OBJECT, MyObjectPrivate))
 
2099
 
 
2100
static void
 
2101
my_object_class_init (MyObjectClass *klass)
 
2102
{
 
2103
  g_type_class_add_private (klass, sizeof (MyObjectPrivate));
 
2104
}
 
2105
 
 
2106
static int
 
2107
my_object_get_some_field (MyObject *my_object)
 
2108
{
 
2109
  MyObjectPrivate *priv = MY_OBJECT_GET_PRIVATE (my_object);
 
2110
 
 
2111
  return priv-&gt;some_field;
 
2112
}
 
2113
</pre>
 
2114
<div class="variablelist"><table border="0">
 
2115
<col align="left" valign="top">
 
2116
<tbody>
 
2117
<tr>
 
2118
<td><span class="term"><em class="parameter"><code>g_class</code></em>&#160;:</span></td>
 
2119
<td>class structure for an instantiatable type
 
2120
</td>
 
2121
</tr>
 
2122
<tr>
 
2123
<td><span class="term"><em class="parameter"><code>private_size</code></em>&#160;:</span></td>
 
2124
<td>size of private structure.
 
2125
</td>
 
2126
</tr>
 
2127
</tbody>
 
2128
</table></div>
 
2129
<p class="since">Since 2.4
 
2130
 
 
2131
 
 
2132
</p>
 
2133
</div>
 
2134
<hr>
 
2135
<div class="refsect2" lang="en">
 
2136
<a name="id3029791"></a><h3>
 
2137
<a name="g-type-interface-peek"></a>g_type_interface_peek ()</h3>
 
2138
<a class="indexterm" name="id3029804"></a><pre class="programlisting"><a
 
2139
href="../glib/glib-Basic-Types.html#gpointer"
 
2140
>gpointer</a>            g_type_interface_peek               (<a
 
2141
href="../glib/glib-Basic-Types.html#gpointer"
 
2142
>gpointer</a> instance_class,
 
2143
                                                         <a href="gobject-Type-Information.html#GType">GType</a> iface_type);</pre>
 
2144
<p>
 
2145
Returns the <a href="gobject-Type-Information.html#GTypeInterface"><span class="type">GTypeInterface</span></a> structure of an interface to which the passed in 
 
2146
class conforms.
 
2147
</p>
 
2148
<div class="variablelist"><table border="0">
 
2149
<col align="left" valign="top">
 
2150
<tbody>
 
2151
<tr>
 
2152
<td><span class="term"><em class="parameter"><code>instance_class</code></em>&#160;:</span></td>
 
2153
<td>A <a href="gobject-Type-Information.html#GTypeClass"><span class="type">GTypeClass</span></a> structure.
 
2154
</td>
 
2155
</tr>
 
2156
<tr>
 
2157
<td><span class="term"><em class="parameter"><code>iface_type</code></em>&#160;:</span></td>
 
2158
<td>    An interface ID which this class conforms to.
 
2159
</td>
 
2160
</tr>
 
2161
<tr>
 
2162
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 
2163
<td>       The GTypeInterface structure of iface_type if implemented 
 
2164
                 by <em class="parameter"><code>instance_class</code></em>, <a
 
2165
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
 
2166
><code class="literal">NULL</code></a> otherwise
 
2167
 
 
2168
 
 
2169
</td>
 
2170
</tr>
 
2171
</tbody>
 
2172
</table></div>
 
2173
</div>
 
2174
<hr>
 
2175
<div class="refsect2" lang="en">
 
2176
<a name="id3029918"></a><h3>
 
2177
<a name="g-type-interface-peek-parent"></a>g_type_interface_peek_parent ()</h3>
 
2178
<a class="indexterm" name="id3029932"></a><pre class="programlisting"><a
 
2179
href="../glib/glib-Basic-Types.html#gpointer"
 
2180
>gpointer</a>            g_type_interface_peek_parent        (<a
 
2181
href="../glib/glib-Basic-Types.html#gpointer"
 
2182
>gpointer</a> g_iface);</pre>
 
2183
<p>
 
2184
Returns the corresponding <a href="gobject-Type-Information.html#GTypeInterface"><span class="type">GTypeInterface</span></a> structure of the parent type
 
2185
of the instance type to which <em class="parameter"><code>g_iface</code></em> belongs. This is useful when 
 
2186
deriving the implementation of an interface from the parent type and 
 
2187
then possibly overriding some methods. 
 
2188
</p>
 
2189
<div class="variablelist"><table border="0">
 
2190
<col align="left" valign="top">
 
2191
<tbody>
 
2192
<tr>
 
2193
<td><span class="term"><em class="parameter"><code>g_iface</code></em>&#160;:</span></td>
 
2194
<td>A <a href="gobject-Type-Information.html#GTypeInterface"><span class="type">GTypeInterface</span></a> structure.
 
2195
</td>
 
2196
</tr>
 
2197
<tr>
 
2198
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 
2199
<td>The corresponding <a href="gobject-Type-Information.html#GTypeInterface"><span class="type">GTypeInterface</span></a> structure of the parent type
 
2200
   of the instance type to which <em class="parameter"><code>g_iface</code></em> belongs, or <a
 
2201
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
 
2202
><code class="literal">NULL</code></a> if the parent type
 
2203
   doesn't conform to the interface.
 
2204
 
 
2205
 
 
2206
</td>
 
2207
</tr>
 
2208
</tbody>
 
2209
</table></div>
 
2210
</div>
 
2211
<hr>
 
2212
<div class="refsect2" lang="en">
 
2213
<a name="id3030040"></a><h3>
 
2214
<a name="g-type-default-interface-ref"></a>g_type_default_interface_ref ()</h3>
 
2215
<a class="indexterm" name="id3030055"></a><pre class="programlisting"><a
 
2216
href="../glib/glib-Basic-Types.html#gpointer"
 
2217
>gpointer</a>            g_type_default_interface_ref        (<a href="gobject-Type-Information.html#GType">GType</a> g_type);</pre>
 
2218
<p>
 
2219
Increments the reference count for the interface type <em class="parameter"><code>g_type</code></em>,
 
2220
and returns the default interface vtable for the type.
 
2221
</p>
 
2222
<p>  
 
2223
If the type is not currently in use, then the default vtable
 
2224
for the type will be created and initalized by calling
 
2225
the base interface init and default vtable init functions for
 
2226
the type (the @<em class="structfield"><code>base_init</code></em>
 
2227
and <em class="structfield"><code>class_init</code></em> members of <a href="gobject-Type-Information.html#GTypeInfo"><span class="type">GTypeInfo</span></a>).
 
2228
Calling <a href="gobject-Type-Information.html#g-type-default-interface-ref"><code class="function">g_type_default_interface_ref()</code></a> is useful when you
 
2229
want to make sure that signals and properties for an interface
 
2230
have been installed.
 
2231
</p>
 
2232
<div class="variablelist"><table border="0">
 
2233
<col align="left" valign="top">
 
2234
<tbody>
 
2235
<tr>
 
2236
<td><span class="term"><em class="parameter"><code>g_type</code></em>&#160;:</span></td>
 
2237
<td>an interface type
 
2238
</td>
 
2239
</tr>
 
2240
<tr>
 
2241
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 
2242
<td>the default vtable for the interface; call 
 
2243
 <a href="gobject-Type-Information.html#g-type-default-interface-unref"><code class="function">g_type_default_interface_unref()</code></a> when you are done using
 
2244
 the interface.
 
2245
</td>
 
2246
</tr>
 
2247
</tbody>
 
2248
</table></div>
 
2249
<p class="since">Since 2.4
 
2250
 
 
2251
 
 
2252
</p>
 
2253
</div>
 
2254
<hr>
 
2255
<div class="refsect2" lang="en">
 
2256
<a name="id3030174"></a><h3>
 
2257
<a name="g-type-default-interface-peek"></a>g_type_default_interface_peek ()</h3>
 
2258
<a class="indexterm" name="id3030190"></a><pre class="programlisting"><a
 
2259
href="../glib/glib-Basic-Types.html#gpointer"
 
2260
>gpointer</a>            g_type_default_interface_peek       (<a href="gobject-Type-Information.html#GType">GType</a> g_type);</pre>
 
2261
<p>
 
2262
If the interface type <em class="parameter"><code>g_type</code></em> is currently in use, returns
 
2263
its default interface vtable.    
 
2264
</p>
 
2265
<div class="variablelist"><table border="0">
 
2266
<col align="left" valign="top">
 
2267
<tbody>
 
2268
<tr>
 
2269
<td><span class="term"><em class="parameter"><code>g_type</code></em>&#160;:</span></td>
 
2270
<td>an interface type
 
2271
</td>
 
2272
</tr>
 
2273
<tr>
 
2274
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 
2275
<td>the default vtable for the interface, or <a
 
2276
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
 
2277
><code class="literal">NULL</code></a>
 
2278
 if the type is not currently in use.
 
2279
</td>
 
2280
</tr>
 
2281
</tbody>
 
2282
</table></div>
 
2283
<p class="since">Since 2.4
 
2284
 
 
2285
 
 
2286
</p>
 
2287
</div>
 
2288
<hr>
 
2289
<div class="refsect2" lang="en">
 
2290
<a name="id3030272"></a><h3>
 
2291
<a name="g-type-default-interface-unref"></a>g_type_default_interface_unref ()</h3>
 
2292
<a class="indexterm" name="id3030287"></a><pre class="programlisting">void                g_type_default_interface_unref      (<a
 
2293
href="../glib/glib-Basic-Types.html#gpointer"
 
2294
>gpointer</a> g_iface);</pre>
 
2295
<p>
 
2296
Decrements the reference count for the type corresponding to the
 
2297
interface default vtable <em class="parameter"><code>g_iface</code></em>. If the type is dynamic, then
 
2298
when no one is using the interface and all references have
 
2299
been released, the finalize function for the interface's default
 
2300
vtable (the <em class="structfield"><code>class_finalize</code></em> member of
 
2301
<a href="gobject-Type-Information.html#GTypeInfo"><span class="type">GTypeInfo</span></a>) will be called.
 
2302
</p>
 
2303
<div class="variablelist"><table border="0">
 
2304
<col align="left" valign="top">
 
2305
<tbody><tr>
 
2306
<td><span class="term"><em class="parameter"><code>g_iface</code></em>&#160;:</span></td>
 
2307
<td>the default vtable structure for a interface, as
 
2308
  returned by <a href="gobject-Type-Information.html#g-type-default-interface-ref"><code class="function">g_type_default_interface_ref()</code></a>
 
2309
</td>
 
2310
</tr></tbody>
 
2311
</table></div>
 
2312
<p class="since">Since 2.4
 
2313
 
 
2314
 
 
2315
</p>
 
2316
</div>
 
2317
<hr>
 
2318
<div class="refsect2" lang="en">
 
2319
<a name="id3030375"></a><h3>
 
2320
<a name="g-type-children"></a>g_type_children ()</h3>
 
2321
<a class="indexterm" name="id3030388"></a><pre class="programlisting"><a href="gobject-Type-Information.html#GType">GType</a>*              g_type_children                     (<a href="gobject-Type-Information.html#GType">GType</a> type,
 
2322
                                                         <a
 
2323
href="../glib/glib-Basic-Types.html#guint"
 
2324
>guint</a> *n_children);</pre>
 
2325
<p>
 
2326
Return a newly allocated and 0-terminated array of type IDs, listing the
 
2327
child types of <em class="parameter"><code>type</code></em>. The return value has to be <a
 
2328
href="../glib/glib-Memory-Allocation.html#g-free"
 
2329
><code class="function">g_free()</code></a>ed after use.
 
2330
</p>
 
2331
<div class="variablelist"><table border="0">
 
2332
<col align="left" valign="top">
 
2333
<tbody>
 
2334
<tr>
 
2335
<td><span class="term"><em class="parameter"><code>type</code></em>&#160;:</span></td>
 
2336
<td>      The parent type.
 
2337
</td>
 
2338
</tr>
 
2339
<tr>
 
2340
<td><span class="term"><em class="parameter"><code>n_children</code></em>&#160;:</span></td>
 
2341
<td>Optional <a
 
2342
href="../glib/glib-Basic-Types.html#guint"
 
2343
><span class="type">guint</span></a> pointer to contain the number of child types.
 
2344
</td>
 
2345
</tr>
 
2346
<tr>
 
2347
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 
2348
<td>   Newly allocated and 0-terminated array of child types.
 
2349
 
 
2350
 
 
2351
</td>
 
2352
</tr>
 
2353
</tbody>
 
2354
</table></div>
 
2355
</div>
 
2356
<hr>
 
2357
<div class="refsect2" lang="en">
 
2358
<a name="id3030496"></a><h3>
 
2359
<a name="g-type-interfaces"></a>g_type_interfaces ()</h3>
 
2360
<a class="indexterm" name="id3030508"></a><pre class="programlisting"><a href="gobject-Type-Information.html#GType">GType</a>*              g_type_interfaces                   (<a href="gobject-Type-Information.html#GType">GType</a> type,
 
2361
                                                         <a
 
2362
href="../glib/glib-Basic-Types.html#guint"
 
2363
>guint</a> *n_interfaces);</pre>
 
2364
<p>
 
2365
Return a newly allocated and 0-terminated array of type IDs, listing the
 
2366
interface types that <em class="parameter"><code>type</code></em> conforms to. The return value has to be
 
2367
<a
 
2368
href="../glib/glib-Memory-Allocation.html#g-free"
 
2369
><code class="function">g_free()</code></a>ed after use.
 
2370
</p>
 
2371
<div class="variablelist"><table border="0">
 
2372
<col align="left" valign="top">
 
2373
<tbody>
 
2374
<tr>
 
2375
<td><span class="term"><em class="parameter"><code>type</code></em>&#160;:</span></td>
 
2376
<td>        The type to list interface types for.
 
2377
</td>
 
2378
</tr>
 
2379
<tr>
 
2380
<td><span class="term"><em class="parameter"><code>n_interfaces</code></em>&#160;:</span></td>
 
2381
<td>Optional <a
 
2382
href="../glib/glib-Basic-Types.html#guint"
 
2383
><span class="type">guint</span></a> pointer to contain the number of interface types.
 
2384
</td>
 
2385
</tr>
 
2386
<tr>
 
2387
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 
2388
<td>     Newly allocated and 0-terminated array of interface types.
 
2389
 
 
2390
 
 
2391
</td>
 
2392
</tr>
 
2393
</tbody>
 
2394
</table></div>
 
2395
</div>
 
2396
<hr>
 
2397
<div class="refsect2" lang="en">
 
2398
<a name="id3030616"></a><h3>
 
2399
<a name="g-type-interface-prerequisites"></a>g_type_interface_prerequisites ()</h3>
 
2400
<a class="indexterm" name="id3030632"></a><pre class="programlisting"><a href="gobject-Type-Information.html#GType">GType</a>*              g_type_interface_prerequisites      (<a href="gobject-Type-Information.html#GType">GType</a> interface_type,
 
2401
                                                         <a
 
2402
href="../glib/glib-Basic-Types.html#guint"
 
2403
>guint</a> *n_prerequisites);</pre>
 
2404
<p>
 
2405
Returns the prerequisites of an interfaces type.
 
2406
</p>
 
2407
<div class="variablelist"><table border="0">
 
2408
<col align="left" valign="top">
 
2409
<tbody>
 
2410
<tr>
 
2411
<td><span class="term"><em class="parameter"><code>interface_type</code></em>&#160;:</span></td>
 
2412
<td>an interface type
 
2413
</td>
 
2414
</tr>
 
2415
<tr>
 
2416
<td><span class="term"><em class="parameter"><code>n_prerequisites</code></em>&#160;:</span></td>
 
2417
<td>location to return the number of prerequisites, or <a
 
2418
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
 
2419
><code class="literal">NULL</code></a>
 
2420
</td>
 
2421
</tr>
 
2422
<tr>
 
2423
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 
2424
<td>a newly-allocated zero-terminated array of <a href="gobject-Type-Information.html#GType"><span class="type">GType</span></a> containing 
 
2425
   the prerequisites of <em class="parameter"><code>interface_type</code></em>
 
2426
</td>
 
2427
</tr>
 
2428
</tbody>
 
2429
</table></div>
 
2430
<p class="since">Since 2.2
 
2431
 
 
2432
 
 
2433
</p>
 
2434
</div>
 
2435
<hr>
 
2436
<div class="refsect2" lang="en">
 
2437
<a name="id3030744"></a><h3>
 
2438
<a name="g-type-set-qdata"></a>g_type_set_qdata ()</h3>
 
2439
<a class="indexterm" name="id3030757"></a><pre class="programlisting">void                g_type_set_qdata                    (<a href="gobject-Type-Information.html#GType">GType</a> type,
 
2440
                                                         <a
 
2441
href="../glib/glib-Quarks.html#GQuark"
 
2442
>GQuark</a> quark,
 
2443
                                                         <a
 
2444
href="../glib/glib-Basic-Types.html#gpointer"
 
2445
>gpointer</a> data);</pre>
 
2446
<p>
 
2447
Attaches arbitrary data to a type.
 
2448
</p>
 
2449
<div class="variablelist"><table border="0">
 
2450
<col align="left" valign="top">
 
2451
<tbody>
 
2452
<tr>
 
2453
<td><span class="term"><em class="parameter"><code>type</code></em>&#160;:</span></td>
 
2454
<td>a <a href="gobject-Type-Information.html#GType"><span class="type">GType</span></a>
 
2455
</td>
 
2456
</tr>
 
2457
<tr>
 
2458
<td><span class="term"><em class="parameter"><code>quark</code></em>&#160;:</span></td>
 
2459
<td>a <a
 
2460
href="../glib/glib-Quarks.html#GQuark"
 
2461
><span class="type">GQuark</span></a> id to identify the data
 
2462
</td>
 
2463
</tr>
 
2464
<tr>
 
2465
<td><span class="term"><em class="parameter"><code>data</code></em>&#160;:</span></td>
 
2466
<td>the data
 
2467
 
 
2468
 
 
2469
</td>
 
2470
</tr>
 
2471
</tbody>
 
2472
</table></div>
 
2473
</div>
 
2474
<hr>
 
2475
<div class="refsect2" lang="en">
 
2476
<a name="id3030863"></a><h3>
 
2477
<a name="g-type-get-qdata"></a>g_type_get_qdata ()</h3>
 
2478
<a class="indexterm" name="id3030876"></a><pre class="programlisting"><a
 
2479
href="../glib/glib-Basic-Types.html#gpointer"
 
2480
>gpointer</a>            g_type_get_qdata                    (<a href="gobject-Type-Information.html#GType">GType</a> type,
 
2481
                                                         <a
 
2482
href="../glib/glib-Quarks.html#GQuark"
 
2483
>GQuark</a> quark);</pre>
 
2484
<p>
 
2485
Obtains data which has previously been attached to <em class="parameter"><code>type</code></em>
 
2486
with <a href="gobject-Type-Information.html#g-type-set-qdata"><code class="function">g_type_set_qdata()</code></a>.
 
2487
</p>
 
2488
<div class="variablelist"><table border="0">
 
2489
<col align="left" valign="top">
 
2490
<tbody>
 
2491
<tr>
 
2492
<td><span class="term"><em class="parameter"><code>type</code></em>&#160;:</span></td>
 
2493
<td>a <a href="gobject-Type-Information.html#GType"><span class="type">GType</span></a>
 
2494
</td>
 
2495
</tr>
 
2496
<tr>
 
2497
<td><span class="term"><em class="parameter"><code>quark</code></em>&#160;:</span></td>
 
2498
<td>a <a
 
2499
href="../glib/glib-Quarks.html#GQuark"
 
2500
><span class="type">GQuark</span></a> id to identify the data
 
2501
</td>
 
2502
</tr>
 
2503
<tr>
 
2504
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 
2505
<td>the data, or <a
 
2506
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
 
2507
><code class="literal">NULL</code></a> if no data was found
 
2508
 
 
2509
 
 
2510
</td>
 
2511
</tr>
 
2512
</tbody>
 
2513
</table></div>
 
2514
</div>
 
2515
<hr>
 
2516
<div class="refsect2" lang="en">
 
2517
<a name="id3030998"></a><h3>
 
2518
<a name="g-type-query"></a>g_type_query ()</h3>
 
2519
<a class="indexterm" name="id3031011"></a><pre class="programlisting">void                g_type_query                        (<a href="gobject-Type-Information.html#GType">GType</a> type,
 
2520
                                                         <a href="gobject-Type-Information.html#GTypeQuery">GTypeQuery</a> *query);</pre>
 
2521
<p>
 
2522
Queries the type system for information about a specific type. 
 
2523
This function will fill in a user-provided structure to hold type-specific 
 
2524
information. If an invalid <a href="gobject-Type-Information.html#GType"><span class="type">GType</span></a> is passed in, the <em class="parameter"><code>type</code></em> member of the 
 
2525
<a href="gobject-Type-Information.html#GTypeQuery"><span class="type">GTypeQuery</span></a> is 0. All members filled into the <a href="gobject-Type-Information.html#GTypeQuery"><span class="type">GTypeQuery</span></a> structure should
 
2526
be considered constant and have to be left untouched.
 
2527
</p>
 
2528
<div class="variablelist"><table border="0">
 
2529
<col align="left" valign="top">
 
2530
<tbody>
 
2531
<tr>
 
2532
<td><span class="term"><em class="parameter"><code>type</code></em>&#160;:</span></td>
 
2533
<td>the <a href="gobject-Type-Information.html#GType"><span class="type">GType</span></a> value of a static, classed type.
 
2534
</td>
 
2535
</tr>
 
2536
<tr>
 
2537
<td><span class="term"><em class="parameter"><code>query</code></em>&#160;:</span></td>
 
2538
<td>A user provided structure that is filled in with constant values 
 
2539
        upon success.
 
2540
 
 
2541
 
 
2542
</td>
 
2543
</tr>
 
2544
</tbody>
 
2545
</table></div>
 
2546
</div>
 
2547
<hr>
 
2548
<div class="refsect2" lang="en">
 
2549
<a name="id3031123"></a><h3>
 
2550
<a name="GTypeQuery"></a>GTypeQuery</h3>
 
2551
<a class="indexterm" name="id3031135"></a><pre class="programlisting">typedef struct {
 
2552
  GType         type;
 
2553
  const gchar  *type_name;
 
2554
  guint         class_size;
 
2555
  guint         instance_size;
 
2556
} GTypeQuery;
 
2557
</pre>
 
2558
<p>
 
2559
A structure holding information for a specific type. It is
 
2560
filled in by the <a href="gobject-Type-Information.html#g-type-query"><code class="function">g_type_query()</code></a> function.
 
2561
</p>
 
2562
<div class="variablelist"><table border="0">
 
2563
<col align="left" valign="top">
 
2564
<tbody>
 
2565
<tr>
 
2566
<td><span class="term"><a href="gobject-Type-Information.html#GType">GType</a>&#160;<em class="structfield"><code>type</code></em>;</span></td>
 
2567
<td>the <a href="gobject-Type-Information.html#GType"><span class="type">GType</span></a> value of the type.
 
2568
</td>
 
2569
</tr>
 
2570
<tr>
 
2571
<td><span class="term">const&#160;<a
 
2572
href="../glib/glib-Basic-Types.html#gchar"
 
2573
>gchar</a>&#160;*<em class="structfield"><code>type_name</code></em>;</span></td>
 
2574
<td>the name of the type.
 
2575
</td>
 
2576
</tr>
 
2577
<tr>
 
2578
<td><span class="term"><a
 
2579
href="../glib/glib-Basic-Types.html#guint"
 
2580
>guint</a>&#160;<em class="structfield"><code>class_size</code></em>;</span></td>
 
2581
<td>the size of the class structure.
 
2582
</td>
 
2583
</tr>
 
2584
<tr>
 
2585
<td><span class="term"><a
 
2586
href="../glib/glib-Basic-Types.html#guint"
 
2587
>guint</a>&#160;<em class="structfield"><code>instance_size</code></em>;</span></td>
 
2588
<td>the size of the instance structure.
 
2589
 
 
2590
</td>
 
2591
</tr>
 
2592
</tbody>
 
2593
</table></div>
 
2594
</div>
 
2595
<hr>
 
2596
<div class="refsect2" lang="en">
 
2597
<a name="id3031260"></a><h3>
 
2598
<a name="GBaseInitFunc"></a>GBaseInitFunc ()</h3>
 
2599
<a class="indexterm" name="id3031273"></a><pre class="programlisting">void                (*GBaseInitFunc)                    (<a
 
2600
href="../glib/glib-Basic-Types.html#gpointer"
 
2601
>gpointer</a> g_class);</pre>
 
2602
<p>
 
2603
A callback function used by the type system to do base initialization
 
2604
of the class structures of derived types. It is called as part of the
 
2605
initialization process of all derived classes and should reallocate
 
2606
or reset all dynamic class members copied over from the parent class.
 
2607
For example, class members (such as strings) that are not sufficiently
 
2608
handled by a plain memory copy of the parent class into the derived class
 
2609
have to be altered. See <a href="gobject-Type-Information.html#GClassInitFunc"><code class="function">GClassInitFunc()</code></a> for a discussion of the class
 
2610
intialization process.
 
2611
</p>
 
2612
<div class="variablelist"><table border="0">
 
2613
<col align="left" valign="top">
 
2614
<tbody><tr>
 
2615
<td><span class="term"><em class="parameter"><code>g_class</code></em>&#160;:</span></td>
 
2616
<td>The <a href="gobject-Type-Information.html#GTypeClass"><span class="type">GTypeClass</span></a> structure to initialize.
 
2617
 
 
2618
 
 
2619
</td>
 
2620
</tr></tbody>
 
2621
</table></div>
 
2622
</div>
 
2623
<hr>
 
2624
<div class="refsect2" lang="en">
 
2625
<a name="id3031347"></a><h3>
 
2626
<a name="GBaseFinalizeFunc"></a>GBaseFinalizeFunc ()</h3>
 
2627
<a class="indexterm" name="id3031360"></a><pre class="programlisting">void                (*GBaseFinalizeFunc)                (<a
 
2628
href="../glib/glib-Basic-Types.html#gpointer"
 
2629
>gpointer</a> g_class);</pre>
 
2630
<p>
 
2631
A callback function used by the type system to finalize those portions
 
2632
of a derived types class structure that were setup from the corresponding
 
2633
<a href="gobject-Type-Information.html#GBaseInitFunc"><code class="function">GBaseInitFunc()</code></a> function. Class finalization basically works the inverse
 
2634
way in which class intialization is performed.
 
2635
See <a href="gobject-Type-Information.html#GClassInitFunc"><code class="function">GClassInitFunc()</code></a> for a discussion of the class intialization process.
 
2636
</p>
 
2637
<div class="variablelist"><table border="0">
 
2638
<col align="left" valign="top">
 
2639
<tbody><tr>
 
2640
<td><span class="term"><em class="parameter"><code>g_class</code></em>&#160;:</span></td>
 
2641
<td>The <a href="gobject-Type-Information.html#GTypeClass"><span class="type">GTypeClass</span></a> structure to finalize.
 
2642
 
 
2643
 
 
2644
</td>
 
2645
</tr></tbody>
 
2646
</table></div>
 
2647
</div>
 
2648
<hr>
 
2649
<div class="refsect2" lang="en">
 
2650
<a name="id3031440"></a><h3>
 
2651
<a name="GClassInitFunc"></a>GClassInitFunc ()</h3>
 
2652
<a class="indexterm" name="id3031453"></a><pre class="programlisting">void                (*GClassInitFunc)                   (<a
 
2653
href="../glib/glib-Basic-Types.html#gpointer"
 
2654
>gpointer</a> g_class,
 
2655
                                                         <a
 
2656
href="../glib/glib-Basic-Types.html#gpointer"
 
2657
>gpointer</a> class_data);</pre>
 
2658
<p>
 
2659
A callback function used by the type system to initialize the class
 
2660
of a specific type. This function should initialize all static class
 
2661
members.
 
2662
The initialization process of a class involves:
 
2663
</p>
 
2664
<div class="variablelist"><table border="0">
 
2665
<col align="left" valign="top">
 
2666
<tbody>
 
2667
<tr>
 
2668
<td><span class="term"></span></td>
 
2669
<td><p>
 
2670
        1 - Copying common members from the parent class over to the
 
2671
        derived class structure.
 
2672
  </p></td>
 
2673
</tr>
 
2674
<tr>
 
2675
<td><span class="term"></span></td>
 
2676
<td><p>
 
2677
        2 -  Zero initialization of the remaining members not copied
 
2678
        over from the parent class.
 
2679
  </p></td>
 
2680
</tr>
 
2681
<tr>
 
2682
<td><span class="term"></span></td>
 
2683
<td><p>
 
2684
        3 - Invocation of the <a href="gobject-Type-Information.html#GBaseInitFunc"><code class="function">GBaseInitFunc()</code></a> initializers of all parent
 
2685
        types and the class' type.
 
2686
  </p></td>
 
2687
</tr>
 
2688
<tr>
 
2689
<td><span class="term"></span></td>
 
2690
<td><p>
 
2691
        4 - Invocation of the class' <a href="gobject-Type-Information.html#GClassInitFunc"><code class="function">GClassInitFunc()</code></a> initializer.
 
2692
  </p></td>
 
2693
</tr>
 
2694
</tbody>
 
2695
</table></div>
 
2696
<p>
 
2697
Since derived classes are partially initialized through a memory copy
 
2698
of the parent class, the general rule is that <a href="gobject-Type-Information.html#GBaseInitFunc"><code class="function">GBaseInitFunc()</code></a> and
 
2699
<a href="gobject-Type-Information.html#GBaseFinalizeFunc"><code class="function">GBaseFinalizeFunc()</code></a> should take care of necessary reinitialization
 
2700
and release of those class members that were introduced by the type
 
2701
that specified these <a href="gobject-Type-Information.html#GBaseInitFunc"><code class="function">GBaseInitFunc()</code></a>/<a href="gobject-Type-Information.html#GBaseFinalizeFunc"><code class="function">GBaseFinalizeFunc()</code></a>.
 
2702
<a href="gobject-Type-Information.html#GClassInitFunc"><code class="function">GClassInitFunc()</code></a> should only care about initializing static
 
2703
class members, while dynamic class members (such as allocated strings
 
2704
or reference counted resources) are better handled by a <a href="gobject-Type-Information.html#GBaseInitFunc"><code class="function">GBaseInitFunc()</code></a>
 
2705
for this type, so proper initialization of the dynamic class members
 
2706
is performed for class initialization of derived types as well.
 
2707
An example may help to correspond the intend of the different class
 
2708
initializers:
 
2709
 
 
2710
</p>
 
2711
<pre class="programlisting">
 
2712
typedef struct {
 
2713
  GObjectClass parent_class;
 
2714
  gint         static_integer;
 
2715
  gchar       *dynamic_string;
 
2716
} TypeAClass;
 
2717
static void
 
2718
type_a_base_class_init (TypeAClass *class)
 
2719
{
 
2720
  class-&gt;dynamic_string = g_strdup ("some string");
 
2721
}
 
2722
static void
 
2723
type_a_base_class_finalize (TypeAClass *class)
 
2724
{
 
2725
  g_free (class-&gt;dynamic_string);
 
2726
}
 
2727
static void
 
2728
type_a_class_init (TypeAClass *class)
 
2729
{
 
2730
  class-&gt;static_integer = 42;
 
2731
}
 
2732
 
 
2733
typedef struct {
 
2734
  TypeAClass   parent_class;
 
2735
  gfloat       static_float;
 
2736
  GString     *dynamic_gstring;
 
2737
} TypeBClass;
 
2738
static void
 
2739
type_b_base_class_init (TypeBClass *class)
 
2740
{
 
2741
  class-&gt;dynamic_gstring = g_string_new ("some other string");
 
2742
}
 
2743
static void
 
2744
type_b_base_class_finalize (TypeBClass *class)
 
2745
{
 
2746
  g_string_free (class-&gt;dynamic_gstring);
 
2747
}
 
2748
static void
 
2749
type_b_class_init (TypeBClass *class)
 
2750
{
 
2751
  class-&gt;static_float = 3.14159265358979323846;
 
2752
}
 
2753
</pre>
 
2754
<p>
 
2755
Initialization of TypeBClass will first cause initialization of
 
2756
TypeAClass (derived classes reference their parent classes, see
 
2757
<a href="gobject-Type-Information.html#g-type-class-ref"><code class="function">g_type_class_ref()</code></a> on this).
 
2758
Initialization of TypeAClass roughly involves zero-initializing its fields,
 
2759
then calling its <a href="gobject-Type-Information.html#GBaseInitFunc"><code class="function">GBaseInitFunc()</code></a> <code class="function">type_a_base_class_init()</code> to allocate
 
2760
its dynamic members (dynamic_string), and finally calling its <a href="gobject-Type-Information.html#GClassInitFunc"><code class="function">GClassInitFunc()</code></a>
 
2761
<code class="function">type_a_class_init()</code> to initialize its static members (static_integer).
 
2762
The first step in the initialization process of TypeBClass is then
 
2763
a plain memory copy of the contents of TypeAClass into TypeBClass and 
 
2764
zero-initialization of the remaining fields in TypeBClass.
 
2765
The dynamic members of TypeAClass within TypeBClass now need
 
2766
reinitialization which is performed by calling <code class="function">type_a_base_class_init()</code>
 
2767
with an argument of TypeBClass.
 
2768
After that, the <a href="gobject-Type-Information.html#GBaseInitFunc"><code class="function">GBaseInitFunc()</code></a> of TypeBClass, <code class="function">type_b_base_class_init()</code>
 
2769
is called to allocate the dynamic members of TypeBClass (dynamic_gstring),
 
2770
and finally the <a href="gobject-Type-Information.html#GClassInitFunc"><code class="function">GClassInitFunc()</code></a> of TypeBClass, <code class="function">type_b_class_init()</code>,
 
2771
is called to complete the initialization process with the static members
 
2772
(static_float).
 
2773
Corresponding finalization counter parts to the <a href="gobject-Type-Information.html#GBaseInitFunc"><code class="function">GBaseInitFunc()</code></a> functions
 
2774
have to be provided to release allocated resources at class finalization
 
2775
time.
 
2776
</p>
 
2777
<div class="variablelist"><table border="0">
 
2778
<col align="left" valign="top">
 
2779
<tbody>
 
2780
<tr>
 
2781
<td><span class="term"><em class="parameter"><code>g_class</code></em>&#160;:</span></td>
 
2782
<td>    The <a href="gobject-Type-Information.html#GTypeClass"><span class="type">GTypeClass</span></a> structure to initialize.
 
2783
</td>
 
2784
</tr>
 
2785
<tr>
 
2786
<td><span class="term"><em class="parameter"><code>class_data</code></em>&#160;:</span></td>
 
2787
<td>    The <em class="parameter"><code>class_data</code></em> member supplied via the <a href="gobject-Type-Information.html#GTypeInfo"><span class="type">GTypeInfo</span></a> structure.
 
2788
 
 
2789
 
 
2790
</td>
 
2791
</tr>
 
2792
</tbody>
 
2793
</table></div>
 
2794
</div>
 
2795
<hr>
 
2796
<div class="refsect2" lang="en">
 
2797
<a name="id3031836"></a><h3>
 
2798
<a name="GClassFinalizeFunc"></a>GClassFinalizeFunc ()</h3>
 
2799
<a class="indexterm" name="id3031849"></a><pre class="programlisting">void                (*GClassFinalizeFunc)               (<a
 
2800
href="../glib/glib-Basic-Types.html#gpointer"
 
2801
>gpointer</a> g_class,
 
2802
                                                         <a
 
2803
href="../glib/glib-Basic-Types.html#gpointer"
 
2804
>gpointer</a> class_data);</pre>
 
2805
<p>
 
2806
A callback function used by the type system to finalize a class.
 
2807
This function is rarely needed, as dynamically allocated class resources
 
2808
should be handled by <a href="gobject-Type-Information.html#GBaseInitFunc"><code class="function">GBaseInitFunc()</code></a> and <a href="gobject-Type-Information.html#GBaseFinalizeFunc"><code class="function">GBaseFinalizeFunc()</code></a>.
 
2809
Also, specification of a <a href="gobject-Type-Information.html#GClassFinalizeFunc"><code class="function">GClassFinalizeFunc()</code></a> in the <a href="gobject-Type-Information.html#GTypeInfo"><span class="type">GTypeInfo</span></a>
 
2810
structure of a static type is invalid, because classes of static types
 
2811
will never be finalized (they are artificially kept alive when their
 
2812
reference count drops to zero).
 
2813
</p>
 
2814
<div class="variablelist"><table border="0">
 
2815
<col align="left" valign="top">
 
2816
<tbody>
 
2817
<tr>
 
2818
<td><span class="term"><em class="parameter"><code>g_class</code></em>&#160;:</span></td>
 
2819
<td>    The <a href="gobject-Type-Information.html#GTypeClass"><span class="type">GTypeClass</span></a> structure to finalize.
 
2820
</td>
 
2821
</tr>
 
2822
<tr>
 
2823
<td><span class="term"><em class="parameter"><code>class_data</code></em>&#160;:</span></td>
 
2824
<td>    The <em class="parameter"><code>class_data</code></em> member supplied via the <a href="gobject-Type-Information.html#GTypeInfo"><span class="type">GTypeInfo</span></a> structure.
 
2825
 
 
2826
 
 
2827
</td>
 
2828
</tr>
 
2829
</tbody>
 
2830
</table></div>
 
2831
</div>
 
2832
<hr>
 
2833
<div class="refsect2" lang="en">
 
2834
<a name="id3031985"></a><h3>
 
2835
<a name="GInstanceInitFunc"></a>GInstanceInitFunc ()</h3>
 
2836
<a class="indexterm" name="id3031998"></a><pre class="programlisting">void                (*GInstanceInitFunc)                (<a href="gobject-Type-Information.html#GTypeInstance">GTypeInstance</a> *instance,
 
2837
                                                         <a
 
2838
href="../glib/glib-Basic-Types.html#gpointer"
 
2839
>gpointer</a> g_class);</pre>
 
2840
<p>
 
2841
A callback function used by the type system to initialize a new
 
2842
instance of a type. This function initializes all instance members and
 
2843
allocates any resources required by it.
 
2844
Initialization of a derived instance involves calling all its parent
 
2845
types instance initializers, so the class member of the instance
 
2846
is altered during its initialization to always point to the class that
 
2847
belongs to the type the current initializer was introduced for.
 
2848
</p>
 
2849
<div class="variablelist"><table border="0">
 
2850
<col align="left" valign="top">
 
2851
<tbody>
 
2852
<tr>
 
2853
<td><span class="term"><em class="parameter"><code>instance</code></em>&#160;:</span></td>
 
2854
<td>    The instance to initialize.
 
2855
</td>
 
2856
</tr>
 
2857
<tr>
 
2858
<td><span class="term"><em class="parameter"><code>g_class</code></em>&#160;:</span></td>
 
2859
<td>    The class of the type the instance is created for.
 
2860
 
 
2861
 
 
2862
</td>
 
2863
</tr>
 
2864
</tbody>
 
2865
</table></div>
 
2866
</div>
 
2867
<hr>
 
2868
<div class="refsect2" lang="en">
 
2869
<a name="id3032082"></a><h3>
 
2870
<a name="GInterfaceInitFunc"></a>GInterfaceInitFunc ()</h3>
 
2871
<a class="indexterm" name="id3032095"></a><pre class="programlisting">void                (*GInterfaceInitFunc)               (<a
 
2872
href="../glib/glib-Basic-Types.html#gpointer"
 
2873
>gpointer</a> g_iface,
 
2874
                                                         <a
 
2875
href="../glib/glib-Basic-Types.html#gpointer"
 
2876
>gpointer</a> iface_data);</pre>
 
2877
<p>
 
2878
A callback function used by the type system to initialize a new
 
2879
interface.  This function should initialize all internal data and
 
2880
allocate any resources required by the interface.
 
2881
</p>
 
2882
<div class="variablelist"><table border="0">
 
2883
<col align="left" valign="top">
 
2884
<tbody>
 
2885
<tr>
 
2886
<td><span class="term"><em class="parameter"><code>g_iface</code></em>&#160;:</span></td>
 
2887
<td>    The interface structure to initialize.
 
2888
</td>
 
2889
</tr>
 
2890
<tr>
 
2891
<td><span class="term"><em class="parameter"><code>iface_data</code></em>&#160;:</span></td>
 
2892
<td>    The <em class="parameter"><code>class_data</code></em> supplied via the <a href="gobject-Type-Information.html#GTypeInfo"><span class="type">GTypeInfo</span></a> structure.
 
2893
 
 
2894
 
 
2895
</td>
 
2896
</tr>
 
2897
</tbody>
 
2898
</table></div>
 
2899
</div>
 
2900
<hr>
 
2901
<div class="refsect2" lang="en">
 
2902
<a name="id3032181"></a><h3>
 
2903
<a name="GInterfaceFinalizeFunc"></a>GInterfaceFinalizeFunc ()</h3>
 
2904
<a class="indexterm" name="id3032194"></a><pre class="programlisting">void                (*GInterfaceFinalizeFunc)           (<a
 
2905
href="../glib/glib-Basic-Types.html#gpointer"
 
2906
>gpointer</a> g_iface,
 
2907
                                                         <a
 
2908
href="../glib/glib-Basic-Types.html#gpointer"
 
2909
>gpointer</a> iface_data);</pre>
 
2910
<p>
 
2911
A callback function used by the type system to finalize an interface.
 
2912
This function should destroy any internal data and release any resources
 
2913
allocated by the corresponding <a href="gobject-Type-Information.html#GInterfaceInitFunc"><code class="function">GInterfaceInitFunc()</code></a> function.
 
2914
</p>
 
2915
<div class="variablelist"><table border="0">
 
2916
<col align="left" valign="top">
 
2917
<tbody>
 
2918
<tr>
 
2919
<td><span class="term"><em class="parameter"><code>g_iface</code></em>&#160;:</span></td>
 
2920
<td>    The interface structure to finalize.
 
2921
</td>
 
2922
</tr>
 
2923
<tr>
 
2924
<td><span class="term"><em class="parameter"><code>iface_data</code></em>&#160;:</span></td>
 
2925
<td>    The <em class="parameter"><code>class_data</code></em> supplied via the <a href="gobject-Type-Information.html#GTypeInfo"><span class="type">GTypeInfo</span></a> structure.
 
2926
 
 
2927
 
 
2928
</td>
 
2929
</tr>
 
2930
</tbody>
 
2931
</table></div>
 
2932
</div>
 
2933
<hr>
 
2934
<div class="refsect2" lang="en">
 
2935
<a name="id3032291"></a><h3>
 
2936
<a name="GTypeClassCacheFunc"></a>GTypeClassCacheFunc ()</h3>
 
2937
<a class="indexterm" name="id3032304"></a><pre class="programlisting"><a
 
2938
href="../glib/glib-Basic-Types.html#gboolean"
 
2939
>gboolean</a>            (*GTypeClassCacheFunc)              (<a
 
2940
href="../glib/glib-Basic-Types.html#gpointer"
 
2941
>gpointer</a> cache_data,
 
2942
                                                         <a href="gobject-Type-Information.html#GTypeClass">GTypeClass</a> *g_class);</pre>
 
2943
<p>
 
2944
A callback function which is called when the reference count of a class 
 
2945
drops to zero. It may use <a href="gobject-Type-Information.html#g-type-class-ref"><code class="function">g_type_class_ref()</code></a> to prevent the class from
 
2946
being freed. You should not call <a href="gobject-Type-Information.html#g-type-class-unref"><code class="function">g_type_class_unref()</code></a> from a 
 
2947
<a href="gobject-Type-Information.html#GTypeClassCacheFunc"><span class="type">GTypeClassCacheFunc</span></a> function to prevent infinite recursion, use 
 
2948
<a href="gobject-Type-Information.html#g-type-class-unref-uncached"><code class="function">g_type_class_unref_uncached()</code></a> instead.
 
2949
</p>
 
2950
<p>
 
2951
The functions have to check the class id passed in to figure 
 
2952
whether they actually want to cache the class of this type, since all
 
2953
classes are routed through the same <a href="gobject-Type-Information.html#GTypeClassCacheFunc"><span class="type">GTypeClassCacheFunc</span></a> chain.
 
2954
</p>
 
2955
<div class="variablelist"><table border="0">
 
2956
<col align="left" valign="top">
 
2957
<tbody>
 
2958
<tr>
 
2959
<td><span class="term"><em class="parameter"><code>cache_data</code></em>&#160;:</span></td>
 
2960
<td>data that was given to the <a href="gobject-Type-Information.html#g-type-add-class-cache-func"><code class="function">g_type_add_class_cache_func()</code></a> call
 
2961
</td>
 
2962
</tr>
 
2963
<tr>
 
2964
<td><span class="term"><em class="parameter"><code>g_class</code></em>&#160;:</span></td>
 
2965
<td>The <a href="gobject-Type-Information.html#GTypeClass"><span class="type">GTypeClass</span></a> structure which is unreferenced
 
2966
</td>
 
2967
</tr>
 
2968
<tr>
 
2969
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 
2970
<td>
 
2971
<a
 
2972
href="../glib/glib-Standard-Macros.html#TRUE:CAPS"
 
2973
><code class="literal">TRUE</code></a> to stop further <a href="gobject-Type-Information.html#GTypeClassCacheFunc"><span class="type">GTypeClassCacheFunc</span></a>s from being 
 
2974
called, <a
 
2975
href="../glib/glib-Standard-Macros.html#FALSE:CAPS"
 
2976
><code class="literal">FALSE</code></a> to continue.
 
2977
 
 
2978
 
 
2979
</td>
 
2980
</tr>
 
2981
</tbody>
 
2982
</table></div>
 
2983
</div>
 
2984
<hr>
 
2985
<div class="refsect2" lang="en">
 
2986
<a name="id3032490"></a><h3>
 
2987
<a name="GTypeFlags"></a>enum GTypeFlags</h3>
 
2988
<a class="indexterm" name="id3032502"></a><pre class="programlisting">typedef enum    /*&lt; skip &gt;*/
 
2989
{
 
2990
  G_TYPE_FLAG_ABSTRACT          = (1 &lt;&lt; 4),
 
2991
  G_TYPE_FLAG_VALUE_ABSTRACT    = (1 &lt;&lt; 5)
 
2992
} GTypeFlags;
 
2993
</pre>
 
2994
<p>
 
2995
Bit masks used to check or determine characteristics of a type.
 
2996
</p>
 
2997
<div class="variablelist"><table border="0">
 
2998
<col align="left" valign="top">
 
2999
<tbody>
 
3000
<tr>
 
3001
<td><span class="term"><a name="G-TYPE-FLAG-ABSTRACT:CAPS"></a><code class="literal">G_TYPE_FLAG_ABSTRACT</code></span></td>
 
3002
<td>    Indicates an abstract type. No instances can be
 
3003
                        created for an abstract type.
 
3004
</td>
 
3005
</tr>
 
3006
<tr>
 
3007
<td><span class="term"><a name="G-TYPE-FLAG-VALUE-ABSTRACT:CAPS"></a><code class="literal">G_TYPE_FLAG_VALUE_ABSTRACT</code></span></td>
 
3008
<td>Indicates an abstract value type, i.e. a type
 
3009
                        that introduces a value table, but can't be used for
 
3010
                        <a href="gobject-Generic-values.html#g-value-init"><code class="function">g_value_init()</code></a>.
 
3011
 
 
3012
</td>
 
3013
</tr>
 
3014
</tbody>
 
3015
</table></div>
 
3016
</div>
 
3017
<hr>
 
3018
<div class="refsect2" lang="en">
 
3019
<a name="id3032585"></a><h3>
 
3020
<a name="GTypeFundamentalFlags"></a>enum GTypeFundamentalFlags</h3>
 
3021
<a class="indexterm" name="id3032598"></a><pre class="programlisting">typedef enum    /*&lt; skip &gt;*/
 
3022
{
 
3023
  G_TYPE_FLAG_CLASSED           = (1 &lt;&lt; 0),
 
3024
  G_TYPE_FLAG_INSTANTIATABLE    = (1 &lt;&lt; 1),
 
3025
  G_TYPE_FLAG_DERIVABLE         = (1 &lt;&lt; 2),
 
3026
  G_TYPE_FLAG_DEEP_DERIVABLE    = (1 &lt;&lt; 3)
 
3027
} GTypeFundamentalFlags;
 
3028
</pre>
 
3029
<p>
 
3030
Bit masks used to check or determine specific characteristics of a
 
3031
fundamental type.
 
3032
</p>
 
3033
<div class="variablelist"><table border="0">
 
3034
<col align="left" valign="top">
 
3035
<tbody>
 
3036
<tr>
 
3037
<td><span class="term"><a name="G-TYPE-FLAG-CLASSED:CAPS"></a><code class="literal">G_TYPE_FLAG_CLASSED</code></span></td>
 
3038
<td>            Indicates a classed type.
 
3039
</td>
 
3040
</tr>
 
3041
<tr>
 
3042
<td><span class="term"><a name="G-TYPE-FLAG-INSTANTIATABLE:CAPS"></a><code class="literal">G_TYPE_FLAG_INSTANTIATABLE</code></span></td>
 
3043
<td>    Indicates an instantiable type (implies classed).
 
3044
</td>
 
3045
</tr>
 
3046
<tr>
 
3047
<td><span class="term"><a name="G-TYPE-FLAG-DERIVABLE:CAPS"></a><code class="literal">G_TYPE_FLAG_DERIVABLE</code></span></td>
 
3048
<td>    Indicates a flat derivable type.
 
3049
</td>
 
3050
</tr>
 
3051
<tr>
 
3052
<td><span class="term"><a name="G-TYPE-FLAG-DEEP-DERIVABLE:CAPS"></a><code class="literal">G_TYPE_FLAG_DEEP_DERIVABLE</code></span></td>
 
3053
<td>    Indicates a deep derivable type (implies derivable).
 
3054
 
 
3055
</td>
 
3056
</tr>
 
3057
</tbody>
 
3058
</table></div>
 
3059
</div>
 
3060
<hr>
 
3061
<div class="refsect2" lang="en">
 
3062
<a name="id3032717"></a><h3>
 
3063
<a name="g-type-register-static"></a>g_type_register_static ()</h3>
 
3064
<a class="indexterm" name="id3032730"></a><pre class="programlisting"><a href="gobject-Type-Information.html#GType">GType</a>               g_type_register_static              (<a href="gobject-Type-Information.html#GType">GType</a> parent_type,
 
3065
                                                         const <a
 
3066
href="../glib/glib-Basic-Types.html#gchar"
 
3067
>gchar</a> *type_name,
 
3068
                                                         const <a href="gobject-Type-Information.html#GTypeInfo">GTypeInfo</a> *info,
 
3069
                                                         <a href="gobject-Type-Information.html#GTypeFlags">GTypeFlags</a> flags);</pre>
 
3070
<p>
 
3071
Registers <em class="parameter"><code>type_name</code></em> as the name of a new static type derived from
 
3072
<em class="parameter"><code>parent_type</code></em>.  The type system uses the information contained in the
 
3073
<a href="gobject-Type-Information.html#GTypeInfo"><span class="type">GTypeInfo</span></a> structure pointed to by <em class="parameter"><code>info</code></em> to manage the type and its
 
3074
instances (if not abstract).  The value of <em class="parameter"><code>flags</code></em> determines the nature
 
3075
(e.g. abstract or not) of the type.
 
3076
</p>
 
3077
<div class="variablelist"><table border="0">
 
3078
<col align="left" valign="top">
 
3079
<tbody>
 
3080
<tr>
 
3081
<td><span class="term"><em class="parameter"><code>parent_type</code></em>&#160;:</span></td>
 
3082
<td>    Type from which this type will be derived.
 
3083
</td>
 
3084
</tr>
 
3085
<tr>
 
3086
<td><span class="term"><em class="parameter"><code>type_name</code></em>&#160;:</span></td>
 
3087
<td>    0-terminated string used as the name of the new type.
 
3088
</td>
 
3089
</tr>
 
3090
<tr>
 
3091
<td><span class="term"><em class="parameter"><code>info</code></em>&#160;:</span></td>
 
3092
<td>            The <a href="gobject-Type-Information.html#GTypeInfo"><span class="type">GTypeInfo</span></a> structure for this type.
 
3093
</td>
 
3094
</tr>
 
3095
<tr>
 
3096
<td><span class="term"><em class="parameter"><code>flags</code></em>&#160;:</span></td>
 
3097
<td>            Bitwise combination of <a href="gobject-Type-Information.html#GTypeFlags"><span class="type">GTypeFlags</span></a> values.
 
3098
</td>
 
3099
</tr>
 
3100
<tr>
 
3101
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 
3102
<td>    The new type identifier.
 
3103
 
 
3104
 
 
3105
</td>
 
3106
</tr>
 
3107
</tbody>
 
3108
</table></div>
 
3109
</div>
 
3110
<hr>
 
3111
<div class="refsect2" lang="en">
 
3112
<a name="id3032906"></a><h3>
 
3113
<a name="g-type-register-static-simple"></a>g_type_register_static_simple ()</h3>
 
3114
<a class="indexterm" name="id3032922"></a><pre class="programlisting"><a href="gobject-Type-Information.html#GType">GType</a>               g_type_register_static_simple       (<a href="gobject-Type-Information.html#GType">GType</a> parent_type,
 
3115
                                                         const <a
 
3116
href="../glib/glib-Basic-Types.html#gchar"
 
3117
>gchar</a> *type_name,
 
3118
                                                         <a
 
3119
href="../glib/glib-Basic-Types.html#guint"
 
3120
>guint</a> class_size,
 
3121
                                                         <a href="gobject-Type-Information.html#GClassInitFunc">GClassInitFunc</a> class_init,
 
3122
                                                         <a
 
3123
href="../glib/glib-Basic-Types.html#guint"
 
3124
>guint</a> instance_size,
 
3125
                                                         <a href="gobject-Type-Information.html#GInstanceInitFunc">GInstanceInitFunc</a> instance_init,
 
3126
                                                         <a href="gobject-Type-Information.html#GTypeFlags">GTypeFlags</a> flags);</pre>
 
3127
<p>
 
3128
Registers <em class="parameter"><code>type_name</code></em> as the name of a new static type derived from
 
3129
<em class="parameter"><code>parent_type</code></em>.  The value of <em class="parameter"><code>flags</code></em> determines the nature (e.g. 
 
3130
abstract or not) of the type. It works by filling a <a href="gobject-Type-Information.html#GTypeInfo"><span class="type">GTypeInfo</span></a> 
 
3131
struct and calling <code class="function">g_type_info_register_static()</code>.
 
3132
</p>
 
3133
<div class="variablelist"><table border="0">
 
3134
<col align="left" valign="top">
 
3135
<tbody>
 
3136
<tr>
 
3137
<td><span class="term"><em class="parameter"><code>parent_type</code></em>&#160;:</span></td>
 
3138
<td>    Type from which this type will be derived.
 
3139
</td>
 
3140
</tr>
 
3141
<tr>
 
3142
<td><span class="term"><em class="parameter"><code>type_name</code></em>&#160;:</span></td>
 
3143
<td>    0-terminated string used as the name of the new type.
 
3144
</td>
 
3145
</tr>
 
3146
<tr>
 
3147
<td><span class="term"><em class="parameter"><code>class_size</code></em>&#160;:</span></td>
 
3148
<td>   Size of the class structure (see <a href="gobject-Type-Information.html#GTypeInfo"><span class="type">GTypeInfo</span></a>)
 
3149
</td>
 
3150
</tr>
 
3151
<tr>
 
3152
<td><span class="term"><em class="parameter"><code>class_init</code></em>&#160;:</span></td>
 
3153
<td>    Location of the class initialization function (see <a href="gobject-Type-Information.html#GTypeInfo"><span class="type">GTypeInfo</span></a>)
 
3154
</td>
 
3155
</tr>
 
3156
<tr>
 
3157
<td><span class="term"><em class="parameter"><code>instance_size</code></em>&#160;:</span></td>
 
3158
<td>Size of the instance structure (see <a href="gobject-Type-Information.html#GTypeInfo"><span class="type">GTypeInfo</span></a>)
 
3159
</td>
 
3160
</tr>
 
3161
<tr>
 
3162
<td><span class="term"><em class="parameter"><code>instance_init</code></em>&#160;:</span></td>
 
3163
<td>Location of the instance initialization function (see <a href="gobject-Type-Information.html#GTypeInfo"><span class="type">GTypeInfo</span></a>)
 
3164
</td>
 
3165
</tr>
 
3166
<tr>
 
3167
<td><span class="term"><em class="parameter"><code>flags</code></em>&#160;:</span></td>
 
3168
<td>    Bitwise combination of <a href="gobject-Type-Information.html#GTypeFlags"><span class="type">GTypeFlags</span></a> values.
 
3169
</td>
 
3170
</tr>
 
3171
<tr>
 
3172
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 
3173
<td>    The new type identifier.
 
3174
</td>
 
3175
</tr>
 
3176
</tbody>
 
3177
</table></div>
 
3178
<p class="since">Since         2.12
 
3179
 
 
3180
 
 
3181
</p>
 
3182
</div>
 
3183
<hr>
 
3184
<div class="refsect2" lang="en">
 
3185
<a name="id3033202"></a><h3>
 
3186
<a name="g-type-register-dynamic"></a>g_type_register_dynamic ()</h3>
 
3187
<a class="indexterm" name="id3033215"></a><pre class="programlisting"><a href="gobject-Type-Information.html#GType">GType</a>               g_type_register_dynamic             (<a href="gobject-Type-Information.html#GType">GType</a> parent_type,
 
3188
                                                         const <a
 
3189
href="../glib/glib-Basic-Types.html#gchar"
 
3190
>gchar</a> *type_name,
 
3191
                                                         <a href="GTypePlugin.html" title="GTypePlugin">GTypePlugin</a> *plugin,
 
3192
                                                         <a href="gobject-Type-Information.html#GTypeFlags">GTypeFlags</a> flags);</pre>
 
3193
<p>
 
3194
Registers <em class="parameter"><code>type_name</code></em> as the name of a new dynamic type derived from
 
3195
<em class="parameter"><code>parent_type</code></em>.  The type system uses the information contained in the
 
3196
<a href="GTypePlugin.html" title="GTypePlugin"><span class="type">GTypePlugin</span></a> structure pointed to by <em class="parameter"><code>plugin</code></em> to manage the type and its
 
3197
instances (if not abstract).  The value of <em class="parameter"><code>flags</code></em> determines the nature
 
3198
(e.g. abstract or not) of the type.
 
3199
</p>
 
3200
<div class="variablelist"><table border="0">
 
3201
<col align="left" valign="top">
 
3202
<tbody>
 
3203
<tr>
 
3204
<td><span class="term"><em class="parameter"><code>parent_type</code></em>&#160;:</span></td>
 
3205
<td>    Type from which this type will be derived.
 
3206
</td>
 
3207
</tr>
 
3208
<tr>
 
3209
<td><span class="term"><em class="parameter"><code>type_name</code></em>&#160;:</span></td>
 
3210
<td>    0-terminated string used as the name of the new type.
 
3211
</td>
 
3212
</tr>
 
3213
<tr>
 
3214
<td><span class="term"><em class="parameter"><code>plugin</code></em>&#160;:</span></td>
 
3215
<td>    The <a href="GTypePlugin.html" title="GTypePlugin"><span class="type">GTypePlugin</span></a> structure to retrieve the <a href="gobject-Type-Information.html#GTypeInfo"><span class="type">GTypeInfo</span></a> from.
 
3216
</td>
 
3217
</tr>
 
3218
<tr>
 
3219
<td><span class="term"><em class="parameter"><code>flags</code></em>&#160;:</span></td>
 
3220
<td>            Bitwise combination of <a href="gobject-Type-Information.html#GTypeFlags"><span class="type">GTypeFlags</span></a> values.
 
3221
</td>
 
3222
</tr>
 
3223
<tr>
 
3224
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 
3225
<td>    The new type identifier or <a href="gobject-Type-Information.html#G-TYPE-INVALID:CAPS"><span class="type">G_TYPE_INVALID</span></a> if registration failed.
 
3226
 
 
3227
 
 
3228
</td>
 
3229
</tr>
 
3230
</tbody>
 
3231
</table></div>
 
3232
</div>
 
3233
<hr>
 
3234
<div class="refsect2" lang="en">
 
3235
<a name="id3033408"></a><h3>
 
3236
<a name="g-type-register-fundamental"></a>g_type_register_fundamental ()</h3>
 
3237
<a class="indexterm" name="id3033422"></a><pre class="programlisting"><a href="gobject-Type-Information.html#GType">GType</a>               g_type_register_fundamental         (<a href="gobject-Type-Information.html#GType">GType</a> type_id,
 
3238
                                                         const <a
 
3239
href="../glib/glib-Basic-Types.html#gchar"
 
3240
>gchar</a> *type_name,
 
3241
                                                         const <a href="gobject-Type-Information.html#GTypeInfo">GTypeInfo</a> *info,
 
3242
                                                         const <a href="gobject-Type-Information.html#GTypeFundamentalInfo">GTypeFundamentalInfo</a> *finfo,
 
3243
                                                         <a href="gobject-Type-Information.html#GTypeFlags">GTypeFlags</a> flags);</pre>
 
3244
<p>
 
3245
Registers <em class="parameter"><code>type_id</code></em> as the predefined identifier and <em class="parameter"><code>type_name</code></em> as the
 
3246
name of a fundamental type.  The type system uses the information
 
3247
contained in the <a href="gobject-Type-Information.html#GTypeInfo"><span class="type">GTypeInfo</span></a> structure pointed to by <em class="parameter"><code>info</code></em> and the 
 
3248
<a href="gobject-Type-Information.html#GTypeFundamentalInfo"><span class="type">GTypeFundamentalInfo</span></a> structure pointed to by <em class="parameter"><code>finfo</code></em> to manage the
 
3249
type and its instances.  The value of <em class="parameter"><code>flags</code></em> determines additional
 
3250
characteristics of the fundamental type.
 
3251
</p>
 
3252
<div class="variablelist"><table border="0">
 
3253
<col align="left" valign="top">
 
3254
<tbody>
 
3255
<tr>
 
3256
<td><span class="term"><em class="parameter"><code>type_id</code></em>&#160;:</span></td>
 
3257
<td>    A predefined <span class="type">GTypeFundamentals</span> value.
 
3258
</td>
 
3259
</tr>
 
3260
<tr>
 
3261
<td><span class="term"><em class="parameter"><code>type_name</code></em>&#160;:</span></td>
 
3262
<td>    0-terminated string used as the name of the new type.
 
3263
</td>
 
3264
</tr>
 
3265
<tr>
 
3266
<td><span class="term"><em class="parameter"><code>info</code></em>&#160;:</span></td>
 
3267
<td>            The <a href="gobject-Type-Information.html#GTypeInfo"><span class="type">GTypeInfo</span></a> structure for this type.
 
3268
</td>
 
3269
</tr>
 
3270
<tr>
 
3271
<td><span class="term"><em class="parameter"><code>finfo</code></em>&#160;:</span></td>
 
3272
<td>            The <a href="gobject-Type-Information.html#GTypeFundamentalInfo"><span class="type">GTypeFundamentalInfo</span></a> structure for this type.
 
3273
</td>
 
3274
</tr>
 
3275
<tr>
 
3276
<td><span class="term"><em class="parameter"><code>flags</code></em>&#160;:</span></td>
 
3277
<td>            Bitwise combination of <a href="gobject-Type-Information.html#GTypeFlags"><span class="type">GTypeFlags</span></a> values.
 
3278
</td>
 
3279
</tr>
 
3280
<tr>
 
3281
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 
3282
<td>    The predefined type identifier.
 
3283
 
 
3284
 
 
3285
</td>
 
3286
</tr>
 
3287
</tbody>
 
3288
</table></div>
 
3289
</div>
 
3290
<hr>
 
3291
<div class="refsect2" lang="en">
 
3292
<a name="id3033653"></a><h3>
 
3293
<a name="g-type-add-interface-static"></a>g_type_add_interface_static ()</h3>
 
3294
<a class="indexterm" name="id3033667"></a><pre class="programlisting">void                g_type_add_interface_static         (<a href="gobject-Type-Information.html#GType">GType</a> instance_type,
 
3295
                                                         <a href="gobject-Type-Information.html#GType">GType</a> interface_type,
 
3296
                                                         const <a href="gobject-Type-Information.html#GInterfaceInfo">GInterfaceInfo</a> *info);</pre>
 
3297
<p>
 
3298
Adds the static <em class="parameter"><code>interface_type</code></em> to <em class="parameter"><code>instantiable_type</code></em>.  The information
 
3299
contained in the <span class="type">GTypeInterfaceInfo</span> structure pointed to by <em class="parameter"><code>info</code></em>
 
3300
is used to manage the relationship.
 
3301
</p>
 
3302
<div class="variablelist"><table border="0">
 
3303
<col align="left" valign="top">
 
3304
<tbody>
 
3305
<tr>
 
3306
<td><span class="term"><em class="parameter"><code>instance_type</code></em>&#160;:</span></td>
 
3307
<td>     <a href="gobject-Type-Information.html#GType"><span class="type">GType</span></a> value of an instantiable type.
 
3308
</td>
 
3309
</tr>
 
3310
<tr>
 
3311
<td><span class="term"><em class="parameter"><code>interface_type</code></em>&#160;:</span></td>
 
3312
<td>
 
3313
<a href="gobject-Type-Information.html#GType"><span class="type">GType</span></a> value of an interface type.
 
3314
</td>
 
3315
</tr>
 
3316
<tr>
 
3317
<td><span class="term"><em class="parameter"><code>info</code></em>&#160;:</span></td>
 
3318
<td>             The <a href="gobject-Type-Information.html#GInterfaceInfo"><span class="type">GInterfaceInfo</span></a> structure for this
 
3319
                 (<em class="parameter"><code>instance_type</code></em>, <em class="parameter"><code>interface_type</code></em>) combination.
 
3320
 
 
3321
 
 
3322
</td>
 
3323
</tr>
 
3324
</tbody>
 
3325
</table></div>
 
3326
</div>
 
3327
<hr>
 
3328
<div class="refsect2" lang="en">
 
3329
<a name="id3033822"></a><h3>
 
3330
<a name="g-type-add-interface-dynamic"></a>g_type_add_interface_dynamic ()</h3>
 
3331
<a class="indexterm" name="id3033836"></a><pre class="programlisting">void                g_type_add_interface_dynamic        (<a href="gobject-Type-Information.html#GType">GType</a> instance_type,
 
3332
                                                         <a href="gobject-Type-Information.html#GType">GType</a> interface_type,
 
3333
                                                         <a href="GTypePlugin.html" title="GTypePlugin">GTypePlugin</a> *plugin);</pre>
 
3334
<p>
 
3335
Adds the dynamic <em class="parameter"><code>interface_type</code></em> to <em class="parameter"><code>instantiable_type</code></em>. The information
 
3336
contained in the <a href="GTypePlugin.html" title="GTypePlugin"><span class="type">GTypePlugin</span></a> structure pointed to by <em class="parameter"><code>plugin</code></em>
 
3337
is used to manage the relationship.
 
3338
</p>
 
3339
<div class="variablelist"><table border="0">
 
3340
<col align="left" valign="top">
 
3341
<tbody>
 
3342
<tr>
 
3343
<td><span class="term"><em class="parameter"><code>instance_type</code></em>&#160;:</span></td>
 
3344
<td>the <a href="gobject-Type-Information.html#GType"><span class="type">GType</span></a> value of an instantiable type.
 
3345
</td>
 
3346
</tr>
 
3347
<tr>
 
3348
<td><span class="term"><em class="parameter"><code>interface_type</code></em>&#160;:</span></td>
 
3349
<td>the <a href="gobject-Type-Information.html#GType"><span class="type">GType</span></a> value of an interface type.
 
3350
</td>
 
3351
</tr>
 
3352
<tr>
 
3353
<td><span class="term"><em class="parameter"><code>plugin</code></em>&#160;:</span></td>
 
3354
<td>the <a href="GTypePlugin.html" title="GTypePlugin"><span class="type">GTypePlugin</span></a> structure to retrieve the <a href="gobject-Type-Information.html#GInterfaceInfo"><span class="type">GInterfaceInfo</span></a> from.
 
3355
 
 
3356
 
 
3357
</td>
 
3358
</tr>
 
3359
</tbody>
 
3360
</table></div>
 
3361
</div>
 
3362
<hr>
 
3363
<div class="refsect2" lang="en">
 
3364
<a name="id3033988"></a><h3>
 
3365
<a name="g-type-interface-add-prerequisite"></a>g_type_interface_add_prerequisite ()</h3>
 
3366
<a class="indexterm" name="id3034002"></a><pre class="programlisting">void                g_type_interface_add_prerequisite   (<a href="gobject-Type-Information.html#GType">GType</a> interface_type,
 
3367
                                                         <a href="gobject-Type-Information.html#GType">GType</a> prerequisite_type);</pre>
 
3368
<p>
 
3369
Adds <em class="parameter"><code>prerequisite_type</code></em> to the list of prerequisites of <em class="parameter"><code>interface_type</code></em>.
 
3370
This means that any type implementing <em class="parameter"><code>interface_type</code></em> must also implement
 
3371
<em class="parameter"><code>prerequisite_type</code></em>. Prerequisites can be thought of as an alternative to
 
3372
interface derivation (which GType doesn't support). An interface can have
 
3373
at most one instantiatable prerequisite type.
 
3374
</p>
 
3375
<div class="variablelist"><table border="0">
 
3376
<col align="left" valign="top">
 
3377
<tbody>
 
3378
<tr>
 
3379
<td><span class="term"><em class="parameter"><code>interface_type</code></em>&#160;:</span></td>
 
3380
<td>
 
3381
<a href="gobject-Type-Information.html#GType"><span class="type">GType</span></a> value of an interface type.
 
3382
</td>
 
3383
</tr>
 
3384
<tr>
 
3385
<td><span class="term"><em class="parameter"><code>prerequisite_type</code></em>&#160;:</span></td>
 
3386
<td>
 
3387
<a href="gobject-Type-Information.html#GType"><span class="type">GType</span></a> value of an interface or instantiatable type.
 
3388
 
 
3389
 
 
3390
</td>
 
3391
</tr>
 
3392
</tbody>
 
3393
</table></div>
 
3394
</div>
 
3395
<hr>
 
3396
<div class="refsect2" lang="en">
 
3397
<a name="id3034113"></a><h3>
 
3398
<a name="g-type-get-plugin"></a>g_type_get_plugin ()</h3>
 
3399
<a class="indexterm" name="id3034127"></a><pre class="programlisting"><a href="GTypePlugin.html" title="GTypePlugin">GTypePlugin</a>*        g_type_get_plugin                   (<a href="gobject-Type-Information.html#GType">GType</a> type);</pre>
 
3400
<p>
 
3401
Returns the <a href="GTypePlugin.html" title="GTypePlugin"><span class="type">GTypePlugin</span></a> structure for <em class="parameter"><code>type</code></em> or
 
3402
<a
 
3403
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
 
3404
><code class="literal">NULL</code></a> if <em class="parameter"><code>type</code></em> does not have a <a href="GTypePlugin.html" title="GTypePlugin"><span class="type">GTypePlugin</span></a> structure.
 
3405
</p>
 
3406
<div class="variablelist"><table border="0">
 
3407
<col align="left" valign="top">
 
3408
<tbody>
 
3409
<tr>
 
3410
<td><span class="term"><em class="parameter"><code>type</code></em>&#160;:</span></td>
 
3411
<td>            The <a href="gobject-Type-Information.html#GType"><span class="type">GType</span></a> to retrieve the plugin for.
 
3412
</td>
 
3413
</tr>
 
3414
<tr>
 
3415
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 
3416
<td>    The corresponding plugin if <em class="parameter"><code>type</code></em> is a dynamic type,
 
3417
                <a
 
3418
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
 
3419
><code class="literal">NULL</code></a> otherwise.
 
3420
 
 
3421
 
 
3422
</td>
 
3423
</tr>
 
3424
</tbody>
 
3425
</table></div>
 
3426
</div>
 
3427
<hr>
 
3428
<div class="refsect2" lang="en">
 
3429
<a name="id3034248"></a><h3>
 
3430
<a name="g-type-interface-get-plugin"></a>g_type_interface_get_plugin ()</h3>
 
3431
<a class="indexterm" name="id3034261"></a><pre class="programlisting"><a href="GTypePlugin.html" title="GTypePlugin">GTypePlugin</a>*        g_type_interface_get_plugin         (<a href="gobject-Type-Information.html#GType">GType</a> instance_type,
 
3432
                                                         <a href="gobject-Type-Information.html#GType">GType</a> interface_type);</pre>
 
3433
<p>
 
3434
Returns the <a href="GTypePlugin.html" title="GTypePlugin"><span class="type">GTypePlugin</span></a> structure for the dynamic interface 
 
3435
<em class="parameter"><code>interface_type</code></em> which has been added to <em class="parameter"><code>instance_type</code></em>, or 
 
3436
<a
 
3437
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
 
3438
><code class="literal">NULL</code></a> if <em class="parameter"><code>interface_type</code></em> has not been added to <em class="parameter"><code>instance_type</code></em> or does 
 
3439
not have a <a href="GTypePlugin.html" title="GTypePlugin"><span class="type">GTypePlugin</span></a> structure. See <a href="gobject-Type-Information.html#g-type-add-interface-dynamic"><code class="function">g_type_add_interface_dynamic()</code></a>.
 
3440
</p>
 
3441
<div class="variablelist"><table border="0">
 
3442
<col align="left" valign="top">
 
3443
<tbody>
 
3444
<tr>
 
3445
<td><span class="term"><em class="parameter"><code>instance_type</code></em>&#160;:</span></td>
 
3446
<td>the <a href="gobject-Type-Information.html#GType"><span class="type">GType</span></a> value of an instantiatable type.
 
3447
</td>
 
3448
</tr>
 
3449
<tr>
 
3450
<td><span class="term"><em class="parameter"><code>interface_type</code></em>&#160;:</span></td>
 
3451
<td>the <a href="gobject-Type-Information.html#GType"><span class="type">GType</span></a> value of an interface type.
 
3452
</td>
 
3453
</tr>
 
3454
<tr>
 
3455
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 
3456
<td>the <a href="GTypePlugin.html" title="GTypePlugin"><span class="type">GTypePlugin</span></a> for the dynamic interface <em class="parameter"><code>interface_type</code></em>
 
3457
   of <em class="parameter"><code>instance_type</code></em>.
 
3458
 
 
3459
 
 
3460
</td>
 
3461
</tr>
 
3462
</tbody>
 
3463
</table></div>
 
3464
</div>
 
3465
<hr>
 
3466
<div class="refsect2" lang="en">
 
3467
<a name="id3034441"></a><h3>
 
3468
<a name="g-type-fundamental-next"></a>g_type_fundamental_next ()</h3>
 
3469
<a class="indexterm" name="id3034454"></a><pre class="programlisting"><a href="gobject-Type-Information.html#GType">GType</a>               g_type_fundamental_next             (void);</pre>
 
3470
<p>
 
3471
Returns the next free fundamental type id which can be used to
 
3472
register a new fundamental type with <a href="gobject-Type-Information.html#g-type-register-fundamental"><code class="function">g_type_register_fundamental()</code></a>.
 
3473
The returned type ID represents the highest currently registered
 
3474
fundamental type identifier.
 
3475
 
 
3476
</p>
 
3477
<div class="variablelist"><table border="0">
 
3478
<col align="left" valign="top">
 
3479
<tbody><tr>
 
3480
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 
3481
<td>The nextmost fundamental type ID to be registered,
 
3482
          or 0 if the type system ran out of fundamental type IDs.
 
3483
 
 
3484
 
 
3485
</td>
 
3486
</tr></tbody>
 
3487
</table></div>
 
3488
</div>
 
3489
<hr>
 
3490
<div class="refsect2" lang="en">
 
3491
<a name="id3034507"></a><h3>
 
3492
<a name="g-type-fundamental"></a>g_type_fundamental ()</h3>
 
3493
<a class="indexterm" name="id3034520"></a><pre class="programlisting"><a href="gobject-Type-Information.html#GType">GType</a>               g_type_fundamental                  (<a href="gobject-Type-Information.html#GType">GType</a> type_id);</pre>
 
3494
<p>
 
3495
Internal function, used to extract the fundamental type ID portion.
 
3496
use <a href="gobject-Type-Information.html#G-TYPE-FUNDAMENTAL:CAPS"><code class="function">G_TYPE_FUNDAMENTAL()</code></a> instead.
 
3497
</p>
 
3498
<div class="variablelist"><table border="0">
 
3499
<col align="left" valign="top">
 
3500
<tbody>
 
3501
<tr>
 
3502
<td><span class="term"><em class="parameter"><code>type_id</code></em>&#160;:</span></td>
 
3503
<td>valid type ID
 
3504
</td>
 
3505
</tr>
 
3506
<tr>
 
3507
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 
3508
<td>fundamental type ID
 
3509
 
 
3510
 
 
3511
</td>
 
3512
</tr>
 
3513
</tbody>
 
3514
</table></div>
 
3515
</div>
 
3516
<hr>
 
3517
<div class="refsect2" lang="en">
 
3518
<a name="id3034589"></a><h3>
 
3519
<a name="g-type-create-instance"></a>g_type_create_instance ()</h3>
 
3520
<a class="indexterm" name="id3034602"></a><pre class="programlisting"><a href="gobject-Type-Information.html#GTypeInstance">GTypeInstance</a>*      g_type_create_instance              (<a href="gobject-Type-Information.html#GType">GType</a> type);</pre>
 
3521
<p>
 
3522
Creates and initializes an instance of <em class="parameter"><code>type</code></em> if <em class="parameter"><code>type</code></em> is valid and can
 
3523
be instantiated. The type system only performs basic allocation and
 
3524
structure setups for instances: actual instance creation should happen
 
3525
through functions supplied by the type's fundamental type implementation.
 
3526
So use of <a href="gobject-Type-Information.html#g-type-create-instance"><code class="function">g_type_create_instance()</code></a> is reserved for implementators of
 
3527
fundamental types only. E.g. instances of the <a href="gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> hierarchy
 
3528
should be created via <a href="gobject-The-Base-Object-Type.html#g-object-new"><code class="function">g_object_new()</code></a> and <span class="emphasis"><em>never</em></span>
 
3529
directly through <a href="gobject-Type-Information.html#g-type-create-instance"><code class="function">g_type_create_instance()</code></a> which doesn't handle
 
3530
things like singleton objects or object construction.
 
3531
Note: Do <span class="emphasis"><em>not</em></span> use this function, unless you're
 
3532
implementing a fundamental type. Also language bindings should <span class="emphasis"><em>not</em></span>
 
3533
use this function but <a href="gobject-The-Base-Object-Type.html#g-object-new"><code class="function">g_object_new()</code></a> instead.
 
3534
</p>
 
3535
<div class="variablelist"><table border="0">
 
3536
<col align="left" valign="top">
 
3537
<tbody>
 
3538
<tr>
 
3539
<td><span class="term"><em class="parameter"><code>type</code></em>&#160;:</span></td>
 
3540
<td>      An instantiatable type to create an instance for.
 
3541
</td>
 
3542
</tr>
 
3543
<tr>
 
3544
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 
3545
<td>An allocated and initialized instance, subject to further
 
3546
          treatment by the fundamental type implementation.
 
3547
 
 
3548
 
 
3549
</td>
 
3550
</tr>
 
3551
</tbody>
 
3552
</table></div>
 
3553
</div>
 
3554
<hr>
 
3555
<div class="refsect2" lang="en">
 
3556
<a name="id3034745"></a><h3>
 
3557
<a name="g-type-free-instance"></a>g_type_free_instance ()</h3>
 
3558
<a class="indexterm" name="id3034758"></a><pre class="programlisting">void                g_type_free_instance                (<a href="gobject-Type-Information.html#GTypeInstance">GTypeInstance</a> *instance);</pre>
 
3559
<p>
 
3560
Frees an instance of a type, returning it to the instance pool for the type,
 
3561
if there is one.
 
3562
</p>
 
3563
<p>
 
3564
Like <a href="gobject-Type-Information.html#g-type-create-instance"><code class="function">g_type_create_instance()</code></a>, this function is reserved for implementors of 
 
3565
fundamental types.
 
3566
</p>
 
3567
<div class="variablelist"><table border="0">
 
3568
<col align="left" valign="top">
 
3569
<tbody><tr>
 
3570
<td><span class="term"><em class="parameter"><code>instance</code></em>&#160;:</span></td>
 
3571
<td>an instance of a type.
 
3572
 
 
3573
 
 
3574
</td>
 
3575
</tr></tbody>
 
3576
</table></div>
 
3577
</div>
 
3578
<hr>
 
3579
<div class="refsect2" lang="en">
 
3580
<a name="id3034823"></a><h3>
 
3581
<a name="g-type-add-class-cache-func"></a>g_type_add_class_cache_func ()</h3>
 
3582
<a class="indexterm" name="id3034836"></a><pre class="programlisting">void                g_type_add_class_cache_func         (<a
 
3583
href="../glib/glib-Basic-Types.html#gpointer"
 
3584
>gpointer</a> cache_data,
 
3585
                                                         <a href="gobject-Type-Information.html#GTypeClassCacheFunc">GTypeClassCacheFunc</a> cache_func);</pre>
 
3586
<p>
 
3587
Adds a <a href="gobject-Type-Information.html#GTypeClassCacheFunc"><span class="type">GTypeClassCacheFunc</span></a> to be called before the reference count of a class 
 
3588
goes from one to zero. This can be used to prevent premature class destruction.
 
3589
All installed <a href="gobject-Type-Information.html#GTypeClassCacheFunc"><span class="type">GTypeClassCacheFunc</span></a> functions will be chained until one of them 
 
3590
returns <a
 
3591
href="../glib/glib-Standard-Macros.html#TRUE:CAPS"
 
3592
><code class="literal">TRUE</code></a>. The functions have to check the class id passed in to figure 
 
3593
whether they actually want to cache the class of this type, since all classes
 
3594
are routed through the same <a href="gobject-Type-Information.html#GTypeClassCacheFunc"><span class="type">GTypeClassCacheFunc</span></a> chain.
 
3595
</p>
 
3596
<div class="variablelist"><table border="0">
 
3597
<col align="left" valign="top">
 
3598
<tbody>
 
3599
<tr>
 
3600
<td><span class="term"><em class="parameter"><code>cache_data</code></em>&#160;:</span></td>
 
3601
<td>data to be passed to <em class="parameter"><code>cache_func</code></em>
 
3602
</td>
 
3603
</tr>
 
3604
<tr>
 
3605
<td><span class="term"><em class="parameter"><code>cache_func</code></em>&#160;:</span></td>
 
3606
<td>a <a href="gobject-Type-Information.html#GTypeClassCacheFunc"><span class="type">GTypeClassCacheFunc</span></a>
 
3607
 
 
3608
 
 
3609
</td>
 
3610
</tr>
 
3611
</tbody>
 
3612
</table></div>
 
3613
</div>
 
3614
<hr>
 
3615
<div class="refsect2" lang="en">
 
3616
<a name="id3034960"></a><h3>
 
3617
<a name="g-type-remove-class-cache-func"></a>g_type_remove_class_cache_func ()</h3>
 
3618
<a class="indexterm" name="id3034974"></a><pre class="programlisting">void                g_type_remove_class_cache_func      (<a
 
3619
href="../glib/glib-Basic-Types.html#gpointer"
 
3620
>gpointer</a> cache_data,
 
3621
                                                         <a href="gobject-Type-Information.html#GTypeClassCacheFunc">GTypeClassCacheFunc</a> cache_func);</pre>
 
3622
<p>
 
3623
Removes a previously installed <a href="gobject-Type-Information.html#GTypeClassCacheFunc"><span class="type">GTypeClassCacheFunc</span></a>. The cache maintained 
 
3624
by <em class="parameter"><code>cache_func</code></em> has to be empty when calling <a href="gobject-Type-Information.html#g-type-remove-class-cache-func"><code class="function">g_type_remove_class_cache_func()</code></a> 
 
3625
to avoid leaks.
 
3626
</p>
 
3627
<div class="variablelist"><table border="0">
 
3628
<col align="left" valign="top">
 
3629
<tbody>
 
3630
<tr>
 
3631
<td><span class="term"><em class="parameter"><code>cache_data</code></em>&#160;:</span></td>
 
3632
<td>data that was given when adding <em class="parameter"><code>cache_func</code></em>
 
3633
</td>
 
3634
</tr>
 
3635
<tr>
 
3636
<td><span class="term"><em class="parameter"><code>cache_func</code></em>&#160;:</span></td>
 
3637
<td>a <a href="gobject-Type-Information.html#GTypeClassCacheFunc"><span class="type">GTypeClassCacheFunc</span></a>
 
3638
 
 
3639
 
 
3640
</td>
 
3641
</tr>
 
3642
</tbody>
 
3643
</table></div>
 
3644
</div>
 
3645
<hr>
 
3646
<div class="refsect2" lang="en">
 
3647
<a name="id3035084"></a><h3>
 
3648
<a name="g-type-class-unref-uncached"></a>g_type_class_unref_uncached ()</h3>
 
3649
<a class="indexterm" name="id3035097"></a><pre class="programlisting">void                g_type_class_unref_uncached         (<a
 
3650
href="../glib/glib-Basic-Types.html#gpointer"
 
3651
>gpointer</a> g_class);</pre>
 
3652
<p>
 
3653
A variant of <a href="gobject-Type-Information.html#g-type-class-unref"><code class="function">g_type_class_unref()</code></a> for use in <a href="gobject-Type-Information.html#GTypeClassCacheFunc"><span class="type">GTypeClassCacheFunc</span></a>
 
3654
implementations. It unreferences a class without consulting the chain
 
3655
of <a href="gobject-Type-Information.html#GTypeClassCacheFunc"><span class="type">GTypeClassCacheFunc</span></a>s, avoiding the recursion which would occur
 
3656
otherwise.
 
3657
</p>
 
3658
<div class="variablelist"><table border="0">
 
3659
<col align="left" valign="top">
 
3660
<tbody><tr>
 
3661
<td><span class="term"><em class="parameter"><code>g_class</code></em>&#160;:</span></td>
 
3662
<td>The <a href="gobject-Type-Information.html#GTypeClass"><span class="type">GTypeClass</span></a> structure to unreference.
 
3663
 
 
3664
 
 
3665
</td>
 
3666
</tr></tbody>
 
3667
</table></div>
 
3668
</div>
 
3669
<hr>
 
3670
<div class="refsect2" lang="en">
 
3671
<a name="id3035183"></a><h3>
 
3672
<a name="g-type-add-interface-check"></a>g_type_add_interface_check ()</h3>
 
3673
<a class="indexterm" name="id3035199"></a><pre class="programlisting">void                g_type_add_interface_check          (<a
 
3674
href="../glib/glib-Basic-Types.html#gpointer"
 
3675
>gpointer</a> check_data,
 
3676
                                                         <a href="gobject-Type-Information.html#GTypeInterfaceCheckFunc">GTypeInterfaceCheckFunc</a> check_func);</pre>
 
3677
<p>
 
3678
Adds a function to be called after an interface vtable is
 
3679
initialized for any class (i.e. after the <em class="parameter"><code>interface_init</code></em>
 
3680
member of <a href="gobject-Type-Information.html#GInterfaceInfo"><span class="type">GInterfaceInfo</span></a> has been called).
 
3681
</p>
 
3682
<p>
 
3683
This function is useful when you want to check an invariant
 
3684
that depends on the interfaces of a class. For instance,
 
3685
the implementation of <a href="gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> uses this facility to check
 
3686
that an object implements all of the properties that are
 
3687
defined on its interfaces.    
 
3688
</p>
 
3689
<div class="variablelist"><table border="0">
 
3690
<col align="left" valign="top">
 
3691
<tbody>
 
3692
<tr>
 
3693
<td><span class="term"><em class="parameter"><code>check_data</code></em>&#160;:</span></td>
 
3694
<td>data to pass to <em class="parameter"><code>check_func</code></em>
 
3695
</td>
 
3696
</tr>
 
3697
<tr>
 
3698
<td><span class="term"><em class="parameter"><code>check_func</code></em>&#160;:</span></td>
 
3699
<td>function to be called after each interface
 
3700
   is initialized.
 
3701
</td>
 
3702
</tr>
 
3703
</tbody>
 
3704
</table></div>
 
3705
<p class="since">Since 2.4
 
3706
 
 
3707
 
 
3708
</p>
 
3709
</div>
 
3710
<hr>
 
3711
<div class="refsect2" lang="en">
 
3712
<a name="id3035313"></a><h3>
 
3713
<a name="g-type-remove-interface-check"></a>g_type_remove_interface_check ()</h3>
 
3714
<a class="indexterm" name="id3035329"></a><pre class="programlisting">void                g_type_remove_interface_check       (<a
 
3715
href="../glib/glib-Basic-Types.html#gpointer"
 
3716
>gpointer</a> check_data,
 
3717
                                                         <a href="gobject-Type-Information.html#GTypeInterfaceCheckFunc">GTypeInterfaceCheckFunc</a> check_func);</pre>
 
3718
<p>
 
3719
Removes an interface check function added with
 
3720
<a href="gobject-Type-Information.html#g-type-add-interface-check"><code class="function">g_type_add_interface_check()</code></a>.
 
3721
</p>
 
3722
<div class="variablelist"><table border="0">
 
3723
<col align="left" valign="top">
 
3724
<tbody>
 
3725
<tr>
 
3726
<td><span class="term"><em class="parameter"><code>check_data</code></em>&#160;:</span></td>
 
3727
<td>callback data passed to <a href="gobject-Type-Information.html#g-type-add-interface-check"><code class="function">g_type_add_interface_check()</code></a>
 
3728
</td>
 
3729
</tr>
 
3730
<tr>
 
3731
<td><span class="term"><em class="parameter"><code>check_func</code></em>&#160;:</span></td>
 
3732
<td>callback function passed to <a href="gobject-Type-Information.html#g-type-add-interface-check"><code class="function">g_type_add_interface_check()</code></a>
 
3733
</td>
 
3734
</tr>
 
3735
</tbody>
 
3736
</table></div>
 
3737
<p class="since">Since 2.4
 
3738
 
 
3739
 
 
3740
</p>
 
3741
</div>
 
3742
<hr>
 
3743
<div class="refsect2" lang="en">
 
3744
<a name="id3035440"></a><h3>
 
3745
<a name="GTypeInterfaceCheckFunc"></a>GTypeInterfaceCheckFunc ()</h3>
 
3746
<a class="indexterm" name="id3035455"></a><pre class="programlisting">void                (*GTypeInterfaceCheckFunc)          (<a
 
3747
href="../glib/glib-Basic-Types.html#gpointer"
 
3748
>gpointer</a> check_data,
 
3749
                                                         <a
 
3750
href="../glib/glib-Basic-Types.html#gpointer"
 
3751
>gpointer</a> g_iface);</pre>
 
3752
<p>
 
3753
A callback called after an interface vtable is initialized.
 
3754
See <a href="gobject-Type-Information.html#g-type-add-interface-check"><code class="function">g_type_add_interface_check()</code></a>.
 
3755
</p>
 
3756
<div class="variablelist"><table border="0">
 
3757
<col align="left" valign="top">
 
3758
<tbody>
 
3759
<tr>
 
3760
<td><span class="term"><em class="parameter"><code>check_data</code></em>&#160;:</span></td>
 
3761
<td>data passed to <a href="gobject-Type-Information.html#g-type-add-interface-check"><code class="function">g_type_add_interface_check()</code></a>.
 
3762
</td>
 
3763
</tr>
 
3764
<tr>
 
3765
<td><span class="term"><em class="parameter"><code>g_iface</code></em>&#160;:</span></td>
 
3766
<td>the interface that has been initialized
 
3767
</td>
 
3768
</tr>
 
3769
</tbody>
 
3770
</table></div>
 
3771
<p class="since">Since 2.4
 
3772
 
 
3773
 
 
3774
</p>
 
3775
</div>
 
3776
<hr>
 
3777
<div class="refsect2" lang="en">
 
3778
<a name="id3035554"></a><h3>
 
3779
<a name="g-type-value-table-peek"></a>g_type_value_table_peek ()</h3>
 
3780
<a class="indexterm" name="id3035566"></a><pre class="programlisting"><a href="gobject-Type-Information.html#GTypeValueTable">GTypeValueTable</a>*    g_type_value_table_peek             (<a href="gobject-Type-Information.html#GType">GType</a> type);</pre>
 
3781
<p>
 
3782
Returns the location of the <a href="gobject-Type-Information.html#GTypeValueTable"><span class="type">GTypeValueTable</span></a> associated with <em class="parameter"><code>type</code></em>.
 
3783
<span class="emphasis"><em>Note that this function should only be used from source code
 
3784
that implements or has internal knowledge of the implementation of
 
3785
<em class="parameter"><code>type</code></em>.</em></span>
 
3786
</p>
 
3787
<div class="variablelist"><table border="0">
 
3788
<col align="left" valign="top">
 
3789
<tbody>
 
3790
<tr>
 
3791
<td><span class="term"><em class="parameter"><code>type</code></em>&#160;:</span></td>
 
3792
<td>   A <a href="gobject-Type-Information.html#GType"><span class="type">GType</span></a> value.
 
3793
</td>
 
3794
</tr>
 
3795
<tr>
 
3796
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 
3797
<td>Location of the <a href="gobject-Type-Information.html#GTypeValueTable"><span class="type">GTypeValueTable</span></a> associated with <em class="parameter"><code>type</code></em> or
 
3798
          <a
 
3799
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
 
3800
><code class="literal">NULL</code></a> if there is no <a href="gobject-Type-Information.html#GTypeValueTable"><span class="type">GTypeValueTable</span></a> associated with <em class="parameter"><code>type</code></em>.
 
3801
 
 
3802
 
 
3803
</td>
 
3804
</tr>
 
3805
</tbody>
 
3806
</table></div>
 
3807
</div>
 
3808
<hr>
 
3809
<div class="refsect2" lang="en">
 
3810
<a name="id3035697"></a><h3>
 
3811
<a name="G-DEFINE-TYPE:CAPS"></a>G_DEFINE_TYPE()</h3>
 
3812
<a class="indexterm" name="id3035712"></a><pre class="programlisting">#define G_DEFINE_TYPE(TN, t_n, T_P)                           G_DEFINE_TYPE_EXTENDED (TN, t_n, T_P, 0, {})
 
3813
</pre>
 
3814
<p>
 
3815
A convenience macro for type implementations, which declares a 
 
3816
class initialization function, an instance initialization function (see <a href="gobject-Type-Information.html#GTypeInfo"><span class="type">GTypeInfo</span></a> for information about 
 
3817
these) and a static variable named <em class="parameter"><code>t_n</code></em>_parent_class pointing to the parent class. Furthermore, it defines 
 
3818
a *<code class="function">_get_type()</code> function. See <a href="gobject-Type-Information.html#G-DEFINE-TYPE-EXTENDED:CAPS"><code class="function">G_DEFINE_TYPE_EXTENDED()</code></a> for an example.
 
3819
</p>
 
3820
<div class="variablelist"><table border="0">
 
3821
<col align="left" valign="top">
 
3822
<tbody>
 
3823
<tr>
 
3824
<td><span class="term"><em class="parameter"><code>TN</code></em>&#160;:</span></td>
 
3825
<td>The name of the new type, in Camel case.
 
3826
</td>
 
3827
</tr>
 
3828
<tr>
 
3829
<td><span class="term"><em class="parameter"><code>t_n</code></em>&#160;:</span></td>
 
3830
<td>The name of the new type, in lowercase, with words 
 
3831
  separated by '_'.
 
3832
</td>
 
3833
</tr>
 
3834
<tr>
 
3835
<td><span class="term"><em class="parameter"><code>T_P</code></em>&#160;:</span></td>
 
3836
<td>The <a href="gobject-Type-Information.html#GType"><span class="type">GType</span></a> of the parent type.
 
3837
</td>
 
3838
</tr>
 
3839
</tbody>
 
3840
</table></div>
 
3841
<p class="since">Since 2.4
 
3842
 
 
3843
 
 
3844
</p>
 
3845
</div>
 
3846
<hr>
 
3847
<div class="refsect2" lang="en">
 
3848
<a name="id3035832"></a><h3>
 
3849
<a name="G-DEFINE-TYPE-WITH-CODE:CAPS"></a>G_DEFINE_TYPE_WITH_CODE()</h3>
 
3850
<a class="indexterm" name="id3035848"></a><pre class="programlisting">#define G_DEFINE_TYPE_WITH_CODE(TN, t_n, T_P, _C_)            _G_DEFINE_TYPE_EXTENDED_BEGIN (TN, t_n, T_P, 0) {_C_;} _G_DEFINE_TYPE_EXTENDED_END()
 
3851
</pre>
 
3852
<p>
 
3853
A convenience macro for type implementations.  
 
3854
Similar to <a href="gobject-Type-Information.html#G-DEFINE-TYPE:CAPS"><code class="function">G_DEFINE_TYPE()</code></a>, but allows to insert custom code into the 
 
3855
*<code class="function">_get_type()</code> function, e.g. interface implementations via <a href="gobject-Type-Information.html#G-IMPLEMENT-INTERFACE:CAPS"><code class="function">G_IMPLEMENT_INTERFACE()</code></a>.
 
3856
See <a href="gobject-Type-Information.html#G-DEFINE-TYPE-EXTENDED:CAPS"><code class="function">G_DEFINE_TYPE_EXTENDED()</code></a> for an example.
 
3857
</p>
 
3858
<div class="variablelist"><table border="0">
 
3859
<col align="left" valign="top">
 
3860
<tbody>
 
3861
<tr>
 
3862
<td><span class="term"><em class="parameter"><code>TN</code></em>&#160;:</span></td>
 
3863
<td>The name of the new type, in Camel case.
 
3864
</td>
 
3865
</tr>
 
3866
<tr>
 
3867
<td><span class="term"><em class="parameter"><code>t_n</code></em>&#160;:</span></td>
 
3868
<td>The name of the new type in lowercase, with words separated by '_'.
 
3869
</td>
 
3870
</tr>
 
3871
<tr>
 
3872
<td><span class="term"><em class="parameter"><code>T_P</code></em>&#160;:</span></td>
 
3873
<td>The <a href="gobject-Type-Information.html#GType"><span class="type">GType</span></a> of the parent type.
 
3874
</td>
 
3875
</tr>
 
3876
<tr>
 
3877
<td><span class="term"><em class="parameter"><code>_C_</code></em>&#160;:</span></td>
 
3878
<td>Custom code that gets inserted in the *<code class="function">_get_type()</code> function.
 
3879
</td>
 
3880
</tr>
 
3881
</tbody>
 
3882
</table></div>
 
3883
<p class="since">Since 2.4
 
3884
 
 
3885
 
 
3886
</p>
 
3887
</div>
 
3888
<hr>
 
3889
<div class="refsect2" lang="en">
 
3890
<a name="id3035997"></a><h3>
 
3891
<a name="G-DEFINE-ABSTRACT-TYPE:CAPS"></a>G_DEFINE_ABSTRACT_TYPE()</h3>
 
3892
<a class="indexterm" name="id3036013"></a><pre class="programlisting">#define G_DEFINE_ABSTRACT_TYPE(TN, t_n, T_P)                  G_DEFINE_TYPE_EXTENDED (TN, t_n, T_P, G_TYPE_FLAG_ABSTRACT, {})
 
3893
</pre>
 
3894
<p>
 
3895
A convenience macro for type implementations. 
 
3896
Similar to <a href="gobject-Type-Information.html#G-DEFINE-TYPE:CAPS"><code class="function">G_DEFINE_TYPE()</code></a>, but defines an abstract type. 
 
3897
See <a href="gobject-Type-Information.html#G-DEFINE-TYPE-EXTENDED:CAPS"><code class="function">G_DEFINE_TYPE_EXTENDED()</code></a> for an example.
 
3898
</p>
 
3899
<div class="variablelist"><table border="0">
 
3900
<col align="left" valign="top">
 
3901
<tbody>
 
3902
<tr>
 
3903
<td><span class="term"><em class="parameter"><code>TN</code></em>&#160;:</span></td>
 
3904
<td>The name of the new type, in Camel case.
 
3905
</td>
 
3906
</tr>
 
3907
<tr>
 
3908
<td><span class="term"><em class="parameter"><code>t_n</code></em>&#160;:</span></td>
 
3909
<td>The name of the new type, in lowercase, with words 
 
3910
  separated by '_'.
 
3911
</td>
 
3912
</tr>
 
3913
<tr>
 
3914
<td><span class="term"><em class="parameter"><code>T_P</code></em>&#160;:</span></td>
 
3915
<td>The <a href="gobject-Type-Information.html#GType"><span class="type">GType</span></a> of the parent type.
 
3916
</td>
 
3917
</tr>
 
3918
</tbody>
 
3919
</table></div>
 
3920
<p class="since">Since 2.4
 
3921
 
 
3922
 
 
3923
</p>
 
3924
</div>
 
3925
<hr>
 
3926
<div class="refsect2" lang="en">
 
3927
<a name="id3036114"></a><h3>
 
3928
<a name="G-DEFINE-ABSTRACT-TYPE-WITH-CODE:CAPS"></a>G_DEFINE_ABSTRACT_TYPE_WITH_CODE()</h3>
 
3929
<a class="indexterm" name="id3036130"></a><pre class="programlisting">#define G_DEFINE_ABSTRACT_TYPE_WITH_CODE(TN, t_n, T_P, _C_) _G_DEFINE_TYPE_EXTENDED_BEGIN (TN, t_n, T_P, G_TYPE_FLAG_ABSTRACT) {_C_;} _G_DEFINE_TYPE_EXTENDED_END()
 
3930
</pre>
 
3931
<p>
 
3932
A convenience macro for type implementations.
 
3933
Similar to <a href="gobject-Type-Information.html#G-DEFINE-TYPE-WITH-CODE:CAPS"><code class="function">G_DEFINE_TYPE_WITH_CODE()</code></a>, but defines an abstract type and allows to 
 
3934
insert custom code into the *<code class="function">_get_type()</code> function, e.g. interface implementations 
 
3935
via <a href="gobject-Type-Information.html#G-IMPLEMENT-INTERFACE:CAPS"><code class="function">G_IMPLEMENT_INTERFACE()</code></a>. See <a href="gobject-Type-Information.html#G-DEFINE-TYPE-EXTENDED:CAPS"><code class="function">G_DEFINE_TYPE_EXTENDED()</code></a> for an example.
 
3936
</p>
 
3937
<div class="variablelist"><table border="0">
 
3938
<col align="left" valign="top">
 
3939
<tbody>
 
3940
<tr>
 
3941
<td><span class="term"><em class="parameter"><code>TN</code></em>&#160;:</span></td>
 
3942
<td>The name of the new type, in Camel case.
 
3943
</td>
 
3944
</tr>
 
3945
<tr>
 
3946
<td><span class="term"><em class="parameter"><code>t_n</code></em>&#160;:</span></td>
 
3947
<td>The name of the new type, in lowercase, with words 
 
3948
  separated by '_'.
 
3949
</td>
 
3950
</tr>
 
3951
<tr>
 
3952
<td><span class="term"><em class="parameter"><code>T_P</code></em>&#160;:</span></td>
 
3953
<td>The <a href="gobject-Type-Information.html#GType"><span class="type">GType</span></a> of the parent type.
 
3954
</td>
 
3955
</tr>
 
3956
<tr>
 
3957
<td><span class="term"><em class="parameter"><code>_C_</code></em>&#160;:</span></td>
 
3958
<td>Custom code that gets inserted in the @<code class="function">type_name_get_type()</code> function.
 
3959
</td>
 
3960
</tr>
 
3961
</tbody>
 
3962
</table></div>
 
3963
<p class="since">Since 2.4
 
3964
 
 
3965
 
 
3966
</p>
 
3967
</div>
 
3968
<hr>
 
3969
<div class="refsect2" lang="en">
 
3970
<a name="id3036282"></a><h3>
 
3971
<a name="G-IMPLEMENT-INTERFACE:CAPS"></a>G_IMPLEMENT_INTERFACE()</h3>
 
3972
<a class="indexterm" name="id3036297"></a><pre class="programlisting">#define             G_IMPLEMENT_INTERFACE(TYPE_IFACE, iface_init)</pre>
 
3973
<p>
 
3974
A convenience macro to ease interface addition in the <em class="parameter"><code>_C_</code></em> section
 
3975
of <a href="gobject-Type-Information.html#G-DEFINE-TYPE-WITH-CODE:CAPS"><code class="function">G_DEFINE_TYPE_WITH_CODE()</code></a> or <a href="gobject-Type-Information.html#G-DEFINE-ABSTRACT-TYPE-WITH-CODE:CAPS"><code class="function">G_DEFINE_ABSTRACT_TYPE_WITH_CODE()</code></a>. 
 
3976
See <a href="gobject-Type-Information.html#G-DEFINE-TYPE-EXTENDED:CAPS"><code class="function">G_DEFINE_TYPE_EXTENDED()</code></a> for an example.
 
3977
</p>
 
3978
<p>
 
3979
Note that this macro can only be used together with the G_DEFINE_TYPE_*
 
3980
macros, since it depends on variable names from those macros.
 
3981
</p>
 
3982
<div class="variablelist"><table border="0">
 
3983
<col align="left" valign="top">
 
3984
<tbody>
 
3985
<tr>
 
3986
<td><span class="term"><em class="parameter"><code>TYPE_IFACE</code></em>&#160;:</span></td>
 
3987
<td>The <a href="gobject-Type-Information.html#GType"><span class="type">GType</span></a> of the interface to add
 
3988
</td>
 
3989
</tr>
 
3990
<tr>
 
3991
<td><span class="term"><em class="parameter"><code>iface_init</code></em>&#160;:</span></td>
 
3992
<td>The interface init function
 
3993
</td>
 
3994
</tr>
 
3995
</tbody>
 
3996
</table></div>
 
3997
<p class="since">Since 2.4
 
3998
 
 
3999
 
 
4000
</p>
 
4001
</div>
 
4002
<hr>
 
4003
<div class="refsect2" lang="en">
 
4004
<a name="id3036408"></a><h3>
 
4005
<a name="G-DEFINE-TYPE-EXTENDED:CAPS"></a>G_DEFINE_TYPE_EXTENDED()</h3>
 
4006
<a class="indexterm" name="id3036423"></a><pre class="programlisting">#define G_DEFINE_TYPE_EXTENDED(TN, t_n, T_P, _f_, _C_)        _G_DEFINE_TYPE_EXTENDED_BEGIN (TN, t_n, T_P, _f_) {_C_;} _G_DEFINE_TYPE_EXTENDED_END()
 
4007
</pre>
 
4008
<p>
 
4009
The most general convenience macro for type implementations, on which 
 
4010
<a href="gobject-Type-Information.html#G-DEFINE-TYPE:CAPS"><code class="function">G_DEFINE_TYPE()</code></a>, etc are based. 
 
4011
</p>
 
4012
<div class="informalexample">
 
4013
<pre class="programlisting">
 
4014
G_DEFINE_TYPE_EXTENDED (GtkGadget, 
 
4015
                        gtk_gadget, 
 
4016
                        GTK_TYPE_WIDGET,
 
4017
                        0, 
 
4018
                        G_IMPLEMENT_INTERFACE (TYPE_GIZMO, 
 
4019
                                               gtk_gadget_gizmo_init));
 
4020
</pre>
 
4021
expands to
 
4022
<pre class="programlisting">
 
4023
static void     gtk_gadget_init       (GtkGadget      *self);
 
4024
static void     gtk_gadget_class_init (GtkGadgetClass *klass);
 
4025
static gpointer gtk_gadget_parent_class = NULL;
 
4026
static void     gtk_gadget_class_intern_init (gpointer klass)
 
4027
{
 
4028
  gtk_gadget_parent_class = g_type_class_peek_parent (klass);
 
4029
  gtk_gadget_class_init ((GtkGadgetClass*) klass);
 
4030
}
 
4031
 
 
4032
GType
 
4033
gtk_gadget_get_type (void)
 
4034
{
 
4035
  static GType g_define_type_id = 0; 
 
4036
  if (G_UNLIKELY (g_define_type_id == 0)) 
 
4037
    { 
 
4038
      static const GTypeInfo g_define_type_info = { 
 
4039
        sizeof (GtkGadgetClass), 
 
4040
        (GBaseInitFunc) NULL, 
 
4041
        (GBaseFinalizeFunc) NULL, 
 
4042
        (GClassInitFunc) gtk_gadget_class_intern_init, 
 
4043
        (GClassFinalizeFunc) NULL, 
 
4044
        NULL,   /* class_data */ 
 
4045
        sizeof (GtkGadget), 
 
4046
        0,      /* n_preallocs */ 
 
4047
        (GInstanceInitFunc) gtk_gadget_init, 
 
4048
      }; 
 
4049
      g_define_type_id = g_type_register_static (GTK_TYPE_WIDGET, "GtkGadget", &amp;g_define_type_info, 0); 
 
4050
      {
 
4051
        static const GInterfaceInfo g_implement_interface_info = {
 
4052
          (GInterfaceInitFunc) gtk_gadget_gizmo_init
 
4053
        };
 
4054
        g_type_add_interface_static (g_define_type_id, TYPE_GIZMO, &amp;g_implement_interface_info);
 
4055
      } 
 
4056
    } 
 
4057
  return g_define_type_id; 
 
4058
}
 
4059
</pre>
 
4060
The only pieces which have to be manually provided are the definitions of the 
 
4061
instance and class structure and the definitions of the instance and class 
 
4062
init functions.
 
4063
</div>
 
4064
<div class="variablelist"><table border="0">
 
4065
<col align="left" valign="top">
 
4066
<tbody>
 
4067
<tr>
 
4068
<td><span class="term"><em class="parameter"><code>TN</code></em>&#160;:</span></td>
 
4069
<td>
 
4070
</td>
 
4071
</tr>
 
4072
<tr>
 
4073
<td><span class="term"><em class="parameter"><code>t_n</code></em>&#160;:</span></td>
 
4074
<td>
 
4075
</td>
 
4076
</tr>
 
4077
<tr>
 
4078
<td><span class="term"><em class="parameter"><code>T_P</code></em>&#160;:</span></td>
 
4079
<td>
 
4080
</td>
 
4081
</tr>
 
4082
<tr>
 
4083
<td><span class="term"><em class="parameter"><code>_f_</code></em>&#160;:</span></td>
 
4084
<td>
 
4085
</td>
 
4086
</tr>
 
4087
<tr>
 
4088
<td><span class="term"><em class="parameter"><code>_C_</code></em>&#160;:</span></td>
 
4089
<td>
 
4090
</td>
 
4091
</tr>
 
4092
</tbody>
 
4093
</table></div>
 
4094
<p class="since">Since 2.4
 
4095
</p>
 
4096
</div>
 
4097
<hr>
 
4098
<div class="refsect2" lang="en">
 
4099
<a name="id3036579"></a><h3>
 
4100
<a name="G-TYPE-INVALID:CAPS"></a>G_TYPE_INVALID</h3>
 
4101
<a class="indexterm" name="id3036592"></a><pre class="programlisting">#define G_TYPE_INVALID                    G_TYPE_MAKE_FUNDAMENTAL (0)
 
4102
</pre>
 
4103
<p>
 
4104
An invalid <a href="gobject-Type-Information.html#GType"><span class="type">GType</span></a> used as error return value in some functions which return
 
4105
a <a href="gobject-Type-Information.html#GType"><span class="type">GType</span></a>. 
 
4106
</p>
 
4107
</div>
 
4108
<hr>
 
4109
<div class="refsect2" lang="en">
 
4110
<a name="id3036624"></a><h3>
 
4111
<a name="G-TYPE-NONE:CAPS"></a>G_TYPE_NONE</h3>
 
4112
<a class="indexterm" name="id3036637"></a><pre class="programlisting">#define G_TYPE_NONE                       G_TYPE_MAKE_FUNDAMENTAL (1)
 
4113
</pre>
 
4114
<p>
 
4115
A fundamental type which is used as a replacement for the C
 
4116
<code class="literal">void</code> return type.
 
4117
</p>
 
4118
</div>
 
4119
<hr>
 
4120
<div class="refsect2" lang="en">
 
4121
<a name="id3036659"></a><h3>
 
4122
<a name="G-TYPE-INTERFACE:CAPS"></a>G_TYPE_INTERFACE</h3>
 
4123
<a class="indexterm" name="id3036673"></a><pre class="programlisting">#define G_TYPE_INTERFACE          G_TYPE_MAKE_FUNDAMENTAL (2)
 
4124
</pre>
 
4125
<p>
 
4126
The fundamental type from which all interfaces are derived.
 
4127
</p>
 
4128
</div>
 
4129
<hr>
 
4130
<div class="refsect2" lang="en">
 
4131
<a name="id3036690"></a><h3>
 
4132
<a name="G-TYPE-CHAR:CAPS"></a>G_TYPE_CHAR</h3>
 
4133
<a class="indexterm" name="id3036702"></a><pre class="programlisting">#define G_TYPE_CHAR                       G_TYPE_MAKE_FUNDAMENTAL (3)
 
4134
</pre>
 
4135
<p>
 
4136
    The fundamental type corresponding to <a
 
4137
href="../glib/glib-Basic-Types.html#gchar"
 
4138
><span class="type">gchar</span></a>.
 
4139
    The type designated by G_TYPE_CHAR is unconditionally an 8-bit signed integer.
 
4140
    This may or may not be the same type a the C type "gchar".
 
4141
  </p>
 
4142
</div>
 
4143
<hr>
 
4144
<div class="refsect2" lang="en">
 
4145
<a name="id3036728"></a><h3>
 
4146
<a name="G-TYPE-UCHAR:CAPS"></a>G_TYPE_UCHAR</h3>
 
4147
<a class="indexterm" name="id3036741"></a><pre class="programlisting">#define G_TYPE_UCHAR                      G_TYPE_MAKE_FUNDAMENTAL (4)
 
4148
</pre>
 
4149
<p>
 
4150
The fundamental type corresponding to <a
 
4151
href="../glib/glib-Basic-Types.html#guchar"
 
4152
><span class="type">guchar</span></a>.
 
4153
</p>
 
4154
</div>
 
4155
<hr>
 
4156
<div class="refsect2" lang="en">
 
4157
<a name="id3036766"></a><h3>
 
4158
<a name="G-TYPE-BOOLEAN:CAPS"></a>G_TYPE_BOOLEAN</h3>
 
4159
<a class="indexterm" name="id3036779"></a><pre class="programlisting">#define G_TYPE_BOOLEAN                    G_TYPE_MAKE_FUNDAMENTAL (5)
 
4160
</pre>
 
4161
<p>
 
4162
The fundamental type corresponding to <a
 
4163
href="../glib/glib-Basic-Types.html#gboolean"
 
4164
><span class="type">gboolean</span></a>.
 
4165
</p>
 
4166
</div>
 
4167
<hr>
 
4168
<div class="refsect2" lang="en">
 
4169
<a name="id3036804"></a><h3>
 
4170
<a name="G-TYPE-INT:CAPS"></a>G_TYPE_INT</h3>
 
4171
<a class="indexterm" name="id3036817"></a><pre class="programlisting">#define G_TYPE_INT                        G_TYPE_MAKE_FUNDAMENTAL (6)
 
4172
</pre>
 
4173
<p>
 
4174
The fundamental type corresponding to <a
 
4175
href="../glib/glib-Basic-Types.html#gint"
 
4176
><span class="type">gint</span></a>.
 
4177
</p>
 
4178
</div>
 
4179
<hr>
 
4180
<div class="refsect2" lang="en">
 
4181
<a name="id3036841"></a><h3>
 
4182
<a name="G-TYPE-UINT:CAPS"></a>G_TYPE_UINT</h3>
 
4183
<a class="indexterm" name="id3036854"></a><pre class="programlisting">#define G_TYPE_UINT                       G_TYPE_MAKE_FUNDAMENTAL (7)
 
4184
</pre>
 
4185
<p>
 
4186
The fundamental type corresponding to <a
 
4187
href="../glib/glib-Basic-Types.html#guint"
 
4188
><span class="type">guint</span></a>.
 
4189
</p>
 
4190
</div>
 
4191
<hr>
 
4192
<div class="refsect2" lang="en">
 
4193
<a name="id3036878"></a><h3>
 
4194
<a name="G-TYPE-LONG:CAPS"></a>G_TYPE_LONG</h3>
 
4195
<a class="indexterm" name="id3036890"></a><pre class="programlisting">#define G_TYPE_LONG                       G_TYPE_MAKE_FUNDAMENTAL (8)
 
4196
</pre>
 
4197
<p>
 
4198
The fundamental type corresponding to <a
 
4199
href="../glib/glib-Basic-Types.html#glong"
 
4200
><span class="type">glong</span></a>.
 
4201
</p>
 
4202
</div>
 
4203
<hr>
 
4204
<div class="refsect2" lang="en">
 
4205
<a name="id3036915"></a><h3>
 
4206
<a name="G-TYPE-ULONG:CAPS"></a>G_TYPE_ULONG</h3>
 
4207
<a class="indexterm" name="id3036928"></a><pre class="programlisting">#define G_TYPE_ULONG                      G_TYPE_MAKE_FUNDAMENTAL (9)
 
4208
</pre>
 
4209
<p>
 
4210
The fundamental type corresponding to <a
 
4211
href="../glib/glib-Basic-Types.html#gulong"
 
4212
><span class="type">gulong</span></a>.
 
4213
</p>
 
4214
</div>
 
4215
<hr>
 
4216
<div class="refsect2" lang="en">
 
4217
<a name="id3036953"></a><h3>
 
4218
<a name="G-TYPE-INT64:CAPS"></a>G_TYPE_INT64</h3>
 
4219
<a class="indexterm" name="id3036966"></a><pre class="programlisting">#define G_TYPE_INT64                      G_TYPE_MAKE_FUNDAMENTAL (10)
 
4220
</pre>
 
4221
<p>
 
4222
The fundamental type corresponding to <a
 
4223
href="../glib/glib-Basic-Types.html#gint64"
 
4224
><span class="type">gint64</span></a>.
 
4225
</p>
 
4226
</div>
 
4227
<hr>
 
4228
<div class="refsect2" lang="en">
 
4229
<a name="id3036991"></a><h3>
 
4230
<a name="G-TYPE-UINT64:CAPS"></a>G_TYPE_UINT64</h3>
 
4231
<a class="indexterm" name="id3037004"></a><pre class="programlisting">#define G_TYPE_UINT64                     G_TYPE_MAKE_FUNDAMENTAL (11)
 
4232
</pre>
 
4233
<p>
 
4234
The fundamental type corresponding to <a
 
4235
href="../glib/glib-Basic-Types.html#guint64"
 
4236
><span class="type">guint64</span></a>.
 
4237
</p>
 
4238
</div>
 
4239
<hr>
 
4240
<div class="refsect2" lang="en">
 
4241
<a name="id3037029"></a><h3>
 
4242
<a name="G-TYPE-ENUM:CAPS"></a>G_TYPE_ENUM</h3>
 
4243
<a class="indexterm" name="id3037043"></a><pre class="programlisting">#define G_TYPE_ENUM                       G_TYPE_MAKE_FUNDAMENTAL (12)
 
4244
</pre>
 
4245
<p>
 
4246
The fundamental type from which all enumeration types are derived.
 
4247
</p>
 
4248
</div>
 
4249
<hr>
 
4250
<div class="refsect2" lang="en">
 
4251
<a name="id3037059"></a><h3>
 
4252
<a name="G-TYPE-FLAGS:CAPS"></a>G_TYPE_FLAGS</h3>
 
4253
<a class="indexterm" name="id3037072"></a><pre class="programlisting">#define G_TYPE_FLAGS                      G_TYPE_MAKE_FUNDAMENTAL (13)
 
4254
</pre>
 
4255
<p>
 
4256
The fundamental type from which all flags types are derived.
 
4257
</p>
 
4258
</div>
 
4259
<hr>
 
4260
<div class="refsect2" lang="en">
 
4261
<a name="id3037089"></a><h3>
 
4262
<a name="G-TYPE-FLOAT:CAPS"></a>G_TYPE_FLOAT</h3>
 
4263
<a class="indexterm" name="id3037101"></a><pre class="programlisting">#define G_TYPE_FLOAT                      G_TYPE_MAKE_FUNDAMENTAL (14)
 
4264
</pre>
 
4265
<p>
 
4266
The fundamental type corresponding to <a
 
4267
href="../glib/glib-Basic-Types.html#gfloat"
 
4268
><span class="type">gfloat</span></a>.
 
4269
</p>
 
4270
</div>
 
4271
<hr>
 
4272
<div class="refsect2" lang="en">
 
4273
<a name="id3037126"></a><h3>
 
4274
<a name="G-TYPE-DOUBLE:CAPS"></a>G_TYPE_DOUBLE</h3>
 
4275
<a class="indexterm" name="id3037138"></a><pre class="programlisting">#define G_TYPE_DOUBLE                     G_TYPE_MAKE_FUNDAMENTAL (15)
 
4276
</pre>
 
4277
<p>
 
4278
The fundamental type corresponding to <a
 
4279
href="../glib/glib-Basic-Types.html#gdouble"
 
4280
><span class="type">gdouble</span></a>.
 
4281
</p>
 
4282
</div>
 
4283
<hr>
 
4284
<div class="refsect2" lang="en">
 
4285
<a name="id3037164"></a><h3>
 
4286
<a name="G-TYPE-STRING:CAPS"></a>G_TYPE_STRING</h3>
 
4287
<a class="indexterm" name="id3037176"></a><pre class="programlisting">#define G_TYPE_STRING                     G_TYPE_MAKE_FUNDAMENTAL (16)
 
4288
</pre>
 
4289
<p>
 
4290
The fundamental type corresponding to nul-terminated C strings.
 
4291
</p>
 
4292
</div>
 
4293
<hr>
 
4294
<div class="refsect2" lang="en">
 
4295
<a name="id3037193"></a><h3>
 
4296
<a name="G-TYPE-POINTER:CAPS"></a>G_TYPE_POINTER</h3>
 
4297
<a class="indexterm" name="id3037205"></a><pre class="programlisting">#define G_TYPE_POINTER                    G_TYPE_MAKE_FUNDAMENTAL (17)
 
4298
</pre>
 
4299
<p>
 
4300
The fundamental type corresponding to <a
 
4301
href="../glib/glib-Basic-Types.html#gpointer"
 
4302
><span class="type">gpointer</span></a>.
 
4303
</p>
 
4304
</div>
 
4305
<hr>
 
4306
<div class="refsect2" lang="en">
 
4307
<a name="id3037230"></a><h3>
 
4308
<a name="G-TYPE-BOXED:CAPS"></a>G_TYPE_BOXED</h3>
 
4309
<a class="indexterm" name="id3037242"></a><pre class="programlisting">#define G_TYPE_BOXED                      G_TYPE_MAKE_FUNDAMENTAL (18)
 
4310
</pre>
 
4311
<p>
 
4312
The fundamental type from which all boxed types are derived.
 
4313
</p>
 
4314
</div>
 
4315
<hr>
 
4316
<div class="refsect2" lang="en">
 
4317
<a name="id3037259"></a><h3>
 
4318
<a name="G-TYPE-PARAM:CAPS"></a>G_TYPE_PARAM</h3>
 
4319
<a class="indexterm" name="id3037271"></a><pre class="programlisting">#define G_TYPE_PARAM                      G_TYPE_MAKE_FUNDAMENTAL (19)
 
4320
</pre>
 
4321
<p>
 
4322
The fundamental type from which all <a href="gobject-GParamSpec.html#GParamSpec"><span class="type">GParamSpec</span></a> types are derived.
 
4323
</p>
 
4324
</div>
 
4325
<hr>
 
4326
<div class="refsect2" lang="en">
 
4327
<a name="id3037296"></a><h3>
 
4328
<a name="G-TYPE-OBJECT:CAPS"></a>G_TYPE_OBJECT</h3>
 
4329
<a class="indexterm" name="id3037309"></a><pre class="programlisting">#define G_TYPE_OBJECT                     G_TYPE_MAKE_FUNDAMENTAL (20)
 
4330
</pre>
 
4331
<p>
 
4332
The fundamental type for <a href="gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a>.
 
4333
</p>
 
4334
</div>
 
4335
<hr>
 
4336
<div class="refsect2" lang="en">
 
4337
<a name="id3037333"></a><h3>
 
4338
<a name="G-TYPE-GTYPE:CAPS"></a>G_TYPE_GTYPE</h3>
 
4339
<a class="indexterm" name="id3037345"></a><pre class="programlisting">#define   G_TYPE_GTYPE                     (g_gtype_get_type())
 
4340
</pre>
 
4341
<p>
 
4342
The type for <a href="gobject-Type-Information.html#GType"><span class="type">GType</span></a>.
 
4343
</p>
 
4344
</div>
 
4345
<hr>
 
4346
<div class="refsect2" lang="en">
 
4347
<a name="id3037369"></a><h3>
 
4348
<a name="G-TYPE-RESERVED-GLIB-FIRST:CAPS"></a>G_TYPE_RESERVED_GLIB_FIRST</h3>
 
4349
<a class="indexterm" name="id3037383"></a><pre class="programlisting">#define G_TYPE_RESERVED_GLIB_FIRST        (21)
 
4350
</pre>
 
4351
<p>
 
4352
First fundamental type number to create a new fundamental type id with
 
4353
<a href="gobject-Type-Information.html#G-TYPE-MAKE-FUNDAMENTAL:CAPS"><code class="function">G_TYPE_MAKE_FUNDAMENTAL()</code></a> reserved for GLib.
 
4354
</p>
 
4355
</div>
 
4356
<hr>
 
4357
<div class="refsect2" lang="en">
 
4358
<a name="id3037412"></a><h3>
 
4359
<a name="G-TYPE-RESERVED-GLIB-LAST:CAPS"></a>G_TYPE_RESERVED_GLIB_LAST</h3>
 
4360
<a class="indexterm" name="id3037425"></a><pre class="programlisting">#define G_TYPE_RESERVED_GLIB_LAST (31)
 
4361
</pre>
 
4362
<p>
 
4363
Last fundamental type number reserved for GLib.
 
4364
</p>
 
4365
</div>
 
4366
<hr>
 
4367
<div class="refsect2" lang="en">
 
4368
<a name="id3037441"></a><h3>
 
4369
<a name="G-TYPE-RESERVED-BSE-FIRST:CAPS"></a>G_TYPE_RESERVED_BSE_FIRST</h3>
 
4370
<a class="indexterm" name="id3037455"></a><pre class="programlisting">#define G_TYPE_RESERVED_BSE_FIRST (32)
 
4371
</pre>
 
4372
<p>
 
4373
First fundamental type number to create a new fundamental type id with
 
4374
<a href="gobject-Type-Information.html#G-TYPE-MAKE-FUNDAMENTAL:CAPS"><code class="function">G_TYPE_MAKE_FUNDAMENTAL()</code></a> reserved for BSE.
 
4375
</p>
 
4376
</div>
 
4377
<hr>
 
4378
<div class="refsect2" lang="en">
 
4379
<a name="id3037483"></a><h3>
 
4380
<a name="G-TYPE-RESERVED-BSE-LAST:CAPS"></a>G_TYPE_RESERVED_BSE_LAST</h3>
 
4381
<a class="indexterm" name="id3037497"></a><pre class="programlisting">#define G_TYPE_RESERVED_BSE_LAST  (48)
 
4382
</pre>
 
4383
<p>
 
4384
Last fundamental type number reserved for BSE.
 
4385
</p>
 
4386
</div>
 
4387
<hr>
 
4388
<div class="refsect2" lang="en">
 
4389
<a name="id3037513"></a><h3>
 
4390
<a name="G-TYPE-RESERVED-USER-FIRST:CAPS"></a>G_TYPE_RESERVED_USER_FIRST</h3>
 
4391
<a class="indexterm" name="id3037526"></a><pre class="programlisting">#define G_TYPE_RESERVED_USER_FIRST        (49)
 
4392
</pre>
 
4393
<p>
 
4394
First available fundamental type number to create new fundamental 
 
4395
type id with <a href="gobject-Type-Information.html#G-TYPE-MAKE-FUNDAMENTAL:CAPS"><code class="function">G_TYPE_MAKE_FUNDAMENTAL()</code></a>.
 
4396
</p>
 
4397
</div>
 
4398
</div>
 
4399
</div>
 
4400
</body>
 
4401
</html>