|
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17 System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64 User : nobody ( 99) PHP Version : 5.2.17 Disable Function : NONE Directory : /usr/share/gtk-doc/html/libglade/ |
Upload File : |
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Libglade Build</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
<link rel="start" href="index.html" title="Libglade Reference Manual">
<link rel="up" href="libglade-lib.html" title="Part I. Libglade Library Reference">
<link rel="prev" href="libglade-Libglade-SAX-Parser.html" title="Libglade SAX Parser">
<meta name="generator" content="GTK-Doc V1.6 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
<link rel="chapter" href="libglade-notes.html" title="Libglade Programming Notes">
<link rel="chapter" href="libglade-dtd.html" title="Glade 2.0 File Format">
<link rel="part" href="libglade-lib.html" title="Part I. Libglade Library Reference">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="libglade-Libglade-SAX-Parser.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="libglade-lib.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">Libglade Reference Manual</th>
<td> </td>
</tr>
<tr><td colspan="5" class="shortcuts"><nobr><a href="#top_of_page" class="shortcut">Top</a>
 | 
<a href="#desc" class="shortcut">Description</a></nobr></td></tr>
</table>
<div class="refentry" lang="en">
<a name="libglade-Libglade-Build"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="top_of_page"></a>Libglade Build</span></h2>
<p>Libglade Build — Routines used by widget building routines</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">
#include <glade/glade.h>
#include <glade/glade-build.h>
<a
href="/usr/share/gtk-doc/html/gtk/GtkWidget.html"
>GtkWidget</a>* (<a href="libglade-Libglade-Build.html#GladeNewFunc">*GladeNewFunc</a>) (<a href="GladeXML.html" title="GladeXML">GladeXML</a> *xml,
<a
href="/usr/share/gtk-doc/html/gobject/gobject-Type-Information.html#GType"
>GType</a> widget_type,
<a href="libglade-Libglade-SAX-Parser.html#GladeWidgetInfo">GladeWidgetInfo</a> *info);
void (<a href="libglade-Libglade-Build.html#GladeBuildChildrenFunc">*GladeBuildChildrenFunc</a>) (<a href="GladeXML.html" title="GladeXML">GladeXML</a> *xml,
<a
href="/usr/share/gtk-doc/html/gtk/GtkWidget.html"
>GtkWidget</a> *parent,
<a href="libglade-Libglade-SAX-Parser.html#GladeWidgetInfo">GladeWidgetInfo</a> *info);
<a
href="/usr/share/gtk-doc/html/gtk/GtkWidget.html"
>GtkWidget</a>* (<a href="libglade-Libglade-Build.html#GladeFindInternalChildFunc">*GladeFindInternalChildFunc</a>) (<a href="GladeXML.html" title="GladeXML">GladeXML</a> *xml,
<a
href="/usr/share/gtk-doc/html/gtk/GtkWidget.html"
>GtkWidget</a> *parent,
const <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
>gchar</a> *childname);
<a
href="/usr/share/gtk-doc/html/gtk/GtkWidget.html"
>GtkWidget</a>* <a href="libglade-Libglade-Build.html#glade-xml-build-widget">glade_xml_build_widget</a> (<a href="GladeXML.html" title="GladeXML">GladeXML</a> *self,
<a href="libglade-Libglade-SAX-Parser.html#GladeWidgetInfo">GladeWidgetInfo</a> *info);
void <a href="libglade-Libglade-Build.html#glade-xml-handle-internal-child">glade_xml_handle_internal_child</a> (<a href="GladeXML.html" title="GladeXML">GladeXML</a> *self,
<a
href="/usr/share/gtk-doc/html/gtk/GtkWidget.html"
>GtkWidget</a> *parent,
<a href="libglade-Libglade-SAX-Parser.html#GladeChildInfo">GladeChildInfo</a> *child_info);
void <a href="libglade-Libglade-Build.html#glade-xml-set-common-params">glade_xml_set_common_params</a> (<a href="GladeXML.html" title="GladeXML">GladeXML</a> *self,
<a
href="/usr/share/gtk-doc/html/gtk/GtkWidget.html"
>GtkWidget</a> *widget,
<a href="libglade-Libglade-SAX-Parser.html#GladeWidgetInfo">GladeWidgetInfo</a> *info);
void <a href="libglade-Libglade-Build.html#glade-register-widget">glade_register_widget</a> (<a
href="/usr/share/gtk-doc/html/gobject/gobject-Type-Information.html#GType"
>GType</a> type,
<a href="libglade-Libglade-Build.html#GladeNewFunc">GladeNewFunc</a> new_func,
<a href="libglade-Libglade-Build.html#GladeBuildChildrenFunc">GladeBuildChildrenFunc</a> build_children,
<a href="libglade-Libglade-Build.html#GladeFindInternalChildFunc">GladeFindInternalChildFunc</a> find_internal_child);
<a
href="/usr/share/gtk-doc/html/gtk/GtkWidget.html"
>GtkWidget</a>* <a href="libglade-Libglade-Build.html#glade-standard-build-widget">glade_standard_build_widget</a> (<a href="GladeXML.html" title="GladeXML">GladeXML</a> *xml,
<a
href="/usr/share/gtk-doc/html/gobject/gobject-Type-Information.html#GType"
>GType</a> widget_type,
<a href="libglade-Libglade-SAX-Parser.html#GladeWidgetInfo">GladeWidgetInfo</a> *info);
void <a href="libglade-Libglade-Build.html#glade-xml-handle-widget-prop">glade_xml_handle_widget_prop</a> (<a href="GladeXML.html" title="GladeXML">GladeXML</a> *self,
<a
href="/usr/share/gtk-doc/html/gtk/GtkWidget.html"
>GtkWidget</a> *widget,
const <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
>gchar</a> *prop_name,
const <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
>gchar</a> *value_name);
void <a href="libglade-Libglade-Build.html#glade-standard-build-children">glade_standard_build_children</a> (<a href="GladeXML.html" title="GladeXML">GladeXML</a> *self,
<a
href="/usr/share/gtk-doc/html/gtk/GtkWidget.html"
>GtkWidget</a> *parent,
<a href="libglade-Libglade-SAX-Parser.html#GladeWidgetInfo">GladeWidgetInfo</a> *info);
void <a href="libglade-Libglade-Build.html#glade-xml-set-packing-property">glade_xml_set_packing_property</a> (<a href="GladeXML.html" title="GladeXML">GladeXML</a> *self,
<a
href="/usr/share/gtk-doc/html/gtk/GtkWidget.html"
>GtkWidget</a> *parent,
<a
href="/usr/share/gtk-doc/html/gtk/GtkWidget.html"
>GtkWidget</a> *child,
const char *name,
const char *value);
void (<a href="libglade-Libglade-Build.html#GladeApplyCustomPropFunc">*GladeApplyCustomPropFunc</a>) (<a href="GladeXML.html" title="GladeXML">GladeXML</a> *xml,
<a
href="/usr/share/gtk-doc/html/gtk/GtkWidget.html"
>GtkWidget</a> *widget,
const <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
>gchar</a> *propname,
const <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
>gchar</a> *value);
void <a href="libglade-Libglade-Build.html#glade-register-custom-prop">glade_register_custom_prop</a> (<a
href="/usr/share/gtk-doc/html/gobject/gobject-Type-Information.html#GType"
>GType</a> type,
const <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
>gchar</a> *prop_name,
<a href="libglade-Libglade-Build.html#GladeApplyCustomPropFunc">GladeApplyCustomPropFunc</a> apply_prop);
<a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
>gchar</a>* <a href="libglade-Libglade-Build.html#glade-xml-relative-file">glade_xml_relative_file</a> (<a href="GladeXML.html" title="GladeXML">GladeXML</a> *self,
const <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
>gchar</a> *filename);
<a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a> <a href="libglade-Libglade-Build.html#glade-enum-from-string">glade_enum_from_string</a> (<a
href="/usr/share/gtk-doc/html/gobject/gobject-Type-Information.html#GType"
>GType</a> type,
const char *string);
<a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"
>guint</a> <a href="libglade-Libglade-Build.html#glade-flags-from-string">glade_flags_from_string</a> (<a
href="/usr/share/gtk-doc/html/gobject/gobject-Type-Information.html#GType"
>GType</a> type,
const char *string);
<a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
>gboolean</a> <a href="libglade-Libglade-Build.html#glade-xml-set-value-from-string">glade_xml_set_value_from_string</a> (<a href="GladeXML.html" title="GladeXML">GladeXML</a> *xml,
<a
href="/usr/share/gtk-doc/html/gobject/gobject-GParamSpec.html#GParamSpec"
>GParamSpec</a> *pspec,
const <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
>gchar</a> *string,
<a
href="/usr/share/gtk-doc/html/gobject/gobject-Generic-values.html#GValue"
>GValue</a> *value);
void <a href="libglade-Libglade-Build.html#glade-xml-set-toplevel">glade_xml_set_toplevel</a> (<a href="GladeXML.html" title="GladeXML">GladeXML</a> *xml,
<a
href="/usr/share/gtk-doc/html/gtk/GtkWindow.html"
>GtkWindow</a> *window);
<a
href="/usr/share/gtk-doc/html/gtk/gtk-Keyboard-Accelerators.html#GtkAccelGroup"
>GtkAccelGroup</a>* <a href="libglade-Libglade-Build.html#glade-xml-ensure-accel">glade_xml_ensure_accel</a> (<a href="GladeXML.html" title="GladeXML">GladeXML</a> *xml);
#define <a href="libglade-Libglade-Build.html#GLADE-MODULE-CHECK-INIT:CAPS">GLADE_MODULE_CHECK_INIT</a>
</pre>
</div>
<div class="refsect1" lang="en">
<a name="desc"></a><h2>Description</h2>
<p>
These functions are used by the routines that are responsible for building
the actual widgets from the XML node data structures.
</p>
</div>
<div class="refsect1" lang="en">
<a name="details"></a><h2>Details</h2>
<div class="refsect2" lang="en">
<a name="id2983940"></a><h3>
<a name="GladeNewFunc"></a>GladeNewFunc ()</h3>
<a class="indexterm" name="id2983951"></a><pre class="programlisting"><a
href="/usr/share/gtk-doc/html/gtk/GtkWidget.html"
>GtkWidget</a>* (*GladeNewFunc) (<a href="GladeXML.html" title="GladeXML">GladeXML</a> *xml,
<a
href="/usr/share/gtk-doc/html/gobject/gobject-Type-Information.html#GType"
>GType</a> widget_type,
<a href="libglade-Libglade-SAX-Parser.html#GladeWidgetInfo">GladeWidgetInfo</a> *info);</pre>
<p>
This function signature should be used by functions that build particular
widget types. The function should create the new widget and set any non
standard widget parameters (ie. don't set visibility, size, etc), as
this is handled by glade_xml_build_widget, which calls these functions.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>xml</code></em> :</span></td>
<td> The GladeXML object.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>widget_type</code></em> :</span></td>
<td> the GType code of the widget.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>info</code></em> :</span></td>
<td> the GladeWidgetInfo structure for this widget.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> the new widget.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2984058"></a><h3>
<a name="GladeBuildChildrenFunc"></a>GladeBuildChildrenFunc ()</h3>
<a class="indexterm" name="id2984069"></a><pre class="programlisting">void (*GladeBuildChildrenFunc) (<a href="GladeXML.html" title="GladeXML">GladeXML</a> *xml,
<a
href="/usr/share/gtk-doc/html/gtk/GtkWidget.html"
>GtkWidget</a> *parent,
<a href="libglade-Libglade-SAX-Parser.html#GladeWidgetInfo">GladeWidgetInfo</a> *info);</pre>
<p>
This function signature should be used by functions that are responsible
for adding children to a container widget. To create each child widget,
glade_xml_build_widget should be called.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>xml</code></em> :</span></td>
<td> the GladeXML object.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>parent</code></em> :</span></td>
<td> the parent.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>info</code></em> :</span></td>
<td> the GladeWidgetInfo structure for the parent.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2984164"></a><h3>
<a name="GladeFindInternalChildFunc"></a>GladeFindInternalChildFunc ()</h3>
<a class="indexterm" name="id2984175"></a><pre class="programlisting"><a
href="/usr/share/gtk-doc/html/gtk/GtkWidget.html"
>GtkWidget</a>* (*GladeFindInternalChildFunc) (<a href="GladeXML.html" title="GladeXML">GladeXML</a> *xml,
<a
href="/usr/share/gtk-doc/html/gtk/GtkWidget.html"
>GtkWidget</a> *parent,
const <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
>gchar</a> *childname);</pre>
<p>
When some composite widgets are created, a number of children are
added at the same time (for example, the vbox in a GtkDialog).
These widgets are identified in the XML interface file by the
internal-child attribute on their &lt;child&gt; element.
</p>
<p>
When libglade encounters an internal child, rather than creating a
new widget instance, libglade walks up the tree until it finds the
first non internal-child parent. It then calls the
find_internal_child callback for that parent's class.
</p>
<p>
That callback should return the internal child corresponding to the
name passed in as the third argument.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>xml</code></em> :</span></td>
<td> the GladeXML object.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>parent</code></em> :</span></td>
<td> the parent widget.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>childname</code></em> :</span></td>
<td> the name of the internal child
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> the named internal child.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3018732"></a><h3>
<a name="glade-xml-build-widget"></a>glade_xml_build_widget ()</h3>
<a class="indexterm" name="id3018742"></a><pre class="programlisting"><a
href="/usr/share/gtk-doc/html/gtk/GtkWidget.html"
>GtkWidget</a>* glade_xml_build_widget (<a href="GladeXML.html" title="GladeXML">GladeXML</a> *self,
<a href="libglade-Libglade-SAX-Parser.html#GladeWidgetInfo">GladeWidgetInfo</a> *info);</pre>
<p>
This function is not intended for people who just use libglade. Instead
it is for people extending it (it is designed to be called in the child
build routine defined for the parent widget). It first checks the type
of the widget from the class tag, then calls the corresponding widget
creation routine. This routine sets up all the settings specific to that
type of widget. Then general widget settings are performed on the widget.
Then it sets up accelerators for the widget, and extracts any signal
information for the widget. Then it checks to see if there are any
child widget nodes for this widget, and if so calls the widget's
build routine, which will create the children with this function and add
them to the widget in the appropriate way. Finally it returns the widget.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>self</code></em> :</span></td>
<td> the GladeXML object.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>info</code></em> :</span></td>
<td> the GladeWidgetInfo structure for the widget.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> the newly created widget.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3018811"></a><h3>
<a name="glade-xml-handle-internal-child"></a>glade_xml_handle_internal_child ()</h3>
<a class="indexterm" name="id3018823"></a><pre class="programlisting">void glade_xml_handle_internal_child (<a href="GladeXML.html" title="GladeXML">GladeXML</a> *self,
<a
href="/usr/share/gtk-doc/html/gtk/GtkWidget.html"
>GtkWidget</a> *parent,
<a href="libglade-Libglade-SAX-Parser.html#GladeChildInfo">GladeChildInfo</a> *child_info);</pre>
<p>
This function is intended to be called by the build_children
callback for container widgets. If the build_children callback
encounters a child with the internal-child attribute set, then it
should call this function to handle it and then continue on to the
next child.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>self</code></em> :</span></td>
<td> the GladeXML object.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>parent</code></em> :</span></td>
<td> the parent widget.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>child_info</code></em> :</span></td>
<td> the GladeChildInfo structure for the child.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3018911"></a><h3>
<a name="glade-xml-set-common-params"></a>glade_xml_set_common_params ()</h3>
<a class="indexterm" name="id3018922"></a><pre class="programlisting">void glade_xml_set_common_params (<a href="GladeXML.html" title="GladeXML">GladeXML</a> *self,
<a
href="/usr/share/gtk-doc/html/gtk/GtkWidget.html"
>GtkWidget</a> *widget,
<a href="libglade-Libglade-SAX-Parser.html#GladeWidgetInfo">GladeWidgetInfo</a> *info);</pre>
<p>
This function sets the common parameters on a widget, and is responsible
for inserting it into the GladeXML object's internal structures. It will
also add the children to this widget. Usually this function is only called
by glade_xml_build_widget, but is exposed for difficult cases, such as
setting up toolbar buttons and the like.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>self</code></em> :</span></td>
<td> the GladeXML widget.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>widget</code></em> :</span></td>
<td> the widget to set parameters on.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>info</code></em> :</span></td>
<td> the GladeWidgetInfo structure for the widget.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3019011"></a><h3>
<a name="glade-register-widget"></a>glade_register_widget ()</h3>
<a class="indexterm" name="id3019021"></a><pre class="programlisting">void glade_register_widget (<a
href="/usr/share/gtk-doc/html/gobject/gobject-Type-Information.html#GType"
>GType</a> type,
<a href="libglade-Libglade-Build.html#GladeNewFunc">GladeNewFunc</a> new_func,
<a href="libglade-Libglade-Build.html#GladeBuildChildrenFunc">GladeBuildChildrenFunc</a> build_children,
<a href="libglade-Libglade-Build.html#GladeFindInternalChildFunc">GladeFindInternalChildFunc</a> find_internal_child);</pre>
<p>
This function is used to register new construction functions for a
widget type. The child building routine would call
<a href="libglade-Libglade-Build.html#glade-xml-build-widget"><code class="function">glade_xml_build_widget()</code></a> on each child node to create the child
before packing it.
</p>
<p>
This function is mainly useful for addon widget modules for libglade
(it would get called from the <code class="function">glade_init_module()</code> function).</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>type</code></em> :</span></td>
<td> the GType of the widget.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>new_func</code></em> :</span></td>
<td> the function used to construct instances of the widget.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>build_children</code></em> :</span></td>
<td> function used to construct children (or NULL).
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>find_internal_child</code></em> :</span></td>
<td> function to find internal children (or NULL).
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3019150"></a><h3>
<a name="glade-standard-build-widget"></a>glade_standard_build_widget ()</h3>
<a class="indexterm" name="id3019161"></a><pre class="programlisting"><a
href="/usr/share/gtk-doc/html/gtk/GtkWidget.html"
>GtkWidget</a>* glade_standard_build_widget (<a href="GladeXML.html" title="GladeXML">GladeXML</a> *xml,
<a
href="/usr/share/gtk-doc/html/gobject/gobject-Type-Information.html#GType"
>GType</a> widget_type,
<a href="libglade-Libglade-SAX-Parser.html#GladeWidgetInfo">GladeWidgetInfo</a> *info);</pre>
<p>
This is the standard widget building function. It processes all
the widget properties using the standard object properties
interfaces. This function will be sufficient for most widget
types, thus reducing the ammount of work needed to wrap a library.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>xml</code></em> :</span></td>
<td> the GladeXML object.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>widget_type</code></em> :</span></td>
<td> the GType of the widget.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>info</code></em> :</span></td>
<td> the GladeWidgetInfo structure.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> the constructed widget.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3019257"></a><h3>
<a name="glade-xml-handle-widget-prop"></a>glade_xml_handle_widget_prop ()</h3>
<a class="indexterm" name="id3019270"></a><pre class="programlisting">void glade_xml_handle_widget_prop (<a href="GladeXML.html" title="GladeXML">GladeXML</a> *self,
<a
href="/usr/share/gtk-doc/html/gtk/GtkWidget.html"
>GtkWidget</a> *widget,
const <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
>gchar</a> *prop_name,
const <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
>gchar</a> *value_name);</pre>
<p>
Some widgets have properties of type GtkWidget. These are
represented as the widget name in the glade file. When
constructing the interface, the widget specified as the value for a
property may not exist yet.
</p>
<p>
Rather than setting the property directly, this function should be
used. It will perform the name to GtkWidget conversion, and if the
widget is yet to be constructed, defer setting the property until
the widget is constructed.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>self</code></em> :</span></td>
<td> the GladeXML object
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>widget</code></em> :</span></td>
<td> the property the widget to set the property on.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>prop_name</code></em> :</span></td>
<td> the name of the property.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>value_name</code></em> :</span></td>
<td> the name of the widget used as the value for the property.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3019384"></a><h3>
<a name="glade-standard-build-children"></a>glade_standard_build_children ()</h3>
<a class="indexterm" name="id3019396"></a><pre class="programlisting">void glade_standard_build_children (<a href="GladeXML.html" title="GladeXML">GladeXML</a> *self,
<a
href="/usr/share/gtk-doc/html/gtk/GtkWidget.html"
>GtkWidget</a> *parent,
<a href="libglade-Libglade-SAX-Parser.html#GladeWidgetInfo">GladeWidgetInfo</a> *info);</pre>
<p>
This is the standard child building function. It simply calls
gtk_container_add on each child to add them to the parent, and
process any packing properties using the generic container packing
properties interfaces.
</p>
<p>
This function will be sufficient for most container widgets
provided that they implement the GtkContainer child packing
properties interfaces.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>self</code></em> :</span></td>
<td> the GladeXML object.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>parent</code></em> :</span></td>
<td> the container widget.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>info</code></em> :</span></td>
<td> the GladeWidgetInfo structure.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3019489"></a><h3>
<a name="glade-xml-set-packing-property"></a>glade_xml_set_packing_property ()</h3>
<a class="indexterm" name="id3019501"></a><pre class="programlisting">void glade_xml_set_packing_property (<a href="GladeXML.html" title="GladeXML">GladeXML</a> *self,
<a
href="/usr/share/gtk-doc/html/gtk/GtkWidget.html"
>GtkWidget</a> *parent,
<a
href="/usr/share/gtk-doc/html/gtk/GtkWidget.html"
>GtkWidget</a> *child,
const char *name,
const char *value);</pre>
<p>
This sets the packing property on container <em class="parameter"><code>parent</code></em> of widget
<em class="parameter"><code>child</code></em> with <em class="parameter"><code>name</code></em> to <em class="parameter"><code>value</code></em></p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>self</code></em> :</span></td>
<td> the GladeXML object.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>parent</code></em> :</span></td>
<td> the container widget.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>child</code></em> :</span></td>
<td> the contained child
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>name</code></em> :</span></td>
<td> the name of the property
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>value</code></em> :</span></td>
<td> it's stringified value
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3019642"></a><h3>
<a name="GladeApplyCustomPropFunc"></a>GladeApplyCustomPropFunc ()</h3>
<a class="indexterm" name="id3019653"></a><pre class="programlisting">void (*GladeApplyCustomPropFunc) (<a href="GladeXML.html" title="GladeXML">GladeXML</a> *xml,
<a
href="/usr/share/gtk-doc/html/gtk/GtkWidget.html"
>GtkWidget</a> *widget,
const <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
>gchar</a> *propname,
const <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
>gchar</a> *value);</pre>
<p>
This prototype is used for custom property handlers registered with
<a href="libglade-Libglade-Build.html#glade-register-custom-prop"><code class="function">glade_register_custom_prop()</code></a>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>xml</code></em> :</span></td>
<td> the GladeXML object.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>widget</code></em> :</span></td>
<td> the widget to apply the property to.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>propname</code></em> :</span></td>
<td> the name of the property.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>value</code></em> :</span></td>
<td> the value of the property.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3019765"></a><h3>
<a name="glade-register-custom-prop"></a>glade_register_custom_prop ()</h3>
<a class="indexterm" name="id3019776"></a><pre class="programlisting">void glade_register_custom_prop (<a
href="/usr/share/gtk-doc/html/gobject/gobject-Type-Information.html#GType"
>GType</a> type,
const <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
>gchar</a> *prop_name,
<a href="libglade-Libglade-Build.html#GladeApplyCustomPropFunc">GladeApplyCustomPropFunc</a> apply_prop);</pre>
<p>
Some properties are not (yet) handled through the GObject property
code, so can not be handled by the generic code. This function
provides a way to register handlers for these properties. Such
handlers will apply for the GType <em class="parameter"><code>type</code></em> and all its descendants.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>type</code></em> :</span></td>
<td> the GType of the widget.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>prop_name</code></em> :</span></td>
<td> the name for the custom widget.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>apply_prop</code></em> :</span></td>
<td> the function to be called when the custom property is found.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3019869"></a><h3>
<a name="glade-xml-relative-file"></a>glade_xml_relative_file ()</h3>
<a class="indexterm" name="id3019879"></a><pre class="programlisting"><a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
>gchar</a>* glade_xml_relative_file (<a href="GladeXML.html" title="GladeXML">GladeXML</a> *self,
const <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
>gchar</a> *filename);</pre>
<p>
This function resolves a relative pathname, using the directory of the
XML file as a base. If the pathname is absolute, then the original
filename is returned.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>self</code></em> :</span></td>
<td> the GladeXML object.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>filename</code></em> :</span></td>
<td> the filename.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> the filename. The result must be g_free'd.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3019955"></a><h3>
<a name="glade-enum-from-string"></a>glade_enum_from_string ()</h3>
<a class="indexterm" name="id3019966"></a><pre class="programlisting"><a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a> glade_enum_from_string (<a
href="/usr/share/gtk-doc/html/gobject/gobject-Type-Information.html#GType"
>GType</a> type,
const char *string);</pre>
<p>
This helper routine is designed to be used by widget build routines to
convert the string representations of enumeration values found in the
XML descriptions to the integer values that can be used to configure
the widget.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>type</code></em> :</span></td>
<td> the GType for this enum type.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>string</code></em> :</span></td>
<td> the string representation of the enum value.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> the integer value for this enumeration, or 0 if it couldn't be
found.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3020045"></a><h3>
<a name="glade-flags-from-string"></a>glade_flags_from_string ()</h3>
<a class="indexterm" name="id3020055"></a><pre class="programlisting"><a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"
>guint</a> glade_flags_from_string (<a
href="/usr/share/gtk-doc/html/gobject/gobject-Type-Information.html#GType"
>GType</a> type,
const char *string);</pre>
<p>
This helper routine is designed to be used by widget build routines
to convert the string representations of flags values found in the
XML descriptions to the integer values that can be used to
configure the widget. The string is composed of string names or
nicknames for various flags separated by '|'.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>type</code></em> :</span></td>
<td> the GType for this flags type.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>string</code></em> :</span></td>
<td> the string representation of the flags value.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> the integer value for this flags string
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3020135"></a><h3>
<a name="glade-xml-set-value-from-string"></a>glade_xml_set_value_from_string ()</h3>
<a class="indexterm" name="id3020147"></a><pre class="programlisting"><a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
>gboolean</a> glade_xml_set_value_from_string (<a href="GladeXML.html" title="GladeXML">GladeXML</a> *xml,
<a
href="/usr/share/gtk-doc/html/gobject/gobject-GParamSpec.html#GParamSpec"
>GParamSpec</a> *pspec,
const <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
>gchar</a> *string,
<a
href="/usr/share/gtk-doc/html/gobject/gobject-Generic-values.html#GValue"
>GValue</a> *value);</pre>
<p>
This function demarshals a value from a string. This function
calls <a
href="/usr/share/gtk-doc/html/gobject/gobject-Generic-values.html#g-value-init"
><code class="function">g_value_init()</code></a> on the <em class="parameter"><code>value</code></em> argument, so it need not be
initialised beforehand.
</p>
<p>
This function can handle char, uchar, boolean, int, uint, long,
ulong, enum, flags, float, double, string, GdkColor and
GtkAdjustment type values. Support for GtkWidget type values is
still to come.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>xml</code></em> :</span></td>
<td> the GladeXML object.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>pspec</code></em> :</span></td>
<td> the GParamSpec for the property
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>string</code></em> :</span></td>
<td> the string representation of the value.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>value</code></em> :</span></td>
<td> the GValue to store the result in.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> <a
href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a> on success.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3020291"></a><h3>
<a name="glade-xml-set-toplevel"></a>glade_xml_set_toplevel ()</h3>
<a class="indexterm" name="id3020302"></a><pre class="programlisting">void glade_xml_set_toplevel (<a href="GladeXML.html" title="GladeXML">GladeXML</a> *xml,
<a
href="/usr/share/gtk-doc/html/gtk/GtkWindow.html"
>GtkWindow</a> *window);</pre>
<p>
This is used while the tree is being built to set the toplevel window that
is currently being built. It is mainly used to enable GtkAccelGroup's to
be bound to the correct window, but could have other uses.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>xml</code></em> :</span></td>
<td> the GladeXML object.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>window</code></em> :</span></td>
<td> the toplevel.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3020368"></a><h3>
<a name="glade-xml-ensure-accel"></a>glade_xml_ensure_accel ()</h3>
<a class="indexterm" name="id3020378"></a><pre class="programlisting"><a
href="/usr/share/gtk-doc/html/gtk/gtk-Keyboard-Accelerators.html#GtkAccelGroup"
>GtkAccelGroup</a>* glade_xml_ensure_accel (<a href="GladeXML.html" title="GladeXML">GladeXML</a> *xml);</pre>
<p>
This function is used to get the current GtkAccelGroup. If there isn't
one, a new one is created and bound to the current toplevel window (if
a toplevel has been set).</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>xml</code></em> :</span></td>
<td> the GladeXML object.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> the current GtkAccelGroup.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3020435"></a><h3>
<a name="GLADE-MODULE-CHECK-INIT:CAPS"></a>GLADE_MODULE_CHECK_INIT</h3>
<a class="indexterm" name="id3020448"></a><pre class="programlisting">#define GLADE_MODULE_CHECK_INIT</pre>
<p>
This macro will insert a suitable version check function into a
libglade loadable module.</p>
<p>
</p>
</div>
</div>
</div>
</body>
</html>