Re: vtk and gtk threads...

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

 



>  can I generate an event inside this second thread that would call a
>  callback that would draw to GTK+? would it work?

Well, it isn't that complex, no "events" involved. Just call
g_idle_add() in the other thread, passing it a callback function and a
pointer to input data for that callback function, and the callback
function will be called as soon as possible in the main thread (the
one running the GLib main loop, and by extension, the GTK+ event
processing (window message processing on Windows, X11 event processing
on X11)). Remember to return FALSE from the callback function so that
it won't be called repeatedly.

--tml
_______________________________________________
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