wxD bindings

Andrej Mitrovic andrej.mitrovich at gmail.com
Mon May 28 10:55:09 PDT 2012


On 5/21/12, Gour <gour at atmarama.net> wrote:
> just wonder if there are any news in regard to wxD bindings project?

I was busy doing another rewrite of my codebase since it was getting
rather large and too specific for wxwidgets (lots and lots of doxygen
workarounds). Doxygen files for handwritten interfaces are full of
missing information so this wasn't going anywhere (I've made about 65
fixes myself but this was already getting tiring
http://trac.wxwidgets.org/query?reporter=drey&order=priority).

So right now I'm writing a generic C++ wrapper generator, not specific
to wxwidgets. I can still extract type info from doxygen xml (as long
as the xml was generated from actual header files unlike in
wxwidgets), but I've also added support for gccxml (the cvs version is
mostly up-to-date and it actually works for wxWidgets). I should be
able to add support for clang later on, by outputting its typeinfo to
xml.

Right now I'm finishing work on adding support for C++ POD types,
which includes a feature to work around Issue 5570
(http://d.puremagic.com/issues/show_bug.cgi?id=5570) and another
feature that works around field-alignment mismatches between
languages. I've recently implemented a simple virtual-method
cross-language override mechanism that should probably be faster than
what swig provides, but I haven't done any performance testing yet
(there's no runtime checks at class construction, no extra boolean
fields and runtime checks or function pointers involved, which is what
swig uses with its "directors" feature).

Since I've made the codegen generic enough it should be possible to
output swig interface files instead of directly generating code. I'll
experiment with this once I'm done with my own codegen feature.

Anyway I really have no idea whether I'll have wxWidgets bindings any
time soon but I think I'll put the code generator online in a few
weeks. The latest rewrite I did has put my progress back by a long
time but it's better this way since the codebase is much cleaner and
properly documented right now. At least now I have actual test-cases
and I can compile and link generated code and do simple tests to see
if the generated code works properly.

Work is still in progress, need more time!


More information about the Digitalmars-d mailing list