7
CONTENT="Modular DocBook HTML Stylesheet Version 1.74b"><LINK
9
TITLE="Libglade Reference Manual"
10
HREF="libglade.html"><LINK
12
TITLE="Libglade Library Reference"
13
HREF="libglade-lib.html"><LINK
15
TITLE="Libglade Initialisation"
16
HREF="libglade-libglade-initialisation.html"><LINK
18
TITLE="Libglade SAX Parser"
19
HREF="libglade-libglade-sax-parser.html"></HEAD
42
>Libglade Reference Manual</FONT
51
HREF="libglade-libglade-initialisation.html"
56
><<< Previous Page</B
89
HREF="libglade-lib.html"
105
HREF="libglade-libglade-sax-parser.html"
110
>Next Page >>></B
129
>GladeXML -- Allows dynamic loading of user interfaces from XML descriptions.</DIV
131
CLASS="REFSYNOPSISDIV"
146
> #include <glade/glade-xml.h>
150
HREF="gladexml.html#GLADEXML-STRUCT"
154
HREF="gladexml.html#GLADEXMLCLASS"
161
HREF="gladexml.html#GLADE-XML-NEW"
163
> (const char *fname,
170
HREF="gladexml.html#GLADE-XML-NEW-FROM-BUFFER"
171
>glade_xml_new_from_buffer</A
172
> (const char *buffer,
178
>gboolean</GTKDOCLINK
180
HREF="gladexml.html#GLADE-XML-CONSTRUCT"
181
>glade_xml_construct</A
191
HREF="gladexml.html#GLADE-XML-SIGNAL-CONNECT"
192
>glade_xml_signal_connect</A
197
const char *handlername,
200
>GCallback</GTKDOCLINK
203
HREF="gladexml.html#GLADE-XML-SIGNAL-CONNECT-DATA"
204
>glade_xml_signal_connect_data</A
209
const char *handlername,
212
>GCallback</GTKDOCLINK
216
>gpointer</GTKDOCLINK
219
HREF="gladexml.html#GLADE-XML-SIGNAL-AUTOCONNECT"
220
>glade_xml_signal_autoconnect</A
228
>GtkWidget</GTKDOCLINK
230
HREF="gladexml.html#GLADE-XML-GET-WIDGET"
231
>glade_xml_get_widget</A
241
HREF="gladexml.html#GLADE-XML-GET-WIDGET-PREFIX"
242
>glade_xml_get_widget_prefix</A
249
HREF="gladexml.html#GLADE-GET-WIDGET-NAME"
250
>glade_get_widget_name</A
253
>GtkWidget</GTKDOCLINK
259
HREF="gladexml.html#GLADE-GET-WIDGET-TREE"
260
>glade_get_widget_tree</A
263
>GtkWidget</GTKDOCLINK
267
HREF="gladexml.html#GLADEXMLCONNECTFUNC"
268
>*GladeXMLConnectFunc</A
269
>) (const <GTKDOCLINK
291
>gboolean</GTKDOCLINK
295
>gpointer</GTKDOCLINK
298
HREF="gladexml.html#GLADE-XML-SIGNAL-CONNECT-FULL"
299
>glade_xml_signal_connect_full</A
309
HREF="gladexml.html#GLADEXMLCONNECTFUNC"
310
>GladeXMLConnectFunc</A
314
>gpointer</GTKDOCLINK
317
HREF="gladexml.html#GLADE-XML-SIGNAL-AUTOCONNECT-FULL"
318
>glade_xml_signal_autoconnect_full</A
325
HREF="gladexml.html#GLADEXMLCONNECTFUNC"
326
>GladeXMLConnectFunc</A
330
>gpointer</GTKDOCLINK
334
>GtkWidget</GTKDOCLINK
336
HREF="gladexml.html#GLADEXMLCUSTOMWIDGETHANDLER"
337
>*GladeXMLCustomWidgetHandler</A
368
>gpointer</GTKDOCLINK
371
HREF="gladexml.html#GLADE-SET-CUSTOM-HANDLER"
372
>glade_set_custom_handler</A
374
HREF="gladexml.html#GLADEXMLCUSTOMWIDGETHANDLER"
375
>GladeXMLCustomWidgetHandler</A
379
>gpointer</GTKDOCLINK
392
>Object Hierarchy</H2
419
>This object represents an `instantiation' of an XML interface description.
420
When one of these objects is created, the XML file is read, and the
421
interface is created. The GladeXML object then provides an interface for
422
accessing the widgets in the interface by the names assigned to them
423
inside the XML description.</P
425
>The GladeXML object can also be used to connect handlers to the named
426
signals in the description. Libglade also provides an interface by which
427
it can look up the signal handler names in the program's symbol table and
428
automatically connect as many handlers up as it can that way.</P
444
NAME="GLADEXML-STRUCT"
455
CLASS="PROGRAMLISTING"
477
>struct GladeXMLClass</H3
486
CLASS="PROGRAMLISTING"
487
>struct GladeXMLClass;</PRE
503
>glade_xml_new ()</H3
512
CLASS="PROGRAMLISTING"
516
>* glade_xml_new (const char *fname,
518
const char *domain);</PRE
523
>Creates a new GladeXML object (and the corresponding widgets) from the
529
>. Optionally it will only build the interface from the
538
>). This feature is useful if you
539
only want to build say a toolbar or menu from the XML file, but not the
540
window it is embedded in. Note also that the XML parse tree is cached
541
to speed up creating another GladeXML object for the same file</P
545
CLASS="INFORMALTABLE"
574
> the XML file name.</TD
591
> the widget node in <TT
596
> to start building from (or <TT
616
> the translation domain for the XML file (or <TT
637
> the newly created GladeXML object, or NULL on failure.</TD
652
NAME="GLADE-XML-NEW-FROM-BUFFER"
654
>glade_xml_new_from_buffer ()</H3
663
CLASS="PROGRAMLISTING"
667
>* glade_xml_new_from_buffer (const char *buffer,
670
const char *domain);</PRE
675
>Creates a new GladeXML object (and the corresponding widgets) from the
681
>. Optionally it will only build the interface from the
690
>). This feature is useful if you
691
only want to build say a toolbar or menu from the XML document, but not the
692
window it is embedded in.</P
696
CLASS="INFORMALTABLE"
725
> the memory buffer containing the XML document.</TD
742
> the size of the buffer.</TD
759
> the widget node in <TT
764
> to start building from (or <TT
784
> the translation domain to use for this interface (or <TT
805
> the newly created GladeXML object, or NULL on failure.</TD
820
NAME="GLADE-XML-CONSTRUCT"
822
>glade_xml_construct ()</H3
831
CLASS="PROGRAMLISTING"
834
>gboolean</GTKDOCLINK
835
> glade_xml_construct (<A
841
const char *domain);</PRE
846
>This routine can be used by bindings (such as gtk--) to help construct
847
a GladeXML object, if it is needed.</P
851
CLASS="INFORMALTABLE"
880
> the GladeXML object</TD
897
> the XML filename</TD
914
> the root widget node (or <TT
934
> the translation domain (or <TT
937
> for the default)</TD
955
> TRUE if the construction succeeded.</TD
970
NAME="GLADE-XML-SIGNAL-CONNECT"
972
>glade_xml_signal_connect ()</H3
981
CLASS="PROGRAMLISTING"
982
>void glade_xml_signal_connect (<A
986
const char *handlername,
989
>GCallback</GTKDOCLINK
995
>In the glade interface descriptions, signal handlers are specified for
996
widgets by name. This function allows you to connect a C function to
997
all signals in the GladeXML file with the given signal handler name.</P
1001
CLASS="INFORMALTABLE"
1030
> the GladeXML object</TD
1047
> the signal handler name</TD
1064
> the signal handler function</TD
1079
NAME="GLADE-XML-SIGNAL-CONNECT-DATA"
1081
>glade_xml_signal_connect_data ()</H3
1090
CLASS="PROGRAMLISTING"
1091
>void glade_xml_signal_connect_data (<A
1092
HREF="gladexml.html"
1095
const char *handlername,
1098
>GCallback</GTKDOCLINK
1102
>gpointer</GTKDOCLINK
1108
>In the glade interface descriptions, signal handlers are specified for
1109
widgets by name. This function allows you to connect a C function to
1110
all signals in the GladeXML file with the given signal handler name.</P
1112
>It differs from glade_xml_signal_connect since it allows you to
1113
specify the data parameter for the signal handler. It is also a small
1114
demonstration of how to use glade_xml_signal_connect_full.</P
1118
CLASS="INFORMALTABLE"
1147
> the GladeXML object</TD
1164
> the signal handler name</TD
1181
> the signal handler function</TD
1198
> the signal handler data</TD
1213
NAME="GLADE-XML-SIGNAL-AUTOCONNECT"
1215
>glade_xml_signal_autoconnect ()</H3
1224
CLASS="PROGRAMLISTING"
1225
>void glade_xml_signal_autoconnect (<A
1226
HREF="gladexml.html"
1233
>This function is a variation of glade_xml_signal_connect. It uses
1234
gmodule's introspective features (by openning the module <TT
1238
look at the application's symbol table. From here it tries to match
1239
the signal handler names given in the interface description with
1240
symbols in the application and connects the signals.</P
1242
>Note that this function will not work correctly if gmodule is not
1243
supported on the platform.</P
1247
CLASS="INFORMALTABLE"
1276
> the GladeXML object.</TD
1291
NAME="GLADE-XML-GET-WIDGET"
1293
>glade_xml_get_widget ()</H3
1302
CLASS="PROGRAMLISTING"
1305
>GtkWidget</GTKDOCLINK
1306
>* glade_xml_get_widget (<A
1307
HREF="gladexml.html"
1310
const char *name);</PRE
1315
>This function is used to get a pointer to the GtkWidget corresponding to
1321
> in the interface description. You would use this if you have to do
1322
anything to the widget after loading.</P
1326
CLASS="INFORMALTABLE"
1355
> the GladeXML object.</TD
1372
> the name of the widget.</TD
1390
> the widget matching <TT
1398
> if none exists.</TD
1413
NAME="GLADE-XML-GET-WIDGET-PREFIX"
1415
>glade_xml_get_widget_prefix ()</H3
1424
CLASS="PROGRAMLISTING"
1428
>* glade_xml_get_widget_prefix (<A
1429
HREF="gladexml.html"
1432
const char *name);</PRE
1437
>This function is used to get a list of pointers to the GtkWidget(s)
1438
with names that start with the string <TT
1443
> in the interface description.
1444
You would use this if you have to do something to all of these widgets
1449
CLASS="INFORMALTABLE"
1478
> the GladeXML object.</TD
1495
> the name of the widget.</TD
1513
> A list of the widget that match <TT
1518
> as the start of their
1522
> if none exists.</TD
1537
NAME="GLADE-GET-WIDGET-NAME"
1539
>glade_get_widget_name ()</H3
1548
CLASS="PROGRAMLISTING"
1549
>const char* glade_get_widget_name (<GTKDOCLINK
1551
>GtkWidget</GTKDOCLINK
1557
>Used to get the name of a widget that was generated by a GladeXML object.</P
1561
CLASS="INFORMALTABLE"
1608
> the name of the widget.</TD
1623
NAME="GLADE-GET-WIDGET-TREE"
1625
>glade_get_widget_tree ()</H3
1634
CLASS="PROGRAMLISTING"
1636
HREF="gladexml.html"
1638
>* glade_get_widget_tree (<GTKDOCLINK
1640
>GtkWidget</GTKDOCLINK
1646
>This function is used to get the GladeXML object that built this widget.</P
1650
CLASS="INFORMALTABLE"
1697
> the GladeXML object that built this widget.</TD
1712
NAME="GLADEXMLCONNECTFUNC"
1714
>GladeXMLConnectFunc ()</H3
1723
CLASS="PROGRAMLISTING"
1724
>void (*GladeXMLConnectFunc) (const <GTKDOCLINK
1730
>GObject</GTKDOCLINK
1742
>GObject</GTKDOCLINK
1746
>gboolean</GTKDOCLINK
1750
>gpointer</GTKDOCLINK
1756
>This is the signature of a function used to connect signals. It is used
1757
by the glade_xml_signal_connect_full and glade_xml_signal_autoconnect_full
1758
functions. It is mainly intented for interpreted language bindings, but
1759
could be useful where the programmer wants more control over the signal
1760
connection process.</P
1764
CLASS="INFORMALTABLE"
1793
> the name of the handler function to connect.</TD
1810
> the object to connect the signal to.</TD
1827
> the name of the signal.</TD
1844
> the string value of the signal data given in the XML file.</TD
1861
> non NULL if gtk_signal_connect_object should be used.</TD
1878
> TRUE if the connection should be made with gtk_signal_connect_after.</TD
1895
> the user data argument.</TD
1910
NAME="GLADE-XML-SIGNAL-CONNECT-FULL"
1912
>glade_xml_signal_connect_full ()</H3
1921
CLASS="PROGRAMLISTING"
1922
>void glade_xml_signal_connect_full (<A
1923
HREF="gladexml.html"
1931
HREF="gladexml.html#GLADEXMLCONNECTFUNC"
1932
>GladeXMLConnectFunc</A
1936
>gpointer</GTKDOCLINK
1942
>This function is similar to glade_xml_signal_connect, except that it
1943
allows you to give an arbitrary function that will be used for actually
1944
connecting the signals. This is mainly useful for writers of interpreted
1945
language bindings, or applications where you need more control over the
1946
signal connection process.</P
1950
CLASS="INFORMALTABLE"
1979
> the GladeXML object.</TD
1996
> the name of the signal handler that we want to connect.</TD
2013
> the function to use to connect the signals.</TD
2030
> arbitrary data to pass to the connect function.</TD
2045
NAME="GLADE-XML-SIGNAL-AUTOCONNECT-FULL"
2047
>glade_xml_signal_autoconnect_full ()</H3
2056
CLASS="PROGRAMLISTING"
2057
>void glade_xml_signal_autoconnect_full
2059
HREF="gladexml.html"
2063
HREF="gladexml.html#GLADEXMLCONNECTFUNC"
2064
>GladeXMLConnectFunc</A
2068
>gpointer</GTKDOCLINK
2074
>This function is similar to glade_xml_signal_connect_full, except that it
2075
will try to connect all signals in the interface, not just a single
2076
named handler. It can be thought of the interpeted language binding
2077
version of glade_xml_signal_autoconnect, except that it does not
2078
require gmodule to function correctly.</P
2082
CLASS="INFORMALTABLE"
2111
> the GladeXML object.</TD
2128
> the function used to connect the signals.</TD
2145
> arbitrary data that will be passed to the connection function.</TD
2160
NAME="GLADEXMLCUSTOMWIDGETHANDLER"
2162
>GladeXMLCustomWidgetHandler ()</H3
2171
CLASS="PROGRAMLISTING"
2174
>GtkWidget</GTKDOCLINK
2175
>* (*GladeXMLCustomWidgetHandler) (<A
2176
HREF="gladexml.html"
2205
>gpointer</GTKDOCLINK
2211
>This prototype is for a function that creates custom widgets.</P
2215
CLASS="INFORMALTABLE"
2244
> the GladeXML object.</TD
2261
> the function name.</TD
2278
> the name of the widget to be created.</TD
2295
> the string1 property.</TD
2312
> the string2 property.</TD
2329
> the int1 property.</TD
2346
> the int2 property.</TD
2363
> the data passed to <A
2364
HREF="gladexml.html#GLADE-SET-CUSTOM-HANDLER"
2365
>glade_set_custom_handler</A
2384
> the GtkWidget.</TD
2399
NAME="GLADE-SET-CUSTOM-HANDLER"
2401
>glade_set_custom_handler ()</H3
2410
CLASS="PROGRAMLISTING"
2411
>void glade_set_custom_handler (<A
2412
HREF="gladexml.html#GLADEXMLCUSTOMWIDGETHANDLER"
2413
>GladeXMLCustomWidgetHandler</A
2417
>gpointer</GTKDOCLINK
2423
>Calling this function allows you to override the default behaviour
2424
when a Custom widget is found in an interface. This could be used by
2425
a language binding to call some other function, or to limit what
2426
functions can be called to create custom widgets.</P
2430
CLASS="INFORMALTABLE"
2459
> the custom widget handler</TD
2476
> user data passed to the custom handler</TD
2488
CLEAR="all"><BR><TABLE
2500
HREF="libglade-libglade-initialisation.html"
2505
><<< Previous Page</B
2518
HREF="libglade.html"
2538
HREF="libglade-lib.html"
2554
HREF="libglade-libglade-sax-parser.html"
2559
>Next Page >>></B
2572
>Libglade Initialisation</B
2582
>Libglade SAX Parser</B
b'\\ No newline at end of file'