GObject Introspection

Introduction

The GObject Introspection project is a bit abstract and deserves a better explanation. The goal of the project is to describe the APIs we have in our stack and collect them in a uniform, machine readable format.

Use cases

There are many different uses of this, but to mention a few:

Improve the process of writing language bindings

The situation today in all of our language bindings is that each project has their own way of extracting APIs. There's plenty of details missing in all the different approaches which forces each project to duplicate the additional information.

Public API verification

Sometimes the API of a library in our stack changes by accident. Usually by a less experienced developer making a change without realizing it will break applications. Introspecting the available API in each release of the library and comparing it to the last one makes it easy to see what changed

Documentation tools

The tools written inside of the GObjectIntrospection can easily be reused to improve that problem. Essentially; replacing gtk-doc. We want to document what we export so it makes sense to glue this together with API verification mentioned above (see BindingsDocumentation)

Component System

Knowing the exact API for a certain module allows us to write the glue which makes it possible to call from one module to another. The forms the basis for a component system.

Other uses cases

See also http://www.flickr.com/photos/vlatheimpaler/2332945173/sizes/l/in/set-72157604115673476/

Contents of the package

It provides:

Getting the code

The latest stable release is available from download.gnome.org

SVN can be fetched from:

svn co http://svn.gnome.org/svn/gobject-introspection/trunk gobject-introspection

ViewVC link: http://svn.gnome.org/viewcvs/gobject-introspection/trunk

There's also a separate repository of .gir files, available in the gir-repository module:

svn co http://svn.gnome.org/svn/gir-repository/trunk gir-repository

ViewVC link: http://svn.gnome.org/viewcvs/gir-repository/trunk/gir/

Projects using GObject-Introspection

Projects that could use GObject-Introspection

Tasklist

Task

Owner

Status

GIR XML

Define the new Metadata format

JohanDahlin

Mostly done

Document the GIR format

-

-

XML validation tests

-

-

Typelib format

Add attributes to connect signals to their default handlers and wrappers to their vfuncs

-

-

Add binary hash to lookup directory entries

-

-

Add a way to specify default values

-

-

Add a way to mark init functions like gtk_init

-

-

API

Add thorough error checking to GIRepository API

-

-

More complete invocation tests

-

-

Fix extra indirection for out parameters in invoke

-

-

Scanner

Virtual-methods and callbacks are wrong

-

-

GIR-Repository

Annotate element type of lists

-

-

Mark symbols as deprecated

-

-

Things to think about

Annotations

see GObjectIntrospection/Annotations

Contact

GObjectIntrospection (last edited 2008-10-11 03:02:46 by JohanDahlin)