Bjorn Reese wrote:

> Christopher Blizzard wrote:
> 
>> ASKA S.H. Zhong wrote:
> 
> 
>>> Or using gtk or gnome is my only two choices? :(s
>> 
> 
>> Unless you're willing to do a lot of hacking, yes.
> 
> 
> Although I have spent 3 weeks unsuccessfully trying to create 
> an Xt based widget for embedding GTK widgets, which resulted
> in the cancellation of our plans to embed Mozilla, I am still
> convinced that it can be done somehow. After all, Qt is not
> based on Xt either, and with the qxt widget it is possible
> to integrate Qt and Xt widgets.
> 
> Unfortunately, my knowledge of GTK is insufficient to do this
> myself. My major problem was getting GTK to accept another
> widget/window as its root window.
> 
> This ought to be a task for a GTK hacker, who wants GTK to be
> used more widely. If somebody is willing, then I will be glad
> to help out on the Xt side.

You should look at the gtk_mozbox widget that we use.  It's an excellent 
place to start.  Also, have a look at the GtkPlug source code.  The 
GtkPlug is designed to be plugged into foreign toolkits.

What you have to do to get it working is:

Create a new gtk mainloop instance with gtk_init, etc.
Create a mozbox-like or gtkplug-like widget to plug in as the child of 
your Xt widget
Create mozilla as the child of your gtk-plug-like widget.

It should work.  All you have to worry about is getting focus right. 
You might also want to have a look at this bug for some patches that 
need to be checked in to clean up the mozbox code and other focus code.

http://bugzilla.mozilla.org/show_bug.cgi?id=61782

--Chris

-- 
------------
Christopher Blizzard
http://people.redhat.com/blizzard/
mozilla.org - We're on a mission from God.  Still.
------------


Reply via email to