On 01/29/12 17:27, Artur Skawina wrote: > On 01/28/12 17:08, Artur Skawina wrote: >> On 01/28/12 03:02, Sparse Push wrote: >>> What is the best way to generate GObject bindings? >>> I ask this because I would like to use Clutter >>> (http://www.clutter-project.org/) in my D program and I don't think it has D >>> bindings already. >> >> >From the website, http://www.clutter-project.org/about : >> >>> [...] >>> Developed in C, with language bindings for Perl, Python, C#, C++, Vala and >>> Ruby. Clutter also generates introspection data during build, for dynamic >>> language binding using the GObject introspection API. Learn more about >>> GObject introspection... >> >> so, in theory, it should be possible to use girtod to create the bindings. >> >> http://repo.or.cz/w/girtod.git/shortlog/refs/heads/master >> >> >> In practice, it will likely require tweaks for some data types and errors >> in the introspection files (for GTK, this took me way more time than writing >> the xml parser and code generator; maybe much of the work is already done so >> this will be less painful). Also, right now, girtod does not handle certain >> things (eg gobject interfaces). so if clutter is using them, support will >> have >> to be added (it wasn't immediately obvious to me how to expose the parts >> of the API that i haven't used myself; once i figure that out, adding the >> support will be easy, as most of the work is already done). > > Started to look at this myself, but had to handle all the deps first, that > took > some time. As a side effect the gtk bindings improved. > > girtod can now generate bindings for Cogl. Not even compile tested yet, but > should already give an idea how the thing will look like. If somebody familiar > with Cogl would check it out and see if exposing the API this way makes sense, > that would be great. > > http://repo.or.cz/w/girtod.git/blob/refs/heads/gtk2:/gtk2/cogl.d > > > I'll try to get clutter done first, and will fill in the missing cogl/gl > pieces > then.
Done. Does the resulting clutter API look usable? http://repo.or.cz/w/girtod.git/blob/refs/heads/gtk2:/gtk2/clutter.d None of the new modules were tested - i still need code samples to port and time to fix any bugs. artur