Overview

Lua bindings to GObject-based libraries like GTK+, WebKitGtk, and GStreamer (and others like Cairo).
lgob is portable, have a small overhead, works with different versions of libraries and features a code generator that can be used in other projects / bindings.

Screen Shots

The following images are screen shots of sample applications included in the lgob distribution. Click to view the larger images and corresponding Lua code…

Installation

License

This software is licensed under the GNU Lesser General Public License.

Dependencies

Lua 5.1, plus the libraries needed by the wanted modules.

Download

Sources. There's an Arch Linux package in the AUR and some binaries here.

Source repository

http://gitorious.org/lgob

git clone git://gitorious.org/lgob/mainline.git

Compilation

$ ./build_all.lua [DESTDIR [OPTIONS]]

Example:

$ ./build_all.lua /home/user/out AMD64

Documentation

Most of the functions are similar to the original C API, thus the GNOME API References, like the GTK+ Reference Manual, can be used. Some functions have been changed to better fit with the Lua environment, and hopefully they will be mentioned in the manual.

Work-in-progress manual.

Know bugs / limitations

lgob 11.10 and newer targets GTK+ 3 and friends. The last release that supported GTK+ 2 is lgob 11.04.

Some of the gobject-introspection files used to generate the bindings do not carry version / deprecation information, resulting in code that doesn't work with old library versions. Currently, this is fixed by reading versions from Devhelp documentation files and by using override files.

Related projects

  • GObject Introspection - Project that provides the introspection data that lgob uses to generate the bindings;
  • Glade4Lua - Lua script which reads a Glade GUI design (XML file), and generates a Lua function than constructs the whole widget tree (useful for old versions of GTK+);
  • LuaGnome - Provides a fairly complete Lua bindings to GNOME Libraries;
  • LGI - Employs GObject Instrospection at runtime;