Functions | |
EAPI Ecore_Idle_Enterer * | ecore_idle_enterer_add (int(*func)(void *data), const void *data) |
Add an idle enterer handler. | |
EAPI void * | ecore_idle_enterer_del (Ecore_Idle_Enterer *idle_enterer) |
Delete an idle enterer callback. | |
EAPI Ecore_Idle_Exiter * | ecore_idle_exiter_add (int(*func)(void *data), const void *data) |
Add an idle exiter handler. | |
EAPI void * | ecore_idle_exiter_del (Ecore_Idle_Exiter *idle_exiter) |
Delete an idle exiter handler from the list to be run on exiting idle state. | |
EAPI Ecore_Idler * | ecore_idler_add (int(*func)(void *data), const void *data) |
Add an idler handler. | |
EAPI void * | ecore_idler_del (Ecore_Idler *idler) |
Delete an idler callback from the list to be executed. |
The ecore main loop enters an idle state when it is waiting for timers to time out, data to come in on a file descriptor or any other event to occur. You can set callbacks to be called when the main loop enters an idle state, during an idle state or just after the program wakes up.
Enterer callbacks are good for updating your program's state, if it has a state engine. Once all of the enterer handlers are called, the program will enter a "sleeping" state.
Idler callbacks are called when the main loop has called all enterer handlers. They are useful for interfaces that require polling and timers would be too slow to use.
If no idler callbacks are specified, then the process literally goes to sleep. Otherwise, the idler callbacks are called continuously while the loop is "idle", using as much CPU as is available to the process.
Exiter callbacks are called when the main loop wakes up from an idle state.
EAPI Ecore_Idle_Enterer* ecore_idle_enterer_add | ( | int(*)(void *data) | func, | |
const void * | data | |||
) |
Add an idle enterer handler.
func | The function to call when entering an idle state. | |
data | The data to be passed to the func call |
EAPI void* ecore_idle_enterer_del | ( | Ecore_Idle_Enterer * | idle_enterer | ) |
Delete an idle enterer callback.
idle_enterer | The idle enterer to delete |
EAPI Ecore_Idle_Exiter* ecore_idle_exiter_add | ( | int(*)(void *data) | func, | |
const void * | data | |||
) |
Add an idle exiter handler.
func | The function to call when exiting an idle state. | |
data | The data to be passed to the func call |
EAPI void* ecore_idle_exiter_del | ( | Ecore_Idle_Exiter * | idle_exiter | ) |
Delete an idle exiter handler from the list to be run on exiting idle state.
idle_exiter | The idle exiter to delete |
EAPI Ecore_Idler* ecore_idler_add | ( | int(*)(void *data) | func, | |
const void * | data | |||
) |
Add an idler handler.
func | The function to call when idling. | |
data | The data to be passed to this func call. |
func
will be called repeatedly while no other events are ready to be processed, as long as it returns 1. A return of 0 deletes the idler.Idlers are useful for progressively prossessing data without blocking.
EAPI void* ecore_idler_del | ( | Ecore_Idler * | idler | ) |
Delete an idler callback from the list to be executed.
idler | The handle of the idler callback to delete |