gobject-Type-Information.html   [plain text]


<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>GType</title><meta name="generator" content="DocBook XSL Stylesheets V1.65.1"><link rel="home" href="index.html" title="GObject Reference Manual"><link rel="up" href="rn01.html" title="API Reference"><link rel="previous" href="rn01.html" title="API Reference"><link rel="next" href="GTypePlugin.html" title="GTypePlugin"><link rel="preface" href="pr01.html" title="Introduction"><link rel="reference" href="rn01.html" title="API Reference"><link rel="refentry" href="gobject-Type-Information.html" title="GType"><link rel="refentry" href="GTypePlugin.html" title="GTypePlugin"><link rel="refentry" href="GTypeModule.html" title="GTypeModule"><link rel="refentry" href="gobject-The-Base-Object-Type.html" title="GObject"><link rel="refentry" href="gobject-Enumeration-and-Flag-Types.html" title="Enums and Flags"><link rel="refentry" href="gobject-Boxed-Types.html" title="GBoxed"><link rel="refentry" href="gobject-Generic-values.html" title="Generic Values"><link rel="refentry" href="gobject-Standard-Parameter-and-Value-Types.html" title="Parameters and Values"><link rel="refentry" href="gobject-Varargs-Value-Collection.html" title="Varargs Value Collection"><link rel="refentry" href="gobject-GParamSpec.html" title="GParamSpec"><link rel="refentry" href="gobject-Signals.html" title="Signals"><link rel="refentry" href="gobject-Closures.html" title="Closures"><link rel="refentry" href="gobject-Value-arrays.html" title="Value arrays"><link rel="reference" href="rn02.html" title="Tools Reference"><link rel="refentry" href="glib-mkenums.html" title="glib-mkenums"><link rel="refentry" href="glib-genmarshal.html" title="glib-genmarshal"><link rel="refentry" href="gobject-query.html" title="gobject-query"><link rel="index" href="ix01.html" title="Index"><link rel="section" href="gobject-Type-Information.html#id2751327" title="Description"><link rel="section" href="gobject-Type-Information.html#id2751451" title="Details"><meta name="generator" content="GTK-Doc V1.2 (XML mode)"><link rel="stylesheet" href="style.css" type="text/css"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="rn01.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td><td><a accesskey="u" href="rn01.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td><td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td><th width="100%" align="center">GObject Reference Manual</th><td><a accesskey="n" href="GTypePlugin.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td></tr></table><div class="refentry" lang="en"><a name="gobject-Type-Information"></a><div class="titlepage"><div></div><div></div></div><div class="refnamediv"><h2><span class="refentrytitle">GType</span></h2><p>GType &#8212; The GLib Runtime type identification and management system</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="synopsis">

#include &lt;glib-object.h&gt;


typedef     <a href="gobject-Type-Information.html#GType">GType</a>;
#define     <a href="gobject-Type-Information.html#G-TYPE-FUNDAMENTAL-CAPS">G_TYPE_FUNDAMENTAL</a>              (type)
#define     <a href="gobject-Type-Information.html#G-TYPE-FUNDAMENTAL-MAX-CAPS">G_TYPE_FUNDAMENTAL_MAX</a>
#define     <a href="gobject-Type-Information.html#G-TYPE-MAKE-FUNDAMENTAL-CAPS">G_TYPE_MAKE_FUNDAMENTAL</a>         (x)
#define     <a href="gobject-Type-Information.html#G-TYPE-IS-ABSTRACT-CAPS">G_TYPE_IS_ABSTRACT</a>              (type)
#define     <a href="gobject-Type-Information.html#G-TYPE-IS-DERIVED-CAPS">G_TYPE_IS_DERIVED</a>               (type)
#define     <a href="gobject-Type-Information.html#G-TYPE-IS-FUNDAMENTAL-CAPS">G_TYPE_IS_FUNDAMENTAL</a>           (type)
#define     <a href="gobject-Type-Information.html#G-TYPE-IS-VALUE-TYPE-CAPS">G_TYPE_IS_VALUE_TYPE</a>            (type)
#define     <a href="gobject-Type-Information.html#G-TYPE-HAS-VALUE-TABLE-CAPS">G_TYPE_HAS_VALUE_TABLE</a>          (type)
#define     <a href="gobject-Type-Information.html#G-TYPE-IS-CLASSED-CAPS">G_TYPE_IS_CLASSED</a>               (type)
#define     <a href="gobject-Type-Information.html#G-TYPE-IS-INSTANTIATABLE-CAPS">G_TYPE_IS_INSTANTIATABLE</a>        (type)
#define     <a href="gobject-Type-Information.html#G-TYPE-IS-DERIVABLE-CAPS">G_TYPE_IS_DERIVABLE</a>             (type)
#define     <a href="gobject-Type-Information.html#G-TYPE-IS-DEEP-DERIVABLE-CAPS">G_TYPE_IS_DEEP_DERIVABLE</a>        (type)
#define     <a href="gobject-Type-Information.html#G-TYPE-IS-INTERFACE-CAPS">G_TYPE_IS_INTERFACE</a>             (type)
struct      <a href="gobject-Type-Information.html#GTypeInterface">GTypeInterface</a>;
struct      <a href="gobject-Type-Information.html#GTypeInstance">GTypeInstance</a>;
struct      <a href="gobject-Type-Information.html#GTypeClass">GTypeClass</a>;
struct      <a href="gobject-Type-Information.html#GTypeInfo">GTypeInfo</a>;
struct      <a href="gobject-Type-Information.html#GTypeFundamentalInfo">GTypeFundamentalInfo</a>;
struct      <a href="gobject-Type-Information.html#GInterfaceInfo">GInterfaceInfo</a>;
struct      <a href="gobject-Type-Information.html#GTypeValueTable">GTypeValueTable</a>;
#define     <a href="gobject-Type-Information.html#G-TYPE-FROM-INSTANCE-CAPS">G_TYPE_FROM_INSTANCE</a>            (instance)
#define     <a href="gobject-Type-Information.html#G-TYPE-FROM-CLASS-CAPS">G_TYPE_FROM_CLASS</a>               (g_class)
#define     <a href="gobject-Type-Information.html#G-TYPE-FROM-INTERFACE-CAPS">G_TYPE_FROM_INTERFACE</a>           (g_iface)
#define     <a href="gobject-Type-Information.html#G-TYPE-INSTANCE-GET-CLASS-CAPS">G_TYPE_INSTANCE_GET_CLASS</a>       (instance, g_type, c_type)
#define     <a href="gobject-Type-Information.html#G-TYPE-INSTANCE-GET-INTERFACE-CAPS">G_TYPE_INSTANCE_GET_INTERFACE</a>   (instance, g_type, c_type)
#define     <a href="gobject-Type-Information.html#G-TYPE-INSTANCE-GET-PRIVATE-CAPS">G_TYPE_INSTANCE_GET_PRIVATE</a>     (instance, g_type, c_type)
#define     <a href="gobject-Type-Information.html#G-TYPE-CHECK-INSTANCE-CAPS">G_TYPE_CHECK_INSTANCE</a>           (instance)
#define     <a href="gobject-Type-Information.html#G-TYPE-CHECK-INSTANCE-CAST-CAPS">G_TYPE_CHECK_INSTANCE_CAST</a>      (instance, g_type, c_type)
#define     <a href="gobject-Type-Information.html#G-TYPE-CHECK-INSTANCE-TYPE-CAPS">G_TYPE_CHECK_INSTANCE_TYPE</a>      (instance, g_type)
#define     <a href="gobject-Type-Information.html#G-TYPE-CHECK-CLASS-CAST-CAPS">G_TYPE_CHECK_CLASS_CAST</a>         (g_class, g_type, c_type)
#define     <a href="gobject-Type-Information.html#G-TYPE-CHECK-CLASS-TYPE-CAPS">G_TYPE_CHECK_CLASS_TYPE</a>         (g_class, g_type)
#define     <a href="gobject-Type-Information.html#G-TYPE-CHECK-VALUE-CAPS">G_TYPE_CHECK_VALUE</a>              (value)
#define     <a href="gobject-Type-Information.html#G-TYPE-CHECK-VALUE-TYPE-CAPS">G_TYPE_CHECK_VALUE_TYPE</a>         (value, g_type)
#define     <a href="gobject-Type-Information.html#G-TYPE-FLAG-RESERVED-ID-BIT-CAPS">G_TYPE_FLAG_RESERVED_ID_BIT</a>
void        <a href="gobject-Type-Information.html#g-type-init">g_type_init</a>                     (void);
enum        <a href="gobject-Type-Information.html#GTypeDebugFlags">GTypeDebugFlags</a>;
void        <a href="gobject-Type-Information.html#g-type-init-with-debug-flags">g_type_init_with_debug_flags</a>    (<a href="gobject-Type-Information.html#GTypeDebugFlags">GTypeDebugFlags</a> debug_flags);
G_CONST_RETURN <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a>* <a href="gobject-Type-Information.html#g-type-name">g_type_name</a>           (<a href="gobject-Type-Information.html#GType">GType</a> type);
<a
href="../glib/glib-Quarks.html#GQuark"
>GQuark</a>      <a href="gobject-Type-Information.html#g-type-qname">g_type_qname</a>                    (<a href="gobject-Type-Information.html#GType">GType</a> type);
<a href="gobject-Type-Information.html#GType">GType</a>       <a href="gobject-Type-Information.html#g-type-from-name">g_type_from_name</a>                (const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *name);
<a href="gobject-Type-Information.html#GType">GType</a>       <a href="gobject-Type-Information.html#g-type-parent">g_type_parent</a>                   (<a href="gobject-Type-Information.html#GType">GType</a> type);
<a
href="../glib/glib-Basic-Types.html#guint"
>guint</a>       <a href="gobject-Type-Information.html#g-type-depth">g_type_depth</a>                    (<a href="gobject-Type-Information.html#GType">GType</a> type);
<a href="gobject-Type-Information.html#GType">GType</a>       <a href="gobject-Type-Information.html#g-type-next-base">g_type_next_base</a>                (<a href="gobject-Type-Information.html#GType">GType</a> leaf_type,
                                             <a href="gobject-Type-Information.html#GType">GType</a> root_type);
<a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a>    <a href="gobject-Type-Information.html#g-type-is-a">g_type_is_a</a>                     (<a href="gobject-Type-Information.html#GType">GType</a> type,
                                             <a href="gobject-Type-Information.html#GType">GType</a> is_a_type);
<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a>    <a href="gobject-Type-Information.html#g-type-class-ref">g_type_class_ref</a>                (<a href="gobject-Type-Information.html#GType">GType</a> type);
<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a>    <a href="gobject-Type-Information.html#g-type-class-peek">g_type_class_peek</a>               (<a href="gobject-Type-Information.html#GType">GType</a> type);
<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a>    <a href="gobject-Type-Information.html#g-type-class-peek-static">g_type_class_peek_static</a>        (<a href="gobject-Type-Information.html#GType">GType</a> type);
void        <a href="gobject-Type-Information.html#g-type-class-unref">g_type_class_unref</a>              (<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> g_class);
<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a>    <a href="gobject-Type-Information.html#g-type-class-peek-parent">g_type_class_peek_parent</a>        (<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> g_class);
void        <a href="gobject-Type-Information.html#g-type-class-add-private">g_type_class_add_private</a>        (<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> g_class,
                                             <a
href="../glib/glib-Basic-Types.html#gsize"
>gsize</a> private_size);
<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a>    <a href="gobject-Type-Information.html#g-type-interface-peek">g_type_interface_peek</a>           (<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> instance_class,
                                             <a href="gobject-Type-Information.html#GType">GType</a> iface_type);
<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a>    <a href="gobject-Type-Information.html#g-type-interface-peek-parent">g_type_interface_peek_parent</a>    (<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> g_iface);
<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a>    <a href="gobject-Type-Information.html#g-type-default-interface-ref">g_type_default_interface_ref</a>    (<a href="gobject-Type-Information.html#GType">GType</a> g_type);
<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a>    <a href="gobject-Type-Information.html#g-type-default-interface-peek">g_type_default_interface_peek</a>   (<a href="gobject-Type-Information.html#GType">GType</a> g_type);
void        <a href="gobject-Type-Information.html#g-type-default-interface-unref">g_type_default_interface_unref</a>  (<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> g_iface);
<a href="gobject-Type-Information.html#GType">GType</a>*      <a href="gobject-Type-Information.html#g-type-children">g_type_children</a>                 (<a href="gobject-Type-Information.html#GType">GType</a> type,
                                             <a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> *n_children);
<a href="gobject-Type-Information.html#GType">GType</a>*      <a href="gobject-Type-Information.html#g-type-interfaces">g_type_interfaces</a>               (<a href="gobject-Type-Information.html#GType">GType</a> type,
                                             <a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> *n_interfaces);
<a href="gobject-Type-Information.html#GType">GType</a>*      <a href="gobject-Type-Information.html#g-type-interface-prerequisites">g_type_interface_prerequisites</a>  (<a href="gobject-Type-Information.html#GType">GType</a> interface_type,
                                             <a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> *n_prerequisites);
void        <a href="gobject-Type-Information.html#g-type-set-qdata">g_type_set_qdata</a>                (<a href="gobject-Type-Information.html#GType">GType</a> type,
                                             <a
href="../glib/glib-Quarks.html#GQuark"
>GQuark</a> quark,
                                             <a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> data);
<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a>    <a href="gobject-Type-Information.html#g-type-get-qdata">g_type_get_qdata</a>                (<a href="gobject-Type-Information.html#GType">GType</a> type,
                                             <a
href="../glib/glib-Quarks.html#GQuark"
>GQuark</a> quark);
void        <a href="gobject-Type-Information.html#g-type-query">g_type_query</a>                    (<a href="gobject-Type-Information.html#GType">GType</a> type,
                                             <a href="gobject-Type-Information.html#GTypeQuery">GTypeQuery</a> *query);
struct      <a href="gobject-Type-Information.html#GTypeQuery">GTypeQuery</a>;
void        (<a href="gobject-Type-Information.html#GBaseInitFunc">*GBaseInitFunc</a>)                (<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> g_class);
void        (<a href="gobject-Type-Information.html#GBaseFinalizeFunc">*GBaseFinalizeFunc</a>)            (<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> g_class);
void        (<a href="gobject-Type-Information.html#GClassInitFunc">*GClassInitFunc</a>)               (<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> g_class,
                                             <a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> class_data);
void        (<a href="gobject-Type-Information.html#GClassFinalizeFunc">*GClassFinalizeFunc</a>)           (<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> g_class,
                                             <a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> class_data);
void        (<a href="gobject-Type-Information.html#GInstanceInitFunc">*GInstanceInitFunc</a>)            (<a href="gobject-Type-Information.html#GTypeInstance">GTypeInstance</a> *instance,
                                             <a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> g_class);
void        (<a href="gobject-Type-Information.html#GInterfaceInitFunc">*GInterfaceInitFunc</a>)           (<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> g_iface,
                                             <a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> iface_data);
void        (<a href="gobject-Type-Information.html#GInterfaceFinalizeFunc">*GInterfaceFinalizeFunc</a>)       (<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> g_iface,
                                             <a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> iface_data);
<a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a>    (<a href="gobject-Type-Information.html#GTypeClassCacheFunc">*GTypeClassCacheFunc</a>)          (<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> cache_data,
                                             <a href="gobject-Type-Information.html#GTypeClass">GTypeClass</a> *g_class);
enum        <a href="gobject-Type-Information.html#GTypeFlags">GTypeFlags</a>;
enum        <a href="gobject-Type-Information.html#GTypeFundamentalFlags">GTypeFundamentalFlags</a>;
<a href="gobject-Type-Information.html#GType">GType</a>       <a href="gobject-Type-Information.html#g-type-register-static">g_type_register_static</a>          (<a href="gobject-Type-Information.html#GType">GType</a> parent_type,
                                             const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *type_name,
                                             const <a href="gobject-Type-Information.html#GTypeInfo">GTypeInfo</a> *info,
                                             <a href="gobject-Type-Information.html#GTypeFlags">GTypeFlags</a> flags);
<a href="gobject-Type-Information.html#GType">GType</a>       <a href="gobject-Type-Information.html#g-type-register-dynamic">g_type_register_dynamic</a>         (<a href="gobject-Type-Information.html#GType">GType</a> parent_type,
                                             const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *type_name,
                                             <a href="GTypePlugin.html" title="GTypePlugin">GTypePlugin</a> *plugin,
                                             <a href="gobject-Type-Information.html#GTypeFlags">GTypeFlags</a> flags);
<a href="gobject-Type-Information.html#GType">GType</a>       <a href="gobject-Type-Information.html#g-type-register-fundamental">g_type_register_fundamental</a>     (<a href="gobject-Type-Information.html#GType">GType</a> type_id,
                                             const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *type_name,
                                             const <a href="gobject-Type-Information.html#GTypeInfo">GTypeInfo</a> *info,
                                             const <a href="gobject-Type-Information.html#GTypeFundamentalInfo">GTypeFundamentalInfo</a> *finfo,
                                             <a href="gobject-Type-Information.html#GTypeFlags">GTypeFlags</a> flags);
void        <a href="gobject-Type-Information.html#g-type-add-interface-static">g_type_add_interface_static</a>     (<a href="gobject-Type-Information.html#GType">GType</a> instance_type,
                                             <a href="gobject-Type-Information.html#GType">GType</a> interface_type,
                                             const <a href="gobject-Type-Information.html#GInterfaceInfo">GInterfaceInfo</a> *info);
void        <a href="gobject-Type-Information.html#g-type-add-interface-dynamic">g_type_add_interface_dynamic</a>    (<a href="gobject-Type-Information.html#GType">GType</a> instance_type,
                                             <a href="gobject-Type-Information.html#GType">GType</a> interface_type,
                                             <a href="GTypePlugin.html" title="GTypePlugin">GTypePlugin</a> *plugin);
void        <a href="gobject-Type-Information.html#g-type-interface-add-prerequisite">g_type_interface_add_prerequisite</a>
                                            (<a href="gobject-Type-Information.html#GType">GType</a> interface_type,
                                             <a href="gobject-Type-Information.html#GType">GType</a> prerequisite_type);
<a href="GTypePlugin.html" title="GTypePlugin">GTypePlugin</a>* <a href="gobject-Type-Information.html#g-type-get-plugin">g_type_get_plugin</a>              (<a href="gobject-Type-Information.html#GType">GType</a> type);
<a href="GTypePlugin.html" title="GTypePlugin">GTypePlugin</a>* <a href="gobject-Type-Information.html#g-type-interface-get-plugin">g_type_interface_get_plugin</a>    (<a href="gobject-Type-Information.html#GType">GType</a> instance_type,
                                             <a href="gobject-Type-Information.html#GType">GType</a> interface_type);
<a href="gobject-Type-Information.html#GType">GType</a>       <a href="gobject-Type-Information.html#g-type-fundamental-next">g_type_fundamental_next</a>         (void);
<a href="gobject-Type-Information.html#GType">GType</a>       <a href="gobject-Type-Information.html#g-type-fundamental">g_type_fundamental</a>              (<a href="gobject-Type-Information.html#GType">GType</a> type_id);
<a href="gobject-Type-Information.html#GTypeInstance">GTypeInstance</a>* <a href="gobject-Type-Information.html#g-type-create-instance">g_type_create_instance</a>       (<a href="gobject-Type-Information.html#GType">GType</a> type);
void        <a href="gobject-Type-Information.html#g-type-free-instance">g_type_free_instance</a>            (<a href="gobject-Type-Information.html#GTypeInstance">GTypeInstance</a> *instance);
void        <a href="gobject-Type-Information.html#g-type-add-class-cache-func">g_type_add_class_cache_func</a>     (<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> cache_data,
                                             <a href="gobject-Type-Information.html#GTypeClassCacheFunc">GTypeClassCacheFunc</a> cache_func);
void        <a href="gobject-Type-Information.html#g-type-remove-class-cache-func">g_type_remove_class_cache_func</a>  (<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> cache_data,
                                             <a href="gobject-Type-Information.html#GTypeClassCacheFunc">GTypeClassCacheFunc</a> cache_func);
void        <a href="gobject-Type-Information.html#g-type-class-unref-uncached">g_type_class_unref_uncached</a>     (<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> g_class);
void        <a href="gobject-Type-Information.html#g-type-add-interface-check">g_type_add_interface_check</a>      (<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> check_data,
                                             <a href="gobject-Type-Information.html#GTypeInterfaceCheckFunc">GTypeInterfaceCheckFunc</a> check_func);
void        <a href="gobject-Type-Information.html#g-type-remove-interface-check">g_type_remove_interface_check</a>   (<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> check_data,
                                             <a href="gobject-Type-Information.html#GTypeInterfaceCheckFunc">GTypeInterfaceCheckFunc</a> chec_func);
void        (<a href="gobject-Type-Information.html#GTypeInterfaceCheckFunc">*GTypeInterfaceCheckFunc</a>)      (<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> func_data,
                                             <a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> g_iface);
<a href="gobject-Type-Information.html#GTypeValueTable">GTypeValueTable</a>* <a href="gobject-Type-Information.html#g-type-value-table-peek">g_type_value_table_peek</a>    (<a href="gobject-Type-Information.html#GType">GType</a> type);
#define     <a href="gobject-Type-Information.html#G-DEFINE-TYPE-CAPS">G_DEFINE_TYPE</a>                   (TN, t_n, T_P)
#define     <a href="gobject-Type-Information.html#G-DEFINE-TYPE-WITH-CODE-CAPS">G_DEFINE_TYPE_WITH_CODE</a>         (TN, t_n, T_P, _C_)
#define     <a href="gobject-Type-Information.html#G-DEFINE-ABSTRACT-TYPE-CAPS">G_DEFINE_ABSTRACT_TYPE</a>          (TN, t_n, T_P)
#define     <a href="gobject-Type-Information.html#G-DEFINE-ABSTRACT-TYPE-WITH-CODE-CAPS">G_DEFINE_ABSTRACT_TYPE_WITH_CODE</a>(TN, t_n, T_P, _C_)
#define     <a href="gobject-Type-Information.html#G-IMPLEMENT-INTERFACE-CAPS">G_IMPLEMENT_INTERFACE</a>           (TYPE_IFACE, iface_init)
#define     <a href="gobject-Type-Information.html#G-DEFINE-TYPE-EXTENDED-CAPS">G_DEFINE_TYPE_EXTENDED</a>          (TypeName, type_name, TYPE_PARENT, flags, CODE)


#define     <a href="gobject-Type-Information.html#G-TYPE-INVALID-CAPS">G_TYPE_INVALID</a>
#define     <a href="gobject-Type-Information.html#G-TYPE-NONE-CAPS">G_TYPE_NONE</a>
#define     <a href="gobject-Type-Information.html#G-TYPE-INTERFACE-CAPS">G_TYPE_INTERFACE</a>
#define     <a href="gobject-Type-Information.html#G-TYPE-CHAR-CAPS">G_TYPE_CHAR</a>
#define     <a href="gobject-Type-Information.html#G-TYPE-UCHAR-CAPS">G_TYPE_UCHAR</a>
#define     <a href="gobject-Type-Information.html#G-TYPE-BOOLEAN-CAPS">G_TYPE_BOOLEAN</a>
#define     <a href="gobject-Type-Information.html#G-TYPE-INT-CAPS">G_TYPE_INT</a>
#define     <a href="gobject-Type-Information.html#G-TYPE-UINT-CAPS">G_TYPE_UINT</a>
#define     <a href="gobject-Type-Information.html#G-TYPE-LONG-CAPS">G_TYPE_LONG</a>
#define     <a href="gobject-Type-Information.html#G-TYPE-ULONG-CAPS">G_TYPE_ULONG</a>
#define     <a href="gobject-Type-Information.html#G-TYPE-INT64-CAPS">G_TYPE_INT64</a>
#define     <a href="gobject-Type-Information.html#G-TYPE-UINT64-CAPS">G_TYPE_UINT64</a>
#define     <a href="gobject-Type-Information.html#G-TYPE-ENUM-CAPS">G_TYPE_ENUM</a>
#define     <a href="gobject-Type-Information.html#G-TYPE-FLAGS-CAPS">G_TYPE_FLAGS</a>
#define     <a href="gobject-Type-Information.html#G-TYPE-FLOAT-CAPS">G_TYPE_FLOAT</a>
#define     <a href="gobject-Type-Information.html#G-TYPE-DOUBLE-CAPS">G_TYPE_DOUBLE</a>
#define     <a href="gobject-Type-Information.html#G-TYPE-STRING-CAPS">G_TYPE_STRING</a>
#define     <a href="gobject-Type-Information.html#G-TYPE-POINTER-CAPS">G_TYPE_POINTER</a>
#define     <a href="gobject-Type-Information.html#G-TYPE-BOXED-CAPS">G_TYPE_BOXED</a>
#define     <a href="gobject-Type-Information.html#G-TYPE-PARAM-CAPS">G_TYPE_PARAM</a>
#define     <a href="gobject-Type-Information.html#G-TYPE-OBJECT-CAPS">G_TYPE_OBJECT</a>

#define     <a href="gobject-Type-Information.html#G-TYPE-RESERVED-GLIB-FIRST-CAPS">G_TYPE_RESERVED_GLIB_FIRST</a>
#define     <a href="gobject-Type-Information.html#G-TYPE-RESERVED-GLIB-LAST-CAPS">G_TYPE_RESERVED_GLIB_LAST</a>
#define     <a href="gobject-Type-Information.html#G-TYPE-RESERVED-BSE-FIRST-CAPS">G_TYPE_RESERVED_BSE_FIRST</a>
#define     <a href="gobject-Type-Information.html#G-TYPE-RESERVED-BSE-LAST-CAPS">G_TYPE_RESERVED_BSE_LAST</a>
#define     <a href="gobject-Type-Information.html#G-TYPE-RESERVED-USER-FIRST-CAPS">G_TYPE_RESERVED_USER_FIRST</a>

</pre></div><div class="refsect1" lang="en"><a name="id2751327"></a><h2>Description</h2><p>
The GType API is the foundation of the GObject system.  It provides the
facilities for registering and managing all fundamental data types,
user-defined object and interface types.  Before using any GType
or GObject functions, <a href="gobject-Type-Information.html#g-type-init"><tt class="function">g_type_init()</tt></a> must be called to initialize the
type system.
</p><p>
For type creation and registration purposes, all types fall into one of
two categories: static or dynamic.  Static types are never loaded or
unloaded at run-time as dynamic types may be.  Static types are created
with <a href="gobject-Type-Information.html#g-type-register-static"><tt class="function">g_type_register_static()</tt></a> that gets type specific information passed
in via a <a href="gobject-Type-Information.html#GTypeInfo"><span class="type">GTypeInfo</span></a> structure.
Dynamic types are created with <a href="gobject-Type-Information.html#g-type-register-dynamic"><tt class="function">g_type_register_dynamic()</tt></a> which takes a
<a href="GTypePlugin.html" title="GTypePlugin"><span class="type">GTypePlugin</span></a> structure instead. The remaining type information (the
<a href="gobject-Type-Information.html#GTypeInfo"><span class="type">GTypeInfo</span></a> structure) is retrieved during runtime through <a href="GTypePlugin.html" title="GTypePlugin"><span class="type">GTypePlugin</span></a>
and the g_type_plugin_*() API.
These registration functions are usually called only once from a 
function whose only purpose is to return the type identifier for a 
specific class.  Once the type (or class or interface) is registered,
it may be instantiated, inherited, or implemented depending on exactly
what sort of type it is.
There is also a third registration function for registering fundamental
types called <a href="gobject-Type-Information.html#g-type-register-fundamental"><tt class="function">g_type_register_fundamental()</tt></a> which requires both a <a href="gobject-Type-Information.html#GTypeInfo"><span class="type">GTypeInfo</span></a>
structure and a <a href="gobject-Type-Information.html#GTypeFundamentalInfo"><span class="type">GTypeFundamentalInfo</span></a> structure but it is seldom used
since most fundamental types are predefined rather than user-defined.
</p></div><div class="refsect1" lang="en"><a name="id2751451"></a><h2>Details</h2><div class="refsect2" lang="en"><a name="id2751457"></a><h3><a name="GType"></a>GType</h3><a class="indexterm" name="id2751467"></a><p>
A numerical value which represents the unique identifier of a registered
type.
</p></div><hr><div class="refsect2" lang="en"><a name="id2751477"></a><h3><a name="G-TYPE-FUNDAMENTAL-CAPS"></a>G_TYPE_FUNDAMENTAL()</h3><a class="indexterm" name="id2751488"></a><pre class="programlisting">#define G_TYPE_FUNDAMENTAL(type)	(g_type_fundamental (type))
</pre><p>
Returns the fundamental type which is the ancestor of <i class="parameter"><tt>type</tt></i>.
Fundamental types are types that serve as fundaments for the derived types, 
thus they are the roots of distinct inheritance hierarchies.
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>type</tt></i> :</span></td><td>A <a href="gobject-Type-Information.html#GType"><span class="type">GType</span></a> value.


</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2751540"></a><h3><a name="G-TYPE-FUNDAMENTAL-MAX-CAPS"></a>G_TYPE_FUNDAMENTAL_MAX</h3><a class="indexterm" name="id2751550"></a><pre class="programlisting">#define	G_TYPE_FUNDAMENTAL_MAX		(255 &lt;&lt; G_TYPE_FUNDAMENTAL_SHIFT)
</pre><p>
An integer constant that represents the number of identifiers reserved
for types that are assigned at compile-time.
</p></div><hr><div class="refsect2" lang="en"><a name="id2751573"></a><h3><a name="G-TYPE-MAKE-FUNDAMENTAL-CAPS"></a>G_TYPE_MAKE_FUNDAMENTAL()</h3><a class="indexterm" name="id2751584"></a><pre class="programlisting">#define	G_TYPE_MAKE_FUNDAMENTAL(x)	((GType) ((x) &lt;&lt; G_TYPE_FUNDAMENTAL_SHIFT))
</pre><p>
Returns the type ID for the fundamental type number <i class="parameter"><tt>x</tt></i>.
Use <a href="gobject-Type-Information.html#g-type-fundamental-next"><tt class="function">g_type_fundamental_next()</tt></a> instead of this macro to create new fundamental 
types.
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>x</tt></i> :</span></td><td>the fundamental type number.


</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2751637"></a><h3><a name="G-TYPE-IS-ABSTRACT-CAPS"></a>G_TYPE_IS_ABSTRACT()</h3><a class="indexterm" name="id2751648"></a><pre class="programlisting">#define G_TYPE_IS_ABSTRACT(type)                (g_type_test_flags ((type), G_TYPE_FLAG_ABSTRACT))
</pre><p>
Returns <tt class="literal">TRUE</tt> if <i class="parameter"><tt>type</tt></i> is an abstract type.  An abstract type can not be
instantiated and is normally used as an abstract base class for
derived classes.
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>type</tt></i> :</span></td><td>A <a href="gobject-Type-Information.html#GType"><span class="type">GType</span></a> value.


</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2751705"></a><h3><a name="G-TYPE-IS-DERIVED-CAPS"></a>G_TYPE_IS_DERIVED()</h3><a class="indexterm" name="id2751717"></a><pre class="programlisting">#define G_TYPE_IS_DERIVED(type)                 ((type) &gt; G_TYPE_FUNDAMENTAL_MAX)
</pre><p>
Returns <tt class="literal">TRUE</tt> if <i class="parameter"><tt>type</tt></i> is derived (or in object-oriented terminology:
inherited) from another type (this holds true for all non-fundamental
types).
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>type</tt></i> :</span></td><td>A <a href="gobject-Type-Information.html#GType"><span class="type">GType</span></a> value.


</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2751774"></a><h3><a name="G-TYPE-IS-FUNDAMENTAL-CAPS"></a>G_TYPE_IS_FUNDAMENTAL()</h3><a class="indexterm" name="id2751784"></a><pre class="programlisting">#define G_TYPE_IS_FUNDAMENTAL(type)             ((type) &lt;= G_TYPE_FUNDAMENTAL_MAX)
</pre><p>
Returns <tt class="literal">TRUE</tt> if <i class="parameter"><tt>type</tt></i> is a fundamental type.
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>type</tt></i> :</span></td><td>A <a href="gobject-Type-Information.html#GType"><span class="type">GType</span></a> value.


</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2751839"></a><h3><a name="G-TYPE-IS-VALUE-TYPE-CAPS"></a>G_TYPE_IS_VALUE_TYPE()</h3><a class="indexterm" name="id2751850"></a><pre class="programlisting">#define G_TYPE_IS_VALUE_TYPE(type)              (g_type_check_is_value_type (type))
</pre><p>
Returns <tt class="literal">TRUE</tt> if <i class="parameter"><tt>type</tt></i> is a value type which can be used for
<a href="gobject-Generic-values.html#g-value-init"><tt class="function">g_value_init()</tt></a>. 
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>type</tt></i> :</span></td><td>A <a href="gobject-Type-Information.html#GType"><span class="type">GType</span></a> value.


</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2751916"></a><h3><a name="G-TYPE-HAS-VALUE-TABLE-CAPS"></a>G_TYPE_HAS_VALUE_TABLE()</h3><a class="indexterm" name="id2751927"></a><pre class="programlisting">#define G_TYPE_HAS_VALUE_TABLE(type)            (g_type_value_table_peek (type) != NULL)
</pre><p>
Returns <tt class="literal">TRUE</tt> if <i class="parameter"><tt>type</tt></i> has a <a href="gobject-Type-Information.html#GTypeValueTable"><span class="type">GTypeValueTable</span></a>.
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>type</tt></i> :</span></td><td>A <a href="gobject-Type-Information.html#GType"><span class="type">GType</span></a> value.


</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2751990"></a><h3><a name="G-TYPE-IS-CLASSED-CAPS"></a>G_TYPE_IS_CLASSED()</h3><a class="indexterm" name="id2752001"></a><pre class="programlisting">#define G_TYPE_IS_CLASSED(type)                 (g_type_test_flags ((type), G_TYPE_FLAG_CLASSED))
</pre><p>
Returns <tt class="literal">TRUE</tt> if <i class="parameter"><tt>type</tt></i> is a classed type.
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>type</tt></i> :</span></td><td>A <a href="gobject-Type-Information.html#GType"><span class="type">GType</span></a> value.


</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2752056"></a><h3><a name="G-TYPE-IS-INSTANTIATABLE-CAPS"></a>G_TYPE_IS_INSTANTIATABLE()</h3><a class="indexterm" name="id2752068"></a><pre class="programlisting">#define G_TYPE_IS_INSTANTIATABLE(type)          (g_type_test_flags ((type), G_TYPE_FLAG_INSTANTIATABLE))
</pre><p>
Returns <tt class="literal">TRUE</tt> if <i class="parameter"><tt>type</tt></i> can be instantiated.  Instantiation is the
process of creating an instance (object) of this type.
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>type</tt></i> :</span></td><td>A <a href="gobject-Type-Information.html#GType"><span class="type">GType</span></a> value.


</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2752124"></a><h3><a name="G-TYPE-IS-DERIVABLE-CAPS"></a>G_TYPE_IS_DERIVABLE()</h3><a class="indexterm" name="id2752135"></a><pre class="programlisting">#define G_TYPE_IS_DERIVABLE(type)               (g_type_test_flags ((type), G_TYPE_FLAG_DERIVABLE))
</pre><p>
Returns <tt class="literal">TRUE</tt> if <i class="parameter"><tt>type</tt></i> is a derivable type.  A derivable type can
be used as the base class of a flat (single-level) class hierarchy.
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>type</tt></i> :</span></td><td>A <a href="gobject-Type-Information.html#GType"><span class="type">GType</span></a> value.


</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2752191"></a><h3><a name="G-TYPE-IS-DEEP-DERIVABLE-CAPS"></a>G_TYPE_IS_DEEP_DERIVABLE()</h3><a class="indexterm" name="id2752203"></a><pre class="programlisting">#define G_TYPE_IS_DEEP_DERIVABLE(type)          (g_type_test_flags ((type), G_TYPE_FLAG_DEEP_DERIVABLE))
</pre><p>
Returns <tt class="literal">TRUE</tt> if <i class="parameter"><tt>type</tt></i> is a deep derivable type.  A deep derivable type
can be used as the base class of a deep (multi-level) class hierarchy.
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>type</tt></i> :</span></td><td>A <a href="gobject-Type-Information.html#GType"><span class="type">GType</span></a> value.


</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2752260"></a><h3><a name="G-TYPE-IS-INTERFACE-CAPS"></a>G_TYPE_IS_INTERFACE()</h3><a class="indexterm" name="id2752271"></a><pre class="programlisting">#define G_TYPE_IS_INTERFACE(type)               (G_TYPE_FUNDAMENTAL (type) == G_TYPE_INTERFACE)
</pre><p>
Returns <tt class="literal">TRUE</tt> if <i class="parameter"><tt>type</tt></i> is an interface type.
Interface types are types that provide pure APIs, the implementation
of which is provided by another type (which is then said to conform
to the interface).  GLib interfaces are somewhat analogous to Java
interfaces and C++ classes containing only pure virtual functions, 
with the difference that GType interfaces are not derivable (but see
<a href="gobject-Type-Information.html#g-type-interface-add-prerequisite"><tt class="function">g_type_interface_add_prerequisite()</tt></a> for an alternative).
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>type</tt></i> :</span></td><td>A <a href="gobject-Type-Information.html#GType"><span class="type">GType</span></a> value.


</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2752342"></a><h3><a name="GTypeInterface"></a>struct GTypeInterface</h3><a class="indexterm" name="id2752354"></a><pre class="programlisting">struct GTypeInterface {

};
</pre><p>
An opaque structure used as the base of all interface types.
</p></div><hr><div class="refsect2" lang="en"><a name="id2752370"></a><h3><a name="GTypeInstance"></a>struct GTypeInstance</h3><a class="indexterm" name="id2752381"></a><pre class="programlisting">struct GTypeInstance {

};
</pre><p>
An opaque structure used as the base of all type instances.
</p></div><hr><div class="refsect2" lang="en"><a name="id2752397"></a><h3><a name="GTypeClass"></a>struct GTypeClass</h3><a class="indexterm" name="id2752407"></a><pre class="programlisting">struct GTypeClass {

};
</pre><p>
An opaque structure used as the base of all classes.
</p></div><hr><div class="refsect2" lang="en"><a name="id2752423"></a><h3><a name="GTypeInfo"></a>struct GTypeInfo</h3><a class="indexterm" name="id2752434"></a><pre class="programlisting">struct GTypeInfo {

  /* interface types, classed types, instantiated types */
  guint16                class_size;
  
  GBaseInitFunc          base_init;
  GBaseFinalizeFunc      base_finalize;
  
  /* interface types, classed types, instantiated types */
  GClassInitFunc         class_init;
  GClassFinalizeFunc     class_finalize;
  gconstpointer          class_data;
  
  /* instantiated types */
  guint16                instance_size;
  guint16                n_preallocs;
  GInstanceInitFunc      instance_init;
  
  /* value handling */
  const GTypeValueTable	*value_table;
};
</pre><p>
This structure is used to provide the type system with the information
required to initialize and destruct (finalize) a type's class and
instances thereof.
The initialized structure is passed to the <a href="gobject-Type-Information.html#g-type-register-static"><tt class="function">g_type_register_static()</tt></a> function
(or is copied into the provided <a href="gobject-Type-Information.html#GTypeInfo"><span class="type">GTypeInfo</span></a> structure in the
<a href="GTypePlugin.html#g-type-plugin-complete-type-info"><tt class="function">g_type_plugin_complete_type_info()</tt></a>). The type system will perform a deep
copy of this structure, so it's memory does not need to be persistent
across invocation of <a href="gobject-Type-Information.html#g-type-register-static"><tt class="function">g_type_register_static()</tt></a>.
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><a
href="../glib/glib-Basic-Types.html#guint16"
>guint16</a> <i class="structfield"><tt>class_size</tt></i></span></td><td>	 Size of the class structure (required for interface, classed and instantiatable types).
</td></tr><tr><td><span class="term"><a href="gobject-Type-Information.html#GBaseInitFunc">GBaseInitFunc</a> <i class="structfield"><tt>base_init</tt></i></span></td><td>	 Location of the base initialization function (optional).
</td></tr><tr><td><span class="term"><a href="gobject-Type-Information.html#GBaseFinalizeFunc">GBaseFinalizeFunc</a> <i class="structfield"><tt>base_finalize</tt></i></span></td><td> Location of the base finalization function (optional).
</td></tr><tr><td><span class="term"><a href="gobject-Type-Information.html#GClassInitFunc">GClassInitFunc</a> <i class="structfield"><tt>class_init</tt></i></span></td><td>	 Location of the class initialization function for
  classed and types. Location of the default vtable inititalization
  function for interface types. (optional) This function is used both
  to fill in virtual functions in the class or default vtable, and
  to do type-specific setup such as registering signals and object
  properties.
</td></tr><tr><td><span class="term"><a href="gobject-Type-Information.html#GClassFinalizeFunc">GClassFinalizeFunc</a> <i class="structfield"><tt>class_finalize</tt></i></span></td><td>Location of the class finalization function for
  classed and types. Location fo the default vtable finalization
  function for interface types. (optional)
</td></tr><tr><td><span class="term"><a
href="../glib/glib-Basic-Types.html#gconstpointer"
>gconstpointer</a> <i class="structfield"><tt>class_data</tt></i></span></td><td>	 User-supplied data passed to the class init/finalize functions.
</td></tr><tr><td><span class="term"><a
href="../glib/glib-Basic-Types.html#guint16"
>guint16</a> <i class="structfield"><tt>instance_size</tt></i></span></td><td> Size of the instance (object) structure (required for instantiatable types only).
</td></tr><tr><td><span class="term"><a
href="../glib/glib-Basic-Types.html#guint16"
>guint16</a> <i class="structfield"><tt>n_preallocs</tt></i></span></td><td>	 Number of pre-allocated (cached) instances to reserve memory for (0 indicates no caching).
</td></tr><tr><td><span class="term"><a href="gobject-Type-Information.html#GInstanceInitFunc">GInstanceInitFunc</a> <i class="structfield"><tt>instance_init</tt></i></span></td><td> Location of the instance initialization function (optional, for instantiatable types only).
</td></tr><tr><td><span class="term">const <a href="gobject-Type-Information.html#GTypeValueTable">GTypeValueTable</a> *<i class="structfield"><tt>value_table</tt></i></span></td><td>	 A <a href="gobject-Type-Information.html#GTypeValueTable"><span class="type">GTypeValueTable</span></a> function table for generic handling of GValues of this type (usually only
		 useful for fundamental types).

</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2752743"></a><h3><a name="GTypeFundamentalInfo"></a>struct GTypeFundamentalInfo</h3><a class="indexterm" name="id2752754"></a><pre class="programlisting">struct GTypeFundamentalInfo {

  GTypeFundamentalFlags  type_flags;
};
</pre><p>
A structure that provides information to the type system which is
used specifically for managing fundamental types.  
</p></div><hr><div class="refsect2" lang="en"><a name="id2752772"></a><h3><a name="GInterfaceInfo"></a>struct GInterfaceInfo</h3><a class="indexterm" name="id2752783"></a><pre class="programlisting">struct GInterfaceInfo {

  GInterfaceInitFunc     interface_init;
  GInterfaceFinalizeFunc interface_finalize;
  gpointer               interface_data;
};
</pre><p>
A structure that provides information to the type system which is
used specifically for managing interface types.
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><a href="gobject-Type-Information.html#GInterfaceInitFunc">GInterfaceInitFunc</a> <i class="structfield"><tt>interface_init</tt></i></span></td><td>	Location of the function that initializes the interface.
</td></tr><tr><td><span class="term"><a href="gobject-Type-Information.html#GInterfaceFinalizeFunc">GInterfaceFinalizeFunc</a> <i class="structfield"><tt>interface_finalize</tt></i></span></td><td>	Location of the function that finalizes the interface.
</td></tr><tr><td><span class="term"><a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> <i class="structfield"><tt>interface_data</tt></i></span></td><td>	Location of user data passed to the <i class="parameter"><tt>interface_init</tt></i> and
	 		<i class="parameter"><tt>interface_finalize</tt></i> functions (optional).

</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2752879"></a><h3><a name="GTypeValueTable"></a>struct GTypeValueTable</h3><a class="indexterm" name="id2752890"></a><pre class="programlisting">struct GTypeValueTable {

  void     (*value_init)         (GValue       *value);
  void     (*value_free)         (GValue       *value);
  void     (*value_copy)         (const GValue *src_value,
				  GValue       *dest_value);
  /* varargs functionality (optional) */
  gpointer (*value_peek_pointer) (const GValue *value);
  gchar	    *collect_format;
  gchar*   (*collect_value)      (GValue       *value,
				  guint         n_collect_values,
				  GTypeCValue  *collect_values,
				  guint		collect_flags);
  gchar	    *lcopy_format;
  gchar*   (*lcopy_value)        (const GValue *value,
				  guint         n_collect_values,
				  GTypeCValue  *collect_values,
				  guint		collect_flags);
};
</pre><p>
The <a href="gobject-Type-Information.html#GTypeValueTable"><span class="type">GTypeValueTable</span></a> provides the functions required by the <a href="gobject-Generic-values.html#GValue"><span class="type">GValue</span></a> implementation,
to serve as a container for values of a type.
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term">void (*<i class="structfield"><tt>value_init</tt></i>) (GValue       *value)</span></td><td>		Default initialize <i class="parameter"><tt>values</tt></i> contents by poking values
			directly into the value-&gt;data array. The data array of
			the <a href="gobject-Generic-values.html#GValue"><span class="type">GValue</span></a> passed into this function was zero-filled
			with <tt class="function"><tt class="function">memset()</tt></tt>, so no care has to
                        be taken to free any
			old contents. E.g. for the implementation of a string
			value that may never be <tt class="literal">NULL</tt>, the implementation might
			look like:
<pre class="programlisting">
{
  value-&gt;data[0].v_pointer = g_strdup ("");
}
</pre>
</td></tr><tr><td><span class="term">void (*<i class="structfield"><tt>value_free</tt></i>) (GValue       *value)</span></td><td>		Free any old contents that might be left in the
			data array of the passed in <i class="parameter"><tt>value</tt></i>. No resources may
			remain allocated through the <a href="gobject-Generic-values.html#GValue"><span class="type">GValue</span></a> contents after
			this function returns. E.g. for our above string type:
<pre class="programlisting">
{
  /* only free strings without a specific flag for static storage */
  if (!(value-&gt;data[1].v_uint &amp; G_VALUE_NOCOPY_CONTENTS))
    g_free (value-&gt;data[0].v_pointer);
}
</pre>
</td></tr><tr><td><span class="term">void (*<i class="structfield"><tt>value_copy</tt></i>) (const GValue *src_value,
				  GValue       *dest_value)</span></td><td>		<i class="parameter"><tt>dest_value</tt></i> is a <a href="gobject-Generic-values.html#GValue"><span class="type">GValue</span></a> with zero-filled data section
			and <i class="parameter"><tt>src_value</tt></i> is a properly setup <a href="gobject-Generic-values.html#GValue"><span class="type">GValue</span></a> of same or
			derived type.
			The purpose of this function is to copy the contents of
			<i class="parameter"><tt>src_value</tt></i> into <i class="parameter"><tt>dest_value</tt></i> in a way, that even after
			<i class="parameter"><tt>src_value</tt></i> has been freed, the contents of <i class="parameter"><tt>dest_value</tt></i>
			remain valid. String type example:
<pre class="programlisting">
{
  dest_value-&gt;data[0].v_pointer = g_strdup (src_value-&gt;data[0].v_pointer);
}
</pre>
</td></tr><tr><td><span class="term"><a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> (*<i class="structfield"><tt>value_peek_pointer</tt></i>) (const GValue *value)</span></td><td>	If the value contents fit into a pointer, such as objects
			or strings, return this pointer, so the caller can peek at
			the current contents. To extend on our above string example:
<pre class="programlisting">
{
  return value-&gt;data[0].v_pointer;
}
</pre>
</td></tr><tr><td><span class="term"><a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *<i class="structfield"><tt>collect_format</tt></i></span></td><td>	A string format describing how to collect the contents of
			this value, bit-by-bit. Each character in the format represents
			an argument to be collected, the characters themselves indicate
			the type of the argument. Currently supported arguments are:
<div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"></span></td><td><p>
        'i' - Integers. passed as collect_values[].v_int.
  </p></td></tr><tr><td><span class="term"></span></td><td><p>
        'l' - Longs. passed as collect_values[].v_long.
  </p></td></tr><tr><td><span class="term"></span></td><td><p>
        'd' - Doubles. passed as collect_values[].v_double.
  </p></td></tr><tr><td><span class="term"></span></td><td><p>
        'p' - Pointers. passed as collect_values[].v_pointer.
  </p></td></tr></tbody></table></div>
			It should be noted, that for variable argument list construction,
			ANSI C promotes every type smaller than an integer to an int, and
			floats to doubles. So for collection of short int or char, 'i'
			needs to be used, and for collection of floats 'd'.
</td></tr><tr><td><span class="term"><a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a>* (*<i class="structfield"><tt>collect_value</tt></i>) (GValue       *value,
				  guint         n_collect_values,
				  GTypeCValue  *collect_values,
				  guint		collect_flags)</span></td><td>	The <tt class="function">collect_value()</tt> function is responsible for converting the
			values collected from a variable argument list into contents
			suitable for storage in a GValue. This function should setup
			<i class="parameter"><tt>value</tt></i> similar to <tt class="function">value_init()</tt>, e.g. for a string value that
			does not allow <tt class="literal">NULL</tt> pointers, it needs to either spew an error,
			or do an implicit conversion by storing an empty string.
			The <i class="parameter"><tt>value</tt></i> passed in to this function has a zero-filled data
			array, so just like for <tt class="function">value_init()</tt> it is guaranteed to not
			contain any old contents that might need freeing.
			<i class="parameter"><tt>n_collect_values</tt></i> is exactly the string length of <i class="parameter"><tt>collect_format</tt></i>,
			and <i class="parameter"><tt>collect_values</tt></i> is an array of unions <a href="gobject-Varargs-Value-Collection.html#GTypeCValue"><span class="type">GTypeCValue</span></a> with
			length <i class="parameter"><tt>n_collect_values</tt></i>, containing the collected values
			according to <i class="parameter"><tt>collect_format</tt></i>.
			<i class="parameter"><tt>collect_flags</tt></i> is an argument provided as a hint by the caller,
			which may contain the flag <span class="type">G_VALUE_NOCOPY_CONTENTS</span> indicating,
			that the collected value contents may be considered "static"
			for the duration of the <i class="parameter"><tt>value</tt></i> lifetime.
			Thus an extra copy of the contents stored in <i class="parameter"><tt>collect_values</tt></i> is
			not required for assignment to <i class="parameter"><tt>value</tt></i>.
			For our above string example, we continue with:
<pre class="programlisting">
{
  if (!collect_values[0].v_pointer)
    value-&gt;data[0].v_pointer = g_strdup ("");
  else if (collect_flags &amp; G_VALUE_NOCOPY_CONTENTS)
    {
      value-&gt;data[0].v_pointer = collect_values[0].v_pointer;
      /* keep a flag for the <tt class="function">value_free()</tt> implementation to not free this string */
      value-&gt;data[1].v_uint = G_VALUE_NOCOPY_CONTENTS;
    }
  else
    value-&gt;data[0].v_pointer = g_strdup (collect_values[0].v_pointer);

  return NULL;
}
</pre>
			It should be noted, that it is generally a bad idea to follow the
			<span class="type">G_VALUE_NOCOPY_CONTENTS</span> hint for reference counted types. Due to
			reentrancy requirements and reference count assertions performed
			by the <span class="type">GSignal</span> code, reference counts should always be incremented
			for reference counted contents stored in the value-&gt;data array.
			To deviate from our string example for a moment, and taking a look
			at an exemplary implementation for <tt class="function">collect_value()</tt> of <a href="gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a>:
<pre class="programlisting">
{
  if (collect_values[0].v_pointer)
    {
      GObject *object = G_OBJECT (collect_values[0].v_pointer);

      /* never honour G_VALUE_NOCOPY_CONTENTS for ref-counted types */
      value-&gt;data[0].v_pointer = g_object_ref (object);
      return NULL;
    }
  else
    return g_strdup_printf ("Object passed as invalid NULL pointer");
}
</pre>
			The reference count for valid objects is always incremented,
			regardless of <i class="parameter"><tt>collect_flags</tt></i>. For invalid objects, the example
			returns a newly allocated string without altering <i class="parameter"><tt>value</tt></i>.
			Upon success, <tt class="function">collect_value()</tt> needs to return <tt class="literal">NULL</tt>, if however
			a malicious condition occurred, <tt class="function">collect_value()</tt> may spew an
			error by returning a newly allocated non-<tt class="literal">NULL</tt> string, giving
			a suitable description of the error condition.
			The calling code makes no assumptions about the <i class="parameter"><tt>value</tt></i>
			contents being valid upon error returns, <i class="parameter"><tt>value</tt></i>
			is simply thrown away without further freeing. As such, it is
			a good idea to not allocate <a href="gobject-Generic-values.html#GValue"><span class="type">GValue</span></a> contents, prior to returning
			an error, however, <tt class="function">collect_values()</tt> is not obliged to return
			a correctly setup <i class="parameter"><tt>value</tt></i> for error returns, simply because
			any non-<tt class="literal">NULL</tt> return is considered a fatal condition so further
			program behaviour is undefined.
</td></tr><tr><td><span class="term"><a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *<i class="structfield"><tt>lcopy_format</tt></i></span></td><td>		Format description of the arguments to collect for <i class="parameter"><tt>lcopy_value</tt></i>,
			analogous to <i class="parameter"><tt>collect_format</tt></i>. Usually, <i class="parameter"><tt>lcopy_format</tt></i> string consists
			only of 'p's to provide <tt class="function">lcopy_value()</tt> with pointers to storage locations.
</td></tr><tr><td><span class="term"><a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a>* (*<i class="structfield"><tt>lcopy_value</tt></i>) (const GValue *value,
				  guint         n_collect_values,
				  GTypeCValue  *collect_values,
				  guint		collect_flags)</span></td><td>		This function is responsible for storing the <i class="parameter"><tt>value</tt></i> contents into
			arguments passed through a variable argument list which got
			collected into <i class="parameter"><tt>collect_values</tt></i> according to <i class="parameter"><tt>lcopy_format</tt></i>.
			<i class="parameter"><tt>n_collect_values</tt></i> equals the string length of <i class="parameter"><tt>lcopy_format</tt></i>,
			and <i class="parameter"><tt>collect_flags</tt></i> may contain <span class="type">G_VALUE_NOCOPY_CONTENTS</span>.
			In contrast to <tt class="function">collect_value()</tt>, <tt class="function">lcopy_value()</tt> is obliged to
			always properly support <span class="type">G_VALUE_NOCOPY_CONTENTS</span>.
			Similar to <tt class="function">collect_value()</tt> the function may prematurely abort
			by returning a newly allocated string describing an error condition.
			To complete the string example:
<pre class="programlisting">
{
  gchar **string_p = collect_values[0].v_pointer;

  if (!string_p)
    return g_strdup_printf ("string location passed as NULL");

  if (collect_flags &amp; G_VALUE_NOCOPY_CONTENTS)
    *string_p = value-&gt;data[0].v_pointer;
  else
    *string_p = g_strdup (value-&gt;data[0].v_pointer);

}
</pre>
			And an exemplary version of <tt class="function">lcopy_value()</tt> for
			reference-counted types:
<pre class="programlisting">
{
  GObject **object_p = collect_values[0].v_pointer;

  if (!object_p)
    return g_strdup_printf ("object location passed as NULL");
  if (!value-&gt;data[0].v_pointer)
    *object_p = NULL;
  else if (collect_flags &amp; G_VALUE_NOCOPY_CONTENTS) /* always honour */
    *object_p = value-&gt;data[0].v_pointer;
  else
    *object_p = g_object_ref (value-&gt;data[0].v_pointer);
  return NULL;
}
</pre>

</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2753800"></a><h3><a name="G-TYPE-FROM-INSTANCE-CAPS"></a>G_TYPE_FROM_INSTANCE()</h3><a class="indexterm" name="id2753811"></a><pre class="programlisting">#define G_TYPE_FROM_INSTANCE(instance)                          (G_TYPE_FROM_CLASS (((GTypeInstance*) (instance))-&gt;g_class))
</pre><p>
Returns the type identifier from a given <i class="parameter"><tt>instance</tt></i> structure. 
</p><p>
</p><p>
This macro should only be used in type implementations.
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>instance</tt></i> :</span></td><td>Location of a valid <a href="gobject-Type-Information.html#GTypeInstance"><span class="type">GTypeInstance</span></a> structure.


</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2753868"></a><h3><a name="G-TYPE-FROM-CLASS-CAPS"></a>G_TYPE_FROM_CLASS()</h3><a class="indexterm" name="id2753880"></a><pre class="programlisting">#define G_TYPE_FROM_CLASS(g_class)                              (((GTypeClass*) (g_class))-&gt;g_type)
</pre><p>
Returns the type identifier from a given <i class="parameter"><tt>class</tt></i> structure.
</p><p>
</p><p>
This macro should only be used in type implementations.
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>g_class</tt></i> :</span></td><td>Location of a valid <a href="gobject-Type-Information.html#GTypeClass"><span class="type">GTypeClass</span></a> structure.


</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2753935"></a><h3><a name="G-TYPE-FROM-INTERFACE-CAPS"></a>G_TYPE_FROM_INTERFACE()</h3><a class="indexterm" name="id2753946"></a><pre class="programlisting">#define G_TYPE_FROM_INTERFACE(g_iface)                          (((GTypeInterface*) (g_iface))-&gt;g_type)
</pre><p>
Returns the type identifier from a given <i class="parameter"><tt>interface</tt></i> structure.
</p><p>
</p><p>
This macro should only be used in type implementations.
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>g_iface</tt></i> :</span></td><td>Location of a valid <a href="gobject-Type-Information.html#GTypeInterface"><span class="type">GTypeInterface</span></a> structure.


</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2754002"></a><h3><a name="G-TYPE-INSTANCE-GET-CLASS-CAPS"></a>G_TYPE_INSTANCE_GET_CLASS()</h3><a class="indexterm" name="id2754015"></a><pre class="programlisting">#define G_TYPE_INSTANCE_GET_CLASS(instance, g_type, c_type)     (_G_TYPE_IGC ((instance), (g_type), c_type))
</pre><p>
Returns the class structure of a given <i class="parameter"><tt>instance</tt></i>, casted
to a specified anchestor type <i class="parameter"><tt>g_type</tt></i> of the instance.
</p><p>
</p><p>
This macro should only be used in type implementations.
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>instance</tt></i> :</span></td><td>	Location of the <a href="gobject-Type-Information.html#GTypeInstance"><span class="type">GTypeInstance</span></a> structure.
</td></tr><tr><td><span class="term"><i class="parameter"><tt>g_type</tt></i> :</span></td><td>	The anchestor type of the class to be returned.
</td></tr><tr><td><span class="term"><i class="parameter"><tt>c_type</tt></i> :</span></td><td>	The corresponding C type of <i class="parameter"><tt>g_type</tt></i>.


</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2754110"></a><h3><a name="G-TYPE-INSTANCE-GET-INTERFACE-CAPS"></a>G_TYPE_INSTANCE_GET_INTERFACE()</h3><a class="indexterm" name="id2754122"></a><pre class="programlisting">#define G_TYPE_INSTANCE_GET_INTERFACE(instance, g_type, c_type) (_G_TYPE_IGI ((instance), (g_type), c_type))
</pre><p>
Returns the interface structure for interface <i class="parameter"><tt>g_type</tt></i> of a given <i class="parameter"><tt>instance</tt></i>.
</p><p>
</p><p>
This macro should only be used in type implementations.
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>instance</tt></i> :</span></td><td>Location of the <a href="gobject-Type-Information.html#GTypeInstance"><span class="type">GTypeInstance</span></a> structure.
</td></tr><tr><td><span class="term"><i class="parameter"><tt>g_type</tt></i> :</span></td><td>The interface type to be returned.
</td></tr><tr><td><span class="term"><i class="parameter"><tt>c_type</tt></i> :</span></td><td>The corresponding C type of <i class="parameter"><tt>g_type</tt></i>.


</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2754217"></a><h3><a name="G-TYPE-INSTANCE-GET-PRIVATE-CAPS"></a>G_TYPE_INSTANCE_GET_PRIVATE()</h3><a class="indexterm" name="id2754228"></a><pre class="programlisting">#define G_TYPE_INSTANCE_GET_PRIVATE(instance, g_type, c_type)   ((c_type*) g_type_instance_get_private ((GTypeInstance*) (instance), (g_type)))
</pre><p>
Gets the private structure for a particular type.
The private structure must have been registered in the
class_init function with <a href="gobject-Type-Information.html#g-type-class-add-private"><tt class="function">g_type_class_add_private()</tt></a>.
</p><p>
This macro should only be used in type implementations.
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>instance</tt></i> :</span></td><td>the instance of a type deriving from <i class="parameter"><tt>private_type</tt></i>.
</td></tr><tr><td><span class="term"><i class="parameter"><tt>g_type</tt></i> :</span></td><td>the type identifying which private data to retrieve.
</td></tr><tr><td><span class="term"><i class="parameter"><tt>c_type</tt></i> :</span></td><td>The C type for the private structure.


</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2754316"></a><h3><a name="G-TYPE-CHECK-INSTANCE-CAPS"></a>G_TYPE_CHECK_INSTANCE()</h3><a class="indexterm" name="id2754327"></a><pre class="programlisting">#define G_TYPE_CHECK_INSTANCE(instance)				(_G_TYPE_CHI ((GTypeInstance*) (instance)))
</pre><p>
Returns <tt class="literal">TRUE</tt> if <i class="parameter"><tt>instance</tt></i> is a valid <a href="gobject-Type-Information.html#GTypeInstance"><span class="type">GTypeInstance</span></a> structure,
otherwise emits a warning and returns <tt class="literal">FALSE</tt>.
</p><p>
</p><p>
This macro should only be used in type implementations.
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>instance</tt></i> :</span></td><td>Location of a <a href="gobject-Type-Information.html#GTypeInstance"><span class="type">GTypeInstance</span></a> structure.


</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2754402"></a><h3><a name="G-TYPE-CHECK-INSTANCE-CAST-CAPS"></a>G_TYPE_CHECK_INSTANCE_CAST()</h3><a class="indexterm" name="id2754414"></a><pre class="programlisting">#define G_TYPE_CHECK_INSTANCE_CAST(instance, g_type, c_type)    (_G_TYPE_CIC ((instance), (g_type), c_type))
</pre><p>
Checks that <i class="parameter"><tt>instance</tt></i> is an instance of the type identified by <i class="parameter"><tt>g_type</tt></i>
and emits a warning if this is not the case. Returns <i class="parameter"><tt>instance</tt></i> casted 
to a pointer to <i class="parameter"><tt>c_type</tt></i>.
</p><p>
This macro should only be used in type implementations.
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>instance</tt></i> :</span></td><td>Location of a <a href="gobject-Type-Information.html#GTypeInstance"><span class="type">GTypeInstance</span></a> structure.
</td></tr><tr><td><span class="term"><i class="parameter"><tt>g_type</tt></i> :</span></td><td>The type to be returned.
</td></tr><tr><td><span class="term"><i class="parameter"><tt>c_type</tt></i> :</span></td><td>The corresponding C type of <i class="parameter"><tt>g_type</tt></i>.


</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2754521"></a><h3><a name="G-TYPE-CHECK-INSTANCE-TYPE-CAPS"></a>G_TYPE_CHECK_INSTANCE_TYPE()</h3><a class="indexterm" name="id2754533"></a><pre class="programlisting">#define G_TYPE_CHECK_INSTANCE_TYPE(instance, g_type)            (_G_TYPE_CIT ((instance), (g_type)))
</pre><p>
Returns <tt class="literal">TRUE</tt> if <i class="parameter"><tt>instance</tt></i> is an instance of the type identified by <i class="parameter"><tt>g_type</tt></i>.
Otherwise emits a warning and returns <tt class="literal">FALSE</tt>.
</p><p>
This macro should only be used in type implementations.
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>instance</tt></i> :</span></td><td>Location of a <a href="gobject-Type-Information.html#GTypeInstance"><span class="type">GTypeInstance</span></a> structure.
</td></tr><tr><td><span class="term"><i class="parameter"><tt>g_type</tt></i> :</span></td><td>The type to be checked


</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2754620"></a><h3><a name="G-TYPE-CHECK-CLASS-CAST-CAPS"></a>G_TYPE_CHECK_CLASS_CAST()</h3><a class="indexterm" name="id2754632"></a><pre class="programlisting">#define G_TYPE_CHECK_CLASS_CAST(g_class, g_type, c_type)        (_G_TYPE_CCC ((g_class), (g_type), c_type))
</pre><p>
Checks that <i class="parameter"><tt>g_class</tt></i> is a class structure of the type identified by <i class="parameter"><tt>g_type</tt></i>
and emits a warning if this is not the case. Returns <i class="parameter"><tt>g_class</tt></i> casted 
to a pointer to <i class="parameter"><tt>c_type</tt></i>.
</p><p>
This macro should only be used in type implementations.
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>g_class</tt></i> :</span></td><td>Location of a <a href="gobject-Type-Information.html#GTypeClass"><span class="type">GTypeClass</span></a> structure.
</td></tr><tr><td><span class="term"><i class="parameter"><tt>g_type</tt></i> :</span></td><td>The type to be returned.
</td></tr><tr><td><span class="term"><i class="parameter"><tt>c_type</tt></i> :</span></td><td>The corresponding C type of class structure of <i class="parameter"><tt>g_type</tt></i>.


</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2754740"></a><h3><a name="G-TYPE-CHECK-CLASS-TYPE-CAPS"></a>G_TYPE_CHECK_CLASS_TYPE()</h3><a class="indexterm" name="id2754751"></a><pre class="programlisting">#define G_TYPE_CHECK_CLASS_TYPE(g_class, g_type)                (_G_TYPE_CCT ((g_class), (g_type)))
</pre><p>
Returns <tt class="literal">TRUE</tt> if <i class="parameter"><tt>g_class</tt></i> is a class structure of the type identified by 
<i class="parameter"><tt>g_type</tt></i>. Otherwise emits a warning and returns <tt class="literal">FALSE</tt>.
</p><p>
This macro should only be used in type implementations.
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>g_class</tt></i> :</span></td><td>Location of a <a href="gobject-Type-Information.html#GTypeClass"><span class="type">GTypeClass</span></a> structure.
</td></tr><tr><td><span class="term"><i class="parameter"><tt>g_type</tt></i> :</span></td><td>The type to be checked.


</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2754838"></a><h3><a name="G-TYPE-CHECK-VALUE-CAPS"></a>G_TYPE_CHECK_VALUE()</h3><a class="indexterm" name="id2754849"></a><pre class="programlisting">#define G_TYPE_CHECK_VALUE(value)				(_G_TYPE_CHV ((value)))
</pre><p>
Returns <tt class="literal">TRUE</tt> if <i class="parameter"><tt>value</tt></i> has been initialized to hold values
of a value type.
</p><p>
This macro should only be used in type implementations.
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>value</tt></i> :</span></td><td>a <a href="gobject-Generic-values.html#GValue"><span class="type">GValue</span></a>


</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2754907"></a><h3><a name="G-TYPE-CHECK-VALUE-TYPE-CAPS"></a>G_TYPE_CHECK_VALUE_TYPE()</h3><a class="indexterm" name="id2754919"></a><pre class="programlisting">#define G_TYPE_CHECK_VALUE_TYPE(value, g_type)			(_G_TYPE_CVH ((value), (g_type)))
</pre><p>
Returns <tt class="literal">TRUE</tt> if <i class="parameter"><tt>value</tt></i> has been initialized to hold values
of type <i class="parameter"><tt>g_type</tt></i>. 
</p><p>
This macro should only be used in type implementations.
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>value</tt></i> :</span></td><td>a <a href="gobject-Generic-values.html#GValue"><span class="type">GValue</span></a>
</td></tr><tr><td><span class="term"><i class="parameter"><tt>g_type</tt></i> :</span></td><td>The type to be checked.


</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2754998"></a><h3><a name="G-TYPE-FLAG-RESERVED-ID-BIT-CAPS"></a>G_TYPE_FLAG_RESERVED_ID_BIT</h3><a class="indexterm" name="id2755009"></a><pre class="programlisting">#define	G_TYPE_FLAG_RESERVED_ID_BIT	((GType) (1 &lt;&lt; 0))
</pre><p>
A bit in the type number that's supposed to be left untouched.
</p></div><hr><div class="refsect2" lang="en"><a name="id2755027"></a><h3><a name="g-type-init"></a>g_type_init ()</h3><a class="indexterm" name="id2755037"></a><pre class="programlisting">void        g_type_init                     (void);</pre><p>
Prior to any use of the type system, <a href="gobject-Type-Information.html#g-type-init"><tt class="function">g_type_init()</tt></a> has to be called to initialize
the type system and assorted other code portions (such as the various fundamental
type implementations or the signal system).
</p></div><hr><div class="refsect2" lang="en"><a name="id2755072"></a><h3><a name="GTypeDebugFlags"></a>enum GTypeDebugFlags</h3><a class="indexterm" name="id2755083"></a><pre class="programlisting">typedef enum	/*&lt; skip &gt;*/
{
  G_TYPE_DEBUG_NONE	= 0,
  G_TYPE_DEBUG_OBJECTS	= 1 &lt;&lt; 0,
  G_TYPE_DEBUG_SIGNALS	= 1 &lt;&lt; 1,
  G_TYPE_DEBUG_MASK	= 0x03
} GTypeDebugFlags;
</pre><p>
The <span class="type">GTypeDebugFlags</span> enumeration values can be passed to
<a href="gobject-Type-Information.html#g-type-init-with-debug-flags"><tt class="function">g_type_init_with_debug_flags()</tt></a> to trigger debugging messages during runtime.
Note that the messages can also be triggered by setting the
<tt class="envar">GOBJECT_DEBUG</tt> environment variable to a ':'-separated list of 
"objects" and "signals".

</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><tt class="literal">G_TYPE_DEBUG_NONE</tt></span></td><td>Print no messages.
</td></tr><tr><td><span class="term"><tt class="literal">G_TYPE_DEBUG_OBJECTS</tt></span></td><td>Print messages about object bookkeeping.
</td></tr><tr><td><span class="term"><tt class="literal">G_TYPE_DEBUG_SIGNALS</tt></span></td><td>Print messages about signal emissions.
</td></tr><tr><td><span class="term"><tt class="literal">G_TYPE_DEBUG_MASK</tt></span></td><td>

</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2755187"></a><h3><a name="g-type-init-with-debug-flags"></a>g_type_init_with_debug_flags ()</h3><a class="indexterm" name="id2755198"></a><pre class="programlisting">void        g_type_init_with_debug_flags    (<a href="gobject-Type-Information.html#GTypeDebugFlags">GTypeDebugFlags</a> debug_flags);</pre><p>
Similar to <a href="gobject-Type-Information.html#g-type-init"><tt class="function">g_type_init()</tt></a>, but additionally sets debug flags.
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>debug_flags</tt></i> :</span></td><td>Bitwise combination of <a href="gobject-Type-Information.html#GTypeDebugFlags"><span class="type">GTypeDebugFlags</span></a> values for debugging purposes.


</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2755266"></a><h3><a name="g-type-name"></a>g_type_name ()</h3><a class="indexterm" name="id2755276"></a><pre class="programlisting">G_CONST_RETURN <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a>* g_type_name           (<a href="gobject-Type-Information.html#GType">GType</a> type);</pre><p>
Returns the unique name that is assigned to a type ID (this is the preferred method
to find out whether a specific type has been registered for the passed in ID yet).
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>type</tt></i> :</span></td><td>		Type to return name for.
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>	Static type name or <tt class="literal">NULL</tt>.


</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2755343"></a><h3><a name="g-type-qname"></a>g_type_qname ()</h3><a class="indexterm" name="id2755354"></a><pre class="programlisting"><a
href="../glib/glib-Quarks.html#GQuark"
>GQuark</a>      g_type_qname                    (<a href="gobject-Type-Information.html#GType">GType</a> type);</pre><p>
Return the corresponding quark of the type IDs name.
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>type</tt></i> :</span></td><td>   Type to return quark of type name for.
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>The type names quark or 0.


</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2755412"></a><h3><a name="g-type-from-name"></a>g_type_from_name ()</h3><a class="indexterm" name="id2755422"></a><pre class="programlisting"><a href="gobject-Type-Information.html#GType">GType</a>       g_type_from_name                (const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *name);</pre><p>
Lookup the type ID from a given type name, returns 0 if no type has been registered under this name
(this is the preferred method to find out by name whether a specific type has been registered yet).
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>name</tt></i> :</span></td><td>   Type name to lookup.
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>Corresponding type ID or 0.


</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2755483"></a><h3><a name="g-type-parent"></a>g_type_parent ()</h3><a class="indexterm" name="id2755494"></a><pre class="programlisting"><a href="gobject-Type-Information.html#GType">GType</a>       g_type_parent                   (<a href="gobject-Type-Information.html#GType">GType</a> type);</pre><p>
Return the direct parent type of the passed in type.
If the passed in type has no parent, i.e. is a fundamental type, 0 is returned.
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>type</tt></i> :</span></td><td>   The derived type.
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>The parent type.


</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2755553"></a><h3><a name="g-type-depth"></a>g_type_depth ()</h3><a class="indexterm" name="id2755564"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#guint"
>guint</a>       g_type_depth                    (<a href="gobject-Type-Information.html#GType">GType</a> type);</pre><p>
Returns the length of the ancestry of the passed in type. This includes the
type itself, so that e.g. a fundamental type has depth 1.
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>type</tt></i> :</span></td><td>   A <a href="gobject-Type-Information.html#GType"><span class="type">GType</span></a> value.
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>The depth of <i class="parameter"><tt>type</tt></i>.


</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2755636"></a><h3><a name="g-type-next-base"></a>g_type_next_base ()</h3><a class="indexterm" name="id2755647"></a><pre class="programlisting"><a href="gobject-Type-Information.html#GType">GType</a>       g_type_next_base                (<a href="gobject-Type-Information.html#GType">GType</a> leaf_type,
                                             <a href="gobject-Type-Information.html#GType">GType</a> root_type);</pre><p>
Given a <i class="parameter"><tt>leaf_type</tt></i> and a <i class="parameter"><tt>root_type</tt></i> which is contained in its anchestry, return
the type that <i class="parameter"><tt>root_type</tt></i> is the immediate parent of.
In other words, this function determines the type that is derived directly from
<i class="parameter"><tt>root_type</tt></i> which is also a base class of <i class="parameter"><tt>leaf_type</tt></i>.  Given a root type and a
leaf type, this function can be used to determine the types and order in which
the leaf type is descended from the root type.
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>leaf_type</tt></i> :</span></td><td>	Descendant of <i class="parameter"><tt>root_type</tt></i> and the type to be returned.
</td></tr><tr><td><span class="term"><i class="parameter"><tt>root_type</tt></i> :</span></td><td>	Immediate parent of the returned type.
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>	Immediate child of <i class="parameter"><tt>root_type</tt></i> and anchestor of <i class="parameter"><tt>leaf_type</tt></i>.


</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2755780"></a><h3><a name="g-type-is-a"></a>g_type_is_a ()</h3><a class="indexterm" name="id2755790"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a>    g_type_is_a                     (<a href="gobject-Type-Information.html#GType">GType</a> type,
                                             <a href="gobject-Type-Information.html#GType">GType</a> is_a_type);</pre><p>
If <i class="parameter"><tt>is_a_type</tt></i> is a derivable type, check whether <i class="parameter"><tt>type</tt></i> is a descendant of <i class="parameter"><tt>is_a_type</tt></i>.
If <i class="parameter"><tt>is_a_type</tt></i> is an interface, check whether <i class="parameter"><tt>type</tt></i> conforms to it.
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>type</tt></i> :</span></td><td>     Type to check anchestry for.
</td></tr><tr><td><span class="term"><i class="parameter"><tt>is_a_type</tt></i> :</span></td><td>Possible anchestor of <i class="parameter"><tt>type</tt></i> or interface <i class="parameter"><tt>type</tt></i> could conform to.
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>  <tt class="literal">TRUE</tt> if <i class="parameter"><tt>type</tt></i> is_a <i class="parameter"><tt>is_a_type</tt></i> holds true.


</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2755930"></a><h3><a name="g-type-class-ref"></a>g_type_class_ref ()</h3><a class="indexterm" name="id2755941"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a>    g_type_class_ref                (<a href="gobject-Type-Information.html#GType">GType</a> type);</pre><p>
Increments the reference count of the class structure belonging to
<i class="parameter"><tt>type</tt></i>. This function will demand-create the class if it doesn't
exist already.
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>type</tt></i> :</span></td><td>	  Type ID of a classed type.
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>The <a href="gobject-Type-Information.html#GTypeClass"><span class="type">GTypeClass</span></a> structure for the given type ID.


</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2756014"></a><h3><a name="g-type-class-peek"></a>g_type_class_peek ()</h3><a class="indexterm" name="id2756026"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a>    g_type_class_peek               (<a href="gobject-Type-Information.html#GType">GType</a> type);</pre><p>
This function is essentially the same as <a href="gobject-Type-Information.html#g-type-class-ref"><tt class="function">g_type_class_ref()</tt></a>, except that
the classes reference count isn't incremented. Therefore, this function
may return <tt class="literal">NULL</tt> if the class of the type passed in does not currently
exist (hasn't been referenced before).
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>type</tt></i> :</span></td><td>		Type ID of a classed type.
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>	The <a href="gobject-Type-Information.html#GTypeClass"><span class="type">GTypeClass</span></a> structure for the given type ID or <tt class="literal">NULL</tt>
		if the class does not currently exist.


</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2756118"></a><h3><a name="g-type-class-peek-static"></a>g_type_class_peek_static ()</h3><a class="indexterm" name="id2756129"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a>    g_type_class_peek_static        (<a href="gobject-Type-Information.html#GType">GType</a> type);</pre><p>
A more efficient version of <a href="gobject-Type-Information.html#g-type-class-peek"><tt class="function">g_type_class_peek()</tt></a> which works only for
static types.
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>type</tt></i> :</span></td><td>Type ID of a classed type.
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>The <a href="gobject-Type-Information.html#GTypeClass"><span class="type">GTypeClass</span></a> structure for the given type ID or <tt class="literal">NULL</tt>
   if the class does not currently exist or is dynamically loaded.
</td></tr></tbody></table></div><p>Since 2.4


</p></div><hr><div class="refsect2" lang="en"><a name="id2756218"></a><h3><a name="g-type-class-unref"></a>g_type_class_unref ()</h3><a class="indexterm" name="id2756229"></a><pre class="programlisting">void        g_type_class_unref              (<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> g_class);</pre><p>
Decrements the reference count of the class structure being passed in.
Once the last reference count of a class has been released, classes
may be finalized by the type system, so further dereferencing of a
class pointer after <a href="gobject-Type-Information.html#g-type-class-unref"><tt class="function">g_type_class_unref()</tt></a> are invalid.
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>g_class</tt></i> :</span></td><td>	The <a href="gobject-Type-Information.html#GTypeClass"><span class="type">GTypeClass</span></a> structure to unreference.


</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2756298"></a><h3><a name="g-type-class-peek-parent"></a>g_type_class_peek_parent ()</h3><a class="indexterm" name="id2756309"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a>    g_type_class_peek_parent        (<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> g_class);</pre><p>
This is a convenience function, often needed in class initializers.
It essentially takes the immediate parent type of the class passed in,
and returns the class structure thereof. Since derived classes hold
a reference count on their parent classes as long as they are instantiated,
the returned class will always exist. This function is essentially
equivalent to:

</p><pre class="programlisting">
g_type_class_peek (g_type_parent (G_TYPE_FROM_CLASS (g_class)));
</pre><p>

</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>g_class</tt></i> :</span></td><td>The <a href="gobject-Type-Information.html#GTypeClass"><span class="type">GTypeClass</span></a> structure to retrieve the parent class for.
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>The parent class of <i class="parameter"><tt>g_class</tt></i>.


</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2756393"></a><h3><a name="g-type-class-add-private"></a>g_type_class_add_private ()</h3><a class="indexterm" name="id2756404"></a><pre class="programlisting">void        g_type_class_add_private        (<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> g_class,
                                             <a
href="../glib/glib-Basic-Types.html#gsize"
>gsize</a> private_size);</pre><p>
Registers a private structure for a instantiatable type;
when an object is allocated, the private structures for
the type and and all of its parent types are allocated
sequentially in the same memory block as the public
structures. This function should be called in the
type's <tt class="function">class_init()</tt> function. The private structure can
be retrieved using the <a href="gobject-Type-Information.html#G-TYPE-INSTANCE-GET-PRIVATE-CAPS"><tt class="function">G_TYPE_INSTANCE_GET_PRIVATE()</tt></a> macro.
The following example shows attaching a private structure
<span class="structname">MyObjectPrivate</span> to an object
<span class="structname">MyObject</span> defined in the standard GObject
fashion.
</p><pre class="programlisting">
typedef struct _MyObjectPrivate MyObjectPrivate;

struct _MyObjectPrivate {
  int some_field;
};

#define MY_OBJECT_GET_PRIVATE(o)  \
   (G_TYPE_INSTANCE_GET_PRIVATE ((o), MY_TYPE_OBJECT, MyObjectPrivate))

static void
my_object_class_init (MyObjectClass *klass)
{
  g_type_class_add_private (klass, sizeof (MyObjectPrivate));
}

static int
my_object_get_some_field (MyObject *my_object)
{
  MyObjectPrivate *priv = MY_OBJECT_GET_PRIVATE (my_object);

  return priv-&gt;some_field;
}
</pre><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>g_class</tt></i> :</span></td><td>class structure for an instantiatable type
</td></tr><tr><td><span class="term"><i class="parameter"><tt>private_size</tt></i> :</span></td><td>size of private structure.


</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2756524"></a><h3><a name="g-type-interface-peek"></a>g_type_interface_peek ()</h3><a class="indexterm" name="id2756539"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a>    g_type_interface_peek           (<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> instance_class,
                                             <a href="gobject-Type-Information.html#GType">GType</a> iface_type);</pre><p>
Returns the <a href="gobject-Type-Information.html#GTypeInterface"><span class="type">GTypeInterface</span></a> structure of an interface to which the passed in 
class conforms.
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>instance_class</tt></i> :</span></td><td>A <a href="gobject-Type-Information.html#GTypeClass"><span class="type">GTypeClass</span></a> structure.
</td></tr><tr><td><span class="term"><i class="parameter"><tt>iface_type</tt></i> :</span></td><td>    An interface ID which this class conforms to.
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>       The <a href="gobject-Type-Information.html#GTypeInterface"><span class="type">GTypeInterface</span></a> structure of <i class="parameter"><tt>iface_type</tt></i>, or <tt class="literal">NULL</tt> if the
                 class is not instantiated.


</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2756656"></a><h3><a name="g-type-interface-peek-parent"></a>g_type_interface_peek_parent ()</h3><a class="indexterm" name="id2756667"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a>    g_type_interface_peek_parent    (<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> g_iface);</pre><p>
Returns the corresponding <a href="gobject-Type-Information.html#GTypeInterface"><span class="type">GTypeInterface</span></a> structure of the parent type
of the instance type to which <i class="parameter"><tt>g_iface</tt></i> belongs. This is useful when 
deriving the implementation of an interface from the parent type and 
then possibly overriding some methods. 
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>g_iface</tt></i> :</span></td><td>A <a href="gobject-Type-Information.html#GTypeInterface"><span class="type">GTypeInterface</span></a> structure.
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>The corresponding <a href="gobject-Type-Information.html#GTypeInterface"><span class="type">GTypeInterface</span></a> structure of the parent type
   of the instance type to which <i class="parameter"><tt>g_iface</tt></i> belongs, or <tt class="literal">NULL</tt> if the parent type
   doesn't conform to the interface.


</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2756772"></a><h3><a name="g-type-default-interface-ref"></a>g_type_default_interface_ref ()</h3><a class="indexterm" name="id2756784"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a>    g_type_default_interface_ref    (<a href="gobject-Type-Information.html#GType">GType</a> g_type);</pre><p>
Increments the reference count for the interface type <i class="parameter"><tt>g_type</tt></i>,
and returns the default interface vtable for the type.
</p><p>  
If the type is not currently in use, then the default vtable
for the type will be created and initalized by calling
the base interface init and default vtable init functions for
the type (the @<i class="structfield"><tt>base_init</tt></i>
and <i class="structfield"><tt>class_init</tt></i> members of <a href="gobject-Type-Information.html#GTypeInfo"><span class="type">GTypeInfo</span></a>).
Calling <a href="gobject-Type-Information.html#g-type-default-interface-ref"><tt class="function">g_type_default_interface_ref()</tt></a> is useful when you
want to make sure that signals and properties for an interface
have been installed.
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>g_type</tt></i> :</span></td><td>an interface type
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the default vtable for the interface; call 
 <a href="gobject-Type-Information.html#g-type-default-interface-unref"><tt class="function">g_type_default_interface_unref()</tt></a> when you are done using
 the interface.
</td></tr></tbody></table></div><p>Since 2.4


</p></div><hr><div class="refsect2" lang="en"><a name="id2756901"></a><h3><a name="g-type-default-interface-peek"></a>g_type_default_interface_peek ()</h3><a class="indexterm" name="id2756913"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a>    g_type_default_interface_peek   (<a href="gobject-Type-Information.html#GType">GType</a> g_type);</pre><p>
If the interface type <i class="parameter"><tt>g_type</tt></i> is currently in use, returns
its default interface vtable.    
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>g_type</tt></i> :</span></td><td>an interface type
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the default vtable for the interface; or <tt class="literal">NULL</tt>
 if the type is not currently in use.
</td></tr></tbody></table></div><p>Since 2.4


</p></div><hr><div class="refsect2" lang="en"><a name="id2756989"></a><h3><a name="g-type-default-interface-unref"></a>g_type_default_interface_unref ()</h3><a class="indexterm" name="id2757000"></a><pre class="programlisting">void        g_type_default_interface_unref  (<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> g_iface);</pre><p>
Decrements the reference count for the type corresponding to the
interface default vtable <i class="parameter"><tt>g_iface</tt></i>. If the type is dynamic, then
when no one is using the interface and all references have
been released, the finalize function for the interface's default
vtable (the <i class="structfield"><tt>class_finalize</tt></i> member of
<a href="gobject-Type-Information.html#GTypeInfo"><span class="type">GTypeInfo</span></a>) will be called.
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>g_iface</tt></i> :</span></td><td>the default vtable structure for a interface, as
  returned by <a href="gobject-Type-Information.html#g-type-default-interface-ref"><tt class="function">g_type_default_interface_ref()</tt></a>
</td></tr></tbody></table></div><p>Since 2.4


</p></div><hr><div class="refsect2" lang="en"><a name="id2757086"></a><h3><a name="g-type-children"></a>g_type_children ()</h3><a class="indexterm" name="id2757096"></a><pre class="programlisting"><a href="gobject-Type-Information.html#GType">GType</a>*      g_type_children                 (<a href="gobject-Type-Information.html#GType">GType</a> type,
                                             <a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> *n_children);</pre><p>
Return a newly allocated and 0-terminated array of type IDs, listing the
child types of <i class="parameter"><tt>type</tt></i>. The return value has to be <a
href="../glib/glib-Memory-Allocation.html#g-free"
><tt class="function">g_free()</tt></a>ed after use.
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>type</tt></i> :</span></td><td>      The parent type.
</td></tr><tr><td><span class="term"><i class="parameter"><tt>n_children</tt></i> :</span></td><td>Optional <a
href="../glib/glib-Basic-Types.html#guint"
><span class="type">guint</span></a> pointer to contain the number of child types.
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>   Newly allocated and 0-terminated array of child types.


</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2757204"></a><h3><a name="g-type-interfaces"></a>g_type_interfaces ()</h3><a class="indexterm" name="id2757215"></a><pre class="programlisting"><a href="gobject-Type-Information.html#GType">GType</a>*      g_type_interfaces               (<a href="gobject-Type-Information.html#GType">GType</a> type,
                                             <a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> *n_interfaces);</pre><p>
Return a newly allocated and 0-terminated array of type IDs, listing the
interface types that <i class="parameter"><tt>type</tt></i> conforms to. The return value has to be
<a
href="../glib/glib-Memory-Allocation.html#g-free"
><tt class="function">g_free()</tt></a>ed after use.
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>type</tt></i> :</span></td><td>        The type to list interface types for.
</td></tr><tr><td><span class="term"><i class="parameter"><tt>n_interfaces</tt></i> :</span></td><td>Optional <a
href="../glib/glib-Basic-Types.html#guint"
><span class="type">guint</span></a> pointer to contain the number of interface types.
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>     Newly allocated and 0-terminated array of interface types.


</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2757321"></a><h3><a name="g-type-interface-prerequisites"></a>g_type_interface_prerequisites ()</h3><a class="indexterm" name="id2757333"></a><pre class="programlisting"><a href="gobject-Type-Information.html#GType">GType</a>*      g_type_interface_prerequisites  (<a href="gobject-Type-Information.html#GType">GType</a> interface_type,
                                             <a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> *n_prerequisites);</pre><p>
Returns the prerequisites of an interfaces type.
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>interface_type</tt></i> :</span></td><td>an interface type
</td></tr><tr><td><span class="term"><i class="parameter"><tt>n_prerequisites</tt></i> :</span></td><td>location to return the number of prerequisites, or <tt class="literal">NULL</tt>
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>a newly-allocated zero-terminated array of <a href="gobject-Type-Information.html#GType"><span class="type">GType</span></a> containing 
   the prerequisites of <i class="parameter"><tt>interface_type</tt></i>
</td></tr></tbody></table></div><p>Since 2.2


</p></div><hr><div class="refsect2" lang="en"><a name="id2757438"></a><h3><a name="g-type-set-qdata"></a>g_type_set_qdata ()</h3><a class="indexterm" name="id2757449"></a><pre class="programlisting">void        g_type_set_qdata                (<a href="gobject-Type-Information.html#GType">GType</a> type,
                                             <a
href="../glib/glib-Quarks.html#GQuark"
>GQuark</a> quark,
                                             <a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> data);</pre><p>
Attaches arbitrary data to a type.
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>type</tt></i> :</span></td><td>a <a href="gobject-Type-Information.html#GType"><span class="type">GType</span></a>
</td></tr><tr><td><span class="term"><i class="parameter"><tt>quark</tt></i> :</span></td><td>a <a
href="../glib/glib-Quarks.html#GQuark"
><span class="type">GQuark</span></a> id to identify the data
</td></tr><tr><td><span class="term"><i class="parameter"><tt>data</tt></i> :</span></td><td>the data


</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2757554"></a><h3><a name="g-type-get-qdata"></a>g_type_get_qdata ()</h3><a class="indexterm" name="id2757565"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a>    g_type_get_qdata                (<a href="gobject-Type-Information.html#GType">GType</a> type,
                                             <a
href="../glib/glib-Quarks.html#GQuark"
>GQuark</a> quark);</pre><p>
Obtains data which has previously been attached to <i class="parameter"><tt>type</tt></i>
with <a href="gobject-Type-Information.html#g-type-set-qdata"><tt class="function">g_type_set_qdata()</tt></a>.
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>type</tt></i> :</span></td><td>a <a href="gobject-Type-Information.html#GType"><span class="type">GType</span></a>
</td></tr><tr><td><span class="term"><i class="parameter"><tt>quark</tt></i> :</span></td><td>a <a
href="../glib/glib-Quarks.html#GQuark"
><span class="type">GQuark</span></a> id to identify the data
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the data, or <tt class="literal">NULL</tt> if no data was found


</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2757682"></a><h3><a name="g-type-query"></a>g_type_query ()</h3><a class="indexterm" name="id2757692"></a><pre class="programlisting">void        g_type_query                    (<a href="gobject-Type-Information.html#GType">GType</a> type,
                                             <a href="gobject-Type-Information.html#GTypeQuery">GTypeQuery</a> *query);</pre><p>
Queries the type system for information about a specific type. 
This function will fill in a user-provided structure to hold type-specific 
information. If an invalid <a href="gobject-Type-Information.html#GType"><span class="type">GType</span></a> is passed in, the <i class="parameter"><tt>type</tt></i> member of the 
<a href="gobject-Type-Information.html#GTypeQuery"><span class="type">GTypeQuery</span></a> is 0. All members filled into the <a href="gobject-Type-Information.html#GTypeQuery"><span class="type">GTypeQuery</span></a> structure should
be considered constant and have to be left untouched.
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>type</tt></i> :</span></td><td>the <a href="gobject-Type-Information.html#GType"><span class="type">GType</span></a> value of a static, classed type.
</td></tr><tr><td><span class="term"><i class="parameter"><tt>query</tt></i> :</span></td><td>A user provided structure that is filled in with constant values 
        upon success.


</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2757804"></a><h3><a name="GTypeQuery"></a>struct GTypeQuery</h3><a class="indexterm" name="id2757815"></a><pre class="programlisting">struct GTypeQuery {

  GType		type;
  const gchar  *type_name;
  guint		class_size;
  guint		instance_size;
};
</pre><p>
A structure holding information for a specific type. It is
filled in by the <a href="gobject-Type-Information.html#g-type-query"><tt class="function">g_type_query()</tt></a> function.
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><a href="gobject-Type-Information.html#GType">GType</a> <i class="structfield"><tt>type</tt></i></span></td><td>the <a href="gobject-Type-Information.html#GType"><span class="type">GType</span></a> value of the type.
</td></tr><tr><td><span class="term">const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *<i class="structfield"><tt>type_name</tt></i></span></td><td>the name of the type.
</td></tr><tr><td><span class="term"><a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> <i class="structfield"><tt>class_size</tt></i></span></td><td>the size of the class structure.
</td></tr><tr><td><span class="term"><a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> <i class="structfield"><tt>instance_size</tt></i></span></td><td>the size of the instance structure.

</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2757934"></a><h3><a name="GBaseInitFunc"></a>GBaseInitFunc ()</h3><a class="indexterm" name="id2757945"></a><pre class="programlisting">void        (*GBaseInitFunc)                (<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> g_class);</pre><p>
A callback function used by the type system to do base initialization
of the class structures of derived types. It is called as part of the
initialization process of all derived classes and should reallocate
or reset all dynamic class members copied over from the parent class.
Therefore class members, e.g. strings, that are not sufficiently
handled by a plain memory copy of the parent class into the derived class
have to be altered. See <a href="gobject-Type-Information.html#GClassInitFunc"><tt class="function">GClassInitFunc()</tt></a> for a discussion of the class
intialization process.
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>g_class</tt></i> :</span></td><td>The <a href="gobject-Type-Information.html#GTypeClass"><span class="type">GTypeClass</span></a> structure to initialize.


</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2691320"></a><h3><a name="GBaseFinalizeFunc"></a>GBaseFinalizeFunc ()</h3><a class="indexterm" name="id2691331"></a><pre class="programlisting">void        (*GBaseFinalizeFunc)            (<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> g_class);</pre><p>
A callback function used by the type system to finalize those portions
of a derived types class structure that were setup from the corresponding
<a href="gobject-Type-Information.html#GBaseInitFunc"><tt class="function">GBaseInitFunc()</tt></a> function. Class finalization basically works the inverse
way in which class intialization is performed.
See <a href="gobject-Type-Information.html#GClassInitFunc"><tt class="function">GClassInitFunc()</tt></a> for a discussion of the class intialization process.
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>g_class</tt></i> :</span></td><td>The <a href="gobject-Type-Information.html#GTypeClass"><span class="type">GTypeClass</span></a> structure to finalize.


</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2691411"></a><h3><a name="GClassInitFunc"></a>GClassInitFunc ()</h3><a class="indexterm" name="id2758257"></a><pre class="programlisting">void        (*GClassInitFunc)               (<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> g_class,
                                             <a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> class_data);</pre><p>
A callback function used by the type system to initialize the class
of a specific type. This function should initialize all static class
members.
The initialization process of a class involves:
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"></span></td><td><p>
	1 - Copying common members from the parent class over to the
	derived class structure.
  </p></td></tr><tr><td><span class="term"></span></td><td><p>
	2 -  Zero initialization of the remaining members not copied
	over from the parent class.
  </p></td></tr><tr><td><span class="term"></span></td><td><p>
	3 - Invocation of the <a href="gobject-Type-Information.html#GBaseInitFunc"><tt class="function">GBaseInitFunc()</tt></a> initializers of all parent
	types and the class' type.
  </p></td></tr><tr><td><span class="term"></span></td><td><p>
	4 - Invocation of the class' <a href="gobject-Type-Information.html#GClassInitFunc"><tt class="function">GClassInitFunc()</tt></a> initializer.
  </p></td></tr></tbody></table></div><p>
Since derived classes are partially initialized through a memory copy
of the parent class, the general rule is that <a href="gobject-Type-Information.html#GBaseInitFunc"><tt class="function">GBaseInitFunc()</tt></a> and
<a href="gobject-Type-Information.html#GBaseFinalizeFunc"><tt class="function">GBaseFinalizeFunc()</tt></a> should take care of necessary reinitialization
and release of those class members that were introduced by the type
that specified these <a href="gobject-Type-Information.html#GBaseInitFunc"><tt class="function">GBaseInitFunc()</tt></a>/<a href="gobject-Type-Information.html#GBaseFinalizeFunc"><tt class="function">GBaseFinalizeFunc()</tt></a>.
<a href="gobject-Type-Information.html#GClassInitFunc"><tt class="function">GClassInitFunc()</tt></a> should only care about initializing static
class members, while dynamic class members (such as allocated strings
or reference counted resources) are better handled by a <a href="gobject-Type-Information.html#GBaseInitFunc"><tt class="function">GBaseInitFunc()</tt></a>
for this type, so proper initialization of the dynamic class members
is performed for class initialization of derived types as well.
An example may help to correspond the intend of the different class
initializers:

</p><pre class="programlisting">
typedef struct {
  GObjectClass parent_class;
  gint         static_integer;
  gchar       *dynamic_string;
} TypeAClass;
static void
type_a_base_class_init (TypeAClass *class)
{
  class-&gt;dynamic_string = g_strdup ("some string");
}
static void
type_a_base_class_finalize (TypeAClass *class)
{
  g_free (class-&gt;dynamic_string);
}
static void
type_a_class_init (TypeAClass *class)
{
  class-&gt;static_integer = 42;
}

typedef struct {
  TypeAClass   parent_class;
  gfloat       static_float;
  GString     *dynamic_gstring;
} TypeBClass;
static void
type_b_base_class_init (TypeBClass *class)
{
  class-&gt;dynamic_gstring = g_string_new ("some other string");
}
static void
type_b_base_class_finalize (TypeBClass *class)
{
  g_string_free (class-&gt;dynamic_gstring);
}
static void
type_b_class_init (TypeBClass *class)
{
  class-&gt;static_float = 3.14159265358979323846;
}
</pre><p>
Initialization of TypeBClass will first cause initialization of
TypeAClass (derived classes reference their parent classes, see
<a href="gobject-Type-Information.html#g-type-class-ref"><tt class="function">g_type_class_ref()</tt></a> on this).
Initialization of TypeAClass roughly involves zero-initializing its fields,
then calling its <a href="gobject-Type-Information.html#GBaseInitFunc"><tt class="function">GBaseInitFunc()</tt></a> <tt class="function">type_a_base_class_init()</tt> that allocates
its dynamic members (dynamic_string) and finally calling its <a href="gobject-Type-Information.html#GClassInitFunc"><tt class="function">GClassInitFunc()</tt></a>
<tt class="function">type_a_class_init()</tt> to initialize its static members (static_integer).
The first step in the initialization process of TypeBClass is then
a plain memory copy of the contents of TypeAClass into TypeBClass and 
zero-initialization of the remaining fields in TypeBClass.
The dynamic members of TypeAClass within TypeBClass now need
reinitialization which is performed by calling <tt class="function">type_a_base_class_init()</tt>
with an argument of TypeBClass.
After that, the <a href="gobject-Type-Information.html#GBaseInitFunc"><tt class="function">GBaseInitFunc()</tt></a> of TypeBClass, <tt class="function">type_b_base_class_init()</tt>
is called to allocate the dynamic members of TypeBClass (dynamic_gstring),
and finally the <a href="gobject-Type-Information.html#GClassInitFunc"><tt class="function">GClassInitFunc()</tt></a> of TypeBClass, <tt class="function">type_b_class_init()</tt>,
is called to complete the initialization process with the static members
(static_float).
Corresponding finalization counter parts to the <a href="gobject-Type-Information.html#GBaseInitFunc"><tt class="function">GBaseInitFunc()</tt></a> functions
have to be provided to release allocated resources at class finalization
time.
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>g_class</tt></i> :</span></td><td>	The <a href="gobject-Type-Information.html#GTypeClass"><span class="type">GTypeClass</span></a> structure to initialize.
</td></tr><tr><td><span class="term"><i class="parameter"><tt>class_data</tt></i> :</span></td><td>	The <i class="parameter"><tt>class_data</tt></i> member supplied via the <a href="gobject-Type-Information.html#GTypeInfo"><span class="type">GTypeInfo</span></a> structure.


</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2758640"></a><h3><a name="GClassFinalizeFunc"></a>GClassFinalizeFunc ()</h3><a class="indexterm" name="id2758651"></a><pre class="programlisting">void        (*GClassFinalizeFunc)           (<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> g_class,
                                             <a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> class_data);</pre><p>
A callback function used by the type system to finalize a class.
This function is rarely needed, as dynamically allocated class resources
should be handled by <a href="gobject-Type-Information.html#GBaseInitFunc"><tt class="function">GBaseInitFunc()</tt></a> and <a href="gobject-Type-Information.html#GBaseFinalizeFunc"><tt class="function">GBaseFinalizeFunc()</tt></a>.
Also, specification of a <a href="gobject-Type-Information.html#GClassFinalizeFunc"><tt class="function">GClassFinalizeFunc()</tt></a> in the <a href="gobject-Type-Information.html#GTypeInfo"><span class="type">GTypeInfo</span></a>
structure of a static type is invalid, because classes of static types
will never be finalized (they are artificially kept alive when their
reference count drops to zero).
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>g_class</tt></i> :</span></td><td>	The <a href="gobject-Type-Information.html#GTypeClass"><span class="type">GTypeClass</span></a> structure to finalize.
</td></tr><tr><td><span class="term"><i class="parameter"><tt>class_data</tt></i> :</span></td><td>	The <i class="parameter"><tt>class_data</tt></i> member supplied via the <a href="gobject-Type-Information.html#GTypeInfo"><span class="type">GTypeInfo</span></a> structure.


</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2758787"></a><h3><a name="GInstanceInitFunc"></a>GInstanceInitFunc ()</h3><a class="indexterm" name="id2758798"></a><pre class="programlisting">void        (*GInstanceInitFunc)            (<a href="gobject-Type-Information.html#GTypeInstance">GTypeInstance</a> *instance,
                                             <a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> g_class);</pre><p>
A callback function used by the type system to initialize a new
instance of a type. This function initializes all instance members and
allocates any resources required by it.
Initialization of a derived instance involves calling all its parent
types instance initializers, therefore the class member of the instance
is altered during its initialization to always point to the class that
belongs to the type the current initializer was introduced for.
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>instance</tt></i> :</span></td><td>	The instance to initialize.
</td></tr><tr><td><span class="term"><i class="parameter"><tt>g_class</tt></i> :</span></td><td>	The class of the type the instance is created for.


</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2758875"></a><h3><a name="GInterfaceInitFunc"></a>GInterfaceInitFunc ()</h3><a class="indexterm" name="id2758886"></a><pre class="programlisting">void        (*GInterfaceInitFunc)           (<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> g_iface,
                                             <a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> iface_data);</pre><p>
A callback function used by the type system to initialize a new
interface.  This function should initialize all internal data and
allocate any resources required by the interface.
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>g_iface</tt></i> :</span></td><td>	The interface structure to initialize.
</td></tr><tr><td><span class="term"><i class="parameter"><tt>iface_data</tt></i> :</span></td><td>	The <i class="parameter"><tt>class_data</tt></i> supplied via the <a href="gobject-Type-Information.html#GTypeInfo"><span class="type">GTypeInfo</span></a> structure.


</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2758971"></a><h3><a name="GInterfaceFinalizeFunc"></a>GInterfaceFinalizeFunc ()</h3><a class="indexterm" name="id2758982"></a><pre class="programlisting">void        (*GInterfaceFinalizeFunc)       (<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> g_iface,
                                             <a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> iface_data);</pre><p>
A callback function used by the type system to finalize an interface.
This function should destroy any internal data and release any resources
allocated by the corresponding <a href="gobject-Type-Information.html#GInterfaceInitFunc"><tt class="function">GInterfaceInitFunc()</tt></a> function.
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>g_iface</tt></i> :</span></td><td>	The interface structure to finalize.
</td></tr><tr><td><span class="term"><i class="parameter"><tt>iface_data</tt></i> :</span></td><td>	The <i class="parameter"><tt>class_data</tt></i> supplied via the <a href="gobject-Type-Information.html#GTypeInfo"><span class="type">GTypeInfo</span></a> structure.


</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2759079"></a><h3><a name="GTypeClassCacheFunc"></a>GTypeClassCacheFunc ()</h3><a class="indexterm" name="id2759090"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a>    (*GTypeClassCacheFunc)          (<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> cache_data,
                                             <a href="gobject-Type-Information.html#GTypeClass">GTypeClass</a> *g_class);</pre><p>
A callback function which is called when the reference count of a class 
drops to zero. It may use <a href="gobject-Type-Information.html#g-type-class-ref"><tt class="function">g_type_class_ref()</tt></a> to prevent the class from
being freed. You should not call <a href="gobject-Type-Information.html#g-type-class-unref"><tt class="function">g_type_class_unref()</tt></a> from a 
<a href="gobject-Type-Information.html#GTypeClassCacheFunc"><span class="type">GTypeClassCacheFunc</span></a> function to prevent infinite recursion, use 
<a href="gobject-Type-Information.html#g-type-class-unref-uncached"><tt class="function">g_type_class_unref_uncached()</tt></a> instead.
</p><p>
The functions have to check the class id passed in to figure 
whether they actually want to cache the class of this type, since all
classes are routed through the same <a href="gobject-Type-Information.html#GTypeClassCacheFunc"><span class="type">GTypeClassCacheFunc</span></a> chain.
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>cache_data</tt></i> :</span></td><td>data that was given to the <a href="gobject-Type-Information.html#g-type-add-class-cache-func"><tt class="function">g_type_add_class_cache_func()</tt></a> call
</td></tr><tr><td><span class="term"><i class="parameter"><tt>g_class</tt></i> :</span></td><td>The <a href="gobject-Type-Information.html#GTypeClass"><span class="type">GTypeClass</span></a> structure which is unreferenced
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td><tt class="literal">TRUE</tt> to stop further <a href="gobject-Type-Information.html#GTypeClassCacheFunc"><span class="type">GTypeClassCacheFunc</span></a>s from being 
called, <tt class="literal">FALSE</tt> to continue.


</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2759267"></a><h3><a name="GTypeFlags"></a>enum GTypeFlags</h3><a class="indexterm" name="id2759278"></a><pre class="programlisting">typedef enum    /*&lt; skip &gt;*/
{
  G_TYPE_FLAG_ABSTRACT		= (1 &lt;&lt; 4),
  G_TYPE_FLAG_VALUE_ABSTRACT	= (1 &lt;&lt; 5)
} GTypeFlags;
</pre><p>
Bit masks used to check or determine characteristics of a type.
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><tt class="literal">G_TYPE_FLAG_ABSTRACT</tt></span></td><td>	Indicates an abstract type. No instances can be
			created for an abstract type.
</td></tr><tr><td><span class="term"><tt class="literal">G_TYPE_FLAG_VALUE_ABSTRACT</tt></span></td><td>Indicates an abstract value type, i.e. a type
                        that introduces a value table, but can't be used for
                        <a href="gobject-Generic-values.html#g-value-init"><tt class="function">g_value_init()</tt></a>.

</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2759343"></a><h3><a name="GTypeFundamentalFlags"></a>enum GTypeFundamentalFlags</h3><a class="indexterm" name="id2759354"></a><pre class="programlisting">typedef enum    /*&lt; skip &gt;*/
{
  G_TYPE_FLAG_CLASSED           = (1 &lt;&lt; 0),
  G_TYPE_FLAG_INSTANTIATABLE    = (1 &lt;&lt; 1),
  G_TYPE_FLAG_DERIVABLE         = (1 &lt;&lt; 2),
  G_TYPE_FLAG_DEEP_DERIVABLE    = (1 &lt;&lt; 3)
} GTypeFundamentalFlags;
</pre><p>
Bit masks used to check or determine specific characteristics of a
fundamental type.
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><tt class="literal">G_TYPE_FLAG_CLASSED</tt></span></td><td>		Indicates a classed type.
</td></tr><tr><td><span class="term"><tt class="literal">G_TYPE_FLAG_INSTANTIATABLE</tt></span></td><td>	Indicates an instantiable type (implies classed).
</td></tr><tr><td><span class="term"><tt class="literal">G_TYPE_FLAG_DERIVABLE</tt></span></td><td>		Indicates a flat derivable type.
</td></tr><tr><td><span class="term"><tt class="literal">G_TYPE_FLAG_DEEP_DERIVABLE</tt></span></td><td>	Indicates a deep derivable type (implies derivable).

</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2759444"></a><h3><a name="g-type-register-static"></a>g_type_register_static ()</h3><a class="indexterm" name="id2759455"></a><pre class="programlisting"><a href="gobject-Type-Information.html#GType">GType</a>       g_type_register_static          (<a href="gobject-Type-Information.html#GType">GType</a> parent_type,
                                             const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *type_name,
                                             const <a href="gobject-Type-Information.html#GTypeInfo">GTypeInfo</a> *info,
                                             <a href="gobject-Type-Information.html#GTypeFlags">GTypeFlags</a> flags);</pre><p>
Registers <i class="parameter"><tt>type_name</tt></i> as the name of a new static type derived from
<i class="parameter"><tt>parent_type</tt></i>.  The type system uses the information contained in the
<a href="gobject-Type-Information.html#GTypeInfo"><span class="type">GTypeInfo</span></a> structure pointed to by <i class="parameter"><tt>info</tt></i> to manage the type and its
instances (if not abstract).  The value of <i class="parameter"><tt>flags</tt></i> determines the nature
(e.g. abstract or not) of the type.
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>parent_type</tt></i> :</span></td><td>	Type which this type will be derived from.
</td></tr><tr><td><span class="term"><i class="parameter"><tt>type_name</tt></i> :</span></td><td>	0-terminated string used as the name of the new type.
</td></tr><tr><td><span class="term"><i class="parameter"><tt>info</tt></i> :</span></td><td>		The <a href="gobject-Type-Information.html#GTypeInfo"><span class="type">GTypeInfo</span></a> structure for this type.
</td></tr><tr><td><span class="term"><i class="parameter"><tt>flags</tt></i> :</span></td><td>		Bitwise combination of <a href="gobject-Type-Information.html#GTypeFlags"><span class="type">GTypeFlags</span></a> values.
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>	The new type identifier.


</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2759630"></a><h3><a name="g-type-register-dynamic"></a>g_type_register_dynamic ()</h3><a class="indexterm" name="id2759642"></a><pre class="programlisting"><a href="gobject-Type-Information.html#GType">GType</a>       g_type_register_dynamic         (<a href="gobject-Type-Information.html#GType">GType</a> parent_type,
                                             const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *type_name,
                                             <a href="GTypePlugin.html" title="GTypePlugin">GTypePlugin</a> *plugin,
                                             <a href="gobject-Type-Information.html#GTypeFlags">GTypeFlags</a> flags);</pre><p>
Registers <i class="parameter"><tt>type_name</tt></i> as the name of a new dynamic type derived from
<i class="parameter"><tt>parent_type</tt></i>.  The type system uses the information contained in the
<a href="GTypePlugin.html" title="GTypePlugin"><span class="type">GTypePlugin</span></a> structure pointed to by <i class="parameter"><tt>plugin</tt></i> to manage the type and its
instances (if not abstract).  The value of <i class="parameter"><tt>flags</tt></i> determines the nature
(e.g. abstract or not) of the type.
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>parent_type</tt></i> :</span></td><td>	Type which this type will be derived from.
</td></tr><tr><td><span class="term"><i class="parameter"><tt>type_name</tt></i> :</span></td><td>	0-terminated string used as the name of the new type.
</td></tr><tr><td><span class="term"><i class="parameter"><tt>plugin</tt></i> :</span></td><td>	The <a href="GTypePlugin.html" title="GTypePlugin"><span class="type">GTypePlugin</span></a> structure to retrieve the <a href="gobject-Type-Information.html#GTypeInfo"><span class="type">GTypeInfo</span></a> from.
</td></tr><tr><td><span class="term"><i class="parameter"><tt>flags</tt></i> :</span></td><td>		Bitwise combination of <a href="gobject-Type-Information.html#GTypeFlags"><span class="type">GTypeFlags</span></a> values.
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>	The new type identifier or <a href="gobject-Type-Information.html#G-TYPE-INVALID-CAPS"><span class="type">G_TYPE_INVALID</span></a> if registration failed.


</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2759833"></a><h3><a name="g-type-register-fundamental"></a>g_type_register_fundamental ()</h3><a class="indexterm" name="id2759845"></a><pre class="programlisting"><a href="gobject-Type-Information.html#GType">GType</a>       g_type_register_fundamental     (<a href="gobject-Type-Information.html#GType">GType</a> type_id,
                                             const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *type_name,
                                             const <a href="gobject-Type-Information.html#GTypeInfo">GTypeInfo</a> *info,
                                             const <a href="gobject-Type-Information.html#GTypeFundamentalInfo">GTypeFundamentalInfo</a> *finfo,
                                             <a href="gobject-Type-Information.html#GTypeFlags">GTypeFlags</a> flags);</pre><p>
Registers <i class="parameter"><tt>type_id</tt></i> as the predefined identifier and <i class="parameter"><tt>type_name</tt></i> as the
name of a fundamental type.  The type system uses the information
contained in the <a href="gobject-Type-Information.html#GTypeInfo"><span class="type">GTypeInfo</span></a> structure pointed to by <i class="parameter"><tt>info</tt></i> and the 
<a href="gobject-Type-Information.html#GTypeFundamentalInfo"><span class="type">GTypeFundamentalInfo</span></a> structure pointed to by <i class="parameter"><tt>finfo</tt></i> to manage the
type and its instances.  The value of <i class="parameter"><tt>flags</tt></i> determines additional
characteristics of the fundamental type.
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>type_id</tt></i> :</span></td><td>	A predefined <span class="type">GTypeFundamentals</span> value.
</td></tr><tr><td><span class="term"><i class="parameter"><tt>type_name</tt></i> :</span></td><td>	0-terminated string used as the name of the new type.
</td></tr><tr><td><span class="term"><i class="parameter"><tt>info</tt></i> :</span></td><td>		The <a href="gobject-Type-Information.html#GTypeInfo"><span class="type">GTypeInfo</span></a> structure for this type.
</td></tr><tr><td><span class="term"><i class="parameter"><tt>finfo</tt></i> :</span></td><td>		The <a href="gobject-Type-Information.html#GTypeFundamentalInfo"><span class="type">GTypeFundamentalInfo</span></a> structure for this type.
</td></tr><tr><td><span class="term"><i class="parameter"><tt>flags</tt></i> :</span></td><td>		Bitwise combination of <a href="gobject-Type-Information.html#GTypeFlags"><span class="type">GTypeFlags</span></a> values.
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>	The predefined type identifier.


</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2760075"></a><h3><a name="g-type-add-interface-static"></a>g_type_add_interface_static ()</h3><a class="indexterm" name="id2760087"></a><pre class="programlisting">void        g_type_add_interface_static     (<a href="gobject-Type-Information.html#GType">GType</a> instance_type,
                                             <a href="gobject-Type-Information.html#GType">GType</a> interface_type,
                                             const <a href="gobject-Type-Information.html#GInterfaceInfo">GInterfaceInfo</a> *info);</pre><p>
Adds the static <i class="parameter"><tt>interface_type</tt></i> to <i class="parameter"><tt>instantiable_type</tt></i>.  The information
contained in the <span class="type">GTypeInterfaceInfo</span> structure pointed to by <i class="parameter"><tt>info</tt></i>
is used to manage the relationship.
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>instance_type</tt></i> :</span></td><td>	 <a href="gobject-Type-Information.html#GType"><span class="type">GType</span></a> value of an instantiable type.
</td></tr><tr><td><span class="term"><i class="parameter"><tt>interface_type</tt></i> :</span></td><td><a href="gobject-Type-Information.html#GType"><span class="type">GType</span></a> value of an interface type.
</td></tr><tr><td><span class="term"><i class="parameter"><tt>info</tt></i> :</span></td><td>		 The <a href="gobject-Type-Information.html#GInterfaceInfo"><span class="type">GInterfaceInfo</span></a> structure for this
		 (<i class="parameter"><tt>instance_type</tt></i>, <i class="parameter"><tt>interface_type</tt></i>) combination.


</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2760242"></a><h3><a name="g-type-add-interface-dynamic"></a>g_type_add_interface_dynamic ()</h3><a class="indexterm" name="id2760255"></a><pre class="programlisting">void        g_type_add_interface_dynamic    (<a href="gobject-Type-Information.html#GType">GType</a> instance_type,
                                             <a href="gobject-Type-Information.html#GType">GType</a> interface_type,
                                             <a href="GTypePlugin.html" title="GTypePlugin">GTypePlugin</a> *plugin);</pre><p>
Adds the dynamic <i class="parameter"><tt>interface_type</tt></i> to <i class="parameter"><tt>instantiable_type</tt></i>. The information
contained in the <a href="GTypePlugin.html" title="GTypePlugin"><span class="type">GTypePlugin</span></a> structure pointed to by <i class="parameter"><tt>plugin</tt></i>
is used to manage the relationship.
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>instance_type</tt></i> :</span></td><td>the <a href="gobject-Type-Information.html#GType"><span class="type">GType</span></a> value of an instantiable type.
</td></tr><tr><td><span class="term"><i class="parameter"><tt>interface_type</tt></i> :</span></td><td>the <a href="gobject-Type-Information.html#GType"><span class="type">GType</span></a> value of an interface type.
</td></tr><tr><td><span class="term"><i class="parameter"><tt>plugin</tt></i> :</span></td><td>the <a href="GTypePlugin.html" title="GTypePlugin"><span class="type">GTypePlugin</span></a> structure to retrieve the <a href="gobject-Type-Information.html#GInterfaceInfo"><span class="type">GInterfaceInfo</span></a> from.


</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2760406"></a><h3><a name="g-type-interface-add-prerequisite"></a>g_type_interface_add_prerequisite ()</h3><a class="indexterm" name="id2760418"></a><pre class="programlisting">void        g_type_interface_add_prerequisite
                                            (<a href="gobject-Type-Information.html#GType">GType</a> interface_type,
                                             <a href="gobject-Type-Information.html#GType">GType</a> prerequisite_type);</pre><p>
Adds <i class="parameter"><tt>prerequisite_type</tt></i> to the list of prerequisites of <i class="parameter"><tt>interface_type</tt></i>.
This means that any type implementing <i class="parameter"><tt>interface_type</tt></i> must also implement
<i class="parameter"><tt>prerequisite_type</tt></i>. Prerequisites can be thought of as an alternative to
interface derivation (which GType doesn't support). An interface can have
at most one instantiatable prerequisite type.
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>interface_type</tt></i> :</span></td><td><a href="gobject-Type-Information.html#GType"><span class="type">GType</span></a> value of an interface type.
</td></tr><tr><td><span class="term"><i class="parameter"><tt>prerequisite_type</tt></i> :</span></td><td><a href="gobject-Type-Information.html#GType"><span class="type">GType</span></a> value of an interface or instantiatable type.


</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2760530"></a><h3><a name="g-type-get-plugin"></a>g_type_get_plugin ()</h3><a class="indexterm" name="id2760542"></a><pre class="programlisting"><a href="GTypePlugin.html" title="GTypePlugin">GTypePlugin</a>* g_type_get_plugin              (<a href="gobject-Type-Information.html#GType">GType</a> type);</pre><p>
Returns the <a href="GTypePlugin.html" title="GTypePlugin"><span class="type">GTypePlugin</span></a> structure for <i class="parameter"><tt>type</tt></i> or
<tt class="literal">NULL</tt> if <i class="parameter"><tt>type</tt></i> does not have a <a href="GTypePlugin.html" title="GTypePlugin"><span class="type">GTypePlugin</span></a> structure.
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>type</tt></i> :</span></td><td>		The <a href="gobject-Type-Information.html#GType"><span class="type">GType</span></a> to retrieve the plugin for.
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>	The corresponding plugin if <i class="parameter"><tt>type</tt></i> is a dynamic type,
		<tt class="literal">NULL</tt> otherwise.


</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2760653"></a><h3><a name="g-type-interface-get-plugin"></a>g_type_interface_get_plugin ()</h3><a class="indexterm" name="id2760665"></a><pre class="programlisting"><a href="GTypePlugin.html" title="GTypePlugin">GTypePlugin</a>* g_type_interface_get_plugin    (<a href="gobject-Type-Information.html#GType">GType</a> instance_type,
                                             <a href="gobject-Type-Information.html#GType">GType</a> interface_type);</pre><p>
Returns the <a href="GTypePlugin.html" title="GTypePlugin"><span class="type">GTypePlugin</span></a> structure for the dynamic interface 
<i class="parameter"><tt>interface_type</tt></i> which has been added to <i class="parameter"><tt>instance_type</tt></i>, or 
<tt class="literal">NULL</tt> if <i class="parameter"><tt>interface_type</tt></i> has not been added to <i class="parameter"><tt>instance_type</tt></i> or does 
not have a <a href="GTypePlugin.html" title="GTypePlugin"><span class="type">GTypePlugin</span></a> structure. See <a href="gobject-Type-Information.html#g-type-add-interface-dynamic"><tt class="function">g_type_add_interface_dynamic()</tt></a>.
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>instance_type</tt></i> :</span></td><td>the <a href="gobject-Type-Information.html#GType"><span class="type">GType</span></a> value of an instantiatable type.
</td></tr><tr><td><span class="term"><i class="parameter"><tt>interface_type</tt></i> :</span></td><td>the <a href="gobject-Type-Information.html#GType"><span class="type">GType</span></a> value of an interface type.
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the <a href="GTypePlugin.html" title="GTypePlugin"><span class="type">GTypePlugin</span></a> for the dynamic interface <i class="parameter"><tt>interface_type</tt></i>
   of <i class="parameter"><tt>instance_type</tt></i>.


</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2760840"></a><h3><a name="g-type-fundamental-next"></a>g_type_fundamental_next ()</h3><a class="indexterm" name="id2760851"></a><pre class="programlisting"><a href="gobject-Type-Information.html#GType">GType</a>       g_type_fundamental_next         (void);</pre><p>
Returns the next free fundamental type id which can be used to
register a new fundamental type with <a href="gobject-Type-Information.html#g-type-register-fundamental"><tt class="function">g_type_register_fundamental()</tt></a>.
The returned type ID represents the highest currently registered
fundamental type identifier.

</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>The nextmost fundamental type ID to be registered,
          or 0 if the type system ran out of fundamental type IDs.


</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2760904"></a><h3><a name="g-type-fundamental"></a>g_type_fundamental ()</h3><a class="indexterm" name="id2760915"></a><pre class="programlisting"><a href="gobject-Type-Information.html#GType">GType</a>       g_type_fundamental              (<a href="gobject-Type-Information.html#GType">GType</a> type_id);</pre><p>
Internal function, used to extract the fundamental type ID portion.
use <a href="gobject-Type-Information.html#G-TYPE-FUNDAMENTAL-CAPS"><tt class="function">G_TYPE_FUNDAMENTAL()</tt></a> instead.
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>type_id</tt></i> :</span></td><td>valid type ID
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>fundamental type ID


</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2760984"></a><h3><a name="g-type-create-instance"></a>g_type_create_instance ()</h3><a class="indexterm" name="id2760995"></a><pre class="programlisting"><a href="gobject-Type-Information.html#GTypeInstance">GTypeInstance</a>* g_type_create_instance       (<a href="gobject-Type-Information.html#GType">GType</a> type);</pre><p>
Creates and initializes an instance of <i class="parameter"><tt>type</tt></i> if <i class="parameter"><tt>type</tt></i> is valid and can
be instantiated. The type system only performs basic allocation and
structure setups for instances, actual instance creation should happen
through functions supplied by the type's fundamental type implementation.
So use of <a href="gobject-Type-Information.html#g-type-create-instance"><tt class="function">g_type_create_instance()</tt></a> is reserved for implementators of
fundamental types only. E.g. instances of the <a href="gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> hierarchy
should be created via <a href="gobject-The-Base-Object-Type.html#g-object-new"><tt class="function">g_object_new()</tt></a> and <span class="emphasis"><em>never</em></span>
directly through <a href="gobject-Type-Information.html#g-type-create-instance"><tt class="function">g_type_create_instance()</tt></a> which doesn't handle
things like singleton objects or object construction.
Note: Do <span class="emphasis"><em>not</em></span> use this function, unless you're
implementing a fundamental type. Also language bindings should <span class="emphasis"><em>not</em></span>
use this function but <a href="gobject-The-Base-Object-Type.html#g-object-new"><tt class="function">g_object_new()</tt></a> instead.
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>type</tt></i> :</span></td><td>	  An instantiatable type to create an instance for.
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>An allocated and initialized instance, subject to further
	  treatment by the fundamental type implementation.


</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2761139"></a><h3><a name="g-type-free-instance"></a>g_type_free_instance ()</h3><a class="indexterm" name="id2761150"></a><pre class="programlisting">void        g_type_free_instance            (<a href="gobject-Type-Information.html#GTypeInstance">GTypeInstance</a> *instance);</pre><p>
Frees an instance of a type, returning it to the instance pool for the type,
if there is one.
</p><p>
Like <a href="gobject-Type-Information.html#g-type-create-instance"><tt class="function">g_type_create_instance()</tt></a>, this function is reserved for implementors of 
fundamental types.
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>instance</tt></i> :</span></td><td>an instance of a type.


</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2761215"></a><h3><a name="g-type-add-class-cache-func"></a>g_type_add_class_cache_func ()</h3><a class="indexterm" name="id2761226"></a><pre class="programlisting">void        g_type_add_class_cache_func     (<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> cache_data,
                                             <a href="gobject-Type-Information.html#GTypeClassCacheFunc">GTypeClassCacheFunc</a> cache_func);</pre><p>
Adds a <a href="gobject-Type-Information.html#GTypeClassCacheFunc"><span class="type">GTypeClassCacheFunc</span></a> to be called before the reference count of a class 
goes from one to zero. This can be used to prevent premature class destruction.
All installed <a href="gobject-Type-Information.html#GTypeClassCacheFunc"><span class="type">GTypeClassCacheFunc</span></a> functions will be chained until one of them 
returns <tt class="literal">TRUE</tt>. The functions have to check the class id passed in to figure 
whether they actually want to cache the class of this type, since all classes
are routed through the same <a href="gobject-Type-Information.html#GTypeClassCacheFunc"><span class="type">GTypeClassCacheFunc</span></a> chain.
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>cache_data</tt></i> :</span></td><td>data to be passed to <i class="parameter"><tt>cache_func</tt></i>
</td></tr><tr><td><span class="term"><i class="parameter"><tt>cache_func</tt></i> :</span></td><td>a <a href="gobject-Type-Information.html#GTypeClassCacheFunc"><span class="type">GTypeClassCacheFunc</span></a>


</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2761345"></a><h3><a name="g-type-remove-class-cache-func"></a>g_type_remove_class_cache_func ()</h3><a class="indexterm" name="id2761357"></a><pre class="programlisting">void        g_type_remove_class_cache_func  (<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> cache_data,
                                             <a href="gobject-Type-Information.html#GTypeClassCacheFunc">GTypeClassCacheFunc</a> cache_func);</pre><p>
Removes a previously installed <a href="gobject-Type-Information.html#GTypeClassCacheFunc"><span class="type">GTypeClassCacheFunc</span></a>. The cache maintained 
by <i class="parameter"><tt>cache_func</tt></i> has to be empty when calling <a href="gobject-Type-Information.html#g-type-remove-class-cache-func"><tt class="function">g_type_remove_class_cache_func()</tt></a> 
to avoid leaks.
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>cache_data</tt></i> :</span></td><td>data that was given when adding <i class="parameter"><tt>cache_func</tt></i>
</td></tr><tr><td><span class="term"><i class="parameter"><tt>cache_func</tt></i> :</span></td><td>a <a href="gobject-Type-Information.html#GTypeClassCacheFunc"><span class="type">GTypeClassCacheFunc</span></a>


</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2761467"></a><h3><a name="g-type-class-unref-uncached"></a>g_type_class_unref_uncached ()</h3><a class="indexterm" name="id2761479"></a><pre class="programlisting">void        g_type_class_unref_uncached     (<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> g_class);</pre><p>
A variant of <a href="gobject-Type-Information.html#g-type-class-unref"><tt class="function">g_type_class_unref()</tt></a> for use in <a href="gobject-Type-Information.html#GTypeClassCacheFunc"><span class="type">GTypeClassCacheFunc</span></a>
implementations. It unreferences a class without consulting the chain
of <a href="gobject-Type-Information.html#GTypeClassCacheFunc"><span class="type">GTypeClassCacheFunc</span></a>s, avoiding the recursion which would occur
otherwise.
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>g_class</tt></i> :</span></td><td>The <a href="gobject-Type-Information.html#GTypeClass"><span class="type">GTypeClass</span></a> structure to unreference.


</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2761564"></a><h3><a name="g-type-add-interface-check"></a>g_type_add_interface_check ()</h3><a class="indexterm" name="id2761576"></a><pre class="programlisting">void        g_type_add_interface_check      (<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> check_data,
                                             <a href="gobject-Type-Information.html#GTypeInterfaceCheckFunc">GTypeInterfaceCheckFunc</a> check_func);</pre><p>
Adds a function to be called after an interface vtable is
initialized for any class. That is, after the <i class="parameter"><tt>interface_init</tt></i>
member of <a href="gobject-Type-Information.html#GInterfaceInfo"><span class="type">GInterfaceInfo</span></a> has been called.
</p><p>
This function is useful when you want to check an invariant
that depends on the interfaces of a class. For instance,
the implementation of <a href="gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> uses this facility to check
that an object implements all of the properties that are
defined on its interfaces.    
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>check_data</tt></i> :</span></td><td>data to pass to <i class="parameter"><tt>check_func</tt></i>
</td></tr><tr><td><span class="term"><i class="parameter"><tt>check_func</tt></i> :</span></td><td>function to be called after each interface
   is initialized.
</td></tr></tbody></table></div><p>Since 2.4


</p></div><hr><div class="refsect2" lang="en"><a name="id2761688"></a><h3><a name="g-type-remove-interface-check"></a>g_type_remove_interface_check ()</h3><a class="indexterm" name="id2761699"></a><pre class="programlisting">void        g_type_remove_interface_check   (<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> check_data,
                                             <a href="gobject-Type-Information.html#GTypeInterfaceCheckFunc">GTypeInterfaceCheckFunc</a> chec_func);</pre><p>
Removes an interface check function added with
<a href="gobject-Type-Information.html#g-type-add-interface-check"><tt class="function">g_type_add_interface_check()</tt></a>.
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>check_data</tt></i> :</span></td><td>callback data passed to <a href="gobject-Type-Information.html#g-type-add-interface-check"><tt class="function">g_type_add_interface_check()</tt></a>
</td></tr><tr><td><span class="term"><i class="parameter"><tt>chec_func</tt></i> :</span></td><td>callback function passed to <a href="gobject-Type-Information.html#g-type-add-interface-check"><tt class="function">g_type_add_interface_check()</tt></a>
</td></tr></tbody></table></div><p>Since 2.4


</p></div><hr><div class="refsect2" lang="en"><a name="id2761808"></a><h3><a name="GTypeInterfaceCheckFunc"></a>GTypeInterfaceCheckFunc ()</h3><a class="indexterm" name="id2761819"></a><pre class="programlisting">void        (*GTypeInterfaceCheckFunc)      (<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> func_data,
                                             <a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> g_iface);</pre><p>
A callback called after an interface vtable is initialized.
See <a href="gobject-Type-Information.html#g-type-add-interface-check"><tt class="function">g_type_add_interface_check()</tt></a>.
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>func_data</tt></i> :</span></td><td>data passed to <a href="gobject-Type-Information.html#g-type-add-interface-check"><tt class="function">g_type_add_interface_check()</tt></a>.
</td></tr><tr><td><span class="term"><i class="parameter"><tt>g_iface</tt></i> :</span></td><td>the interface that has been initialized
</td></tr></tbody></table></div><p>Since 2.4


</p></div><hr><div class="refsect2" lang="en"><a name="id2761915"></a><h3><a name="g-type-value-table-peek"></a>g_type_value_table_peek ()</h3><a class="indexterm" name="id2761926"></a><pre class="programlisting"><a href="gobject-Type-Information.html#GTypeValueTable">GTypeValueTable</a>* g_type_value_table_peek    (<a href="gobject-Type-Information.html#GType">GType</a> type);</pre><p>
Returns the location of the <a href="gobject-Type-Information.html#GTypeValueTable"><span class="type">GTypeValueTable</span></a> associated with <i class="parameter"><tt>type</tt></i>.
<span class="emphasis"><em>Note, this function should only be used from source code
that implements or has internal knowledge of the implementation of
<i class="parameter"><tt>type</tt></i>.</em></span>
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>type</tt></i> :</span></td><td>   A <a href="gobject-Type-Information.html#GType"><span class="type">GType</span></a> value.
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>Location of the <a href="gobject-Type-Information.html#GTypeValueTable"><span class="type">GTypeValueTable</span></a> associated with <i class="parameter"><tt>type</tt></i> or
          <tt class="literal">NULL</tt> if there is no <a href="gobject-Type-Information.html#GTypeValueTable"><span class="type">GTypeValueTable</span></a> associated with <i class="parameter"><tt>type</tt></i>.


</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2762053"></a><h3><a name="G-DEFINE-TYPE-CAPS"></a>G_DEFINE_TYPE()</h3><a class="indexterm" name="id2762064"></a><pre class="programlisting">#define G_DEFINE_TYPE(TN, t_n, T_P)                         G_DEFINE_TYPE_EXTENDED (TN, t_n, T_P, 0, {})
</pre><p>
A convenience macro for type implementations, which declares a 
class initialization function, an instance initialization function (see <a href="gobject-Type-Information.html#GTypeInfo"><span class="type">GTypeInfo</span></a> for information about 
these) and a static variable named <i class="parameter"><tt>t_n</tt></i>_parent_class pointing to the parent class. Furthermore, it defines 
a *<tt class="function">_get_type()</tt> function. See <a href="gobject-Type-Information.html#G-DEFINE-TYPE-EXTENDED-CAPS"><tt class="function">G_DEFINE_TYPE_EXTENDED()</tt></a> for an example.
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>TN</tt></i> :</span></td><td>The name of the new type, in Camel case.
</td></tr><tr><td><span class="term"><i class="parameter"><tt>t_n</tt></i> :</span></td><td>The name of the new type, in lowercase, with words 
  separated by '_'.
</td></tr><tr><td><span class="term"><i class="parameter"><tt>T_P</tt></i> :</span></td><td>The <a href="gobject-Type-Information.html#GType"><span class="type">GType</span></a> of the parent type.
</td></tr></tbody></table></div><p>Since 2.4


</p></div><hr><div class="refsect2" lang="en"><a name="id2762182"></a><h3><a name="G-DEFINE-TYPE-WITH-CODE-CAPS"></a>G_DEFINE_TYPE_WITH_CODE()</h3><a class="indexterm" name="id2762194"></a><pre class="programlisting">#define G_DEFINE_TYPE_WITH_CODE(TN, t_n, T_P, _C_)          G_DEFINE_TYPE_EXTENDED (TN, t_n, T_P, 0, _C_)
</pre><p>
A convenience macro for type implementations.  
Similar to <a href="gobject-Type-Information.html#G-DEFINE-TYPE-CAPS"><tt class="function">G_DEFINE_TYPE()</tt></a>, but allows to insert custom code into the 
*<tt class="function">_get_type()</tt> function, e.g. interface implementations via <a href="gobject-Type-Information.html#G-IMPLEMENT-INTERFACE-CAPS"><tt class="function">G_IMPLEMENT_INTERFACE()</tt></a>.
See <a href="gobject-Type-Information.html#G-DEFINE-TYPE-EXTENDED-CAPS"><tt class="function">G_DEFINE_TYPE_EXTENDED()</tt></a> for an example.
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>TN</tt></i> :</span></td><td>The name of the new type, in Camel case.
</td></tr><tr><td><span class="term"><i class="parameter"><tt>t_n</tt></i> :</span></td><td>The name of the new type in lowercase, with words separated by '_'.
</td></tr><tr><td><span class="term"><i class="parameter"><tt>T_P</tt></i> :</span></td><td>The <a href="gobject-Type-Information.html#GType"><span class="type">GType</span></a> of the parent type.
</td></tr><tr><td><span class="term"><i class="parameter"><tt>_C_</tt></i> :</span></td><td>Custom code that gets inserted in the *<tt class="function">_get_type()</tt> function.
</td></tr></tbody></table></div><p>Since 2.4


</p></div><hr><div class="refsect2" lang="en"><a name="id2762340"></a><h3><a name="G-DEFINE-ABSTRACT-TYPE-CAPS"></a>G_DEFINE_ABSTRACT_TYPE()</h3><a class="indexterm" name="id2762352"></a><pre class="programlisting">#define G_DEFINE_ABSTRACT_TYPE(TN, t_n, T_P)                G_DEFINE_TYPE_EXTENDED (TN, t_n, T_P, G_TYPE_FLAG_ABSTRACT, {})
</pre><p>
A convenience macro for type implementations. 
Similar to <a href="gobject-Type-Information.html#G-DEFINE-TYPE-CAPS"><tt class="function">G_DEFINE_TYPE()</tt></a>, but defines an abstract type. 
See <a href="gobject-Type-Information.html#G-DEFINE-TYPE-EXTENDED-CAPS"><tt class="function">G_DEFINE_TYPE_EXTENDED()</tt></a> for an example.
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>TN</tt></i> :</span></td><td>The name of the new type, in Camel case.
</td></tr><tr><td><span class="term"><i class="parameter"><tt>t_n</tt></i> :</span></td><td>The name of the new type, in lowercase, with words 
  separated by '_'.
</td></tr><tr><td><span class="term"><i class="parameter"><tt>T_P</tt></i> :</span></td><td>The <a href="gobject-Type-Information.html#GType"><span class="type">GType</span></a> of the parent type.
</td></tr></tbody></table></div><p>Since 2.4


</p></div><hr><div class="refsect2" lang="en"><a name="id2762451"></a><h3><a name="G-DEFINE-ABSTRACT-TYPE-WITH-CODE-CAPS"></a>G_DEFINE_ABSTRACT_TYPE_WITH_CODE()</h3><a class="indexterm" name="id2762464"></a><pre class="programlisting">#define G_DEFINE_ABSTRACT_TYPE_WITH_CODE(TN, t_n, T_P, _C_) G_DEFINE_TYPE_EXTENDED (TN, t_n, T_P, G_TYPE_FLAG_ABSTRACT, _C_)
</pre><p>
A convenience macro for type implementations.
Similar to <a href="gobject-Type-Information.html#G-DEFINE-TYPE-WITH-CODE-CAPS"><tt class="function">G_DEFINE_TYPE_WITH_CODE()</tt></a>, but defines an abstract type and allows to 
insert custom code into the *<tt class="function">_get_type()</tt> function, e.g. interface implementations 
via <a href="gobject-Type-Information.html#G-IMPLEMENT-INTERFACE-CAPS"><tt class="function">G_IMPLEMENT_INTERFACE()</tt></a>. See <a href="gobject-Type-Information.html#G-DEFINE-TYPE-EXTENDED-CAPS"><tt class="function">G_DEFINE_TYPE_EXTENDED()</tt></a> for an example.
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>TN</tt></i> :</span></td><td>The name of the new type, in Camel case.
</td></tr><tr><td><span class="term"><i class="parameter"><tt>t_n</tt></i> :</span></td><td>The name of the new type, in lowercase, with words 
  separated by '_'.
</td></tr><tr><td><span class="term"><i class="parameter"><tt>T_P</tt></i> :</span></td><td>The <a href="gobject-Type-Information.html#GType"><span class="type">GType</span></a> of the parent type.
</td></tr><tr><td><span class="term"><i class="parameter"><tt>_C_</tt></i> :</span></td><td>Custom code that gets inserted in the @<tt class="function">type_name_get_type()</tt> function.
</td></tr></tbody></table></div><p>Since 2.4


</p></div><hr><div class="refsect2" lang="en"><a name="id2762613"></a><h3><a name="G-IMPLEMENT-INTERFACE-CAPS"></a>G_IMPLEMENT_INTERFACE()</h3><a class="indexterm" name="id2762624"></a><pre class="programlisting">#define     G_IMPLEMENT_INTERFACE(TYPE_IFACE, iface_init)</pre><p>
A convenience macro to ease interface addition in the <i class="parameter"><tt>_C_</tt></i> section
of <a href="gobject-Type-Information.html#G-DEFINE-TYPE-WITH-CODE-CAPS"><tt class="function">G_DEFINE_TYPE_WITH_CODE()</tt></a> or <a href="gobject-Type-Information.html#G-DEFINE-ABSTRACT-TYPE-WITH-CODE-CAPS"><tt class="function">G_DEFINE_ABSTRACT_TYPE_WITH_CODE()</tt></a>. 
See <a href="gobject-Type-Information.html#G-DEFINE-TYPE-EXTENDED-CAPS"><tt class="function">G_DEFINE_TYPE_EXTENDED()</tt></a> for an example.
</p><p>
Note that this macro can only be used together with the G_DEFINE_TYPE_*
macros, since it depends on variable names from those macros.
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>TYPE_IFACE</tt></i> :</span></td><td>The <a href="gobject-Type-Information.html#GType"><span class="type">GType</span></a> of the interface to add
</td></tr><tr><td><span class="term"><i class="parameter"><tt>iface_init</tt></i> :</span></td><td>The interface init function
</td></tr></tbody></table></div><p>Since 2.4


</p></div><hr><div class="refsect2" lang="en"><a name="id2762732"></a><h3><a name="G-DEFINE-TYPE-EXTENDED-CAPS"></a>G_DEFINE_TYPE_EXTENDED()</h3><a class="indexterm" name="id2762743"></a><pre class="programlisting">#define     G_DEFINE_TYPE_EXTENDED(TypeName, type_name, TYPE_PARENT, flags, CODE)</pre><p>
The most general convenience macro for type implementations, on which 
<a href="gobject-Type-Information.html#G-DEFINE-TYPE-CAPS"><tt class="function">G_DEFINE_TYPE()</tt></a>, etc are based. 
</p><div class="informalexample"><pre class="programlisting">
G_DEFINE_TYPE_EXTENDED (GtkGadget, 
                        gtk_gadget, 
                        GTK_TYPE_WIDGET,
                        0, 
                        G_IMPLEMENT_INTERFACE (TYPE_GIZMO, 
                                               gtk_gadget_gizmo_init));
</pre>
expands to
<pre class="programlisting">
static void     gtk_gadget_init       (GtkGadget      *self);
static void     gtk_gadget_class_init (GtkGadgetClass *klass);
static gpointer gtk_gadget_parent_class = NULL;
static void     gtk_gadget_class_intern_init (gpointer klass)
{
  gtk_gadget_parent_class = g_type_class_peek_parent (klass);
  gtk_gadget_class_init ((GtkGadgetClass*) klass);
}

GType
gtk_gadget_get_type (void)
{
  static GType g_define_type_id = 0; 
  if (G_UNLIKELY (g_define_type_id == 0)) 
    { 
      static const GTypeInfo g_define_type_info = { 
        sizeof (GtkGadgetClass), 
        (GBaseInitFunc) NULL, 
        (GBaseFinalizeFunc) NULL, 
        (GClassInitFunc) gtk_gadget_class_intern_init, 
        (GClassFinalizeFunc) NULL, 
        NULL,   /* class_data */ 
        sizeof (GtkGadget), 
        0,      /* n_preallocs */ 
        (GInstanceInitFunc) gtk_gadget_init, 
      }; 
      g_define_type_id = g_type_register_static (GTK_TYPE_WIDGET, "GtkGadget", &amp;g_define_type_info, 0); 
      {
        static const GInterfaceInfo g_implement_interface_info = {
          (GInterfaceInitFunc) gtk_gadget_gizmo_init
        };
        g_type_add_interface_static (g_define_type_id, TYPE_GIZMO, &amp;g_implement_interface_info);
      } 
    } 
  return g_define_type_id; 
}
</pre>
The only pieces which have to be manually provided are the definitions of the 
instance and class structure and the definitions of the instance and class 
init functions.
</div><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>TypeName</tt></i> :</span></td><td>The name of the new type, in Camel case.
</td></tr><tr><td><span class="term"><i class="parameter"><tt>type_name</tt></i> :</span></td><td>The name of the new type, in lowercase, with words 
  separated by '_'.
</td></tr><tr><td><span class="term"><i class="parameter"><tt>TYPE_PARENT</tt></i> :</span></td><td>The <a href="gobject-Type-Information.html#GType"><span class="type">GType</span></a> of the parent type.
</td></tr><tr><td><span class="term"><i class="parameter"><tt>flags</tt></i> :</span></td><td><a href="gobject-Type-Information.html#GTypeFlags"><span class="type">GTypeFlags</span></a> to pass to <a href="gobject-Type-Information.html#g-type-register-static"><tt class="function">g_type_register_static()</tt></a>
</td></tr><tr><td><span class="term"><i class="parameter"><tt>CODE</tt></i> :</span></td><td>Custom code that gets inserted in the *<tt class="function">_get_type()</tt> function.
</td></tr></tbody></table></div><p>Since 2.4


</p></div><hr><div class="refsect2" lang="en"><a name="id2762936"></a><h3><a name="G-TYPE-INVALID-CAPS"></a>G_TYPE_INVALID</h3><a class="indexterm" name="id2762948"></a><pre class="programlisting">#define G_TYPE_INVALID			G_TYPE_MAKE_FUNDAMENTAL (0)
</pre><p>
An invalid <a href="gobject-Type-Information.html#GType"><span class="type">GType</span></a>, used as error return value in some functions which return
a <a href="gobject-Type-Information.html#GType"><span class="type">GType</span></a>. 
</p></div><hr><div class="refsect2" lang="en"><a name="id2762980"></a><h3><a name="G-TYPE-NONE-CAPS"></a>G_TYPE_NONE</h3><a class="indexterm" name="id2762991"></a><pre class="programlisting">#define G_TYPE_NONE			G_TYPE_MAKE_FUNDAMENTAL (1)
</pre><p>
A fundamental type which is used as a replacement for the C
<tt class="literal">void</tt> return type.
</p></div><hr><div class="refsect2" lang="en"><a name="id2763014"></a><h3><a name="G-TYPE-INTERFACE-CAPS"></a>G_TYPE_INTERFACE</h3><a class="indexterm" name="id2763025"></a><pre class="programlisting">#define G_TYPE_INTERFACE		G_TYPE_MAKE_FUNDAMENTAL (2)
</pre><p>
The fundamental type from which all interfaces are derived.
</p></div><hr><div class="refsect2" lang="en"><a name="id2763042"></a><h3><a name="G-TYPE-CHAR-CAPS"></a>G_TYPE_CHAR</h3><a class="indexterm" name="id2763052"></a><pre class="programlisting">#define G_TYPE_CHAR			G_TYPE_MAKE_FUNDAMENTAL (3)
</pre><p>
The fundamental type corresponding to <a
href="../glib/glib-Basic-Types.html#gchar"
><span class="type">gchar</span></a>.
</p></div><hr><div class="refsect2" lang="en"><a name="id2763076"></a><h3><a name="G-TYPE-UCHAR-CAPS"></a>G_TYPE_UCHAR</h3><a class="indexterm" name="id2763086"></a><pre class="programlisting">#define G_TYPE_UCHAR			G_TYPE_MAKE_FUNDAMENTAL (4)
</pre><p>
The fundamental type corresponding to <a
href="../glib/glib-Basic-Types.html#guchar"
><span class="type">guchar</span></a>.
</p></div><hr><div class="refsect2" lang="en"><a name="id2763111"></a><h3><a name="G-TYPE-BOOLEAN-CAPS"></a>G_TYPE_BOOLEAN</h3><a class="indexterm" name="id2763122"></a><pre class="programlisting">#define G_TYPE_BOOLEAN			G_TYPE_MAKE_FUNDAMENTAL (5)
</pre><p>
The fundamental type corresponding to <a
href="../glib/glib-Basic-Types.html#gboolean"
><span class="type">gboolean</span></a>.
</p></div><hr><div class="refsect2" lang="en"><a name="id2763146"></a><h3><a name="G-TYPE-INT-CAPS"></a>G_TYPE_INT</h3><a class="indexterm" name="id2763157"></a><pre class="programlisting">#define G_TYPE_INT			G_TYPE_MAKE_FUNDAMENTAL (6)
</pre><p>
The fundamental type corresponding to <a
href="../glib/glib-Basic-Types.html#gint"
><span class="type">gint</span></a>.
</p></div><hr><div class="refsect2" lang="en"><a name="id2763181"></a><h3><a name="G-TYPE-UINT-CAPS"></a>G_TYPE_UINT</h3><a class="indexterm" name="id2763192"></a><pre class="programlisting">#define G_TYPE_UINT			G_TYPE_MAKE_FUNDAMENTAL (7)
</pre><p>
The fundamental type corresponding to <a
href="../glib/glib-Basic-Types.html#guint"
><span class="type">guint</span></a>.
</p></div><hr><div class="refsect2" lang="en"><a name="id2763216"></a><h3><a name="G-TYPE-LONG-CAPS"></a>G_TYPE_LONG</h3><a class="indexterm" name="id2763226"></a><pre class="programlisting">#define G_TYPE_LONG			G_TYPE_MAKE_FUNDAMENTAL (8)
</pre><p>
The fundamental type corresponding to <a
href="../glib/glib-Basic-Types.html#glong"
><span class="type">glong</span></a>.
</p></div><hr><div class="refsect2" lang="en"><a name="id2763251"></a><h3><a name="G-TYPE-ULONG-CAPS"></a>G_TYPE_ULONG</h3><a class="indexterm" name="id2763262"></a><pre class="programlisting">#define G_TYPE_ULONG			G_TYPE_MAKE_FUNDAMENTAL (9)
</pre><p>
The fundamental type corresponding to <a
href="../glib/glib-Basic-Types.html#gulong"
><span class="type">gulong</span></a>.
</p></div><hr><div class="refsect2" lang="en"><a name="id2763287"></a><h3><a name="G-TYPE-INT64-CAPS"></a>G_TYPE_INT64</h3><a class="indexterm" name="id2763298"></a><pre class="programlisting">#define G_TYPE_INT64			G_TYPE_MAKE_FUNDAMENTAL (10)
</pre><p>
The fundamental type corresponding to <a
href="../glib/glib-Basic-Types.html#gint64"
><span class="type">gint64</span></a>.
</p></div><hr><div class="refsect2" lang="en"><a name="id2763323"></a><h3><a name="G-TYPE-UINT64-CAPS"></a>G_TYPE_UINT64</h3><a class="indexterm" name="id2763334"></a><pre class="programlisting">#define G_TYPE_UINT64			G_TYPE_MAKE_FUNDAMENTAL (11)
</pre><p>
The fundamental type corresponding to <a
href="../glib/glib-Basic-Types.html#guint64"
><span class="type">guint64</span></a>.
</p></div><hr><div class="refsect2" lang="en"><a name="id2763359"></a><h3><a name="G-TYPE-ENUM-CAPS"></a>G_TYPE_ENUM</h3><a class="indexterm" name="id2763370"></a><pre class="programlisting">#define G_TYPE_ENUM			G_TYPE_MAKE_FUNDAMENTAL (12)
</pre><p>
The fundamental type from which all enumeration types are derived.
</p></div><hr><div class="refsect2" lang="en"><a name="id2763386"></a><h3><a name="G-TYPE-FLAGS-CAPS"></a>G_TYPE_FLAGS</h3><a class="indexterm" name="id2763397"></a><pre class="programlisting">#define G_TYPE_FLAGS			G_TYPE_MAKE_FUNDAMENTAL (13)
</pre><p>
The fundamental type from which all flags types are derived.
</p></div><hr><div class="refsect2" lang="en"><a name="id2763414"></a><h3><a name="G-TYPE-FLOAT-CAPS"></a>G_TYPE_FLOAT</h3><a class="indexterm" name="id2763424"></a><pre class="programlisting">#define G_TYPE_FLOAT			G_TYPE_MAKE_FUNDAMENTAL (14)
</pre><p>
The fundamental type corresponding to <a
href="../glib/glib-Basic-Types.html#gfloat"
><span class="type">gfloat</span></a>.
</p></div><hr><div class="refsect2" lang="en"><a name="id2763450"></a><h3><a name="G-TYPE-DOUBLE-CAPS"></a>G_TYPE_DOUBLE</h3><a class="indexterm" name="id2763460"></a><pre class="programlisting">#define G_TYPE_DOUBLE			G_TYPE_MAKE_FUNDAMENTAL (15)
</pre><p>
The fundamental type corresponding to <a
href="../glib/glib-Basic-Types.html#gdouble"
><span class="type">gdouble</span></a>.
</p></div><hr><div class="refsect2" lang="en"><a name="id2763486"></a><h3><a name="G-TYPE-STRING-CAPS"></a>G_TYPE_STRING</h3><a class="indexterm" name="id2763496"></a><pre class="programlisting">#define G_TYPE_STRING			G_TYPE_MAKE_FUNDAMENTAL (16)
</pre><p>
The fundamental type corresponding to nul-terminated C strings.
</p></div><hr><div class="refsect2" lang="en"><a name="id2763513"></a><h3><a name="G-TYPE-POINTER-CAPS"></a>G_TYPE_POINTER</h3><a class="indexterm" name="id2763524"></a><pre class="programlisting">#define G_TYPE_POINTER			G_TYPE_MAKE_FUNDAMENTAL (17)
</pre><p>
The fundamental type corresponding to <a
href="../glib/glib-Basic-Types.html#gpointer"
><span class="type">gpointer</span></a>.
</p></div><hr><div class="refsect2" lang="en"><a name="id2763548"></a><h3><a name="G-TYPE-BOXED-CAPS"></a>G_TYPE_BOXED</h3><a class="indexterm" name="id2763559"></a><pre class="programlisting">#define G_TYPE_BOXED			G_TYPE_MAKE_FUNDAMENTAL (18)
</pre><p>
The fundamental type from which all boxed types are derived.
</p></div><hr><div class="refsect2" lang="en"><a name="id2763576"></a><h3><a name="G-TYPE-PARAM-CAPS"></a>G_TYPE_PARAM</h3><a class="indexterm" name="id2763586"></a><pre class="programlisting">#define G_TYPE_PARAM			G_TYPE_MAKE_FUNDAMENTAL (19)
</pre><p>
The fundamental type from which all <a href="gobject-GParamSpec.html#GParamSpec"><span class="type">GParamSpec</span></a> types are derived.
</p></div><hr><div class="refsect2" lang="en"><a name="id2763612"></a><h3><a name="G-TYPE-OBJECT-CAPS"></a>G_TYPE_OBJECT</h3><a class="indexterm" name="id2763623"></a><pre class="programlisting">#define G_TYPE_OBJECT			G_TYPE_MAKE_FUNDAMENTAL (20)
</pre><p>
The fundamental type for <a href="gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a>.
</p></div><hr><div class="refsect2" lang="en"><a name="id2763647"></a><h3><a name="G-TYPE-RESERVED-GLIB-FIRST-CAPS"></a>G_TYPE_RESERVED_GLIB_FIRST</h3><a class="indexterm" name="id2763659"></a><pre class="programlisting">#define G_TYPE_RESERVED_GLIB_FIRST	(21)
</pre><p>
First fundamental type number to create a new fundamental type id with
<a href="gobject-Type-Information.html#G-TYPE-MAKE-FUNDAMENTAL-CAPS"><tt class="function">G_TYPE_MAKE_FUNDAMENTAL()</tt></a> reserved for GLib.
</p></div><hr><div class="refsect2" lang="en"><a name="id2763688"></a><h3><a name="G-TYPE-RESERVED-GLIB-LAST-CAPS"></a>G_TYPE_RESERVED_GLIB_LAST</h3><a class="indexterm" name="id2763699"></a><pre class="programlisting">#define G_TYPE_RESERVED_GLIB_LAST	(31)
</pre><p>
Last fundamental type number reserved for GLib.
</p></div><hr><div class="refsect2" lang="en"><a name="id2763716"></a><h3><a name="G-TYPE-RESERVED-BSE-FIRST-CAPS"></a>G_TYPE_RESERVED_BSE_FIRST</h3><a class="indexterm" name="id2763727"></a><pre class="programlisting">#define G_TYPE_RESERVED_BSE_FIRST	(32)
</pre><p>
First fundamental type number to create a new fundamental type id with
<a href="gobject-Type-Information.html#G-TYPE-MAKE-FUNDAMENTAL-CAPS"><tt class="function">G_TYPE_MAKE_FUNDAMENTAL()</tt></a> reserved for BSE.
</p></div><hr><div class="refsect2" lang="en"><a name="id2763756"></a><h3><a name="G-TYPE-RESERVED-BSE-LAST-CAPS"></a>G_TYPE_RESERVED_BSE_LAST</h3><a class="indexterm" name="id2763767"></a><pre class="programlisting">#define G_TYPE_RESERVED_BSE_LAST	(48)
</pre><p>
Last fundamental type number reserved for BSE.
</p></div><hr><div class="refsect2" lang="en"><a name="id2763784"></a><h3><a name="G-TYPE-RESERVED-USER-FIRST-CAPS"></a>G_TYPE_RESERVED_USER_FIRST</h3><a class="indexterm" name="id2763796"></a><pre class="programlisting">#define G_TYPE_RESERVED_USER_FIRST	(49)
</pre><p>
First available fundamental type number to create new fundamental 
type id with <a href="gobject-Type-Information.html#G-TYPE-MAKE-FUNDAMENTAL-CAPS"><tt class="function">G_TYPE_MAKE_FUNDAMENTAL()</tt></a>.
</p></div></div></div><table class="navigation" width="100%" summary="Navigation footer" cellpadding="2" cellspacing="0"><tr valign="middle"><td align="left"><a accesskey="p" href="rn01.html"><b>&lt;&lt; API Reference</b></a></td><td align="right"><a accesskey="n" href="GTypePlugin.html"><b>GTypePlugin &gt;&gt;</b></a></td></tr></table></body></html>