Previous: , Up: The Concept of Operations   [Contents][Index]


1.1.3 The GObject Introspection Repository Manager

The GObject Introspection Repository Manager, or GIRepository for short, is the API through which you can query all the available types, methods and functions a library provides.

GTK provides an application program interface in a dynamic library. On Unix-like systems, the dynamic library is a shared object, .so file. On Microsoft Windows, the dynamic library is a Dynamic Link Library, a .dll file. Information on the proper initialization, ownership, and destruction of in-memory objects is not intrinsic to dynamic libraries. Thus, to properly use them, you need metadata.

GTK provides metadata via The GObject Introspection Repository Manager. Under GIRepository, each dynamic library also provides a companion metadata file, a .typelib file. If we can provide Guile with the facility to parse .typelib files, we could safely call the API the dynamic libraries provide.

These typelib files are in a custom binary format. They commonly contain the following information about a dynamic library:

The task set out to Guile-GI is to parse a typelib, dynamically load a shared library, and generate Guile procedures, constants, and GOOPS types and generics that map to the contents of the shared library.

Several other libraries have also adopted GObject Introspection, so if we can make it work for GTK, we get many other libraries for free.