Re: Removing global variables



hi;

On 26 November 2014 at 13:52, Paul Davis <paul linuxaudiosystems com> wrote:

You can run any number of event loops in a process. You can only run 1
GTK main loop.

So can I run one event loop in a thread, do my UI without having a
gtk_main_loop?


first of all, if the host is written with GTK then it runs THE GTK main loop
anyway, you shouldn't be attempting to create a new one (which would also be
true in a "normal" process - you don't create more than 1 GTK main loop.

event loops are a glib level abstraction/object. The GTK main loop is just a
particular, special instance of a glib event loop inside a GTK application.

it's not even special: GTK+ will happily work if you just iterate the
GMainContext that is currently set as default.

ciao,
 Emmanuele.

-- 
http://www.bassi.io
[ ] ebassi [ gmail com]


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