1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276
|
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>GladeXML</title><meta name="generator" content="DocBook XSL Stylesheets V1.66.1"><link rel="start" href="index.html" title="Libglade Reference Manual"><link rel="up" href="libglade-lib.html" title="PartI.Libglade Library Reference"><link rel="prev" href="libglade-Libglade-Initialisation.html" title="Libglade Initialisation"><link rel="next" href="libglade-Libglade-SAX-Parser.html" title="Libglade SAX Parser"><meta name="generator" content="GTK-Doc V1.3 (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="PartI.Libglade Library Reference"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="libglade-Libglade-Initialisation.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><a accesskey="n" href="libglade-Libglade-SAX-Parser.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td></tr></table><div class="refentry" lang="en"><a name="GladeXML"></a><div class="titlepage"></div><div class="refnamediv"><table width="100%"><tr><td valign="top"><h2><span class="refentrytitle">GladeXML</span></h2><p>GladeXML — Allows dynamic loading of user interfaces from XML descriptions.</p></td><td valign="top" align="right"></td></tr></table></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="synopsis">
#include <glade/glade-xml.h>
<a href="GladeXML.html#GladeXML-struct">GladeXML</a>;
<a href="GladeXML.html#GladeXMLClass">GladeXMLClass</a>;
<a href="GladeXML.html" title="GladeXML">GladeXML</a>* <a href="GladeXML.html#glade-xml-new">glade_xml_new</a> (const char *fname,
const char *root,
const char *domain);
<a href="GladeXML.html" title="GladeXML">GladeXML</a>* <a href="GladeXML.html#glade-xml-new-from-buffer">glade_xml_new_from_buffer</a> (const char *buffer,
int size,
const char *root,
const char *domain);
gboolean <a href="GladeXML.html#glade-xml-construct">glade_xml_construct</a> (<a href="GladeXML.html" title="GladeXML">GladeXML</a> *self,
const char *fname,
const char *root,
const char *domain);
void <a href="GladeXML.html#glade-xml-signal-connect">glade_xml_signal_connect</a> (<a href="GladeXML.html" title="GladeXML">GladeXML</a> *self,
const char *handlername,
GCallback func);
void <a href="GladeXML.html#glade-xml-signal-connect-data">glade_xml_signal_connect_data</a> (<a href="GladeXML.html" title="GladeXML">GladeXML</a> *self,
const char *handlername,
GCallback func,
gpointer user_data);
void <a href="GladeXML.html#glade-xml-signal-autoconnect">glade_xml_signal_autoconnect</a> (<a href="GladeXML.html" title="GladeXML">GladeXML</a> *self);
GtkWidget* <a href="GladeXML.html#glade-xml-get-widget">glade_xml_get_widget</a> (<a href="GladeXML.html" title="GladeXML">GladeXML</a> *self,
const char *name);
GList* <a href="GladeXML.html#glade-xml-get-widget-prefix">glade_xml_get_widget_prefix</a> (<a href="GladeXML.html" title="GladeXML">GladeXML</a> *self,
const char *name);
const char* <a href="GladeXML.html#glade-get-widget-name">glade_get_widget_name</a> (GtkWidget *widget);
<a href="GladeXML.html" title="GladeXML">GladeXML</a>* <a href="GladeXML.html#glade-get-widget-tree">glade_get_widget_tree</a> (GtkWidget *widget);
void (<a href="GladeXML.html#GladeXMLConnectFunc">*GladeXMLConnectFunc</a>) (const gchar *handler_name,
GObject *object,
const gchar *signal_name,
const gchar *signal_data,
GObject *connect_object,
gboolean after,
gpointer user_data);
void <a href="GladeXML.html#glade-xml-signal-connect-full">glade_xml_signal_connect_full</a> (<a href="GladeXML.html" title="GladeXML">GladeXML</a> *self,
const gchar *handler_name,
<a href="GladeXML.html#GladeXMLConnectFunc">GladeXMLConnectFunc</a> func,
gpointer user_data);
void <a href="GladeXML.html#glade-xml-signal-autoconnect-full">glade_xml_signal_autoconnect_full</a>
(<a href="GladeXML.html" title="GladeXML">GladeXML</a> *self,
<a href="GladeXML.html#GladeXMLConnectFunc">GladeXMLConnectFunc</a> func,
gpointer user_data);
GtkWidget* (<a href="GladeXML.html#GladeXMLCustomWidgetHandler">*GladeXMLCustomWidgetHandler</a>) (<a href="GladeXML.html" title="GladeXML">GladeXML</a> *xml,
gchar *func_name,
gchar *name,
gchar *string1,
gchar *string2,
gint int1,
gint int2,
gpointer user_data);
void <a href="GladeXML.html#glade-set-custom-handler">glade_set_custom_handler</a> (<a href="GladeXML.html#GladeXMLCustomWidgetHandler">GladeXMLCustomWidgetHandler</a> handler,
gpointer user_data);
</pre></div><div class="refsect1" lang="en"><a name="id294156"></a><h2>Object Hierarchy</h2><pre class="synopsis">
GObject
+----GladeXML
</pre></div><div class="refsect1" lang="en"><a name="id294170"></a><h2>Description</h2><p>
This object represents an `instantiation' of an XML interface description.
When one of these objects is created, the XML file is read, and the
interface is created. The GladeXML object then provides an interface for
accessing the widgets in the interface by the names assigned to them
inside the XML description.
</p><p>
The GladeXML object can also be used to connect handlers to the named
signals in the description. Libglade also provides an interface by which
it can look up the signal handler names in the program's symbol table and
automatically connect as many handlers up as it can that way.
</p></div><div class="refsect1" lang="en"><a name="id294189"></a><h2>Details</h2><div class="refsect2" lang="en"><a name="id294194"></a><h3><a name="GladeXML-struct"></a>GladeXML</h3><a class="indexterm" name="id294202"></a><pre class="programlisting">typedef struct {
GObject parent;
char *filename;
} GladeXML;
</pre><p>
</p></div><hr><div class="refsect2" lang="en"><a name="id294213"></a><h3><a name="GladeXMLClass"></a>GladeXMLClass</h3><a class="indexterm" name="id294221"></a><pre class="programlisting">typedef struct {
GObjectClass parent_class;
/* Virtual function: gets the appropriate gtype for the typename.*/
GType (* lookup_type) (GladeXML*self, const char *gtypename);
} GladeXMLClass;
</pre><p>
</p></div><hr><div class="refsect2" lang="en"><a name="id294232"></a><h3><a name="glade-xml-new"></a>glade_xml_new ()</h3><a class="indexterm" name="id294241"></a><pre class="programlisting"><a href="GladeXML.html" title="GladeXML">GladeXML</a>* glade_xml_new (const char *fname,
const char *root,
const char *domain);</pre><p>
Creates a new GladeXML object (and the corresponding widgets) from the
XML file <i class="parameter"><tt>fname</tt></i>. Optionally it will only build the interface from the
widget node <i class="parameter"><tt>root</tt></i> (if it is not <tt class="literal">NULL</tt>). This feature is useful if you
only want to build say a toolbar or menu from the XML file, but not the
window it is embedded in. Note also that the XML parse tree is cached
to speed up creating another GladeXML object for the same file</p><p>
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>fname</tt></i>:</span></td><td> the XML file name.
</td></tr><tr><td><span class="term"><i class="parameter"><tt>root</tt></i>:</span></td><td> the widget node in <i class="parameter"><tt>fname</tt></i> to start building from (or <tt class="literal">NULL</tt>)
</td></tr><tr><td><span class="term"><i class="parameter"><tt>domain</tt></i>:</span></td><td> the translation domain for the XML file (or <tt class="literal">NULL</tt> for default)
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td> the newly created GladeXML object, or NULL on failure.
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id337839"></a><h3><a name="glade-xml-new-from-buffer"></a>glade_xml_new_from_buffer ()</h3><a class="indexterm" name="id337848"></a><pre class="programlisting"><a href="GladeXML.html" title="GladeXML">GladeXML</a>* glade_xml_new_from_buffer (const char *buffer,
int size,
const char *root,
const char *domain);</pre><p>
Creates a new GladeXML object (and the corresponding widgets) from the
buffer <i class="parameter"><tt>buffer</tt></i>. Optionally it will only build the interface from the
widget node <i class="parameter"><tt>root</tt></i> (if it is not <tt class="literal">NULL</tt>). This feature is useful if you
only want to build say a toolbar or menu from the XML document, but not the
window it is embedded in.</p><p>
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>buffer</tt></i>:</span></td><td> the memory buffer containing the XML document.
</td></tr><tr><td><span class="term"><i class="parameter"><tt>size</tt></i>:</span></td><td> the size of the buffer.
</td></tr><tr><td><span class="term"><i class="parameter"><tt>root</tt></i>:</span></td><td> the widget node in <i class="parameter"><tt>buffer</tt></i> to start building from (or <tt class="literal">NULL</tt>)
</td></tr><tr><td><span class="term"><i class="parameter"><tt>domain</tt></i>:</span></td><td> the translation domain to use for this interface (or <tt class="literal">NULL</tt>)
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td> the newly created GladeXML object, or NULL on failure.
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id337965"></a><h3><a name="glade-xml-construct"></a>glade_xml_construct ()</h3><a class="indexterm" name="id337973"></a><pre class="programlisting">gboolean glade_xml_construct (<a href="GladeXML.html" title="GladeXML">GladeXML</a> *self,
const char *fname,
const char *root,
const char *domain);</pre><p>
This routine can be used by bindings (such as gtk--) to help construct
a GladeXML object, if it is needed.</p><p>
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>self</tt></i>:</span></td><td> the GladeXML object
</td></tr><tr><td><span class="term"><i class="parameter"><tt>fname</tt></i>:</span></td><td> the XML filename
</td></tr><tr><td><span class="term"><i class="parameter"><tt>root</tt></i>:</span></td><td> the root widget node (or <tt class="literal">NULL</tt> for none)
</td></tr><tr><td><span class="term"><i class="parameter"><tt>domain</tt></i>:</span></td><td> the translation domain (or <tt class="literal">NULL</tt> for the default)
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td> TRUE if the construction succeeded.
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id338077"></a><h3><a name="glade-xml-signal-connect"></a>glade_xml_signal_connect ()</h3><a class="indexterm" name="id338085"></a><pre class="programlisting">void glade_xml_signal_connect (<a href="GladeXML.html" title="GladeXML">GladeXML</a> *self,
const char *handlername,
GCallback func);</pre><p>
In the glade interface descriptions, signal handlers are specified for
widgets by name. This function allows you to connect a C function to
all signals in the GladeXML file with the given signal handler name.</p><p>
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>self</tt></i>:</span></td><td> the GladeXML object
</td></tr><tr><td><span class="term"><i class="parameter"><tt>handlername</tt></i>:</span></td><td> the signal handler name
</td></tr><tr><td><span class="term"><i class="parameter"><tt>func</tt></i>:</span></td><td> the signal handler function
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id338157"></a><h3><a name="glade-xml-signal-connect-data"></a>glade_xml_signal_connect_data ()</h3><a class="indexterm" name="id338166"></a><pre class="programlisting">void glade_xml_signal_connect_data (<a href="GladeXML.html" title="GladeXML">GladeXML</a> *self,
const char *handlername,
GCallback func,
gpointer user_data);</pre><p>
In the glade interface descriptions, signal handlers are specified for
widgets by name. This function allows you to connect a C function to
all signals in the GladeXML file with the given signal handler name.
</p><p>
It differs from glade_xml_signal_connect since it allows you to
specify the data parameter for the signal handler. It is also a small
demonstration of how to use glade_xml_signal_connect_full.</p><p>
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>self</tt></i>:</span></td><td> the GladeXML object
</td></tr><tr><td><span class="term"><i class="parameter"><tt>handlername</tt></i>:</span></td><td> the signal handler name
</td></tr><tr><td><span class="term"><i class="parameter"><tt>func</tt></i>:</span></td><td> the signal handler function
</td></tr><tr><td><span class="term"><i class="parameter"><tt>user_data</tt></i>:</span></td><td> the signal handler data
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id338258"></a><h3><a name="glade-xml-signal-autoconnect"></a>glade_xml_signal_autoconnect ()</h3><a class="indexterm" name="id338267"></a><pre class="programlisting">void glade_xml_signal_autoconnect (<a href="GladeXML.html" title="GladeXML">GladeXML</a> *self);</pre><p>
This function is a variation of glade_xml_signal_connect. It uses
gmodule's introspective features (by openning the module <tt class="literal">NULL</tt>) to
look at the application's symbol table. From here it tries to match
the signal handler names given in the interface description with
symbols in the application and connects the signals.
</p><p>
Note that this function will not work correctly if gmodule is not
supported on the platform.</p><p>
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>self</tt></i>:</span></td><td> the GladeXML object.
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id338314"></a><h3><a name="glade-xml-get-widget"></a>glade_xml_get_widget ()</h3><a class="indexterm" name="id338322"></a><pre class="programlisting">GtkWidget* glade_xml_get_widget (<a href="GladeXML.html" title="GladeXML">GladeXML</a> *self,
const char *name);</pre><p>
This function is used to get a pointer to the GtkWidget corresponding to
<i class="parameter"><tt>name</tt></i> in the interface description. You would use this if you have to do
anything to the widget after loading.</p><p>
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>self</tt></i>:</span></td><td> the GladeXML object.
</td></tr><tr><td><span class="term"><i class="parameter"><tt>name</tt></i>:</span></td><td> the name of the widget.
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td> the widget matching <i class="parameter"><tt>name</tt></i>, or <tt class="literal">NULL</tt> if none exists.
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id338397"></a><h3><a name="glade-xml-get-widget-prefix"></a>glade_xml_get_widget_prefix ()</h3><a class="indexterm" name="id338405"></a><pre class="programlisting">GList* glade_xml_get_widget_prefix (<a href="GladeXML.html" title="GladeXML">GladeXML</a> *self,
const char *name);</pre><p>
This function is used to get a list of pointers to the GtkWidget(s)
with names that start with the string <i class="parameter"><tt>name</tt></i> in the interface description.
You would use this if you have to do something to all of these widgets
after loading.</p><p>
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>self</tt></i>:</span></td><td> the GladeXML object.
</td></tr><tr><td><span class="term"><i class="parameter"><tt>name</tt></i>:</span></td><td> the name of the widget.
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td> A list of the widget that match <i class="parameter"><tt>name</tt></i> as the start of their
name, or <tt class="literal">NULL</tt> if none exists.
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id338481"></a><h3><a name="glade-get-widget-name"></a>glade_get_widget_name ()</h3><a class="indexterm" name="id338490"></a><pre class="programlisting">const char* glade_get_widget_name (GtkWidget *widget);</pre><p>
Used to get the name of a widget that was generated by a GladeXML object.</p><p>
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>widget</tt></i>:</span></td><td> the widget
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td> the name of the widget.
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id338539"></a><h3><a name="glade-get-widget-tree"></a>glade_get_widget_tree ()</h3><a class="indexterm" name="id338548"></a><pre class="programlisting"><a href="GladeXML.html" title="GladeXML">GladeXML</a>* glade_get_widget_tree (GtkWidget *widget);</pre><p>
This function is used to get the GladeXML object that built this widget.</p><p>
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>widget</tt></i>:</span></td><td> the widget
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td> the GladeXML object that built this widget.
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id338596"></a><h3><a name="GladeXMLConnectFunc"></a>GladeXMLConnectFunc ()</h3><a class="indexterm" name="id338604"></a><pre class="programlisting">void (*GladeXMLConnectFunc) (const gchar *handler_name,
GObject *object,
const gchar *signal_name,
const gchar *signal_data,
GObject *connect_object,
gboolean after,
gpointer user_data);</pre><p>
This is the signature of a function used to connect signals. It is used
by the glade_xml_signal_connect_full and glade_xml_signal_autoconnect_full
functions. It is mainly intented for interpreted language bindings, but
could be useful where the programmer wants more control over the signal
connection process.</p><p>
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>handler_name</tt></i>:</span></td><td> the name of the handler function to connect.
</td></tr><tr><td><span class="term"><i class="parameter"><tt>object</tt></i>:</span></td><td> the object to connect the signal to.
</td></tr><tr><td><span class="term"><i class="parameter"><tt>signal_name</tt></i>:</span></td><td> the name of the signal.
</td></tr><tr><td><span class="term"><i class="parameter"><tt>signal_data</tt></i>:</span></td><td> the string value of the signal data given in the XML file.
</td></tr><tr><td><span class="term"><i class="parameter"><tt>connect_object</tt></i>:</span></td><td> non NULL if g_signal_connect_object should be used.
</td></tr><tr><td><span class="term"><i class="parameter"><tt>after</tt></i>:</span></td><td> TRUE if the connection should be made with g_signal_connect_after.
</td></tr><tr><td><span class="term"><i class="parameter"><tt>user_data</tt></i>:</span></td><td> the user data argument.
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id311878"></a><h3><a name="glade-xml-signal-connect-full"></a>glade_xml_signal_connect_full ()</h3><a class="indexterm" name="id299177"></a><pre class="programlisting">void glade_xml_signal_connect_full (<a href="GladeXML.html" title="GladeXML">GladeXML</a> *self,
const gchar *handler_name,
<a href="GladeXML.html#GladeXMLConnectFunc">GladeXMLConnectFunc</a> func,
gpointer user_data);</pre><p>
This function is similar to glade_xml_signal_connect, except that it
allows you to give an arbitrary function that will be used for actually
connecting the signals. This is mainly useful for writers of interpreted
language bindings, or applications where you need more control over the
signal connection process.</p><p>
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>self</tt></i>:</span></td><td> the GladeXML object.
</td></tr><tr><td><span class="term"><i class="parameter"><tt>handler_name</tt></i>:</span></td><td> the name of the signal handler that we want to connect.
</td></tr><tr><td><span class="term"><i class="parameter"><tt>func</tt></i>:</span></td><td> the function to use to connect the signals.
</td></tr><tr><td><span class="term"><i class="parameter"><tt>user_data</tt></i>:</span></td><td> arbitrary data to pass to the connect function.
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id338787"></a><h3><a name="glade-xml-signal-autoconnect-full"></a>glade_xml_signal_autoconnect_full ()</h3><a class="indexterm" name="id338795"></a><pre class="programlisting">void glade_xml_signal_autoconnect_full
(<a href="GladeXML.html" title="GladeXML">GladeXML</a> *self,
<a href="GladeXML.html#GladeXMLConnectFunc">GladeXMLConnectFunc</a> func,
gpointer user_data);</pre><p>
This function is similar to glade_xml_signal_connect_full, except that it
will try to connect all signals in the interface, not just a single
named handler. It can be thought of the interpeted language binding
version of glade_xml_signal_autoconnect, except that it does not
require gmodule to function correctly.</p><p>
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>self</tt></i>:</span></td><td> the GladeXML object.
</td></tr><tr><td><span class="term"><i class="parameter"><tt>func</tt></i>:</span></td><td> the function used to connect the signals.
</td></tr><tr><td><span class="term"><i class="parameter"><tt>user_data</tt></i>:</span></td><td> arbitrary data that will be passed to the connection function.
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id338867"></a><h3><a name="GladeXMLCustomWidgetHandler"></a>GladeXMLCustomWidgetHandler ()</h3><a class="indexterm" name="id338875"></a><pre class="programlisting">GtkWidget* (*GladeXMLCustomWidgetHandler) (<a href="GladeXML.html" title="GladeXML">GladeXML</a> *xml,
gchar *func_name,
gchar *name,
gchar *string1,
gchar *string2,
gint int1,
gint int2,
gpointer user_data);</pre><p>
This prototype is for a function that creates custom widgets.</p><p>
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>xml</tt></i>:</span></td><td> the GladeXML object.
</td></tr><tr><td><span class="term"><i class="parameter"><tt>func_name</tt></i>:</span></td><td> the function name.
</td></tr><tr><td><span class="term"><i class="parameter"><tt>name</tt></i>:</span></td><td> the name of the widget to be created.
</td></tr><tr><td><span class="term"><i class="parameter"><tt>string1</tt></i>:</span></td><td> the string1 property.
</td></tr><tr><td><span class="term"><i class="parameter"><tt>string2</tt></i>:</span></td><td> the string2 property.
</td></tr><tr><td><span class="term"><i class="parameter"><tt>int1</tt></i>:</span></td><td> the int1 property.
</td></tr><tr><td><span class="term"><i class="parameter"><tt>int2</tt></i>:</span></td><td> the int2 property.
</td></tr><tr><td><span class="term"><i class="parameter"><tt>user_data</tt></i>:</span></td><td> the data passed to <a href="GladeXML.html#glade-set-custom-handler"><tt class="function">glade_set_custom_handler()</tt></a>
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td> the GtkWidget.
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id339039"></a><h3><a name="glade-set-custom-handler"></a>glade_set_custom_handler ()</h3><a class="indexterm" name="id339047"></a><pre class="programlisting">void glade_set_custom_handler (<a href="GladeXML.html#GladeXMLCustomWidgetHandler">GladeXMLCustomWidgetHandler</a> handler,
gpointer user_data);</pre><p>
Calling this function allows you to override the default behaviour
when a Custom widget is found in an interface. This could be used by
a language binding to call some other function, or to limit what
functions can be called to create custom widgets.</p><p>
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>handler</tt></i>:</span></td><td> the custom widget handler
</td></tr><tr><td><span class="term"><i class="parameter"><tt>user_data</tt></i>:</span></td><td> user data passed to the custom handler
</td></tr></tbody></table></div></div></div></div><table class="navigation" width="100%" summary="Navigation footer" cellpadding="2" cellspacing="0"><tr valign="middle"><td align="left"><a accesskey="p" href="libglade-Libglade-Initialisation.html"><b><<Libglade Initialisation</b></a></td><td align="right"><a accesskey="n" href="libglade-Libglade-SAX-Parser.html"><b>Libglade SAX Parser>></b></a></td></tr></table></body></html>
|