lambda-gtk is a cross-platform Lisp interface to the complete GTK+2 family of shared libraries. Design
Because GTK is so large and complex lambda-gtk generates its Lisp FFI
interfaces from a GTK definition file and an API control file that you
can edit and customize in order to generate more or less inclusive
interfaces to GTK. With the exception of callbacks (which are
required by GTK itself) lambda-gtk uses only a modest set of features
from its host environment and is readily portable to other Lisps,
including reasonably featured Schemes.
lambda-gtk provides Lisp programmers with the following set of
o Portable GUI programming across the supported Lisp environments. o
Automatic conversion between Lisp data (booleans, numbers, strings)
and their equivalent GTK types. Function arguments that involve C
pointers to ints, floats and doubles are also handled automatically:
foreign values are allocated and initialized by the wrappers, the
pointers are passed to GTK and then dereferenced and returned to the
Lisp caller as multiple values.
o Lisp names for GTK\'s enums, structs and functions. Lisp names are
formed by substituting \"-\" for \"_\" and (possibly) converting C
library prefixes into exported Lisp package prefixes.
o Lisp accessor functions to read/write slot values in GTK structs.
Accessors are named struct.slot but may include more than one slot
name, e.g. gtk:Widget.allocation.width o Lisp symbol package(s) that
export the GTK API and a read time conditional #+:gtk in *features*.
o A small set of utilities for working with GTK pointers, callbacks
and foreign storage in a portable way