Currently, we use regular expressions to parse the C header files of the libraries (see cfwrapper.py and extract_events.pl). GIR files could be an alternative. This is opened to discussion.
I have begun playing with the ElementTree module in python to parse the GIR files that can be found in /usr/share/gir-1.0/ :
Atk-1.0.gir GdkPixbuf-2.0.gir Gtk-3.0.gir PangoXft-1.0.gir
Epiphany-2.29.gir GdkX11-2.0.gir Pango-1.0.gir Unity-3.0.gir
Gdk-2.0.gir GdkX11-3.0.gir PangoCairo-1.0.gir
Gdk-3.0.gir Gtk-2.0.gir PangoFT2-1.0.gir
These GIR files are XML files that describe the functions, structures, constants, etc. that are in these libraries (see http://live.gnome.org/GObjectIntrospection).
For other libraries like GLib, you may generate the GIR file using the .typelib file in /usr/gir/girepository-1.0 (you need the gobject-introspection package):
g-ir-generate /usr/lib/girepository-1.0/GLib-2.0.typelib > glib.xml
But in that case, there is no "c:identifier" attribute in the tag (how to identify a pointer ?)
The question is: is it worth while ? Or would it be more adequate to improve cfwrapper.py ?
See also http://mkestner.blogspot.com/2011/02/signs-of-life.html on the gtk-sharp binding. After installing the gobject-introspection package under Ubuntu, we have the python file /usr/lib/gobject-introspection/giscanner/girparser.py which we could perhaps use to parse the gir files.