Embedding GTK in Xt?



I am trying to embed the Mozilla web browser in a Motif application.
As Mozilla is currently based solely on GTK, I must be able to embed
a GTK widget in an Xt widget (and no, porting the Motif application
to GTK is not an option). Qt has a widget (qxt), which enables
embedding Qt widgets in Xt and vice versa, but I have not found
anything similar for GTK.

I know a fair amount about Xt and Motif (I have constructed several
Motif widgets), but I am not too familiar with GTK.

I have been looking at GtkPlug, GtkXtBin, the EventBox container,
and a few other widgets, but none of them allows me to supply my
own X window.

I have built an Xt container that 

 o Calls gtk_init().
 o Translates X events into GTK events and calls gtk_main_do_event()
   (and gtk_main_iteration_do() just to be sure).
 o Calls gtk_main_interation_do() whenever there is data on the
   socket for gdk_display.

This was, by it self, not enough to show any GTK widgets. I believe
that the problem was that the widgets could not recognize the parent
window.

I have tried two different ways of solving this, but neither worked.

 1. I created a GDK window and used gtk_widget_set_parent_window().
 2. I created an EventBox container, added and realized the widget.

Is there any way that I can get GTK to accept an X window which has
not been created by GTK?

Have I made other mistakes?




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]