[Kde-bindings] Some Smoke "documentation" (was: ruby bindings)

Richard Dale Richard_Dale at tipitina.demon.co.uk
Wed Jul 2 12:14:30 UTC 2003


On Wednesday 30 April 2003 03:48, Germain Garand wrote:
> Le Mardi 29 Avril 2003 22:51, Richard Dale a écrit :
> > On Tuesday 29 April 2003 7:16 pm, Alexander Kellett wrote:
> >
> > It shouldn't be too difficult to write a Qt smoke adaptor for ruby - that
> > is still the best way forward. Should we try and have a look at seeing
> > what's involved - I think so yes, so lets discuss it on this list..
>
> Alexander and Richard,
>
> I don't know much about Ruby so I hope I'm not wrong, but it looks like the
> "method_missing" functionnality of Ruby  would be perfect for redirecting
> method calls to the generic marshalling function that issue the Smoke
> calls.
>
>
> Alexander : as it's easy to get lost in Smoke, and there doesn't exist,
> sadly enough, any documentation at all whatsoever, I'll try to sum up the
> whole mechanism so you can figure how it can be implemented in Ruby.
>
> Note that a great part of the necessary guts can be adapted fairly easily
> from PerlQt (namely, the Marshall classes, and the associated marshallers,
> as well as helper functions simplifying access to Smoke's structs... more
> on that later)

<snip>

Thanks for all the info - that's really useful! I've printed it out, and am 
using it as a reference while I try and puzzle out how to adapt to smoke code 
for ruby. Sorry I've taken so long to reply, but I've only just got round to 
doing anything.

So far, so good. I read up on the ruby C interface for the stuff in ruby.h, 
and reminded myself how the existing Qt 2 ruby bindings work. The ruby 
interface is much simpler (and prettier?), than the perl .xs one. I think 
getting to grips with Qt.xs is going to take the longest - I feel on top of 
most of the rest now.

I've built the smoke lib from the KDE cvs - I needed to remove qt_x11.h from 
the header list though as it wasn't in my current qt-copy/include directory. 
And I'm using PerlQt-3.006 downloaded from SourceForge with it - I didn't 
realise there wasn't any perlqt in the cvs. I needed to use the KDE cvs 
kalyptus and smoke, otherwise I got an error about QTextItem being missing as 
it's changed to a private class.

-- Richard


More information about the Kde-bindings mailing list