Bug 149340 - [Qyoto]Remove WId in kalyptus ctypemap cause QX11EmbedContainer broken
Summary: [Qyoto]Remove WId in kalyptus ctypemap cause QX11EmbedContainer broken
Status: RESOLVED INTENTIONAL
Alias: None
Product: bindings
Classification: Developer tools
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: kde-bindings
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-08-29 17:21 UTC by cjacker
Modified: 2010-02-01 20:34 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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 ...