glib - main event loop
- From: Krzysztof <kj limes com pl>
- To: gtk-list gnome org
- Subject: glib - main event loop
- Date: Tue, 15 Mar 2016 00:00:37 +0100
How to get idle event source called in main event loop? I do the
following:
my idle function is:
static gboolean
idle ( gpointer data )
{
g_print ( "Idle called\n" );
if ( counter1 == 0 && counter2 == 0 )
{
g_main_loop_quit ( ( GMainLoop * ) data );
return FALSE;
}
else
return TRUE;
}
The variables counter1 and counter2 reach 0 after some time of execution.
I add this source this way:
g_idle_add ( idle, mlp );
where
GMainLoop *mlp;
is loop which is run.
Even if all sources end with G_SOURCE_REMOVE the idle source is never
called.
--
Regards
Krzysztof J.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]