<?xml version="1.0"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
               "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
<!ENTITY % local.common.attrib "xmlns:xi  CDATA  #FIXED 'http://www.w3.org/2003/XInclude'">
<!ENTITY version SYSTEM "version.xml">
<!ENTITY pi "&#960;">
<!ENTITY solidus "&#8260;">
]>
<refentry id="GtkBuildable">
<refmeta>
<refentrytitle role="top_of_page" id="GtkBuildable.top_of_page">GtkBuildable</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GTK4 Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>GtkBuildable</refname>
<refpurpose>Interface for objects that can be built by GtkBuilder</refpurpose>
</refnamediv>

<refsect1 id="GtkBuildable.functions" role="functions_proto">
<title role="functions_proto.title">Functions</title>
<informaltable pgwide="1" frame="none">
<tgroup cols="2">
<colspec colname="functions_proto_type" colwidth="150px"/>
<colspec colname="functions_proto_name"/>
<tbody>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-buildable-set-name">gtk_buildable_set_name</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type">const <link linkend="gchar"><returnvalue>gchar</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-buildable-get-name">gtk_buildable_get_name</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="gtk-buildable-add-child">gtk_buildable_add_child</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="gtk-buildable-set-buildable-property">gtk_buildable_set_buildable_property</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GObject"><returnvalue>GObject</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-buildable-construct-child">gtk_buildable_construct_child</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-buildable-custom-tag-start">gtk_buildable_custom_tag_start</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="gtk-buildable-custom-tag-end">gtk_buildable_custom_tag_end</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="gtk-buildable-custom-finished">gtk_buildable_custom_finished</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="gtk-buildable-parser-finished">gtk_buildable_parser_finished</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GObject"><returnvalue>GObject</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-buildable-get-internal-child">gtk_buildable_get_internal_child</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkBuildable.other" role="other_proto">
<title role="other_proto.title">Types and Values</title>
<informaltable pgwide="1" frame="none">
<tgroup cols="2">
<colspec colname="other_proto_type" colwidth="150px"/>
<colspec colname="other_proto_name"/>
<tbody>
<row><entry role="datatype_keyword"></entry><entry role="function_name"><link linkend="GtkBuildable-struct">GtkBuildable</link></entry></row>
<row><entry role="datatype_keyword">struct</entry><entry role="function_name"><link linkend="GtkBuildableIface">GtkBuildableIface</link></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkBuildable.object-hierarchy" role="object_hierarchy">
<title role="object_hierarchy.title">Object Hierarchy</title>
<screen>    <link linkend="GInterface">GInterface</link>
    <phrase role="lineart">&#9584;&#9472;&#9472;</phrase> GtkBuildable
</screen>
</refsect1>
<refsect1 id="GtkBuildable.prerequisites" role="prerequisites">
<title role="prerequisites.title">Prerequisites</title>
<para>
GtkBuildable requires
 <link linkend="GObject">GObject</link>.</para>

</refsect1>
<refsect1 id="GtkBuildable.implementations" role="implementations">
<title role="implementations.title">Known Implementations</title>
<para>
GtkBuildable is implemented by
 <link linkend="GtkAboutDialog">GtkAboutDialog</link>,  <link linkend="GtkAccelLabel">GtkAccelLabel</link>,  <link linkend="GtkActionBar">GtkActionBar</link>,  <link linkend="GtkAppChooserButton">GtkAppChooserButton</link>,  <link linkend="GtkAppChooserDialog">GtkAppChooserDialog</link>,  <link linkend="GtkAppChooserWidget">GtkAppChooserWidget</link>,  <link linkend="GtkApplicationWindow">GtkApplicationWindow</link>,  <link linkend="GtkAspectFrame">GtkAspectFrame</link>,  <link linkend="GtkAssistant">GtkAssistant</link>,  <link linkend="GtkBox">GtkBox</link>,  <link linkend="GtkButton">GtkButton</link>,  <link linkend="GtkCalendar">GtkCalendar</link>,  <link linkend="GtkCellArea">GtkCellArea</link>,  <link linkend="GtkCellAreaBox">GtkCellAreaBox</link>,  <link linkend="GtkCellView">GtkCellView</link>,  <link linkend="GtkCheckButton">GtkCheckButton</link>,  <link linkend="GtkColorButton">GtkColorButton</link>,  <link linkend="GtkColorChooserDialog">GtkColorChooserDialog</link>,  <link linkend="GtkColorChooserWidget">GtkColorChooserWidget</link>,  <link linkend="GtkComboBox">GtkComboBox</link>,  <link linkend="GtkComboBoxText">GtkComboBoxText</link>,  <link linkend="GtkConstraintLayout">GtkConstraintLayout</link>,  <link linkend="GtkDialog">GtkDialog</link>,  <link linkend="GtkDragIcon">GtkDragIcon</link>,  <link linkend="GtkDrawingArea">GtkDrawingArea</link>,  <link linkend="GtkEmojiChooser">GtkEmojiChooser</link>,  <link linkend="GtkEntry">GtkEntry</link>,  <link linkend="GtkEntryCompletion">GtkEntryCompletion</link>,  <link linkend="GtkExpander">GtkExpander</link>,  <link linkend="GtkFileChooserButton">GtkFileChooserButton</link>,  <link linkend="GtkFileChooserDialog">GtkFileChooserDialog</link>,  <link linkend="GtkFileChooserWidget">GtkFileChooserWidget</link>,  <link linkend="GtkFileFilter">GtkFileFilter</link>,  <link linkend="GtkFixed">GtkFixed</link>,  <link linkend="GtkFlowBox">GtkFlowBox</link>,  <link linkend="GtkFlowBoxChild">GtkFlowBoxChild</link>,  <link linkend="GtkFontButton">GtkFontButton</link>,  <link linkend="GtkFontChooserDialog">GtkFontChooserDialog</link>,  <link linkend="GtkFontChooserWidget">GtkFontChooserWidget</link>,  <link linkend="GtkFrame">GtkFrame</link>,  <link linkend="GtkGLArea">GtkGLArea</link>,  <link linkend="GtkGrid">GtkGrid</link>,  <link linkend="GtkHeaderBar">GtkHeaderBar</link>,  <link linkend="GtkIconView">GtkIconView</link>,  <link linkend="GtkImage">GtkImage</link>,  <link linkend="GtkInfoBar">GtkInfoBar</link>,  <link linkend="GtkLabel">GtkLabel</link>,  <link linkend="GtkLevelBar">GtkLevelBar</link>,  <link linkend="GtkLinkButton">GtkLinkButton</link>,  <link linkend="GtkListBox">GtkListBox</link>,  <link linkend="GtkListBoxRow">GtkListBoxRow</link>,  <link linkend="GtkListStore">GtkListStore</link>,  <link linkend="GtkLockButton">GtkLockButton</link>,  <link linkend="GtkMediaControls">GtkMediaControls</link>,  <link linkend="GtkMenuButton">GtkMenuButton</link>,  <link linkend="GtkMessageDialog">GtkMessageDialog</link>,  <link linkend="GtkNotebook">GtkNotebook</link>,  <link linkend="GtkOverlay">GtkOverlay</link>,  <link linkend="GtkPageSetupUnixDialog">GtkPageSetupUnixDialog</link>,  <link linkend="GtkPaned">GtkPaned</link>,  <link linkend="GtkPasswordEntry">GtkPasswordEntry</link>,  <link linkend="GtkPicture">GtkPicture</link>,  <link linkend="GtkPopover">GtkPopover</link>,  <link linkend="GtkPopoverMenu">GtkPopoverMenu</link>,  <link linkend="GtkPopoverMenuBar">GtkPopoverMenuBar</link>,  <link linkend="GtkPrintUnixDialog">GtkPrintUnixDialog</link>,  <link linkend="GtkProgressBar">GtkProgressBar</link>,  <link linkend="GtkRadioButton">GtkRadioButton</link>,  <link linkend="GtkRange">GtkRange</link>,  <link linkend="GtkRevealer">GtkRevealer</link>,  <link linkend="GtkScale">GtkScale</link>,  <link linkend="GtkScaleButton">GtkScaleButton</link>,  <link linkend="GtkScrollbar">GtkScrollbar</link>,  <link linkend="GtkScrolledWindow">GtkScrolledWindow</link>,  <link linkend="GtkSearchBar">GtkSearchBar</link>,  <link linkend="GtkSearchEntry">GtkSearchEntry</link>,  <link linkend="GtkSeparator">GtkSeparator</link>,  <link linkend="GtkShortcutController">GtkShortcutController</link>,  <link linkend="GtkShortcutLabel">GtkShortcutLabel</link>,  <link linkend="GtkShortcutsGroup">GtkShortcutsGroup</link>,  <link linkend="GtkShortcutsSection">GtkShortcutsSection</link>,  <link linkend="GtkShortcutsShortcut">GtkShortcutsShortcut</link>,  <link linkend="GtkShortcutsWindow">GtkShortcutsWindow</link>,  <link linkend="GtkSizeGroup">GtkSizeGroup</link>,  <link linkend="GtkSpinButton">GtkSpinButton</link>,  <link linkend="GtkSpinner">GtkSpinner</link>,  <link linkend="GtkStack">GtkStack</link>,  <link linkend="GtkStackSidebar">GtkStackSidebar</link>,  <link linkend="GtkStackSwitcher">GtkStackSwitcher</link>,  <link linkend="GtkStatusbar">GtkStatusbar</link>,  <link linkend="GtkSwitch">GtkSwitch</link>,  <link linkend="GtkText">GtkText</link>,  <link linkend="GtkTextTagTable">GtkTextTagTable</link>,  <link linkend="GtkTextView">GtkTextView</link>,  <link linkend="GtkToggleButton">GtkToggleButton</link>,  <link linkend="GtkTreeStore">GtkTreeStore</link>,  <link linkend="GtkTreeView">GtkTreeView</link>,  <link linkend="GtkTreeViewColumn">GtkTreeViewColumn</link>,  <link linkend="GtkVideo">GtkVideo</link>,  <link linkend="GtkViewport">GtkViewport</link>,  <link linkend="GtkVolumeButton">GtkVolumeButton</link>,  <link linkend="GtkWidget">GtkWidget</link>,  <link linkend="GtkWindow">GtkWindow</link>,  <link linkend="GtkWindowControls">GtkWindowControls</link> and  <link linkend="GtkWindowHandle">GtkWindowHandle</link>.</para>

</refsect1>

<refsect1 id="GtkBuildable.includes"><title>Includes</title><synopsis>#include &lt;gtk/gtk.h&gt;
</synopsis></refsect1>

<refsect1 id="GtkBuildable.description" role="desc">
<title role="desc.title">Description</title>
<para>GtkBuildable allows objects to extend and customize their deserialization
from <link linkend="BUILDER-UI">GtkBuilder UI descriptions</link>.
The interface includes methods for setting names and properties of objects, 
parsing custom tags and constructing child objects.</para>
<para>The GtkBuildable interface is implemented by all widgets and
many of the non-widget objects that are provided by GTK+. The
main user of this interface is <link linkend="GtkBuilder"><type>GtkBuilder</type></link>. There should be
very little need for applications to call any of these functions directly.</para>
<para>An object only needs to implement this interface if it needs to extend the
<link linkend="GtkBuilder"><type>GtkBuilder</type></link> format or run any extra routines at deserialization time.</para>

</refsect1>
<refsect1 id="GtkBuildable.functions_details" role="details">
<title role="details.title">Functions</title>
<refsect2 id="gtk-buildable-set-name" role="function">
<title>gtk_buildable_set_name&#160;()</title>
<indexterm zone="gtk-buildable-set-name"><primary>gtk_buildable_set_name</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_buildable_set_name (<parameter><link linkend="GtkBuildable"><type>GtkBuildable</type></link> *buildable</parameter>,
                        <parameter>const <link linkend="gchar"><type>gchar</type></link> *name</parameter>);</programlisting>
<para>Sets the name of the <parameter>buildable</parameter>
 object.</para>
<refsect3 id="gtk-buildable-set-name.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>buildable</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkBuildable"><type>GtkBuildable</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>name</para></entry>
<entry role="parameter_description"><para>name to set</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-buildable-get-name" role="function">
<title>gtk_buildable_get_name&#160;()</title>
<indexterm zone="gtk-buildable-get-name"><primary>gtk_buildable_get_name</primary></indexterm>
<programlisting language="C">const <link linkend="gchar"><returnvalue>gchar</returnvalue></link>&#160;*
gtk_buildable_get_name (<parameter><link linkend="GtkBuildable"><type>GtkBuildable</type></link> *buildable</parameter>);</programlisting>
<para>Gets the name of the <parameter>buildable</parameter>
 object. </para>
<para><link linkend="GtkBuilder"><type>GtkBuilder</type></link> sets the name based on the
<link linkend="BUILDER-UI">GtkBuilder UI definition</link> 
used to construct the <parameter>buildable</parameter>
.</para>
<refsect3 id="gtk-buildable-get-name.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>buildable</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkBuildable"><type>GtkBuildable</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-buildable-get-name.returns" role="returns">
<title>Returns</title>
<para> the name set with <link linkend="gtk-buildable-set-name"><function>gtk_buildable_set_name()</function></link></para>
</refsect3></refsect2>
<refsect2 id="gtk-buildable-add-child" role="function">
<title>gtk_buildable_add_child&#160;()</title>
<indexterm zone="gtk-buildable-add-child"><primary>gtk_buildable_add_child</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_buildable_add_child (<parameter><link linkend="GtkBuildable"><type>GtkBuildable</type></link> *buildable</parameter>,
                         <parameter><link linkend="GtkBuilder"><type>GtkBuilder</type></link> *builder</parameter>,
                         <parameter><link linkend="GObject"><type>GObject</type></link> *child</parameter>,
                         <parameter>const <link linkend="gchar"><type>gchar</type></link> *type</parameter>);</programlisting>
<para>Adds a child to <parameter>buildable</parameter>
. <parameter>type</parameter>
 is an optional string
describing how the child should be added.</para>
<refsect3 id="gtk-buildable-add-child.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>buildable</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkBuildable"><type>GtkBuildable</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>builder</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkBuilder"><type>GtkBuilder</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>child</para></entry>
<entry role="parameter_description"><para>child to add</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>type</para></entry>
<entry role="parameter_description"><para>kind of child or <link linkend="NULL:CAPS"><literal>NULL</literal></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>allow-none</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-buildable-set-buildable-property" role="function">
<title>gtk_buildable_set_buildable_property&#160;()</title>
<indexterm zone="gtk-buildable-set-buildable-property"><primary>gtk_buildable_set_buildable_property</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_buildable_set_buildable_property (<parameter><link linkend="GtkBuildable"><type>GtkBuildable</type></link> *buildable</parameter>,
                                      <parameter><link linkend="GtkBuilder"><type>GtkBuilder</type></link> *builder</parameter>,
                                      <parameter>const <link linkend="gchar"><type>gchar</type></link> *name</parameter>,
                                      <parameter>const <link linkend="GValue"><type>GValue</type></link> *value</parameter>);</programlisting>
<para>Sets the property name <parameter>name</parameter>
 to <parameter>value</parameter>
 on the <parameter>buildable</parameter>
 object.</para>
<refsect3 id="gtk-buildable-set-buildable-property.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>buildable</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkBuildable"><type>GtkBuildable</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>builder</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkBuilder"><type>GtkBuilder</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>name</para></entry>
<entry role="parameter_description"><para>name of property</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>value</para></entry>
<entry role="parameter_description"><para>value of property</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-buildable-construct-child" role="function">
<title>gtk_buildable_construct_child&#160;()</title>
<indexterm zone="gtk-buildable-construct-child"><primary>gtk_buildable_construct_child</primary></indexterm>
<programlisting language="C"><link linkend="GObject"><returnvalue>GObject</returnvalue></link>&#160;*
gtk_buildable_construct_child (<parameter><link linkend="GtkBuildable"><type>GtkBuildable</type></link> *buildable</parameter>,
                               <parameter><link linkend="GtkBuilder"><type>GtkBuilder</type></link> *builder</parameter>,
                               <parameter>const <link linkend="gchar"><type>gchar</type></link> *name</parameter>);</programlisting>
<para>Constructs a child of <parameter>buildable</parameter>
 with the name <parameter>name</parameter>
.</para>
<para><link linkend="GtkBuilder"><type>GtkBuilder</type></link> calls this function if a “constructor” has been
specified in the UI definition.</para>
<refsect3 id="gtk-buildable-construct-child.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>buildable</para></entry>
<entry role="parameter_description"><para>A <link linkend="GtkBuildable"><type>GtkBuildable</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>builder</para></entry>
<entry role="parameter_description"><para><link linkend="GtkBuilder"><type>GtkBuilder</type></link> used to construct this object</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>name</para></entry>
<entry role="parameter_description"><para>name of child to construct</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-buildable-construct-child.returns" role="returns">
<title>Returns</title>
<para>the constructed child. </para>
<para><emphasis role="annotation">[<acronym>transfer full</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gtk-buildable-custom-tag-start" role="function">
<title>gtk_buildable_custom_tag_start&#160;()</title>
<indexterm zone="gtk-buildable-custom-tag-start"><primary>gtk_buildable_custom_tag_start</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gtk_buildable_custom_tag_start (<parameter><link linkend="GtkBuildable"><type>GtkBuildable</type></link> *buildable</parameter>,
                                <parameter><link linkend="GtkBuilder"><type>GtkBuilder</type></link> *builder</parameter>,
                                <parameter><link linkend="GObject"><type>GObject</type></link> *child</parameter>,
                                <parameter>const <link linkend="gchar"><type>gchar</type></link> *tagname</parameter>,
                                <parameter><link linkend="GtkBuildableParser"><type>GtkBuildableParser</type></link> *parser</parameter>,
                                <parameter><link linkend="gpointer"><type>gpointer</type></link> *data</parameter>);</programlisting>
<para>This is called for each unknown element under &lt;child>.</para>
<refsect3 id="gtk-buildable-custom-tag-start.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>buildable</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkBuildable"><type>GtkBuildable</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>builder</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkBuilder"><type>GtkBuilder</type></link> used to construct this object</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>child</para></entry>
<entry role="parameter_description"><para>child object or <link linkend="NULL:CAPS"><literal>NULL</literal></link> for non-child tags. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>allow-none</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>tagname</para></entry>
<entry role="parameter_description"><para>name of tag</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>parser</para></entry>
<entry role="parameter_description"><para>a <link linkend="GMarkupParser"><type>GMarkupParser</type></link> to fill in. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>out</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>data</para></entry>
<entry role="parameter_description"><para>return location for user data that will be passed in
to parser functions. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>out</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-buildable-custom-tag-start.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if an object has a custom implementation, <link linkend="FALSE:CAPS"><literal>FALSE</literal></link>
if it doesn't.</para>
</refsect3></refsect2>
<refsect2 id="gtk-buildable-custom-tag-end" role="function">
<title>gtk_buildable_custom_tag_end&#160;()</title>
<indexterm zone="gtk-buildable-custom-tag-end"><primary>gtk_buildable_custom_tag_end</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_buildable_custom_tag_end (<parameter><link linkend="GtkBuildable"><type>GtkBuildable</type></link> *buildable</parameter>,
                              <parameter><link linkend="GtkBuilder"><type>GtkBuilder</type></link> *builder</parameter>,
                              <parameter><link linkend="GObject"><type>GObject</type></link> *child</parameter>,
                              <parameter>const <link linkend="gchar"><type>gchar</type></link> *tagname</parameter>,
                              <parameter><link linkend="gpointer"><type>gpointer</type></link> data</parameter>);</programlisting>
<para>This is called at the end of each custom element handled by 
the buildable.</para>
<refsect3 id="gtk-buildable-custom-tag-end.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>buildable</para></entry>
<entry role="parameter_description"><para>A <link linkend="GtkBuildable"><type>GtkBuildable</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>builder</para></entry>
<entry role="parameter_description"><para><link linkend="GtkBuilder"><type>GtkBuilder</type></link> used to construct this object</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>child</para></entry>
<entry role="parameter_description"><para>child object or <link linkend="NULL:CAPS"><literal>NULL</literal></link> for non-child tags. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>allow-none</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>tagname</para></entry>
<entry role="parameter_description"><para>name of tag</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>data</para></entry>
<entry role="parameter_description"><para>user data that will be passed in to parser functions</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-buildable-custom-finished" role="function">
<title>gtk_buildable_custom_finished&#160;()</title>
<indexterm zone="gtk-buildable-custom-finished"><primary>gtk_buildable_custom_finished</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_buildable_custom_finished (<parameter><link linkend="GtkBuildable"><type>GtkBuildable</type></link> *buildable</parameter>,
                               <parameter><link linkend="GtkBuilder"><type>GtkBuilder</type></link> *builder</parameter>,
                               <parameter><link linkend="GObject"><type>GObject</type></link> *child</parameter>,
                               <parameter>const <link linkend="gchar"><type>gchar</type></link> *tagname</parameter>,
                               <parameter><link linkend="gpointer"><type>gpointer</type></link> data</parameter>);</programlisting>
<para>This is similar to <link linkend="gtk-buildable-parser-finished"><function>gtk_buildable_parser_finished()</function></link> but is
called once for each custom tag handled by the <parameter>buildable</parameter>
.</para>
<refsect3 id="gtk-buildable-custom-finished.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>buildable</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkBuildable"><type>GtkBuildable</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>builder</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkBuilder"><type>GtkBuilder</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>child</para></entry>
<entry role="parameter_description"><para>child object or <link linkend="NULL:CAPS"><literal>NULL</literal></link> for non-child tags. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>allow-none</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>tagname</para></entry>
<entry role="parameter_description"><para>the name of the tag</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>data</para></entry>
<entry role="parameter_description"><para>user data created in custom_tag_start</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-buildable-parser-finished" role="function">
<title>gtk_buildable_parser_finished&#160;()</title>
<indexterm zone="gtk-buildable-parser-finished"><primary>gtk_buildable_parser_finished</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_buildable_parser_finished (<parameter><link linkend="GtkBuildable"><type>GtkBuildable</type></link> *buildable</parameter>,
                               <parameter><link linkend="GtkBuilder"><type>GtkBuilder</type></link> *builder</parameter>);</programlisting>
<para>Called when the builder finishes the parsing of a 
<link linkend="BUILDER-UI">GtkBuilder UI definition</link>. 
Note that this will be called once for each time 
<link linkend="gtk-builder-add-from-file"><function>gtk_builder_add_from_file()</function></link> or <link linkend="gtk-builder-add-from-string"><function>gtk_builder_add_from_string()</function></link> 
is called on a builder.</para>
<refsect3 id="gtk-buildable-parser-finished.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>buildable</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkBuildable"><type>GtkBuildable</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>builder</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkBuilder"><type>GtkBuilder</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-buildable-get-internal-child" role="function">
<title>gtk_buildable_get_internal_child&#160;()</title>
<indexterm zone="gtk-buildable-get-internal-child"><primary>gtk_buildable_get_internal_child</primary></indexterm>
<programlisting language="C"><link linkend="GObject"><returnvalue>GObject</returnvalue></link>&#160;*
gtk_buildable_get_internal_child (<parameter><link linkend="GtkBuildable"><type>GtkBuildable</type></link> *buildable</parameter>,
                                  <parameter><link linkend="GtkBuilder"><type>GtkBuilder</type></link> *builder</parameter>,
                                  <parameter>const <link linkend="gchar"><type>gchar</type></link> *childname</parameter>);</programlisting>
<para>Get the internal child called <parameter>childname</parameter>
 of the <parameter>buildable</parameter>
 object.</para>
<refsect3 id="gtk-buildable-get-internal-child.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>buildable</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkBuildable"><type>GtkBuildable</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>builder</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkBuilder"><type>GtkBuilder</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>childname</para></entry>
<entry role="parameter_description"><para>name of child</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-buildable-get-internal-child.returns" role="returns">
<title>Returns</title>
<para>the internal child of the buildable object. </para>
<para><emphasis role="annotation">[<acronym>transfer none</acronym>]</emphasis></para>
</refsect3></refsect2>

</refsect1>
<refsect1 id="GtkBuildable.other_details" role="details">
<title role="details.title">Types and Values</title>
<refsect2 id="GtkBuildable-struct" role="struct">
<title>GtkBuildable</title>
<indexterm zone="GtkBuildable-struct"><primary>GtkBuildable</primary></indexterm>
<programlisting language="C">typedef struct _GtkBuildable GtkBuildable;</programlisting>
</refsect2>
<refsect2 id="GtkBuildableIface" role="struct">
<title>struct GtkBuildableIface</title>
<indexterm zone="GtkBuildableIface"><primary>GtkBuildableIface</primary></indexterm>
<programlisting language="C">struct GtkBuildableIface {
  GTypeInterface g_iface;

  /* virtual table */
  void          (* set_name)               (GtkBuildable       *buildable,
                                            const gchar        *name);
  const gchar * (* get_name)               (GtkBuildable       *buildable);
  void          (* add_child)              (GtkBuildable       *buildable,
                                            GtkBuilder         *builder,
                                            GObject            *child,
                                            const gchar        *type);
  void          (* set_buildable_property) (GtkBuildable       *buildable,
                                            GtkBuilder         *builder,
                                            const gchar        *name,
                                            const GValue       *value);
  GObject *     (* construct_child)        (GtkBuildable       *buildable,
                                            GtkBuilder         *builder,
                                            const gchar        *name);
  gboolean      (* custom_tag_start)       (GtkBuildable       *buildable,
                                            GtkBuilder         *builder,
                                            GObject            *child,
                                            const gchar        *tagname,
                                            GtkBuildableParser *parser,
                                            gpointer           *data);
  void          (* custom_tag_end)         (GtkBuildable       *buildable,
                                            GtkBuilder         *builder,
                                            GObject            *child,
                                            const gchar        *tagname,
                                            gpointer            data);
  void          (* custom_finished)        (GtkBuildable       *buildable,
                                            GtkBuilder         *builder,
                                            GObject            *child,
                                            const gchar        *tagname,
                                            gpointer            data);
  void          (* parser_finished)        (GtkBuildable       *buildable,
                                            GtkBuilder         *builder);

  GObject *     (* get_internal_child)     (GtkBuildable       *buildable,
                                            GtkBuilder         *builder,
                                            const gchar        *childname);
};
</programlisting>
<para>The <link linkend="GtkBuildableIface"><type>GtkBuildableIface</type></link> interface contains method that are
necessary to allow <link linkend="GtkBuilder"><type>GtkBuilder</type></link> to construct an object from
a <link linkend="GtkBuilder"><type>GtkBuilder</type></link> UI definition.</para>
<refsect3 id="GtkBuildableIface.members" role="struct_members">
<title>Members</title>
<informaltable role="struct_members_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="struct_members_name" colwidth="300px"/>
<colspec colname="struct_members_description"/>
<colspec colname="struct_members_annotations" colwidth="200px"/>
<tbody>
<row role="member"><entry role="struct_member_name"><para><structfield id="GtkBuildableIface.set-name">set_name</structfield>&#160;()</para></entry>
<entry role="struct_member_description"><para>Stores the name attribute given in the GtkBuilder UI definition.
<link linkend="GtkWidget"><type>GtkWidget</type></link> stores the name as object data. Implement this method if your
object has some notion of “name” and it makes sense to map the XML name
attribute to it.</para></entry>
<entry role="struct_member_annotations"></entry>
</row>
<row role="member"><entry role="struct_member_name"><para><structfield id="GtkBuildableIface.get-name">get_name</structfield>&#160;()</para></entry>
<entry role="struct_member_description"><para>The getter corresponding to <parameter>set_name</parameter>
. Implement this
if you implement <parameter>set_name</parameter>
.</para></entry>
<entry role="struct_member_annotations"></entry>
</row>
<row role="member"><entry role="struct_member_name"><para><structfield id="GtkBuildableIface.add-child">add_child</structfield>&#160;()</para></entry>
<entry role="struct_member_description"><para>Adds a child. The <parameter>type</parameter>
parameter can be used to
differentiate the kind of child. <link linkend="GtkWidget"><type>GtkWidget</type></link> implements this
to add event controllers to the widget, <link linkend="GtkNotebook"><type>GtkNotebook</type></link> uses
the <parameter>type</parameter>
to distinguish between page labels (of type "page-label")
and normal children.</para></entry>
<entry role="struct_member_annotations"></entry>
</row>
<row role="member"><entry role="struct_member_name"><para><structfield id="GtkBuildableIface.set-buildable-property">set_buildable_property</structfield>&#160;()</para></entry>
<entry role="struct_member_description"><para>Sets a property of a buildable object.
It is normally not necessary to implement this, <link linkend="g-object-set-property"><function>g_object_set_property()</function></link>
is used by default. <link linkend="GtkWindow"><type>GtkWindow</type></link> implements this to delay showing itself
(i.e. setting the <link linkend="GtkWidget--visible"><type>“visible”</type></link> property) until the whole interface
is created.</para></entry>
<entry role="struct_member_annotations"></entry>
</row>
<row role="member"><entry role="struct_member_name"><para><structfield id="GtkBuildableIface.construct-child">construct_child</structfield>&#160;()</para></entry>
<entry role="struct_member_description"><para>Constructs a child of a buildable that has been
specified as “constructor” in the UI definition. This can be used to
reference a widget created in a &lt;ui> tag which is outside
of the normal GtkBuilder UI definition hierarchy.  A reference to the
constructed object is returned and becomes owned by the caller.</para></entry>
<entry role="struct_member_annotations"></entry>
</row>
<row role="member"><entry role="struct_member_name"><para><structfield id="GtkBuildableIface.custom-tag-start">custom_tag_start</structfield>&#160;()</para></entry>
<entry role="struct_member_description"><para>Implement this if the buildable needs to parse
content below &lt;child>. To handle an element, the implementation
must fill in the <parameter>parser</parameter>
and <parameter>user_data</parameter>
and return <link linkend="TRUE:CAPS"><literal>TRUE</literal></link>.
<link linkend="GtkWidget"><type>GtkWidget</type></link> implements this to parse keyboard accelerators specified
in &lt;accelerator> elements.
Note that <parameter>user_data</parameter>
must be freed in <parameter>custom_tag_end</parameter>
or <parameter>custom_finished</parameter>
.</para></entry>
<entry role="struct_member_annotations"></entry>
</row>
<row role="member"><entry role="struct_member_name"><para><structfield id="GtkBuildableIface.custom-tag-end">custom_tag_end</structfield>&#160;()</para></entry>
<entry role="struct_member_description"><para>Called for the end tag of each custom element that is
handled by the buildable (see <parameter>custom_tag_start</parameter>
).</para></entry>
<entry role="struct_member_annotations"></entry>
</row>
<row role="member"><entry role="struct_member_name"><para><structfield id="GtkBuildableIface.custom-finished">custom_finished</structfield>&#160;()</para></entry>
<entry role="struct_member_description"><para>Called for each custom tag handled by the buildable
when the builder finishes parsing (see <parameter>custom_tag_start</parameter>
)</para></entry>
<entry role="struct_member_annotations"></entry>
</row>
<row role="member"><entry role="struct_member_name"><para><structfield id="GtkBuildableIface.parser-finished">parser_finished</structfield>&#160;()</para></entry>
<entry role="struct_member_description"><para>Called when a builder finishes the parsing
of a UI definition. It is normally not necessary to implement this,
unless you need to perform special cleanup actions. <link linkend="GtkWindow"><type>GtkWindow</type></link> sets
the <link linkend="GtkWidget--visible"><type>“visible”</type></link> property here.</para></entry>
<entry role="struct_member_annotations"></entry>
</row>
<row role="member"><entry role="struct_member_name"><para><structfield id="GtkBuildableIface.get-internal-child">get_internal_child</structfield>&#160;()</para></entry>
<entry role="struct_member_description"><para>Returns an internal child of a buildable.
<link linkend="GtkDialog"><type>GtkDialog</type></link> implements this to give access to its <parameter>vbox</parameter>
, making
it possible to add children to the vbox in a UI definition.
Implement this if the buildable has internal children that may
need to be accessed from a UI definition.</para></entry>
<entry role="struct_member_annotations"></entry>
</row>
</tbody></tgroup></informaltable>
</refsect3>
</refsect2>

</refsect1>

</refentry>
