aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/ecore/ecore_idle_exiter.c
blob: 9eb0523857f03609f47472ca037746ba76062f3d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif

#include <stdlib.h>

#include <Eo.h>

#include "Ecore.h"
#include "ecore_private.h"

EFL_CALLBACKS_ARRAY_DEFINE(ecore_idle_exiter_callbacks,
                          { EFL_LOOP_EVENT_IDLE_EXIT, _ecore_factorized_idle_process },
                          { EFL_EVENT_DEL, _ecore_factorized_idle_event_del });

EAPI Ecore_Idle_Exiter *
ecore_idle_exiter_add(Ecore_Task_Cb func,
                      const void   *data)
{
   return  _ecore_factorized_idle_add(ecore_idle_exiter_callbacks(), func, data);
}

EAPI void *
ecore_idle_exiter_del(Ecore_Idle_Exiter *idle_exiter)
{
   return _ecore_factorized_idle_del(idle_exiter);
}

void
_ecore_idle_exiter_call(Eo *loop)
{
   efl_event_callback_legacy_call(loop, EFL_LOOP_EVENT_IDLE_EXIT, NULL);
}