Troubles with reflection in GObject

GObject does not contain a way to find out which methods the object or class has. Even for the interfaces, it's not possible to find out which methods they have and where in the interface's vtable are they located. This information is only available for object properties and constructors. That's why it's pretty easy to generate wrappers for all classes and types from libraries based on GObject. Since methods are not discoverable in such a way, another approach is needed.

PyGTK and Gtk# employ header file parsing with manual post-processing for this purpose. There is also a GObject-Introspection project. This is the most interesting one. It has a repository with the information about APIs of various libraries and is amenable to automatic code generation. But I haven't figured out how to use it.