Re: Embedding GTK in Xt?



Bjorn Reese <breese mail1 stofanet dk> writes: 
Is my understanding correct that the widgets contained in GtkPlug are
displayed in GtkSocket, and that GtkPlug and GtkSocket communicates
with each other via X events?

Yes, that's right.

If so, could GtkPlug work with a normal X window in the same process
provided it receives its X / GTK events? It is important to me that
the GTK widget (Mozilla) is running in the same process, as I need
access to several of its interfaces (mainly the DOM events).

It could perhaps be made to work. I don't know enough about Motif or
plug/socket to tell you for sure, or how. ;-)

Finally, will GTK enable me to merge its main loop into my Xt main
loop? That is, to let Xt be in charge.

This is unlikely. The GTK (or rather GLib) main loop is a superset of
the Xt loop, and the Xt loop is most likely just not powerful enough
for GTK to use.

The reason for these questions is that I have a prototype where my
Xt based application is feeding the GTK main loop / event system.
The event system appears to be working, i.e. if I add signals with
gtk_signal_connect() they are called. However, no GTK widgets (I am
testing with a simple button widget) are displayed.

One possible explanation, if you're using the Xt main loop, is that
none of the idle functions for GTK get called. But there are any
number of possible problems here, it's not a simple problem to solve.

Havoc




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