Mauro Borghi <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>... > 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?
gtk_moz_embed_load_url seems to only works inside the gtk-event loop. Look for gtk_idle_add to call a function inside gtk event loop. > > 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? > > > Any help is very welcome :-) > > Mauro. Best regards Reinhard _______________________________________________ mozilla-embedding mailing list [EMAIL PROTECTED] http://mail.mozilla.org/listinfo/mozilla-embedding
