Re: Experimenting with no gtk_main()

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

 



On Thu, Apr 19, 2012 at 09:58:37AM -0400, Patrick wrote:
> I am trying to control gtk from a specific thread in another
> language, I don't want a blocking call like gtk_main() because I
> want the thread to interact with other threads periodically.

Blocking gtk_main() and periodic interaction are not in conflict.

If a single iteration of the Gtk+ main loop, i.e. gtk_main_iteration(),
does things that take too long for your requirement of periodicality
then you are in trouble anyway and running gtk_main_iteration()
explicitly buys you nothing.  You will still get too long delays due to
gtk_main_iteration().

If a single interation of the main loop does not take too long then you
can just run gtk_main() and perform the regular inter-thread interaction
in a source registered to the Gtk+ main loop, e.g. using
g_timeout_add().

Yeti

_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list


[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux