Next: , Previous: Top, Up: Top


1 Overview

(gnome glade) wraps the libglade interface XML interface definition library for Guile. It is a part of Guile-GNOME.

Glade files are XML descriptions of a GTK+ widget hierarchy. They are usually created with the Glade user interface editor. A simple example might look like this:

 (define xml-buf "<?xml version=\"1.0\" standalone=\"no\"?>
 <!DOCTYPE glade-interface SYSTEM \"http://glade.gnome.org/glade-2.0.dtd\">
 
 <glade-interface>
 
 <widget class=\"GtkWindow\" id=\"window1\">
 <property name=\"title\" translatable=\"yes\">window1</property>
 <child>
 <widget class=\"GtkLabel\" id=\"label1\">
 <property name=\"label\" translatable=\"yes\">Hello world!</property>
 </widget>
 </child>
 </widget>
 
 </glade-interface>")
 
 (define glade-xml (glade-xml-new-from-buffer xml-buf))
 (define main-window (get-widget glade-xml "window1"))
 (show-all main-window)
 (g-main-loop-run (g-main-loop-new))

Of course, in practice you are more likely to load the XML from a file; in that case you would use glade-xml-new.

Also interesting are the signal-connect and signal-autoconnect implementations; read on for more details.

See the documentation for (gnome gobject) for more information on Guile-GNOME.

AltStyle によって変換されたページ (->オリジナル) /