GObject Introspection

The introspection project has two major goals, and a variety of more minor ones.

Two level applications - C and <your favorite runtime>

It makes sense to build many kinds of applications using (at least) two different levels and languages. Those being C+GObject, and a managed (GC'd) runtime. C is good for graphics, multimedia, and lower level systems work. However, writing complex software is difficult and error-prone without garbage collection. A managed runtime such as JavaScript, Python, Java, Lua, .NET, Scheme etc. makes a lot of sense for non-fast-path application logic such as configuration, layout, dialogs, etc.

Thus, one of the major goals of the GObject introspection project is to be a convenient bridge between these two worlds, and allow you to choose the right tool for the job, rather than being limited inside one or the other. With the introspection project, you can write for example a ClutterActor or GtkWidget subclass in C, and then without any additional work use that class inside JavaScript.

Sharing binding infrastructure work, and making the platform even more binding friendly

Historically in GNOME, the core platform has been relatively binding friendly, but there are several details not captured in the C+GObject layer that bindings have needed. For example, reference counting semantics and the item type inside GLists. Up until now various language bindings such as Python, Mono, java-gnome etc. had duplicated copies of hand-maintained metadata, and this led to a situation where bindings tended to lag behind until these manual fixups were done, or were simply wrong, and your application would crash when calling a more obscure function.

The introspection project solves this by putting all of the metadata inside the GObject library itself, using annotations in the comments. This will lead to less duplicate work from binding authors, and a more reliable experience for binding consumers.

Additionally, because the introspection build process will occur inside the GObject libraries themselves, a goal is to encourage GObject authors to consider shaping their APIs to be more binding friendly from the start, rather than as an afterthought.

Additional goals and uses

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

GObject Introspection is now stored in git and can be fetched:

git clone git://git.gnome.org/gobject-introspection

CGit link: http://git.gnome.org/cgit/gobject-introspection/tree/

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

git clone git://git.gnome.org/gir-repository

CGit link: http://git.gnome.org/cgit/gir-repository/tree/

Tutorial for application embedding

GObjectIntrospection/FromHereToThere is a tutorial on how to use the introspection system to create multilevel (polyglot) applications.

Runtime bindings based on GObject-Introspection

Projects using GObject Introspection

Libraries with GObject Introspection support

Projects that could use GObject-Introspection

Tasklist

Check bugzilla, glib product, introspection component.

Also see GObjectIntrospection/OldTasklist

Things to think about

Annotations

see GObjectIntrospection/Annotations

Contact

GObjectIntrospection (last edited 2009-04-24 00:20:52 by JohanDahlin)