Brad Burleson wrote:
> My only problem is that gtk_main() transfers control away from my daemon.
> Is it possible to attach to the GLib main loop and return back to my own
> code from time to time (the project I'm working on has it's own internal
> scheduler and I'm not up for a big rewrite now)?

You can do:
g_timeout_add(<milliseconds>, function, user_data);
or
g_idle_add(function, user_data);
to get regularily back to your code. Note that function should return
TRUE to get called again (and again).

But neither of these is really a good solution. When working with glib,
you should use it's scheduler for things to go smooth.

-- 
Santtu Lakkala

_______________________________________________
maemo-developers mailing list
maemo-developers@maemo.org
https://maemo.org/mailman/listinfo/maemo-developers

Reply via email to