Re: using gtk in non-gtk apps



On Wed, 2006-09-20 at 11:46 -0400, T wrote:
I haven't seen any documentation or discussion in whether gtk can work
with non-gtk widgets/windows in same application.  Is this possible?

You need to combine the event loops. Gtk+ uses the GLib event loop,
while Motif uses the Xt event loop.

The way I would go about this would be to use g_source_new to create a
GSource for the Xt mainloop (XtAppPeekEvent, XtAppDispatchEvent etc.),
then bind it into the GLib mainloop with g_source_attach. You would then
use g_main_loop_run() instead of XtAppMainLoop().

Ed




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