> -----Original Message-----
> From: Ari Heitner [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, May 09, 2001 12:37 AM
> 
> On Tue, May 08, 2001 at 03:00:51PM +1000, Bernie Maier wrote:
[...]
> > Does anyone know if it is
> > possible to successfully embed Mozilla once the loop is running?
> > If so, how?  Every time I've tried, it hangs.
> 
> Uh, go back and read your Gtk programming basics.

Fair call - I've only been using a library on top of GTK+ (wxWindows),
so haven't had to learn much raw GTK+.  However...

> You can't (afaik) add widgets after gtk_main() is called. gtk_main never
> returns, and it expects all events to be registered so it can start the
> event loop and correctly notify people about things.
> 
> In general, you better call *any* gtk_whatever_new before gtk_main. Can
you
> give a counterexample that works?

1. Pretty much the entire wxWindows library.  You can construct widgets
dynamically at runtime.  The rest of our application does this, quite
successfully.  I'm certain this boils down to calling gtk_whatever_new
once the event loop has started.  [Just verified by stepping through
with a debugger, running a wxWindows/GTK+ app that in response to
selecting a menu item, creates a button - gtk_button_new is called.]
2. I can't see how an application, like a browser, could ever open an
arbitrary number of windows if it can't create new frame windows.
Maybe there's some "class" registration that needs to be done before
the event loop, though?

> Maybe I'm just totally wrong though. But I've never seen an 
> example that does otherwise.

Cheers,

    Bernie

P.S. Another hint that I'm doing something wrong is probably the fact
that whenever I try and debug the embedding app using gdb, gdb hangs
during the XPCOM startup.

Reply via email to