Semantic definition of the API
I have written a few lines of XSLT to convert the GIR to a semantic API, which is closer to what I have in mind: types are classes, with encapsulation and methods but no inheritance; the in-place constructors recognized but there are still variants of the functions to allocate memory; all array parameters specify a size somewhere; the fundamental types are typedefs, enumerations and classes.
I intend to use this to generate libffi-like bindings for a higher-level language, in order to have some fun.