[Kde-bindings] Qyoto + ARGB... is becoming painful for me.

William Lahti xfurious at gmail.com
Fri Feb 22 17:26:11 UTC 2008


On Fri, Feb 22, 2008 at 9:11 AM, Arno Rehn <arno at arnorehn.de> wrote:
> Am Freitag 22 Februar 2008 14:41:08 schrieb Richard Dale:
> > Hi William
>  > Pleased to hear you're using the Qyoto bindings and they work ok. But is
>  > using X11 specifics calls is tricky. We really don't want to have platform
>  > specific things in the Qt dll. Or the various dlls that will map onto the
>  > Qt libs (QtCore, QtGui etc) in the next release of Qyoto when we split the
>  > Smoke lib and corresponding ddls up a bit.
>  >
>  > On the other hand, QApplication is a partial class and it might be possible
>  > to add the X11 specific stuff in an extra source that wouldn't be included
>  > in the standard dll. The symbols in the Smoke library aren't exported, and
>  > so I don't think you can easily create an instance of 'x_QApplication' in
>  > your own code, or add extra constructors.

You already provide QX11Embed in the Qyoto library. I personally think
it would do no harm to provide the platform specific constructors,
perhaps using a static method in QApplication like
QApplication.ConstructX11 or so. But even if you don't, I still don't
see why the next version of Smoke couldn't just export that
constructor so that people like me who want to get a little dirty can
make a custom constructor for QApplication and use interceptor.Invoke
directly.

>  >
>  > But instead you should be able to create an ordinary QApplication with an
>  > X11 specific constructor and use that. It will mean that you won't be able
>  > to override QApplication virtual methods in your C# code, but maybe you
>  > don't need to do that anyway.

I just tried that out (starting my C# app, calling my C++ function to
create a QApplication and return it's pointer, then constructing all
my stuff and finally calling another C++ method with the pointer that
calls exec()) but it segfaulted. Doing this kind of thing is
*extremely* awkward for a C# developer and the only reason I'm doing
it is because it's almost a requirement to build this app in Qt in one
form or another. (if only because im rewriting the original which was
heavy KDE/Qt).

>  > Someone recently wanted to do things with event filters and XEvents from
>  > QtRuby and use QApplication::x11EventFilter(), but that is also missing
>  > from the Smoke lib.
>  >
>  > I'll cc this mail to the kde-bindings list in case anyone there can discuss
>  > it.
>  At least there will be more exported C/C++ functions to be used by extensions
>  or new modules. So it will be really easy to implement what Richard
>  suggested, e.g. a C function that creates an application with the appropiate
>  constructor, wraps it in a C# instance and returns a GC handle to it.

^ that would work just fine but I have no clue how the code would
look. Is this possible with the current release of Smoke?

>
>
>  --
>  Arno Rehn
>  arno at arnorehn.de
>



-- 
fury

long name: William Lahti
handle :: fury
freenode :: xfury
blog :: http://xfurious.blogspot.com/



More information about the Kde-bindings mailing list