~ubuntu-branches/ubuntu/precise/libglade2/precise-proposed

« back to all changes in this revision

Viewing changes to doc/xml/glade-xml.xml

  • Committer: Bazaar Package Importer
  • Author(s): Andreas Rottmann
  • Date: 2005-02-28 14:33:01 UTC
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20050228143301-hayspyo18m0anw2t
Tags: upstream-2.4.2
ImportĀ upstreamĀ versionĀ 2.4.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0"?>
 
2
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" 
 
3
               "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
 
4
<refentry id="GladeXML">
 
5
<refmeta>
 
6
<refentrytitle>GladeXML</refentrytitle>
 
7
<manvolnum>3</manvolnum>
 
8
<refmiscinfo>LIBGLADE Library</refmiscinfo>
 
9
</refmeta>
 
10
 
 
11
<refnamediv>
 
12
<refname>GladeXML</refname><refpurpose>Allows dynamic loading of user interfaces from XML descriptions.</refpurpose>
 
13
</refnamediv>
 
14
 
 
15
<refsynopsisdiv><title>Synopsis</title>
 
16
 
 
17
<synopsis>
 
18
 
 
19
#include &lt;glade/glade-xml.h&gt;
 
20
 
 
21
 
 
22
            <link linkend="GladeXML-struct">GladeXML</link>;
 
23
            <link linkend="GladeXMLClass">GladeXMLClass</link>;
 
24
<link linkend="GladeXML">GladeXML</link>*   <link linkend="glade-xml-new">glade_xml_new</link>                   (const <link linkend="char">char</link> *fname,
 
25
                                             const <link linkend="char">char</link> *root,
 
26
                                             const <link linkend="char">char</link> *domain);
 
27
<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,
 
28
                                             <link linkend="int">int</link> size,
 
29
                                             const <link linkend="char">char</link> *root,
 
30
                                             const <link linkend="char">char</link> *domain);
 
31
<link linkend="gboolean">gboolean</link>    <link linkend="glade-xml-construct">glade_xml_construct</link>             (<link linkend="GladeXML">GladeXML</link> *self,
 
32
                                             const <link linkend="char">char</link> *fname,
 
33
                                             const <link linkend="char">char</link> *root,
 
34
                                             const <link linkend="char">char</link> *domain);
 
35
 
 
36
<link linkend="void">void</link>        <link linkend="glade-xml-signal-connect">glade_xml_signal_connect</link>        (<link linkend="GladeXML">GladeXML</link> *self,
 
37
                                             const <link linkend="char">char</link> *handlername,
 
38
                                             <link linkend="GCallback">GCallback</link> func);
 
39
<link linkend="void">void</link>        <link linkend="glade-xml-signal-connect-data">glade_xml_signal_connect_data</link>   (<link linkend="GladeXML">GladeXML</link> *self,
 
40
                                             const <link linkend="char">char</link> *handlername,
 
41
                                             <link linkend="GCallback">GCallback</link> func,
 
42
                                             <link linkend="gpointer">gpointer</link> user_data);
 
43
<link linkend="void">void</link>        <link linkend="glade-xml-signal-autoconnect">glade_xml_signal_autoconnect</link>    (<link linkend="GladeXML">GladeXML</link> *self);
 
44
 
 
45
<link linkend="GtkWidget">GtkWidget</link>*  <link linkend="glade-xml-get-widget">glade_xml_get_widget</link>            (<link linkend="GladeXML">GladeXML</link> *self,
 
46
                                             const <link linkend="char">char</link> *name);
 
47
<link linkend="GList">GList</link>*      <link linkend="glade-xml-get-widget-prefix">glade_xml_get_widget_prefix</link>     (<link linkend="GladeXML">GladeXML</link> *self,
 
48
                                             const <link linkend="char">char</link> *name);
 
49
const <link linkend="char">char</link>* <link linkend="glade-get-widget-name">glade_get_widget_name</link>           (<link linkend="GtkWidget">GtkWidget</link> *widget);
 
50
<link linkend="GladeXML">GladeXML</link>*   <link linkend="glade-get-widget-tree">glade_get_widget_tree</link>           (<link linkend="GtkWidget">GtkWidget</link> *widget);
 
51
 
 
52
<link linkend="void">void</link>        (<link linkend="GladeXMLConnectFunc">*GladeXMLConnectFunc</link>)          (const <link linkend="gchar">gchar</link> *handler_name,
 
53
                                             <link linkend="GObject">GObject</link> *object,
 
54
                                             const <link linkend="gchar">gchar</link> *signal_name,
 
55
                                             const <link linkend="gchar">gchar</link> *signal_data,
 
56
                                             <link linkend="GObject">GObject</link> *connect_object,
 
57
                                             <link linkend="gboolean">gboolean</link> after,
 
58
                                             <link linkend="gpointer">gpointer</link> user_data);
 
59
<link linkend="void">void</link>        <link linkend="glade-xml-signal-connect-full">glade_xml_signal_connect_full</link>   (<link linkend="GladeXML">GladeXML</link> *self,
 
60
                                             const <link linkend="gchar">gchar</link> *handler_name,
 
61
                                             <link linkend="GladeXMLConnectFunc">GladeXMLConnectFunc</link> func,
 
62
                                             <link linkend="gpointer">gpointer</link> user_data);
 
63
<link linkend="void">void</link>        <link linkend="glade-xml-signal-autoconnect-full">glade_xml_signal_autoconnect_full</link>
 
64
                                            (<link linkend="GladeXML">GladeXML</link> *self,
 
65
                                             <link linkend="GladeXMLConnectFunc">GladeXMLConnectFunc</link> func,
 
66
                                             <link linkend="gpointer">gpointer</link> user_data);
 
67
<link linkend="GtkWidget">GtkWidget</link>*  (<link linkend="GladeXMLCustomWidgetHandler">*GladeXMLCustomWidgetHandler</link>)  (<link linkend="GladeXML">GladeXML</link> *xml,
 
68
                                             <link linkend="gchar">gchar</link> *func_name,
 
69
                                             <link linkend="gchar">gchar</link> *name,
 
70
                                             <link linkend="gchar">gchar</link> *string1,
 
71
                                             <link linkend="gchar">gchar</link> *string2,
 
72
                                             <link linkend="gint">gint</link> int1,
 
73
                                             <link linkend="gint">gint</link> int2,
 
74
                                             <link linkend="gpointer">gpointer</link> user_data);
 
75
<link linkend="void">void</link>        <link linkend="glade-set-custom-handler">glade_set_custom_handler</link>        (<link linkend="GladeXMLCustomWidgetHandler">GladeXMLCustomWidgetHandler</link> handler,
 
76
                                             <link linkend="gpointer">gpointer</link> user_data);
 
77
 
 
78
 
 
79
</synopsis>
 
80
</refsynopsisdiv>
 
81
 
 
82
<refsect1>
 
83
<title>Object Hierarchy</title>
 
84
<synopsis>
 
85
 
 
86
  <link linkend="GObject">GObject</link>
 
87
   +----GladeXML
 
88
</synopsis>
 
89
 
 
90
</refsect1>
 
91
 
 
92
 
 
93
 
 
94
 
 
95
 
 
96
 
 
97
 
 
98
 
 
99
<refsect1>
 
100
<title>Description</title>
 
101
<para>
 
102
This object represents an `instantiation' of an XML interface description.
 
103
When one of these objects is created, the XML file is read, and the
 
104
interface is created.  The GladeXML object then provides an interface for
 
105
accessing the widgets in the interface by the names assigned to them
 
106
inside the XML description.
 
107
</para>
 
108
 
 
109
<para>
 
110
The GladeXML object can also be used to connect handlers to the named
 
111
signals in the description.  Libglade also provides an interface by which
 
112
it can look up the signal handler names in the program's symbol table and
 
113
automatically connect as many handlers up as it can that way.
 
114
</para>
 
115
</refsect1>
 
116
 
 
117
<refsect1>
 
118
<title>Details</title>
 
119
<refsect2>
 
120
<title><anchor id="GladeXML-struct"/>GladeXML</title>
 
121
<indexterm><primary>GladeXML</primary></indexterm><programlisting>typedef struct {
 
122
    GObject parent;
 
123
 
 
124
    char *filename;
 
125
} GladeXML;
 
126
</programlisting>
 
127
<para>
 
128
 
 
129
</para></refsect2>
 
130
<refsect2>
 
131
<title><anchor id="GladeXMLClass"/>GladeXMLClass</title>
 
132
<indexterm><primary>GladeXMLClass</primary></indexterm><programlisting>typedef struct {
 
133
    GObjectClass parent_class;
 
134
 
 
135
    /* Virtual function: gets the appropriate gtype for the typename.*/
 
136
    GType (* lookup_type) (GladeXML*self, const char *gtypename);
 
137
} GladeXMLClass;
 
138
</programlisting>
 
139
<para>
 
140
 
 
141
</para></refsect2>
 
142
<refsect2>
 
143
<title><anchor id="glade-xml-new"/>glade_xml_new ()</title>
 
144
<indexterm><primary>glade_xml_new</primary></indexterm><programlisting><link linkend="GladeXML">GladeXML</link>*   glade_xml_new                   (const <link linkend="char">char</link> *fname,
 
145
                                             const <link linkend="char">char</link> *root,
 
146
                                             const <link linkend="char">char</link> *domain);</programlisting>
 
147
<para>
 
148
Creates a new GladeXML object (and the corresponding widgets) from the
 
149
XML file <parameter>fname</parameter>.  Optionally it will only build the interface from the
 
150
widget node <parameter>root</parameter> (if it is not <literal>NULL</literal>).  This feature is useful if you
 
151
only want to build say a toolbar or menu from the XML file, but not the
 
152
window it is embedded in.  Note also that the XML parse tree is cached
 
153
to speed up creating another GladeXML object for the same file</para>
 
154
<para>
 
155
 
 
156
</para><variablelist role="params">
 
157
<varlistentry><term><parameter>fname</parameter>&nbsp;:</term>
 
158
<listitem><simpara> the XML file name.
 
159
</simpara></listitem></varlistentry>
 
160
<varlistentry><term><parameter>root</parameter>&nbsp;:</term>
 
161
<listitem><simpara> the widget node in <parameter>fname</parameter> to start building from (or <literal>NULL</literal>)
 
162
</simpara></listitem></varlistentry>
 
163
<varlistentry><term><parameter>domain</parameter>&nbsp;:</term>
 
164
<listitem><simpara> the translation domain for the XML file (or <literal>NULL</literal> for default)
 
165
</simpara></listitem></varlistentry>
 
166
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the newly created GladeXML object, or NULL on failure.
 
167
</simpara></listitem></varlistentry>
 
168
</variablelist></refsect2>
 
169
<refsect2>
 
170
<title><anchor id="glade-xml-new-from-buffer"/>glade_xml_new_from_buffer ()</title>
 
171
<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,
 
172
                                             <link linkend="int">int</link> size,
 
173
                                             const <link linkend="char">char</link> *root,
 
174
                                             const <link linkend="char">char</link> *domain);</programlisting>
 
175
<para>
 
176
Creates a new GladeXML object (and the corresponding widgets) from the
 
177
buffer <parameter>buffer</parameter>.  Optionally it will only build the interface from the
 
178
widget node <parameter>root</parameter> (if it is not <literal>NULL</literal>).  This feature is useful if you
 
179
only want to build say a toolbar or menu from the XML document, but not the
 
180
window it is embedded in.</para>
 
181
<para>
 
182
 
 
183
</para><variablelist role="params">
 
184
<varlistentry><term><parameter>buffer</parameter>&nbsp;:</term>
 
185
<listitem><simpara> the memory buffer containing the XML document.
 
186
</simpara></listitem></varlistentry>
 
187
<varlistentry><term><parameter>size</parameter>&nbsp;:</term>
 
188
<listitem><simpara> the size of the buffer.
 
189
</simpara></listitem></varlistentry>
 
190
<varlistentry><term><parameter>root</parameter>&nbsp;:</term>
 
191
<listitem><simpara> the widget node in <parameter>buffer</parameter> to start building from (or <literal>NULL</literal>)
 
192
</simpara></listitem></varlistentry>
 
193
<varlistentry><term><parameter>domain</parameter>&nbsp;:</term>
 
194
<listitem><simpara> the translation domain to use for this interface (or <literal>NULL</literal>)
 
195
</simpara></listitem></varlistentry>
 
196
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the newly created GladeXML object, or NULL on failure.
 
197
</simpara></listitem></varlistentry>
 
198
</variablelist></refsect2>
 
199
<refsect2>
 
200
<title><anchor id="glade-xml-construct"/>glade_xml_construct ()</title>
 
201
<indexterm><primary>glade_xml_construct</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>    glade_xml_construct             (<link linkend="GladeXML">GladeXML</link> *self,
 
202
                                             const <link linkend="char">char</link> *fname,
 
203
                                             const <link linkend="char">char</link> *root,
 
204
                                             const <link linkend="char">char</link> *domain);</programlisting>
 
205
<para>
 
206
This routine can be used by bindings (such as gtk--) to help construct
 
207
a GladeXML object, if it is needed.</para>
 
208
<para>
 
209
 
 
210
</para><variablelist role="params">
 
211
<varlistentry><term><parameter>self</parameter>&nbsp;:</term>
 
212
<listitem><simpara> the GladeXML object
 
213
</simpara></listitem></varlistentry>
 
214
<varlistentry><term><parameter>fname</parameter>&nbsp;:</term>
 
215
<listitem><simpara> the XML filename
 
216
</simpara></listitem></varlistentry>
 
217
<varlistentry><term><parameter>root</parameter>&nbsp;:</term>
 
218
<listitem><simpara> the root widget node (or <literal>NULL</literal> for none)
 
219
</simpara></listitem></varlistentry>
 
220
<varlistentry><term><parameter>domain</parameter>&nbsp;:</term>
 
221
<listitem><simpara> the translation domain (or <literal>NULL</literal> for the default)
 
222
</simpara></listitem></varlistentry>
 
223
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE if the construction succeeded.
 
224
</simpara></listitem></varlistentry>
 
225
</variablelist></refsect2>
 
226
<refsect2>
 
227
<title><anchor id="glade-xml-signal-connect"/>glade_xml_signal_connect ()</title>
 
228
<indexterm><primary>glade_xml_signal_connect</primary></indexterm><programlisting><link linkend="void">void</link>        glade_xml_signal_connect        (<link linkend="GladeXML">GladeXML</link> *self,
 
229
                                             const <link linkend="char">char</link> *handlername,
 
230
                                             <link linkend="GCallback">GCallback</link> func);</programlisting>
 
231
<para>
 
232
In the glade interface descriptions, signal handlers are specified for
 
233
widgets by name.  This function allows you to connect a C function to
 
234
all signals in the GladeXML file with the given signal handler name.</para>
 
235
<para>
 
236
 
 
237
</para><variablelist role="params">
 
238
<varlistentry><term><parameter>self</parameter>&nbsp;:</term>
 
239
<listitem><simpara> the GladeXML object
 
240
</simpara></listitem></varlistentry>
 
241
<varlistentry><term><parameter>handlername</parameter>&nbsp;:</term>
 
242
<listitem><simpara> the signal handler name
 
243
</simpara></listitem></varlistentry>
 
244
<varlistentry><term><parameter>func</parameter>&nbsp;:</term>
 
245
<listitem><simpara> the signal handler function
 
246
</simpara></listitem></varlistentry>
 
247
</variablelist></refsect2>
 
248
<refsect2>
 
249
<title><anchor id="glade-xml-signal-connect-data"/>glade_xml_signal_connect_data ()</title>
 
250
<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,
 
251
                                             const <link linkend="char">char</link> *handlername,
 
252
                                             <link linkend="GCallback">GCallback</link> func,
 
253
                                             <link linkend="gpointer">gpointer</link> user_data);</programlisting>
 
254
<para>
 
255
In the glade interface descriptions, signal handlers are specified for
 
256
widgets by name.  This function allows you to connect a C function to
 
257
all signals in the GladeXML file with the given signal handler name.
 
258
</para>
 
259
<para>
 
260
It differs from glade_xml_signal_connect since it allows you to
 
261
specify the data parameter for the signal handler.  It is also a small
 
262
demonstration of how to use glade_xml_signal_connect_full.</para>
 
263
<para>
 
264
 
 
265
</para><variablelist role="params">
 
266
<varlistentry><term><parameter>self</parameter>&nbsp;:</term>
 
267
<listitem><simpara> the GladeXML object
 
268
</simpara></listitem></varlistentry>
 
269
<varlistentry><term><parameter>handlername</parameter>&nbsp;:</term>
 
270
<listitem><simpara> the signal handler name
 
271
</simpara></listitem></varlistentry>
 
272
<varlistentry><term><parameter>func</parameter>&nbsp;:</term>
 
273
<listitem><simpara> the signal handler function
 
274
</simpara></listitem></varlistentry>
 
275
<varlistentry><term><parameter>user_data</parameter>&nbsp;:</term>
 
276
<listitem><simpara> the signal handler data
 
277
</simpara></listitem></varlistentry>
 
278
</variablelist></refsect2>
 
279
<refsect2>
 
280
<title><anchor id="glade-xml-signal-autoconnect"/>glade_xml_signal_autoconnect ()</title>
 
281
<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>
 
282
<para>
 
283
This function is a variation of glade_xml_signal_connect.  It uses
 
284
gmodule's introspective features (by openning the module <literal>NULL</literal>) to
 
285
look at the application's symbol table.  From here it tries to match
 
286
the signal handler names given in the interface description with
 
287
symbols in the application and connects the signals.
 
288
</para>
 
289
<para>
 
290
Note that this function will not work correctly if gmodule is not
 
291
supported on the platform.</para>
 
292
<para>
 
293
 
 
294
</para><variablelist role="params">
 
295
<varlistentry><term><parameter>self</parameter>&nbsp;:</term>
 
296
<listitem><simpara> the GladeXML object.
 
297
</simpara></listitem></varlistentry>
 
298
</variablelist></refsect2>
 
299
<refsect2>
 
300
<title><anchor id="glade-xml-get-widget"/>glade_xml_get_widget ()</title>
 
301
<indexterm><primary>glade_xml_get_widget</primary></indexterm><programlisting><link linkend="GtkWidget">GtkWidget</link>*  glade_xml_get_widget            (<link linkend="GladeXML">GladeXML</link> *self,
 
302
                                             const <link linkend="char">char</link> *name);</programlisting>
 
303
<para>
 
304
This function is used to get a pointer to the GtkWidget corresponding to
 
305
<parameter>name</parameter> in the interface description.  You would use this if you have to do
 
306
anything to the widget after loading.</para>
 
307
<para>
 
308
 
 
309
</para><variablelist role="params">
 
310
<varlistentry><term><parameter>self</parameter>&nbsp;:</term>
 
311
<listitem><simpara> the GladeXML object.
 
312
</simpara></listitem></varlistentry>
 
313
<varlistentry><term><parameter>name</parameter>&nbsp;:</term>
 
314
<listitem><simpara> the name of the widget.
 
315
</simpara></listitem></varlistentry>
 
316
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the widget matching <parameter>name</parameter>, or <literal>NULL</literal> if none exists.
 
317
</simpara></listitem></varlistentry>
 
318
</variablelist></refsect2>
 
319
<refsect2>
 
320
<title><anchor id="glade-xml-get-widget-prefix"/>glade_xml_get_widget_prefix ()</title>
 
321
<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,
 
322
                                             const <link linkend="char">char</link> *name);</programlisting>
 
323
<para>
 
324
This function is used to get a list of pointers to the GtkWidget(s)
 
325
with names that start with the string <parameter>name</parameter> in the interface description.
 
326
You would use this if you have to do something  to all of these widgets
 
327
after loading.</para>
 
328
<para>
 
329
 
 
330
</para><variablelist role="params">
 
331
<varlistentry><term><parameter>self</parameter>&nbsp;:</term>
 
332
<listitem><simpara> the GladeXML object.
 
333
</simpara></listitem></varlistentry>
 
334
<varlistentry><term><parameter>name</parameter>&nbsp;:</term>
 
335
<listitem><simpara> the name of the widget.
 
336
</simpara></listitem></varlistentry>
 
337
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> A list of the widget that match <parameter>name</parameter> as the start of their
 
338
name, or <literal>NULL</literal> if none exists.
 
339
</simpara></listitem></varlistentry>
 
340
</variablelist></refsect2>
 
341
<refsect2>
 
342
<title><anchor id="glade-get-widget-name"/>glade_get_widget_name ()</title>
 
343
<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>
 
344
<para>
 
345
Used to get the name of a widget that was generated by a GladeXML object.</para>
 
346
<para>
 
347
 
 
348
</para><variablelist role="params">
 
349
<varlistentry><term><parameter>widget</parameter>&nbsp;:</term>
 
350
<listitem><simpara> the widget
 
351
</simpara></listitem></varlistentry>
 
352
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the name of the widget.
 
353
</simpara></listitem></varlistentry>
 
354
</variablelist></refsect2>
 
355
<refsect2>
 
356
<title><anchor id="glade-get-widget-tree"/>glade_get_widget_tree ()</title>
 
357
<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>
 
358
<para>
 
359
This function is used to get the GladeXML object that built this widget.</para>
 
360
<para>
 
361
 
 
362
</para><variablelist role="params">
 
363
<varlistentry><term><parameter>widget</parameter>&nbsp;:</term>
 
364
<listitem><simpara> the widget
 
365
</simpara></listitem></varlistentry>
 
366
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the GladeXML object that built this widget.
 
367
</simpara></listitem></varlistentry>
 
368
</variablelist></refsect2>
 
369
<refsect2>
 
370
<title><anchor id="GladeXMLConnectFunc"/>GladeXMLConnectFunc ()</title>
 
371
<indexterm><primary>GladeXMLConnectFunc</primary></indexterm><programlisting><link linkend="void">void</link>        (*GladeXMLConnectFunc)          (const <link linkend="gchar">gchar</link> *handler_name,
 
372
                                             <link linkend="GObject">GObject</link> *object,
 
373
                                             const <link linkend="gchar">gchar</link> *signal_name,
 
374
                                             const <link linkend="gchar">gchar</link> *signal_data,
 
375
                                             <link linkend="GObject">GObject</link> *connect_object,
 
376
                                             <link linkend="gboolean">gboolean</link> after,
 
377
                                             <link linkend="gpointer">gpointer</link> user_data);</programlisting>
 
378
<para>
 
379
This is the signature of a function used to connect signals.  It is used
 
380
by the glade_xml_signal_connect_full and glade_xml_signal_autoconnect_full
 
381
functions.  It is mainly intented for interpreted language bindings, but
 
382
could be useful where the programmer wants more control over the signal
 
383
connection process.</para>
 
384
<para>
 
385
 
 
386
</para><variablelist role="params">
 
387
<varlistentry><term><parameter>handler_name</parameter>&nbsp;:</term>
 
388
<listitem><simpara> the name of the handler function to connect.
 
389
</simpara></listitem></varlistentry>
 
390
<varlistentry><term><parameter>object</parameter>&nbsp;:</term>
 
391
<listitem><simpara> the object to connect the signal to.
 
392
</simpara></listitem></varlistentry>
 
393
<varlistentry><term><parameter>signal_name</parameter>&nbsp;:</term>
 
394
<listitem><simpara> the name of the signal.
 
395
</simpara></listitem></varlistentry>
 
396
<varlistentry><term><parameter>signal_data</parameter>&nbsp;:</term>
 
397
<listitem><simpara> the string value of the signal data given in the XML file.
 
398
</simpara></listitem></varlistentry>
 
399
<varlistentry><term><parameter>connect_object</parameter>&nbsp;:</term>
 
400
<listitem><simpara> non NULL if g_signal_connect_object should be used.
 
401
</simpara></listitem></varlistentry>
 
402
<varlistentry><term><parameter>after</parameter>&nbsp;:</term>
 
403
<listitem><simpara> TRUE if the connection should be made with g_signal_connect_after.
 
404
</simpara></listitem></varlistentry>
 
405
<varlistentry><term><parameter>user_data</parameter>&nbsp;:</term>
 
406
<listitem><simpara> the user data argument.
 
407
</simpara></listitem></varlistentry>
 
408
</variablelist></refsect2>
 
409
<refsect2>
 
410
<title><anchor id="glade-xml-signal-connect-full"/>glade_xml_signal_connect_full ()</title>
 
411
<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,
 
412
                                             const <link linkend="gchar">gchar</link> *handler_name,
 
413
                                             <link linkend="GladeXMLConnectFunc">GladeXMLConnectFunc</link> func,
 
414
                                             <link linkend="gpointer">gpointer</link> user_data);</programlisting>
 
415
<para>
 
416
This function is similar to glade_xml_signal_connect, except that it
 
417
allows you to give an arbitrary function that will be used for actually
 
418
connecting the signals.  This is mainly useful for writers of interpreted
 
419
language bindings, or applications where you need more control over the
 
420
signal connection process.</para>
 
421
<para>
 
422
 
 
423
</para><variablelist role="params">
 
424
<varlistentry><term><parameter>self</parameter>&nbsp;:</term>
 
425
<listitem><simpara> the GladeXML object.
 
426
</simpara></listitem></varlistentry>
 
427
<varlistentry><term><parameter>handler_name</parameter>&nbsp;:</term>
 
428
<listitem><simpara> the name of the signal handler that we want to connect.
 
429
</simpara></listitem></varlistentry>
 
430
<varlistentry><term><parameter>func</parameter>&nbsp;:</term>
 
431
<listitem><simpara> the function to use to connect the signals.
 
432
</simpara></listitem></varlistentry>
 
433
<varlistentry><term><parameter>user_data</parameter>&nbsp;:</term>
 
434
<listitem><simpara> arbitrary data to pass to the connect function.
 
435
</simpara></listitem></varlistentry>
 
436
</variablelist></refsect2>
 
437
<refsect2>
 
438
<title><anchor id="glade-xml-signal-autoconnect-full"/>glade_xml_signal_autoconnect_full ()</title>
 
439
<indexterm><primary>glade_xml_signal_autoconnect_full</primary></indexterm><programlisting><link linkend="void">void</link>        glade_xml_signal_autoconnect_full
 
440
                                            (<link linkend="GladeXML">GladeXML</link> *self,
 
441
                                             <link linkend="GladeXMLConnectFunc">GladeXMLConnectFunc</link> func,
 
442
                                             <link linkend="gpointer">gpointer</link> user_data);</programlisting>
 
443
<para>
 
444
This function is similar to glade_xml_signal_connect_full, except that it
 
445
will try to connect all signals in the interface, not just a single
 
446
named handler.  It can be thought of the interpeted language binding
 
447
version of glade_xml_signal_autoconnect, except that it does not
 
448
require gmodule to function correctly.</para>
 
449
<para>
 
450
 
 
451
</para><variablelist role="params">
 
452
<varlistentry><term><parameter>self</parameter>&nbsp;:</term>
 
453
<listitem><simpara> the GladeXML object.
 
454
</simpara></listitem></varlistentry>
 
455
<varlistentry><term><parameter>func</parameter>&nbsp;:</term>
 
456
<listitem><simpara> the function used to connect the signals.
 
457
</simpara></listitem></varlistentry>
 
458
<varlistentry><term><parameter>user_data</parameter>&nbsp;:</term>
 
459
<listitem><simpara> arbitrary data that will be passed to the connection function.
 
460
</simpara></listitem></varlistentry>
 
461
</variablelist></refsect2>
 
462
<refsect2>
 
463
<title><anchor id="GladeXMLCustomWidgetHandler"/>GladeXMLCustomWidgetHandler ()</title>
 
464
<indexterm><primary>GladeXMLCustomWidgetHandler</primary></indexterm><programlisting><link linkend="GtkWidget">GtkWidget</link>*  (*GladeXMLCustomWidgetHandler)  (<link linkend="GladeXML">GladeXML</link> *xml,
 
465
                                             <link linkend="gchar">gchar</link> *func_name,
 
466
                                             <link linkend="gchar">gchar</link> *name,
 
467
                                             <link linkend="gchar">gchar</link> *string1,
 
468
                                             <link linkend="gchar">gchar</link> *string2,
 
469
                                             <link linkend="gint">gint</link> int1,
 
470
                                             <link linkend="gint">gint</link> int2,
 
471
                                             <link linkend="gpointer">gpointer</link> user_data);</programlisting>
 
472
<para>
 
473
This prototype is for a function that creates custom widgets.</para>
 
474
<para>
 
475
 
 
476
</para><variablelist role="params">
 
477
<varlistentry><term><parameter>xml</parameter>&nbsp;:</term>
 
478
<listitem><simpara> the GladeXML object.
 
479
</simpara></listitem></varlistentry>
 
480
<varlistentry><term><parameter>func_name</parameter>&nbsp;:</term>
 
481
<listitem><simpara> the function name.
 
482
</simpara></listitem></varlistentry>
 
483
<varlistentry><term><parameter>name</parameter>&nbsp;:</term>
 
484
<listitem><simpara> the name of the widget to be created.
 
485
</simpara></listitem></varlistentry>
 
486
<varlistentry><term><parameter>string1</parameter>&nbsp;:</term>
 
487
<listitem><simpara> the string1 property.
 
488
</simpara></listitem></varlistentry>
 
489
<varlistentry><term><parameter>string2</parameter>&nbsp;:</term>
 
490
<listitem><simpara> the string2 property.
 
491
</simpara></listitem></varlistentry>
 
492
<varlistentry><term><parameter>int1</parameter>&nbsp;:</term>
 
493
<listitem><simpara> the int1 property.
 
494
</simpara></listitem></varlistentry>
 
495
<varlistentry><term><parameter>int2</parameter>&nbsp;:</term>
 
496
<listitem><simpara> the int2 property.
 
497
</simpara></listitem></varlistentry>
 
498
<varlistentry><term><parameter>user_data</parameter>&nbsp;:</term>
 
499
<listitem><simpara> the data passed to <link linkend="glade-set-custom-handler"><function>glade_set_custom_handler()</function></link>
 
500
</simpara></listitem></varlistentry>
 
501
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the GtkWidget.
 
502
</simpara></listitem></varlistentry>
 
503
</variablelist></refsect2>
 
504
<refsect2>
 
505
<title><anchor id="glade-set-custom-handler"/>glade_set_custom_handler ()</title>
 
506
<indexterm><primary>glade_set_custom_handler</primary></indexterm><programlisting><link linkend="void">void</link>        glade_set_custom_handler        (<link linkend="GladeXMLCustomWidgetHandler">GladeXMLCustomWidgetHandler</link> handler,
 
507
                                             <link linkend="gpointer">gpointer</link> user_data);</programlisting>
 
508
<para>
 
509
Calling this function allows you to override the default behaviour
 
510
when a Custom widget is found in an interface.  This could be used by
 
511
a language binding to call some other function, or to limit what
 
512
functions can be called to create custom widgets.</para>
 
513
<para>
 
514
 
 
515
</para><variablelist role="params">
 
516
<varlistentry><term><parameter>handler</parameter>&nbsp;:</term>
 
517
<listitem><simpara> the custom widget handler
 
518
</simpara></listitem></varlistentry>
 
519
<varlistentry><term><parameter>user_data</parameter>&nbsp;:</term>
 
520
<listitem><simpara> user data passed to the custom handler
 
521
</simpara></listitem></varlistentry>
 
522
</variablelist></refsect2>
 
523
 
 
524
</refsect1>
 
525
 
 
526
 
 
527
 
 
528
 
 
529
</refentry>