1
<refentry id="libglade-Libglade-Initialisation">
3
<refentrytitle>Libglade Initialisation</refentrytitle>
4
<manvolnum>3</manvolnum>
5
<refmiscinfo>LIBGLADE Library</refmiscinfo>
9
<refname>Libglade Initialisation</refname><refpurpose>Routines used to initialise libglade.</refpurpose>
12
<refsynopsisdiv><title>Synopsis</title>
15
#include <glade/glade-init.h>
18
void <link linkend="glade-init">glade_init</link> (void);
19
void <link linkend="glade-require">glade_require</link> (const <link linkend="gchar">gchar</link> *library);
20
void <link linkend="glade-provide">glade_provide</link> (const <link linkend="gchar">gchar</link> *library);
30
<title>Description</title>
32
These routines are used to initialise libglade, and to load addon modules
33
that recognise extra widget sets. The <filename>glade_init</filename>
34
routine must be called before any libglade routines are used, and the
35
<filename>glade_load_module</filename> routine would be used to load
41
<title>Details</title>
43
<title><anchor id="glade-init">glade_init ()</title>
44
<programlisting>void glade_init (void);</programlisting>
46
It used to be necessary to call <link linkend="glade-init">glade_init</link>() before creating
47
GladeXML objects. This is now no longer the case, as libglade will
48
be initialised on demand now. Calling <link linkend="glade-init">glade_init</link>() manually will
49
not cause any problems though.</para>
54
<title><anchor id="glade-require">glade_require ()</title>
55
<programlisting>void glade_require (const <link linkend="gchar">gchar</link> *library);</programlisting>
57
Ensure that a required library is available. If it is not already
58
available, libglade will attempt to dynamically load a module that
59
contains the handlers for that library.</para>
62
</para><informaltable pgwide="1" frame="none" role="params">
64
<colspec colwidth="2*">
65
<colspec colwidth="8*">
67
<row><entry align="right"><parameter>library</parameter> :</entry>
68
<entry> the required library
70
</tbody></tgroup></informaltable></refsect2>
72
<title><anchor id="glade-provide">glade_provide ()</title>
73
<programlisting>void glade_provide (const <link linkend="gchar">gchar</link> *library);</programlisting>
75
This function should be called by a module to assert that it
76
provides wrappers for a particular library. This should be called
77
by the <link linkend="register-widgets">register_widgets</link>() function of a libglade module so that it
78
isn't loaded twice, for instance.</para>
81
</para><informaltable pgwide="1" frame="none" role="params">
83
<colspec colwidth="2*">
84
<colspec colwidth="8*">
86
<row><entry align="right"><parameter>library</parameter> :</entry>
87
<entry> the provided library
89
</tbody></tgroup></informaltable></refsect2>