I wouldn't try doing that, and wouldn't expect it to work. Marshall it from the calling thread to the thread running the browser. (That would be your last suggestion.) There's nothing in the code that does this for you. You would either have to do this by creating a queue in gtk/glib or using the thread event queue in Mozilla.
Hello,
I'm trying to make TestGtkEmbed remotely controlled through messages sent from a socket.
TestGtkEmbed has to play the server role: it starts a new thread (before entering gtk_main()), which then listens for messages on a socket.
An example message looks like "open www.example.org".
If the thread then directly calls gtk_moz_embed_load_url() with the correct parameters (after parsing the received message)... it does not work (open_uri_cb, load_started_cb, load_finished_cb are the only callbacks received - the new page is not rendered, and there is no location_changed_cb).
My guess is that there is some synchronization problem which makes not possible to call gtk_moz_embed_load_url() from a different thread.
Is there a way to do this correctly?
Specifically:
- is it ok to use glib threads, or NSPR threads are a must? (both are compiled to use pthreads);
- are there any functions to be called to ensure proper sychronization? (such as gdk_threads_enter())
- is there any proxying mechanism available in gtkmozembed so that the required calls are performed in the original thread?
--Chris
-- ------------ Christopher Blizzard http://www.mozilla.org ------------
_______________________________________________ mozilla-embedding mailing list [EMAIL PROTECTED] http://mail.mozilla.org/listinfo/mozilla-embedding
