LGI

LGI is gobject-introspection based dynamic Lua binding to GObject based libraries. It allows using GObject-based libraries directly from Lua.

Licensed under MIT-style license, see LICENSE file for full text.

Home of the project is on GitHub.

LGI is tested and compatible with standard Lua 5.1 and Lua 5.2 and recent LuaJIT 2 betas. Compatibility with other Lua implementations is not tested yet.

If you need to support pre-gobject-introspection GTK (ancient GTK+ 2.x releases), use Lua-Gnome.

Installation:

In order to be able to compile native part of lgi, gobject-introspection >= 0.10.8 development package must be installed, although preferred version is >= 1.30. The development package is called libgirepository1.0-dev on debian-based systems (like Ubuntu) and gobject-introspection-devel on RedHat-based systems (like Fedora).

Using LuaRocks:

luarocks install lgi

Alternatively, use make-based installation:

make
[sudo] make install [PREFIX=<prefix>] [DESTDIR=<destdir>]

Please note that on BSD-systems you may need to use 'gmake'.

Usage

See examples in samples/ directory. Documentation is available in doc/ directory in markdown format. Process it with your favorite markdown processor if you want to read it in HTML.

History

0.6.2 (25-Jun-2012)

- Avoid unexpected dependency on cairo-devel, cairo-runtime is now enough - Make setresident() more robust and fix stack leak for lua5.2 case, avoid useless warning when setresident() fails (to accomodate for static linking case). - Fix small memory leak (mutex) which occured once per opened lua_State using lgi.

0.6.1 (19-Jun-2012)

- objects and structs: actually implement 'type' property as documented - tests: Fix regression tests for less common platforms - Pango: Add a few missing overrides - cairo: Fix Context:usertodevice() family of methods. - GStreamer: Add support for transfer!=none for input objects. This is needed to avoid leaks caused by strange usage of transfer annotations of gstreamer-0.10 - GStreamer: Add more missing overrides - GStreamer: Fix and improve samples - Various fixes for usecase when lua context with loaded lgi is closed and opened again - Gtk: Add missing Gtk.Builder:connectsignals() override

0.6 (22-May-2012)

- Add cairo bindings, cairo sample and finish some gtk-demo parts which were requiring cairo

0.5.1 (not officially released)

- Fix a few problems on more exotic architectures (s390x, mips, ia64). - Allow passing byte.buffer when UTF8 string is requested.

0.5 (15-Apr-2012)

0.4 (4-Jan-2012)

0.3 (28-Nov-2011)

0.2 (7-Nov-2011)

First public release