You can queue jobs that are to be done by the main loop when the current event is dealt with. More...
Typedefs | |
typedef Eo | Ecore_Job |
A job handle. More... | |
Functions | |
static void | _job_constructor (Eo *obj, void *_pd, va_list *list) |
static void | _constructor (Eo *obj, void *_pd, va_list *list) |
EAPI void * | ecore_job_del (Ecore_Job *obj) |
Delete a queued job that has not yet been executed. More... | |
static void | _destructor (Eo *obj, void *_pd, va_list *list) |
const Eo_Class * | ecore_job_class_get (void) |
#define | ECORE_JOB_CLASS ecore_job_class_get() |
#define | ECORE_JOB_ID(sub_id) (ECORE_JOB_BASE_ID + sub_id) |
#define | ecore_job_constructor(func, data) ECORE_JOB_ID(ECORE_JOB_SUB_ID_CONSTRUCTOR), EO_TYPECHECK(Ecore_Cb, func), EO_TYPECHECK(const void *, data) |
enum | { ECORE_JOB_SUB_ID_CONSTRUCTOR, ECORE_JOB_SUB_ID_LAST } |
Eo_Op | ECORE_JOB_BASE_ID |
EAPI Ecore_Job * | ecore_job_add (Ecore_Cb func, const void *data) |
Add a job to the event queue. More... | |
You can queue jobs that are to be done by the main loop when the current event is dealt with.
Jobs are processed by the main loop similarly to events. They also will be executed in the order in which they were added.
A good use for them is when you don't want to execute an action immediately, but want to give the control back to the main loop so that it will call your job callback when jobs start being processed (and if there are other jobs added before yours, they will be processed first). This also gives the chance to other actions in your program to cancel the job before it is started.
Examples of using Ecore_Job :
#define ecore_job_constructor | ( | func, | |
data | |||
) | ECORE_JOB_ID(ECORE_JOB_SUB_ID_CONSTRUCTOR), EO_TYPECHECK(Ecore_Cb, func), EO_TYPECHECK(const void *, data) |
Add a job to the event queue.
func | The function to call when the job gets handled. |
data | Data pointer to be passed to the job function when the job is handled. |
NULL
is returned if the job could not be added to the queue. References EAPI, ecore_event_add(), ecore_job_constructor, EINA_MAIN_LOOP_CHECK_RETURN, eina_main_loop_is(), EINA_TRUE, EINA_UNLIKELY, and EINA_UNUSED.
Referenced by edje_message_signal_process(), efreet_icon_extra_list_get(), and emotion_object_position_set().
Delete a queued job that has not yet been executed.
obj | Handle of the job to delete. |
References ECORE_CALLBACK_DONE, ecore_event_del(), EINA_FALSE, EINA_MAIN_LOOP_CHECK_RETURN_VAL, and EINA_UNUSED.
Referenced by edje_message_signal_process(), emotion_object_position_set(), and emotion_object_suspend_get().