<refentry id="GTypeModule">
<refmeta>
<refentrytitle role="top_of_page" id="GTypeModule.top_of_page">GTypeModule</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GOBJECT Library</refmiscinfo>
</refmeta>

<refnamediv>
<refname>GTypeModule</refname>
<refpurpose>Type loading modules</refpurpose>
</refnamediv>

<refsynopsisdiv id="GTypeModule.synopsis" role="synopsis">
<title role="synopsis.title">Synopsis</title>

<synopsis>

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

                    <link linkend="GTypeModule-struct">GTypeModule</link>;
                    <link linkend="GTypeModuleClass">GTypeModuleClass</link>;
<link linkend="gboolean">gboolean</link>            <link linkend="g-type-module-use">g_type_module_use</link>                   (<link linkend="GTypeModule">GTypeModule</link> *module);
<link linkend="void">void</link>                <link linkend="g-type-module-unuse">g_type_module_unuse</link>                 (<link linkend="GTypeModule">GTypeModule</link> *module);
<link linkend="void">void</link>                <link linkend="g-type-module-set-name">g_type_module_set_name</link>              (<link linkend="GTypeModule">GTypeModule</link> *module,
                                                         const <link linkend="gchar">gchar</link> *name);
<link linkend="GType">GType</link>               <link linkend="g-type-module-register-type">g_type_module_register_type</link>         (<link linkend="GTypeModule">GTypeModule</link> *module,
                                                         <link linkend="GType">GType</link> parent_type,
                                                         const <link linkend="gchar">gchar</link> *type_name,
                                                         const <link linkend="GTypeInfo">GTypeInfo</link> *type_info,
                                                         <link linkend="GTypeFlags">GTypeFlags</link> flags);
<link linkend="void">void</link>                <link linkend="g-type-module-add-interface">g_type_module_add_interface</link>         (<link linkend="GTypeModule">GTypeModule</link> *module,
                                                         <link linkend="GType">GType</link> instance_type,
                                                         <link linkend="GType">GType</link> interface_type,
                                                         const <link linkend="GInterfaceInfo">GInterfaceInfo</link> *interface_info);
<link linkend="GType">GType</link>               <link linkend="g-type-module-register-enum">g_type_module_register_enum</link>         (<link linkend="GTypeModule">GTypeModule</link> *module,
                                                         const <link linkend="gchar">gchar</link> *name,
                                                         const <link linkend="GEnumValue">GEnumValue</link> *const_static_values);
<link linkend="GType">GType</link>               <link linkend="g-type-module-register-flags">g_type_module_register_flags</link>        (<link linkend="GTypeModule">GTypeModule</link> *module,
                                                         const <link linkend="gchar">gchar</link> *name,
                                                         const <link linkend="GFlagsValue">GFlagsValue</link> *const_static_values);
#define             <link linkend="G-DEFINE-DYNAMIC-TYPE--CAPS">G_DEFINE_DYNAMIC_TYPE</link>               (TN, t_n, T_P)
#define             <link linkend="G-DEFINE-DYNAMIC-TYPE-EXTENDED--CAPS">G_DEFINE_DYNAMIC_TYPE_EXTENDED</link>      (TypeName, type_name, TYPE_PARENT, flags, CODE)
</synopsis>
</refsynopsisdiv>

<refsect1 id="GTypeModule.object-hierarchy" role="object_hierarchy">
<title role="object_hierarchy.title">Object Hierarchy</title>
<synopsis>
  <link linkend="GObject">GObject</link>
   +----GTypeModule
</synopsis>
</refsect1>



<refsect1 id="GTypeModule.implemented-interfaces" role="impl_interfaces">
<title role="impl_interfaces.title">Implemented Interfaces</title>
<para>
GTypeModule implements
 <link linkend="GTypePlugin">GTypePlugin</link>.</para>
</refsect1>





<refsect1 id="GTypeModule.description" role="desc">
<title role="desc.title">Description</title>
<para>
<link linkend="GTypeModule"><type>GTypeModule</type></link> provides a simple implementation of the <link linkend="GTypePlugin"><type>GTypePlugin</type></link>
interface. The model of <link linkend="GTypeModule"><type>GTypeModule</type></link> is a dynamically loaded module
which implements some number of types and interface
implementations. When the module is loaded, it registers its types
and interfaces using <link linkend="g-type-module-register-type"><function>g_type_module_register_type()</function></link> and
<link linkend="g-type-module-add-interface"><function>g_type_module_add_interface()</function></link>.  As long as any instances of these
types and interface implementations are in use, the module is kept
loaded. When the types and interfaces are gone, the module may be
unloaded. If the types and interfaces become used again, the module
will be reloaded. Note that the last unref can not happen in module
code, since that would lead to the caller's code being unloaded before
<link linkend="g-object-unref"><function>g_object_unref()</function></link> returns to it.
</para>
<para>
Keeping track of whether the module should be loaded or not is done by
using a use count - it starts at zero, and whenever it is greater than
zero, the module is loaded. The use count is maintained internally by
the type system, but also can be explicitly controlled by
<link linkend="g-type-module-use"><function>g_type_module_use()</function></link> and <link linkend="g-type-module-unuse"><function>g_type_module_unuse()</function></link>. Typically, when loading
a module for the first type, <link linkend="g-type-module-use"><function>g_type_module_use()</function></link> will be used to load
it so that it can initialize its types. At some later point, when the
module no longer needs to be loaded except for the type
implementations it contains, <link linkend="g-type-module-unuse"><function>g_type_module_unuse()</function></link> is called.
</para>
<para>
<link linkend="GTypeModule"><type>GTypeModule</type></link> does not actually provide any implementation of module
loading and unloading. To create a particular module type you must
derive from <link linkend="GTypeModule"><type>GTypeModule</type></link> and implement the load and unload functions
in <link linkend="GTypeModuleClass"><type>GTypeModuleClass</type></link>.</para>
<para>
</para>
</refsect1>

<refsect1 id="GTypeModule.details" role="details">
<title role="details.title">Details</title>
<refsect2 id="GTypeModule-struct" role="struct">
<title>GTypeModule</title>
<indexterm zone="GTypeModule-struct"><primary sortas="TypeModule">GTypeModule</primary></indexterm><programlisting>typedef struct {
  gchar *name;
} GTypeModule;
</programlisting>
<para>
The members of the <structname>GTypeModule</structname> structure should not 
be accessed directly, except for the <parameter>name</parameter> field.</para>
<para>
</para><variablelist role="struct">
<varlistentry>
<term><link linkend="gchar">gchar</link>&#160;*<structfield>name</structfield>;</term>
<listitem><simpara> the name of the module
</simpara></listitem>
</varlistentry>
</variablelist></refsect2>
<refsect2 id="GTypeModuleClass" role="struct">
<title>GTypeModuleClass</title>
<indexterm zone="GTypeModuleClass"><primary sortas="TypeModuleClass">GTypeModuleClass</primary></indexterm><programlisting>typedef struct {
  GObjectClass parent_class;

  gboolean (* load)   (GTypeModule *module);
  void     (* unload) (GTypeModule *module);
} GTypeModuleClass;
</programlisting>
<para>
In order to implement dynamic loading of types based on <link linkend="GTypeModule"><type>GTypeModule</type></link>, 
the <parameter>load</parameter> and <parameter>unload</parameter> functions in <link linkend="GTypeModuleClass"><type>GTypeModuleClass</type></link> must be implemented.</para>
<para>
</para><variablelist role="struct">
<varlistentry>
<term><link linkend="GObjectClass">GObjectClass</link>&#160;<structfield>parent_class</structfield>;</term>
<listitem><simpara> the parent class
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>load</structfield>&#160;()</term>
<listitem><simpara> loads the module and registers one or more types using
 <link linkend="g-type-module-register-type"><function>g_type_module_register_type()</function></link>.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>unload</structfield>&#160;()</term>
<listitem><simpara> unloads the module
</simpara></listitem>
</varlistentry>
</variablelist></refsect2>
<refsect2 id="g-type-module-use" role="function">
<title>g_type_module_use ()</title>
<indexterm zone="g-type-module-use"><primary sortas="type_module_use">g_type_module_use</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            g_type_module_use                   (<link linkend="GTypeModule">GTypeModule</link> *module);</programlisting>
<para>
Increases the use count of a <link linkend="GTypeModule"><type>GTypeModule</type></link> by one. If the
use count was zero before, the plugin will be loaded.
If loading the plugin fails, the use count is reset to 
its prior value.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>module</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GTypeModule"><type>GTypeModule</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="FALSE--CAPS"><literal>FALSE</literal></link> if the plugin needed to be loaded and
 loading the plugin failed.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-type-module-unuse" role="function">
<title>g_type_module_unuse ()</title>
<indexterm zone="g-type-module-unuse"><primary sortas="type_module_unuse">g_type_module_unuse</primary></indexterm><programlisting><link linkend="void">void</link>                g_type_module_unuse                 (<link linkend="GTypeModule">GTypeModule</link> *module);</programlisting>
<para>
Decreases the use count of a <link linkend="GTypeModule"><type>GTypeModule</type></link> by one. If the
result is zero, the module will be unloaded. (However, the
<link linkend="GTypeModule"><type>GTypeModule</type></link> will not be freed, and types associated with the
<link linkend="GTypeModule"><type>GTypeModule</type></link> are not unregistered. Once a <link linkend="GTypeModule"><type>GTypeModule</type></link> is
initialized, it must exist forever.)</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>module</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GTypeModule"><type>GTypeModule</type></link>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-type-module-set-name" role="function">
<title>g_type_module_set_name ()</title>
<indexterm zone="g-type-module-set-name"><primary sortas="type_module_set_name">g_type_module_set_name</primary></indexterm><programlisting><link linkend="void">void</link>                g_type_module_set_name              (<link linkend="GTypeModule">GTypeModule</link> *module,
                                                         const <link linkend="gchar">gchar</link> *name);</programlisting>
<para>
Sets the name for a <link linkend="GTypeModule"><type>GTypeModule</type></link></para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>module</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GTypeModule"><type>GTypeModule</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>name</parameter>&#160;:</term>
<listitem><simpara> a human-readable name to use in error messages.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-type-module-register-type" role="function">
<title>g_type_module_register_type ()</title>
<indexterm zone="g-type-module-register-type"><primary sortas="type_module_register_type">g_type_module_register_type</primary></indexterm><programlisting><link linkend="GType">GType</link>               g_type_module_register_type         (<link linkend="GTypeModule">GTypeModule</link> *module,
                                                         <link linkend="GType">GType</link> parent_type,
                                                         const <link linkend="gchar">gchar</link> *type_name,
                                                         const <link linkend="GTypeInfo">GTypeInfo</link> *type_info,
                                                         <link linkend="GTypeFlags">GTypeFlags</link> flags);</programlisting>
<para>
Looks up or registers a type that is implemented with a particular
type plugin. If a type with name <parameter>type_name</parameter> was previously registered,
the <link linkend="GType"><type>GType</type></link> identifier for the type is returned, otherwise the type
is newly registered, and the resulting <link linkend="GType"><type>GType</type></link> identifier returned.
</para>
<para>
When reregistering a type (typically because a module is unloaded
then reloaded, and reinitialized), <parameter>module</parameter> and <parameter>parent_type</parameter> must
be the same as they were previously.
</para>
<para>
As long as any instances of the type exist, the type plugin will
not be unloaded.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>module</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GTypeModule"><type>GTypeModule</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>parent_type</parameter>&#160;:</term>
<listitem><simpara> the type for the parent class
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>type_name</parameter>&#160;:</term>
<listitem><simpara> name for the type
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>type_info</parameter>&#160;:</term>
<listitem><simpara> type information structure
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>flags</parameter>&#160;:</term>
<listitem><simpara> flags field providing details about the type
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the new or existing type ID
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-type-module-add-interface" role="function">
<title>g_type_module_add_interface ()</title>
<indexterm zone="g-type-module-add-interface"><primary sortas="type_module_add_interface">g_type_module_add_interface</primary></indexterm><programlisting><link linkend="void">void</link>                g_type_module_add_interface         (<link linkend="GTypeModule">GTypeModule</link> *module,
                                                         <link linkend="GType">GType</link> instance_type,
                                                         <link linkend="GType">GType</link> interface_type,
                                                         const <link linkend="GInterfaceInfo">GInterfaceInfo</link> *interface_info);</programlisting>
<para>
Registers an additional interface for a type, whose interface lives
in the given type plugin. If the interface was already registered
for the type in this plugin, nothing will be done.
</para>
<para>
As long as any instances of the type exist, the type plugin will
not be unloaded.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>module</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GTypeModule"><type>GTypeModule</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>instance_type</parameter>&#160;:</term>
<listitem><simpara> type to which to add the interface.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>interface_type</parameter>&#160;:</term>
<listitem><simpara> interface type to add
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>interface_info</parameter>&#160;:</term>
<listitem><simpara> type information structure
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-type-module-register-enum" role="function" condition="since:2.6">
<title>g_type_module_register_enum ()</title>
<indexterm zone="g-type-module-register-enum" role="2.6"><primary sortas="type_module_register_enum">g_type_module_register_enum</primary></indexterm><programlisting><link linkend="GType">GType</link>               g_type_module_register_enum         (<link linkend="GTypeModule">GTypeModule</link> *module,
                                                         const <link linkend="gchar">gchar</link> *name,
                                                         const <link linkend="GEnumValue">GEnumValue</link> *const_static_values);</programlisting>
<para>
Looks up or registers an enumeration that is implemented with a particular
type plugin. If a type with name <parameter>type_name</parameter> was previously registered,
the <link linkend="GType"><type>GType</type></link> identifier for the type is returned, otherwise the type
is newly registered, and the resulting <link linkend="GType"><type>GType</type></link> identifier returned.
</para>
<para>
As long as any instances of the type exist, the type plugin will
not be unloaded.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>module</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GTypeModule"><type>GTypeModule</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>name</parameter>&#160;:</term>
<listitem><simpara> name for the type
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>const_static_values</parameter>&#160;:</term>
<listitem><simpara> an array of <link linkend="GEnumValue"><type>GEnumValue</type></link> structs for the
                      possible enumeration values. The array is
                      terminated by a struct with all members being
                      0.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the new or existing type ID
</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.6</para></refsect2>
<refsect2 id="g-type-module-register-flags" role="function" condition="since:2.6">
<title>g_type_module_register_flags ()</title>
<indexterm zone="g-type-module-register-flags" role="2.6"><primary sortas="type_module_register_flags">g_type_module_register_flags</primary></indexterm><programlisting><link linkend="GType">GType</link>               g_type_module_register_flags        (<link linkend="GTypeModule">GTypeModule</link> *module,
                                                         const <link linkend="gchar">gchar</link> *name,
                                                         const <link linkend="GFlagsValue">GFlagsValue</link> *const_static_values);</programlisting>
<para>
Looks up or registers a flags type that is implemented with a particular
type plugin. If a type with name <parameter>type_name</parameter> was previously registered,
the <link linkend="GType"><type>GType</type></link> identifier for the type is returned, otherwise the type
is newly registered, and the resulting <link linkend="GType"><type>GType</type></link> identifier returned.
</para>
<para>
As long as any instances of the type exist, the type plugin will
not be unloaded.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>module</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GTypeModule"><type>GTypeModule</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>name</parameter>&#160;:</term>
<listitem><simpara> name for the type
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>const_static_values</parameter>&#160;:</term>
<listitem><simpara> an array of <link linkend="GFlagsValue"><type>GFlagsValue</type></link> structs for the
                      possible flags values. The array is
                      terminated by a struct with all members being
                      0.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the new or existing type ID
</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.6</para></refsect2>
<refsect2 id="G-DEFINE-DYNAMIC-TYPE--CAPS" role="macro" condition="since:2.14">
<title>G_DEFINE_DYNAMIC_TYPE()</title>
<indexterm zone="G-DEFINE-DYNAMIC-TYPE--CAPS" role="2.14"><primary sortas="DEFINE_DYNAMIC_TYPE">G_DEFINE_DYNAMIC_TYPE</primary></indexterm><programlisting>#define G_DEFINE_DYNAMIC_TYPE(TN, t_n, T_P)          G_DEFINE_DYNAMIC_TYPE_EXTENDED (TN, t_n, T_P, 0, {})
</programlisting>
<para>
A convenience macro for dynamic type implementations, which declares a
class initialization function, an instance initialization function (see 
<link linkend="GTypeInfo"><type>GTypeInfo</type></link> for information about these) and a static variable named 
<parameter>t_n</parameter><!-- -->_parent_class pointing to the parent class. Furthermore, 
it defines a <function>*<link linkend="get-type"><function>_get_type()</function></link></function> and a static 
<function>*<link linkend="register-type"><function>_register_type()</function></link></function> function for use in your
<function><link linkend="module-init"><function>module_init()</function></link></function>.
See <link linkend="G-DEFINE-DYNAMIC-TYPE-EXTENDED--CAPS"><function>G_DEFINE_DYNAMIC_TYPE_EXTENDED()</function></link> for an example.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>TN</parameter>&#160;:</term>
<listitem><simpara> The name of the new type, in Camel case.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>t_n</parameter>&#160;:</term>
<listitem><simpara> The name of the new type, in lowercase, with words
 separated by '_'.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>T_P</parameter>&#160;:</term>
<listitem><simpara> The <link linkend="GType"><type>GType</type></link> of the parent type.
</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.14</para></refsect2>
<refsect2 id="G-DEFINE-DYNAMIC-TYPE-EXTENDED--CAPS" role="macro" condition="since:2.14">
<title>G_DEFINE_DYNAMIC_TYPE_EXTENDED()</title>
<indexterm zone="G-DEFINE-DYNAMIC-TYPE-EXTENDED--CAPS" role="2.14"><primary sortas="DEFINE_DYNAMIC_TYPE_EXTENDED">G_DEFINE_DYNAMIC_TYPE_EXTENDED</primary></indexterm><programlisting>#define             G_DEFINE_DYNAMIC_TYPE_EXTENDED(TypeName, type_name, TYPE_PARENT, flags, CODE)</programlisting>
<para>
A more general version of <link linkend="G-DEFINE-DYNAMIC-TYPE--CAPS"><function>G_DEFINE_DYNAMIC_TYPE()</function></link> which
allows to specify <link linkend="GTypeFlags"><type>GTypeFlags</type></link> and custom code.
</para>
<para>
<informalexample><programlisting>
G_DEFINE_DYNAMIC_TYPE_EXTENDED (GtkGadget,
                                gtk_gadget,
                                GTK_TYPE_THING,
                                0,
                                G_IMPLEMENT_INTERFACE (TYPE_GIZMO,
                                                       gtk_gadget_gizmo_init));
</programlisting></informalexample>
expands to
<informalexample><programlisting>
static void     gtk_gadget_init              (GtkGadget      *self);
static void     gtk_gadget_class_init        (GtkGadgetClass *klass);
static void     gtk_gadget_class_finalize    (GtkGadgetClass *klass);

static gpointer gtk_gadget_parent_class = NULL;
static GType    gtk_gadget_type_id = 0;

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)
{
  return gtk_gadget_type_id;
}

static void
gtk_gadget_register_type (GTypeModule *type_module)
{
  const GTypeInfo g_define_type_info = {
    sizeof (GtkGadgetClass),
    (GBaseInitFunc) NULL,
    (GBaseFinalizeFunc) NULL,
    (GClassInitFunc) gtk_gadget_class_intern_init,
    (GClassFinalizeFunc) gtk_gadget_class_finalize,
    NULL,   // class_data
    sizeof (GtkGadget),
    0,      // n_preallocs
    (GInstanceInitFunc) gtk_gadget_init, 
    NULL    // value_table
  };
  gtk_gadget_type_id = g_type_module_register_type (type_module,
                                                    GTK_TYPE_THING,
                                                    GtkGadget,
                                                    &amp;g_define_type_info,
                                                    (GTypeFlags) flags);
  {
    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);
  }
}
</programlisting></informalexample></para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>TypeName</parameter>&#160;:</term>
<listitem><simpara> The name of the new type, in Camel case.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>type_name</parameter>&#160;:</term>
<listitem><simpara> The name of the new type, in lowercase, with words
 separated by '_'.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>TYPE_PARENT</parameter>&#160;:</term>
<listitem><simpara> The <link linkend="GType"><type>GType</type></link> of the parent type.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>flags</parameter>&#160;:</term>
<listitem><simpara> <link linkend="GTypeFlags"><type>GTypeFlags</type></link> to pass to <link linkend="g-type-module-register-type"><function>g_type_module_register_type()</function></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>CODE</parameter>&#160;:</term>
<listitem><simpara> Custom code that gets inserted in the *<link linkend="get-type"><function>_get_type()</function></link> function.
</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.14</para></refsect2>

</refsect1>



<refsect1 id="GTypeModule.see-also">
<title>See Also</title>
<variablelist>
<varlistentry>
<term><link linkend="GTypePlugin"><type>GTypePlugin</type></link></term>
<listitem><para>The abstract type loader interface.</para></listitem>
</varlistentry>
<varlistentry>
<term><link linkend="GModule"><type>GModule</type></link></term>
<listitem><para>Portable mechanism for dynamically loaded modules.</para></listitem>
</varlistentry>
</variablelist>
</refsect1>

</refentry>
