<?xml version="1.0"?>
<!DOCTYPE refentry PUBLIC '-//OASIS//DTD DocBook XML V4.5//EN'
                      'http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd' [

<!ENTITY % local.common.attrib "xmlns:xi  CDATA  #FIXED 'http://www.w3.org/2003/XInclude'">
<!ENTITY version SYSTEM "version.xml">
]>
<refentry id="gobject-Boxed-Types">
<refmeta>
<refentrytitle role="top_of_page" id="gobject-Boxed-Types.top_of_page">Boxed Types</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GOBJECT Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>Boxed Types</refname>
<refpurpose>A mechanism to wrap opaque C structures registered
    by the type system</refpurpose>
</refnamediv>

<refsect1 id="gobject-Boxed-Types.functions" role="functions_proto">
<title role="functions_proto.title">Functions</title>
<informaltable pgwide="1" frame="none">
<tgroup cols="2">
<colspec colname="functions_return" colwidth="150px"/>
<colspec colname="functions_name"/>
<tbody>
<row><entry role="function_type"><link linkend="gpointer"><returnvalue>gpointer</returnvalue></link>
</entry><entry role="function_name"><phrase role="c_punctuation">(</phrase><link linkend="GBoxedCopyFunc">*GBoxedCopyFunc</link><phrase role="c_punctuation">)</phrase>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><phrase role="c_punctuation">(</phrase><link linkend="GBoxedFreeFunc">*GBoxedFreeFunc</link><phrase role="c_punctuation">)</phrase>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gpointer"><returnvalue>gpointer</returnvalue></link>
</entry><entry role="function_name"><link linkend="g-boxed-copy">g_boxed_copy</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="g-boxed-free">g_boxed_free</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GType"><returnvalue>GType</returnvalue></link>
</entry><entry role="function_name"><link linkend="g-boxed-type-register-static">g_boxed_type_register_static</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GType"><returnvalue>GType</returnvalue></link>
</entry><entry role="function_name"><link linkend="g-pointer-type-register-static">g_pointer_type_register_static</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="gobject-Boxed-Types.other" role="other_proto">
<title role="other_proto.title">Types and Values</title>
<informaltable role="enum_members_table" pgwide="1" frame="none">
<tgroup cols="2">
<colspec colname="name" colwidth="150px"/>
<colspec colname="description"/>
<tbody>
<row><entry role="define_keyword">#define</entry><entry role="function_name"><link linkend="G-TYPE-HASH-TABLE:CAPS">G_TYPE_HASH_TABLE</link></entry></row>
<row><entry role="define_keyword">#define</entry><entry role="function_name"><link linkend="G-TYPE-DATE:CAPS">G_TYPE_DATE</link></entry></row>
<row><entry role="define_keyword">#define</entry><entry role="function_name"><link linkend="G-TYPE-GSTRING:CAPS">G_TYPE_GSTRING</link></entry></row>
<row><entry role="define_keyword">#define</entry><entry role="function_name"><link linkend="G-TYPE-STRV:CAPS">G_TYPE_STRV</link></entry></row>
<row><entry role="define_keyword">#define</entry><entry role="function_name"><link linkend="G-TYPE-REGEX:CAPS">G_TYPE_REGEX</link></entry></row>
<row><entry role="define_keyword">#define</entry><entry role="function_name"><link linkend="G-TYPE-MATCH-INFO:CAPS">G_TYPE_MATCH_INFO</link></entry></row>
<row><entry role="define_keyword">#define</entry><entry role="function_name"><link linkend="G-TYPE-ARRAY:CAPS">G_TYPE_ARRAY</link></entry></row>
<row><entry role="define_keyword">#define</entry><entry role="function_name"><link linkend="G-TYPE-BYTE-ARRAY:CAPS">G_TYPE_BYTE_ARRAY</link></entry></row>
<row><entry role="define_keyword">#define</entry><entry role="function_name"><link linkend="G-TYPE-PTR-ARRAY:CAPS">G_TYPE_PTR_ARRAY</link></entry></row>
<row><entry role="define_keyword">#define</entry><entry role="function_name"><link linkend="G-TYPE-BYTES:CAPS">G_TYPE_BYTES</link></entry></row>
<row><entry role="define_keyword">#define</entry><entry role="function_name"><link linkend="G-TYPE-VARIANT-TYPE:CAPS">G_TYPE_VARIANT_TYPE</link></entry></row>
<row><entry role="define_keyword">#define</entry><entry role="function_name"><link linkend="G-TYPE-ERROR:CAPS">G_TYPE_ERROR</link></entry></row>
<row><entry role="define_keyword">#define</entry><entry role="function_name"><link linkend="G-TYPE-DATE-TIME:CAPS">G_TYPE_DATE_TIME</link></entry></row>
<row><entry role="define_keyword">#define</entry><entry role="function_name"><link linkend="G-TYPE-TIME-ZONE:CAPS">G_TYPE_TIME_ZONE</link></entry></row>
<row><entry role="define_keyword">#define</entry><entry role="function_name"><link linkend="G-TYPE-IO-CHANNEL:CAPS">G_TYPE_IO_CHANNEL</link></entry></row>
<row><entry role="define_keyword">#define</entry><entry role="function_name"><link linkend="G-TYPE-IO-CONDITION:CAPS">G_TYPE_IO_CONDITION</link></entry></row>
<row><entry role="define_keyword">#define</entry><entry role="function_name"><link linkend="G-TYPE-VARIANT-BUILDER:CAPS">G_TYPE_VARIANT_BUILDER</link></entry></row>
<row><entry role="define_keyword">#define</entry><entry role="function_name"><link linkend="G-TYPE-VARIANT-DICT:CAPS">G_TYPE_VARIANT_DICT</link></entry></row>
<row><entry role="define_keyword">#define</entry><entry role="function_name"><link linkend="G-TYPE-KEY-FILE:CAPS">G_TYPE_KEY_FILE</link></entry></row>
<row><entry role="define_keyword">#define</entry><entry role="function_name"><link linkend="G-TYPE-MAIN-CONTEXT:CAPS">G_TYPE_MAIN_CONTEXT</link></entry></row>
<row><entry role="define_keyword">#define</entry><entry role="function_name"><link linkend="G-TYPE-MAIN-LOOP:CAPS">G_TYPE_MAIN_LOOP</link></entry></row>
<row><entry role="define_keyword">#define</entry><entry role="function_name"><link linkend="G-TYPE-MAPPED-FILE:CAPS">G_TYPE_MAPPED_FILE</link></entry></row>
<row><entry role="define_keyword">#define</entry><entry role="function_name"><link linkend="G-TYPE-MARKUP-PARSE-CONTEXT:CAPS">G_TYPE_MARKUP_PARSE_CONTEXT</link></entry></row>
<row><entry role="define_keyword">#define</entry><entry role="function_name"><link linkend="G-TYPE-SOURCE:CAPS">G_TYPE_SOURCE</link></entry></row>
<row><entry role="define_keyword">#define</entry><entry role="function_name"><link linkend="G-TYPE-POLLFD:CAPS">G_TYPE_POLLFD</link></entry></row>
<row><entry role="define_keyword">#define</entry><entry role="function_name"><link linkend="G-TYPE-THREAD:CAPS">G_TYPE_THREAD</link></entry></row>
<row><entry role="define_keyword">#define</entry><entry role="function_name"><link linkend="G-TYPE-OPTION-GROUP:CAPS">G_TYPE_OPTION_GROUP</link></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>

<refsect1 id="gobject-Boxed-Types.includes"><title>Includes</title><synopsis>#include &lt;glib-object.h&gt;
</synopsis></refsect1>

<refsect1 id="gobject-Boxed-Types.description" role="desc">
<title role="desc.title">Description</title>
<para>GBoxed is a generic wrapper mechanism for arbitrary C structures. The only
thing the type system needs to know about the structures is how to copy and
free them, beyond that they are treated as opaque chunks of memory.</para>
<para>Boxed types are useful for simple value-holder structures like rectangles or
points. They can also be used for wrapping structures defined in non-GObject
based libraries.</para>

</refsect1>
<refsect1 id="gobject-Boxed-Types.functions_details" role="details">
<title role="details.title">Functions</title>
<refsect2 id="GBoxedCopyFunc" role="function">
<title>GBoxedCopyFunc&#160;()</title>
<indexterm zone="GBoxedCopyFunc"><primary sortas="BoxedCopyFunc">GBoxedCopyFunc</primary></indexterm>
<programlisting language="C"><link linkend="gpointer"><returnvalue>gpointer</returnvalue></link>
<phrase role="c_punctuation">(</phrase>*GBoxedCopyFunc<phrase role="c_punctuation">)</phrase> (<parameter><link linkend="gpointer"><type>gpointer</type></link> boxed</parameter>);</programlisting>
<para>This function is provided by the user and should produce a copy
of the passed in boxed structure.</para>
<refsect3 id="GBoxedCopyFunc.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>boxed</para></entry>
<entry role="parameter_description"><para>The boxed structure to be copied. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>not nullable</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="GBoxedCopyFunc.returns" role="returns">
<title>Returns</title>
<para>The newly created copy of the boxed structure. </para>
<para><emphasis role="annotation">[<acronym>not nullable</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="GBoxedFreeFunc" role="function">
<title>GBoxedFreeFunc&#160;()</title>
<indexterm zone="GBoxedFreeFunc"><primary sortas="BoxedFreeFunc">GBoxedFreeFunc</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
<phrase role="c_punctuation">(</phrase>*GBoxedFreeFunc<phrase role="c_punctuation">)</phrase> (<parameter><link linkend="gpointer"><type>gpointer</type></link> boxed</parameter>);</programlisting>
<para>This function is provided by the user and should free the boxed
structure passed.</para>
<refsect3 id="GBoxedFreeFunc.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>boxed</para></entry>
<entry role="parameter_description"><para>The boxed structure to be freed. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>not nullable</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="g-boxed-copy" role="function">
<title>g_boxed_copy&#160;()</title>
<indexterm zone="g-boxed-copy"><primary sortas="boxed_copy">g_boxed_copy</primary></indexterm>
<programlisting language="C"><link linkend="gpointer"><returnvalue>gpointer</returnvalue></link>
g_boxed_copy (<parameter><link linkend="GType"><type>GType</type></link> boxed_type</parameter>,
              <parameter><link linkend="gconstpointer"><type>gconstpointer</type></link> src_boxed</parameter>);</programlisting>
<para>Provide a copy of a boxed structure <parameter>src_boxed</parameter>
 which is of type <parameter>boxed_type</parameter>
.</para>
<refsect3 id="g-boxed-copy.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>boxed_type</para></entry>
<entry role="parameter_description"><para>The type of <parameter>src_boxed</parameter>
.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>src_boxed</para></entry>
<entry role="parameter_description"><para>The boxed structure to be copied. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>not nullable</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="g-boxed-copy.returns" role="returns">
<title>Returns</title>
<para>The newly created copy of the boxed
structure. </para>
<para><emphasis role="annotation">[<acronym>transfer full</acronym>][<acronym>not nullable</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="g-boxed-free" role="function">
<title>g_boxed_free&#160;()</title>
<indexterm zone="g-boxed-free"><primary sortas="boxed_free">g_boxed_free</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
g_boxed_free (<parameter><link linkend="GType"><type>GType</type></link> boxed_type</parameter>,
              <parameter><link linkend="gpointer"><type>gpointer</type></link> boxed</parameter>);</programlisting>
<para>Free the boxed structure <parameter>boxed</parameter>
 which is of type <parameter>boxed_type</parameter>
.</para>
<refsect3 id="g-boxed-free.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>boxed_type</para></entry>
<entry role="parameter_description"><para>The type of <parameter>boxed</parameter>
.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>boxed</para></entry>
<entry role="parameter_description"><para>The boxed structure to be freed. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>not nullable</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="g-boxed-type-register-static" role="function">
<title>g_boxed_type_register_static&#160;()</title>
<indexterm zone="g-boxed-type-register-static"><primary sortas="boxed_type_register_static">g_boxed_type_register_static</primary></indexterm>
<programlisting language="C"><link linkend="GType"><returnvalue>GType</returnvalue></link>
g_boxed_type_register_static (<parameter>const <link linkend="gchar"><type>gchar</type></link> *name</parameter>,
                              <parameter><link linkend="GBoxedCopyFunc"><type>GBoxedCopyFunc</type></link> boxed_copy</parameter>,
                              <parameter><link linkend="GBoxedFreeFunc"><type>GBoxedFreeFunc</type></link> boxed_free</parameter>);</programlisting>
<para>This function creates a new <link linkend="G-TYPE-BOXED:CAPS"><literal>G_TYPE_BOXED</literal></link> derived type id for a new
boxed type with name <parameter>name</parameter>
. Boxed type handling functions have to be
provided to copy and free opaque boxed structures of this type.</para>
<refsect3 id="g-boxed-type-register-static.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>name</para></entry>
<entry role="parameter_description"><para>Name of the new boxed type.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>boxed_copy</para></entry>
<entry role="parameter_description"><para>Boxed structure copy function.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>boxed_free</para></entry>
<entry role="parameter_description"><para>Boxed structure free function.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="g-boxed-type-register-static.returns" role="returns">
<title>Returns</title>
<para> New <link linkend="G-TYPE-BOXED:CAPS"><literal>G_TYPE_BOXED</literal></link> derived type id for <parameter>name</parameter>
.</para>
</refsect3></refsect2>
<refsect2 id="g-pointer-type-register-static" role="function">
<title>g_pointer_type_register_static&#160;()</title>
<indexterm zone="g-pointer-type-register-static"><primary sortas="pointer_type_register_static">g_pointer_type_register_static</primary></indexterm>
<programlisting language="C"><link linkend="GType"><returnvalue>GType</returnvalue></link>
g_pointer_type_register_static (<parameter>const <link linkend="gchar"><type>gchar</type></link> *name</parameter>);</programlisting>
<para>Creates a new <link linkend="G-TYPE-POINTER:CAPS"><literal>G_TYPE_POINTER</literal></link> derived type id for a new
pointer type with name <parameter>name</parameter>
.</para>
<refsect3 id="g-pointer-type-register-static.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>name</para></entry>
<entry role="parameter_description"><para>the name of the new pointer type.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="g-pointer-type-register-static.returns" role="returns">
<title>Returns</title>
<para> a new <link linkend="G-TYPE-POINTER:CAPS"><literal>G_TYPE_POINTER</literal></link> derived type id for <parameter>name</parameter>
.</para>
</refsect3></refsect2>

</refsect1>
<refsect1 id="gobject-Boxed-Types.other_details" role="details">
<title role="details.title">Types and Values</title>
<refsect2 id="G-TYPE-HASH-TABLE:CAPS" role="macro" condition="since:2.10">
<title>G_TYPE_HASH_TABLE</title>
<indexterm zone="G-TYPE-HASH-TABLE:CAPS" role="2.10"><primary sortas="TYPE_HASH_TABLE">G_TYPE_HASH_TABLE</primary></indexterm>
<programlisting language="C">#define G_TYPE_HASH_TABLE (g_hash_table_get_type ())
</programlisting>
<para>The <link linkend="GType"><type>GType</type></link> for a boxed type holding a <link linkend="GHashTable"><type>GHashTable</type></link> reference.</para>
<para role="since">Since: <link linkend="api-index-2.10">2.10</link></para></refsect2>
<refsect2 id="G-TYPE-DATE:CAPS" role="macro">
<title>G_TYPE_DATE</title>
<indexterm zone="G-TYPE-DATE:CAPS"><primary sortas="TYPE_DATE">G_TYPE_DATE</primary></indexterm>
<programlisting language="C">#define G_TYPE_DATE (g_date_get_type ())
</programlisting>
<para>The <link linkend="GType"><type>GType</type></link> for <link linkend="GDate"><type>GDate</type></link>.</para>
</refsect2>
<refsect2 id="G-TYPE-GSTRING:CAPS" role="macro">
<title>G_TYPE_GSTRING</title>
<indexterm zone="G-TYPE-GSTRING:CAPS"><primary sortas="TYPE_GSTRING">G_TYPE_GSTRING</primary></indexterm>
<programlisting language="C">#define G_TYPE_GSTRING (g_gstring_get_type ())
</programlisting>
<para>The <link linkend="GType"><type>GType</type></link> for <link linkend="GString"><type>GString</type></link>.</para>
</refsect2>
<refsect2 id="G-TYPE-STRV:CAPS" role="macro" condition="since:2.4">
<title>G_TYPE_STRV</title>
<indexterm zone="G-TYPE-STRV:CAPS" role="2.4"><primary sortas="TYPE_STRV">G_TYPE_STRV</primary></indexterm>
<programlisting language="C">#define G_TYPE_STRV (g_strv_get_type ())
</programlisting>
<para>The <link linkend="GType"><type>GType</type></link> for a boxed type holding a <link linkend="NULL:CAPS"><literal>NULL</literal></link>-terminated array of strings.</para>
<para>The code fragments in the following example show the use of a property of
type <link linkend="G-TYPE-STRV:CAPS"><type>G_TYPE_STRV</type></link> with <link linkend="g-object-class-install-property"><function>g_object_class_install_property()</function></link>, <link linkend="g-object-set"><function>g_object_set()</function></link>
and <link linkend="g-object-get"><function>g_object_get()</function></link>.</para>
<informalexample><programlisting role="example"><![CDATA[
g_object_class_install_property (object_class,
                                 PROP_AUTHORS,
                                 g_param_spec_boxed ("authors",
                                                     _("Authors"),
                                                     _("List of authors"),
                                                     G_TYPE_STRV,
                                                     G_PARAM_READWRITE));

gchar *authors[] = { "Owen", "Tim", NULL };
g_object_set (obj, "authors", authors, NULL);

gchar *writers[];
g_object_get (obj, "authors", &writers, NULL);
/* do something with writers */
g_strfreev (writers);
]]></programlisting></informalexample>
<para></para>
<para role="since">Since: <link linkend="api-index-2.4">2.4</link></para></refsect2>
<refsect2 id="G-TYPE-REGEX:CAPS" role="macro" condition="since:2.14">
<title>G_TYPE_REGEX</title>
<indexterm zone="G-TYPE-REGEX:CAPS" role="2.14"><primary sortas="TYPE_REGEX">G_TYPE_REGEX</primary></indexterm>
<programlisting language="C">#define G_TYPE_REGEX (g_regex_get_type ())
</programlisting>
<para>The <link linkend="GType"><type>GType</type></link> for a boxed type holding a <link linkend="GRegex"><type>GRegex</type></link> reference.</para>
<para role="since">Since: <link linkend="api-index-2.14">2.14</link></para></refsect2>
<refsect2 id="G-TYPE-MATCH-INFO:CAPS" role="macro" condition="since:2.30">
<title>G_TYPE_MATCH_INFO</title>
<indexterm zone="G-TYPE-MATCH-INFO:CAPS" role="2.30"><primary sortas="TYPE_MATCH_INFO">G_TYPE_MATCH_INFO</primary></indexterm>
<programlisting language="C">#define G_TYPE_MATCH_INFO (g_match_info_get_type ())
</programlisting>
<para>The <link linkend="GType"><type>GType</type></link> for a boxed type holding a <link linkend="GMatchInfo"><type>GMatchInfo</type></link> reference.</para>
<para role="since">Since: <link linkend="api-index-2.30">2.30</link></para></refsect2>
<refsect2 id="G-TYPE-ARRAY:CAPS" role="macro" condition="since:2.22">
<title>G_TYPE_ARRAY</title>
<indexterm zone="G-TYPE-ARRAY:CAPS" role="2.22"><primary sortas="TYPE_ARRAY">G_TYPE_ARRAY</primary></indexterm>
<programlisting language="C">#define G_TYPE_ARRAY (g_array_get_type ())
</programlisting>
<para>The <link linkend="GType"><type>GType</type></link> for a boxed type holding a <link linkend="GArray"><type>GArray</type></link> reference.</para>
<para role="since">Since: <link linkend="api-index-2.22">2.22</link></para></refsect2>
<refsect2 id="G-TYPE-BYTE-ARRAY:CAPS" role="macro" condition="since:2.22">
<title>G_TYPE_BYTE_ARRAY</title>
<indexterm zone="G-TYPE-BYTE-ARRAY:CAPS" role="2.22"><primary sortas="TYPE_BYTE_ARRAY">G_TYPE_BYTE_ARRAY</primary></indexterm>
<programlisting language="C">#define G_TYPE_BYTE_ARRAY (g_byte_array_get_type ())
</programlisting>
<para>The <link linkend="GType"><type>GType</type></link> for a boxed type holding a <link linkend="GByteArray"><type>GByteArray</type></link> reference.</para>
<para role="since">Since: <link linkend="api-index-2.22">2.22</link></para></refsect2>
<refsect2 id="G-TYPE-PTR-ARRAY:CAPS" role="macro" condition="since:2.22">
<title>G_TYPE_PTR_ARRAY</title>
<indexterm zone="G-TYPE-PTR-ARRAY:CAPS" role="2.22"><primary sortas="TYPE_PTR_ARRAY">G_TYPE_PTR_ARRAY</primary></indexterm>
<programlisting language="C">#define G_TYPE_PTR_ARRAY (g_ptr_array_get_type ())
</programlisting>
<para>The <link linkend="GType"><type>GType</type></link> for a boxed type holding a <link linkend="GPtrArray"><type>GPtrArray</type></link> reference.</para>
<para role="since">Since: <link linkend="api-index-2.22">2.22</link></para></refsect2>
<refsect2 id="G-TYPE-BYTES:CAPS" role="macro" condition="since:2.32">
<title>G_TYPE_BYTES</title>
<indexterm zone="G-TYPE-BYTES:CAPS" role="2.32"><primary sortas="TYPE_BYTES">G_TYPE_BYTES</primary></indexterm>
<programlisting language="C">#define G_TYPE_BYTES (g_bytes_get_type ())
</programlisting>
<para>The <link linkend="GType"><type>GType</type></link> for <link linkend="GBytes"><type>GBytes</type></link>.</para>
<para role="since">Since: <link linkend="api-index-2.32">2.32</link></para></refsect2>
<refsect2 id="G-TYPE-VARIANT-TYPE:CAPS" role="macro" condition="since:2.24">
<title>G_TYPE_VARIANT_TYPE</title>
<indexterm zone="G-TYPE-VARIANT-TYPE:CAPS" role="2.24"><primary sortas="TYPE_VARIANT_TYPE">G_TYPE_VARIANT_TYPE</primary></indexterm>
<programlisting language="C">#define G_TYPE_VARIANT_TYPE (g_variant_type_get_gtype ())
</programlisting>
<para>The <link linkend="GType"><type>GType</type></link> for a boxed type holding a <link linkend="GVariantType"><type>GVariantType</type></link>.</para>
<para role="since">Since: <link linkend="api-index-2.24">2.24</link></para></refsect2>
<refsect2 id="G-TYPE-ERROR:CAPS" role="macro" condition="since:2.26">
<title>G_TYPE_ERROR</title>
<indexterm zone="G-TYPE-ERROR:CAPS" role="2.26"><primary sortas="TYPE_ERROR">G_TYPE_ERROR</primary></indexterm>
<programlisting language="C">#define G_TYPE_ERROR (g_error_get_type ())
</programlisting>
<para>The <link linkend="GType"><type>GType</type></link> for a boxed type holding a <link linkend="GError"><type>GError</type></link>.</para>
<para role="since">Since: <link linkend="api-index-2.26">2.26</link></para></refsect2>
<refsect2 id="G-TYPE-DATE-TIME:CAPS" role="macro" condition="since:2.26">
<title>G_TYPE_DATE_TIME</title>
<indexterm zone="G-TYPE-DATE-TIME:CAPS" role="2.26"><primary sortas="TYPE_DATE_TIME">G_TYPE_DATE_TIME</primary></indexterm>
<programlisting language="C">#define G_TYPE_DATE_TIME (g_date_time_get_type ())
</programlisting>
<para>The <link linkend="GType"><type>GType</type></link> for a boxed type holding a <link linkend="GDateTime"><type>GDateTime</type></link>.</para>
<para role="since">Since: <link linkend="api-index-2.26">2.26</link></para></refsect2>
<refsect2 id="G-TYPE-TIME-ZONE:CAPS" role="macro" condition="since:2.34">
<title>G_TYPE_TIME_ZONE</title>
<indexterm zone="G-TYPE-TIME-ZONE:CAPS" role="2.34"><primary sortas="TYPE_TIME_ZONE">G_TYPE_TIME_ZONE</primary></indexterm>
<programlisting language="C">#define G_TYPE_TIME_ZONE (g_time_zone_get_type ())
</programlisting>
<para>The <link linkend="GType"><type>GType</type></link> for a boxed type holding a <link linkend="GTimeZone"><type>GTimeZone</type></link>.</para>
<para role="since">Since: <link linkend="api-index-2.34">2.34</link></para></refsect2>
<refsect2 id="G-TYPE-IO-CHANNEL:CAPS" role="macro">
<title>G_TYPE_IO_CHANNEL</title>
<indexterm zone="G-TYPE-IO-CHANNEL:CAPS"><primary sortas="TYPE_IO_CHANNEL">G_TYPE_IO_CHANNEL</primary></indexterm>
<programlisting language="C">#define G_TYPE_IO_CHANNEL (g_io_channel_get_type ())
</programlisting>
<para>The <link linkend="GType"><type>GType</type></link> for <link linkend="GIOChannel"><type>GIOChannel</type></link>.</para>
</refsect2>
<refsect2 id="G-TYPE-IO-CONDITION:CAPS" role="macro">
<title>G_TYPE_IO_CONDITION</title>
<indexterm zone="G-TYPE-IO-CONDITION:CAPS"><primary sortas="TYPE_IO_CONDITION">G_TYPE_IO_CONDITION</primary></indexterm>
<programlisting language="C">#define G_TYPE_IO_CONDITION (g_io_condition_get_type ())
</programlisting>
<para>The <link linkend="GType"><type>GType</type></link> for <link linkend="GIOCondition"><type>GIOCondition</type></link>.</para>
</refsect2>
<refsect2 id="G-TYPE-VARIANT-BUILDER:CAPS" role="macro" condition="since:2.30">
<title>G_TYPE_VARIANT_BUILDER</title>
<indexterm zone="G-TYPE-VARIANT-BUILDER:CAPS" role="2.30"><primary sortas="TYPE_VARIANT_BUILDER">G_TYPE_VARIANT_BUILDER</primary></indexterm>
<programlisting language="C">#define G_TYPE_VARIANT_BUILDER (g_variant_builder_get_type ())
</programlisting>
<para>The <link linkend="GType"><type>GType</type></link> for a boxed type holding a <link linkend="GVariantBuilder"><type>GVariantBuilder</type></link>.</para>
<para role="since">Since: <link linkend="api-index-2.30">2.30</link></para></refsect2>
<refsect2 id="G-TYPE-VARIANT-DICT:CAPS" role="macro" condition="since:2.40">
<title>G_TYPE_VARIANT_DICT</title>
<indexterm zone="G-TYPE-VARIANT-DICT:CAPS" role="2.40"><primary sortas="TYPE_VARIANT_DICT">G_TYPE_VARIANT_DICT</primary></indexterm>
<programlisting language="C">#define G_TYPE_VARIANT_DICT (g_variant_dict_get_type ())
</programlisting>
<para>The <link linkend="GType"><type>GType</type></link> for a boxed type holding a <link linkend="GVariantDict"><type>GVariantDict</type></link>.</para>
<para role="since">Since: <link linkend="api-index-2.40">2.40</link></para></refsect2>
<refsect2 id="G-TYPE-KEY-FILE:CAPS" role="macro" condition="since:2.32">
<title>G_TYPE_KEY_FILE</title>
<indexterm zone="G-TYPE-KEY-FILE:CAPS" role="2.32"><primary sortas="TYPE_KEY_FILE">G_TYPE_KEY_FILE</primary></indexterm>
<programlisting language="C">#define G_TYPE_KEY_FILE (g_key_file_get_type ())
</programlisting>
<para>The <link linkend="GType"><type>GType</type></link> for a boxed type holding a <link linkend="GKeyFile"><type>GKeyFile</type></link>.</para>
<para role="since">Since: <link linkend="api-index-2.32">2.32</link></para></refsect2>
<refsect2 id="G-TYPE-MAIN-CONTEXT:CAPS" role="macro" condition="since:2.30">
<title>G_TYPE_MAIN_CONTEXT</title>
<indexterm zone="G-TYPE-MAIN-CONTEXT:CAPS" role="2.30"><primary sortas="TYPE_MAIN_CONTEXT">G_TYPE_MAIN_CONTEXT</primary></indexterm>
<programlisting language="C">#define G_TYPE_MAIN_CONTEXT (g_main_context_get_type ())
</programlisting>
<para>The <link linkend="GType"><type>GType</type></link> for a boxed type holding a <link linkend="GMainContext"><type>GMainContext</type></link>.</para>
<para role="since">Since: <link linkend="api-index-2.30">2.30</link></para></refsect2>
<refsect2 id="G-TYPE-MAIN-LOOP:CAPS" role="macro" condition="since:2.30">
<title>G_TYPE_MAIN_LOOP</title>
<indexterm zone="G-TYPE-MAIN-LOOP:CAPS" role="2.30"><primary sortas="TYPE_MAIN_LOOP">G_TYPE_MAIN_LOOP</primary></indexterm>
<programlisting language="C">#define G_TYPE_MAIN_LOOP (g_main_loop_get_type ())
</programlisting>
<para>The <link linkend="GType"><type>GType</type></link> for a boxed type holding a <link linkend="GMainLoop"><type>GMainLoop</type></link>.</para>
<para role="since">Since: <link linkend="api-index-2.30">2.30</link></para></refsect2>
<refsect2 id="G-TYPE-MAPPED-FILE:CAPS" role="macro" condition="since:2.40">
<title>G_TYPE_MAPPED_FILE</title>
<indexterm zone="G-TYPE-MAPPED-FILE:CAPS" role="2.40"><primary sortas="TYPE_MAPPED_FILE">G_TYPE_MAPPED_FILE</primary></indexterm>
<programlisting language="C">#define G_TYPE_MAPPED_FILE (g_mapped_file_get_type ())
</programlisting>
<para>The <link linkend="GType"><type>GType</type></link> for a boxed type holding a <link linkend="GMappedFile"><type>GMappedFile</type></link>.</para>
<para role="since">Since: <link linkend="api-index-2.40">2.40</link></para></refsect2>
<refsect2 id="G-TYPE-MARKUP-PARSE-CONTEXT:CAPS" role="macro" condition="since:2.36">
<title>G_TYPE_MARKUP_PARSE_CONTEXT</title>
<indexterm zone="G-TYPE-MARKUP-PARSE-CONTEXT:CAPS" role="2.36"><primary sortas="TYPE_MARKUP_PARSE_CONTEXT">G_TYPE_MARKUP_PARSE_CONTEXT</primary></indexterm>
<programlisting language="C">#define G_TYPE_MARKUP_PARSE_CONTEXT (g_markup_parse_context_get_type ())
</programlisting>
<para>The <link linkend="GType"><type>GType</type></link> for a boxed type holding a <link linkend="GMarkupParseContext"><type>GMarkupParseContext</type></link>.</para>
<para role="since">Since: <link linkend="api-index-2.36">2.36</link></para></refsect2>
<refsect2 id="G-TYPE-SOURCE:CAPS" role="macro" condition="since:2.30">
<title>G_TYPE_SOURCE</title>
<indexterm zone="G-TYPE-SOURCE:CAPS" role="2.30"><primary sortas="TYPE_SOURCE">G_TYPE_SOURCE</primary></indexterm>
<programlisting language="C">#define G_TYPE_SOURCE (g_source_get_type ())
</programlisting>
<para>The <link linkend="GType"><type>GType</type></link> for a boxed type holding a <link linkend="GSource"><type>GSource</type></link>.</para>
<para role="since">Since: <link linkend="api-index-2.30">2.30</link></para></refsect2>
<refsect2 id="G-TYPE-POLLFD:CAPS" role="macro" condition="since:2.36">
<title>G_TYPE_POLLFD</title>
<indexterm zone="G-TYPE-POLLFD:CAPS" role="2.36"><primary sortas="TYPE_POLLFD">G_TYPE_POLLFD</primary></indexterm>
<programlisting language="C">#define G_TYPE_POLLFD (g_pollfd_get_type ())
</programlisting>
<para>The <link linkend="GType"><type>GType</type></link> for a boxed type holding a <link linkend="GPollFD"><type>GPollFD</type></link>.</para>
<para role="since">Since: <link linkend="api-index-2.36">2.36</link></para></refsect2>
<refsect2 id="G-TYPE-THREAD:CAPS" role="macro" condition="since:2.36">
<title>G_TYPE_THREAD</title>
<indexterm zone="G-TYPE-THREAD:CAPS" role="2.36"><primary sortas="TYPE_THREAD">G_TYPE_THREAD</primary></indexterm>
<programlisting language="C">#define G_TYPE_THREAD (g_thread_get_type ())
</programlisting>
<para>The <link linkend="GType"><type>GType</type></link> for a boxed type holding a <link linkend="GThread"><type>GThread</type></link>.</para>
<para role="since">Since: <link linkend="api-index-2.36">2.36</link></para></refsect2>
<refsect2 id="G-TYPE-OPTION-GROUP:CAPS" role="macro" condition="since:2.44">
<title>G_TYPE_OPTION_GROUP</title>
<indexterm zone="G-TYPE-OPTION-GROUP:CAPS" role="2.44"><primary sortas="TYPE_OPTION_GROUP">G_TYPE_OPTION_GROUP</primary></indexterm>
<programlisting language="C">#define G_TYPE_OPTION_GROUP (g_option_group_get_type ())
</programlisting>
<para>The <link linkend="GType"><type>GType</type></link> for a boxed type holding a <link linkend="GOptionGroup"><type>GOptionGroup</type></link>.</para>
<para role="since">Since: <link linkend="api-index-2.44">2.44</link></para></refsect2>

</refsect1>
<refsect1 id="gobject-Boxed-Types.see-also">
<title>See Also</title>
<para><link linkend="GParamSpecBoxed"><type>GParamSpecBoxed</type></link>, <link linkend="g-param-spec-boxed"><function>g_param_spec_boxed()</function></link></para>

</refsect1>

</refentry>
