[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-bindings
Subject:    Re: [Kde-bindings] Trouble instantiating a QPainter with smoke for
From:       Ashley Winters <jahqueel () yahoo ! com>
Date:       2008-09-18 6:21:34
Message-ID: 880074.32050.qm () web50801 ! mail ! re2 ! yahoo ! com
[Download RAW message or body]

--- On Mon, 9/15/08, Chris Burel <chrisburel@gmail.com> wrote:
> Yep, that was it.  I guess what this really comes down to
> is me not
> understanding what the difference is between using
> smoke->cast to get
> the ptr to be a qwidget, instead of just doing
> (QWidget*)ptr.
> But since the QPainter method takes a QPaintDevice, but it
> really
> wants a QWidget/QImage/QPixmap etc., how do you get that to
> work
> through the autoload method?

That's a topic for a book chapter... It's all encapsulated in some OO classes which convert the \
argument stack from language format to smoke format.

Checking the qtruby source, it seems they still do it much the same as I did in PerlQt. There's \
a MethodCall class which has a next() method. That method iterates through the expected \
arguments and marshals them into the Smoke stack.

The getMarshallFn() is the gateway between the autoload dispatcher and the marshaling library \
-- for a class pointer, it dispatches to marshall_basetype() { case Smoke::t_class: } which \
performs the actual smoke->cast() for the given language. In qtruby, this is wrapped via a \
specialized template instantiation, but it still calls smoke->cast() in the end.

- Ashley Winters


      
_______________________________________________
Kde-bindings mailing list
Kde-bindings@kde.org
https://mail.kde.org/mailman/listinfo/kde-bindings


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic