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 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529
|
<?xml version="1.0"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
<refentry id="GladeXML">
<refmeta>
<refentrytitle>GladeXML</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>LIBGLADE Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>GladeXML</refname><refpurpose>Allows dynamic loading of user interfaces from XML descriptions.</refpurpose>
</refnamediv>
<refsynopsisdiv><title>Synopsis</title>
<synopsis>
#include <glade/glade-xml.h>
<link linkend="GladeXML-struct">GladeXML</link>;
<link linkend="GladeXMLClass">GladeXMLClass</link>;
<link linkend="GladeXML">GladeXML</link>* <link linkend="glade-xml-new">glade_xml_new</link> (const <link linkend="char">char</link> *fname,
const <link linkend="char">char</link> *root,
const <link linkend="char">char</link> *domain);
<link linkend="GladeXML">GladeXML</link>* <link linkend="glade-xml-new-from-buffer">glade_xml_new_from_buffer</link> (const <link linkend="char">char</link> *buffer,
<link linkend="int">int</link> size,
const <link linkend="char">char</link> *root,
const <link linkend="char">char</link> *domain);
<link linkend="gboolean">gboolean</link> <link linkend="glade-xml-construct">glade_xml_construct</link> (<link linkend="GladeXML">GladeXML</link> *self,
const <link linkend="char">char</link> *fname,
const <link linkend="char">char</link> *root,
const <link linkend="char">char</link> *domain);
<link linkend="void">void</link> <link linkend="glade-xml-signal-connect">glade_xml_signal_connect</link> (<link linkend="GladeXML">GladeXML</link> *self,
const <link linkend="char">char</link> *handlername,
<link linkend="GCallback">GCallback</link> func);
<link linkend="void">void</link> <link linkend="glade-xml-signal-connect-data">glade_xml_signal_connect_data</link> (<link linkend="GladeXML">GladeXML</link> *self,
const <link linkend="char">char</link> *handlername,
<link linkend="GCallback">GCallback</link> func,
<link linkend="gpointer">gpointer</link> user_data);
<link linkend="void">void</link> <link linkend="glade-xml-signal-autoconnect">glade_xml_signal_autoconnect</link> (<link linkend="GladeXML">GladeXML</link> *self);
<link linkend="GtkWidget">GtkWidget</link>* <link linkend="glade-xml-get-widget">glade_xml_get_widget</link> (<link linkend="GladeXML">GladeXML</link> *self,
const <link linkend="char">char</link> *name);
<link linkend="GList">GList</link>* <link linkend="glade-xml-get-widget-prefix">glade_xml_get_widget_prefix</link> (<link linkend="GladeXML">GladeXML</link> *self,
const <link linkend="char">char</link> *name);
const <link linkend="char">char</link>* <link linkend="glade-get-widget-name">glade_get_widget_name</link> (<link linkend="GtkWidget">GtkWidget</link> *widget);
<link linkend="GladeXML">GladeXML</link>* <link linkend="glade-get-widget-tree">glade_get_widget_tree</link> (<link linkend="GtkWidget">GtkWidget</link> *widget);
<link linkend="void">void</link> (<link linkend="GladeXMLConnectFunc">*GladeXMLConnectFunc</link>) (const <link linkend="gchar">gchar</link> *handler_name,
<link linkend="GObject">GObject</link> *object,
const <link linkend="gchar">gchar</link> *signal_name,
const <link linkend="gchar">gchar</link> *signal_data,
<link linkend="GObject">GObject</link> *connect_object,
<link linkend="gboolean">gboolean</link> after,
<link linkend="gpointer">gpointer</link> user_data);
<link linkend="void">void</link> <link linkend="glade-xml-signal-connect-full">glade_xml_signal_connect_full</link> (<link linkend="GladeXML">GladeXML</link> *self,
const <link linkend="gchar">gchar</link> *handler_name,
<link linkend="GladeXMLConnectFunc">GladeXMLConnectFunc</link> func,
<link linkend="gpointer">gpointer</link> user_data);
<link linkend="void">void</link> <link linkend="glade-xml-signal-autoconnect-full">glade_xml_signal_autoconnect_full</link>
(<link linkend="GladeXML">GladeXML</link> *self,
<link linkend="GladeXMLConnectFunc">GladeXMLConnectFunc</link> func,
<link linkend="gpointer">gpointer</link> user_data);
<link linkend="GtkWidget">GtkWidget</link>* (<link linkend="GladeXMLCustomWidgetHandler">*GladeXMLCustomWidgetHandler</link>) (<link linkend="GladeXML">GladeXML</link> *xml,
<link linkend="gchar">gchar</link> *func_name,
<link linkend="gchar">gchar</link> *name,
<link linkend="gchar">gchar</link> *string1,
<link linkend="gchar">gchar</link> *string2,
<link linkend="gint">gint</link> int1,
<link linkend="gint">gint</link> int2,
<link linkend="gpointer">gpointer</link> user_data);
<link linkend="void">void</link> <link linkend="glade-set-custom-handler">glade_set_custom_handler</link> (<link linkend="GladeXMLCustomWidgetHandler">GladeXMLCustomWidgetHandler</link> handler,
<link linkend="gpointer">gpointer</link> user_data);
</synopsis>
</refsynopsisdiv>
<refsect1>
<title>Object Hierarchy</title>
<synopsis>
<link linkend="GObject">GObject</link>
+----GladeXML
</synopsis>
</refsect1>
<refsect1>
<title>Description</title>
<para>
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.
</para>
<para>
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.
</para>
</refsect1>
<refsect1>
<title>Details</title>
<refsect2>
<title><anchor id="GladeXML-struct"/>GladeXML</title>
<indexterm><primary>GladeXML</primary></indexterm><programlisting>typedef struct {
GObject parent;
char *filename;
} GladeXML;
</programlisting>
<para>
</para></refsect2>
<refsect2>
<title><anchor id="GladeXMLClass"/>GladeXMLClass</title>
<indexterm><primary>GladeXMLClass</primary></indexterm><programlisting>typedef struct {
GObjectClass parent_class;
/* Virtual function: gets the appropriate gtype for the typename.*/
GType (* lookup_type) (GladeXML*self, const char *gtypename);
} GladeXMLClass;
</programlisting>
<para>
</para></refsect2>
<refsect2>
<title><anchor id="glade-xml-new"/>glade_xml_new ()</title>
<indexterm><primary>glade_xml_new</primary></indexterm><programlisting><link linkend="GladeXML">GladeXML</link>* glade_xml_new (const <link linkend="char">char</link> *fname,
const <link linkend="char">char</link> *root,
const <link linkend="char">char</link> *domain);</programlisting>
<para>
Creates a new GladeXML object (and the corresponding widgets) from the
XML file <parameter>fname</parameter>. Optionally it will only build the interface from the
widget node <parameter>root</parameter> (if it is not <literal>NULL</literal>). 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</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>fname</parameter> :</term>
<listitem><simpara> the XML file name.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>root</parameter> :</term>
<listitem><simpara> the widget node in <parameter>fname</parameter> to start building from (or <literal>NULL</literal>)
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>domain</parameter> :</term>
<listitem><simpara> the translation domain for the XML file (or <literal>NULL</literal> for default)
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> the newly created GladeXML object, or NULL on failure.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="glade-xml-new-from-buffer"/>glade_xml_new_from_buffer ()</title>
<indexterm><primary>glade_xml_new_from_buffer</primary></indexterm><programlisting><link linkend="GladeXML">GladeXML</link>* glade_xml_new_from_buffer (const <link linkend="char">char</link> *buffer,
<link linkend="int">int</link> size,
const <link linkend="char">char</link> *root,
const <link linkend="char">char</link> *domain);</programlisting>
<para>
Creates a new GladeXML object (and the corresponding widgets) from the
buffer <parameter>buffer</parameter>. Optionally it will only build the interface from the
widget node <parameter>root</parameter> (if it is not <literal>NULL</literal>). 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.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>buffer</parameter> :</term>
<listitem><simpara> the memory buffer containing the XML document.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>size</parameter> :</term>
<listitem><simpara> the size of the buffer.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>root</parameter> :</term>
<listitem><simpara> the widget node in <parameter>buffer</parameter> to start building from (or <literal>NULL</literal>)
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>domain</parameter> :</term>
<listitem><simpara> the translation domain to use for this interface (or <literal>NULL</literal>)
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> the newly created GladeXML object, or NULL on failure.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="glade-xml-construct"/>glade_xml_construct ()</title>
<indexterm><primary>glade_xml_construct</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> glade_xml_construct (<link linkend="GladeXML">GladeXML</link> *self,
const <link linkend="char">char</link> *fname,
const <link linkend="char">char</link> *root,
const <link linkend="char">char</link> *domain);</programlisting>
<para>
This routine can be used by bindings (such as gtk--) to help construct
a GladeXML object, if it is needed.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>self</parameter> :</term>
<listitem><simpara> the GladeXML object
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>fname</parameter> :</term>
<listitem><simpara> the XML filename
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>root</parameter> :</term>
<listitem><simpara> the root widget node (or <literal>NULL</literal> for none)
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>domain</parameter> :</term>
<listitem><simpara> the translation domain (or <literal>NULL</literal> for the default)
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> TRUE if the construction succeeded.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="glade-xml-signal-connect"/>glade_xml_signal_connect ()</title>
<indexterm><primary>glade_xml_signal_connect</primary></indexterm><programlisting><link linkend="void">void</link> glade_xml_signal_connect (<link linkend="GladeXML">GladeXML</link> *self,
const <link linkend="char">char</link> *handlername,
<link linkend="GCallback">GCallback</link> func);</programlisting>
<para>
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.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>self</parameter> :</term>
<listitem><simpara> the GladeXML object
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>handlername</parameter> :</term>
<listitem><simpara> the signal handler name
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>func</parameter> :</term>
<listitem><simpara> the signal handler function
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="glade-xml-signal-connect-data"/>glade_xml_signal_connect_data ()</title>
<indexterm><primary>glade_xml_signal_connect_data</primary></indexterm><programlisting><link linkend="void">void</link> glade_xml_signal_connect_data (<link linkend="GladeXML">GladeXML</link> *self,
const <link linkend="char">char</link> *handlername,
<link linkend="GCallback">GCallback</link> func,
<link linkend="gpointer">gpointer</link> user_data);</programlisting>
<para>
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.
</para>
<para>
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.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>self</parameter> :</term>
<listitem><simpara> the GladeXML object
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>handlername</parameter> :</term>
<listitem><simpara> the signal handler name
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>func</parameter> :</term>
<listitem><simpara> the signal handler function
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter> :</term>
<listitem><simpara> the signal handler data
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="glade-xml-signal-autoconnect"/>glade_xml_signal_autoconnect ()</title>
<indexterm><primary>glade_xml_signal_autoconnect</primary></indexterm><programlisting><link linkend="void">void</link> glade_xml_signal_autoconnect (<link linkend="GladeXML">GladeXML</link> *self);</programlisting>
<para>
This function is a variation of glade_xml_signal_connect. It uses
gmodule's introspective features (by openning the module <literal>NULL</literal>) 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.
</para>
<para>
Note that this function will not work correctly if gmodule is not
supported on the platform.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>self</parameter> :</term>
<listitem><simpara> the GladeXML object.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="glade-xml-get-widget"/>glade_xml_get_widget ()</title>
<indexterm><primary>glade_xml_get_widget</primary></indexterm><programlisting><link linkend="GtkWidget">GtkWidget</link>* glade_xml_get_widget (<link linkend="GladeXML">GladeXML</link> *self,
const <link linkend="char">char</link> *name);</programlisting>
<para>
This function is used to get a pointer to the GtkWidget corresponding to
<parameter>name</parameter> in the interface description. You would use this if you have to do
anything to the widget after loading.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>self</parameter> :</term>
<listitem><simpara> the GladeXML object.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>name</parameter> :</term>
<listitem><simpara> the name of the widget.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> the widget matching <parameter>name</parameter>, or <literal>NULL</literal> if none exists.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="glade-xml-get-widget-prefix"/>glade_xml_get_widget_prefix ()</title>
<indexterm><primary>glade_xml_get_widget_prefix</primary></indexterm><programlisting><link linkend="GList">GList</link>* glade_xml_get_widget_prefix (<link linkend="GladeXML">GladeXML</link> *self,
const <link linkend="char">char</link> *name);</programlisting>
<para>
This function is used to get a list of pointers to the GtkWidget(s)
with names that start with the string <parameter>name</parameter> in the interface description.
You would use this if you have to do something to all of these widgets
after loading.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>self</parameter> :</term>
<listitem><simpara> the GladeXML object.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>name</parameter> :</term>
<listitem><simpara> the name of the widget.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> A list of the widget that match <parameter>name</parameter> as the start of their
name, or <literal>NULL</literal> if none exists.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="glade-get-widget-name"/>glade_get_widget_name ()</title>
<indexterm><primary>glade_get_widget_name</primary></indexterm><programlisting>const <link linkend="char">char</link>* glade_get_widget_name (<link linkend="GtkWidget">GtkWidget</link> *widget);</programlisting>
<para>
Used to get the name of a widget that was generated by a GladeXML object.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>widget</parameter> :</term>
<listitem><simpara> the widget
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> the name of the widget.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="glade-get-widget-tree"/>glade_get_widget_tree ()</title>
<indexterm><primary>glade_get_widget_tree</primary></indexterm><programlisting><link linkend="GladeXML">GladeXML</link>* glade_get_widget_tree (<link linkend="GtkWidget">GtkWidget</link> *widget);</programlisting>
<para>
This function is used to get the GladeXML object that built this widget.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>widget</parameter> :</term>
<listitem><simpara> the widget
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> the GladeXML object that built this widget.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="GladeXMLConnectFunc"/>GladeXMLConnectFunc ()</title>
<indexterm><primary>GladeXMLConnectFunc</primary></indexterm><programlisting><link linkend="void">void</link> (*GladeXMLConnectFunc) (const <link linkend="gchar">gchar</link> *handler_name,
<link linkend="GObject">GObject</link> *object,
const <link linkend="gchar">gchar</link> *signal_name,
const <link linkend="gchar">gchar</link> *signal_data,
<link linkend="GObject">GObject</link> *connect_object,
<link linkend="gboolean">gboolean</link> after,
<link linkend="gpointer">gpointer</link> user_data);</programlisting>
<para>
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.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>handler_name</parameter> :</term>
<listitem><simpara> the name of the handler function to connect.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>object</parameter> :</term>
<listitem><simpara> the object to connect the signal to.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>signal_name</parameter> :</term>
<listitem><simpara> the name of the signal.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>signal_data</parameter> :</term>
<listitem><simpara> the string value of the signal data given in the XML file.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>connect_object</parameter> :</term>
<listitem><simpara> non NULL if g_signal_connect_object should be used.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>after</parameter> :</term>
<listitem><simpara> TRUE if the connection should be made with g_signal_connect_after.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter> :</term>
<listitem><simpara> the user data argument.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="glade-xml-signal-connect-full"/>glade_xml_signal_connect_full ()</title>
<indexterm><primary>glade_xml_signal_connect_full</primary></indexterm><programlisting><link linkend="void">void</link> glade_xml_signal_connect_full (<link linkend="GladeXML">GladeXML</link> *self,
const <link linkend="gchar">gchar</link> *handler_name,
<link linkend="GladeXMLConnectFunc">GladeXMLConnectFunc</link> func,
<link linkend="gpointer">gpointer</link> user_data);</programlisting>
<para>
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.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>self</parameter> :</term>
<listitem><simpara> the GladeXML object.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>handler_name</parameter> :</term>
<listitem><simpara> the name of the signal handler that we want to connect.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>func</parameter> :</term>
<listitem><simpara> the function to use to connect the signals.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter> :</term>
<listitem><simpara> arbitrary data to pass to the connect function.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="glade-xml-signal-autoconnect-full"/>glade_xml_signal_autoconnect_full ()</title>
<indexterm><primary>glade_xml_signal_autoconnect_full</primary></indexterm><programlisting><link linkend="void">void</link> glade_xml_signal_autoconnect_full
(<link linkend="GladeXML">GladeXML</link> *self,
<link linkend="GladeXMLConnectFunc">GladeXMLConnectFunc</link> func,
<link linkend="gpointer">gpointer</link> user_data);</programlisting>
<para>
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.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>self</parameter> :</term>
<listitem><simpara> the GladeXML object.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>func</parameter> :</term>
<listitem><simpara> the function used to connect the signals.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter> :</term>
<listitem><simpara> arbitrary data that will be passed to the connection function.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="GladeXMLCustomWidgetHandler"/>GladeXMLCustomWidgetHandler ()</title>
<indexterm><primary>GladeXMLCustomWidgetHandler</primary></indexterm><programlisting><link linkend="GtkWidget">GtkWidget</link>* (*GladeXMLCustomWidgetHandler) (<link linkend="GladeXML">GladeXML</link> *xml,
<link linkend="gchar">gchar</link> *func_name,
<link linkend="gchar">gchar</link> *name,
<link linkend="gchar">gchar</link> *string1,
<link linkend="gchar">gchar</link> *string2,
<link linkend="gint">gint</link> int1,
<link linkend="gint">gint</link> int2,
<link linkend="gpointer">gpointer</link> user_data);</programlisting>
<para>
This prototype is for a function that creates custom widgets.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>xml</parameter> :</term>
<listitem><simpara> the GladeXML object.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>func_name</parameter> :</term>
<listitem><simpara> the function name.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>name</parameter> :</term>
<listitem><simpara> the name of the widget to be created.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>string1</parameter> :</term>
<listitem><simpara> the string1 property.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>string2</parameter> :</term>
<listitem><simpara> the string2 property.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>int1</parameter> :</term>
<listitem><simpara> the int1 property.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>int2</parameter> :</term>
<listitem><simpara> the int2 property.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter> :</term>
<listitem><simpara> the data passed to <link linkend="glade-set-custom-handler"><function>glade_set_custom_handler()</function></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> the GtkWidget.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="glade-set-custom-handler"/>glade_set_custom_handler ()</title>
<indexterm><primary>glade_set_custom_handler</primary></indexterm><programlisting><link linkend="void">void</link> glade_set_custom_handler (<link linkend="GladeXMLCustomWidgetHandler">GladeXMLCustomWidgetHandler</link> handler,
<link linkend="gpointer">gpointer</link> user_data);</programlisting>
<para>
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.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>handler</parameter> :</term>
<listitem><simpara> the custom widget handler
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter> :</term>
<listitem><simpara> user data passed to the custom handler
</simpara></listitem></varlistentry>
</variablelist></refsect2>
</refsect1>
</refentry>
|