Moving files to packaging and extracing new tarball.
[profile/ivi/glib2.git] / docs / reference / gobject / html / gobject-Type-Information.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <html>
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <title>Type Information</title>
6 <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
7 <link rel="home" href="index.html" title="GObject Reference Manual">
8 <link rel="up" href="rn01.html" title="API Reference">
9 <link rel="prev" href="rn01.html" title="API Reference">
10 <link rel="next" href="GTypePlugin.html" title="GTypePlugin">
11 <meta name="generator" content="GTK-Doc V1.18 (XML mode)">
12 <link rel="stylesheet" href="style.css" type="text/css">
13 </head>
14 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
15 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
16 <tr valign="middle">
17 <td><a accesskey="p" href="rn01.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
18 <td><a accesskey="u" href="rn01.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
19 <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
20 <th width="100%" align="center">GObject Reference Manual</th>
21 <td><a accesskey="n" href="GTypePlugin.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
22 </tr>
23 <tr><td colspan="5" class="shortcuts">
24 <a href="#gobject-Type-Information.synopsis" class="shortcut">Top</a>
25                    | 
26                   <a href="#gobject-Type-Information.description" class="shortcut">Description</a>
27 </td></tr>
28 </table>
29 <div class="refentry">
30 <a name="gobject-Type-Information"></a><div class="titlepage"></div>
31 <div class="refnamediv"><table width="100%"><tr>
32 <td valign="top">
33 <h2><span class="refentrytitle"><a name="gobject-Type-Information.top_of_page"></a>Type Information</span></h2>
34 <p>Type Information — The GLib Runtime type identification and
35     management system</p>
36 </td>
37 <td valign="top" align="right"></td>
38 </tr></table></div>
39 <div class="refsynopsisdiv">
40 <a name="gobject-Type-Information.synopsis"></a><h2>Synopsis</h2>
41 <pre class="synopsis">
42 #include &lt;glib-object.h&gt;
43
44 typedef             <a class="link" href="gobject-Type-Information.html#GType" title="GType">GType</a>;
45 #define             <a class="link" href="gobject-Type-Information.html#G-TYPE-FUNDAMENTAL:CAPS" title="G_TYPE_FUNDAMENTAL()">G_TYPE_FUNDAMENTAL</a>                  (type)
46 #define             <a class="link" href="gobject-Type-Information.html#G-TYPE-FUNDAMENTAL-MAX:CAPS" title="G_TYPE_FUNDAMENTAL_MAX">G_TYPE_FUNDAMENTAL_MAX</a>
47 #define             <a class="link" href="gobject-Type-Information.html#G-TYPE-MAKE-FUNDAMENTAL:CAPS" title="G_TYPE_MAKE_FUNDAMENTAL()">G_TYPE_MAKE_FUNDAMENTAL</a>             (x)
48 #define             <a class="link" href="gobject-Type-Information.html#G-TYPE-IS-ABSTRACT:CAPS" title="G_TYPE_IS_ABSTRACT()">G_TYPE_IS_ABSTRACT</a>                  (type)
49 #define             <a class="link" href="gobject-Type-Information.html#G-TYPE-IS-DERIVED:CAPS" title="G_TYPE_IS_DERIVED()">G_TYPE_IS_DERIVED</a>                   (type)
50 #define             <a class="link" href="gobject-Type-Information.html#G-TYPE-IS-FUNDAMENTAL:CAPS" title="G_TYPE_IS_FUNDAMENTAL()">G_TYPE_IS_FUNDAMENTAL</a>               (type)
51 #define             <a class="link" href="gobject-Type-Information.html#G-TYPE-IS-VALUE-TYPE:CAPS" title="G_TYPE_IS_VALUE_TYPE()">G_TYPE_IS_VALUE_TYPE</a>                (type)
52 #define             <a class="link" href="gobject-Type-Information.html#G-TYPE-HAS-VALUE-TABLE:CAPS" title="G_TYPE_HAS_VALUE_TABLE()">G_TYPE_HAS_VALUE_TABLE</a>              (type)
53 #define             <a class="link" href="gobject-Type-Information.html#G-TYPE-IS-CLASSED:CAPS" title="G_TYPE_IS_CLASSED()">G_TYPE_IS_CLASSED</a>                   (type)
54 #define             <a class="link" href="gobject-Type-Information.html#G-TYPE-IS-INSTANTIATABLE:CAPS" title="G_TYPE_IS_INSTANTIATABLE()">G_TYPE_IS_INSTANTIATABLE</a>            (type)
55 #define             <a class="link" href="gobject-Type-Information.html#G-TYPE-IS-DERIVABLE:CAPS" title="G_TYPE_IS_DERIVABLE()">G_TYPE_IS_DERIVABLE</a>                 (type)
56 #define             <a class="link" href="gobject-Type-Information.html#G-TYPE-IS-DEEP-DERIVABLE:CAPS" title="G_TYPE_IS_DEEP_DERIVABLE()">G_TYPE_IS_DEEP_DERIVABLE</a>            (type)
57 #define             <a class="link" href="gobject-Type-Information.html#G-TYPE-IS-INTERFACE:CAPS" title="G_TYPE_IS_INTERFACE()">G_TYPE_IS_INTERFACE</a>                 (type)
58 struct              <a class="link" href="gobject-Type-Information.html#GTypeInterface" title="struct GTypeInterface">GTypeInterface</a>;
59 struct              <a class="link" href="gobject-Type-Information.html#GTypeInstance" title="struct GTypeInstance">GTypeInstance</a>;
60 struct              <a class="link" href="gobject-Type-Information.html#GTypeClass" title="struct GTypeClass">GTypeClass</a>;
61 struct              <a class="link" href="gobject-Type-Information.html#GTypeInfo" title="struct GTypeInfo">GTypeInfo</a>;
62 struct              <a class="link" href="gobject-Type-Information.html#GTypeFundamentalInfo" title="struct GTypeFundamentalInfo">GTypeFundamentalInfo</a>;
63 struct              <a class="link" href="gobject-Type-Information.html#GInterfaceInfo" title="struct GInterfaceInfo">GInterfaceInfo</a>;
64 struct              <a class="link" href="gobject-Type-Information.html#GTypeValueTable" title="struct GTypeValueTable">GTypeValueTable</a>;
65 #define             <a class="link" href="gobject-Type-Information.html#G-TYPE-FROM-INSTANCE:CAPS" title="G_TYPE_FROM_INSTANCE()">G_TYPE_FROM_INSTANCE</a>                (instance)
66 #define             <a class="link" href="gobject-Type-Information.html#G-TYPE-FROM-CLASS:CAPS" title="G_TYPE_FROM_CLASS()">G_TYPE_FROM_CLASS</a>                   (g_class)
67 #define             <a class="link" href="gobject-Type-Information.html#G-TYPE-FROM-INTERFACE:CAPS" title="G_TYPE_FROM_INTERFACE()">G_TYPE_FROM_INTERFACE</a>               (g_iface)
68 #define             <a class="link" href="gobject-Type-Information.html#G-TYPE-INSTANCE-GET-CLASS:CAPS" title="G_TYPE_INSTANCE_GET_CLASS()">G_TYPE_INSTANCE_GET_CLASS</a>           (instance,
69                                                          g_type,
70                                                          c_type)
71 #define             <a class="link" href="gobject-Type-Information.html#G-TYPE-INSTANCE-GET-INTERFACE:CAPS" title="G_TYPE_INSTANCE_GET_INTERFACE()">G_TYPE_INSTANCE_GET_INTERFACE</a>       (instance,
72                                                          g_type,
73                                                          c_type)
74 #define             <a class="link" href="gobject-Type-Information.html#G-TYPE-INSTANCE-GET-PRIVATE:CAPS" title="G_TYPE_INSTANCE_GET_PRIVATE()">G_TYPE_INSTANCE_GET_PRIVATE</a>         (instance,
75                                                          g_type,
76                                                          c_type)
77 #define             <a class="link" href="gobject-Type-Information.html#G-TYPE-CLASS-GET-PRIVATE:CAPS" title="G_TYPE_CLASS_GET_PRIVATE()">G_TYPE_CLASS_GET_PRIVATE</a>            (klass,
78                                                          g_type,
79                                                          c_type)
80 #define             <a class="link" href="gobject-Type-Information.html#G-TYPE-CHECK-INSTANCE:CAPS" title="G_TYPE_CHECK_INSTANCE()">G_TYPE_CHECK_INSTANCE</a>               (instance)
81 #define             <a class="link" href="gobject-Type-Information.html#G-TYPE-CHECK-INSTANCE-CAST:CAPS" title="G_TYPE_CHECK_INSTANCE_CAST()">G_TYPE_CHECK_INSTANCE_CAST</a>          (instance,
82                                                          g_type,
83                                                          c_type)
84 #define             <a class="link" href="gobject-Type-Information.html#G-TYPE-CHECK-INSTANCE-TYPE:CAPS" title="G_TYPE_CHECK_INSTANCE_TYPE()">G_TYPE_CHECK_INSTANCE_TYPE</a>          (instance,
85                                                          g_type)
86 #define             <a class="link" href="gobject-Type-Information.html#G-TYPE-CHECK-CLASS-CAST:CAPS" title="G_TYPE_CHECK_CLASS_CAST()">G_TYPE_CHECK_CLASS_CAST</a>             (g_class,
87                                                          g_type,
88                                                          c_type)
89 #define             <a class="link" href="gobject-Type-Information.html#G-TYPE-CHECK-CLASS-TYPE:CAPS" title="G_TYPE_CHECK_CLASS_TYPE()">G_TYPE_CHECK_CLASS_TYPE</a>             (g_class,
90                                                          g_type)
91 #define             <a class="link" href="gobject-Type-Information.html#G-TYPE-CHECK-VALUE:CAPS" title="G_TYPE_CHECK_VALUE()">G_TYPE_CHECK_VALUE</a>                  (value)
92 #define             <a class="link" href="gobject-Type-Information.html#G-TYPE-CHECK-VALUE-TYPE:CAPS" title="G_TYPE_CHECK_VALUE_TYPE()">G_TYPE_CHECK_VALUE_TYPE</a>             (value,
93                                                          g_type)
94 #define             <a class="link" href="gobject-Type-Information.html#G-TYPE-FLAG-RESERVED-ID-BIT:CAPS" title="G_TYPE_FLAG_RESERVED_ID_BIT">G_TYPE_FLAG_RESERVED_ID_BIT</a>
95 <span class="returnvalue">void</span>                <a class="link" href="gobject-Type-Information.html#g-type-init" title="g_type_init ()">g_type_init</a>                         (<em class="parameter"><code><span class="type">void</span></code></em>);
96 enum                <a class="link" href="gobject-Type-Information.html#GTypeDebugFlags" title="enum GTypeDebugFlags">GTypeDebugFlags</a>;
97 <span class="returnvalue">void</span>                <a class="link" href="gobject-Type-Information.html#g-type-init-with-debug-flags" title="g_type_init_with_debug_flags ()">g_type_init_with_debug_flags</a>        (<em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GTypeDebugFlags" title="enum GTypeDebugFlags"><span class="type">GTypeDebugFlags</span></a> debug_flags</code></em>);
98 const <a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *       <a class="link" href="gobject-Type-Information.html#g-type-name" title="g_type_name ()">g_type_name</a>                         (<em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> type</code></em>);
99 <a href="./../glib/glib/glib-Quarks.html#GQuark"><span class="returnvalue">GQuark</span></a>              <a class="link" href="gobject-Type-Information.html#g-type-qname" title="g_type_qname ()">g_type_qname</a>                        (<em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> type</code></em>);
100 <a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="returnvalue">GType</span></a>               <a class="link" href="gobject-Type-Information.html#g-type-from-name" title="g_type_from_name ()">g_type_from_name</a>                    (<em class="parameter"><code>const <a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>);
101 <a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="returnvalue">GType</span></a>               <a class="link" href="gobject-Type-Information.html#g-type-parent" title="g_type_parent ()">g_type_parent</a>                       (<em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> type</code></em>);
102 <a href="./../glib/glib/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>               <a class="link" href="gobject-Type-Information.html#g-type-depth" title="g_type_depth ()">g_type_depth</a>                        (<em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> type</code></em>);
103 <a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="returnvalue">GType</span></a>               <a class="link" href="gobject-Type-Information.html#g-type-next-base" title="g_type_next_base ()">g_type_next_base</a>                    (<em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> leaf_type</code></em>,
104                                                          <em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> root_type</code></em>);
105 <a href="./../glib/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="gobject-Type-Information.html#g-type-is-a" title="g_type_is_a ()">g_type_is_a</a>                         (<em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> type</code></em>,
106                                                          <em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> is_a_type</code></em>);
107 <a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>            <a class="link" href="gobject-Type-Information.html#g-type-class-ref" title="g_type_class_ref ()">g_type_class_ref</a>                    (<em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> type</code></em>);
108 <a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>            <a class="link" href="gobject-Type-Information.html#g-type-class-peek" title="g_type_class_peek ()">g_type_class_peek</a>                   (<em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> type</code></em>);
109 <a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>            <a class="link" href="gobject-Type-Information.html#g-type-class-peek-static" title="g_type_class_peek_static ()">g_type_class_peek_static</a>            (<em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> type</code></em>);
110 <span class="returnvalue">void</span>                <a class="link" href="gobject-Type-Information.html#g-type-class-unref" title="g_type_class_unref ()">g_type_class_unref</a>                  (<em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> g_class</code></em>);
111 <a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>            <a class="link" href="gobject-Type-Information.html#g-type-class-peek-parent" title="g_type_class_peek_parent ()">g_type_class_peek_parent</a>            (<em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> g_class</code></em>);
112 <span class="returnvalue">void</span>                <a class="link" href="gobject-Type-Information.html#g-type-class-add-private" title="g_type_class_add_private ()">g_type_class_add_private</a>            (<em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> g_class</code></em>,
113                                                          <em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> private_size</code></em>);
114 <span class="returnvalue">void</span>                <a class="link" href="gobject-Type-Information.html#g-type-add-class-private" title="g_type_add_class_private ()">g_type_add_class_private</a>            (<em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> class_type</code></em>,
115                                                          <em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> private_size</code></em>);
116 <a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>            <a class="link" href="gobject-Type-Information.html#g-type-interface-peek" title="g_type_interface_peek ()">g_type_interface_peek</a>               (<em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> instance_class</code></em>,
117                                                          <em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> iface_type</code></em>);
118 <a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>            <a class="link" href="gobject-Type-Information.html#g-type-interface-peek-parent" title="g_type_interface_peek_parent ()">g_type_interface_peek_parent</a>        (<em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> g_iface</code></em>);
119 <a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>            <a class="link" href="gobject-Type-Information.html#g-type-default-interface-ref" title="g_type_default_interface_ref ()">g_type_default_interface_ref</a>        (<em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> g_type</code></em>);
120 <a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>            <a class="link" href="gobject-Type-Information.html#g-type-default-interface-peek" title="g_type_default_interface_peek ()">g_type_default_interface_peek</a>       (<em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> g_type</code></em>);
121 <span class="returnvalue">void</span>                <a class="link" href="gobject-Type-Information.html#g-type-default-interface-unref" title="g_type_default_interface_unref ()">g_type_default_interface_unref</a>      (<em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> g_iface</code></em>);
122 <a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="returnvalue">GType</span></a> *             <a class="link" href="gobject-Type-Information.html#g-type-children" title="g_type_children ()">g_type_children</a>                     (<em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> type</code></em>,
123                                                          <em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> *n_children</code></em>);
124 <a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="returnvalue">GType</span></a> *             <a class="link" href="gobject-Type-Information.html#g-type-interfaces" title="g_type_interfaces ()">g_type_interfaces</a>                   (<em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> type</code></em>,
125                                                          <em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> *n_interfaces</code></em>);
126 <a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="returnvalue">GType</span></a> *             <a class="link" href="gobject-Type-Information.html#g-type-interface-prerequisites" title="g_type_interface_prerequisites ()">g_type_interface_prerequisites</a>      (<em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> interface_type</code></em>,
127                                                          <em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> *n_prerequisites</code></em>);
128 <span class="returnvalue">void</span>                <a class="link" href="gobject-Type-Information.html#g-type-set-qdata" title="g_type_set_qdata ()">g_type_set_qdata</a>                    (<em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> type</code></em>,
129                                                          <em class="parameter"><code><a href="./../glib/glib/glib-Quarks.html#GQuark"><span class="type">GQuark</span></a> quark</code></em>,
130                                                          <em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>);
131 <a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>            <a class="link" href="gobject-Type-Information.html#g-type-get-qdata" title="g_type_get_qdata ()">g_type_get_qdata</a>                    (<em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> type</code></em>,
132                                                          <em class="parameter"><code><a href="./../glib/glib/glib-Quarks.html#GQuark"><span class="type">GQuark</span></a> quark</code></em>);
133 <span class="returnvalue">void</span>                <a class="link" href="gobject-Type-Information.html#g-type-query" title="g_type_query ()">g_type_query</a>                        (<em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> type</code></em>,
134                                                          <em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GTypeQuery" title="struct GTypeQuery"><span class="type">GTypeQuery</span></a> *query</code></em>);
135 struct              <a class="link" href="gobject-Type-Information.html#GTypeQuery" title="struct GTypeQuery">GTypeQuery</a>;
136 <span class="returnvalue">void</span>                (<a class="link" href="gobject-Type-Information.html#GBaseInitFunc" title="GBaseInitFunc ()">*GBaseInitFunc</a>)                    (<em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> g_class</code></em>);
137 <span class="returnvalue">void</span>                (<a class="link" href="gobject-Type-Information.html#GBaseFinalizeFunc" title="GBaseFinalizeFunc ()">*GBaseFinalizeFunc</a>)                (<em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> g_class</code></em>);
138 <span class="returnvalue">void</span>                (<a class="link" href="gobject-Type-Information.html#GClassInitFunc" title="GClassInitFunc ()">*GClassInitFunc</a>)                   (<em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> g_class</code></em>,
139                                                          <em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> class_data</code></em>);
140 <span class="returnvalue">void</span>                (<a class="link" href="gobject-Type-Information.html#GClassFinalizeFunc" title="GClassFinalizeFunc ()">*GClassFinalizeFunc</a>)               (<em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> g_class</code></em>,
141                                                          <em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> class_data</code></em>);
142 <span class="returnvalue">void</span>                (<a class="link" href="gobject-Type-Information.html#GInstanceInitFunc" title="GInstanceInitFunc ()">*GInstanceInitFunc</a>)                (<em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GTypeInstance" title="struct GTypeInstance"><span class="type">GTypeInstance</span></a> *instance</code></em>,
143                                                          <em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> g_class</code></em>);
144 <span class="returnvalue">void</span>                (<a class="link" href="gobject-Type-Information.html#GInterfaceInitFunc" title="GInterfaceInitFunc ()">*GInterfaceInitFunc</a>)               (<em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> g_iface</code></em>,
145                                                          <em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> iface_data</code></em>);
146 <span class="returnvalue">void</span>                (<a class="link" href="gobject-Type-Information.html#GInterfaceFinalizeFunc" title="GInterfaceFinalizeFunc ()">*GInterfaceFinalizeFunc</a>)           (<em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> g_iface</code></em>,
147                                                          <em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> iface_data</code></em>);
148 <a href="./../glib/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            (<a class="link" href="gobject-Type-Information.html#GTypeClassCacheFunc" title="GTypeClassCacheFunc ()">*GTypeClassCacheFunc</a>)              (<em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> cache_data</code></em>,
149                                                          <em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GTypeClass" title="struct GTypeClass"><span class="type">GTypeClass</span></a> *g_class</code></em>);
150 enum                <a class="link" href="gobject-Type-Information.html#GTypeFlags" title="enum GTypeFlags">GTypeFlags</a>;
151 enum                <a class="link" href="gobject-Type-Information.html#GTypeFundamentalFlags" title="enum GTypeFundamentalFlags">GTypeFundamentalFlags</a>;
152 <a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="returnvalue">GType</span></a>               <a class="link" href="gobject-Type-Information.html#g-type-register-static" title="g_type_register_static ()">g_type_register_static</a>              (<em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> parent_type</code></em>,
153                                                          <em class="parameter"><code>const <a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *type_name</code></em>,
154                                                          <em class="parameter"><code>const <a class="link" href="gobject-Type-Information.html#GTypeInfo" title="struct GTypeInfo"><span class="type">GTypeInfo</span></a> *info</code></em>,
155                                                          <em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GTypeFlags" title="enum GTypeFlags"><span class="type">GTypeFlags</span></a> flags</code></em>);
156 <a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="returnvalue">GType</span></a>               <a class="link" href="gobject-Type-Information.html#g-type-register-static-simple" title="g_type_register_static_simple ()">g_type_register_static_simple</a>       (<em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> parent_type</code></em>,
157                                                          <em class="parameter"><code>const <a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *type_name</code></em>,
158                                                          <em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> class_size</code></em>,
159                                                          <em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GClassInitFunc" title="GClassInitFunc ()"><span class="type">GClassInitFunc</span></a> class_init</code></em>,
160                                                          <em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> instance_size</code></em>,
161                                                          <em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GInstanceInitFunc" title="GInstanceInitFunc ()"><span class="type">GInstanceInitFunc</span></a> instance_init</code></em>,
162                                                          <em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GTypeFlags" title="enum GTypeFlags"><span class="type">GTypeFlags</span></a> flags</code></em>);
163 <a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="returnvalue">GType</span></a>               <a class="link" href="gobject-Type-Information.html#g-type-register-dynamic" title="g_type_register_dynamic ()">g_type_register_dynamic</a>             (<em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> parent_type</code></em>,
164                                                          <em class="parameter"><code>const <a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *type_name</code></em>,
165                                                          <em class="parameter"><code><a class="link" href="GTypePlugin.html" title="GTypePlugin"><span class="type">GTypePlugin</span></a> *plugin</code></em>,
166                                                          <em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GTypeFlags" title="enum GTypeFlags"><span class="type">GTypeFlags</span></a> flags</code></em>);
167 <a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="returnvalue">GType</span></a>               <a class="link" href="gobject-Type-Information.html#g-type-register-fundamental" title="g_type_register_fundamental ()">g_type_register_fundamental</a>         (<em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> type_id</code></em>,
168                                                          <em class="parameter"><code>const <a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *type_name</code></em>,
169                                                          <em class="parameter"><code>const <a class="link" href="gobject-Type-Information.html#GTypeInfo" title="struct GTypeInfo"><span class="type">GTypeInfo</span></a> *info</code></em>,
170                                                          <em class="parameter"><code>const <a class="link" href="gobject-Type-Information.html#GTypeFundamentalInfo" title="struct GTypeFundamentalInfo"><span class="type">GTypeFundamentalInfo</span></a> *finfo</code></em>,
171                                                          <em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GTypeFlags" title="enum GTypeFlags"><span class="type">GTypeFlags</span></a> flags</code></em>);
172 <span class="returnvalue">void</span>                <a class="link" href="gobject-Type-Information.html#g-type-add-interface-static" title="g_type_add_interface_static ()">g_type_add_interface_static</a>         (<em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> instance_type</code></em>,
173                                                          <em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> interface_type</code></em>,
174                                                          <em class="parameter"><code>const <a class="link" href="gobject-Type-Information.html#GInterfaceInfo" title="struct GInterfaceInfo"><span class="type">GInterfaceInfo</span></a> *info</code></em>);
175 <span class="returnvalue">void</span>                <a class="link" href="gobject-Type-Information.html#g-type-add-interface-dynamic" title="g_type_add_interface_dynamic ()">g_type_add_interface_dynamic</a>        (<em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> instance_type</code></em>,
176                                                          <em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> interface_type</code></em>,
177                                                          <em class="parameter"><code><a class="link" href="GTypePlugin.html" title="GTypePlugin"><span class="type">GTypePlugin</span></a> *plugin</code></em>);
178 <span class="returnvalue">void</span>                <a class="link" href="gobject-Type-Information.html#g-type-interface-add-prerequisite" title="g_type_interface_add_prerequisite ()">g_type_interface_add_prerequisite</a>   (<em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> interface_type</code></em>,
179                                                          <em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> prerequisite_type</code></em>);
180 <a class="link" href="GTypePlugin.html" title="GTypePlugin"><span class="returnvalue">GTypePlugin</span></a> *       <a class="link" href="gobject-Type-Information.html#g-type-get-plugin" title="g_type_get_plugin ()">g_type_get_plugin</a>                   (<em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> type</code></em>);
181 <a class="link" href="GTypePlugin.html" title="GTypePlugin"><span class="returnvalue">GTypePlugin</span></a> *       <a class="link" href="gobject-Type-Information.html#g-type-interface-get-plugin" title="g_type_interface_get_plugin ()">g_type_interface_get_plugin</a>         (<em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> instance_type</code></em>,
182                                                          <em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> interface_type</code></em>);
183 <a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="returnvalue">GType</span></a>               <a class="link" href="gobject-Type-Information.html#g-type-fundamental-next" title="g_type_fundamental_next ()">g_type_fundamental_next</a>             (<em class="parameter"><code><span class="type">void</span></code></em>);
184 <a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="returnvalue">GType</span></a>               <a class="link" href="gobject-Type-Information.html#g-type-fundamental" title="g_type_fundamental ()">g_type_fundamental</a>                  (<em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> type_id</code></em>);
185 <a class="link" href="gobject-Type-Information.html#GTypeInstance" title="struct GTypeInstance"><span class="returnvalue">GTypeInstance</span></a> *     <a class="link" href="gobject-Type-Information.html#g-type-create-instance" title="g_type_create_instance ()">g_type_create_instance</a>              (<em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> type</code></em>);
186 <span class="returnvalue">void</span>                <a class="link" href="gobject-Type-Information.html#g-type-free-instance" title="g_type_free_instance ()">g_type_free_instance</a>                (<em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GTypeInstance" title="struct GTypeInstance"><span class="type">GTypeInstance</span></a> *instance</code></em>);
187 <span class="returnvalue">void</span>                <a class="link" href="gobject-Type-Information.html#g-type-add-class-cache-func" title="g_type_add_class_cache_func ()">g_type_add_class_cache_func</a>         (<em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> cache_data</code></em>,
188                                                          <em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GTypeClassCacheFunc" title="GTypeClassCacheFunc ()"><span class="type">GTypeClassCacheFunc</span></a> cache_func</code></em>);
189 <span class="returnvalue">void</span>                <a class="link" href="gobject-Type-Information.html#g-type-remove-class-cache-func" title="g_type_remove_class_cache_func ()">g_type_remove_class_cache_func</a>      (<em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> cache_data</code></em>,
190                                                          <em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GTypeClassCacheFunc" title="GTypeClassCacheFunc ()"><span class="type">GTypeClassCacheFunc</span></a> cache_func</code></em>);
191 <span class="returnvalue">void</span>                <a class="link" href="gobject-Type-Information.html#g-type-class-unref-uncached" title="g_type_class_unref_uncached ()">g_type_class_unref_uncached</a>         (<em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> g_class</code></em>);
192 <span class="returnvalue">void</span>                <a class="link" href="gobject-Type-Information.html#g-type-add-interface-check" title="g_type_add_interface_check ()">g_type_add_interface_check</a>          (<em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> check_data</code></em>,
193                                                          <em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GTypeInterfaceCheckFunc" title="GTypeInterfaceCheckFunc ()"><span class="type">GTypeInterfaceCheckFunc</span></a> check_func</code></em>);
194 <span class="returnvalue">void</span>                <a class="link" href="gobject-Type-Information.html#g-type-remove-interface-check" title="g_type_remove_interface_check ()">g_type_remove_interface_check</a>       (<em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> check_data</code></em>,
195                                                          <em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GTypeInterfaceCheckFunc" title="GTypeInterfaceCheckFunc ()"><span class="type">GTypeInterfaceCheckFunc</span></a> check_func</code></em>);
196 <span class="returnvalue">void</span>                (<a class="link" href="gobject-Type-Information.html#GTypeInterfaceCheckFunc" title="GTypeInterfaceCheckFunc ()">*GTypeInterfaceCheckFunc</a>)          (<em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> check_data</code></em>,
197                                                          <em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> g_iface</code></em>);
198 <a class="link" href="gobject-Type-Information.html#GTypeValueTable" title="struct GTypeValueTable"><span class="returnvalue">GTypeValueTable</span></a> *   <a class="link" href="gobject-Type-Information.html#g-type-value-table-peek" title="g_type_value_table_peek ()">g_type_value_table_peek</a>             (<em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> type</code></em>);
199 #define             <a class="link" href="gobject-Type-Information.html#G-DEFINE-TYPE:CAPS" title="G_DEFINE_TYPE()">G_DEFINE_TYPE</a>                       (TN,
200                                                          t_n,
201                                                          T_P)
202 #define             <a class="link" href="gobject-Type-Information.html#G-DEFINE-TYPE-WITH-CODE:CAPS" title="G_DEFINE_TYPE_WITH_CODE()">G_DEFINE_TYPE_WITH_CODE</a>             (TN,
203                                                          t_n,
204                                                          T_P,
205                                                          _C_)
206 #define             <a class="link" href="gobject-Type-Information.html#G-DEFINE-ABSTRACT-TYPE:CAPS" title="G_DEFINE_ABSTRACT_TYPE()">G_DEFINE_ABSTRACT_TYPE</a>              (TN,
207                                                          t_n,
208                                                          T_P)
209 #define             <a class="link" href="gobject-Type-Information.html#G-DEFINE-ABSTRACT-TYPE-WITH-CODE:CAPS" title="G_DEFINE_ABSTRACT_TYPE_WITH_CODE()">G_DEFINE_ABSTRACT_TYPE_WITH_CODE</a>    (TN,
210                                                          t_n,
211                                                          T_P,
212                                                          _C_)
213 #define             <a class="link" href="gobject-Type-Information.html#G-DEFINE-INTERFACE:CAPS" title="G_DEFINE_INTERFACE()">G_DEFINE_INTERFACE</a>                  (TN,
214                                                          t_n,
215                                                          T_P)
216 #define             <a class="link" href="gobject-Type-Information.html#G-DEFINE-INTERFACE-WITH-CODE:CAPS" title="G_DEFINE_INTERFACE_WITH_CODE()">G_DEFINE_INTERFACE_WITH_CODE</a>        (TN,
217                                                          t_n,
218                                                          T_P,
219                                                          _C_)
220 #define             <a class="link" href="gobject-Type-Information.html#G-IMPLEMENT-INTERFACE:CAPS" title="G_IMPLEMENT_INTERFACE()">G_IMPLEMENT_INTERFACE</a>               (TYPE_IFACE,
221                                                          iface_init)
222 #define             <a class="link" href="gobject-Type-Information.html#G-DEFINE-TYPE-EXTENDED:CAPS" title="G_DEFINE_TYPE_EXTENDED()">G_DEFINE_TYPE_EXTENDED</a>              (TN,
223                                                          t_n,
224                                                          T_P,
225                                                          _f_,
226                                                          _C_)
227 #define             <a class="link" href="gobject-Type-Information.html#G-DEFINE-BOXED-TYPE:CAPS" title="G_DEFINE_BOXED_TYPE()">G_DEFINE_BOXED_TYPE</a>                 (TypeName,
228                                                          type_name,
229                                                          copy_func,
230                                                          free_func)
231 #define             <a class="link" href="gobject-Type-Information.html#G-DEFINE-BOXED-TYPE-WITH-CODE:CAPS" title="G_DEFINE_BOXED_TYPE_WITH_CODE()">G_DEFINE_BOXED_TYPE_WITH_CODE</a>       (TypeName,
232                                                          type_name,
233                                                          copy_func,
234                                                          free_func,
235                                                          _C_)
236 #define             <a class="link" href="gobject-Type-Information.html#G-DEFINE-POINTER-TYPE:CAPS" title="G_DEFINE_POINTER_TYPE()">G_DEFINE_POINTER_TYPE</a>               (TypeName,
237                                                          type_name)
238 #define             <a class="link" href="gobject-Type-Information.html#G-DEFINE-POINTER-TYPE-WITH-CODE:CAPS" title="G_DEFINE_POINTER_TYPE_WITH_CODE()">G_DEFINE_POINTER_TYPE_WITH_CODE</a>     (TypeName,
239                                                          type_name,
240                                                          _C_)
241
242
243 #define             <a class="link" href="gobject-Type-Information.html#G-TYPE-INVALID:CAPS" title="G_TYPE_INVALID">G_TYPE_INVALID</a>
244 #define             <a class="link" href="gobject-Type-Information.html#G-TYPE-NONE:CAPS" title="G_TYPE_NONE">G_TYPE_NONE</a>
245 #define             <a class="link" href="gobject-Type-Information.html#G-TYPE-INTERFACE:CAPS" title="G_TYPE_INTERFACE">G_TYPE_INTERFACE</a>
246 #define             <a class="link" href="gobject-Type-Information.html#G-TYPE-CHAR:CAPS" title="G_TYPE_CHAR">G_TYPE_CHAR</a>
247 #define             <a class="link" href="gobject-Type-Information.html#G-TYPE-UCHAR:CAPS" title="G_TYPE_UCHAR">G_TYPE_UCHAR</a>
248 #define             <a class="link" href="gobject-Type-Information.html#G-TYPE-BOOLEAN:CAPS" title="G_TYPE_BOOLEAN">G_TYPE_BOOLEAN</a>
249 #define             <a class="link" href="gobject-Type-Information.html#G-TYPE-INT:CAPS" title="G_TYPE_INT">G_TYPE_INT</a>
250 #define             <a class="link" href="gobject-Type-Information.html#G-TYPE-UINT:CAPS" title="G_TYPE_UINT">G_TYPE_UINT</a>
251 #define             <a class="link" href="gobject-Type-Information.html#G-TYPE-LONG:CAPS" title="G_TYPE_LONG">G_TYPE_LONG</a>
252 #define             <a class="link" href="gobject-Type-Information.html#G-TYPE-ULONG:CAPS" title="G_TYPE_ULONG">G_TYPE_ULONG</a>
253 #define             <a class="link" href="gobject-Type-Information.html#G-TYPE-INT64:CAPS" title="G_TYPE_INT64">G_TYPE_INT64</a>
254 #define             <a class="link" href="gobject-Type-Information.html#G-TYPE-UINT64:CAPS" title="G_TYPE_UINT64">G_TYPE_UINT64</a>
255 #define             <a class="link" href="gobject-Type-Information.html#G-TYPE-ENUM:CAPS" title="G_TYPE_ENUM">G_TYPE_ENUM</a>
256 #define             <a class="link" href="gobject-Type-Information.html#G-TYPE-FLAGS:CAPS" title="G_TYPE_FLAGS">G_TYPE_FLAGS</a>
257 #define             <a class="link" href="gobject-Type-Information.html#G-TYPE-FLOAT:CAPS" title="G_TYPE_FLOAT">G_TYPE_FLOAT</a>
258 #define             <a class="link" href="gobject-Type-Information.html#G-TYPE-DOUBLE:CAPS" title="G_TYPE_DOUBLE">G_TYPE_DOUBLE</a>
259 #define             <a class="link" href="gobject-Type-Information.html#G-TYPE-STRING:CAPS" title="G_TYPE_STRING">G_TYPE_STRING</a>
260 #define             <a class="link" href="gobject-Type-Information.html#G-TYPE-POINTER:CAPS" title="G_TYPE_POINTER">G_TYPE_POINTER</a>
261 #define             <a class="link" href="gobject-Type-Information.html#G-TYPE-BOXED:CAPS" title="G_TYPE_BOXED">G_TYPE_BOXED</a>
262 #define             <a class="link" href="gobject-Type-Information.html#G-TYPE-PARAM:CAPS" title="G_TYPE_PARAM">G_TYPE_PARAM</a>
263 #define             <a class="link" href="gobject-Type-Information.html#G-TYPE-OBJECT:CAPS" title="G_TYPE_OBJECT">G_TYPE_OBJECT</a>
264 #define             <a class="link" href="gobject-Type-Information.html#G-TYPE-GTYPE:CAPS" title="G_TYPE_GTYPE">G_TYPE_GTYPE</a>
265 #define             <a class="link" href="gobject-Type-Information.html#G-TYPE-VARIANT:CAPS" title="G_TYPE_VARIANT">G_TYPE_VARIANT</a>
266
267 #define             <a class="link" href="gobject-Type-Information.html#G-TYPE-RESERVED-GLIB-FIRST:CAPS" title="G_TYPE_RESERVED_GLIB_FIRST">G_TYPE_RESERVED_GLIB_FIRST</a>
268 #define             <a class="link" href="gobject-Type-Information.html#G-TYPE-RESERVED-GLIB-LAST:CAPS" title="G_TYPE_RESERVED_GLIB_LAST">G_TYPE_RESERVED_GLIB_LAST</a>
269 #define             <a class="link" href="gobject-Type-Information.html#G-TYPE-RESERVED-BSE-FIRST:CAPS" title="G_TYPE_RESERVED_BSE_FIRST">G_TYPE_RESERVED_BSE_FIRST</a>
270 #define             <a class="link" href="gobject-Type-Information.html#G-TYPE-RESERVED-BSE-LAST:CAPS" title="G_TYPE_RESERVED_BSE_LAST">G_TYPE_RESERVED_BSE_LAST</a>
271 #define             <a class="link" href="gobject-Type-Information.html#G-TYPE-RESERVED-USER-FIRST:CAPS" title="G_TYPE_RESERVED_USER_FIRST">G_TYPE_RESERVED_USER_FIRST</a>
272 </pre>
273 </div>
274 <div class="refsect1">
275 <a name="gobject-Type-Information.description"></a><h2>Description</h2>
276 <p>
277 The GType API is the foundation of the GObject system.  It provides the
278 facilities for registering and managing all fundamental data types,
279 user-defined object and interface types.  Before using any GType
280 or GObject functions, <a class="link" href="gobject-Type-Information.html#g-type-init" title="g_type_init ()"><code class="function">g_type_init()</code></a> must be called to initialize the
281 type system.
282 </p>
283 <p>
284 For type creation and registration purposes, all types fall into one of
285 two categories: static or dynamic.  Static types are never loaded or
286 unloaded at run-time as dynamic types may be.  Static types are created
287 with <a class="link" href="gobject-Type-Information.html#g-type-register-static" title="g_type_register_static ()"><code class="function">g_type_register_static()</code></a> that gets type specific information passed
288 in via a <a class="link" href="gobject-Type-Information.html#GTypeInfo" title="struct GTypeInfo"><span class="type">GTypeInfo</span></a> structure.
289 Dynamic types are created with <a class="link" href="gobject-Type-Information.html#g-type-register-dynamic" title="g_type_register_dynamic ()"><code class="function">g_type_register_dynamic()</code></a> which takes a
290 <a class="link" href="GTypePlugin.html" title="GTypePlugin"><span class="type">GTypePlugin</span></a> structure instead. The remaining type information (the
291 <a class="link" href="gobject-Type-Information.html#GTypeInfo" title="struct GTypeInfo"><span class="type">GTypeInfo</span></a> structure) is retrieved during runtime through <a class="link" href="GTypePlugin.html" title="GTypePlugin"><span class="type">GTypePlugin</span></a>
292 and the g_type_plugin_*() API.
293 These registration functions are usually called only once from a
294 function whose only purpose is to return the type identifier for a
295 specific class.  Once the type (or class or interface) is registered,
296 it may be instantiated, inherited, or implemented depending on exactly
297 what sort of type it is.
298 There is also a third registration function for registering fundamental
299 types called <a class="link" href="gobject-Type-Information.html#g-type-register-fundamental" title="g_type_register_fundamental ()"><code class="function">g_type_register_fundamental()</code></a> which requires both a <a class="link" href="gobject-Type-Information.html#GTypeInfo" title="struct GTypeInfo"><span class="type">GTypeInfo</span></a>
300 structure and a <a class="link" href="gobject-Type-Information.html#GTypeFundamentalInfo" title="struct GTypeFundamentalInfo"><span class="type">GTypeFundamentalInfo</span></a> structure but it is seldom used
301 since most fundamental types are predefined rather than user-defined.
302 </p>
303 <p>
304 Type instance and class structs are limited to a total of 64 KiB,
305 including all parent types. Similarly, type instances' private data
306 (as created by <a class="link" href="gobject-Type-Information.html#g-type-class-add-private" title="g_type_class_add_private ()"><code class="function">g_type_class_add_private()</code></a>) are limited to a total of
307 64 KiB. If a type instance needs a large static buffer, allocate it
308 separately (typically by using <a href="./../glib/glib/glib-Arrays.html#GArray"><span class="type">GArray</span></a> or <a href="./../glib/glib/glib-Pointer-Arrays.html#GPtrArray"><span class="type">GPtrArray</span></a>) and put a pointer
309 to the buffer in the structure.
310 </p>
311 <p>
312 A final word about type names.
313 Such an identifier needs to be at least three characters long. There is no
314 upper length limit. The first character needs to be a letter (a-z or A-Z)
315 or an underscore '_'. Subsequent characters can be letters, numbers or
316 any of '-_+'.
317 </p>
318 </div>
319 <div class="refsect1">
320 <a name="gobject-Type-Information.details"></a><h2>Details</h2>
321 <div class="refsect2">
322 <a name="GType"></a><h3>GType</h3>
323 <p>
324 A numerical value which represents the unique identifier of a registered
325 type.
326 </p>
327 </div>
328 <hr>
329 <div class="refsect2">
330 <a name="G-TYPE-FUNDAMENTAL:CAPS"></a><h3>G_TYPE_FUNDAMENTAL()</h3>
331 <pre class="programlisting">#define G_TYPE_FUNDAMENTAL(type) (g_type_fundamental (type))
332 </pre>
333 <p>
334 The fundamental type which is the ancestor of <em class="parameter"><code>type</code></em>.
335 Fundamental types are types that serve as ultimate bases for the derived types, 
336 thus they are the roots of distinct inheritance hierarchies.
337 </p>
338 <div class="variablelist"><table border="0">
339 <col align="left" valign="top">
340 <tbody><tr>
341 <td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
342 <td>A <a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> value.</td>
343 </tr></tbody>
344 </table></div>
345 </div>
346 <hr>
347 <div class="refsect2">
348 <a name="G-TYPE-FUNDAMENTAL-MAX:CAPS"></a><h3>G_TYPE_FUNDAMENTAL_MAX</h3>
349 <pre class="programlisting">#define G_TYPE_FUNDAMENTAL_MAX             (255 &lt;&lt; G_TYPE_FUNDAMENTAL_SHIFT)
350 </pre>
351 <p>
352 An integer constant that represents the number of identifiers reserved
353 for types that are assigned at compile-time.
354 </p>
355 </div>
356 <hr>
357 <div class="refsect2">
358 <a name="G-TYPE-MAKE-FUNDAMENTAL:CAPS"></a><h3>G_TYPE_MAKE_FUNDAMENTAL()</h3>
359 <pre class="programlisting">#define G_TYPE_MAKE_FUNDAMENTAL(x) ((GType) ((x) &lt;&lt; G_TYPE_FUNDAMENTAL_SHIFT))
360 </pre>
361 <p>
362 Get the type ID for the fundamental type number <em class="parameter"><code>x</code></em>.
363 Use <a class="link" href="gobject-Type-Information.html#g-type-fundamental-next" title="g_type_fundamental_next ()"><code class="function">g_type_fundamental_next()</code></a> instead of this macro to create new fundamental 
364 types.
365 </p>
366 <div class="variablelist"><table border="0">
367 <col align="left" valign="top">
368 <tbody>
369 <tr>
370 <td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
371 <td>the fundamental type number.</td>
372 </tr>
373 <tr>
374 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
375 <td>the GType</td>
376 </tr>
377 </tbody>
378 </table></div>
379 </div>
380 <hr>
381 <div class="refsect2">
382 <a name="G-TYPE-IS-ABSTRACT:CAPS"></a><h3>G_TYPE_IS_ABSTRACT()</h3>
383 <pre class="programlisting">#define G_TYPE_IS_ABSTRACT(type)                (g_type_test_flags ((type), G_TYPE_FLAG_ABSTRACT))
384 </pre>
385 <p>
386 Checks if <em class="parameter"><code>type</code></em> is an abstract type.  An abstract type cannot be
387 instantiated and is normally used as an abstract base class for
388 derived classes.
389 </p>
390 <div class="variablelist"><table border="0">
391 <col align="left" valign="top">
392 <tbody>
393 <tr>
394 <td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
395 <td>A <a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> value.</td>
396 </tr>
397 <tr>
398 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
399 <td>
400 <a href="./../glib/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> on success.</td>
401 </tr>
402 </tbody>
403 </table></div>
404 </div>
405 <hr>
406 <div class="refsect2">
407 <a name="G-TYPE-IS-DERIVED:CAPS"></a><h3>G_TYPE_IS_DERIVED()</h3>
408 <pre class="programlisting">#define G_TYPE_IS_DERIVED(type)                 ((type) &gt; G_TYPE_FUNDAMENTAL_MAX)
409 </pre>
410 <p>
411 Checks if <em class="parameter"><code>type</code></em> is derived (or in object-oriented terminology:
412 inherited) from another type (this holds true for all non-fundamental
413 types).
414 </p>
415 <div class="variablelist"><table border="0">
416 <col align="left" valign="top">
417 <tbody>
418 <tr>
419 <td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
420 <td>A <a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> value.</td>
421 </tr>
422 <tr>
423 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
424 <td>
425 <a href="./../glib/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> on success.</td>
426 </tr>
427 </tbody>
428 </table></div>
429 </div>
430 <hr>
431 <div class="refsect2">
432 <a name="G-TYPE-IS-FUNDAMENTAL:CAPS"></a><h3>G_TYPE_IS_FUNDAMENTAL()</h3>
433 <pre class="programlisting">#define G_TYPE_IS_FUNDAMENTAL(type)             ((type) &lt;= G_TYPE_FUNDAMENTAL_MAX)
434 </pre>
435 <p>
436 Checks if <em class="parameter"><code>type</code></em> is a fundamental type.
437 </p>
438 <div class="variablelist"><table border="0">
439 <col align="left" valign="top">
440 <tbody>
441 <tr>
442 <td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
443 <td>A <a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> value.</td>
444 </tr>
445 <tr>
446 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
447 <td>
448 <a href="./../glib/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> on success.</td>
449 </tr>
450 </tbody>
451 </table></div>
452 </div>
453 <hr>
454 <div class="refsect2">
455 <a name="G-TYPE-IS-VALUE-TYPE:CAPS"></a><h3>G_TYPE_IS_VALUE_TYPE()</h3>
456 <pre class="programlisting">#define G_TYPE_IS_VALUE_TYPE(type)              (g_type_check_is_value_type (type))
457 </pre>
458 <p>
459 Checks if <em class="parameter"><code>type</code></em> is a value type and can be used with <a class="link" href="gobject-Generic-values.html#g-value-init" title="g_value_init ()"><code class="function">g_value_init()</code></a>.
460 </p>
461 <div class="variablelist"><table border="0">
462 <col align="left" valign="top">
463 <tbody>
464 <tr>
465 <td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
466 <td>A <a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> value.</td>
467 </tr>
468 <tr>
469 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
470 <td>
471 <a href="./../glib/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> on success.</td>
472 </tr>
473 </tbody>
474 </table></div>
475 </div>
476 <hr>
477 <div class="refsect2">
478 <a name="G-TYPE-HAS-VALUE-TABLE:CAPS"></a><h3>G_TYPE_HAS_VALUE_TABLE()</h3>
479 <pre class="programlisting">#define G_TYPE_HAS_VALUE_TABLE(type)            (g_type_value_table_peek (type) != NULL)
480 </pre>
481 <p>
482 Checks if <em class="parameter"><code>type</code></em> has a <a class="link" href="gobject-Type-Information.html#GTypeValueTable" title="struct GTypeValueTable"><span class="type">GTypeValueTable</span></a>.
483 </p>
484 <div class="variablelist"><table border="0">
485 <col align="left" valign="top">
486 <tbody>
487 <tr>
488 <td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
489 <td>A <a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> value.</td>
490 </tr>
491 <tr>
492 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
493 <td>
494 <a href="./../glib/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> on success.</td>
495 </tr>
496 </tbody>
497 </table></div>
498 </div>
499 <hr>
500 <div class="refsect2">
501 <a name="G-TYPE-IS-CLASSED:CAPS"></a><h3>G_TYPE_IS_CLASSED()</h3>
502 <pre class="programlisting">#define G_TYPE_IS_CLASSED(type)                 (g_type_test_flags ((type), G_TYPE_FLAG_CLASSED))
503 </pre>
504 <p>
505 Checks if <em class="parameter"><code>type</code></em> is a classed type.
506 </p>
507 <div class="variablelist"><table border="0">
508 <col align="left" valign="top">
509 <tbody>
510 <tr>
511 <td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
512 <td>A <a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> value.</td>
513 </tr>
514 <tr>
515 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
516 <td>
517 <a href="./../glib/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> on success.</td>
518 </tr>
519 </tbody>
520 </table></div>
521 </div>
522 <hr>
523 <div class="refsect2">
524 <a name="G-TYPE-IS-INSTANTIATABLE:CAPS"></a><h3>G_TYPE_IS_INSTANTIATABLE()</h3>
525 <pre class="programlisting">#define G_TYPE_IS_INSTANTIATABLE(type)          (g_type_test_flags ((type), G_TYPE_FLAG_INSTANTIATABLE))
526 </pre>
527 <p>
528 Checks if <em class="parameter"><code>type</code></em> can be instantiated.  Instantiation is the
529 process of creating an instance (object) of this type.
530 </p>
531 <div class="variablelist"><table border="0">
532 <col align="left" valign="top">
533 <tbody>
534 <tr>
535 <td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
536 <td>A <a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> value.</td>
537 </tr>
538 <tr>
539 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
540 <td>
541 <a href="./../glib/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> on success.</td>
542 </tr>
543 </tbody>
544 </table></div>
545 </div>
546 <hr>
547 <div class="refsect2">
548 <a name="G-TYPE-IS-DERIVABLE:CAPS"></a><h3>G_TYPE_IS_DERIVABLE()</h3>
549 <pre class="programlisting">#define G_TYPE_IS_DERIVABLE(type)               (g_type_test_flags ((type), G_TYPE_FLAG_DERIVABLE))
550 </pre>
551 <p>
552 Checks if <em class="parameter"><code>type</code></em> is a derivable type.  A derivable type can
553 be used as the base class of a flat (single-level) class hierarchy.
554 </p>
555 <div class="variablelist"><table border="0">
556 <col align="left" valign="top">
557 <tbody>
558 <tr>
559 <td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
560 <td>A <a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> value.</td>
561 </tr>
562 <tr>
563 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
564 <td>
565 <a href="./../glib/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> on success.</td>
566 </tr>
567 </tbody>
568 </table></div>
569 </div>
570 <hr>
571 <div class="refsect2">
572 <a name="G-TYPE-IS-DEEP-DERIVABLE:CAPS"></a><h3>G_TYPE_IS_DEEP_DERIVABLE()</h3>
573 <pre class="programlisting">#define G_TYPE_IS_DEEP_DERIVABLE(type)          (g_type_test_flags ((type), G_TYPE_FLAG_DEEP_DERIVABLE))
574 </pre>
575 <p>
576 Checks if <em class="parameter"><code>type</code></em> is a deep derivable type.  A deep derivable type
577 can be used as the base class of a deep (multi-level) class hierarchy.
578 </p>
579 <div class="variablelist"><table border="0">
580 <col align="left" valign="top">
581 <tbody>
582 <tr>
583 <td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
584 <td>A <a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> value.</td>
585 </tr>
586 <tr>
587 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
588 <td>
589 <a href="./../glib/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> on success.</td>
590 </tr>
591 </tbody>
592 </table></div>
593 </div>
594 <hr>
595 <div class="refsect2">
596 <a name="G-TYPE-IS-INTERFACE:CAPS"></a><h3>G_TYPE_IS_INTERFACE()</h3>
597 <pre class="programlisting">#define G_TYPE_IS_INTERFACE(type)               (G_TYPE_FUNDAMENTAL (type) == G_TYPE_INTERFACE)
598 </pre>
599 <p>
600 Checks if <em class="parameter"><code>type</code></em> is an interface type.
601 An interface type provides a pure API, the implementation
602 of which is provided by another type (which is then said to conform
603 to the interface).  GLib interfaces are somewhat analogous to Java
604 interfaces and C++ classes containing only pure virtual functions, 
605 with the difference that GType interfaces are not derivable (but see
606 <a class="link" href="gobject-Type-Information.html#g-type-interface-add-prerequisite" title="g_type_interface_add_prerequisite ()"><code class="function">g_type_interface_add_prerequisite()</code></a> for an alternative).
607 </p>
608 <div class="variablelist"><table border="0">
609 <col align="left" valign="top">
610 <tbody>
611 <tr>
612 <td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
613 <td>A <a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> value.</td>
614 </tr>
615 <tr>
616 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
617 <td>
618 <a href="./../glib/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> on success.</td>
619 </tr>
620 </tbody>
621 </table></div>
622 </div>
623 <hr>
624 <div class="refsect2">
625 <a name="GTypeInterface"></a><h3>struct GTypeInterface</h3>
626 <pre class="programlisting">struct GTypeInterface {
627 };
628 </pre>
629 <p>
630 An opaque structure used as the base of all interface types.
631 </p>
632 </div>
633 <hr>
634 <div class="refsect2">
635 <a name="GTypeInstance"></a><h3>struct GTypeInstance</h3>
636 <pre class="programlisting">struct GTypeInstance {
637 };
638 </pre>
639 <p>
640 An opaque structure used as the base of all type instances.
641 </p>
642 </div>
643 <hr>
644 <div class="refsect2">
645 <a name="GTypeClass"></a><h3>struct GTypeClass</h3>
646 <pre class="programlisting">struct GTypeClass {
647 };
648 </pre>
649 <p>
650 An opaque structure used as the base of all classes.
651 </p>
652 </div>
653 <hr>
654 <div class="refsect2">
655 <a name="GTypeInfo"></a><h3>struct GTypeInfo</h3>
656 <pre class="programlisting">struct GTypeInfo {
657   /* interface types, classed types, instantiated types */
658   guint16                class_size;
659   
660   GBaseInitFunc          base_init;
661   GBaseFinalizeFunc      base_finalize;
662   
663   /* interface types, classed types, instantiated types */
664   GClassInitFunc         class_init;
665   GClassFinalizeFunc     class_finalize;
666   gconstpointer          class_data;
667   
668   /* instantiated types */
669   guint16                instance_size;
670   guint16                n_preallocs;
671   GInstanceInitFunc      instance_init;
672   
673   /* value handling */
674   const GTypeValueTable *value_table;
675 };
676 </pre>
677 <p>
678 This structure is used to provide the type system with the information
679 required to initialize and destruct (finalize) a type's class and
680 its instances.
681 The initialized structure is passed to the <a class="link" href="gobject-Type-Information.html#g-type-register-static" title="g_type_register_static ()"><code class="function">g_type_register_static()</code></a> function
682 (or is copied into the provided <a class="link" href="gobject-Type-Information.html#GTypeInfo" title="struct GTypeInfo"><span class="type">GTypeInfo</span></a> structure in the
683 <a class="link" href="GTypePlugin.html#g-type-plugin-complete-type-info" title="g_type_plugin_complete_type_info ()"><code class="function">g_type_plugin_complete_type_info()</code></a>). The type system will perform a deep
684 copy of this structure, so its memory does not need to be persistent
685 across invocation of <a class="link" href="gobject-Type-Information.html#g-type-register-static" title="g_type_register_static ()"><code class="function">g_type_register_static()</code></a>.
686 </p>
687 <div class="variablelist"><table border="0">
688 <col align="left" valign="top">
689 <tbody>
690 <tr>
691 <td><p><span class="term"><a href="./../glib/glib/glib-Basic-Types.html#guint16"><span class="type">guint16</span></a> <em class="structfield"><code><a name="GTypeInfo.class-size"></a>class_size</code></em>;</span></p></td>
692 <td>Size of the class structure (required for interface, classed and instantiatable types).</td>
693 </tr>
694 <tr>
695 <td><p><span class="term"><a class="link" href="gobject-Type-Information.html#GBaseInitFunc" title="GBaseInitFunc ()"><span class="type">GBaseInitFunc</span></a> <em class="structfield"><code><a name="GTypeInfo.base-init"></a>base_init</code></em>;</span></p></td>
696 <td>Location of the base initialization function (optional).</td>
697 </tr>
698 <tr>
699 <td><p><span class="term"><a class="link" href="gobject-Type-Information.html#GBaseFinalizeFunc" title="GBaseFinalizeFunc ()"><span class="type">GBaseFinalizeFunc</span></a> <em class="structfield"><code><a name="GTypeInfo.base-finalize"></a>base_finalize</code></em>;</span></p></td>
700 <td>Location of the base finalization function (optional).</td>
701 </tr>
702 <tr>
703 <td><p><span class="term"><a class="link" href="gobject-Type-Information.html#GClassInitFunc" title="GClassInitFunc ()"><span class="type">GClassInitFunc</span></a> <em class="structfield"><code><a name="GTypeInfo.class-init"></a>class_init</code></em>;</span></p></td>
704 <td>Location of the class initialization function for
705 classed and instantiatable types. Location of the default vtable
706 inititalization function for interface types. (optional) This function
707 is used both to fill in virtual functions in the class or default vtable,
708 and to do type-specific setup such as registering signals and object
709 properties.</td>
710 </tr>
711 <tr>
712 <td><p><span class="term"><a class="link" href="gobject-Type-Information.html#GClassFinalizeFunc" title="GClassFinalizeFunc ()"><span class="type">GClassFinalizeFunc</span></a> <em class="structfield"><code><a name="GTypeInfo.class-finalize"></a>class_finalize</code></em>;</span></p></td>
713 <td>Location of the class finalization function for
714 classed and instantiatable types. Location fo the default vtable
715 finalization function for interface types. (optional)</td>
716 </tr>
717 <tr>
718 <td><p><span class="term"><a href="./../glib/glib/glib-Basic-Types.html#gconstpointer"><span class="type">gconstpointer</span></a> <em class="structfield"><code><a name="GTypeInfo.class-data"></a>class_data</code></em>;</span></p></td>
719 <td>User-supplied data passed to the class init/finalize functions.</td>
720 </tr>
721 <tr>
722 <td><p><span class="term"><a href="./../glib/glib/glib-Basic-Types.html#guint16"><span class="type">guint16</span></a> <em class="structfield"><code><a name="GTypeInfo.instance-size"></a>instance_size</code></em>;</span></p></td>
723 <td>Size of the instance (object) structure (required for instantiatable types only).</td>
724 </tr>
725 <tr>
726 <td><p><span class="term"><a href="./../glib/glib/glib-Basic-Types.html#guint16"><span class="type">guint16</span></a> <em class="structfield"><code><a name="GTypeInfo.n-preallocs"></a>n_preallocs</code></em>;</span></p></td>
727 <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 href="./../glib/glib/glib-Memory-Slices.html">slice allocator</a> now.</td>
728 </tr>
729 <tr>
730 <td><p><span class="term"><a class="link" href="gobject-Type-Information.html#GInstanceInitFunc" title="GInstanceInitFunc ()"><span class="type">GInstanceInitFunc</span></a> <em class="structfield"><code><a name="GTypeInfo.instance-init"></a>instance_init</code></em>;</span></p></td>
731 <td>Location of the instance initialization function (optional, for instantiatable types only).</td>
732 </tr>
733 <tr>
734 <td><p><span class="term">const <a class="link" href="gobject-Type-Information.html#GTypeValueTable" title="struct GTypeValueTable"><span class="type">GTypeValueTable</span></a> *<em class="structfield"><code><a name="GTypeInfo.value-table"></a>value_table</code></em>;</span></p></td>
735 <td>A <a class="link" href="gobject-Type-Information.html#GTypeValueTable" title="struct GTypeValueTable"><span class="type">GTypeValueTable</span></a> function table for generic handling of GValues of this type (usually only
736 useful for fundamental types).</td>
737 </tr>
738 </tbody>
739 </table></div>
740 </div>
741 <hr>
742 <div class="refsect2">
743 <a name="GTypeFundamentalInfo"></a><h3>struct GTypeFundamentalInfo</h3>
744 <pre class="programlisting">struct GTypeFundamentalInfo {
745   GTypeFundamentalFlags  type_flags;
746 };
747 </pre>
748 <p>
749 A structure that provides information to the type system which is
750 used specifically for managing fundamental types.
751 </p>
752 <div class="variablelist"><table border="0">
753 <col align="left" valign="top">
754 <tbody><tr>
755 <td><p><span class="term"><a class="link" href="gobject-Type-Information.html#GTypeFundamentalFlags" title="enum GTypeFundamentalFlags"><span class="type">GTypeFundamentalFlags</span></a> <em class="structfield"><code><a name="GTypeFundamentalInfo.type-flags"></a>type_flags</code></em>;</span></p></td>
756 <td>
757 <a class="link" href="gobject-Type-Information.html#GTypeFundamentalFlags" title="enum GTypeFundamentalFlags"><span class="type">GTypeFundamentalFlags</span></a> describing the characteristics of the fundamental type</td>
758 </tr></tbody>
759 </table></div>
760 </div>
761 <hr>
762 <div class="refsect2">
763 <a name="GInterfaceInfo"></a><h3>struct GInterfaceInfo</h3>
764 <pre class="programlisting">struct GInterfaceInfo {
765   GInterfaceInitFunc     interface_init;
766   GInterfaceFinalizeFunc interface_finalize;
767   gpointer               interface_data;
768 };
769 </pre>
770 <p>
771 A structure that provides information to the type system which is
772 used specifically for managing interface types.
773 </p>
774 <div class="variablelist"><table border="0">
775 <col align="left" valign="top">
776 <tbody>
777 <tr>
778 <td><p><span class="term"><a class="link" href="gobject-Type-Information.html#GInterfaceInitFunc" title="GInterfaceInitFunc ()"><span class="type">GInterfaceInitFunc</span></a> <em class="structfield"><code><a name="GInterfaceInfo.interface-init"></a>interface_init</code></em>;</span></p></td>
779 <td>location of the interface initialization function</td>
780 </tr>
781 <tr>
782 <td><p><span class="term"><a class="link" href="gobject-Type-Information.html#GInterfaceFinalizeFunc" title="GInterfaceFinalizeFunc ()"><span class="type">GInterfaceFinalizeFunc</span></a> <em class="structfield"><code><a name="GInterfaceInfo.interface-finalize"></a>interface_finalize</code></em>;</span></p></td>
783 <td>location of the interface finalization function</td>
784 </tr>
785 <tr>
786 <td><p><span class="term"><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> <em class="structfield"><code><a name="GInterfaceInfo.interface-data"></a>interface_data</code></em>;</span></p></td>
787 <td>user-supplied data passed to the interface init/finalize functions</td>
788 </tr>
789 </tbody>
790 </table></div>
791 </div>
792 <hr>
793 <div class="refsect2">
794 <a name="GTypeValueTable"></a><h3>struct GTypeValueTable</h3>
795 <pre class="programlisting">struct GTypeValueTable {
796   void     (*value_init)         (GValue       *value);
797   void     (*value_free)         (GValue       *value);
798   void     (*value_copy)         (const GValue *src_value,
799                                   GValue       *dest_value);
800   /* varargs functionality (optional) */
801   gpointer (*value_peek_pointer) (const GValue *value);
802   gchar     *collect_format;
803   gchar*   (*collect_value)      (GValue       *value,
804                                   guint         n_collect_values,
805                                   GTypeCValue  *collect_values,
806                                   guint         collect_flags);
807   gchar     *lcopy_format;
808   gchar*   (*lcopy_value)        (const GValue *value,
809                                   guint         n_collect_values,
810                                   GTypeCValue  *collect_values,
811                                   guint         collect_flags);
812 };
813 </pre>
814 <p>
815 The <a class="link" href="gobject-Type-Information.html#GTypeValueTable" title="struct GTypeValueTable"><span class="type">GTypeValueTable</span></a> provides the functions required by the <a class="link" href="gobject-Generic-values.html#GValue" title="GValue"><span class="type">GValue</span></a> implementation,
816 to serve as a container for values of a type.
817 </p>
818 <div class="variablelist"><table border="0">
819 <col align="left" valign="top">
820 <tbody>
821 <tr>
822 <td><p><span class="term"><em class="structfield"><code><a name="GTypeValueTable.value-init"></a>value_init</code></em> ()</span></p></td>
823 <td>Default initialize <em class="parameter"><code>values</code></em> contents by poking values
824 directly into the value-&gt;data array. The data array of
825 the <a class="link" href="gobject-Generic-values.html#GValue" title="GValue"><span class="type">GValue</span></a> passed into this function was zero-filled
826 with <code class="function"><code class="function">memset()</code></code>, so no care has to
827 be taken to free any
828 old contents. E.g. for the implementation of a string
829 value that may never be <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, the implementation might
830 look like:
831 <div class="informalexample">
832   <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
833     <tbody>
834       <tr>
835         <td class="listing_lines" align="right"><pre>1</pre></td>
836         <td class="listing_code"><pre class="programlisting"><span class="normal">value</span><span class="symbol">-&gt;</span><span class="normal">data</span><span class="symbol">[</span><span class="number">0</span><span class="symbol">].</span><span class="normal">v_pointer </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="./../glib/glib/glib-String-Utility-Functions.html#g-strdup">g_strdup</a></span><span class="normal"> </span><span class="symbol">(</span><span class="string">""</span><span class="symbol">);</span></pre></td>
837       </tr>
838     </tbody>
839   </table>
840 </div>
841
842 </td>
843 </tr>
844 <tr>
845 <td><p><span class="term"><em class="structfield"><code><a name="GTypeValueTable.value-free"></a>value_free</code></em> ()</span></p></td>
846 <td>Free any old contents that might be left in the
847 data array of the passed in <em class="parameter"><code>value</code></em>. No resources may
848 remain allocated through the <a class="link" href="gobject-Generic-values.html#GValue" title="GValue"><span class="type">GValue</span></a> contents after
849 this function returns. E.g. for our above string type:
850 <div class="informalexample">
851   <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
852     <tbody>
853       <tr>
854         <td class="listing_lines" align="right"><pre>1
855 2
856 3</pre></td>
857         <td class="listing_code"><pre class="programlisting"><span class="comment">// only free strings without a specific flag for static storage</span>
858 <span class="keyword">if</span><span class="normal"> </span><span class="symbol">(!(</span><span class="normal">value</span><span class="symbol">-&gt;</span><span class="normal">data</span><span class="symbol">[</span><span class="number">1</span><span class="symbol">].</span><span class="normal">v_uint </span><span class="symbol">&amp;</span><span class="normal"> G_VALUE_NOCOPY_CONTENTS</span><span class="symbol">))</span>
859 <span class="function"><a href="./../glib/glib/glib-Memory-Allocation.html#g-free">g_free</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">value</span><span class="symbol">-&gt;</span><span class="normal">data</span><span class="symbol">[</span><span class="number">0</span><span class="symbol">].</span><span class="normal">v_pointer</span><span class="symbol">);</span></pre></td>
860       </tr>
861     </tbody>
862   </table>
863 </div>
864
865 </td>
866 </tr>
867 <tr>
868 <td><p><span class="term"><em class="structfield"><code><a name="GTypeValueTable.value-copy"></a>value_copy</code></em> ()</span></p></td>
869 <td>
870 <em class="parameter"><code>dest_value</code></em> is a <a class="link" href="gobject-Generic-values.html#GValue" title="GValue"><span class="type">GValue</span></a> with zero-filled data section
871 and <em class="parameter"><code>src_value</code></em> is a properly setup <a class="link" href="gobject-Generic-values.html#GValue" title="GValue"><span class="type">GValue</span></a> of same or
872 derived type.
873 The purpose of this function is to copy the contents of
874 <em class="parameter"><code>src_value</code></em> into <em class="parameter"><code>dest_value</code></em> in a way, that even after
875 <em class="parameter"><code>src_value</code></em> has been freed, the contents of <em class="parameter"><code>dest_value</code></em>
876 remain valid. String type example:
877 <div class="informalexample">
878   <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
879     <tbody>
880       <tr>
881         <td class="listing_lines" align="right"><pre>1</pre></td>
882         <td class="listing_code"><pre class="programlisting"><span class="normal">dest_value</span><span class="symbol">-&gt;</span><span class="normal">data</span><span class="symbol">[</span><span class="number">0</span><span class="symbol">].</span><span class="normal">v_pointer </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="./../glib/glib/glib-String-Utility-Functions.html#g-strdup">g_strdup</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">src_value</span><span class="symbol">-&gt;</span><span class="normal">data</span><span class="symbol">[</span><span class="number">0</span><span class="symbol">].</span><span class="normal">v_pointer</span><span class="symbol">);</span></pre></td>
883       </tr>
884     </tbody>
885   </table>
886 </div>
887
888 </td>
889 </tr>
890 <tr>
891 <td><p><span class="term"><em class="structfield"><code><a name="GTypeValueTable.value-peek-pointer"></a>value_peek_pointer</code></em> ()</span></p></td>
892 <td>If the value contents fit into a pointer, such as objects
893 or strings, return this pointer, so the caller can peek at
894 the current contents. To extend on our above string example:
895 <div class="informalexample">
896   <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
897     <tbody>
898       <tr>
899         <td class="listing_lines" align="right"><pre>1</pre></td>
900         <td class="listing_code"><pre class="programlisting"><span class="keyword">return</span><span class="normal"> value</span><span class="symbol">-&gt;</span><span class="normal">data</span><span class="symbol">[</span><span class="number">0</span><span class="symbol">].</span><span class="normal">v_pointer</span><span class="symbol">;</span></pre></td>
901       </tr>
902     </tbody>
903   </table>
904 </div>
905
906 </td>
907 </tr>
908 <tr>
909 <td><p><span class="term"><a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *<em class="structfield"><code><a name="GTypeValueTable.collect-format"></a>collect_format</code></em>;</span></p></td>
910 <td>A string format describing how to collect the contents of
911 this value bit-by-bit. Each character in the format represents
912 an argument to be collected, and the characters themselves indicate
913 the type of the argument. Currently supported arguments are:
914 <div class="variablelist"><table border="0">
915 <col align="left" valign="top">
916 <tbody>
917 <tr>
918 <td><p><span class="term"></span></p></td>
919 <td><p>
920 'i' - Integers. passed as collect_values[].v_int.
921 </p></td>
922 </tr>
923 <tr>
924 <td><p><span class="term"></span></p></td>
925 <td><p>
926 'l' - Longs. passed as collect_values[].v_long.
927 </p></td>
928 </tr>
929 <tr>
930 <td><p><span class="term"></span></p></td>
931 <td><p>
932 'd' - Doubles. passed as collect_values[].v_double.
933 </p></td>
934 </tr>
935 <tr>
936 <td><p><span class="term"></span></p></td>
937 <td><p>
938 'p' - Pointers. passed as collect_values[].v_pointer.
939 </p></td>
940 </tr>
941 </tbody>
942 </table></div>
943 It should be noted that for variable argument list construction,
944 ANSI C promotes every type smaller than an integer to an int, and
945 floats to doubles. So for collection of short int or char, 'i'
946 needs to be used, and for collection of floats 'd'.</td>
947 </tr>
948 <tr>
949 <td><p><span class="term"><em class="structfield"><code><a name="GTypeValueTable.collect-value"></a>collect_value</code></em> ()</span></p></td>
950 <td>The <code class="function">collect_value()</code> function is responsible for converting the
951 values collected from a variable argument list into contents
952 suitable for storage in a GValue. This function should setup
953 <em class="parameter"><code>value</code></em> similar to <code class="function">value_init()</code>; e.g. for a string value that
954 does not allow <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> pointers, it needs to either spew an error,
955 or do an implicit conversion by storing an empty string.
956 The <em class="parameter"><code>value</code></em> passed in to this function has a zero-filled data
957 array, so just like for <code class="function">value_init()</code> it is guaranteed to not
958 contain any old contents that might need freeing.
959 <em class="parameter"><code>n_collect_values</code></em> is exactly the string length of <em class="parameter"><code>collect_format</code></em>,
960 and <em class="parameter"><code>collect_values</code></em> is an array of unions <a class="link" href="gobject-Varargs-Value-Collection.html#GTypeCValue" title="union GTypeCValue"><span class="type">GTypeCValue</span></a> with
961 length <em class="parameter"><code>n_collect_values</code></em>, containing the collected values
962 according to <em class="parameter"><code>collect_format</code></em>.
963 <em class="parameter"><code>collect_flags</code></em> is an argument provided as a hint by the caller.
964 It may contain the flag <code class="literal">G_VALUE_NOCOPY_CONTENTS</code> indicating,
965 that the collected value contents may be considered "static"
966 for the duration of the <em class="parameter"><code>value</code></em> lifetime.
967 Thus an extra copy of the contents stored in <em class="parameter"><code>collect_values</code></em> is
968 not required for assignment to <em class="parameter"><code>value</code></em>.
969 For our above string example, we continue with:
970 <div class="informalexample">
971   <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
972     <tbody>
973       <tr>
974         <td class="listing_lines" align="right"><pre>1
975 2
976 3
977 4
978 5
979 6
980 7
981 8
982 9
983 10
984 11</pre></td>
985         <td class="listing_code"><pre class="programlisting"><span class="keyword">if</span><span class="normal"> </span><span class="symbol">(!</span><span class="normal">collect_values</span><span class="symbol">[</span><span class="number">0</span><span class="symbol">].</span><span class="normal">v_pointer</span><span class="symbol">)</span>
986 <span class="normal">value</span><span class="symbol">-&gt;</span><span class="normal">data</span><span class="symbol">[</span><span class="number">0</span><span class="symbol">].</span><span class="normal">v_pointer </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="./../glib/glib/glib-String-Utility-Functions.html#g-strdup">g_strdup</a></span><span class="normal"> </span><span class="symbol">(</span><span class="string">""</span><span class="symbol">);</span>
987 <span class="keyword">else</span><span class="normal"> </span><span class="keyword">if</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">collect_flags </span><span class="symbol">&amp;</span><span class="normal"> G_VALUE_NOCOPY_CONTENTS</span><span class="symbol">)</span>
988 <span class="cbracket">{</span>
989 <span class="normal">value</span><span class="symbol">-&gt;</span><span class="normal">data</span><span class="symbol">[</span><span class="number">0</span><span class="symbol">].</span><span class="normal">v_pointer </span><span class="symbol">=</span><span class="normal"> collect_values</span><span class="symbol">[</span><span class="number">0</span><span class="symbol">].</span><span class="normal">v_pointer</span><span class="symbol">;</span>
990 <span class="comment">// keep a flag for the value_free() implementation to not free this string</span>
991 <span class="normal">value</span><span class="symbol">-&gt;</span><span class="normal">data</span><span class="symbol">[</span><span class="number">1</span><span class="symbol">].</span><span class="normal">v_uint </span><span class="symbol">=</span><span class="normal"> G_VALUE_NOCOPY_CONTENTS</span><span class="symbol">;</span>
992 <span class="cbracket">}</span>
993 <span class="keyword">else</span>
994 <span class="normal">value</span><span class="symbol">-&gt;</span><span class="normal">data</span><span class="symbol">[</span><span class="number">0</span><span class="symbol">].</span><span class="normal">v_pointer </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="./../glib/glib/glib-String-Utility-Functions.html#g-strdup">g_strdup</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">collect_values</span><span class="symbol">[</span><span class="number">0</span><span class="symbol">].</span><span class="normal">v_pointer</span><span class="symbol">);</span>
995 <span class="keyword">return</span><span class="normal"> <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">;</span></pre></td>
996       </tr>
997     </tbody>
998   </table>
999 </div>
1000
1001 It should be noted, that it is generally a bad idea to follow the
1002 <span class="type">G_VALUE_NOCOPY_CONTENTS</span> hint for reference counted types. Due to
1003 reentrancy requirements and reference count assertions performed
1004 by the signal emission code, reference counts should always be
1005 incremented for reference counted contents stored in the value-&gt;data
1006 array.  To deviate from our string example for a moment, and taking
1007 a look at an exemplary implementation for <code class="function">collect_value()</code> of
1008 <a class="link" href="gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a>:
1009 <div class="informalexample">
1010   <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
1011     <tbody>
1012       <tr>
1013         <td class="listing_lines" align="right"><pre>1
1014 2
1015 3
1016 4
1017 5
1018 6
1019 7
1020 8
1021 9
1022 10</pre></td>
1023         <td class="listing_code"><pre class="programlisting"><span class="keyword">if</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">collect_values</span><span class="symbol">[</span><span class="number">0</span><span class="symbol">].</span><span class="normal">v_pointer</span><span class="symbol">)</span>
1024 <span class="cbracket">{</span>
1025 <span class="usertype">GObject</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">object </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="gobject-The-Base-Object-Type.html#G-OBJECT:CAPS">G_OBJECT</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">collect_values</span><span class="symbol">[</span><span class="number">0</span><span class="symbol">].</span><span class="normal">v_pointer</span><span class="symbol">);</span>
1026 <span class="comment">// never honour G_VALUE_NOCOPY_CONTENTS for ref-counted types</span>
1027 <span class="normal">value</span><span class="symbol">-&gt;</span><span class="normal">data</span><span class="symbol">[</span><span class="number">0</span><span class="symbol">].</span><span class="normal">v_pointer </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="gobject-The-Base-Object-Type.html#g-object-ref">g_object_ref</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">object</span><span class="symbol">);</span>
1028 <span class="keyword">return</span><span class="normal"> <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">;</span>
1029 <span class="cbracket">}</span>
1030 <span class="keyword">else</span>
1031 <span class="keyword">return</span><span class="normal"> </span><span class="function"><a href="./../glib/glib/glib-String-Utility-Functions.html#g-strdup-printf">g_strdup_printf</a></span><span class="normal"> </span><span class="symbol">(</span><span class="string">"Object passed as invalid NULL pointer"</span><span class="symbol">);</span>
1032 <span class="cbracket">}</span></pre></td>
1033       </tr>
1034     </tbody>
1035   </table>
1036 </div>
1037
1038 The reference count for valid objects is always incremented,
1039 regardless of <em class="parameter"><code>collect_flags</code></em>. For invalid objects, the example
1040 returns a newly allocated string without altering <em class="parameter"><code>value</code></em>.
1041 Upon success, <code class="function">collect_value()</code> needs to return <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. If, however,
1042 an error condition occurred, <code class="function">collect_value()</code> may spew an
1043 error by returning a newly allocated non-<a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> string, giving
1044 a suitable description of the error condition.
1045 The calling code makes no assumptions about the <em class="parameter"><code>value</code></em>
1046 contents being valid upon error returns, <em class="parameter"><code>value</code></em>
1047 is simply thrown away without further freeing. As such, it is
1048 a good idea to not allocate <a class="link" href="gobject-Generic-values.html#GValue" title="GValue"><span class="type">GValue</span></a> contents, prior to returning
1049 an error, however, <code class="function">collect_values()</code> is not obliged to return
1050 a correctly setup <em class="parameter"><code>value</code></em> for error returns, simply because
1051 any non-<a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> return is considered a fatal condition so further
1052 program behaviour is undefined.</td>
1053 </tr>
1054 <tr>
1055 <td><p><span class="term"><a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *<em class="structfield"><code><a name="GTypeValueTable.lcopy-format"></a>lcopy_format</code></em>;</span></p></td>
1056 <td>Format description of the arguments to collect for <em class="parameter"><code>lcopy_value</code></em>,
1057 analogous to <em class="parameter"><code>collect_format</code></em>. Usually, <em class="parameter"><code>lcopy_format</code></em> string consists
1058 only of 'p's to provide <code class="function">lcopy_value()</code> with pointers to storage locations.</td>
1059 </tr>
1060 <tr>
1061 <td><p><span class="term"><em class="structfield"><code><a name="GTypeValueTable.lcopy-value"></a>lcopy_value</code></em> ()</span></p></td>
1062 <td>This function is responsible for storing the <em class="parameter"><code>value</code></em> contents into
1063 arguments passed through a variable argument list which got
1064 collected into <em class="parameter"><code>collect_values</code></em> according to <em class="parameter"><code>lcopy_format</code></em>.
1065 <em class="parameter"><code>n_collect_values</code></em> equals the string length of <em class="parameter"><code>lcopy_format</code></em>,
1066 and <em class="parameter"><code>collect_flags</code></em> may contain <code class="literal">G_VALUE_NOCOPY_CONTENTS</code>.
1067 In contrast to <code class="function">collect_value()</code>, <code class="function">lcopy_value()</code> is obliged to
1068 always properly support <code class="literal">G_VALUE_NOCOPY_CONTENTS</code>.
1069 Similar to <code class="function">collect_value()</code> the function may prematurely abort
1070 by returning a newly allocated string describing an error condition.
1071 To complete the string example:
1072 <div class="informalexample">
1073   <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
1074     <tbody>
1075       <tr>
1076         <td class="listing_lines" align="right"><pre>1
1077 2
1078 3
1079 4
1080 5
1081 6
1082 7</pre></td>
1083         <td class="listing_code"><pre class="programlisting"><span class="usertype">gchar</span><span class="normal"> </span><span class="symbol">**</span><span class="normal">string_p </span><span class="symbol">=</span><span class="normal"> collect_values</span><span class="symbol">[</span><span class="number">0</span><span class="symbol">].</span><span class="normal">v_pointer</span><span class="symbol">;</span>
1084 <span class="keyword">if</span><span class="normal"> </span><span class="symbol">(!</span><span class="normal">string_p</span><span class="symbol">)</span>
1085 <span class="keyword">return</span><span class="normal"> </span><span class="function"><a href="./../glib/glib/glib-String-Utility-Functions.html#g-strdup-printf">g_strdup_printf</a></span><span class="normal"> </span><span class="symbol">(</span><span class="string">"string location passed as NULL"</span><span class="symbol">);</span>
1086 <span class="keyword">if</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">collect_flags </span><span class="symbol">&amp;</span><span class="normal"> G_VALUE_NOCOPY_CONTENTS</span><span class="symbol">)</span>
1087 <span class="symbol">*</span><span class="normal">string_p </span><span class="symbol">=</span><span class="normal"> value</span><span class="symbol">-&gt;</span><span class="normal">data</span><span class="symbol">[</span><span class="number">0</span><span class="symbol">].</span><span class="normal">v_pointer</span><span class="symbol">;</span>
1088 <span class="keyword">else</span>
1089 <span class="symbol">*</span><span class="normal">string_p </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="./../glib/glib/glib-String-Utility-Functions.html#g-strdup">g_strdup</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">value</span><span class="symbol">-&gt;</span><span class="normal">data</span><span class="symbol">[</span><span class="number">0</span><span class="symbol">].</span><span class="normal">v_pointer</span><span class="symbol">);</span></pre></td>
1090       </tr>
1091     </tbody>
1092   </table>
1093 </div>
1094
1095 And an illustrative version of <code class="function">lcopy_value()</code> for
1096 reference-counted types:
1097 <div class="informalexample">
1098   <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
1099     <tbody>
1100       <tr>
1101         <td class="listing_lines" align="right"><pre>1
1102 2
1103 3
1104 4
1105 5
1106 6
1107 7
1108 8
1109 9
1110 10</pre></td>
1111         <td class="listing_code"><pre class="programlisting"><span class="usertype">GObject</span><span class="normal"> </span><span class="symbol">**</span><span class="normal">object_p </span><span class="symbol">=</span><span class="normal"> collect_values</span><span class="symbol">[</span><span class="number">0</span><span class="symbol">].</span><span class="normal">v_pointer</span><span class="symbol">;</span>
1112 <span class="keyword">if</span><span class="normal"> </span><span class="symbol">(!</span><span class="normal">object_p</span><span class="symbol">)</span>
1113 <span class="keyword">return</span><span class="normal"> </span><span class="function"><a href="./../glib/glib/glib-String-Utility-Functions.html#g-strdup-printf">g_strdup_printf</a></span><span class="normal"> </span><span class="symbol">(</span><span class="string">"object location passed as NULL"</span><span class="symbol">);</span>
1114 <span class="keyword">if</span><span class="normal"> </span><span class="symbol">(!</span><span class="normal">value</span><span class="symbol">-&gt;</span><span class="normal">data</span><span class="symbol">[</span><span class="number">0</span><span class="symbol">].</span><span class="normal">v_pointer</span><span class="symbol">)</span>
1115 <span class="symbol">*</span><span class="normal">object_p </span><span class="symbol">=</span><span class="normal"> <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">;</span>
1116 <span class="keyword">else</span><span class="normal"> </span><span class="keyword">if</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">collect_flags </span><span class="symbol">&amp;</span><span class="normal"> G_VALUE_NOCOPY_CONTENTS</span><span class="symbol">)</span><span class="normal"> </span><span class="comment">/* always honour */</span>
1117 <span class="symbol">*</span><span class="normal">object_p </span><span class="symbol">=</span><span class="normal"> value</span><span class="symbol">-&gt;</span><span class="normal">data</span><span class="symbol">[</span><span class="number">0</span><span class="symbol">].</span><span class="normal">v_pointer</span><span class="symbol">;</span>
1118 <span class="keyword">else</span>
1119 <span class="symbol">*</span><span class="normal">object_p </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="gobject-The-Base-Object-Type.html#g-object-ref">g_object_ref</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">value</span><span class="symbol">-&gt;</span><span class="normal">data</span><span class="symbol">[</span><span class="number">0</span><span class="symbol">].</span><span class="normal">v_pointer</span><span class="symbol">);</span>
1120 <span class="keyword">return</span><span class="normal"> <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">;</span></pre></td>
1121       </tr>
1122     </tbody>
1123   </table>
1124 </div>
1125
1126 </td>
1127 </tr>
1128 </tbody>
1129 </table></div>
1130 </div>
1131 <hr>
1132 <div class="refsect2">
1133 <a name="G-TYPE-FROM-INSTANCE:CAPS"></a><h3>G_TYPE_FROM_INSTANCE()</h3>
1134 <pre class="programlisting">#define G_TYPE_FROM_INSTANCE(instance)                          (G_TYPE_FROM_CLASS (((GTypeInstance*) (instance))-&gt;g_class))
1135 </pre>
1136 <p>
1137 Get the type identifier from a given <em class="parameter"><code>instance</code></em> structure. 
1138 </p>
1139 <p>
1140 This macro should only be used in type implementations.
1141 </p>
1142 <div class="variablelist"><table border="0">
1143 <col align="left" valign="top">
1144 <tbody>
1145 <tr>
1146 <td><p><span class="term"><em class="parameter"><code>instance</code></em> :</span></p></td>
1147 <td>Location of a valid <a class="link" href="gobject-Type-Information.html#GTypeInstance" title="struct GTypeInstance"><span class="type">GTypeInstance</span></a> structure.</td>
1148 </tr>
1149 <tr>
1150 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1151 <td>the <a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a>
1152 </td>
1153 </tr>
1154 </tbody>
1155 </table></div>
1156 </div>
1157 <hr>
1158 <div class="refsect2">
1159 <a name="G-TYPE-FROM-CLASS:CAPS"></a><h3>G_TYPE_FROM_CLASS()</h3>
1160 <pre class="programlisting">#define G_TYPE_FROM_CLASS(g_class)                              (((GTypeClass*) (g_class))-&gt;g_type)
1161 </pre>
1162 <p>
1163 Get the type identifier from a given <em class="parameter"><code>class</code></em> structure.
1164 </p>
1165 <p>
1166 This macro should only be used in type implementations.
1167 </p>
1168 <div class="variablelist"><table border="0">
1169 <col align="left" valign="top">
1170 <tbody>
1171 <tr>
1172 <td><p><span class="term"><em class="parameter"><code>g_class</code></em> :</span></p></td>
1173 <td>Location of a valid <a class="link" href="gobject-Type-Information.html#GTypeClass" title="struct GTypeClass"><span class="type">GTypeClass</span></a> structure.</td>
1174 </tr>
1175 <tr>
1176 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1177 <td>the <a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a>
1178 </td>
1179 </tr>
1180 </tbody>
1181 </table></div>
1182 </div>
1183 <hr>
1184 <div class="refsect2">
1185 <a name="G-TYPE-FROM-INTERFACE:CAPS"></a><h3>G_TYPE_FROM_INTERFACE()</h3>
1186 <pre class="programlisting">#define G_TYPE_FROM_INTERFACE(g_iface)                          (((GTypeInterface*) (g_iface))-&gt;g_type)
1187 </pre>
1188 <p>
1189 Get the type identifier from a given <em class="parameter"><code>interface</code></em> structure.
1190 </p>
1191 <p>
1192 This macro should only be used in type implementations.
1193 </p>
1194 <div class="variablelist"><table border="0">
1195 <col align="left" valign="top">
1196 <tbody>
1197 <tr>
1198 <td><p><span class="term"><em class="parameter"><code>g_iface</code></em> :</span></p></td>
1199 <td>Location of a valid <a class="link" href="gobject-Type-Information.html#GTypeInterface" title="struct GTypeInterface"><span class="type">GTypeInterface</span></a> structure.</td>
1200 </tr>
1201 <tr>
1202 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1203 <td>the <a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a>
1204 </td>
1205 </tr>
1206 </tbody>
1207 </table></div>
1208 </div>
1209 <hr>
1210 <div class="refsect2">
1211 <a name="G-TYPE-INSTANCE-GET-CLASS:CAPS"></a><h3>G_TYPE_INSTANCE_GET_CLASS()</h3>
1212 <pre class="programlisting">#define G_TYPE_INSTANCE_GET_CLASS(instance, g_type, c_type)     (_G_TYPE_IGC ((instance), (g_type), c_type))
1213 </pre>
1214 <p>
1215 Get the class structure of a given <em class="parameter"><code>instance</code></em>, casted
1216 to a specified ancestor type <em class="parameter"><code>g_type</code></em> of the instance.
1217 </p>
1218 <p>
1219 Note that while calling a <a class="link" href="gobject-Type-Information.html#GInstanceInitFunc" title="GInstanceInitFunc ()"><code class="function">GInstanceInitFunc()</code></a>, the class pointer gets
1220 modified, so it might not always return the expected pointer.
1221 </p>
1222 <p>
1223 This macro should only be used in type implementations.
1224 </p>
1225 <div class="variablelist"><table border="0">
1226 <col align="left" valign="top">
1227 <tbody>
1228 <tr>
1229 <td><p><span class="term"><em class="parameter"><code>instance</code></em> :</span></p></td>
1230 <td>Location of the <a class="link" href="gobject-Type-Information.html#GTypeInstance" title="struct GTypeInstance"><span class="type">GTypeInstance</span></a> structure.</td>
1231 </tr>
1232 <tr>
1233 <td><p><span class="term"><em class="parameter"><code>g_type</code></em> :</span></p></td>
1234 <td>The <a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> of the class to be returned.</td>
1235 </tr>
1236 <tr>
1237 <td><p><span class="term"><em class="parameter"><code>c_type</code></em> :</span></p></td>
1238 <td>The C type of the class structure.</td>
1239 </tr>
1240 <tr>
1241 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1242 <td>a pointer to the class structure</td>
1243 </tr>
1244 </tbody>
1245 </table></div>
1246 </div>
1247 <hr>
1248 <div class="refsect2">
1249 <a name="G-TYPE-INSTANCE-GET-INTERFACE:CAPS"></a><h3>G_TYPE_INSTANCE_GET_INTERFACE()</h3>
1250 <pre class="programlisting">#define G_TYPE_INSTANCE_GET_INTERFACE(instance, g_type, c_type) (_G_TYPE_IGI ((instance), (g_type), c_type))
1251 </pre>
1252 <p>
1253 Get the interface structure for interface <em class="parameter"><code>g_type</code></em> of a given <em class="parameter"><code>instance</code></em>.
1254 </p>
1255 <p>
1256 This macro should only be used in type implementations.
1257 </p>
1258 <div class="variablelist"><table border="0">
1259 <col align="left" valign="top">
1260 <tbody>
1261 <tr>
1262 <td><p><span class="term"><em class="parameter"><code>instance</code></em> :</span></p></td>
1263 <td>Location of the <a class="link" href="gobject-Type-Information.html#GTypeInstance" title="struct GTypeInstance"><span class="type">GTypeInstance</span></a> structure.</td>
1264 </tr>
1265 <tr>
1266 <td><p><span class="term"><em class="parameter"><code>g_type</code></em> :</span></p></td>
1267 <td>The <a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> of the interface to be returned.</td>
1268 </tr>
1269 <tr>
1270 <td><p><span class="term"><em class="parameter"><code>c_type</code></em> :</span></p></td>
1271 <td>The C type of the interface structure.</td>
1272 </tr>
1273 <tr>
1274 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1275 <td>a pointer to the interface structure</td>
1276 </tr>
1277 </tbody>
1278 </table></div>
1279 </div>
1280 <hr>
1281 <div class="refsect2">
1282 <a name="G-TYPE-INSTANCE-GET-PRIVATE:CAPS"></a><h3>G_TYPE_INSTANCE_GET_PRIVATE()</h3>
1283 <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)))
1284 </pre>
1285 <p>
1286 Gets the private structure for a particular type.
1287 The private structure must have been registered in the
1288 class_init function with <a class="link" href="gobject-Type-Information.html#g-type-class-add-private" title="g_type_class_add_private ()"><code class="function">g_type_class_add_private()</code></a>.
1289 </p>
1290 <p>
1291 This macro should only be used in type implementations.
1292 </p>
1293 <div class="variablelist"><table border="0">
1294 <col align="left" valign="top">
1295 <tbody>
1296 <tr>
1297 <td><p><span class="term"><em class="parameter"><code>instance</code></em> :</span></p></td>
1298 <td>the instance of a type deriving from <em class="parameter"><code>private_type</code></em>.</td>
1299 </tr>
1300 <tr>
1301 <td><p><span class="term"><em class="parameter"><code>g_type</code></em> :</span></p></td>
1302 <td>the type identifying which private data to retrieve.</td>
1303 </tr>
1304 <tr>
1305 <td><p><span class="term"><em class="parameter"><code>c_type</code></em> :</span></p></td>
1306 <td>The C type for the private structure.</td>
1307 </tr>
1308 <tr>
1309 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1310 <td>a pointer to the private data structure.</td>
1311 </tr>
1312 </tbody>
1313 </table></div>
1314 <p class="since">Since 2.4</p>
1315 </div>
1316 <hr>
1317 <div class="refsect2">
1318 <a name="G-TYPE-CLASS-GET-PRIVATE:CAPS"></a><h3>G_TYPE_CLASS_GET_PRIVATE()</h3>
1319 <pre class="programlisting">#define G_TYPE_CLASS_GET_PRIVATE(klass, g_type, c_type)   ((c_type*) g_type_class_get_private ((GTypeClass*) (klass), (g_type)))
1320 </pre>
1321 <p>
1322 Gets the private class structure for a particular type.
1323 The private structure must have been registered in the
1324 <code class="function">get_type()</code> function with <a class="link" href="gobject-Type-Information.html#g-type-add-class-private" title="g_type_add_class_private ()"><code class="function">g_type_add_class_private()</code></a>.
1325 </p>
1326 <p>
1327 This macro should only be used in type implementations.
1328 </p>
1329 <div class="variablelist"><table border="0">
1330 <col align="left" valign="top">
1331 <tbody>
1332 <tr>
1333 <td><p><span class="term"><em class="parameter"><code>klass</code></em> :</span></p></td>
1334 <td>the class of a type deriving from <em class="parameter"><code>private_type</code></em>.</td>
1335 </tr>
1336 <tr>
1337 <td><p><span class="term"><em class="parameter"><code>g_type</code></em> :</span></p></td>
1338 <td>the type identifying which private data to retrieve.</td>
1339 </tr>
1340 <tr>
1341 <td><p><span class="term"><em class="parameter"><code>c_type</code></em> :</span></p></td>
1342 <td>The C type for the private structure.</td>
1343 </tr>
1344 <tr>
1345 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1346 <td>a pointer to the private data structure.</td>
1347 </tr>
1348 </tbody>
1349 </table></div>
1350 <p class="since">Since 2.24</p>
1351 </div>
1352 <hr>
1353 <div class="refsect2">
1354 <a name="G-TYPE-CHECK-INSTANCE:CAPS"></a><h3>G_TYPE_CHECK_INSTANCE()</h3>
1355 <pre class="programlisting">#define G_TYPE_CHECK_INSTANCE(instance)                             (_G_TYPE_CHI ((GTypeInstance*) (instance)))
1356 </pre>
1357 <p>
1358 Checks if <em class="parameter"><code>instance</code></em> is a valid <a class="link" href="gobject-Type-Information.html#GTypeInstance" title="struct GTypeInstance"><span class="type">GTypeInstance</span></a> structure,
1359 otherwise issues a warning and returns <a href="./../glib/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>.
1360 </p>
1361 <p>
1362 This macro should only be used in type implementations.
1363 </p>
1364 <div class="variablelist"><table border="0">
1365 <col align="left" valign="top">
1366 <tbody>
1367 <tr>
1368 <td><p><span class="term"><em class="parameter"><code>instance</code></em> :</span></p></td>
1369 <td>Location of a <a class="link" href="gobject-Type-Information.html#GTypeInstance" title="struct GTypeInstance"><span class="type">GTypeInstance</span></a> structure.</td>
1370 </tr>
1371 <tr>
1372 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1373 <td>
1374 <a href="./../glib/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> on success.</td>
1375 </tr>
1376 </tbody>
1377 </table></div>
1378 </div>
1379 <hr>
1380 <div class="refsect2">
1381 <a name="G-TYPE-CHECK-INSTANCE-CAST:CAPS"></a><h3>G_TYPE_CHECK_INSTANCE_CAST()</h3>
1382 <pre class="programlisting">#define G_TYPE_CHECK_INSTANCE_CAST(instance, g_type, c_type)    (_G_TYPE_CIC ((instance), (g_type), c_type))
1383 </pre>
1384 <p>
1385 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>
1386 and issues a warning if this is not the case. Returns <em class="parameter"><code>instance</code></em> casted 
1387 to a pointer to <em class="parameter"><code>c_type</code></em>.
1388 </p>
1389 <p>
1390 This macro should only be used in type implementations.
1391 </p>
1392 <div class="variablelist"><table border="0">
1393 <col align="left" valign="top">
1394 <tbody>
1395 <tr>
1396 <td><p><span class="term"><em class="parameter"><code>instance</code></em> :</span></p></td>
1397 <td>Location of a <a class="link" href="gobject-Type-Information.html#GTypeInstance" title="struct GTypeInstance"><span class="type">GTypeInstance</span></a> structure.</td>
1398 </tr>
1399 <tr>
1400 <td><p><span class="term"><em class="parameter"><code>g_type</code></em> :</span></p></td>
1401 <td>The type to be returned.</td>
1402 </tr>
1403 <tr>
1404 <td><p><span class="term"><em class="parameter"><code>c_type</code></em> :</span></p></td>
1405 <td>The corresponding C type of <em class="parameter"><code>g_type</code></em>.</td>
1406 </tr>
1407 </tbody>
1408 </table></div>
1409 </div>
1410 <hr>
1411 <div class="refsect2">
1412 <a name="G-TYPE-CHECK-INSTANCE-TYPE:CAPS"></a><h3>G_TYPE_CHECK_INSTANCE_TYPE()</h3>
1413 <pre class="programlisting">#define G_TYPE_CHECK_INSTANCE_TYPE(instance, g_type)            (_G_TYPE_CIT ((instance), (g_type)))
1414 </pre>
1415 <p>
1416 Checks if <em class="parameter"><code>instance</code></em> is an instance of the type identified by <em class="parameter"><code>g_type</code></em>.
1417 </p>
1418 <p>
1419 This macro should only be used in type implementations.
1420 </p>
1421 <div class="variablelist"><table border="0">
1422 <col align="left" valign="top">
1423 <tbody>
1424 <tr>
1425 <td><p><span class="term"><em class="parameter"><code>instance</code></em> :</span></p></td>
1426 <td>Location of a <a class="link" href="gobject-Type-Information.html#GTypeInstance" title="struct GTypeInstance"><span class="type">GTypeInstance</span></a> structure.</td>
1427 </tr>
1428 <tr>
1429 <td><p><span class="term"><em class="parameter"><code>g_type</code></em> :</span></p></td>
1430 <td>The type to be checked</td>
1431 </tr>
1432 <tr>
1433 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1434 <td>
1435 <a href="./../glib/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> on success.</td>
1436 </tr>
1437 </tbody>
1438 </table></div>
1439 </div>
1440 <hr>
1441 <div class="refsect2">
1442 <a name="G-TYPE-CHECK-CLASS-CAST:CAPS"></a><h3>G_TYPE_CHECK_CLASS_CAST()</h3>
1443 <pre class="programlisting">#define G_TYPE_CHECK_CLASS_CAST(g_class, g_type, c_type)        (_G_TYPE_CCC ((g_class), (g_type), c_type))
1444 </pre>
1445 <p>
1446 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>
1447 and issues a warning if this is not the case. Returns <em class="parameter"><code>g_class</code></em> casted 
1448 to a pointer to <em class="parameter"><code>c_type</code></em>.
1449 </p>
1450 <p>
1451 This macro should only be used in type implementations.
1452 </p>
1453 <div class="variablelist"><table border="0">
1454 <col align="left" valign="top">
1455 <tbody>
1456 <tr>
1457 <td><p><span class="term"><em class="parameter"><code>g_class</code></em> :</span></p></td>
1458 <td>Location of a <a class="link" href="gobject-Type-Information.html#GTypeClass" title="struct GTypeClass"><span class="type">GTypeClass</span></a> structure.</td>
1459 </tr>
1460 <tr>
1461 <td><p><span class="term"><em class="parameter"><code>g_type</code></em> :</span></p></td>
1462 <td>The type to be returned.</td>
1463 </tr>
1464 <tr>
1465 <td><p><span class="term"><em class="parameter"><code>c_type</code></em> :</span></p></td>
1466 <td>The corresponding C type of class structure of <em class="parameter"><code>g_type</code></em>.</td>
1467 </tr>
1468 </tbody>
1469 </table></div>
1470 </div>
1471 <hr>
1472 <div class="refsect2">
1473 <a name="G-TYPE-CHECK-CLASS-TYPE:CAPS"></a><h3>G_TYPE_CHECK_CLASS_TYPE()</h3>
1474 <pre class="programlisting">#define G_TYPE_CHECK_CLASS_TYPE(g_class, g_type)                (_G_TYPE_CCT ((g_class), (g_type)))
1475 </pre>
1476 <p>
1477 Checks if <em class="parameter"><code>g_class</code></em> is a class structure of the type identified by 
1478 <em class="parameter"><code>g_type</code></em>.
1479 </p>
1480 <p>
1481 This macro should only be used in type implementations.
1482 </p>
1483 <div class="variablelist"><table border="0">
1484 <col align="left" valign="top">
1485 <tbody>
1486 <tr>
1487 <td><p><span class="term"><em class="parameter"><code>g_class</code></em> :</span></p></td>
1488 <td>Location of a <a class="link" href="gobject-Type-Information.html#GTypeClass" title="struct GTypeClass"><span class="type">GTypeClass</span></a> structure.</td>
1489 </tr>
1490 <tr>
1491 <td><p><span class="term"><em class="parameter"><code>g_type</code></em> :</span></p></td>
1492 <td>The type to be checked.</td>
1493 </tr>
1494 <tr>
1495 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1496 <td>
1497 <a href="./../glib/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> on success.</td>
1498 </tr>
1499 </tbody>
1500 </table></div>
1501 </div>
1502 <hr>
1503 <div class="refsect2">
1504 <a name="G-TYPE-CHECK-VALUE:CAPS"></a><h3>G_TYPE_CHECK_VALUE()</h3>
1505 <pre class="programlisting">#define G_TYPE_CHECK_VALUE(value)                           (_G_TYPE_CHV ((value)))
1506 </pre>
1507 <p>
1508 Checks if <em class="parameter"><code>value</code></em> has been initialized to hold values
1509 of a value type.
1510 </p>
1511 <p>
1512 This macro should only be used in type implementations.
1513 </p>
1514 <div class="variablelist"><table border="0">
1515 <col align="left" valign="top">
1516 <tbody>
1517 <tr>
1518 <td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
1519 <td>a <a class="link" href="gobject-Generic-values.html#GValue" title="GValue"><span class="type">GValue</span></a>
1520 </td>
1521 </tr>
1522 <tr>
1523 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1524 <td>
1525 <a href="./../glib/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> on success.</td>
1526 </tr>
1527 </tbody>
1528 </table></div>
1529 </div>
1530 <hr>
1531 <div class="refsect2">
1532 <a name="G-TYPE-CHECK-VALUE-TYPE:CAPS"></a><h3>G_TYPE_CHECK_VALUE_TYPE()</h3>
1533 <pre class="programlisting">#define G_TYPE_CHECK_VALUE_TYPE(value, g_type)                      (_G_TYPE_CVH ((value), (g_type)))
1534 </pre>
1535 <p>
1536 Checks if <em class="parameter"><code>value</code></em> has been initialized to hold values
1537 of type <em class="parameter"><code>g_type</code></em>. 
1538 </p>
1539 <p>
1540 This macro should only be used in type implementations.
1541 </p>
1542 <div class="variablelist"><table border="0">
1543 <col align="left" valign="top">
1544 <tbody>
1545 <tr>
1546 <td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
1547 <td>a <a class="link" href="gobject-Generic-values.html#GValue" title="GValue"><span class="type">GValue</span></a>
1548 </td>
1549 </tr>
1550 <tr>
1551 <td><p><span class="term"><em class="parameter"><code>g_type</code></em> :</span></p></td>
1552 <td>The type to be checked.</td>
1553 </tr>
1554 <tr>
1555 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1556 <td>
1557 <a href="./../glib/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> on success.</td>
1558 </tr>
1559 </tbody>
1560 </table></div>
1561 </div>
1562 <hr>
1563 <div class="refsect2">
1564 <a name="G-TYPE-FLAG-RESERVED-ID-BIT:CAPS"></a><h3>G_TYPE_FLAG_RESERVED_ID_BIT</h3>
1565 <pre class="programlisting">#define G_TYPE_FLAG_RESERVED_ID_BIT ((GType) (1 &lt;&lt; 0))
1566 </pre>
1567 <p>
1568 A bit in the type number that's supposed to be left untouched.
1569 </p>
1570 </div>
1571 <hr>
1572 <div class="refsect2">
1573 <a name="g-type-init"></a><h3>g_type_init ()</h3>
1574 <pre class="programlisting"><span class="returnvalue">void</span>                g_type_init                         (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
1575 <p>
1576 Prior to any use of the type system, <a class="link" href="gobject-Type-Information.html#g-type-init" title="g_type_init ()"><code class="function">g_type_init()</code></a> has to be called
1577 to initialize the type system and assorted other code portions
1578 (such as the various fundamental type implementations or the signal
1579 system).
1580 </p>
1581 <p>
1582 Since version 2.24 this also initializes the thread system
1583 </p>
1584 </div>
1585 <hr>
1586 <div class="refsect2">
1587 <a name="GTypeDebugFlags"></a><h3>enum GTypeDebugFlags</h3>
1588 <pre class="programlisting">typedef enum {
1589   G_TYPE_DEBUG_NONE = 0,
1590   G_TYPE_DEBUG_OBJECTS = 1 &lt;&lt; 0,
1591   G_TYPE_DEBUG_SIGNALS = 1 &lt;&lt; 1,
1592   G_TYPE_DEBUG_MASK = 0x03
1593 } GTypeDebugFlags;
1594 </pre>
1595 <p>
1596 The <span class="type">GTypeDebugFlags</span> enumeration values can be passed to
1597 <a class="link" href="gobject-Type-Information.html#g-type-init-with-debug-flags" title="g_type_init_with_debug_flags ()"><code class="function">g_type_init_with_debug_flags()</code></a> to trigger debugging messages during runtime.
1598 Note that the messages can also be triggered by setting the
1599 <code class="envar">GOBJECT_DEBUG</code> environment variable to a ':'-separated list of 
1600 "objects" and "signals".
1601 </p>
1602 <div class="variablelist"><table border="0">
1603 <col align="left" valign="top">
1604 <tbody>
1605 <tr>
1606 <td><p><a name="G-TYPE-DEBUG-NONE:CAPS"></a><span class="term"><code class="literal">G_TYPE_DEBUG_NONE</code></span></p></td>
1607 <td>Print no messages.
1608 </td>
1609 </tr>
1610 <tr>
1611 <td><p><a name="G-TYPE-DEBUG-OBJECTS:CAPS"></a><span class="term"><code class="literal">G_TYPE_DEBUG_OBJECTS</code></span></p></td>
1612 <td>Print messages about object bookkeeping.
1613 </td>
1614 </tr>
1615 <tr>
1616 <td><p><a name="G-TYPE-DEBUG-SIGNALS:CAPS"></a><span class="term"><code class="literal">G_TYPE_DEBUG_SIGNALS</code></span></p></td>
1617 <td>Print messages about signal emissions.
1618 </td>
1619 </tr>
1620 <tr>
1621 <td><p><a name="G-TYPE-DEBUG-MASK:CAPS"></a><span class="term"><code class="literal">G_TYPE_DEBUG_MASK</code></span></p></td>
1622 <td>Mask covering all debug flags.
1623 </td>
1624 </tr>
1625 </tbody>
1626 </table></div>
1627 </div>
1628 <hr>
1629 <div class="refsect2">
1630 <a name="g-type-init-with-debug-flags"></a><h3>g_type_init_with_debug_flags ()</h3>
1631 <pre class="programlisting"><span class="returnvalue">void</span>                g_type_init_with_debug_flags        (<em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GTypeDebugFlags" title="enum GTypeDebugFlags"><span class="type">GTypeDebugFlags</span></a> debug_flags</code></em>);</pre>
1632 <p>
1633 Similar to <a class="link" href="gobject-Type-Information.html#g-type-init" title="g_type_init ()"><code class="function">g_type_init()</code></a>, but additionally sets debug flags.
1634 </p>
1635 <div class="variablelist"><table border="0">
1636 <col align="left" valign="top">
1637 <tbody><tr>
1638 <td><p><span class="term"><em class="parameter"><code>debug_flags</code></em> :</span></p></td>
1639 <td>Bitwise combination of <a class="link" href="gobject-Type-Information.html#GTypeDebugFlags" title="enum GTypeDebugFlags"><span class="type">GTypeDebugFlags</span></a> values for
1640 debugging purposes.</td>
1641 </tr></tbody>
1642 </table></div>
1643 </div>
1644 <hr>
1645 <div class="refsect2">
1646 <a name="g-type-name"></a><h3>g_type_name ()</h3>
1647 <pre class="programlisting">const <a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *       g_type_name                         (<em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> type</code></em>);</pre>
1648 <p>
1649 Get the unique name that is assigned to a type ID.  Note that this
1650 function (like all other GType API) cannot cope with invalid type
1651 IDs. <a class="link" href="gobject-Type-Information.html#G-TYPE-INVALID:CAPS" title="G_TYPE_INVALID"><code class="literal">G_TYPE_INVALID</code></a> may be passed to this function, as may be any
1652 other validly registered type ID, but randomized type IDs should
1653 not be passed in and will most likely lead to a crash.
1654 </p>
1655 <div class="variablelist"><table border="0">
1656 <col align="left" valign="top">
1657 <tbody>
1658 <tr>
1659 <td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
1660 <td>Type to return name for.</td>
1661 </tr>
1662 <tr>
1663 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1664 <td>Static type name or <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</td>
1665 </tr>
1666 </tbody>
1667 </table></div>
1668 </div>
1669 <hr>
1670 <div class="refsect2">
1671 <a name="g-type-qname"></a><h3>g_type_qname ()</h3>
1672 <pre class="programlisting"><a href="./../glib/glib/glib-Quarks.html#GQuark"><span class="returnvalue">GQuark</span></a>              g_type_qname                        (<em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> type</code></em>);</pre>
1673 <p>
1674 Get the corresponding quark of the type IDs name.
1675 </p>
1676 <div class="variablelist"><table border="0">
1677 <col align="left" valign="top">
1678 <tbody>
1679 <tr>
1680 <td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
1681 <td>Type to return quark of type name for.</td>
1682 </tr>
1683 <tr>
1684 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1685 <td>The type names quark or 0.</td>
1686 </tr>
1687 </tbody>
1688 </table></div>
1689 </div>
1690 <hr>
1691 <div class="refsect2">
1692 <a name="g-type-from-name"></a><h3>g_type_from_name ()</h3>
1693 <pre class="programlisting"><a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="returnvalue">GType</span></a>               g_type_from_name                    (<em class="parameter"><code>const <a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>);</pre>
1694 <p>
1695 Lookup the type ID from a given type name, returning 0 if no type
1696 has been registered under this name (this is the preferred method
1697 to find out by name whether a specific type has been registered
1698 yet).
1699 </p>
1700 <div class="variablelist"><table border="0">
1701 <col align="left" valign="top">
1702 <tbody>
1703 <tr>
1704 <td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
1705 <td>Type name to lookup.</td>
1706 </tr>
1707 <tr>
1708 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1709 <td>Corresponding type ID or 0.</td>
1710 </tr>
1711 </tbody>
1712 </table></div>
1713 </div>
1714 <hr>
1715 <div class="refsect2">
1716 <a name="g-type-parent"></a><h3>g_type_parent ()</h3>
1717 <pre class="programlisting"><a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="returnvalue">GType</span></a>               g_type_parent                       (<em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> type</code></em>);</pre>
1718 <p>
1719 Return the direct parent type of the passed in type.  If the passed
1720 in type has no parent, i.e. is a fundamental type, 0 is returned.
1721 </p>
1722 <div class="variablelist"><table border="0">
1723 <col align="left" valign="top">
1724 <tbody>
1725 <tr>
1726 <td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
1727 <td>The derived type.</td>
1728 </tr>
1729 <tr>
1730 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1731 <td>The parent type.</td>
1732 </tr>
1733 </tbody>
1734 </table></div>
1735 </div>
1736 <hr>
1737 <div class="refsect2">
1738 <a name="g-type-depth"></a><h3>g_type_depth ()</h3>
1739 <pre class="programlisting"><a href="./../glib/glib/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>               g_type_depth                        (<em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> type</code></em>);</pre>
1740 <p>
1741 Returns the length of the ancestry of the passed in type. This
1742 includes the type itself, so that e.g. a fundamental type has depth 1.
1743 </p>
1744 <div class="variablelist"><table border="0">
1745 <col align="left" valign="top">
1746 <tbody>
1747 <tr>
1748 <td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
1749 <td>A <a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> value.</td>
1750 </tr>
1751 <tr>
1752 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1753 <td>The depth of <em class="parameter"><code>type</code></em>.</td>
1754 </tr>
1755 </tbody>
1756 </table></div>
1757 </div>
1758 <hr>
1759 <div class="refsect2">
1760 <a name="g-type-next-base"></a><h3>g_type_next_base ()</h3>
1761 <pre class="programlisting"><a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="returnvalue">GType</span></a>               g_type_next_base                    (<em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> leaf_type</code></em>,
1762                                                          <em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> root_type</code></em>);</pre>
1763 <p>
1764 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
1765 anchestry, return the type that <em class="parameter"><code>root_type</code></em> is the immediate parent
1766 of.  In other words, this function determines the type that is
1767 derived directly from <em class="parameter"><code>root_type</code></em> which is also a base class of
1768 <em class="parameter"><code>leaf_type</code></em>.  Given a root type and a leaf type, this function can
1769 be used to determine the types and order in which the leaf type is
1770 descended from the root type.
1771 </p>
1772 <div class="variablelist"><table border="0">
1773 <col align="left" valign="top">
1774 <tbody>
1775 <tr>
1776 <td><p><span class="term"><em class="parameter"><code>leaf_type</code></em> :</span></p></td>
1777 <td>Descendant of <em class="parameter"><code>root_type</code></em> and the type to be returned.</td>
1778 </tr>
1779 <tr>
1780 <td><p><span class="term"><em class="parameter"><code>root_type</code></em> :</span></p></td>
1781 <td>Immediate parent of the returned type.</td>
1782 </tr>
1783 <tr>
1784 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1785 <td>Immediate child of <em class="parameter"><code>root_type</code></em> and anchestor of <em class="parameter"><code>leaf_type</code></em>.</td>
1786 </tr>
1787 </tbody>
1788 </table></div>
1789 </div>
1790 <hr>
1791 <div class="refsect2">
1792 <a name="g-type-is-a"></a><h3>g_type_is_a ()</h3>
1793 <pre class="programlisting"><a href="./../glib/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            g_type_is_a                         (<em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> type</code></em>,
1794                                                          <em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> is_a_type</code></em>);</pre>
1795 <p>
1796 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
1797 descendant of <em class="parameter"><code>is_a_type</code></em>.  If <em class="parameter"><code>is_a_type</code></em> is an interface, check
1798 whether <em class="parameter"><code>type</code></em> conforms to it.
1799 </p>
1800 <div class="variablelist"><table border="0">
1801 <col align="left" valign="top">
1802 <tbody>
1803 <tr>
1804 <td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
1805 <td>Type to check anchestry for.</td>
1806 </tr>
1807 <tr>
1808 <td><p><span class="term"><em class="parameter"><code>is_a_type</code></em> :</span></p></td>
1809 <td>Possible anchestor of <em class="parameter"><code>type</code></em> or interface <em class="parameter"><code>type</code></em> could conform to.</td>
1810 </tr>
1811 <tr>
1812 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1813 <td>
1814 <a href="./../glib/glib/glib-Standard-Macros.html#TRUE:CAPS"><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.</td>
1815 </tr>
1816 </tbody>
1817 </table></div>
1818 </div>
1819 <hr>
1820 <div class="refsect2">
1821 <a name="g-type-class-ref"></a><h3>g_type_class_ref ()</h3>
1822 <pre class="programlisting"><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>            g_type_class_ref                    (<em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> type</code></em>);</pre>
1823 <p>
1824 Increments the reference count of the class structure belonging to
1825 <em class="parameter"><code>type</code></em>. This function will demand-create the class if it doesn't
1826 exist already.
1827 </p>
1828 <div class="variablelist"><table border="0">
1829 <col align="left" valign="top">
1830 <tbody>
1831 <tr>
1832 <td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
1833 <td>Type ID of a classed type.</td>
1834 </tr>
1835 <tr>
1836 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1837 <td>The <a class="link" href="gobject-Type-Information.html#GTypeClass" title="struct GTypeClass"><span class="type">GTypeClass</span></a>
1838 structure for the given type ID. <span class="annotation">[<acronym title="Override the parsed C type with given type"><span class="acronym">type</span></acronym> GObject.TypeClass][<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
1839 </td>
1840 </tr>
1841 </tbody>
1842 </table></div>
1843 </div>
1844 <hr>
1845 <div class="refsect2">
1846 <a name="g-type-class-peek"></a><h3>g_type_class_peek ()</h3>
1847 <pre class="programlisting"><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>            g_type_class_peek                   (<em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> type</code></em>);</pre>
1848 <p>
1849 This function is essentially the same as <a class="link" href="gobject-Type-Information.html#g-type-class-ref" title="g_type_class_ref ()"><code class="function">g_type_class_ref()</code></a>, except that
1850 the classes reference count isn't incremented. As a consequence, this function
1851 may return <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the class of the type passed in does not currently
1852 exist (hasn't been referenced before).
1853 </p>
1854 <div class="variablelist"><table border="0">
1855 <col align="left" valign="top">
1856 <tbody>
1857 <tr>
1858 <td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
1859 <td>Type ID of a classed type.</td>
1860 </tr>
1861 <tr>
1862 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1863 <td>The <a class="link" href="gobject-Type-Information.html#GTypeClass" title="struct GTypeClass"><span class="type">GTypeClass</span></a>
1864 structure for the given type ID or <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the class does not
1865 currently exist. <span class="annotation">[<acronym title="Override the parsed C type with given type"><span class="acronym">type</span></acronym> GObject.TypeClass][<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
1866 </td>
1867 </tr>
1868 </tbody>
1869 </table></div>
1870 </div>
1871 <hr>
1872 <div class="refsect2">
1873 <a name="g-type-class-peek-static"></a><h3>g_type_class_peek_static ()</h3>
1874 <pre class="programlisting"><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>            g_type_class_peek_static            (<em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> type</code></em>);</pre>
1875 <p>
1876 A more efficient version of <a class="link" href="gobject-Type-Information.html#g-type-class-peek" title="g_type_class_peek ()"><code class="function">g_type_class_peek()</code></a> which works only for
1877 static types.
1878 </p>
1879 <div class="variablelist"><table border="0">
1880 <col align="left" valign="top">
1881 <tbody>
1882 <tr>
1883 <td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
1884 <td>Type ID of a classed type.</td>
1885 </tr>
1886 <tr>
1887 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1888 <td>The <a class="link" href="gobject-Type-Information.html#GTypeClass" title="struct GTypeClass"><span class="type">GTypeClass</span></a>
1889 structure for the given type ID or <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the class does not
1890 currently exist or is dynamically loaded. <span class="annotation">[<acronym title="Override the parsed C type with given type"><span class="acronym">type</span></acronym> GObject.TypeClass][<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
1891 </td>
1892 </tr>
1893 </tbody>
1894 </table></div>
1895 <p class="since">Since 2.4</p>
1896 </div>
1897 <hr>
1898 <div class="refsect2">
1899 <a name="g-type-class-unref"></a><h3>g_type_class_unref ()</h3>
1900 <pre class="programlisting"><span class="returnvalue">void</span>                g_type_class_unref                  (<em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> g_class</code></em>);</pre>
1901 <p>
1902 Decrements the reference count of the class structure being passed in.
1903 Once the last reference count of a class has been released, classes
1904 may be finalized by the type system, so further dereferencing of a
1905 class pointer after <a class="link" href="gobject-Type-Information.html#g-type-class-unref" title="g_type_class_unref ()"><code class="function">g_type_class_unref()</code></a> are invalid.
1906 </p>
1907 <div class="variablelist"><table border="0">
1908 <col align="left" valign="top">
1909 <tbody><tr>
1910 <td><p><span class="term"><em class="parameter"><code>g_class</code></em> :</span></p></td>
1911 <td>The <a class="link" href="gobject-Type-Information.html#GTypeClass" title="struct GTypeClass"><span class="type">GTypeClass</span></a> structure to
1912 unreference. <span class="annotation">[<acronym title="Override the parsed C type with given type"><span class="acronym">type</span></acronym> GObject.TypeClass]</span>
1913 </td>
1914 </tr></tbody>
1915 </table></div>
1916 </div>
1917 <hr>
1918 <div class="refsect2">
1919 <a name="g-type-class-peek-parent"></a><h3>g_type_class_peek_parent ()</h3>
1920 <pre class="programlisting"><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>            g_type_class_peek_parent            (<em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> g_class</code></em>);</pre>
1921 <p>
1922 This is a convenience function often needed in class initializers.
1923 It returns the class structure of the immediate parent type of the
1924 class passed in.  Since derived classes hold a reference count on
1925 their parent classes as long as they are instantiated, the returned
1926 class will always exist. This function is essentially equivalent
1927 to:
1928 </p>
1929 <p>
1930 </p>
1931 <pre class="programlisting">
1932 g_type_class_peek (g_type_parent (G_TYPE_FROM_CLASS (g_class)));
1933 </pre>
1934 <p>
1935 </p>
1936 <div class="variablelist"><table border="0">
1937 <col align="left" valign="top">
1938 <tbody>
1939 <tr>
1940 <td><p><span class="term"><em class="parameter"><code>g_class</code></em> :</span></p></td>
1941 <td>The <a class="link" href="gobject-Type-Information.html#GTypeClass" title="struct GTypeClass"><span class="type">GTypeClass</span></a> structure to
1942 retrieve the parent class for. <span class="annotation">[<acronym title="Override the parsed C type with given type"><span class="acronym">type</span></acronym> GObject.TypeClass]</span>
1943 </td>
1944 </tr>
1945 <tr>
1946 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1947 <td>The parent class
1948 of <em class="parameter"><code>g_class</code></em>. <span class="annotation">[<acronym title="Override the parsed C type with given type"><span class="acronym">type</span></acronym> GObject.TypeClass][<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
1949 </td>
1950 </tr>
1951 </tbody>
1952 </table></div>
1953 </div>
1954 <hr>
1955 <div class="refsect2">
1956 <a name="g-type-class-add-private"></a><h3>g_type_class_add_private ()</h3>
1957 <pre class="programlisting"><span class="returnvalue">void</span>                g_type_class_add_private            (<em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> g_class</code></em>,
1958                                                          <em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> private_size</code></em>);</pre>
1959 <p>
1960 Registers a private structure for an instantiatable type.
1961 </p>
1962 <p>
1963 When an object is allocated, the private structures for
1964 the type and all of its parent types are allocated
1965 sequentially in the same memory block as the public
1966 structures.
1967 </p>
1968 <p>
1969 Note that the accumulated size of the private structures of
1970 a type and all its parent types cannot excced 64 KiB.
1971 </p>
1972 <p>
1973 This function should be called in the type's <code class="function">class_init()</code> function.
1974 The private structure can be retrieved using the
1975 <a class="link" href="gobject-Type-Information.html#G-TYPE-INSTANCE-GET-PRIVATE:CAPS" title="G_TYPE_INSTANCE_GET_PRIVATE()"><code class="function">G_TYPE_INSTANCE_GET_PRIVATE()</code></a> macro.
1976 </p>
1977 <p>
1978 The following example shows attaching a private structure
1979 <span class="structname">MyObjectPrivate</span> to an object
1980 <span class="structname">MyObject</span> defined in the standard GObject
1981 fashion.
1982 type's <code class="function">class_init()</code> function.
1983 Note the use of a structure member "priv" to avoid the overhead
1984 of repeatedly calling <code class="function">MY_OBJECT_GET_PRIVATE()</code>.
1985 </p>
1986 <p>
1987 </p>
1988 <div class="informalexample">
1989   <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
1990     <tbody>
1991       <tr>
1992         <td class="listing_lines" align="right"><pre>1
1993 2
1994 3
1995 4
1996 5
1997 6
1998 7
1999 8
2000 9
2001 10
2002 11
2003 12
2004 13
2005 14
2006 15
2007 16
2008 17
2009 18
2010 19
2011 20
2012 21
2013 22
2014 23
2015 24
2016 25
2017 26
2018 27
2019 28
2020 29
2021 30
2022 31
2023 32
2024 33
2025 34
2026 35
2027 36
2028 37
2029 38</pre></td>
2030         <td class="listing_code"><pre class="programlisting"><span class="keyword">typedef</span><span class="normal"> </span><span class="keyword">struct</span><span class="normal"> </span><span class="classname">_MyObject</span><span class="normal">        MyObject</span><span class="symbol">;</span>
2031 <span class="keyword">typedef</span><span class="normal"> </span><span class="keyword">struct</span><span class="normal"> </span><span class="classname">_MyObjectPrivate</span><span class="normal"> MyObjectPrivate</span><span class="symbol">;</span>
2032
2033 <span class="keyword">struct</span><span class="normal"> </span><span class="classname">_MyObject</span><span class="normal"> </span><span class="cbracket">{</span>
2034 <span class="normal"> </span><span class="usertype">GObject</span><span class="normal"> parent</span><span class="symbol">;</span>
2035
2036 <span class="normal"> </span><span class="usertype">MyObjectPrivate</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">priv</span><span class="symbol">;</span>
2037 <span class="cbracket">}</span><span class="symbol">;</span>
2038
2039 <span class="keyword">struct</span><span class="normal"> </span><span class="classname">_MyObjectPrivate</span><span class="normal"> </span><span class="cbracket">{</span>
2040 <span class="normal">  </span><span class="type">int</span><span class="normal"> some_field</span><span class="symbol">;</span>
2041 <span class="cbracket">}</span><span class="symbol">;</span>
2042
2043 <span class="keyword">static</span><span class="normal"> </span><span class="type">void</span>
2044 <span class="function">my_object_class_init</span><span class="normal"> </span><span class="symbol">(</span><span class="usertype">MyObjectClass</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">klass</span><span class="symbol">)</span>
2045 <span class="cbracket">{</span>
2046 <span class="normal">  </span><span class="function"><a href="gobject-Type-Information.html#g-type-class-add-private">g_type_class_add_private</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">klass</span><span class="symbol">,</span><span class="normal"> </span><span class="keyword">sizeof</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">MyObjectPrivate</span><span class="symbol">));</span>
2047 <span class="cbracket">}</span>
2048
2049 <span class="keyword">static</span><span class="normal"> </span><span class="type">void</span>
2050 <span class="function">my_object_init</span><span class="normal"> </span><span class="symbol">(</span><span class="usertype">MyObject</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">my_object</span><span class="symbol">)</span>
2051 <span class="cbracket">{</span>
2052 <span class="normal">  my_object</span><span class="symbol">-&gt;</span><span class="normal">priv </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="gobject-Type-Information.html#G-TYPE-INSTANCE-GET-PRIVATE:CAPS">G_TYPE_INSTANCE_GET_PRIVATE</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">my_object</span><span class="symbol">,</span>
2053 <span class="normal">                                                 MY_TYPE_OBJECT</span><span class="symbol">,</span>
2054 <span class="normal">                                                 MyObjectPrivate</span><span class="symbol">);</span>
2055 <span class="cbracket">}</span>
2056
2057 <span class="keyword">static</span><span class="normal"> </span><span class="type">int</span>
2058 <span class="function">my_object_get_some_field</span><span class="normal"> </span><span class="symbol">(</span><span class="usertype">MyObject</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">my_object</span><span class="symbol">)</span>
2059 <span class="cbracket">{</span>
2060 <span class="normal">  </span><span class="usertype">MyObjectPrivate</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">priv</span><span class="symbol">;</span>
2061
2062 <span class="normal">  </span><span class="function"><a href="./../glib/glib/glib-Warnings-and-Assertions.html#g-return-val-if-fail">g_return_val_if_fail</a></span><span class="normal"> </span><span class="symbol">(</span><span class="function">MY_IS_OBJECT</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">my_object</span><span class="symbol">),</span><span class="normal"> </span><span class="number">0</span><span class="symbol">);</span>
2063
2064 <span class="normal">  priv </span><span class="symbol">=</span><span class="normal"> my_object</span><span class="symbol">-&gt;</span><span class="normal">priv</span><span class="symbol">;</span>
2065
2066 <span class="normal">  </span><span class="keyword">return</span><span class="normal"> priv</span><span class="symbol">-&gt;</span><span class="normal">some_field</span><span class="symbol">;</span>
2067 <span class="cbracket">}</span></pre></td>
2068       </tr>
2069     </tbody>
2070   </table>
2071 </div>
2072
2073 <p>
2074 </p>
2075 <div class="variablelist"><table border="0">
2076 <col align="left" valign="top">
2077 <tbody>
2078 <tr>
2079 <td><p><span class="term"><em class="parameter"><code>g_class</code></em> :</span></p></td>
2080 <td>class structure for an instantiatable type</td>
2081 </tr>
2082 <tr>
2083 <td><p><span class="term"><em class="parameter"><code>private_size</code></em> :</span></p></td>
2084 <td>size of private structure.</td>
2085 </tr>
2086 </tbody>
2087 </table></div>
2088 <p class="since">Since 2.4</p>
2089 </div>
2090 <hr>
2091 <div class="refsect2">
2092 <a name="g-type-add-class-private"></a><h3>g_type_add_class_private ()</h3>
2093 <pre class="programlisting"><span class="returnvalue">void</span>                g_type_add_class_private            (<em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> class_type</code></em>,
2094                                                          <em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> private_size</code></em>);</pre>
2095 <p>
2096 Registers a private class structure for a classed type;
2097 when the class is allocated, the private structures for
2098 the class and all of its parent types are allocated
2099 sequentially in the same memory block as the public
2100 structures. This function should be called in the
2101 type's <code class="function">get_type()</code> function after the type is registered.
2102 The private structure can be retrieved using the
2103 <a class="link" href="gobject-Type-Information.html#G-TYPE-CLASS-GET-PRIVATE:CAPS" title="G_TYPE_CLASS_GET_PRIVATE()"><code class="function">G_TYPE_CLASS_GET_PRIVATE()</code></a> macro.
2104 </p>
2105 <div class="variablelist"><table border="0">
2106 <col align="left" valign="top">
2107 <tbody>
2108 <tr>
2109 <td><p><span class="term"><em class="parameter"><code>class_type</code></em> :</span></p></td>
2110 <td>GType of an classed type.</td>
2111 </tr>
2112 <tr>
2113 <td><p><span class="term"><em class="parameter"><code>private_size</code></em> :</span></p></td>
2114 <td>size of private structure.</td>
2115 </tr>
2116 </tbody>
2117 </table></div>
2118 <p class="since">Since 2.24</p>
2119 </div>
2120 <hr>
2121 <div class="refsect2">
2122 <a name="g-type-interface-peek"></a><h3>g_type_interface_peek ()</h3>
2123 <pre class="programlisting"><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>            g_type_interface_peek               (<em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> instance_class</code></em>,
2124                                                          <em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> iface_type</code></em>);</pre>
2125 <p>
2126 Returns the <a class="link" href="gobject-Type-Information.html#GTypeInterface" title="struct GTypeInterface"><span class="type">GTypeInterface</span></a> structure of an interface to which the
2127 passed in class conforms.
2128 </p>
2129 <div class="variablelist"><table border="0">
2130 <col align="left" valign="top">
2131 <tbody>
2132 <tr>
2133 <td><p><span class="term"><em class="parameter"><code>instance_class</code></em> :</span></p></td>
2134 <td>A <a class="link" href="gobject-Type-Information.html#GTypeClass" title="struct GTypeClass"><span class="type">GTypeClass</span></a> structure. <span class="annotation">[<acronym title="Override the parsed C type with given type"><span class="acronym">type</span></acronym> GObject.TypeClass]</span>
2135 </td>
2136 </tr>
2137 <tr>
2138 <td><p><span class="term"><em class="parameter"><code>iface_type</code></em> :</span></p></td>
2139 <td>An interface ID which this class conforms to.</td>
2140 </tr>
2141 <tr>
2142 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
2143 <td>The GTypeInterface
2144 structure of iface_type if implemented by <em class="parameter"><code>instance_class</code></em>, <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
2145 otherwise. <span class="annotation">[<acronym title="Override the parsed C type with given type"><span class="acronym">type</span></acronym> GObject.TypeInterface][<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
2146 </td>
2147 </tr>
2148 </tbody>
2149 </table></div>
2150 </div>
2151 <hr>
2152 <div class="refsect2">
2153 <a name="g-type-interface-peek-parent"></a><h3>g_type_interface_peek_parent ()</h3>
2154 <pre class="programlisting"><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>            g_type_interface_peek_parent        (<em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> g_iface</code></em>);</pre>
2155 <p>
2156 Returns the corresponding <a class="link" href="gobject-Type-Information.html#GTypeInterface" title="struct GTypeInterface"><span class="type">GTypeInterface</span></a> structure of the parent type
2157 of the instance type to which <em class="parameter"><code>g_iface</code></em> belongs. This is useful when
2158 deriving the implementation of an interface from the parent type and
2159 then possibly overriding some methods.
2160 </p>
2161 <div class="variablelist"><table border="0">
2162 <col align="left" valign="top">
2163 <tbody>
2164 <tr>
2165 <td><p><span class="term"><em class="parameter"><code>g_iface</code></em> :</span></p></td>
2166 <td>A <a class="link" href="gobject-Type-Information.html#GTypeInterface" title="struct GTypeInterface"><span class="type">GTypeInterface</span></a> structure. <span class="annotation">[<acronym title="Override the parsed C type with given type"><span class="acronym">type</span></acronym> GObject.TypeInterface]</span>
2167 </td>
2168 </tr>
2169 <tr>
2170 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
2171 <td>The
2172 corresponding <a class="link" href="gobject-Type-Information.html#GTypeInterface" title="struct GTypeInterface"><span class="type">GTypeInterface</span></a> structure of the parent type of the
2173 instance type to which <em class="parameter"><code>g_iface</code></em> belongs, or <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the parent
2174 type doesn't conform to the interface. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>][<acronym title="Override the parsed C type with given type"><span class="acronym">type</span></acronym> GObject.TypeInterface]</span>
2175 </td>
2176 </tr>
2177 </tbody>
2178 </table></div>
2179 </div>
2180 <hr>
2181 <div class="refsect2">
2182 <a name="g-type-default-interface-ref"></a><h3>g_type_default_interface_ref ()</h3>
2183 <pre class="programlisting"><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>            g_type_default_interface_ref        (<em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> g_type</code></em>);</pre>
2184 <p>
2185 Increments the reference count for the interface type <em class="parameter"><code>g_type</code></em>,
2186 and returns the default interface vtable for the type.
2187 </p>
2188 <p>
2189 If the type is not currently in use, then the default vtable
2190 for the type will be created and initalized by calling
2191 the base interface init and default vtable init functions for
2192 the type (the @<em class="structfield"><code>base_init</code></em>
2193 and <em class="structfield"><code>class_init</code></em> members of <a class="link" href="gobject-Type-Information.html#GTypeInfo" title="struct GTypeInfo"><span class="type">GTypeInfo</span></a>).
2194 Calling <a class="link" href="gobject-Type-Information.html#g-type-default-interface-ref" title="g_type_default_interface_ref ()"><code class="function">g_type_default_interface_ref()</code></a> is useful when you
2195 want to make sure that signals and properties for an interface
2196 have been installed.
2197 </p>
2198 <div class="variablelist"><table border="0">
2199 <col align="left" valign="top">
2200 <tbody>
2201 <tr>
2202 <td><p><span class="term"><em class="parameter"><code>g_type</code></em> :</span></p></td>
2203 <td>an interface type</td>
2204 </tr>
2205 <tr>
2206 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
2207 <td>the default
2208 vtable for the interface; call <a class="link" href="gobject-Type-Information.html#g-type-default-interface-unref" title="g_type_default_interface_unref ()"><code class="function">g_type_default_interface_unref()</code></a>
2209 when you are done using the interface. <span class="annotation">[<acronym title="Override the parsed C type with given type"><span class="acronym">type</span></acronym> GObject.TypeInterface][<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
2210 </td>
2211 </tr>
2212 </tbody>
2213 </table></div>
2214 <p class="since">Since 2.4</p>
2215 </div>
2216 <hr>
2217 <div class="refsect2">
2218 <a name="g-type-default-interface-peek"></a><h3>g_type_default_interface_peek ()</h3>
2219 <pre class="programlisting"><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>            g_type_default_interface_peek       (<em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> g_type</code></em>);</pre>
2220 <p>
2221 If the interface type <em class="parameter"><code>g_type</code></em> is currently in use, returns its
2222 default interface vtable.
2223 </p>
2224 <div class="variablelist"><table border="0">
2225 <col align="left" valign="top">
2226 <tbody>
2227 <tr>
2228 <td><p><span class="term"><em class="parameter"><code>g_type</code></em> :</span></p></td>
2229 <td>an interface type</td>
2230 </tr>
2231 <tr>
2232 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
2233 <td>the default
2234 vtable for the interface, or <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the type is not currently in
2235 use. <span class="annotation">[<acronym title="Override the parsed C type with given type"><span class="acronym">type</span></acronym> GObject.TypeInterface][<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
2236 </td>
2237 </tr>
2238 </tbody>
2239 </table></div>
2240 <p class="since">Since 2.4</p>
2241 </div>
2242 <hr>
2243 <div class="refsect2">
2244 <a name="g-type-default-interface-unref"></a><h3>g_type_default_interface_unref ()</h3>
2245 <pre class="programlisting"><span class="returnvalue">void</span>                g_type_default_interface_unref      (<em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> g_iface</code></em>);</pre>
2246 <p>
2247 Decrements the reference count for the type corresponding to the
2248 interface default vtable <em class="parameter"><code>g_iface</code></em>. If the type is dynamic, then
2249 when no one is using the interface and all references have
2250 been released, the finalize function for the interface's default
2251 vtable (the <em class="structfield"><code>class_finalize</code></em> member of
2252 <a class="link" href="gobject-Type-Information.html#GTypeInfo" title="struct GTypeInfo"><span class="type">GTypeInfo</span></a>) will be called.
2253 </p>
2254 <div class="variablelist"><table border="0">
2255 <col align="left" valign="top">
2256 <tbody><tr>
2257 <td><p><span class="term"><em class="parameter"><code>g_iface</code></em> :</span></p></td>
2258 <td>the default vtable
2259 structure for a interface, as returned by
2260 <a class="link" href="gobject-Type-Information.html#g-type-default-interface-ref" title="g_type_default_interface_ref ()"><code class="function">g_type_default_interface_ref()</code></a>. <span class="annotation">[<acronym title="Override the parsed C type with given type"><span class="acronym">type</span></acronym> GObject.TypeInterface]</span>
2261 </td>
2262 </tr></tbody>
2263 </table></div>
2264 <p class="since">Since 2.4</p>
2265 </div>
2266 <hr>
2267 <div class="refsect2">
2268 <a name="g-type-children"></a><h3>g_type_children ()</h3>
2269 <pre class="programlisting"><a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="returnvalue">GType</span></a> *             g_type_children                     (<em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> type</code></em>,
2270                                                          <em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> *n_children</code></em>);</pre>
2271 <p>
2272 Return a newly allocated and 0-terminated array of type IDs, listing the
2273 child types of <em class="parameter"><code>type</code></em>. The return value has to be <a href="./../glib/glib/glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a>ed after use.
2274 </p>
2275 <div class="variablelist"><table border="0">
2276 <col align="left" valign="top">
2277 <tbody>
2278 <tr>
2279 <td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
2280 <td>The parent type.</td>
2281 </tr>
2282 <tr>
2283 <td><p><span class="term"><em class="parameter"><code>n_children</code></em> :</span></p></td>
2284 <td>Optional <a href="./../glib/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> pointer to contain
2285 the number of child types. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
2286 </td>
2287 </tr>
2288 <tr>
2289 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
2290 <td>Newly allocated
2291 and 0-terminated array of child types. <span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=n_children][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
2292 </td>
2293 </tr>
2294 </tbody>
2295 </table></div>
2296 </div>
2297 <hr>
2298 <div class="refsect2">
2299 <a name="g-type-interfaces"></a><h3>g_type_interfaces ()</h3>
2300 <pre class="programlisting"><a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="returnvalue">GType</span></a> *             g_type_interfaces                   (<em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> type</code></em>,
2301                                                          <em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> *n_interfaces</code></em>);</pre>
2302 <p>
2303 Return a newly allocated and 0-terminated array of type IDs, listing the
2304 interface types that <em class="parameter"><code>type</code></em> conforms to. The return value has to be
2305 <a href="./../glib/glib/glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a>ed after use.
2306 </p>
2307 <div class="variablelist"><table border="0">
2308 <col align="left" valign="top">
2309 <tbody>
2310 <tr>
2311 <td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
2312 <td>The type to list interface types for.</td>
2313 </tr>
2314 <tr>
2315 <td><p><span class="term"><em class="parameter"><code>n_interfaces</code></em> :</span></p></td>
2316 <td>Optional <a href="./../glib/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> pointer to
2317 contain the number of interface types. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
2318 </td>
2319 </tr>
2320 <tr>
2321 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
2322 <td>Newly
2323 allocated and 0-terminated array of interface types. <span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=n_interfaces][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
2324 </td>
2325 </tr>
2326 </tbody>
2327 </table></div>
2328 </div>
2329 <hr>
2330 <div class="refsect2">
2331 <a name="g-type-interface-prerequisites"></a><h3>g_type_interface_prerequisites ()</h3>
2332 <pre class="programlisting"><a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="returnvalue">GType</span></a> *             g_type_interface_prerequisites      (<em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> interface_type</code></em>,
2333                                                          <em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> *n_prerequisites</code></em>);</pre>
2334 <p>
2335 Returns the prerequisites of an interfaces type.
2336 </p>
2337 <div class="variablelist"><table border="0">
2338 <col align="left" valign="top">
2339 <tbody>
2340 <tr>
2341 <td><p><span class="term"><em class="parameter"><code>interface_type</code></em> :</span></p></td>
2342 <td>an interface type</td>
2343 </tr>
2344 <tr>
2345 <td><p><span class="term"><em class="parameter"><code>n_prerequisites</code></em> :</span></p></td>
2346 <td>location to return the number
2347 of prerequisites, or <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
2348 </td>
2349 </tr>
2350 <tr>
2351 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
2352 <td>a
2353 newly-allocated zero-terminated array of <a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> containing
2354 the prerequisites of <em class="parameter"><code>interface_type</code></em>. <span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=n_prerequisites][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
2355 </td>
2356 </tr>
2357 </tbody>
2358 </table></div>
2359 <p class="since">Since 2.2</p>
2360 </div>
2361 <hr>
2362 <div class="refsect2">
2363 <a name="g-type-set-qdata"></a><h3>g_type_set_qdata ()</h3>
2364 <pre class="programlisting"><span class="returnvalue">void</span>                g_type_set_qdata                    (<em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> type</code></em>,
2365                                                          <em class="parameter"><code><a href="./../glib/glib/glib-Quarks.html#GQuark"><span class="type">GQuark</span></a> quark</code></em>,
2366                                                          <em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>);</pre>
2367 <p>
2368 Attaches arbitrary data to a type.
2369 </p>
2370 <div class="variablelist"><table border="0">
2371 <col align="left" valign="top">
2372 <tbody>
2373 <tr>
2374 <td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
2375 <td>a <a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a>
2376 </td>
2377 </tr>
2378 <tr>
2379 <td><p><span class="term"><em class="parameter"><code>quark</code></em> :</span></p></td>
2380 <td>a <a href="./../glib/glib/glib-Quarks.html#GQuark"><span class="type">GQuark</span></a> id to identify the data</td>
2381 </tr>
2382 <tr>
2383 <td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
2384 <td>the data</td>
2385 </tr>
2386 </tbody>
2387 </table></div>
2388 </div>
2389 <hr>
2390 <div class="refsect2">
2391 <a name="g-type-get-qdata"></a><h3>g_type_get_qdata ()</h3>
2392 <pre class="programlisting"><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>            g_type_get_qdata                    (<em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> type</code></em>,
2393                                                          <em class="parameter"><code><a href="./../glib/glib/glib-Quarks.html#GQuark"><span class="type">GQuark</span></a> quark</code></em>);</pre>
2394 <p>
2395 Obtains data which has previously been attached to <em class="parameter"><code>type</code></em>
2396 with <a class="link" href="gobject-Type-Information.html#g-type-set-qdata" title="g_type_set_qdata ()"><code class="function">g_type_set_qdata()</code></a>.
2397 </p>
2398 <p>
2399 Note that this does not take subtyping into account; data
2400 attached to one type with <a class="link" href="gobject-Type-Information.html#g-type-set-qdata" title="g_type_set_qdata ()"><code class="function">g_type_set_qdata()</code></a> cannot
2401 be retrieved from a subtype using <a class="link" href="gobject-Type-Information.html#g-type-get-qdata" title="g_type_get_qdata ()"><code class="function">g_type_get_qdata()</code></a>.
2402 </p>
2403 <div class="variablelist"><table border="0">
2404 <col align="left" valign="top">
2405 <tbody>
2406 <tr>
2407 <td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
2408 <td>a <a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a>
2409 </td>
2410 </tr>
2411 <tr>
2412 <td><p><span class="term"><em class="parameter"><code>quark</code></em> :</span></p></td>
2413 <td>a <a href="./../glib/glib/glib-Quarks.html#GQuark"><span class="type">GQuark</span></a> id to identify the data</td>
2414 </tr>
2415 <tr>
2416 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
2417 <td>the data, or <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if no data was found. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
2418 </td>
2419 </tr>
2420 </tbody>
2421 </table></div>
2422 </div>
2423 <hr>
2424 <div class="refsect2">
2425 <a name="g-type-query"></a><h3>g_type_query ()</h3>
2426 <pre class="programlisting"><span class="returnvalue">void</span>                g_type_query                        (<em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> type</code></em>,
2427                                                          <em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GTypeQuery" title="struct GTypeQuery"><span class="type">GTypeQuery</span></a> *query</code></em>);</pre>
2428 <p>
2429 Queries the type system for information about a specific type.
2430 This function will fill in a user-provided structure to hold
2431 type-specific information. If an invalid <a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> is passed in, the
2432 <em class="parameter"><code>type</code></em> member of the <a class="link" href="gobject-Type-Information.html#GTypeQuery" title="struct GTypeQuery"><span class="type">GTypeQuery</span></a> is 0. All members filled into the
2433 <a class="link" href="gobject-Type-Information.html#GTypeQuery" title="struct GTypeQuery"><span class="type">GTypeQuery</span></a> structure should be considered constant and have to be
2434 left untouched.
2435 </p>
2436 <div class="variablelist"><table border="0">
2437 <col align="left" valign="top">
2438 <tbody>
2439 <tr>
2440 <td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
2441 <td>the <a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> value of a static, classed type.</td>
2442 </tr>
2443 <tr>
2444 <td><p><span class="term"><em class="parameter"><code>query</code></em> :</span></p></td>
2445 <td>A user provided structure that is
2446 filled in with constant values upon success. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym> caller-allocates]</span>
2447 </td>
2448 </tr>
2449 </tbody>
2450 </table></div>
2451 </div>
2452 <hr>
2453 <div class="refsect2">
2454 <a name="GTypeQuery"></a><h3>struct GTypeQuery</h3>
2455 <pre class="programlisting">struct GTypeQuery {
2456   GType         type;
2457   const gchar  *type_name;
2458   guint         class_size;
2459   guint         instance_size;
2460 };
2461 </pre>
2462 <p>
2463 A structure holding information for a specific type. It is
2464 filled in by the <a class="link" href="gobject-Type-Information.html#g-type-query" title="g_type_query ()"><code class="function">g_type_query()</code></a> function.
2465 </p>
2466 <div class="variablelist"><table border="0">
2467 <col align="left" valign="top">
2468 <tbody>
2469 <tr>
2470 <td><p><span class="term"><a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> <em class="structfield"><code><a name="GTypeQuery.type"></a>type</code></em>;</span></p></td>
2471 <td>the <a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> value of the type.</td>
2472 </tr>
2473 <tr>
2474 <td><p><span class="term">const <a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *<em class="structfield"><code><a name="GTypeQuery.type-name"></a>type_name</code></em>;</span></p></td>
2475 <td>the name of the type.</td>
2476 </tr>
2477 <tr>
2478 <td><p><span class="term"><a href="./../glib/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> <em class="structfield"><code><a name="GTypeQuery.class-size"></a>class_size</code></em>;</span></p></td>
2479 <td>the size of the class structure.</td>
2480 </tr>
2481 <tr>
2482 <td><p><span class="term"><a href="./../glib/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> <em class="structfield"><code><a name="GTypeQuery.instance-size"></a>instance_size</code></em>;</span></p></td>
2483 <td>the size of the instance structure.</td>
2484 </tr>
2485 </tbody>
2486 </table></div>
2487 </div>
2488 <hr>
2489 <div class="refsect2">
2490 <a name="GBaseInitFunc"></a><h3>GBaseInitFunc ()</h3>
2491 <pre class="programlisting"><span class="returnvalue">void</span>                (*GBaseInitFunc)                    (<em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> g_class</code></em>);</pre>
2492 <p>
2493 A callback function used by the type system to do base initialization
2494 of the class structures of derived types. It is called as part of the
2495 initialization process of all derived classes and should reallocate
2496 or reset all dynamic class members copied over from the parent class.
2497 For example, class members (such as strings) that are not sufficiently
2498 handled by a plain memory copy of the parent class into the derived class
2499 have to be altered. See <a class="link" href="gobject-Type-Information.html#GClassInitFunc" title="GClassInitFunc ()"><code class="function">GClassInitFunc()</code></a> for a discussion of the class
2500 intialization process.
2501 </p>
2502 <div class="variablelist"><table border="0">
2503 <col align="left" valign="top">
2504 <tbody><tr>
2505 <td><p><span class="term"><em class="parameter"><code>g_class</code></em> :</span></p></td>
2506 <td>The <a class="link" href="gobject-Type-Information.html#GTypeClass" title="struct GTypeClass"><span class="type">GTypeClass</span></a> structure to initialize.</td>
2507 </tr></tbody>
2508 </table></div>
2509 </div>
2510 <hr>
2511 <div class="refsect2">
2512 <a name="GBaseFinalizeFunc"></a><h3>GBaseFinalizeFunc ()</h3>
2513 <pre class="programlisting"><span class="returnvalue">void</span>                (*GBaseFinalizeFunc)                (<em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> g_class</code></em>);</pre>
2514 <p>
2515 A callback function used by the type system to finalize those portions
2516 of a derived types class structure that were setup from the corresponding
2517 <a class="link" href="gobject-Type-Information.html#GBaseInitFunc" title="GBaseInitFunc ()"><code class="function">GBaseInitFunc()</code></a> function. Class finalization basically works the inverse
2518 way in which class intialization is performed.
2519 See <a class="link" href="gobject-Type-Information.html#GClassInitFunc" title="GClassInitFunc ()"><code class="function">GClassInitFunc()</code></a> for a discussion of the class intialization process.
2520 </p>
2521 <div class="variablelist"><table border="0">
2522 <col align="left" valign="top">
2523 <tbody><tr>
2524 <td><p><span class="term"><em class="parameter"><code>g_class</code></em> :</span></p></td>
2525 <td>The <a class="link" href="gobject-Type-Information.html#GTypeClass" title="struct GTypeClass"><span class="type">GTypeClass</span></a> structure to finalize.</td>
2526 </tr></tbody>
2527 </table></div>
2528 </div>
2529 <hr>
2530 <div class="refsect2">
2531 <a name="GClassInitFunc"></a><h3>GClassInitFunc ()</h3>
2532 <pre class="programlisting"><span class="returnvalue">void</span>                (*GClassInitFunc)                   (<em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> g_class</code></em>,
2533                                                          <em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> class_data</code></em>);</pre>
2534 <p>
2535 A callback function used by the type system to initialize the class
2536 of a specific type. This function should initialize all static class
2537 members.
2538 The initialization process of a class involves:
2539 </p>
2540 <div class="itemizedlist"><ul class="itemizedlist" type="disc">
2541 <li class="listitem"><p>
2542         1 - Copying common members from the parent class over to the
2543         derived class structure.
2544 </p></li>
2545 <li class="listitem"><p>
2546         2 -  Zero initialization of the remaining members not copied
2547         over from the parent class.
2548 </p></li>
2549 <li class="listitem"><p>
2550         3 - Invocation of the <a class="link" href="gobject-Type-Information.html#GBaseInitFunc" title="GBaseInitFunc ()"><code class="function">GBaseInitFunc()</code></a> initializers of all parent
2551         types and the class' type.
2552 </p></li>
2553 <li class="listitem"><p>
2554         4 - Invocation of the class' <a class="link" href="gobject-Type-Information.html#GClassInitFunc" title="GClassInitFunc ()"><code class="function">GClassInitFunc()</code></a> initializer.
2555 </p></li>
2556 </ul></div>
2557 <p>
2558 Since derived classes are partially initialized through a memory copy
2559 of the parent class, the general rule is that <a class="link" href="gobject-Type-Information.html#GBaseInitFunc" title="GBaseInitFunc ()"><code class="function">GBaseInitFunc()</code></a> and
2560 <a class="link" href="gobject-Type-Information.html#GBaseFinalizeFunc" title="GBaseFinalizeFunc ()"><code class="function">GBaseFinalizeFunc()</code></a> should take care of necessary reinitialization
2561 and release of those class members that were introduced by the type
2562 that specified these <a class="link" href="gobject-Type-Information.html#GBaseInitFunc" title="GBaseInitFunc ()"><code class="function">GBaseInitFunc()</code></a>/<a class="link" href="gobject-Type-Information.html#GBaseFinalizeFunc" title="GBaseFinalizeFunc ()"><code class="function">GBaseFinalizeFunc()</code></a>.
2563 <a class="link" href="gobject-Type-Information.html#GClassInitFunc" title="GClassInitFunc ()"><code class="function">GClassInitFunc()</code></a> should only care about initializing static
2564 class members, while dynamic class members (such as allocated strings
2565 or reference counted resources) are better handled by a <a class="link" href="gobject-Type-Information.html#GBaseInitFunc" title="GBaseInitFunc ()"><code class="function">GBaseInitFunc()</code></a>
2566 for this type, so proper initialization of the dynamic class members
2567 is performed for class initialization of derived types as well.
2568 An example may help to correspond the intend of the different class
2569 initializers:
2570 </p>
2571 <p>
2572 </p>
2573 <div class="informalexample">
2574   <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
2575     <tbody>
2576       <tr>
2577         <td class="listing_lines" align="right"><pre>1
2578 2
2579 3
2580 4
2581 5
2582 6
2583 7
2584 8
2585 9
2586 10
2587 11
2588 12
2589 13
2590 14
2591 15
2592 16
2593 17
2594 18
2595 19
2596 20
2597 21
2598 22
2599 23
2600 24
2601 25
2602 26
2603 27
2604 28
2605 29
2606 30
2607 31
2608 32
2609 33
2610 34
2611 35
2612 36
2613 37
2614 38
2615 39
2616 40
2617 41</pre></td>
2618         <td class="listing_code"><pre class="programlisting"><span class="keyword">typedef</span><span class="normal"> </span><span class="keyword">struct</span><span class="normal"> </span><span class="cbracket">{</span>
2619 <span class="normal">  </span><span class="usertype">GObjectClass</span><span class="normal"> parent_class</span><span class="symbol">;</span>
2620 <span class="normal">  </span><span class="usertype">gint</span><span class="normal">         static_integer</span><span class="symbol">;</span>
2621 <span class="normal">  </span><span class="usertype">gchar</span><span class="normal">       </span><span class="symbol">*</span><span class="normal">dynamic_string</span><span class="symbol">;</span>
2622 <span class="cbracket">}</span><span class="normal"> TypeAClass</span><span class="symbol">;</span>
2623 <span class="keyword">static</span><span class="normal"> </span><span class="type">void</span>
2624 <span class="function">type_a_base_class_init</span><span class="normal"> </span><span class="symbol">(</span><span class="usertype">TypeAClass</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">class</span><span class="symbol">)</span>
2625 <span class="cbracket">{</span>
2626 <span class="normal">  class</span><span class="symbol">-&gt;</span><span class="normal">dynamic_string </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="./../glib/glib/glib-String-Utility-Functions.html#g-strdup">g_strdup</a></span><span class="normal"> </span><span class="symbol">(</span><span class="string">"some string"</span><span class="symbol">);</span>
2627 <span class="cbracket">}</span>
2628 <span class="keyword">static</span><span class="normal"> </span><span class="type">void</span>
2629 <span class="function">type_a_base_class_finalize</span><span class="normal"> </span><span class="symbol">(</span><span class="usertype">TypeAClass</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">class</span><span class="symbol">)</span>
2630 <span class="cbracket">{</span>
2631 <span class="normal">  </span><span class="function"><a href="./../glib/glib/glib-Memory-Allocation.html#g-free">g_free</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">class</span><span class="symbol">-&gt;</span><span class="normal">dynamic_string</span><span class="symbol">);</span>
2632 <span class="cbracket">}</span>
2633 <span class="keyword">static</span><span class="normal"> </span><span class="type">void</span>
2634 <span class="function">type_a_class_init</span><span class="normal"> </span><span class="symbol">(</span><span class="usertype">TypeAClass</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">class</span><span class="symbol">)</span>
2635 <span class="cbracket">{</span>
2636 <span class="normal">  class</span><span class="symbol">-&gt;</span><span class="normal">static_integer </span><span class="symbol">=</span><span class="normal"> </span><span class="number">42</span><span class="symbol">;</span>
2637 <span class="cbracket">}</span>
2638
2639 <span class="keyword">typedef</span><span class="normal"> </span><span class="keyword">struct</span><span class="normal"> </span><span class="cbracket">{</span>
2640 <span class="normal">  </span><span class="usertype">TypeAClass</span><span class="normal">   parent_class</span><span class="symbol">;</span>
2641 <span class="normal">  </span><span class="usertype">gfloat</span><span class="normal">       static_float</span><span class="symbol">;</span>
2642 <span class="normal">  </span><span class="usertype">GString</span><span class="normal">     </span><span class="symbol">*</span><span class="normal">dynamic_gstring</span><span class="symbol">;</span>
2643 <span class="cbracket">}</span><span class="normal"> TypeBClass</span><span class="symbol">;</span>
2644 <span class="keyword">static</span><span class="normal"> </span><span class="type">void</span>
2645 <span class="function">type_b_base_class_init</span><span class="normal"> </span><span class="symbol">(</span><span class="usertype">TypeBClass</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">class</span><span class="symbol">)</span>
2646 <span class="cbracket">{</span>
2647 <span class="normal">  class</span><span class="symbol">-&gt;</span><span class="normal">dynamic_gstring </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="./../glib/glib/glib-Strings.html#g-string-new">g_string_new</a></span><span class="normal"> </span><span class="symbol">(</span><span class="string">"some other string"</span><span class="symbol">);</span>
2648 <span class="cbracket">}</span>
2649 <span class="keyword">static</span><span class="normal"> </span><span class="type">void</span>
2650 <span class="function">type_b_base_class_finalize</span><span class="normal"> </span><span class="symbol">(</span><span class="usertype">TypeBClass</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">class</span><span class="symbol">)</span>
2651 <span class="cbracket">{</span>
2652 <span class="normal">  </span><span class="function"><a href="./../glib/glib/glib-Strings.html#g-string-free">g_string_free</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">class</span><span class="symbol">-&gt;</span><span class="normal">dynamic_gstring</span><span class="symbol">);</span>
2653 <span class="cbracket">}</span>
2654 <span class="keyword">static</span><span class="normal"> </span><span class="type">void</span>
2655 <span class="function">type_b_class_init</span><span class="normal"> </span><span class="symbol">(</span><span class="usertype">TypeBClass</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">class</span><span class="symbol">)</span>
2656 <span class="cbracket">{</span>
2657 <span class="normal">  class</span><span class="symbol">-&gt;</span><span class="normal">static_float </span><span class="symbol">=</span><span class="normal"> </span><span class="number">3.14159265358979323846</span><span class="symbol">;</span>
2658 <span class="cbracket">}</span></pre></td>
2659       </tr>
2660     </tbody>
2661   </table>
2662 </div>
2663
2664 <p>
2665 Initialization of TypeBClass will first cause initialization of
2666 TypeAClass (derived classes reference their parent classes, see
2667 <a class="link" href="gobject-Type-Information.html#g-type-class-ref" title="g_type_class_ref ()"><code class="function">g_type_class_ref()</code></a> on this).
2668 Initialization of TypeAClass roughly involves zero-initializing its fields,
2669 then calling its <a class="link" href="gobject-Type-Information.html#GBaseInitFunc" title="GBaseInitFunc ()"><code class="function">GBaseInitFunc()</code></a> <code class="function">type_a_base_class_init()</code> to allocate
2670 its dynamic members (dynamic_string), and finally calling its <a class="link" href="gobject-Type-Information.html#GClassInitFunc" title="GClassInitFunc ()"><code class="function">GClassInitFunc()</code></a>
2671 <code class="function">type_a_class_init()</code> to initialize its static members (static_integer).
2672 The first step in the initialization process of TypeBClass is then
2673 a plain memory copy of the contents of TypeAClass into TypeBClass and 
2674 zero-initialization of the remaining fields in TypeBClass.
2675 The dynamic members of TypeAClass within TypeBClass now need
2676 reinitialization which is performed by calling <code class="function">type_a_base_class_init()</code>
2677 with an argument of TypeBClass.
2678 After that, the <a class="link" href="gobject-Type-Information.html#GBaseInitFunc" title="GBaseInitFunc ()"><code class="function">GBaseInitFunc()</code></a> of TypeBClass, <code class="function">type_b_base_class_init()</code>
2679 is called to allocate the dynamic members of TypeBClass (dynamic_gstring),
2680 and finally the <a class="link" href="gobject-Type-Information.html#GClassInitFunc" title="GClassInitFunc ()"><code class="function">GClassInitFunc()</code></a> of TypeBClass, <code class="function">type_b_class_init()</code>,
2681 is called to complete the initialization process with the static members
2682 (static_float).
2683 Corresponding finalization counter parts to the <a class="link" href="gobject-Type-Information.html#GBaseInitFunc" title="GBaseInitFunc ()"><code class="function">GBaseInitFunc()</code></a> functions
2684 have to be provided to release allocated resources at class finalization
2685 time.
2686 </p>
2687 <div class="variablelist"><table border="0">
2688 <col align="left" valign="top">
2689 <tbody>
2690 <tr>
2691 <td><p><span class="term"><em class="parameter"><code>g_class</code></em> :</span></p></td>
2692 <td>The <a class="link" href="gobject-Type-Information.html#GTypeClass" title="struct GTypeClass"><span class="type">GTypeClass</span></a> structure to initialize.</td>
2693 </tr>
2694 <tr>
2695 <td><p><span class="term"><em class="parameter"><code>class_data</code></em> :</span></p></td>
2696 <td>The <em class="parameter"><code>class_data</code></em> member supplied via the <a class="link" href="gobject-Type-Information.html#GTypeInfo" title="struct GTypeInfo"><span class="type">GTypeInfo</span></a> structure.</td>
2697 </tr>
2698 </tbody>
2699 </table></div>
2700 </div>
2701 <hr>
2702 <div class="refsect2">
2703 <a name="GClassFinalizeFunc"></a><h3>GClassFinalizeFunc ()</h3>
2704 <pre class="programlisting"><span class="returnvalue">void</span>                (*GClassFinalizeFunc)               (<em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> g_class</code></em>,
2705                                                          <em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> class_data</code></em>);</pre>
2706 <p>
2707 A callback function used by the type system to finalize a class.
2708 This function is rarely needed, as dynamically allocated class resources
2709 should be handled by <a class="link" href="gobject-Type-Information.html#GBaseInitFunc" title="GBaseInitFunc ()"><code class="function">GBaseInitFunc()</code></a> and <a class="link" href="gobject-Type-Information.html#GBaseFinalizeFunc" title="GBaseFinalizeFunc ()"><code class="function">GBaseFinalizeFunc()</code></a>.
2710 Also, specification of a <a class="link" href="gobject-Type-Information.html#GClassFinalizeFunc" title="GClassFinalizeFunc ()"><code class="function">GClassFinalizeFunc()</code></a> in the <a class="link" href="gobject-Type-Information.html#GTypeInfo" title="struct GTypeInfo"><span class="type">GTypeInfo</span></a>
2711 structure of a static type is invalid, because classes of static types
2712 will never be finalized (they are artificially kept alive when their
2713 reference count drops to zero).
2714 </p>
2715 <div class="variablelist"><table border="0">
2716 <col align="left" valign="top">
2717 <tbody>
2718 <tr>
2719 <td><p><span class="term"><em class="parameter"><code>g_class</code></em> :</span></p></td>
2720 <td>The <a class="link" href="gobject-Type-Information.html#GTypeClass" title="struct GTypeClass"><span class="type">GTypeClass</span></a> structure to finalize.</td>
2721 </tr>
2722 <tr>
2723 <td><p><span class="term"><em class="parameter"><code>class_data</code></em> :</span></p></td>
2724 <td>The <em class="parameter"><code>class_data</code></em> member supplied via the <a class="link" href="gobject-Type-Information.html#GTypeInfo" title="struct GTypeInfo"><span class="type">GTypeInfo</span></a> structure.</td>
2725 </tr>
2726 </tbody>
2727 </table></div>
2728 </div>
2729 <hr>
2730 <div class="refsect2">
2731 <a name="GInstanceInitFunc"></a><h3>GInstanceInitFunc ()</h3>
2732 <pre class="programlisting"><span class="returnvalue">void</span>                (*GInstanceInitFunc)                (<em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GTypeInstance" title="struct GTypeInstance"><span class="type">GTypeInstance</span></a> *instance</code></em>,
2733                                                          <em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> g_class</code></em>);</pre>
2734 <p>
2735 A callback function used by the type system to initialize a new
2736 instance of a type. This function initializes all instance members and
2737 allocates any resources required by it.
2738 Initialization of a derived instance involves calling all its parent
2739 types instance initializers, so the class member of the instance
2740 is altered during its initialization to always point to the class that
2741 belongs to the type the current initializer was introduced for.
2742 </p>
2743 <div class="variablelist"><table border="0">
2744 <col align="left" valign="top">
2745 <tbody>
2746 <tr>
2747 <td><p><span class="term"><em class="parameter"><code>instance</code></em> :</span></p></td>
2748 <td>The instance to initialize.</td>
2749 </tr>
2750 <tr>
2751 <td><p><span class="term"><em class="parameter"><code>g_class</code></em> :</span></p></td>
2752 <td>The class of the type the instance is created for.</td>
2753 </tr>
2754 </tbody>
2755 </table></div>
2756 </div>
2757 <hr>
2758 <div class="refsect2">
2759 <a name="GInterfaceInitFunc"></a><h3>GInterfaceInitFunc ()</h3>
2760 <pre class="programlisting"><span class="returnvalue">void</span>                (*GInterfaceInitFunc)               (<em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> g_iface</code></em>,
2761                                                          <em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> iface_data</code></em>);</pre>
2762 <p>
2763 A callback function used by the type system to initialize a new
2764 interface.  This function should initialize all internal data and
2765 allocate any resources required by the interface.
2766 </p>
2767 <div class="variablelist"><table border="0">
2768 <col align="left" valign="top">
2769 <tbody>
2770 <tr>
2771 <td><p><span class="term"><em class="parameter"><code>g_iface</code></em> :</span></p></td>
2772 <td>The interface structure to initialize.</td>
2773 </tr>
2774 <tr>
2775 <td><p><span class="term"><em class="parameter"><code>iface_data</code></em> :</span></p></td>
2776 <td>The <em class="parameter"><code>interface_data</code></em> supplied via the <a class="link" href="gobject-Type-Information.html#GInterfaceInfo" title="struct GInterfaceInfo"><span class="type">GInterfaceInfo</span></a> structure.</td>
2777 </tr>
2778 </tbody>
2779 </table></div>
2780 </div>
2781 <hr>
2782 <div class="refsect2">
2783 <a name="GInterfaceFinalizeFunc"></a><h3>GInterfaceFinalizeFunc ()</h3>
2784 <pre class="programlisting"><span class="returnvalue">void</span>                (*GInterfaceFinalizeFunc)           (<em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> g_iface</code></em>,
2785                                                          <em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> iface_data</code></em>);</pre>
2786 <p>
2787 A callback function used by the type system to finalize an interface.
2788 This function should destroy any internal data and release any resources
2789 allocated by the corresponding <a class="link" href="gobject-Type-Information.html#GInterfaceInitFunc" title="GInterfaceInitFunc ()"><code class="function">GInterfaceInitFunc()</code></a> function.
2790 </p>
2791 <div class="variablelist"><table border="0">
2792 <col align="left" valign="top">
2793 <tbody>
2794 <tr>
2795 <td><p><span class="term"><em class="parameter"><code>g_iface</code></em> :</span></p></td>
2796 <td>The interface structure to finalize.</td>
2797 </tr>
2798 <tr>
2799 <td><p><span class="term"><em class="parameter"><code>iface_data</code></em> :</span></p></td>
2800 <td>The <em class="parameter"><code>interface_data</code></em> supplied via the <a class="link" href="gobject-Type-Information.html#GInterfaceInfo" title="struct GInterfaceInfo"><span class="type">GInterfaceInfo</span></a> structure.</td>
2801 </tr>
2802 </tbody>
2803 </table></div>
2804 </div>
2805 <hr>
2806 <div class="refsect2">
2807 <a name="GTypeClassCacheFunc"></a><h3>GTypeClassCacheFunc ()</h3>
2808 <pre class="programlisting"><a href="./../glib/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            (*GTypeClassCacheFunc)              (<em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> cache_data</code></em>,
2809                                                          <em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GTypeClass" title="struct GTypeClass"><span class="type">GTypeClass</span></a> *g_class</code></em>);</pre>
2810 <p>
2811 A callback function which is called when the reference count of a class 
2812 drops to zero. It may use <a class="link" href="gobject-Type-Information.html#g-type-class-ref" title="g_type_class_ref ()"><code class="function">g_type_class_ref()</code></a> to prevent the class from
2813 being freed. You should not call <a class="link" href="gobject-Type-Information.html#g-type-class-unref" title="g_type_class_unref ()"><code class="function">g_type_class_unref()</code></a> from a 
2814 <a class="link" href="gobject-Type-Information.html#GTypeClassCacheFunc" title="GTypeClassCacheFunc ()"><span class="type">GTypeClassCacheFunc</span></a> function to prevent infinite recursion, use 
2815 <a class="link" href="gobject-Type-Information.html#g-type-class-unref-uncached" title="g_type_class_unref_uncached ()"><code class="function">g_type_class_unref_uncached()</code></a> instead.
2816 </p>
2817 <p>
2818 The functions have to check the class id passed in to figure 
2819 whether they actually want to cache the class of this type, since all
2820 classes are routed through the same <a class="link" href="gobject-Type-Information.html#GTypeClassCacheFunc" title="GTypeClassCacheFunc ()"><span class="type">GTypeClassCacheFunc</span></a> chain.
2821 </p>
2822 <div class="variablelist"><table border="0">
2823 <col align="left" valign="top">
2824 <tbody>
2825 <tr>
2826 <td><p><span class="term"><em class="parameter"><code>cache_data</code></em> :</span></p></td>
2827 <td>data that was given to the <a class="link" href="gobject-Type-Information.html#g-type-add-class-cache-func" title="g_type_add_class_cache_func ()"><code class="function">g_type_add_class_cache_func()</code></a> call</td>
2828 </tr>
2829 <tr>
2830 <td><p><span class="term"><em class="parameter"><code>g_class</code></em> :</span></p></td>
2831 <td>The <a class="link" href="gobject-Type-Information.html#GTypeClass" title="struct GTypeClass"><span class="type">GTypeClass</span></a> structure which is unreferenced</td>
2832 </tr>
2833 <tr>
2834 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
2835 <td>
2836 <a href="./../glib/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> to stop further <a class="link" href="gobject-Type-Information.html#GTypeClassCacheFunc" title="GTypeClassCacheFunc ()"><span class="type">GTypeClassCacheFunc</span></a>s from being
2837 called, <a href="./../glib/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> to continue.</td>
2838 </tr>
2839 </tbody>
2840 </table></div>
2841 </div>
2842 <hr>
2843 <div class="refsect2">
2844 <a name="GTypeFlags"></a><h3>enum GTypeFlags</h3>
2845 <pre class="programlisting">typedef enum {
2846   G_TYPE_FLAG_ABSTRACT          = (1 &lt;&lt; 4),
2847   G_TYPE_FLAG_VALUE_ABSTRACT = (1 &lt;&lt; 5)
2848 } GTypeFlags;
2849 </pre>
2850 <p>
2851 Bit masks used to check or determine characteristics of a type.
2852 </p>
2853 <div class="variablelist"><table border="0">
2854 <col align="left" valign="top">
2855 <tbody>
2856 <tr>
2857 <td><p><a name="G-TYPE-FLAG-ABSTRACT:CAPS"></a><span class="term"><code class="literal">G_TYPE_FLAG_ABSTRACT</code></span></p></td>
2858 <td>Indicates an abstract type. No instances can be
2859  created for an abstract type.
2860 </td>
2861 </tr>
2862 <tr>
2863 <td><p><a name="G-TYPE-FLAG-VALUE-ABSTRACT:CAPS"></a><span class="term"><code class="literal">G_TYPE_FLAG_VALUE_ABSTRACT</code></span></p></td>
2864 <td>Indicates an abstract value type, i.e. a type
2865  that introduces a value table, but can't be used for
2866  <a class="link" href="gobject-Generic-values.html#g-value-init" title="g_value_init ()"><code class="function">g_value_init()</code></a>.
2867 </td>
2868 </tr>
2869 </tbody>
2870 </table></div>
2871 </div>
2872 <hr>
2873 <div class="refsect2">
2874 <a name="GTypeFundamentalFlags"></a><h3>enum GTypeFundamentalFlags</h3>
2875 <pre class="programlisting">typedef enum {
2876   G_TYPE_FLAG_CLASSED           = (1 &lt;&lt; 0),
2877   G_TYPE_FLAG_INSTANTIATABLE    = (1 &lt;&lt; 1),
2878   G_TYPE_FLAG_DERIVABLE         = (1 &lt;&lt; 2),
2879   G_TYPE_FLAG_DEEP_DERIVABLE    = (1 &lt;&lt; 3)
2880 } GTypeFundamentalFlags;
2881 </pre>
2882 <p>
2883 Bit masks used to check or determine specific characteristics of a
2884 fundamental type.
2885 </p>
2886 <div class="variablelist"><table border="0">
2887 <col align="left" valign="top">
2888 <tbody>
2889 <tr>
2890 <td><p><a name="G-TYPE-FLAG-CLASSED:CAPS"></a><span class="term"><code class="literal">G_TYPE_FLAG_CLASSED</code></span></p></td>
2891 <td>Indicates a classed type.
2892 </td>
2893 </tr>
2894 <tr>
2895 <td><p><a name="G-TYPE-FLAG-INSTANTIATABLE:CAPS"></a><span class="term"><code class="literal">G_TYPE_FLAG_INSTANTIATABLE</code></span></p></td>
2896 <td>Indicates an instantiable type (implies classed).
2897 </td>
2898 </tr>
2899 <tr>
2900 <td><p><a name="G-TYPE-FLAG-DERIVABLE:CAPS"></a><span class="term"><code class="literal">G_TYPE_FLAG_DERIVABLE</code></span></p></td>
2901 <td>Indicates a flat derivable type.
2902 </td>
2903 </tr>
2904 <tr>
2905 <td><p><a name="G-TYPE-FLAG-DEEP-DERIVABLE:CAPS"></a><span class="term"><code class="literal">G_TYPE_FLAG_DEEP_DERIVABLE</code></span></p></td>
2906 <td>Indicates a deep derivable type (implies derivable).
2907 </td>
2908 </tr>
2909 </tbody>
2910 </table></div>
2911 </div>
2912 <hr>
2913 <div class="refsect2">
2914 <a name="g-type-register-static"></a><h3>g_type_register_static ()</h3>
2915 <pre class="programlisting"><a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="returnvalue">GType</span></a>               g_type_register_static              (<em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> parent_type</code></em>,
2916                                                          <em class="parameter"><code>const <a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *type_name</code></em>,
2917                                                          <em class="parameter"><code>const <a class="link" href="gobject-Type-Information.html#GTypeInfo" title="struct GTypeInfo"><span class="type">GTypeInfo</span></a> *info</code></em>,
2918                                                          <em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GTypeFlags" title="enum GTypeFlags"><span class="type">GTypeFlags</span></a> flags</code></em>);</pre>
2919 <p>
2920 Registers <em class="parameter"><code>type_name</code></em> as the name of a new static type derived from
2921 <em class="parameter"><code>parent_type</code></em>.  The type system uses the information contained in the
2922 <a class="link" href="gobject-Type-Information.html#GTypeInfo" title="struct GTypeInfo"><span class="type">GTypeInfo</span></a> structure pointed to by <em class="parameter"><code>info</code></em> to manage the type and its
2923 instances (if not abstract).  The value of <em class="parameter"><code>flags</code></em> determines the nature
2924 (e.g. abstract or not) of the type.
2925 </p>
2926 <div class="variablelist"><table border="0">
2927 <col align="left" valign="top">
2928 <tbody>
2929 <tr>
2930 <td><p><span class="term"><em class="parameter"><code>parent_type</code></em> :</span></p></td>
2931 <td>Type from which this type will be derived.</td>
2932 </tr>
2933 <tr>
2934 <td><p><span class="term"><em class="parameter"><code>type_name</code></em> :</span></p></td>
2935 <td>0-terminated string used as the name of the new type.</td>
2936 </tr>
2937 <tr>
2938 <td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
2939 <td>The <a class="link" href="gobject-Type-Information.html#GTypeInfo" title="struct GTypeInfo"><span class="type">GTypeInfo</span></a> structure for this type.</td>
2940 </tr>
2941 <tr>
2942 <td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td>
2943 <td>Bitwise combination of <a class="link" href="gobject-Type-Information.html#GTypeFlags" title="enum GTypeFlags"><span class="type">GTypeFlags</span></a> values.</td>
2944 </tr>
2945 <tr>
2946 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
2947 <td>The new type identifier.</td>
2948 </tr>
2949 </tbody>
2950 </table></div>
2951 </div>
2952 <hr>
2953 <div class="refsect2">
2954 <a name="g-type-register-static-simple"></a><h3>g_type_register_static_simple ()</h3>
2955 <pre class="programlisting"><a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="returnvalue">GType</span></a>               g_type_register_static_simple       (<em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> parent_type</code></em>,
2956                                                          <em class="parameter"><code>const <a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *type_name</code></em>,
2957                                                          <em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> class_size</code></em>,
2958                                                          <em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GClassInitFunc" title="GClassInitFunc ()"><span class="type">GClassInitFunc</span></a> class_init</code></em>,
2959                                                          <em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> instance_size</code></em>,
2960                                                          <em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GInstanceInitFunc" title="GInstanceInitFunc ()"><span class="type">GInstanceInitFunc</span></a> instance_init</code></em>,
2961                                                          <em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GTypeFlags" title="enum GTypeFlags"><span class="type">GTypeFlags</span></a> flags</code></em>);</pre>
2962 <p>
2963 Registers <em class="parameter"><code>type_name</code></em> as the name of a new static type derived from
2964 <em class="parameter"><code>parent_type</code></em>.  The value of <em class="parameter"><code>flags</code></em> determines the nature (e.g.
2965 abstract or not) of the type. It works by filling a <a class="link" href="gobject-Type-Information.html#GTypeInfo" title="struct GTypeInfo"><span class="type">GTypeInfo</span></a>
2966 struct and calling <a class="link" href="gobject-Type-Information.html#g-type-register-static" title="g_type_register_static ()"><code class="function">g_type_register_static()</code></a>.
2967 </p>
2968 <div class="variablelist"><table border="0">
2969 <col align="left" valign="top">
2970 <tbody>
2971 <tr>
2972 <td><p><span class="term"><em class="parameter"><code>parent_type</code></em> :</span></p></td>
2973 <td>Type from which this type will be derived.</td>
2974 </tr>
2975 <tr>
2976 <td><p><span class="term"><em class="parameter"><code>type_name</code></em> :</span></p></td>
2977 <td>0-terminated string used as the name of the new type.</td>
2978 </tr>
2979 <tr>
2980 <td><p><span class="term"><em class="parameter"><code>class_size</code></em> :</span></p></td>
2981 <td>Size of the class structure (see <a class="link" href="gobject-Type-Information.html#GTypeInfo" title="struct GTypeInfo"><span class="type">GTypeInfo</span></a>)</td>
2982 </tr>
2983 <tr>
2984 <td><p><span class="term"><em class="parameter"><code>class_init</code></em> :</span></p></td>
2985 <td>Location of the class initialization function (see <a class="link" href="gobject-Type-Information.html#GTypeInfo" title="struct GTypeInfo"><span class="type">GTypeInfo</span></a>)</td>
2986 </tr>
2987 <tr>
2988 <td><p><span class="term"><em class="parameter"><code>instance_size</code></em> :</span></p></td>
2989 <td>Size of the instance structure (see <a class="link" href="gobject-Type-Information.html#GTypeInfo" title="struct GTypeInfo"><span class="type">GTypeInfo</span></a>)</td>
2990 </tr>
2991 <tr>
2992 <td><p><span class="term"><em class="parameter"><code>instance_init</code></em> :</span></p></td>
2993 <td>Location of the instance initialization function (see <a class="link" href="gobject-Type-Information.html#GTypeInfo" title="struct GTypeInfo"><span class="type">GTypeInfo</span></a>)</td>
2994 </tr>
2995 <tr>
2996 <td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td>
2997 <td>Bitwise combination of <a class="link" href="gobject-Type-Information.html#GTypeFlags" title="enum GTypeFlags"><span class="type">GTypeFlags</span></a> values.</td>
2998 </tr>
2999 <tr>
3000 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
3001 <td>The new type identifier.</td>
3002 </tr>
3003 </tbody>
3004 </table></div>
3005 <p class="since">Since 2.12</p>
3006 </div>
3007 <hr>
3008 <div class="refsect2">
3009 <a name="g-type-register-dynamic"></a><h3>g_type_register_dynamic ()</h3>
3010 <pre class="programlisting"><a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="returnvalue">GType</span></a>               g_type_register_dynamic             (<em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> parent_type</code></em>,
3011                                                          <em class="parameter"><code>const <a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *type_name</code></em>,
3012                                                          <em class="parameter"><code><a class="link" href="GTypePlugin.html" title="GTypePlugin"><span class="type">GTypePlugin</span></a> *plugin</code></em>,
3013                                                          <em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GTypeFlags" title="enum GTypeFlags"><span class="type">GTypeFlags</span></a> flags</code></em>);</pre>
3014 <p>
3015 Registers <em class="parameter"><code>type_name</code></em> as the name of a new dynamic type derived from
3016 <em class="parameter"><code>parent_type</code></em>.  The type system uses the information contained in the
3017 <a class="link" 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
3018 instances (if not abstract).  The value of <em class="parameter"><code>flags</code></em> determines the nature
3019 (e.g. abstract or not) of the type.
3020 </p>
3021 <div class="variablelist"><table border="0">
3022 <col align="left" valign="top">
3023 <tbody>
3024 <tr>
3025 <td><p><span class="term"><em class="parameter"><code>parent_type</code></em> :</span></p></td>
3026 <td>Type from which this type will be derived.</td>
3027 </tr>
3028 <tr>
3029 <td><p><span class="term"><em class="parameter"><code>type_name</code></em> :</span></p></td>
3030 <td>0-terminated string used as the name of the new type.</td>
3031 </tr>
3032 <tr>
3033 <td><p><span class="term"><em class="parameter"><code>plugin</code></em> :</span></p></td>
3034 <td>The <a class="link" href="GTypePlugin.html" title="GTypePlugin"><span class="type">GTypePlugin</span></a> structure to retrieve the <a class="link" href="gobject-Type-Information.html#GTypeInfo" title="struct GTypeInfo"><span class="type">GTypeInfo</span></a> from.</td>
3035 </tr>
3036 <tr>
3037 <td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td>
3038 <td>Bitwise combination of <a class="link" href="gobject-Type-Information.html#GTypeFlags" title="enum GTypeFlags"><span class="type">GTypeFlags</span></a> values.</td>
3039 </tr>
3040 <tr>
3041 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
3042 <td>The new type identifier or <a class="link" href="gobject-Type-Information.html#G-TYPE-INVALID:CAPS" title="G_TYPE_INVALID"><span class="type">G_TYPE_INVALID</span></a> if registration failed.</td>
3043 </tr>
3044 </tbody>
3045 </table></div>
3046 </div>
3047 <hr>
3048 <div class="refsect2">
3049 <a name="g-type-register-fundamental"></a><h3>g_type_register_fundamental ()</h3>
3050 <pre class="programlisting"><a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="returnvalue">GType</span></a>               g_type_register_fundamental         (<em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> type_id</code></em>,
3051                                                          <em class="parameter"><code>const <a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *type_name</code></em>,
3052                                                          <em class="parameter"><code>const <a class="link" href="gobject-Type-Information.html#GTypeInfo" title="struct GTypeInfo"><span class="type">GTypeInfo</span></a> *info</code></em>,
3053                                                          <em class="parameter"><code>const <a class="link" href="gobject-Type-Information.html#GTypeFundamentalInfo" title="struct GTypeFundamentalInfo"><span class="type">GTypeFundamentalInfo</span></a> *finfo</code></em>,
3054                                                          <em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GTypeFlags" title="enum GTypeFlags"><span class="type">GTypeFlags</span></a> flags</code></em>);</pre>
3055 <p>
3056 Registers <em class="parameter"><code>type_id</code></em> as the predefined identifier and <em class="parameter"><code>type_name</code></em> as the
3057 name of a fundamental type. If <em class="parameter"><code>type_id</code></em> is already registered, or a type
3058 named <em class="parameter"><code>type_name</code></em> is already registered, the behaviour is undefined. The type
3059 system uses the information contained in the <a class="link" href="gobject-Type-Information.html#GTypeInfo" title="struct GTypeInfo"><span class="type">GTypeInfo</span></a> structure pointed to
3060 by <em class="parameter"><code>info</code></em> and the <a class="link" href="gobject-Type-Information.html#GTypeFundamentalInfo" title="struct GTypeFundamentalInfo"><span class="type">GTypeFundamentalInfo</span></a> structure pointed to by <em class="parameter"><code>finfo</code></em> to
3061 manage the type and its instances. The value of <em class="parameter"><code>flags</code></em> determines additional
3062 characteristics of the fundamental type.
3063 </p>
3064 <div class="variablelist"><table border="0">
3065 <col align="left" valign="top">
3066 <tbody>
3067 <tr>
3068 <td><p><span class="term"><em class="parameter"><code>type_id</code></em> :</span></p></td>
3069 <td>A predefined type identifier.</td>
3070 </tr>
3071 <tr>
3072 <td><p><span class="term"><em class="parameter"><code>type_name</code></em> :</span></p></td>
3073 <td>0-terminated string used as the name of the new type.</td>
3074 </tr>
3075 <tr>
3076 <td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
3077 <td>The <a class="link" href="gobject-Type-Information.html#GTypeInfo" title="struct GTypeInfo"><span class="type">GTypeInfo</span></a> structure for this type.</td>
3078 </tr>
3079 <tr>
3080 <td><p><span class="term"><em class="parameter"><code>finfo</code></em> :</span></p></td>
3081 <td>The <a class="link" href="gobject-Type-Information.html#GTypeFundamentalInfo" title="struct GTypeFundamentalInfo"><span class="type">GTypeFundamentalInfo</span></a> structure for this type.</td>
3082 </tr>
3083 <tr>
3084 <td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td>
3085 <td>Bitwise combination of <a class="link" href="gobject-Type-Information.html#GTypeFlags" title="enum GTypeFlags"><span class="type">GTypeFlags</span></a> values.</td>
3086 </tr>
3087 <tr>
3088 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
3089 <td>The predefined type identifier.</td>
3090 </tr>
3091 </tbody>
3092 </table></div>
3093 </div>
3094 <hr>
3095 <div class="refsect2">
3096 <a name="g-type-add-interface-static"></a><h3>g_type_add_interface_static ()</h3>
3097 <pre class="programlisting"><span class="returnvalue">void</span>                g_type_add_interface_static         (<em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> instance_type</code></em>,
3098                                                          <em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> interface_type</code></em>,
3099                                                          <em class="parameter"><code>const <a class="link" href="gobject-Type-Information.html#GInterfaceInfo" title="struct GInterfaceInfo"><span class="type">GInterfaceInfo</span></a> *info</code></em>);</pre>
3100 <p>
3101 Adds the static <em class="parameter"><code>interface_type</code></em> to <em class="parameter"><code>instantiable_type</code></em>.  The
3102 information contained in the <a class="link" href="gobject-Type-Information.html#GInterfaceInfo" title="struct GInterfaceInfo"><span class="type">GInterfaceInfo</span></a> structure pointed to by
3103 <em class="parameter"><code>info</code></em> is used to manage the relationship.
3104 </p>
3105 <div class="variablelist"><table border="0">
3106 <col align="left" valign="top">
3107 <tbody>
3108 <tr>
3109 <td><p><span class="term"><em class="parameter"><code>instance_type</code></em> :</span></p></td>
3110 <td>
3111 <a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> value of an instantiable type.</td>
3112 </tr>
3113 <tr>
3114 <td><p><span class="term"><em class="parameter"><code>interface_type</code></em> :</span></p></td>
3115 <td>
3116 <a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> value of an interface type.</td>
3117 </tr>
3118 <tr>
3119 <td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
3120 <td>The <a class="link" href="gobject-Type-Information.html#GInterfaceInfo" title="struct GInterfaceInfo"><span class="type">GInterfaceInfo</span></a> structure for this
3121 (<em class="parameter"><code>instance_type</code></em>, <em class="parameter"><code>interface_type</code></em>) combination.</td>
3122 </tr>
3123 </tbody>
3124 </table></div>
3125 </div>
3126 <hr>
3127 <div class="refsect2">
3128 <a name="g-type-add-interface-dynamic"></a><h3>g_type_add_interface_dynamic ()</h3>
3129 <pre class="programlisting"><span class="returnvalue">void</span>                g_type_add_interface_dynamic        (<em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> instance_type</code></em>,
3130                                                          <em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> interface_type</code></em>,
3131                                                          <em class="parameter"><code><a class="link" href="GTypePlugin.html" title="GTypePlugin"><span class="type">GTypePlugin</span></a> *plugin</code></em>);</pre>
3132 <p>
3133 Adds the dynamic <em class="parameter"><code>interface_type</code></em> to <em class="parameter"><code>instantiable_type</code></em>. The information
3134 contained in the <a class="link" href="GTypePlugin.html" title="GTypePlugin"><span class="type">GTypePlugin</span></a> structure pointed to by <em class="parameter"><code>plugin</code></em>
3135 is used to manage the relationship.
3136 </p>
3137 <div class="variablelist"><table border="0">
3138 <col align="left" valign="top">
3139 <tbody>
3140 <tr>
3141 <td><p><span class="term"><em class="parameter"><code>instance_type</code></em> :</span></p></td>
3142 <td>the <a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> value of an instantiable type.</td>
3143 </tr>
3144 <tr>
3145 <td><p><span class="term"><em class="parameter"><code>interface_type</code></em> :</span></p></td>
3146 <td>the <a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> value of an interface type.</td>
3147 </tr>
3148 <tr>
3149 <td><p><span class="term"><em class="parameter"><code>plugin</code></em> :</span></p></td>
3150 <td>the <a class="link" href="GTypePlugin.html" title="GTypePlugin"><span class="type">GTypePlugin</span></a> structure to retrieve the <a class="link" href="gobject-Type-Information.html#GInterfaceInfo" title="struct GInterfaceInfo"><span class="type">GInterfaceInfo</span></a> from.</td>
3151 </tr>
3152 </tbody>
3153 </table></div>
3154 </div>
3155 <hr>
3156 <div class="refsect2">
3157 <a name="g-type-interface-add-prerequisite"></a><h3>g_type_interface_add_prerequisite ()</h3>
3158 <pre class="programlisting"><span class="returnvalue">void</span>                g_type_interface_add_prerequisite   (<em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> interface_type</code></em>,
3159                                                          <em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> prerequisite_type</code></em>);</pre>
3160 <p>
3161 Adds <em class="parameter"><code>prerequisite_type</code></em> to the list of prerequisites of <em class="parameter"><code>interface_type</code></em>.
3162 This means that any type implementing <em class="parameter"><code>interface_type</code></em> must also implement
3163 <em class="parameter"><code>prerequisite_type</code></em>. Prerequisites can be thought of as an alternative to
3164 interface derivation (which GType doesn't support). An interface can have
3165 at most one instantiatable prerequisite type.
3166 </p>
3167 <div class="variablelist"><table border="0">
3168 <col align="left" valign="top">
3169 <tbody>
3170 <tr>
3171 <td><p><span class="term"><em class="parameter"><code>interface_type</code></em> :</span></p></td>
3172 <td>
3173 <a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> value of an interface type.</td>
3174 </tr>
3175 <tr>
3176 <td><p><span class="term"><em class="parameter"><code>prerequisite_type</code></em> :</span></p></td>
3177 <td>
3178 <a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> value of an interface or instantiatable type.</td>
3179 </tr>
3180 </tbody>
3181 </table></div>
3182 </div>
3183 <hr>
3184 <div class="refsect2">
3185 <a name="g-type-get-plugin"></a><h3>g_type_get_plugin ()</h3>
3186 <pre class="programlisting"><a class="link" href="GTypePlugin.html" title="GTypePlugin"><span class="returnvalue">GTypePlugin</span></a> *       g_type_get_plugin                   (<em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> type</code></em>);</pre>
3187 <p>
3188 Returns the <a class="link" href="GTypePlugin.html" title="GTypePlugin"><span class="type">GTypePlugin</span></a> structure for <em class="parameter"><code>type</code></em> or
3189 <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if <em class="parameter"><code>type</code></em> does not have a <a class="link" href="GTypePlugin.html" title="GTypePlugin"><span class="type">GTypePlugin</span></a> structure.
3190 </p>
3191 <div class="variablelist"><table border="0">
3192 <col align="left" valign="top">
3193 <tbody>
3194 <tr>
3195 <td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
3196 <td>The <a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> to retrieve the plugin for.</td>
3197 </tr>
3198 <tr>
3199 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
3200 <td>The corresponding plugin if <em class="parameter"><code>type</code></em> is a
3201 dynamic type, <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> otherwise. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
3202 </td>
3203 </tr>
3204 </tbody>
3205 </table></div>
3206 </div>
3207 <hr>
3208 <div class="refsect2">
3209 <a name="g-type-interface-get-plugin"></a><h3>g_type_interface_get_plugin ()</h3>
3210 <pre class="programlisting"><a class="link" href="GTypePlugin.html" title="GTypePlugin"><span class="returnvalue">GTypePlugin</span></a> *       g_type_interface_get_plugin         (<em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> instance_type</code></em>,
3211                                                          <em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> interface_type</code></em>);</pre>
3212 <p>
3213 Returns the <a class="link" href="GTypePlugin.html" title="GTypePlugin"><span class="type">GTypePlugin</span></a> structure for the dynamic interface
3214 <em class="parameter"><code>interface_type</code></em> which has been added to <em class="parameter"><code>instance_type</code></em>, or <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if
3215 <em class="parameter"><code>interface_type</code></em> has not been added to <em class="parameter"><code>instance_type</code></em> or does not
3216 have a <a class="link" href="GTypePlugin.html" title="GTypePlugin"><span class="type">GTypePlugin</span></a> structure. See <a class="link" href="gobject-Type-Information.html#g-type-add-interface-dynamic" title="g_type_add_interface_dynamic ()"><code class="function">g_type_add_interface_dynamic()</code></a>.
3217 </p>
3218 <div class="variablelist"><table border="0">
3219 <col align="left" valign="top">
3220 <tbody>
3221 <tr>
3222 <td><p><span class="term"><em class="parameter"><code>instance_type</code></em> :</span></p></td>
3223 <td>the <a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> value of an instantiatable type.</td>
3224 </tr>
3225 <tr>
3226 <td><p><span class="term"><em class="parameter"><code>interface_type</code></em> :</span></p></td>
3227 <td>the <a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> value of an interface type.</td>
3228 </tr>
3229 <tr>
3230 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
3231 <td>the <a class="link" href="GTypePlugin.html" title="GTypePlugin"><span class="type">GTypePlugin</span></a> for the dynamic
3232 interface <em class="parameter"><code>interface_type</code></em> of <em class="parameter"><code>instance_type</code></em>. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
3233 </td>
3234 </tr>
3235 </tbody>
3236 </table></div>
3237 </div>
3238 <hr>
3239 <div class="refsect2">
3240 <a name="g-type-fundamental-next"></a><h3>g_type_fundamental_next ()</h3>
3241 <pre class="programlisting"><a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="returnvalue">GType</span></a>               g_type_fundamental_next             (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
3242 <p>
3243 Returns the next free fundamental type id which can be used to
3244 register a new fundamental type with <a class="link" href="gobject-Type-Information.html#g-type-register-fundamental" title="g_type_register_fundamental ()"><code class="function">g_type_register_fundamental()</code></a>.
3245 The returned type ID represents the highest currently registered
3246 fundamental type identifier.
3247 </p>
3248 <div class="variablelist"><table border="0">
3249 <col align="left" valign="top">
3250 <tbody><tr>
3251 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
3252 <td>The nextmost fundamental type ID to be registered,
3253 or 0 if the type system ran out of fundamental type IDs.</td>
3254 </tr></tbody>
3255 </table></div>
3256 </div>
3257 <hr>
3258 <div class="refsect2">
3259 <a name="g-type-fundamental"></a><h3>g_type_fundamental ()</h3>
3260 <pre class="programlisting"><a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="returnvalue">GType</span></a>               g_type_fundamental                  (<em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> type_id</code></em>);</pre>
3261 <p>
3262 Internal function, used to extract the fundamental type ID portion.
3263 use <a class="link" href="gobject-Type-Information.html#G-TYPE-FUNDAMENTAL:CAPS" title="G_TYPE_FUNDAMENTAL()"><code class="function">G_TYPE_FUNDAMENTAL()</code></a> instead.
3264 </p>
3265 <div class="variablelist"><table border="0">
3266 <col align="left" valign="top">
3267 <tbody>
3268 <tr>
3269 <td><p><span class="term"><em class="parameter"><code>type_id</code></em> :</span></p></td>
3270 <td>valid type ID</td>
3271 </tr>
3272 <tr>
3273 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
3274 <td>fundamental type ID</td>
3275 </tr>
3276 </tbody>
3277 </table></div>
3278 </div>
3279 <hr>
3280 <div class="refsect2">
3281 <a name="g-type-create-instance"></a><h3>g_type_create_instance ()</h3>
3282 <pre class="programlisting"><a class="link" href="gobject-Type-Information.html#GTypeInstance" title="struct GTypeInstance"><span class="returnvalue">GTypeInstance</span></a> *     g_type_create_instance              (<em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> type</code></em>);</pre>
3283 <p>
3284 Creates and initializes an instance of <em class="parameter"><code>type</code></em> if <em class="parameter"><code>type</code></em> is valid and
3285 can be instantiated. The type system only performs basic allocation
3286 and structure setups for instances: actual instance creation should
3287 happen through functions supplied by the type's fundamental type
3288 implementation.  So use of <a class="link" href="gobject-Type-Information.html#g-type-create-instance" title="g_type_create_instance ()"><code class="function">g_type_create_instance()</code></a> is reserved for
3289 implementators of fundamental types only. E.g. instances of the
3290 <a class="link" href="gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> hierarchy should be created via <a class="link" href="gobject-The-Base-Object-Type.html#g-object-new" title="g_object_new ()"><code class="function">g_object_new()</code></a> and
3291 <span class="emphasis"><em>never</em></span> directly through
3292 <a class="link" href="gobject-Type-Information.html#g-type-create-instance" title="g_type_create_instance ()"><code class="function">g_type_create_instance()</code></a> which doesn't handle things like singleton
3293 objects or object construction.  Note: Do <span class="emphasis"><em>not</em></span>
3294 use this function, unless you're implementing a fundamental
3295 type. Also language bindings should <span class="emphasis"><em>not</em></span> use
3296 this function but <a class="link" href="gobject-The-Base-Object-Type.html#g-object-new" title="g_object_new ()"><code class="function">g_object_new()</code></a> instead.
3297 </p>
3298 <div class="variablelist"><table border="0">
3299 <col align="left" valign="top">
3300 <tbody>
3301 <tr>
3302 <td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
3303 <td>An instantiatable type to create an instance for.</td>
3304 </tr>
3305 <tr>
3306 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
3307 <td>An allocated and initialized instance, subject to further
3308 treatment by the fundamental type implementation.</td>
3309 </tr>
3310 </tbody>
3311 </table></div>
3312 </div>
3313 <hr>
3314 <div class="refsect2">
3315 <a name="g-type-free-instance"></a><h3>g_type_free_instance ()</h3>
3316 <pre class="programlisting"><span class="returnvalue">void</span>                g_type_free_instance                (<em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GTypeInstance" title="struct GTypeInstance"><span class="type">GTypeInstance</span></a> *instance</code></em>);</pre>
3317 <p>
3318 Frees an instance of a type, returning it to the instance pool for
3319 the type, if there is one.
3320 </p>
3321 <p>
3322 Like <a class="link" href="gobject-Type-Information.html#g-type-create-instance" title="g_type_create_instance ()"><code class="function">g_type_create_instance()</code></a>, this function is reserved for
3323 implementors of fundamental types.
3324 </p>
3325 <div class="variablelist"><table border="0">
3326 <col align="left" valign="top">
3327 <tbody><tr>
3328 <td><p><span class="term"><em class="parameter"><code>instance</code></em> :</span></p></td>
3329 <td>an instance of a type.</td>
3330 </tr></tbody>
3331 </table></div>
3332 </div>
3333 <hr>
3334 <div class="refsect2">
3335 <a name="g-type-add-class-cache-func"></a><h3>g_type_add_class_cache_func ()</h3>
3336 <pre class="programlisting"><span class="returnvalue">void</span>                g_type_add_class_cache_func         (<em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> cache_data</code></em>,
3337                                                          <em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GTypeClassCacheFunc" title="GTypeClassCacheFunc ()"><span class="type">GTypeClassCacheFunc</span></a> cache_func</code></em>);</pre>
3338 <p>
3339 Adds a <a class="link" href="gobject-Type-Information.html#GTypeClassCacheFunc" title="GTypeClassCacheFunc ()"><span class="type">GTypeClassCacheFunc</span></a> to be called before the reference count of a
3340 class goes from one to zero. This can be used to prevent premature class
3341 destruction. All installed <a class="link" href="gobject-Type-Information.html#GTypeClassCacheFunc" title="GTypeClassCacheFunc ()"><span class="type">GTypeClassCacheFunc</span></a> functions will be chained
3342 until one of them returns <a href="./../glib/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>. The functions have to check the class id
3343 passed in to figure whether they actually want to cache the class of this
3344 type, since all classes are routed through the same <a class="link" href="gobject-Type-Information.html#GTypeClassCacheFunc" title="GTypeClassCacheFunc ()"><span class="type">GTypeClassCacheFunc</span></a>
3345 chain.
3346 </p>
3347 <div class="variablelist"><table border="0">
3348 <col align="left" valign="top">
3349 <tbody>
3350 <tr>
3351 <td><p><span class="term"><em class="parameter"><code>cache_data</code></em> :</span></p></td>
3352 <td>data to be passed to <em class="parameter"><code>cache_func</code></em>
3353 </td>
3354 </tr>
3355 <tr>
3356 <td><p><span class="term"><em class="parameter"><code>cache_func</code></em> :</span></p></td>
3357 <td>a <a class="link" href="gobject-Type-Information.html#GTypeClassCacheFunc" title="GTypeClassCacheFunc ()"><span class="type">GTypeClassCacheFunc</span></a>
3358 </td>
3359 </tr>
3360 </tbody>
3361 </table></div>
3362 </div>
3363 <hr>
3364 <div class="refsect2">
3365 <a name="g-type-remove-class-cache-func"></a><h3>g_type_remove_class_cache_func ()</h3>
3366 <pre class="programlisting"><span class="returnvalue">void</span>                g_type_remove_class_cache_func      (<em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> cache_data</code></em>,
3367                                                          <em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GTypeClassCacheFunc" title="GTypeClassCacheFunc ()"><span class="type">GTypeClassCacheFunc</span></a> cache_func</code></em>);</pre>
3368 <p>
3369 Removes a previously installed <a class="link" href="gobject-Type-Information.html#GTypeClassCacheFunc" title="GTypeClassCacheFunc ()"><span class="type">GTypeClassCacheFunc</span></a>. The cache
3370 maintained by <em class="parameter"><code>cache_func</code></em> has to be empty when calling
3371 <a class="link" href="gobject-Type-Information.html#g-type-remove-class-cache-func" title="g_type_remove_class_cache_func ()"><code class="function">g_type_remove_class_cache_func()</code></a> to avoid leaks.
3372 </p>
3373 <div class="variablelist"><table border="0">
3374 <col align="left" valign="top">
3375 <tbody>
3376 <tr>
3377 <td><p><span class="term"><em class="parameter"><code>cache_data</code></em> :</span></p></td>
3378 <td>data that was given when adding <em class="parameter"><code>cache_func</code></em>
3379 </td>
3380 </tr>
3381 <tr>
3382 <td><p><span class="term"><em class="parameter"><code>cache_func</code></em> :</span></p></td>
3383 <td>a <a class="link" href="gobject-Type-Information.html#GTypeClassCacheFunc" title="GTypeClassCacheFunc ()"><span class="type">GTypeClassCacheFunc</span></a>
3384 </td>
3385 </tr>
3386 </tbody>
3387 </table></div>
3388 </div>
3389 <hr>
3390 <div class="refsect2">
3391 <a name="g-type-class-unref-uncached"></a><h3>g_type_class_unref_uncached ()</h3>
3392 <pre class="programlisting"><span class="returnvalue">void</span>                g_type_class_unref_uncached         (<em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> g_class</code></em>);</pre>
3393 <p>
3394 A variant of <a class="link" href="gobject-Type-Information.html#g-type-class-unref" title="g_type_class_unref ()"><code class="function">g_type_class_unref()</code></a> for use in <a class="link" href="gobject-Type-Information.html#GTypeClassCacheFunc" title="GTypeClassCacheFunc ()"><span class="type">GTypeClassCacheFunc</span></a>
3395 implementations. It unreferences a class without consulting the chain
3396 of <a class="link" href="gobject-Type-Information.html#GTypeClassCacheFunc" title="GTypeClassCacheFunc ()"><span class="type">GTypeClassCacheFunc</span></a>s, avoiding the recursion which would occur
3397 otherwise.
3398 </p>
3399 <div class="variablelist"><table border="0">
3400 <col align="left" valign="top">
3401 <tbody><tr>
3402 <td><p><span class="term"><em class="parameter"><code>g_class</code></em> :</span></p></td>
3403 <td>The <a class="link" href="gobject-Type-Information.html#GTypeClass" title="struct GTypeClass"><span class="type">GTypeClass</span></a> structure to
3404 unreference. <span class="annotation">[<acronym title="Override the parsed C type with given type"><span class="acronym">type</span></acronym> GObject.TypeClass]</span>
3405 </td>
3406 </tr></tbody>
3407 </table></div>
3408 </div>
3409 <hr>
3410 <div class="refsect2">
3411 <a name="g-type-add-interface-check"></a><h3>g_type_add_interface_check ()</h3>
3412 <pre class="programlisting"><span class="returnvalue">void</span>                g_type_add_interface_check          (<em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> check_data</code></em>,
3413                                                          <em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GTypeInterfaceCheckFunc" title="GTypeInterfaceCheckFunc ()"><span class="type">GTypeInterfaceCheckFunc</span></a> check_func</code></em>);</pre>
3414 <p>
3415 Adds a function to be called after an interface vtable is
3416 initialized for any class (i.e. after the <em class="parameter"><code>interface_init</code></em> member of
3417 <a class="link" href="gobject-Type-Information.html#GInterfaceInfo" title="struct GInterfaceInfo"><span class="type">GInterfaceInfo</span></a> has been called).
3418 </p>
3419 <p>
3420 This function is useful when you want to check an invariant that
3421 depends on the interfaces of a class. For instance, the
3422 implementation of <a class="link" href="gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> uses this facility to check that an
3423 object implements all of the properties that are defined on its
3424 interfaces.
3425 </p>
3426 <div class="variablelist"><table border="0">
3427 <col align="left" valign="top">
3428 <tbody>
3429 <tr>
3430 <td><p><span class="term"><em class="parameter"><code>check_data</code></em> :</span></p></td>
3431 <td>data to pass to <em class="parameter"><code>check_func</code></em>
3432 </td>
3433 </tr>
3434 <tr>
3435 <td><p><span class="term"><em class="parameter"><code>check_func</code></em> :</span></p></td>
3436 <td>function to be called after each interface
3437 is initialized.</td>
3438 </tr>
3439 </tbody>
3440 </table></div>
3441 <p class="since">Since 2.4</p>
3442 </div>
3443 <hr>
3444 <div class="refsect2">
3445 <a name="g-type-remove-interface-check"></a><h3>g_type_remove_interface_check ()</h3>
3446 <pre class="programlisting"><span class="returnvalue">void</span>                g_type_remove_interface_check       (<em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> check_data</code></em>,
3447                                                          <em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GTypeInterfaceCheckFunc" title="GTypeInterfaceCheckFunc ()"><span class="type">GTypeInterfaceCheckFunc</span></a> check_func</code></em>);</pre>
3448 <p>
3449 Removes an interface check function added with
3450 <a class="link" href="gobject-Type-Information.html#g-type-add-interface-check" title="g_type_add_interface_check ()"><code class="function">g_type_add_interface_check()</code></a>.
3451 </p>
3452 <div class="variablelist"><table border="0">
3453 <col align="left" valign="top">
3454 <tbody>
3455 <tr>
3456 <td><p><span class="term"><em class="parameter"><code>check_data</code></em> :</span></p></td>
3457 <td>callback data passed to <a class="link" href="gobject-Type-Information.html#g-type-add-interface-check" title="g_type_add_interface_check ()"><code class="function">g_type_add_interface_check()</code></a>
3458 </td>
3459 </tr>
3460 <tr>
3461 <td><p><span class="term"><em class="parameter"><code>check_func</code></em> :</span></p></td>
3462 <td>callback function passed to <a class="link" href="gobject-Type-Information.html#g-type-add-interface-check" title="g_type_add_interface_check ()"><code class="function">g_type_add_interface_check()</code></a>
3463 </td>
3464 </tr>
3465 </tbody>
3466 </table></div>
3467 <p class="since">Since 2.4</p>
3468 </div>
3469 <hr>
3470 <div class="refsect2">
3471 <a name="GTypeInterfaceCheckFunc"></a><h3>GTypeInterfaceCheckFunc ()</h3>
3472 <pre class="programlisting"><span class="returnvalue">void</span>                (*GTypeInterfaceCheckFunc)          (<em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> check_data</code></em>,
3473                                                          <em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> g_iface</code></em>);</pre>
3474 <p>
3475 A callback called after an interface vtable is initialized.
3476 See <a class="link" href="gobject-Type-Information.html#g-type-add-interface-check" title="g_type_add_interface_check ()"><code class="function">g_type_add_interface_check()</code></a>.
3477 </p>
3478 <div class="variablelist"><table border="0">
3479 <col align="left" valign="top">
3480 <tbody>
3481 <tr>
3482 <td><p><span class="term"><em class="parameter"><code>check_data</code></em> :</span></p></td>
3483 <td>data passed to <a class="link" href="gobject-Type-Information.html#g-type-add-interface-check" title="g_type_add_interface_check ()"><code class="function">g_type_add_interface_check()</code></a>.</td>
3484 </tr>
3485 <tr>
3486 <td><p><span class="term"><em class="parameter"><code>g_iface</code></em> :</span></p></td>
3487 <td>the interface that has been initialized</td>
3488 </tr>
3489 </tbody>
3490 </table></div>
3491 <p class="since">Since 2.4</p>
3492 </div>
3493 <hr>
3494 <div class="refsect2">
3495 <a name="g-type-value-table-peek"></a><h3>g_type_value_table_peek ()</h3>
3496 <pre class="programlisting"><a class="link" href="gobject-Type-Information.html#GTypeValueTable" title="struct GTypeValueTable"><span class="returnvalue">GTypeValueTable</span></a> *   g_type_value_table_peek             (<em class="parameter"><code><a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> type</code></em>);</pre>
3497 <p>
3498 Returns the location of the <a class="link" href="gobject-Type-Information.html#GTypeValueTable" title="struct GTypeValueTable"><span class="type">GTypeValueTable</span></a> associated with <em class="parameter"><code>type</code></em>.
3499 <span class="emphasis"><em>Note that this function should only be used from source code
3500 that implements or has internal knowledge of the implementation of
3501 <em class="parameter"><code>type</code></em>.</em></span>
3502 </p>
3503 <div class="variablelist"><table border="0">
3504 <col align="left" valign="top">
3505 <tbody>
3506 <tr>
3507 <td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
3508 <td>A <a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> value.</td>
3509 </tr>
3510 <tr>
3511 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
3512 <td>Location of the <a class="link" href="gobject-Type-Information.html#GTypeValueTable" title="struct GTypeValueTable"><span class="type">GTypeValueTable</span></a> associated with <em class="parameter"><code>type</code></em> or
3513 <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if there is no <a class="link" href="gobject-Type-Information.html#GTypeValueTable" title="struct GTypeValueTable"><span class="type">GTypeValueTable</span></a> associated with <em class="parameter"><code>type</code></em>.</td>
3514 </tr>
3515 </tbody>
3516 </table></div>
3517 </div>
3518 <hr>
3519 <div class="refsect2">
3520 <a name="G-DEFINE-TYPE:CAPS"></a><h3>G_DEFINE_TYPE()</h3>
3521 <pre class="programlisting">#define G_DEFINE_TYPE(TN, t_n, T_P)                     G_DEFINE_TYPE_EXTENDED (TN, t_n, T_P, 0, {})
3522 </pre>
3523 <p>
3524 A convenience macro for type implementations, which declares a 
3525 class initialization function, an instance initialization function (see <a class="link" href="gobject-Type-Information.html#GTypeInfo" title="struct GTypeInfo"><span class="type">GTypeInfo</span></a> for information about 
3526 these) and a static variable named <em class="parameter"><code>t_n</code></em>_parent_class pointing to the parent class. Furthermore, it defines 
3527 a *_get_type() function. See <a class="link" href="gobject-Type-Information.html#G-DEFINE-TYPE-EXTENDED:CAPS" title="G_DEFINE_TYPE_EXTENDED()"><code class="function">G_DEFINE_TYPE_EXTENDED()</code></a> for an example.
3528 </p>
3529 <div class="variablelist"><table border="0">
3530 <col align="left" valign="top">
3531 <tbody>
3532 <tr>
3533 <td><p><span class="term"><em class="parameter"><code>TN</code></em> :</span></p></td>
3534 <td>The name of the new type, in Camel case.</td>
3535 </tr>
3536 <tr>
3537 <td><p><span class="term"><em class="parameter"><code>t_n</code></em> :</span></p></td>
3538 <td>The name of the new type, in lowercase, with words
3539 separated by '_'.</td>
3540 </tr>
3541 <tr>
3542 <td><p><span class="term"><em class="parameter"><code>T_P</code></em> :</span></p></td>
3543 <td>The <a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> of the parent type.</td>
3544 </tr>
3545 </tbody>
3546 </table></div>
3547 <p class="since">Since 2.4</p>
3548 </div>
3549 <hr>
3550 <div class="refsect2">
3551 <a name="G-DEFINE-TYPE-WITH-CODE:CAPS"></a><h3>G_DEFINE_TYPE_WITH_CODE()</h3>
3552 <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()
3553 </pre>
3554 <p>
3555 A convenience macro for type implementations.  
3556 Similar to <a class="link" href="gobject-Type-Information.html#G-DEFINE-TYPE:CAPS" title="G_DEFINE_TYPE()"><code class="function">G_DEFINE_TYPE()</code></a>, but allows you to insert custom code into the 
3557 *_get_type() function, e.g. interface implementations via <a class="link" href="gobject-Type-Information.html#G-IMPLEMENT-INTERFACE:CAPS" title="G_IMPLEMENT_INTERFACE()"><code class="function">G_IMPLEMENT_INTERFACE()</code></a>.
3558 See <a class="link" href="gobject-Type-Information.html#G-DEFINE-TYPE-EXTENDED:CAPS" title="G_DEFINE_TYPE_EXTENDED()"><code class="function">G_DEFINE_TYPE_EXTENDED()</code></a> for an example.
3559 </p>
3560 <div class="variablelist"><table border="0">
3561 <col align="left" valign="top">
3562 <tbody>
3563 <tr>
3564 <td><p><span class="term"><em class="parameter"><code>TN</code></em> :</span></p></td>
3565 <td>The name of the new type, in Camel case.</td>
3566 </tr>
3567 <tr>
3568 <td><p><span class="term"><em class="parameter"><code>t_n</code></em> :</span></p></td>
3569 <td>The name of the new type in lowercase, with words separated by '_'.</td>
3570 </tr>
3571 <tr>
3572 <td><p><span class="term"><em class="parameter"><code>T_P</code></em> :</span></p></td>
3573 <td>The <a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> of the parent type.</td>
3574 </tr>
3575 <tr>
3576 <td><p><span class="term"><em class="parameter"><code>_C_</code></em> :</span></p></td>
3577 <td>Custom code that gets inserted in the *_get_type() function.</td>
3578 </tr>
3579 </tbody>
3580 </table></div>
3581 <p class="since">Since 2.4</p>
3582 </div>
3583 <hr>
3584 <div class="refsect2">
3585 <a name="G-DEFINE-ABSTRACT-TYPE:CAPS"></a><h3>G_DEFINE_ABSTRACT_TYPE()</h3>
3586 <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, {})
3587 </pre>
3588 <p>
3589 A convenience macro for type implementations. 
3590 Similar to <a class="link" href="gobject-Type-Information.html#G-DEFINE-TYPE:CAPS" title="G_DEFINE_TYPE()"><code class="function">G_DEFINE_TYPE()</code></a>, but defines an abstract type. 
3591 See <a class="link" href="gobject-Type-Information.html#G-DEFINE-TYPE-EXTENDED:CAPS" title="G_DEFINE_TYPE_EXTENDED()"><code class="function">G_DEFINE_TYPE_EXTENDED()</code></a> for an example.
3592 </p>
3593 <div class="variablelist"><table border="0">
3594 <col align="left" valign="top">
3595 <tbody>
3596 <tr>
3597 <td><p><span class="term"><em class="parameter"><code>TN</code></em> :</span></p></td>
3598 <td>The name of the new type, in Camel case.</td>
3599 </tr>
3600 <tr>
3601 <td><p><span class="term"><em class="parameter"><code>t_n</code></em> :</span></p></td>
3602 <td>The name of the new type, in lowercase, with words
3603 separated by '_'.</td>
3604 </tr>
3605 <tr>
3606 <td><p><span class="term"><em class="parameter"><code>T_P</code></em> :</span></p></td>
3607 <td>The <a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> of the parent type.</td>
3608 </tr>
3609 </tbody>
3610 </table></div>
3611 <p class="since">Since 2.4</p>
3612 </div>
3613 <hr>
3614 <div class="refsect2">
3615 <a name="G-DEFINE-ABSTRACT-TYPE-WITH-CODE:CAPS"></a><h3>G_DEFINE_ABSTRACT_TYPE_WITH_CODE()</h3>
3616 <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()
3617 </pre>
3618 <p>
3619 A convenience macro for type implementations.
3620 Similar to <a class="link" href="gobject-Type-Information.html#G-DEFINE-TYPE-WITH-CODE:CAPS" title="G_DEFINE_TYPE_WITH_CODE()"><code class="function">G_DEFINE_TYPE_WITH_CODE()</code></a>, but defines an abstract type and allows you to 
3621 insert custom code into the *_get_type() function, e.g. interface implementations 
3622 via <a class="link" href="gobject-Type-Information.html#G-IMPLEMENT-INTERFACE:CAPS" title="G_IMPLEMENT_INTERFACE()"><code class="function">G_IMPLEMENT_INTERFACE()</code></a>. See <a class="link" href="gobject-Type-Information.html#G-DEFINE-TYPE-EXTENDED:CAPS" title="G_DEFINE_TYPE_EXTENDED()"><code class="function">G_DEFINE_TYPE_EXTENDED()</code></a> for an example.
3623 </p>
3624 <div class="variablelist"><table border="0">
3625 <col align="left" valign="top">
3626 <tbody>
3627 <tr>
3628 <td><p><span class="term"><em class="parameter"><code>TN</code></em> :</span></p></td>
3629 <td>The name of the new type, in Camel case.</td>
3630 </tr>
3631 <tr>
3632 <td><p><span class="term"><em class="parameter"><code>t_n</code></em> :</span></p></td>
3633 <td>The name of the new type, in lowercase, with words
3634 separated by '_'.</td>
3635 </tr>
3636 <tr>
3637 <td><p><span class="term"><em class="parameter"><code>T_P</code></em> :</span></p></td>
3638 <td>The <a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> of the parent type.</td>
3639 </tr>
3640 <tr>
3641 <td><p><span class="term"><em class="parameter"><code>_C_</code></em> :</span></p></td>
3642 <td>Custom code that gets inserted in the <em class="parameter"><code><code class="function">type_name_get_type()</code></code></em> function.</td>
3643 </tr>
3644 </tbody>
3645 </table></div>
3646 <p class="since">Since 2.4</p>
3647 </div>
3648 <hr>
3649 <div class="refsect2">
3650 <a name="G-DEFINE-INTERFACE:CAPS"></a><h3>G_DEFINE_INTERFACE()</h3>
3651 <pre class="programlisting">#define G_DEFINE_INTERFACE(TN, t_n, T_P)                G_DEFINE_INTERFACE_WITH_CODE(TN, t_n, T_P, ;)
3652 </pre>
3653 <p>
3654 A convenience macro for <a class="link" href="gobject-Type-Information.html#GTypeInterface" title="struct GTypeInterface"><span class="type">GTypeInterface</span></a> definitions, which declares
3655 a default vtable initialization function and defines a *_get_type()
3656 function.
3657 </p>
3658 <p>
3659 The macro expects the interface initialization function to have the
3660 name <code class="literal">t_n ## _default_init</code>, and the interface
3661 structure to have the name <code class="literal">TN ## Interface</code>.
3662 </p>
3663 <div class="variablelist"><table border="0">
3664 <col align="left" valign="top">
3665 <tbody>
3666 <tr>
3667 <td><p><span class="term"><em class="parameter"><code>TN</code></em> :</span></p></td>
3668 <td>The name of the new type, in Camel case.</td>
3669 </tr>
3670 <tr>
3671 <td><p><span class="term"><em class="parameter"><code>t_n</code></em> :</span></p></td>
3672 <td>The name of the new type, in lowercase, with words separated by '_'.</td>
3673 </tr>
3674 <tr>
3675 <td><p><span class="term"><em class="parameter"><code>T_P</code></em> :</span></p></td>
3676 <td>The <a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> of the prerequisite type for the interface, or 0
3677 (<a class="link" href="gobject-Type-Information.html#G-TYPE-INVALID:CAPS" title="G_TYPE_INVALID"><code class="literal">G_TYPE_INVALID</code></a>) for no prerequisite type.</td>
3678 </tr>
3679 </tbody>
3680 </table></div>
3681 <p class="since">Since 2.24</p>
3682 </div>
3683 <hr>
3684 <div class="refsect2">
3685 <a name="G-DEFINE-INTERFACE-WITH-CODE:CAPS"></a><h3>G_DEFINE_INTERFACE_WITH_CODE()</h3>
3686 <pre class="programlisting">#define G_DEFINE_INTERFACE_WITH_CODE(TN, t_n, T_P, _C_)     _G_DEFINE_INTERFACE_EXTENDED_BEGIN(TN, t_n, T_P) {_C_;} _G_DEFINE_INTERFACE_EXTENDED_END()
3687 </pre>
3688 <p>
3689 A convenience macro for <a class="link" href="gobject-Type-Information.html#GTypeInterface" title="struct GTypeInterface"><span class="type">GTypeInterface</span></a> definitions. Similar to
3690 <a class="link" href="gobject-Type-Information.html#G-DEFINE-INTERFACE:CAPS" title="G_DEFINE_INTERFACE()"><code class="function">G_DEFINE_INTERFACE()</code></a>, but allows you to insert custom code into the
3691 *_get_type() function, e.g. additional interface implementations
3692 via <a class="link" href="gobject-Type-Information.html#G-IMPLEMENT-INTERFACE:CAPS" title="G_IMPLEMENT_INTERFACE()"><code class="function">G_IMPLEMENT_INTERFACE()</code></a>, or additional prerequisite types. See
3693 <a class="link" href="gobject-Type-Information.html#G-DEFINE-TYPE-EXTENDED:CAPS" title="G_DEFINE_TYPE_EXTENDED()"><code class="function">G_DEFINE_TYPE_EXTENDED()</code></a> for a similar example using
3694 <a class="link" href="gobject-Type-Information.html#G-DEFINE-TYPE-WITH-CODE:CAPS" title="G_DEFINE_TYPE_WITH_CODE()"><code class="function">G_DEFINE_TYPE_WITH_CODE()</code></a>.
3695 </p>
3696 <div class="variablelist"><table border="0">
3697 <col align="left" valign="top">
3698 <tbody>
3699 <tr>
3700 <td><p><span class="term"><em class="parameter"><code>TN</code></em> :</span></p></td>
3701 <td>The name of the new type, in Camel case.</td>
3702 </tr>
3703 <tr>
3704 <td><p><span class="term"><em class="parameter"><code>t_n</code></em> :</span></p></td>
3705 <td>The name of the new type, in lowercase, with words separated by '_'.</td>
3706 </tr>
3707 <tr>
3708 <td><p><span class="term"><em class="parameter"><code>T_P</code></em> :</span></p></td>
3709 <td>The <a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> of the prerequisite type for the interface, or 0
3710 (<a class="link" href="gobject-Type-Information.html#G-TYPE-INVALID:CAPS" title="G_TYPE_INVALID"><code class="literal">G_TYPE_INVALID</code></a>) for no prerequisite type.</td>
3711 </tr>
3712 <tr>
3713 <td><p><span class="term"><em class="parameter"><code>_C_</code></em> :</span></p></td>
3714 <td>Custom code that gets inserted in the *_get_type() function.</td>
3715 </tr>
3716 </tbody>
3717 </table></div>
3718 <p class="since">Since 2.24</p>
3719 </div>
3720 <hr>
3721 <div class="refsect2">
3722 <a name="G-IMPLEMENT-INTERFACE:CAPS"></a><h3>G_IMPLEMENT_INTERFACE()</h3>
3723 <pre class="programlisting">#define             G_IMPLEMENT_INTERFACE(TYPE_IFACE, iface_init)</pre>
3724 <p>
3725 A convenience macro to ease interface addition in the <em class="parameter"><code>_C_</code></em> section
3726 of <a class="link" href="gobject-Type-Information.html#G-DEFINE-TYPE-WITH-CODE:CAPS" title="G_DEFINE_TYPE_WITH_CODE()"><code class="function">G_DEFINE_TYPE_WITH_CODE()</code></a> or <a class="link" href="gobject-Type-Information.html#G-DEFINE-ABSTRACT-TYPE-WITH-CODE:CAPS" title="G_DEFINE_ABSTRACT_TYPE_WITH_CODE()"><code class="function">G_DEFINE_ABSTRACT_TYPE_WITH_CODE()</code></a>.
3727 See <a class="link" href="gobject-Type-Information.html#G-DEFINE-TYPE-EXTENDED:CAPS" title="G_DEFINE_TYPE_EXTENDED()"><code class="function">G_DEFINE_TYPE_EXTENDED()</code></a> for an example.
3728 </p>
3729 <p>
3730 Note that this macro can only be used together with the G_DEFINE_TYPE_*
3731 macros, since it depends on variable names from those macros.
3732 </p>
3733 <div class="variablelist"><table border="0">
3734 <col align="left" valign="top">
3735 <tbody>
3736 <tr>
3737 <td><p><span class="term"><em class="parameter"><code>TYPE_IFACE</code></em> :</span></p></td>
3738 <td>The <a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> of the interface to add</td>
3739 </tr>
3740 <tr>
3741 <td><p><span class="term"><em class="parameter"><code>iface_init</code></em> :</span></p></td>
3742 <td>The interface init function</td>
3743 </tr>
3744 </tbody>
3745 </table></div>
3746 <p class="since">Since 2.4</p>
3747 </div>
3748 <hr>
3749 <div class="refsect2">
3750 <a name="G-DEFINE-TYPE-EXTENDED:CAPS"></a><h3>G_DEFINE_TYPE_EXTENDED()</h3>
3751 <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()
3752 </pre>
3753 <p>
3754 The most general convenience macro for type implementations, on which
3755 <a class="link" href="gobject-Type-Information.html#G-DEFINE-TYPE:CAPS" title="G_DEFINE_TYPE()"><code class="function">G_DEFINE_TYPE()</code></a>, etc are based.
3756 </p>
3757 <p>
3758 </p>
3759 <div class="informalexample">
3760   <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
3761     <tbody>
3762       <tr>
3763         <td class="listing_lines" align="right"><pre>1
3764 2
3765 3
3766 4
3767 5
3768 6</pre></td>
3769         <td class="listing_code"><pre class="programlisting"><span class="function"><a href="gobject-Type-Information.html#G-DEFINE-TYPE-EXTENDED:CAPS">G_DEFINE_TYPE_EXTENDED</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">GtkGadget</span><span class="symbol">,</span>
3770 <span class="normal">                        gtk_gadget</span><span class="symbol">,</span>
3771 <span class="normal">                        GTK_TYPE_WIDGET</span><span class="symbol">,</span>
3772 <span class="normal">                        </span><span class="number">0</span><span class="symbol">,</span>
3773 <span class="normal">                        </span><span class="function"><a href="gobject-Type-Information.html#G-IMPLEMENT-INTERFACE:CAPS">G_IMPLEMENT_INTERFACE</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">TYPE_GIZMO</span><span class="symbol">,</span>
3774 <span class="normal">                                               gtk_gadget_gizmo_init</span><span class="symbol">));</span></pre></td>
3775       </tr>
3776     </tbody>
3777   </table>
3778 </div>
3779
3780 <p>
3781 expands to
3782 </p>
3783 <div class="informalexample">
3784   <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
3785     <tbody>
3786       <tr>
3787         <td class="listing_lines" align="right"><pre>1
3788 2
3789 3
3790 4
3791 5
3792 6
3793 7
3794 8
3795 9
3796 10
3797 11
3798 12
3799 13
3800 14
3801 15
3802 16
3803 17
3804 18
3805 19
3806 20
3807 21
3808 22
3809 23
3810 24
3811 25
3812 26
3813 27
3814 28
3815 29
3816 30
3817 31
3818 32
3819 33</pre></td>
3820         <td class="listing_code"><pre class="programlisting"><span class="keyword">static</span><span class="normal"> </span><span class="type">void</span><span class="normal">     </span><span class="function">gtk_gadget_init</span><span class="normal">       </span><span class="symbol">(</span><span class="usertype">GtkGadget</span><span class="normal">      </span><span class="symbol">*</span><span class="normal">self</span><span class="symbol">);</span>
3821 <span class="keyword">static</span><span class="normal"> </span><span class="type">void</span><span class="normal">     </span><span class="function">gtk_gadget_class_init</span><span class="normal"> </span><span class="symbol">(</span><span class="usertype">GtkGadgetClass</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">klass</span><span class="symbol">);</span>
3822 <span class="keyword">static</span><span class="normal"> </span><span class="usertype">gpointer</span><span class="normal"> gtk_gadget_parent_class </span><span class="symbol">=</span><span class="normal"> <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">;</span>
3823 <span class="keyword">static</span><span class="normal"> </span><span class="type">void</span><span class="normal">     </span><span class="function">gtk_gadget_class_intern_init</span><span class="normal"> </span><span class="symbol">(</span><span class="usertype">gpointer</span><span class="normal"> klass</span><span class="symbol">)</span>
3824 <span class="cbracket">{</span>
3825 <span class="normal">  gtk_gadget_parent_class </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="gobject-Type-Information.html#g-type-class-peek-parent">g_type_class_peek_parent</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">klass</span><span class="symbol">);</span>
3826 <span class="normal">  </span><span class="function">gtk_gadget_class_init</span><span class="normal"> </span><span class="symbol">((</span><span class="normal">GtkGadgetClass</span><span class="symbol">*)</span><span class="normal"> klass</span><span class="symbol">);</span>
3827 <span class="cbracket">}</span>
3828
3829 <span class="normal"><a href="gobject-Type-Information.html#GType">GType</a></span>
3830 <span class="function">gtk_gadget_get_type</span><span class="normal"> </span><span class="symbol">(</span><span class="type">void</span><span class="symbol">)</span>
3831 <span class="cbracket">{</span>
3832 <span class="normal">  </span><span class="keyword">static</span><span class="normal"> </span><span class="keyword">volatile</span><span class="normal"> </span><span class="usertype">gsize</span><span class="normal"> g_define_type_id__volatile </span><span class="symbol">=</span><span class="normal"> </span><span class="number">0</span><span class="symbol">;</span>
3833 <span class="normal">  </span><span class="keyword">if</span><span class="normal"> </span><span class="symbol">(</span><span class="function"><a href="./../glib/glib/glib-Threads.html#g-once-init-enter">g_once_init_enter</a></span><span class="normal"> </span><span class="symbol">(&amp;</span><span class="normal">g_define_type_id__volatile</span><span class="symbol">))</span>
3834 <span class="normal">    </span><span class="cbracket">{</span>
3835 <span class="normal">      </span><span class="usertype">GType</span><span class="normal"> g_define_type_id </span><span class="symbol">=</span>
3836 <span class="normal">        </span><span class="function"><a href="gobject-Type-Information.html#g-type-register-static-simple">g_type_register_static_simple</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">GTK_TYPE_WIDGET</span><span class="symbol">,</span>
3837 <span class="normal">                                       </span><span class="function"><a href="./../glib/glib/glib-Quarks.html#g-intern-static-string">g_intern_static_string</a></span><span class="normal"> </span><span class="symbol">(</span><span class="string">"GtkGadget"</span><span class="symbol">),</span>
3838 <span class="normal">                                       </span><span class="keyword">sizeof</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">GtkGadgetClass</span><span class="symbol">),</span>
3839 <span class="normal">                                       </span><span class="symbol">(</span><span class="normal"><a href="gobject-Type-Information.html#GClassInitFunc">GClassInitFunc</a></span><span class="symbol">)</span><span class="normal"> gtk_gadget_class_intern_init</span><span class="symbol">,</span>
3840 <span class="normal">                                       </span><span class="keyword">sizeof</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">GtkGadget</span><span class="symbol">),</span>
3841 <span class="normal">                                       </span><span class="symbol">(</span><span class="normal"><a href="gobject-Type-Information.html#GInstanceInitFunc">GInstanceInitFunc</a></span><span class="symbol">)</span><span class="normal"> gtk_gadget_init</span><span class="symbol">,</span>
3842 <span class="normal">                                       </span><span class="symbol">(</span><span class="normal"><a href="gobject-Type-Information.html#GTypeFlags">GTypeFlags</a></span><span class="symbol">)</span><span class="normal"> flags</span><span class="symbol">);</span>
3843 <span class="normal">      </span><span class="cbracket">{</span>
3844 <span class="normal">        </span><span class="keyword">const</span><span class="normal"> </span><span class="usertype">GInterfaceInfo</span><span class="normal"> g_implement_interface_info </span><span class="symbol">=</span><span class="normal"> </span><span class="cbracket">{</span>
3845 <span class="normal">          </span><span class="symbol">(</span><span class="normal"><a href="gobject-Type-Information.html#GInterfaceInitFunc">GInterfaceInitFunc</a></span><span class="symbol">)</span><span class="normal"> gtk_gadget_gizmo_init</span>
3846 <span class="normal">        </span><span class="cbracket">}</span><span class="symbol">;</span>
3847 <span class="normal">        </span><span class="function"><a href="gobject-Type-Information.html#g-type-add-interface-static">g_type_add_interface_static</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">g_define_type_id</span><span class="symbol">,</span><span class="normal"> TYPE_GIZMO</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">&amp;</span><span class="normal">g_implement_interface_info</span><span class="symbol">);</span>
3848 <span class="normal">      </span><span class="cbracket">}</span>
3849 <span class="normal">      </span><span class="function"><a href="./../glib/glib/glib-Threads.html#g-once-init-leave">g_once_init_leave</a></span><span class="normal"> </span><span class="symbol">(&amp;</span><span class="normal">g_define_type_id__volatile</span><span class="symbol">,</span><span class="normal"> g_define_type_id</span><span class="symbol">);</span>
3850 <span class="normal">    </span><span class="cbracket">}</span>
3851 <span class="normal">  </span><span class="keyword">return</span><span class="normal"> g_define_type_id__volatile</span><span class="symbol">;</span>
3852 <span class="cbracket">}</span></pre></td>
3853       </tr>
3854     </tbody>
3855   </table>
3856 </div>
3857
3858 <p>
3859 The only pieces which have to be manually provided are the definitions of
3860 the instance and class structure and the definitions of the instance and
3861 class init functions.
3862 </p>
3863 <div class="variablelist"><table border="0">
3864 <col align="left" valign="top">
3865 <tbody>
3866 <tr>
3867 <td><p><span class="term"><em class="parameter"><code>TN</code></em> :</span></p></td>
3868 <td>The name of the new type, in Camel case.</td>
3869 </tr>
3870 <tr>
3871 <td><p><span class="term"><em class="parameter"><code>t_n</code></em> :</span></p></td>
3872 <td>The name of the new type, in lowercase, with words
3873 separated by '_'.</td>
3874 </tr>
3875 <tr>
3876 <td><p><span class="term"><em class="parameter"><code>T_P</code></em> :</span></p></td>
3877 <td>The <a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> of the parent type.</td>
3878 </tr>
3879 <tr>
3880 <td><p><span class="term"><em class="parameter"><code>_f_</code></em> :</span></p></td>
3881 <td>
3882 <a class="link" href="gobject-Type-Information.html#GTypeFlags" title="enum GTypeFlags"><span class="type">GTypeFlags</span></a> to pass to <a class="link" href="gobject-Type-Information.html#g-type-register-static" title="g_type_register_static ()"><code class="function">g_type_register_static()</code></a>
3883 </td>
3884 </tr>
3885 <tr>
3886 <td><p><span class="term"><em class="parameter"><code>_C_</code></em> :</span></p></td>
3887 <td>Custom code that gets inserted in the *_get_type() function.</td>
3888 </tr>
3889 </tbody>
3890 </table></div>
3891 <p class="since">Since 2.4</p>
3892 </div>
3893 <hr>
3894 <div class="refsect2">
3895 <a name="G-DEFINE-BOXED-TYPE:CAPS"></a><h3>G_DEFINE_BOXED_TYPE()</h3>
3896 <pre class="programlisting">#define G_DEFINE_BOXED_TYPE(TypeName, type_name, copy_func, free_func) G_DEFINE_BOXED_TYPE_WITH_CODE (TypeName, type_name, copy_func, free_func, {})
3897 </pre>
3898 <p>
3899 A convenience macro for boxed type implementations, which defines a
3900 <code class="function">type_name_get_type()</code> function registering the boxed type.
3901 </p>
3902 <div class="variablelist"><table border="0">
3903 <col align="left" valign="top">
3904 <tbody>
3905 <tr>
3906 <td><p><span class="term"><em class="parameter"><code>TypeName</code></em> :</span></p></td>
3907 <td>The name of the new type, in Camel case.</td>
3908 </tr>
3909 <tr>
3910 <td><p><span class="term"><em class="parameter"><code>type_name</code></em> :</span></p></td>
3911 <td>The name of the new type, in lowercase, with words
3912 separated by '_'.</td>
3913 </tr>
3914 <tr>
3915 <td><p><span class="term"><em class="parameter"><code>copy_func</code></em> :</span></p></td>
3916 <td>the <a class="link" href="gobject-Boxed-Types.html#GBoxedCopyFunc" title="GBoxedCopyFunc ()"><span class="type">GBoxedCopyFunc</span></a> for the new type</td>
3917 </tr>
3918 <tr>
3919 <td><p><span class="term"><em class="parameter"><code>free_func</code></em> :</span></p></td>
3920 <td>the <a class="link" href="gobject-Boxed-Types.html#GBoxedFreeFunc" title="GBoxedFreeFunc ()"><span class="type">GBoxedFreeFunc</span></a> for the new type</td>
3921 </tr>
3922 </tbody>
3923 </table></div>
3924 <p class="since">Since 2.26</p>
3925 </div>
3926 <hr>
3927 <div class="refsect2">
3928 <a name="G-DEFINE-BOXED-TYPE-WITH-CODE:CAPS"></a><h3>G_DEFINE_BOXED_TYPE_WITH_CODE()</h3>
3929 <pre class="programlisting">#define G_DEFINE_BOXED_TYPE_WITH_CODE(TypeName, type_name, copy_func, free_func, _C_) _G_DEFINE_BOXED_TYPE_BEGIN (TypeName, type_name, copy_func, free_func) {_C_;} _G_DEFINE_TYPE_EXTENDED_END()
3930 </pre>
3931 <p>
3932 A convenience macro for boxed type implementations.
3933 Similar to <a class="link" href="gobject-Type-Information.html#G-DEFINE-BOXED-TYPE:CAPS" title="G_DEFINE_BOXED_TYPE()"><code class="function">G_DEFINE_BOXED_TYPE()</code></a>, but allows to insert custom code into the
3934 <code class="function">type_name_get_type()</code> function, e.g. to register value transformations with
3935 <a class="link" href="gobject-Generic-values.html#g-value-register-transform-func" title="g_value_register_transform_func ()"><code class="function">g_value_register_transform_func()</code></a>.
3936 </p>
3937 <div class="variablelist"><table border="0">
3938 <col align="left" valign="top">
3939 <tbody>
3940 <tr>
3941 <td><p><span class="term"><em class="parameter"><code>TypeName</code></em> :</span></p></td>
3942 <td>The name of the new type, in Camel case.</td>
3943 </tr>
3944 <tr>
3945 <td><p><span class="term"><em class="parameter"><code>type_name</code></em> :</span></p></td>
3946 <td>The name of the new type, in lowercase, with words
3947 separated by '_'.</td>
3948 </tr>
3949 <tr>
3950 <td><p><span class="term"><em class="parameter"><code>copy_func</code></em> :</span></p></td>
3951 <td>the <a class="link" href="gobject-Boxed-Types.html#GBoxedCopyFunc" title="GBoxedCopyFunc ()"><span class="type">GBoxedCopyFunc</span></a> for the new type</td>
3952 </tr>
3953 <tr>
3954 <td><p><span class="term"><em class="parameter"><code>free_func</code></em> :</span></p></td>
3955 <td>the <a class="link" href="gobject-Boxed-Types.html#GBoxedFreeFunc" title="GBoxedFreeFunc ()"><span class="type">GBoxedFreeFunc</span></a> for the new type</td>
3956 </tr>
3957 <tr>
3958 <td><p><span class="term"><em class="parameter"><code>_C_</code></em> :</span></p></td>
3959 <td>Custom code that gets inserted in the *_get_type() function.</td>
3960 </tr>
3961 </tbody>
3962 </table></div>
3963 <p class="since">Since 2.26</p>
3964 </div>
3965 <hr>
3966 <div class="refsect2">
3967 <a name="G-DEFINE-POINTER-TYPE:CAPS"></a><h3>G_DEFINE_POINTER_TYPE()</h3>
3968 <pre class="programlisting">#define G_DEFINE_POINTER_TYPE(TypeName, type_name) G_DEFINE_POINTER_TYPE_WITH_CODE (TypeName, type_name, {})
3969 </pre>
3970 <p>
3971 A convenience macro for pointer type implementations, which defines a
3972 <code class="function">type_name_get_type()</code> function registering the pointer type.
3973 </p>
3974 <div class="variablelist"><table border="0">
3975 <col align="left" valign="top">
3976 <tbody>
3977 <tr>
3978 <td><p><span class="term"><em class="parameter"><code>TypeName</code></em> :</span></p></td>
3979 <td>The name of the new type, in Camel case.</td>
3980 </tr>
3981 <tr>
3982 <td><p><span class="term"><em class="parameter"><code>type_name</code></em> :</span></p></td>
3983 <td>The name of the new type, in lowercase, with words
3984 separated by '_'.</td>
3985 </tr>
3986 </tbody>
3987 </table></div>
3988 <p class="since">Since 2.26</p>
3989 </div>
3990 <hr>
3991 <div class="refsect2">
3992 <a name="G-DEFINE-POINTER-TYPE-WITH-CODE:CAPS"></a><h3>G_DEFINE_POINTER_TYPE_WITH_CODE()</h3>
3993 <pre class="programlisting">#define G_DEFINE_POINTER_TYPE_WITH_CODE(TypeName, type_name, _C_) _G_DEFINE_POINTER_TYPE_BEGIN (TypeName, type_name) {_C_;} _G_DEFINE_TYPE_EXTENDED_END()
3994 </pre>
3995 <p>
3996 A convenience macro for pointer type implementations.
3997 Similar to <a class="link" href="gobject-Type-Information.html#G-DEFINE-POINTER-TYPE:CAPS" title="G_DEFINE_POINTER_TYPE()"><code class="function">G_DEFINE_POINTER_TYPE()</code></a>, but allows to insert custom code into the
3998 <code class="function">type_name_get_type()</code> function.
3999 </p>
4000 <div class="variablelist"><table border="0">
4001 <col align="left" valign="top">
4002 <tbody>
4003 <tr>
4004 <td><p><span class="term"><em class="parameter"><code>TypeName</code></em> :</span></p></td>
4005 <td>The name of the new type, in Camel case.</td>
4006 </tr>
4007 <tr>
4008 <td><p><span class="term"><em class="parameter"><code>type_name</code></em> :</span></p></td>
4009 <td>The name of the new type, in lowercase, with words
4010 separated by '_'.</td>
4011 </tr>
4012 <tr>
4013 <td><p><span class="term"><em class="parameter"><code>_C_</code></em> :</span></p></td>
4014 <td>Custom code that gets inserted in the *_get_type() function.</td>
4015 </tr>
4016 </tbody>
4017 </table></div>
4018 <p class="since">Since 2.26</p>
4019 </div>
4020 <hr>
4021 <div class="refsect2">
4022 <a name="G-TYPE-INVALID:CAPS"></a><h3>G_TYPE_INVALID</h3>
4023 <pre class="programlisting">#define G_TYPE_INVALID                      G_TYPE_MAKE_FUNDAMENTAL (0)
4024 </pre>
4025 <p>
4026 An invalid <a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> used as error return value in some functions which return
4027 a <a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a>.
4028 </p>
4029 </div>
4030 <hr>
4031 <div class="refsect2">
4032 <a name="G-TYPE-NONE:CAPS"></a><h3>G_TYPE_NONE</h3>
4033 <pre class="programlisting">#define G_TYPE_NONE                 G_TYPE_MAKE_FUNDAMENTAL (1)
4034 </pre>
4035 <p>
4036 A fundamental type which is used as a replacement for the C
4037 <code class="literal">void</code> return type.
4038 </p>
4039 </div>
4040 <hr>
4041 <div class="refsect2">
4042 <a name="G-TYPE-INTERFACE:CAPS"></a><h3>G_TYPE_INTERFACE</h3>
4043 <pre class="programlisting">#define G_TYPE_INTERFACE            G_TYPE_MAKE_FUNDAMENTAL (2)
4044 </pre>
4045 <p>
4046 The fundamental type from which all interfaces are derived.
4047 </p>
4048 </div>
4049 <hr>
4050 <div class="refsect2">
4051 <a name="G-TYPE-CHAR:CAPS"></a><h3>G_TYPE_CHAR</h3>
4052 <pre class="programlisting">#define G_TYPE_CHAR                 G_TYPE_MAKE_FUNDAMENTAL (3)
4053 </pre>
4054 <p>
4055 The fundamental type corresponding to <a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>.
4056 The type designated by G_TYPE_CHAR is unconditionally an 8-bit signed integer.
4057 This may or may not be the same type a the C type "gchar".
4058 </p>
4059 </div>
4060 <hr>
4061 <div class="refsect2">
4062 <a name="G-TYPE-UCHAR:CAPS"></a><h3>G_TYPE_UCHAR</h3>
4063 <pre class="programlisting">#define G_TYPE_UCHAR                        G_TYPE_MAKE_FUNDAMENTAL (4)
4064 </pre>
4065 <p>
4066 The fundamental type corresponding to <a href="./../glib/glib/glib-Basic-Types.html#guchar"><span class="type">guchar</span></a>.
4067 </p>
4068 </div>
4069 <hr>
4070 <div class="refsect2">
4071 <a name="G-TYPE-BOOLEAN:CAPS"></a><h3>G_TYPE_BOOLEAN</h3>
4072 <pre class="programlisting">#define G_TYPE_BOOLEAN                      G_TYPE_MAKE_FUNDAMENTAL (5)
4073 </pre>
4074 <p>
4075 The fundamental type corresponding to <a href="./../glib/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a>.
4076 </p>
4077 </div>
4078 <hr>
4079 <div class="refsect2">
4080 <a name="G-TYPE-INT:CAPS"></a><h3>G_TYPE_INT</h3>
4081 <pre class="programlisting">#define G_TYPE_INT                  G_TYPE_MAKE_FUNDAMENTAL (6)
4082 </pre>
4083 <p>
4084 The fundamental type corresponding to <a href="./../glib/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a>.
4085 </p>
4086 </div>
4087 <hr>
4088 <div class="refsect2">
4089 <a name="G-TYPE-UINT:CAPS"></a><h3>G_TYPE_UINT</h3>
4090 <pre class="programlisting">#define G_TYPE_UINT                 G_TYPE_MAKE_FUNDAMENTAL (7)
4091 </pre>
4092 <p>
4093 The fundamental type corresponding to <a href="./../glib/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a>.
4094 </p>
4095 </div>
4096 <hr>
4097 <div class="refsect2">
4098 <a name="G-TYPE-LONG:CAPS"></a><h3>G_TYPE_LONG</h3>
4099 <pre class="programlisting">#define G_TYPE_LONG                 G_TYPE_MAKE_FUNDAMENTAL (8)
4100 </pre>
4101 <p>
4102 The fundamental type corresponding to <a href="./../glib/glib/glib-Basic-Types.html#glong"><span class="type">glong</span></a>.
4103 </p>
4104 </div>
4105 <hr>
4106 <div class="refsect2">
4107 <a name="G-TYPE-ULONG:CAPS"></a><h3>G_TYPE_ULONG</h3>
4108 <pre class="programlisting">#define G_TYPE_ULONG                        G_TYPE_MAKE_FUNDAMENTAL (9)
4109 </pre>
4110 <p>
4111 The fundamental type corresponding to <a href="./../glib/glib/glib-Basic-Types.html#gulong"><span class="type">gulong</span></a>.
4112 </p>
4113 </div>
4114 <hr>
4115 <div class="refsect2">
4116 <a name="G-TYPE-INT64:CAPS"></a><h3>G_TYPE_INT64</h3>
4117 <pre class="programlisting">#define G_TYPE_INT64                        G_TYPE_MAKE_FUNDAMENTAL (10)
4118 </pre>
4119 <p>
4120 The fundamental type corresponding to <a href="./../glib/glib/glib-Basic-Types.html#gint64"><span class="type">gint64</span></a>.
4121 </p>
4122 </div>
4123 <hr>
4124 <div class="refsect2">
4125 <a name="G-TYPE-UINT64:CAPS"></a><h3>G_TYPE_UINT64</h3>
4126 <pre class="programlisting">#define G_TYPE_UINT64                       G_TYPE_MAKE_FUNDAMENTAL (11)
4127 </pre>
4128 <p>
4129 The fundamental type corresponding to <a href="./../glib/glib/glib-Basic-Types.html#guint64"><span class="type">guint64</span></a>.
4130 </p>
4131 </div>
4132 <hr>
4133 <div class="refsect2">
4134 <a name="G-TYPE-ENUM:CAPS"></a><h3>G_TYPE_ENUM</h3>
4135 <pre class="programlisting">#define G_TYPE_ENUM                 G_TYPE_MAKE_FUNDAMENTAL (12)
4136 </pre>
4137 <p>
4138 The fundamental type from which all enumeration types are derived.
4139 </p>
4140 </div>
4141 <hr>
4142 <div class="refsect2">
4143 <a name="G-TYPE-FLAGS:CAPS"></a><h3>G_TYPE_FLAGS</h3>
4144 <pre class="programlisting">#define G_TYPE_FLAGS                        G_TYPE_MAKE_FUNDAMENTAL (13)
4145 </pre>
4146 <p>
4147 The fundamental type from which all flags types are derived.
4148 </p>
4149 </div>
4150 <hr>
4151 <div class="refsect2">
4152 <a name="G-TYPE-FLOAT:CAPS"></a><h3>G_TYPE_FLOAT</h3>
4153 <pre class="programlisting">#define G_TYPE_FLOAT                        G_TYPE_MAKE_FUNDAMENTAL (14)
4154 </pre>
4155 <p>
4156 The fundamental type corresponding to <a href="./../glib/glib/glib-Basic-Types.html#gfloat"><span class="type">gfloat</span></a>.
4157 </p>
4158 </div>
4159 <hr>
4160 <div class="refsect2">
4161 <a name="G-TYPE-DOUBLE:CAPS"></a><h3>G_TYPE_DOUBLE</h3>
4162 <pre class="programlisting">#define G_TYPE_DOUBLE                       G_TYPE_MAKE_FUNDAMENTAL (15)
4163 </pre>
4164 <p>
4165 The fundamental type corresponding to <a href="./../glib/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a>.
4166 </p>
4167 </div>
4168 <hr>
4169 <div class="refsect2">
4170 <a name="G-TYPE-STRING:CAPS"></a><h3>G_TYPE_STRING</h3>
4171 <pre class="programlisting">#define G_TYPE_STRING                       G_TYPE_MAKE_FUNDAMENTAL (16)
4172 </pre>
4173 <p>
4174 The fundamental type corresponding to nul-terminated C strings.
4175 </p>
4176 </div>
4177 <hr>
4178 <div class="refsect2">
4179 <a name="G-TYPE-POINTER:CAPS"></a><h3>G_TYPE_POINTER</h3>
4180 <pre class="programlisting">#define G_TYPE_POINTER                      G_TYPE_MAKE_FUNDAMENTAL (17)
4181 </pre>
4182 <p>
4183 The fundamental type corresponding to <a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>.
4184 </p>
4185 </div>
4186 <hr>
4187 <div class="refsect2">
4188 <a name="G-TYPE-BOXED:CAPS"></a><h3>G_TYPE_BOXED</h3>
4189 <pre class="programlisting">#define G_TYPE_BOXED                        G_TYPE_MAKE_FUNDAMENTAL (18)
4190 </pre>
4191 <p>
4192 The fundamental type from which all boxed types are derived.
4193 </p>
4194 </div>
4195 <hr>
4196 <div class="refsect2">
4197 <a name="G-TYPE-PARAM:CAPS"></a><h3>G_TYPE_PARAM</h3>
4198 <pre class="programlisting">#define G_TYPE_PARAM                        G_TYPE_MAKE_FUNDAMENTAL (19)
4199 </pre>
4200 <p>
4201 The fundamental type from which all <a class="link" href="gobject-GParamSpec.html#GParamSpec" title="struct GParamSpec"><span class="type">GParamSpec</span></a> types are derived.
4202 </p>
4203 </div>
4204 <hr>
4205 <div class="refsect2">
4206 <a name="G-TYPE-OBJECT:CAPS"></a><h3>G_TYPE_OBJECT</h3>
4207 <pre class="programlisting">#define G_TYPE_OBJECT                       G_TYPE_MAKE_FUNDAMENTAL (20)
4208 </pre>
4209 <p>
4210 The fundamental type for <a class="link" href="gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a>.
4211 </p>
4212 </div>
4213 <hr>
4214 <div class="refsect2">
4215 <a name="G-TYPE-GTYPE:CAPS"></a><h3>G_TYPE_GTYPE</h3>
4216 <pre class="programlisting">#define G_TYPE_GTYPE                        (g_gtype_get_type())
4217 </pre>
4218 <p>
4219 The type for <a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a>.
4220 </p>
4221 </div>
4222 <hr>
4223 <div class="refsect2">
4224 <a name="G-TYPE-VARIANT:CAPS"></a><h3>G_TYPE_VARIANT</h3>
4225 <pre class="programlisting">#define G_TYPE_VARIANT                  G_TYPE_MAKE_FUNDAMENTAL (21)
4226 </pre>
4227 <p>
4228 The fundamental type corresponding to <a href="./../glib/glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a>.
4229 </p>
4230 <p>
4231 All floating <a href="./../glib/glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> instances passed through the <a class="link" href="gobject-Type-Information.html#GType" title="GType"><span class="type">GType</span></a> system are
4232 consumed.
4233 </p>
4234 <p>
4235 Note that callbacks in closures, and signal handlers
4236 for signals of return type <a class="link" href="gobject-Type-Information.html#G-TYPE-VARIANT:CAPS" title="G_TYPE_VARIANT"><code class="literal">G_TYPE_VARIANT</code></a>, must never return floating
4237 variants.
4238 </p>
4239 <p>
4240 Note: GLib 2.24 did include a boxed type with this name. It was replaced
4241 with this fundamental type in 2.26.
4242 </p>
4243 <p class="since">Since 2.26</p>
4244 </div>
4245 <hr>
4246 <div class="refsect2">
4247 <a name="G-TYPE-RESERVED-GLIB-FIRST:CAPS"></a><h3>G_TYPE_RESERVED_GLIB_FIRST</h3>
4248 <pre class="programlisting">#define G_TYPE_RESERVED_GLIB_FIRST (22)
4249 </pre>
4250 <p>
4251 First fundamental type number to create a new fundamental type id with
4252 <a class="link" href="gobject-Type-Information.html#G-TYPE-MAKE-FUNDAMENTAL:CAPS" title="G_TYPE_MAKE_FUNDAMENTAL()"><code class="function">G_TYPE_MAKE_FUNDAMENTAL()</code></a> reserved for GLib.
4253 </p>
4254 </div>
4255 <hr>
4256 <div class="refsect2">
4257 <a name="G-TYPE-RESERVED-GLIB-LAST:CAPS"></a><h3>G_TYPE_RESERVED_GLIB_LAST</h3>
4258 <pre class="programlisting">#define G_TYPE_RESERVED_GLIB_LAST (31)
4259 </pre>
4260 <p>
4261 Last fundamental type number reserved for GLib.
4262 </p>
4263 </div>
4264 <hr>
4265 <div class="refsect2">
4266 <a name="G-TYPE-RESERVED-BSE-FIRST:CAPS"></a><h3>G_TYPE_RESERVED_BSE_FIRST</h3>
4267 <pre class="programlisting">#define G_TYPE_RESERVED_BSE_FIRST (32)
4268 </pre>
4269 <p>
4270 First fundamental type number to create a new fundamental type id with
4271 <a class="link" href="gobject-Type-Information.html#G-TYPE-MAKE-FUNDAMENTAL:CAPS" title="G_TYPE_MAKE_FUNDAMENTAL()"><code class="function">G_TYPE_MAKE_FUNDAMENTAL()</code></a> reserved for BSE.
4272 </p>
4273 </div>
4274 <hr>
4275 <div class="refsect2">
4276 <a name="G-TYPE-RESERVED-BSE-LAST:CAPS"></a><h3>G_TYPE_RESERVED_BSE_LAST</h3>
4277 <pre class="programlisting">#define G_TYPE_RESERVED_BSE_LAST (48)
4278 </pre>
4279 <p>
4280 Last fundamental type number reserved for BSE.
4281 </p>
4282 </div>
4283 <hr>
4284 <div class="refsect2">
4285 <a name="G-TYPE-RESERVED-USER-FIRST:CAPS"></a><h3>G_TYPE_RESERVED_USER_FIRST</h3>
4286 <pre class="programlisting">#define G_TYPE_RESERVED_USER_FIRST (49)
4287 </pre>
4288 <p>
4289 First available fundamental type number to create new fundamental 
4290 type id with <a class="link" href="gobject-Type-Information.html#G-TYPE-MAKE-FUNDAMENTAL:CAPS" title="G_TYPE_MAKE_FUNDAMENTAL()"><code class="function">G_TYPE_MAKE_FUNDAMENTAL()</code></a>.
4291 </p>
4292 </div>
4293 </div>
4294 </div>
4295 <div class="footer">
4296 <hr>
4297           Generated by GTK-Doc V1.18</div>
4298 </body>
4299 </html>