James is a long standing member of the GNOME community, contributing great software such as dia, gnorpm and the much-loved GNOME and GTK+ Python bindings. He has also been dispensing sagely advice on #gnome amongst all this hacking.
libglade is already being used in some of GNOME's core applications and major projects such as Evolution and Gnumeric.
Libglade is a library designed to dynamically load a user interface from an XML file on disk. These UI description files can be created using the Glade UI builder. It provides several options for connecting callbacks up to the interface including an `autoconnect' option that scans the program's symbol table for callback functions.
Libglade is quite nonintrusive. Once it has constructed the interface and connected up the callbacks it gets out of the way, so doesn't add any speed overhead. The cost of parsing the UI description file doesn't create any noticable startup delays.
Benefits of using libglade include:
Pretty far. Development tarballs can be found at ftp://ftp.gnome.org/pub/GNOME/earthquake/sources/libglade/
The current release builds and is fairly close to the final C API (I don't expect to break the public API).
Note that it won't load old glade files, as it uses a new (simpler) file format. There is a converter included, but it is unfinished.
There is no support for libgnomeui widgets yet, as that library is still changing.
Most of my work until recently has revolved around GTK+, and making sure it is usable by language bindings. This includes the runtime introspection capabilities of the GObject object system.
Ed: Check out the GObject documentation. You'll also find some of James' unfinished documentation in the language-bindings module in GNOME CVS.
Many of these runtime introspection APIs are used by libglade as well, and have helped reduce the amount of widget specific code in favour of generic code.
As for the gnome 2.0 platform, it is looking quite good, but still have a way to go. When we get closer to release, we could do with a package similar to the gtk-all package that gathers together the gnome libraries so they can be downloaded, built and installed in one step.
GTK+ on its own has become a much better widget library. There are less instances of having a GTK version of a widget and a GNOME version of the widget. This will mean that plain GTK+ applications should fit in better than before.
With the addition of style properties, theme authors will have more control over the look of applications without the need to write a theme engine in C.
The use of Unicode and Pango should make internationalisation easier, which will hopefully make more applications get it right first go.
The richer introspection interfaces have allowed me to reduce the code size of libglade. Less code makes things easier :)
The libglade-convert script still needs some work. It gets the basic structure right, but it still needs some tuning for some widget types.
Glade2 is another project people might want to work on. If you are interested in it, you should join the glade-devel mailing list.
I've had some patches from MCArkan (Xavier Ordoquy) and Michael Meeks, whilst Chema Celorio had some input on the new file format. Thanks!
The new libglade uses a new file format. The new format uses fewer tag types, and even has a DTD.
The new libglade makes heavy use of widget properties, which greatly reduces the amount of code needed to support a new widget (often it will only require two or three extra lines of code).
For widgets that don't implement properties, we can't take advantage of the generic property handling. For people who are porting widget libraries over to the GTK+ 2.0 platform, I strongly recommend that you make sure your widgets implement properties, and containers implement child packing properties. This will ensure that glade/libglade can support your library with the minimum of work.
Support for additional widget libraries can by dynamically loaded, which means that there is no longer different init functions for glade, glade with gnome support, etc. The app is still responsible for initialising gnome if it is used (or whatever other library is loaded).
Ed: The GTK+ 2.0 documentation may help you understand some of these new features.
| Documentation | Included with libglade |
|---|---|
| Tarballs | ftp://ftp.gnome.org/pub/GNOME/earthquake/sources/libglade/ |
| CVS module | libglade, GNOME CVS |
| Gnotices Thread | http://news.gnome.org/998913983/index_html |