On Wed, 2005-02-09 at 23:16, Tom Copeland wrote:
> On Wed, 2005-02-09 at 22:46, Tom Copeland wrote:
> > I've got a small C socket client that's reading data (some URLs and
> > whatnot) from a GIOChannel  and opening new GtkWindows, each containing
> > a GtkMozEmbed object. 
> 
> It looks like both Reinhard and Christopher are suggesting using
> gtk_idle_add() to communicate with the main GTK event loop rather than
> munging around with the thread locking calls.  I'll try gtk_idle_add()
> unless someone else has other suggestions...

This seems to do the trick:

Open a client socket 
Create a GAsyncQueue as an event pipeline 
Create a GIOChannel that listens for G_IO_IN on the socket.  Its
callback function should read in the data, creates events, and drops
them into the queue
Create a GSource that reads events from the queue and dispatches them

This is a variation of the technique detailed in a _very_ helpful post
on the gtk-app-devel list here:

http://mail.gnome.org/archives/gtk-app-devel-list/2004-July/msg00181.html

Yours,

tom


_______________________________________________
mozilla-embedding mailing list
[email protected]
http://mail.mozilla.org/listinfo/mozilla-embedding

Reply via email to