Re: How do I get the Glib::MainLoop my code is running?



On Sat, 19 Jun 2010 15:55:18 +0300
sledge hammer <sledgehammer_999 hotmail com> wrote:
> How do I get the Glib::MainLoop my current code is running from? I
> want to get the MainContext through Glib::MainLoop::get_context() and
> connect some idle signals. I can't seem to find a function that
> returns the 'current' mainloop. Please help me.

You do not need to get the default main context in order to connect
to an idle signal.  Glib::signal_idle() will do it for you.

Where you do want the default main context, then you can
call Glib::::MainContext::get_default() to get it.

Be aware that glibmm idle signals are not thread safe.  (glib idle
events are.)

Chris




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