[Kde-bindings] PerlQt bindings ans SWIG ?

Chris Burel chrisburel at gmail.com
Mon Jun 8 16:44:01 UTC 2009


On Mon, Jun 8, 2009 at 2:41 AM, Richard Dale<rdale at foton.es> wrote:
> On Monday 08 June 2009 08:49:01 am Dominique Dumont wrote:
>> Richard Dale <rdale at foton.es> writes:
>> >> How about providing Smoke bindings with SWIG ? (I've looked at smoke.h,
>> >> it should not be a big deal...)
>> >
>> > If you were to use SWIG you would be starting again. It isn't possible
>> > to combine SWIG generated code with Smoke generated code is they are
>> > functionally equivalent, although the way they work is very different.
>>
>> Err, I may have not been clear.
>>
>> I was thinking about generating Perl/Smoke bindings with SWIG. So that
>> the Smoke magic code using Smoke API would be written in Perl instead of
>> C++.
>>
>> This Smoke magic code (in Perl) would generate the bindings for Perl/Qt
>> API.
>>
>> Does that make sense ?
> At the moment the C++ code for the Smoke libraries (smokedata.cpp, x_1.cpp,
> x_2.cpp etc) is generated with a perl script called 'kalyptus'. However, Arno
> Rehn is rewriting the bindings generation compiler for a Google Summer of Code
> project at the moment. If we rewrite it in C++ it means we can use a common
> C++ parser shared by the KDevelop, QtScript bindings and QtJambi bindings
> projects. The perl one works quite well, but it is a bit hackish in places and
> we hope the C++ one will be more 'industrial strength' and allow ordinary KDE
> developers to add bindings to their projects instead of needing language
> bindings experts to do all the work.
>
> The PerlQt runtime itself (Qt.xs and accompanying Perl code) was entirely
> written by humans and couldn't be automated.
And that's the greatest thing about the Smoke API.  Since Smoke
defines a standard interface for calling methods, the bindings can use
Perl's autoload function, such that all qt method calls go through a
single interface.  So the amount of code that has to be written by
hand is minimized.



More information about the Kde-bindings mailing list