summaryrefslogtreecommitdiff
path: root/src/lib/ecore
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2017-12-21 19:31:24 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2017-12-21 19:45:21 +0900
commit6b70cd5f971579f09a153e513bde7f4b823785d8 (patch)
tree323685cbbf58509b5eca2c620e32c4c8491b8bd1 /src/lib/ecore
parent04a01c13af3b212224b94097ed39f3cc6ad1fd31 (diff)
ecore/efl loop - refactor idle stuff to be less convluted when
less jumping around the codebase and no need for a message exists method on the loop as we can find out internally, so only the process left.
Diffstat (limited to '')
-rw-r--r--src/lib/ecore/ecore_idle_enterer.c6
-rw-r--r--src/lib/ecore/ecore_idle_exiter.c6
-rw-r--r--src/lib/ecore/ecore_idler.c19
-rw-r--r--src/lib/ecore/ecore_main.c92
-rw-r--r--src/lib/ecore/ecore_private.h9
-rw-r--r--src/lib/ecore/efl_loop.c12
6 files changed, 55 insertions, 89 deletions
diff --git a/src/lib/ecore/ecore_idle_enterer.c b/src/lib/ecore/ecore_idle_enterer.c
index 08e7d9d95a..9ce4716c45 100644
--- a/src/lib/ecore/ecore_idle_enterer.c
+++ b/src/lib/ecore/ecore_idle_enterer.c
@@ -41,9 +41,3 @@ ecore_idle_enterer_del(Ecore_Idle_Enterer *idle_enterer)
41{ 41{
42 return _ecore_factorized_idle_del(idle_enterer); 42 return _ecore_factorized_idle_del(idle_enterer);
43} 43}
44
45void
46_ecore_idle_enterer_call(Eo *loop)
47{
48 efl_event_callback_call(loop, EFL_LOOP_EVENT_IDLE_ENTER, NULL);
49}
diff --git a/src/lib/ecore/ecore_idle_exiter.c b/src/lib/ecore/ecore_idle_exiter.c
index 8295af24f8..9ca26c8ee6 100644
--- a/src/lib/ecore/ecore_idle_exiter.c
+++ b/src/lib/ecore/ecore_idle_exiter.c
@@ -25,9 +25,3 @@ ecore_idle_exiter_del(Ecore_Idle_Exiter *idle_exiter)
25{ 25{
26 return _ecore_factorized_idle_del(idle_exiter); 26 return _ecore_factorized_idle_del(idle_exiter);
27} 27}
28
29void
30_ecore_idle_exiter_call(Eo *loop)
31{
32 efl_event_callback_call(loop, EFL_LOOP_EVENT_IDLE_EXIT, NULL);
33}
diff --git a/src/lib/ecore/ecore_idler.c b/src/lib/ecore/ecore_idler.c
index 70795f8003..ffd4579cae 100644
--- a/src/lib/ecore/ecore_idler.c
+++ b/src/lib/ecore/ecore_idler.c
@@ -117,22 +117,3 @@ ecore_idler_del(Ecore_Idler *idler)
117{ 117{
118 return _ecore_factorized_idle_del(idler); 118 return _ecore_factorized_idle_del(idler);
119} 119}
120
121void
122_ecore_idler_all_call(Eo *loop)
123{
124 efl_event_callback_call(loop, EFL_LOOP_EVENT_IDLE, NULL);
125 // just spin in an idler until the free queue is empty freeing 84 items
126 // from the free queue each time.for now this seems like an ok balance
127 // between going in and out of a reduce func with mutexes around it
128 // vs blocking mainloop for too long. this number is up for discussion
129 eina_freeq_reduce(eina_freeq_main_get(), 84);
130}
131
132int
133_ecore_idler_exist(Eo *loop)
134{
135 Efl_Loop_Data *dt = efl_data_scope_get(loop, EFL_LOOP_CLASS);
136
137 return dt->idlers || eina_freeq_ptr_pending(eina_freeq_main_get());
138}
diff --git a/src/lib/ecore/ecore_main.c b/src/lib/ecore/ecore_main.c
index 715a207caf..0084737221 100644
--- a/src/lib/ecore/ecore_main.c
+++ b/src/lib/ecore/ecore_main.c
@@ -331,10 +331,10 @@ _ecore_main_uv_poll_cb(uv_poll_t *handle, int status, int events)
331 331
332 if (_ecore_main_uv_idling) 332 if (_ecore_main_uv_idling)
333 { 333 {
334 DBG("not IDLE anymore"); 334 DBG("not IDLE anymore");
335 _ecore_main_uv_idling = EINA_FALSE; 335 _ecore_main_uv_idling = EINA_FALSE;
336 _ecore_idle_exiter_call(obj); 336 efl_event_callback_call(obj, EFL_LOOP_EVENT_IDLE_EXIT, NULL);
337 _ecore_animator_run_reset(); 337 _ecore_animator_run_reset();
338 } 338 }
339 339
340 if (status) fdh->error_active = EINA_TRUE; 340 if (status) fdh->error_active = EINA_TRUE;
@@ -510,6 +510,23 @@ _ecore_main_fdh_poll_modify(Efl_Loop_Data *pd EINA_UNUSED, Ecore_Fd_Handler *fdh
510 return r; 510 return r;
511} 511}
512 512
513static Eina_Bool
514_ecore_main_idlers_exist(Efl_Loop_Data *pd)
515{
516 return pd->idlers || eina_freeq_ptr_pending(eina_freeq_main_get());
517}
518
519static void
520_ecore_main_idler_all_call(Eo *loop)
521{
522 efl_event_callback_call(loop, EFL_LOOP_EVENT_IDLE, NULL);
523 // just spin in an idler until the free queue is empty freeing 84 items
524 // from the free queue each time.for now this seems like an ok balance
525 // between going in and out of a reduce func with mutexes around it
526 // vs blocking mainloop for too long. this number is up for discussion
527 eina_freeq_reduce(eina_freeq_main_get(), 84);
528}
529
513#ifdef HAVE_EPOLL 530#ifdef HAVE_EPOLL
514static inline int 531static inline int
515_ecore_main_fdh_epoll_mark_active(Eo *obj, Efl_Loop_Data *pd) 532_ecore_main_fdh_epoll_mark_active(Eo *obj, Efl_Loop_Data *pd)
@@ -596,7 +613,7 @@ _ecore_main_gsource_prepare(GSource *source EINA_UNUSED,
596 pd->loop_time = _ecore_time_loop_time = ecore_time_get(); 613 pd->loop_time = _ecore_time_loop_time = ecore_time_get();
597 _efl_loop_timer_expired_timers_call(obj, pd, pd->loop_time); 614 _efl_loop_timer_expired_timers_call(obj, pd, pd->loop_time);
598 615
599 _ecore_idle_enterer_call(obj); 616 efl_event_callback_call(obj, EFL_LOOP_EVENT_IDLE_ENTER, NULL);
600 _ecore_throttle(); 617 _ecore_throttle();
601 _throttle_do(pd); 618 _throttle_do(pd);
602 _ecore_glib_idle_enterer_called = FALSE; 619 _ecore_glib_idle_enterer_called = FALSE;
@@ -611,8 +628,8 @@ _ecore_main_gsource_prepare(GSource *source EINA_UNUSED,
611 if (g_main_loop_is_running(ecore_main_loop)) 628 if (g_main_loop_is_running(ecore_main_loop))
612 { 629 {
613 // only set idling state in dispatch 630 // only set idling state in dispatch
614 if (ecore_idling && (!_ecore_idler_exist(obj)) && 631 if (ecore_idling && (!_ecore_main_idlers_exist(pd)) &&
615 (!efl_loop_message_exists(obj))) 632 (!pd->message_queue))
616 { 633 {
617 if (_efl_loop_timers_exists(obj, pd)) 634 if (_efl_loop_timers_exists(obj, pd))
618 { 635 {
@@ -655,7 +672,7 @@ _ecore_main_gsource_prepare(GSource *source EINA_UNUSED,
655 else 672 else
656 { 673 {
657 *next_time = 0; 674 *next_time = 0;
658 if (efl_loop_message_exists(obj)) ready = TRUE; 675 if (pd->message_queue) ready = TRUE;
659 } 676 }
660 677
661 if (pd->fd_handlers_with_prep) _ecore_main_prepare_handlers(obj, pd); 678 if (pd->fd_handlers_with_prep) _ecore_main_prepare_handlers(obj, pd);
@@ -680,8 +697,8 @@ _ecore_main_gsource_check(GSource *source EINA_UNUSED)
680 in_main_loop++; 697 in_main_loop++;
681 pd->in_loop = in_main_loop; 698 pd->in_loop = in_main_loop;
682 // check if old timers expired 699 // check if old timers expired
683 if (ecore_idling && (!_ecore_idler_exist(obj)) && 700 if (ecore_idling && (!_ecore_main_idlers_exist(pd)) &&
684 (!efl_loop_message_exists(obj))) 701 (!pd->message_queue))
685 { 702 {
686 if (timer_fd >= 0) 703 if (timer_fd >= 0)
687 { 704 {
@@ -736,9 +753,9 @@ _ecore_main_gsource_dispatch(GSource *source EINA_UNUSED,
736 _efl_loop_timer_enable_new(obj, pd); 753 _efl_loop_timer_enable_new(obj, pd);
737 next_time = _efl_loop_timer_next_get(obj, pd); 754 next_time = _efl_loop_timer_next_get(obj, pd);
738 755
739 events_ready = efl_loop_message_exists(obj); 756 events_ready = pd->message_queue ? 1 : 0;
740 timers_ready = _efl_loop_timers_exists(obj, pd) && (0.0 == next_time); 757 timers_ready = _efl_loop_timers_exists(obj, pd) && (0.0 == next_time);
741 idlers_ready = _ecore_idler_exist(obj); 758 idlers_ready = _ecore_main_idlers_exist(pd);
742 759
743 in_main_loop++; 760 in_main_loop++;
744 pd->in_loop = in_main_loop; 761 pd->in_loop = in_main_loop;
@@ -749,21 +766,21 @@ _ecore_main_gsource_dispatch(GSource *source EINA_UNUSED,
749 if (ecore_idling && events_ready) 766 if (ecore_idling && events_ready)
750 { 767 {
751 _ecore_animator_run_reset(); 768 _ecore_animator_run_reset();
752 _ecore_idle_exiter_call(obj); 769 efl_event_callback_call(obj, EFL_LOOP_EVENT_IDLE_EXIT, NULL);
753 ecore_idling = 0; 770 ecore_idling = 0;
754 } 771 }
755 else if (!ecore_idling && !events_ready) ecore_idling = 1; 772 else if (!ecore_idling && !events_ready) ecore_idling = 1;
756 773
757 if (ecore_idling) 774 if (ecore_idling)
758 { 775 {
759 _ecore_idler_all_call(obj); 776 _ecore_main_idler_all_call(obj);
760 777
761 events_ready = efl_loop_message_exists(obj); 778 events_ready = pd->message_queue ? 1 : 0;
762 779
763 if (ecore_fds_ready || events_ready || timers_ready) 780 if (ecore_fds_ready || events_ready || timers_ready)
764 { 781 {
765 _ecore_animator_run_reset(); 782 _ecore_animator_run_reset();
766 _ecore_idle_exiter_call(obj); 783 efl_event_callback_call(obj, EFL_LOOP_EVENT_IDLE_EXIT, NULL);
767 ecore_idling = 0; 784 ecore_idling = 0;
768 } 785 }
769 } 786 }
@@ -780,7 +797,7 @@ _ecore_main_gsource_dispatch(GSource *source EINA_UNUSED,
780 797
781 _efl_loop_timer_expired_timers_call(obj, pd, pd->loop_time); 798 _efl_loop_timer_expired_timers_call(obj, pd, pd->loop_time);
782 799
783 _ecore_idle_enterer_call(obj); 800 efl_event_callback_call(obj, EFL_LOOP_EVENT_IDLE_ENTER, NULL);
784 _ecore_throttle(); 801 _ecore_throttle();
785 _throttle_do(pd); 802 _throttle_do(pd);
786 _ecore_glib_idle_enterer_called = TRUE; 803 _ecore_glib_idle_enterer_called = TRUE;
@@ -822,7 +839,7 @@ _ecore_main_loop_timer_run(uv_timer_t *timer EINA_UNUSED)
822 if (_ecore_main_uv_idling) 839 if (_ecore_main_uv_idling)
823 { 840 {
824 _ecore_main_uv_idling = EINA_FALSE; 841 _ecore_main_uv_idling = EINA_FALSE;
825 _ecore_idle_exiter_call(obj); 842 efl_event_callback_call(obj, EFL_LOOP_EVENT_IDLE_EXIT, NULL);
826 _ecore_animator_run_reset(); 843 _ecore_animator_run_reset();
827 } 844 }
828 pd->loop_time = ecore_time_get(); 845 pd->loop_time = ecore_time_get();
@@ -1096,7 +1113,7 @@ _ecore_main_loop_iterate_may_block(Eo *obj, Efl_Loop_Data *pd, int may_block)
1096 _ecore_main_loop_iterate_internal(obj, pd, !may_block); 1113 _ecore_main_loop_iterate_internal(obj, pd, !may_block);
1097 in_main_loop--; 1114 in_main_loop--;
1098 pd->in_loop = in_main_loop; 1115 pd->in_loop = in_main_loop;
1099 return efl_loop_message_exists(obj); 1116 return pd->message_queue ? 1 : 0;
1100#else 1117#else
1101 return g_main_context_iteration(NULL, may_block); 1118 return g_main_context_iteration(NULL, may_block);
1102#endif 1119#endif
@@ -1113,7 +1130,7 @@ _ecore_main_loop_iterate_may_block(Eo *obj, Efl_Loop_Data *pd, int may_block)
1113 pd->loop_time = ecore_time_get(); 1130 pd->loop_time = ecore_time_get();
1114 _ecore_main_loop_iterate_internal(obj, pd, !may_block); 1131 _ecore_main_loop_iterate_internal(obj, pd, !may_block);
1115 pd->in_loop--; 1132 pd->in_loop--;
1116 return efl_loop_message_exists(obj); 1133 return pd->message_queue ? 1 : 0;
1117 } 1134 }
1118 return 0; 1135 return 0;
1119} 1136}
@@ -2139,16 +2156,16 @@ _ecore_main_loop_uv_prepare(uv_prepare_t *handle EINA_UNUSED)
2139 if (!_ecore_main_uv_idling) 2156 if (!_ecore_main_uv_idling)
2140 { 2157 {
2141 _ecore_main_uv_idling = EINA_TRUE; 2158 _ecore_main_uv_idling = EINA_TRUE;
2142 _ecore_idle_enterer_call(obj); 2159 efl_event_callback_call(obj, EFL_LOOP_EVENT_IDLE_ENTER, NULL);
2143 _ecore_throttle(); 2160 _ecore_throttle();
2144 _throttle_do(pd); 2161 _throttle_do(pd);
2145 } 2162 }
2146 2163
2147 if (_ecore_main_uv_idling) 2164 if (_ecore_main_uv_idling)
2148 { 2165 {
2149 _ecore_idler_all_call(obj); 2166 _ecore_main_idler_all_call(obj);
2150 DBG("called idles"); 2167 DBG("called idles");
2151 if (_ecore_idler_exist(_obj) || efl_loop_message_exists(obj)) t = 0.0; 2168 if (_ecore_main_idlers_exist(pd) || (pd->message_queue)) t = 0.0;
2152 } 2169 }
2153 2170
2154 if (pd->do_quit) 2171 if (pd->do_quit)
@@ -2157,7 +2174,7 @@ _ecore_main_loop_uv_prepare(uv_prepare_t *handle EINA_UNUSED)
2157 2174
2158 if (_ecore_main_uv_idling) 2175 if (_ecore_main_uv_idling)
2159 { 2176 {
2160 _ecore_idle_exiter_call(obj); 2177 efl_event_callback_call(obj, EFL_LOOP_EVENT_IDLE_EXIT, NULL);
2161 _ecore_animator_run_reset(); 2178 _ecore_animator_run_reset();
2162 _ecore_main_uv_idling = EINA_FALSE; 2179 _ecore_main_uv_idling = EINA_FALSE;
2163 } 2180 }
@@ -2209,13 +2226,12 @@ _ecore_main_loop_spin_core(Eo *obj, Efl_Loop_Data *pd)
2209 // as we are spinning we need to update loop time per spin 2226 // as we are spinning we need to update loop time per spin
2210 pd->loop_time = ecore_time_get(); 2227 pd->loop_time = ecore_time_get();
2211 // call all idlers 2228 // call all idlers
2212 _ecore_idler_all_call(obj); 2229 _ecore_main_idler_all_call(obj);
2213 // which returns false if no more idelrs exist 2230 // which returns false if no more idelrs exist
2214 if (!_ecore_idler_exist(obj)) return SPIN_RESTART; 2231 if (!_ecore_main_idlers_exist(pd)) return SPIN_RESTART;
2215 // sneaky - drop through or if checks - the first one to succeed 2232 // sneaky - drop through or if checks - the first one to succeed
2216 // drops through and returns "continue" so further ones dont run 2233 // drops through and returns "continue" so further ones dont run
2217 if ((_ecore_main_select(obj, pd, 0.0) > 0) || 2234 if ((_ecore_main_select(obj, pd, 0.0) > 0) || (pd->message_queue) ||
2218 (efl_loop_message_exists(obj)) ||
2219 (_ecore_signal_count_get(obj, pd) > 0) || (pd->do_quit)) 2235 (_ecore_signal_count_get(obj, pd) > 0) || (pd->do_quit))
2220 return LOOP_CONTINUE; 2236 return LOOP_CONTINUE;
2221 // default - spin more 2237 // default - spin more
@@ -2295,10 +2311,10 @@ _ecore_main_loop_iterate_internal(Eo *obj, Efl_Loop_Data *pd, int once_only)
2295 if (obj == ML_OBJ) _ecore_signal_received_process(obj, pd); 2311 if (obj == ML_OBJ) _ecore_signal_received_process(obj, pd);
2296 // if as a result of timers/animators or signals we have accumulated 2312 // if as a result of timers/animators or signals we have accumulated
2297 // events, then instantly handle them 2313 // events, then instantly handle them
2298 if (efl_loop_message_exists(obj)) 2314 if (pd->message_queue)
2299 { 2315 {
2300 // but first conceptually enter an idle state 2316 // but first conceptually enter an idle state
2301 _ecore_idle_enterer_call(obj); 2317 efl_event_callback_call(obj, EFL_LOOP_EVENT_IDLE_ENTER, NULL);
2302 _ecore_throttle(); 2318 _ecore_throttle();
2303 _throttle_do(pd); 2319 _throttle_do(pd);
2304 // now quickly poll to see which input fd's are active 2320 // now quickly poll to see which input fd's are active
@@ -2325,7 +2341,7 @@ _ecore_main_loop_iterate_internal(Eo *obj, Efl_Loop_Data *pd, int once_only)
2325 else 2341 else
2326 { 2342 {
2327 // call idle enterers ... 2343 // call idle enterers ...
2328 _ecore_idle_enterer_call(obj); 2344 efl_event_callback_call(obj, EFL_LOOP_EVENT_IDLE_ENTER, NULL);
2329 _ecore_throttle(); 2345 _ecore_throttle();
2330 _throttle_do(pd); 2346 _throttle_do(pd);
2331 } 2347 }
@@ -2336,7 +2352,7 @@ _ecore_main_loop_iterate_internal(Eo *obj, Efl_Loop_Data *pd, int once_only)
2336 2352
2337 // if there are any (buffered fd handling may generate them) 2353 // if there are any (buffered fd handling may generate them)
2338 // then jump to processing them */ 2354 // then jump to processing them */
2339 if (efl_loop_message_exists(obj)) 2355 if (pd->message_queue)
2340 { 2356 {
2341 _ecore_main_select(obj, pd, 0.0); 2357 _ecore_main_select(obj, pd, 0.0);
2342 _efl_loop_timer_enable_new(obj, pd); 2358 _efl_loop_timer_enable_new(obj, pd);
@@ -2346,7 +2362,7 @@ _ecore_main_loop_iterate_internal(Eo *obj, Efl_Loop_Data *pd, int once_only)
2346 if (once_only) 2362 if (once_only)
2347 { 2363 {
2348 // in once_only mode enter idle here instead and then return 2364 // in once_only mode enter idle here instead and then return
2349 _ecore_idle_enterer_call(obj); 2365 efl_event_callback_call(obj, EFL_LOOP_EVENT_IDLE_ENTER, NULL);
2350 _ecore_throttle(); 2366 _ecore_throttle();
2351 _throttle_do(pd); 2367 _throttle_do(pd);
2352 _efl_loop_timer_enable_new(obj, pd); 2368 _efl_loop_timer_enable_new(obj, pd);
@@ -2373,12 +2389,12 @@ start_loop: //-*************************************************************
2373 _efl_loop_timer_enable_new(obj, pd); 2389 _efl_loop_timer_enable_new(obj, pd);
2374 goto done; 2390 goto done;
2375 } 2391 }
2376 if (!efl_loop_message_exists(obj)) 2392 if (!pd->message_queue)
2377 { 2393 {
2378 // init flags 2394 // init flags
2379 next_time = _efl_loop_timer_next_get(obj, pd); 2395 next_time = _efl_loop_timer_next_get(obj, pd);
2380 // no idlers 2396 // no idlers
2381 if (!_ecore_idler_exist(obj)) 2397 if (!_ecore_main_idlers_exist(pd))
2382 { 2398 {
2383 // sleep until timeout or forever (-1.0) waiting for on fds 2399 // sleep until timeout or forever (-1.0) waiting for on fds
2384 _ecore_main_select(obj, pd, next_time); 2400 _ecore_main_select(obj, pd, next_time);
@@ -2403,7 +2419,7 @@ process_all: //-*********************************************************
2403 if (!once_only) 2419 if (!once_only)
2404 { 2420 {
2405 _ecore_animator_run_reset(); // XXX: 2421 _ecore_animator_run_reset(); // XXX:
2406 _ecore_idle_exiter_call(obj); 2422 efl_event_callback_call(obj, EFL_LOOP_EVENT_IDLE_EXIT, NULL);
2407 } 2423 }
2408 // call the fd handler per fd that became alive... 2424 // call the fd handler per fd that became alive...
2409 // this should read or write any data to the monitored fd and then 2425 // this should read or write any data to the monitored fd and then
@@ -2413,13 +2429,13 @@ process_all: //-*********************************************************
2413 // process signals into events .... 2429 // process signals into events ....
2414 _ecore_signal_received_process(obj, pd); 2430 _ecore_signal_received_process(obj, pd);
2415 // handle events ... 2431 // handle events ...
2416 efl_loop_message_process(obj); // XXX: event queue per loop 2432 efl_loop_message_process(obj);
2417 _ecore_main_fd_handlers_cleanup(obj, pd); 2433 _ecore_main_fd_handlers_cleanup(obj, pd);
2418 2434
2419 if (once_only) 2435 if (once_only)
2420 { 2436 {
2421 // if in once_only mode handle idle exiting 2437 // if in once_only mode handle idle exiting
2422 _ecore_idle_enterer_call(obj); 2438 efl_event_callback_call(obj, EFL_LOOP_EVENT_IDLE_ENTER, NULL);
2423 _ecore_throttle(); 2439 _ecore_throttle();
2424 _throttle_do(pd); 2440 _throttle_do(pd);
2425 } 2441 }
diff --git a/src/lib/ecore/ecore_private.h b/src/lib/ecore/ecore_private.h
index 9c0d5f3dc7..d1046f0fb5 100644
--- a/src/lib/ecore/ecore_private.h
+++ b/src/lib/ecore/ecore_private.h
@@ -242,14 +242,6 @@ void *_ecore_factorized_idle_del(Ecore_Idler *idler);
242void _ecore_factorized_idle_process(void *data, const Efl_Event *event); 242void _ecore_factorized_idle_process(void *data, const Efl_Event *event);
243void _ecore_factorized_idle_event_del(void *data, const Efl_Event *event); 243void _ecore_factorized_idle_event_del(void *data, const Efl_Event *event);
244 244
245void _ecore_idler_all_call(Eo *loop);
246int _ecore_idler_exist(Eo *loop);
247
248void _ecore_idle_enterer_call(Eo *loop);
249
250void _ecore_idle_exiter_call(Eo *loop);
251
252
253Eina_Future_Scheduler *_ecore_event_future_scheduler_get(void); 245Eina_Future_Scheduler *_ecore_event_future_scheduler_get(void);
254 246
255Eina_Bool _ecore_event_init(void); 247Eina_Bool _ecore_event_init(void);
@@ -489,7 +481,6 @@ void ecore_loop_promise_fulfill(Efl_Promise *p);
489#define EFL_LOOP_DATA efl_data_scope_get(efl_loop_main_get(EFL_LOOP_CLASS), EFL_LOOP_CLASS) 481#define EFL_LOOP_DATA efl_data_scope_get(efl_loop_main_get(EFL_LOOP_CLASS), EFL_LOOP_CLASS)
490 482
491EOAPI Eina_Bool efl_loop_message_process(Eo *obj); 483EOAPI Eina_Bool efl_loop_message_process(Eo *obj);
492EOAPI Eina_Bool efl_loop_message_exists(Eo *obj);
493 484
494#undef EAPI 485#undef EAPI
495#define EAPI 486#define EAPI
diff --git a/src/lib/ecore/efl_loop.c b/src/lib/ecore/efl_loop.c
index 6cf133f981..cf58573d28 100644
--- a/src/lib/ecore/efl_loop.c
+++ b/src/lib/ecore/efl_loop.c
@@ -657,15 +657,6 @@ _efl_loop_message_process(Eo *obj, Efl_Loop_Data *pd)
657 657
658EOAPI EFL_FUNC_BODY(efl_loop_message_process, Eina_Bool, 0); 658EOAPI EFL_FUNC_BODY(efl_loop_message_process, Eina_Bool, 0);
659 659
660EOLIAN static Eina_Bool
661_efl_loop_message_exists(Eo *obj EINA_UNUSED, Efl_Loop_Data *pd)
662{
663 if (pd->message_queue) return EINA_TRUE;
664 return EINA_FALSE;
665}
666
667EOAPI EFL_FUNC_BODY(efl_loop_message_exists, Eina_Bool, 0);
668
669EWAPI void 660EWAPI void
670efl_build_version_set(int vmaj, int vmin, int vmic, int revision, 661efl_build_version_set(int vmaj, int vmin, int vmic, int revision,
671 const char *flavor, const char *build_id) 662 const char *flavor, const char *build_id)
@@ -714,7 +705,6 @@ efl_loop_future_scheduler_get(Eo *obj)
714} 705}
715 706
716#define EFL_LOOP_EXTRA_OPS \ 707#define EFL_LOOP_EXTRA_OPS \
717 EFL_OBJECT_OP_FUNC(efl_loop_message_process, _efl_loop_message_process), \ 708 EFL_OBJECT_OP_FUNC(efl_loop_message_process, _efl_loop_message_process)
718 EFL_OBJECT_OP_FUNC(efl_loop_message_exists, _efl_loop_message_exists)
719 709
720#include "efl_loop.eo.c" 710#include "efl_loop.eo.c"