Bug 149340

Summary: [Qyoto]Remove WId in kalyptus ctypemap cause QX11EmbedContainer broken
Product: [Developer tools] bindings Reporter: cjacker <jzhuang>
Component: generalAssignee: kde-bindings
Status: RESOLVED INTENTIONAL    
Severity: normal CC: Ch.Ehrlicher
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:

Description cjacker 2007-08-29 17:21:10 UTC
Version:           svn (using KDE Devel)
Installed from:    Compiled sources
Compiler:          gcc-4.2.1 
OS:                Linux

Remove WId in kalyptus ctypemap cause QX11EmbedContainer broken.
I found it had been removed for a long time.
http://websvn.kde.org/?view=rev&revision=531810

But, It is very useful(the only way) to embed standalong Window or Widget in another window.

for example: 
embed mplayer window in Qyoto Application.

since Qt4 support glib/gtk event loop, we can use QX11EmbedContainer and Gtk.Plug to embed a gtk widget in qt4 application.(I use it to embed gtkmozembed widget in a Qyoto MainApplication).

here is a example:

using System;
using Qyoto;

public class Test
{
    public static int Main(String[] args) {
        QApplication app = new QApplication(args);
        QX11EmbedContainer container =new QX11EmbedContainer();
        container.Show();
        container.EmbedClient(0x340000b);
        return QApplication.Exec();
    }
}

It can embed any standalone window into it(should modify the Window ID in EmbedClient function).

after compile and run it, we got:

"Cannot handle 'WId' as argument to QX11EmbedContainer::embedClient"

if we reverse the changes in http://websvn.kde.org/?view=rev&revision=531810.

it works very well.

also, I can embed vte-sharp/gecko-sharp or any Gtk-sharp widget in Qyoto Application.
Comment 1 Christian Ehrlicher 2010-02-01 20:34:00 UTC
Sorry, but WId is the correct type. If you want to pass an integer you have to cast it to a WId ...