summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2018-02-27 14:10:12 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2018-03-03 13:40:33 +0900
commit1c74aaa7e9c9fa1732b467aca5ee1458e3721f0a (patch)
treeaa8cfdf82e579b61cec0ca3d08d2d9cfc4eab651 /src/lib
parent6f092071ac54d10dde39889571518e4b9d17308f (diff)
Revert "cxx: Fix manual code after efl_app change."
This reverts commit 135154303bea691c6f7f9472a5dec32d9103c38d. Revert "efl: move signal events from efl.loop to efl.app" This reverts commit 3dbca39f98288580c62a43c179ac11621433ec88. Revert "efl: add test suite for efl_app" This reverts commit 3e94be5d73256a7f5c02d3a9474173226be7beff. Revert "efl: create Efl.App class, the parent of Efl.Loop" This reverts commit 28fe00b94e55575c15684959b89a614d5a579309. Go back to before efl.app because I think this should be done with superclassing here not a parent object. reasons? 1. multiple loops per single thread make no sense. so if multilpe loop objects they wont be contained in a single app object and then deleted like this. 2. the app object is not really sharable in this design so it cant be accessed from other threads 3. it makes it harder to get the main loop or app object (well 2 func calls one calling the other and more typing. it is longer to type and more work where it is not necessary, and again it can't work from other threads unless we go duplicating efl.app per thread and then what is the point of splittyign out the signal events from efl.loop then?) etc.
Diffstat (limited to '')
-rw-r--r--src/lib/ecore/Ecore_Eo.h3
-rw-r--r--src/lib/ecore/ecore.c6
-rw-r--r--src/lib/ecore/ecore_events.c2
-rw-r--r--src/lib/ecore/ecore_exe.c2
-rw-r--r--src/lib/ecore/ecore_idle_enterer.c4
-rw-r--r--src/lib/ecore/ecore_idler.c4
-rw-r--r--src/lib/ecore/ecore_main.c6
-rw-r--r--src/lib/ecore/ecore_private.h17
-rw-r--r--src/lib/ecore/ecore_signal.c18
-rw-r--r--src/lib/ecore/ecore_thread.c2
-rw-r--r--src/lib/ecore/ecore_timer.c4
-rw-r--r--src/lib/ecore/efl_app.c110
-rw-r--r--src/lib/ecore/efl_app.eo50
-rw-r--r--src/lib/ecore/efl_general.h8
-rw-r--r--src/lib/ecore/efl_loop.c82
-rw-r--r--src/lib/ecore/efl_loop.eo30
-rw-r--r--src/lib/ecore/efl_loop_consumer.c2
-rw-r--r--src/lib/ecore/efl_model_composite_boolean.c14
-rw-r--r--src/lib/ecore/efl_model_composite_selection.c2
-rw-r--r--src/lib/ecore/efl_model_container.c8
-rw-r--r--src/lib/ecore/efl_model_container_item.c8
-rw-r--r--src/lib/ecore/efl_model_item.c8
-rw-r--r--src/lib/ecore_con/ecore_con_legacy.c12
-rw-r--r--src/lib/ecore_con/ecore_con_url.c2
-rw-r--r--src/lib/ecore_con/efl_net_ip_address.c2
-rw-r--r--src/lib/ecore_file/ecore_file_download.c2
-rw-r--r--src/lib/ecore_ipc/ecore_ipc.c20
-rw-r--r--src/lib/edje/edje_main.c18
-rw-r--r--src/lib/edje/edje_private.h2
-rw-r--r--src/lib/eio/eio_main.c6
-rw-r--r--src/lib/eio/eio_model.c2
-rw-r--r--src/lib/elementary/efl_ui_win.c2
-rw-r--r--src/lib/elementary/elm_config.c8
-rw-r--r--src/lib/elementary/elm_glview.c10
-rw-r--r--src/lib/elementary/elm_main.c10
-rw-r--r--src/lib/evas/canvas/evas_main.c4
-rw-r--r--src/lib/evas/canvas/evas_object_main.c4
-rw-r--r--src/lib/evas/canvas/evas_object_textblock.c2
38 files changed, 209 insertions, 287 deletions
diff --git a/src/lib/ecore/Ecore_Eo.h b/src/lib/ecore/Ecore_Eo.h
index 35b2415d3f..f5ce92d805 100644
--- a/src/lib/ecore/Ecore_Eo.h
+++ b/src/lib/ecore/Ecore_Eo.h
@@ -48,7 +48,6 @@
48#include "efl_exe.eo.h" 48#include "efl_exe.eo.h"
49 49
50#include "efl_loop.eo.h" 50#include "efl_loop.eo.h"
51#include "efl_app.eo.h"
52 51
53/** 52/**
54 * @brief Quits the main loop once all the events currently on the queue have 53 * @brief Quits the main loop once all the events currently on the queue have
@@ -103,7 +102,7 @@ EAPI Eina_Promise *efl_loop_promise_new(const Eo *obj, Eina_Promise_Cancel_Cb ca
103#include "efl_interpolator_cubic_bezier.eo.h" 102#include "efl_interpolator_cubic_bezier.eo.h"
104 103
105/* We ue the factory pattern here, so you shouldn't call eo_add directly. */ 104/* We ue the factory pattern here, so you shouldn't call eo_add directly. */
106EAPI Eo *efl_app_get(void); 105EAPI Eo *efl_main_loop_get(void);
107 106
108typedef struct _Efl_Future_Composite_Progress Efl_Future_All_Progress; 107typedef struct _Efl_Future_Composite_Progress Efl_Future_All_Progress;
109 108
diff --git a/src/lib/ecore/ecore.c b/src/lib/ecore/ecore.c
index b5ec2c8c7b..d911bc4e23 100644
--- a/src/lib/ecore/ecore.c
+++ b/src/lib/ecore/ecore.c
@@ -323,7 +323,7 @@ ecore_init(void)
323 sec = ((double) atoi(getenv("WATCHDOG_USEC"))) / 1000 / 1000; 323 sec = ((double) atoi(getenv("WATCHDOG_USEC"))) / 1000 / 1000;
324 324
325 _systemd_watchdog = 325 _systemd_watchdog =
326 efl_add(EFL_LOOP_TIMER_CLASS, efl_app_main_loop_get(efl_app_get()), 326 efl_add(EFL_LOOP_TIMER_CLASS, efl_main_loop_get(),
327 efl_loop_timer_interval_set(efl_added, sec / 2), 327 efl_loop_timer_interval_set(efl_added, sec / 2),
328 efl_event_callback_add(efl_added, 328 efl_event_callback_add(efl_added,
329 EFL_LOOP_TIMER_EVENT_TICK, 329 EFL_LOOP_TIMER_EVENT_TICK,
@@ -347,7 +347,7 @@ ecore_init(void)
347 ecore_system_modules_load(); 347 ecore_system_modules_load();
348 348
349 if (getenv("EFL_FIRST_LOOP")) 349 if (getenv("EFL_FIRST_LOOP"))
350 efl_event_callback_add(efl_app_main_loop_get(efl_app_get()), 350 efl_event_callback_add(efl_main_loop_get(),
351 EFL_LOOP_EVENT_RESUME, 351 EFL_LOOP_EVENT_RESUME,
352 _efl_first_loop_iterate, 352 _efl_first_loop_iterate,
353 getenv("EFL_FIRST_LOOP")); 353 getenv("EFL_FIRST_LOOP"));
@@ -391,7 +391,7 @@ ecore_shutdown(void)
391 if (_ecore_init_count-- != _ecore_init_count_threshold) 391 if (_ecore_init_count-- != _ecore_init_count_threshold)
392 goto end; 392 goto end;
393 393
394 efl_event_callback_call(efl_app_main_loop_get(efl_app_get()), EFL_LOOP_EVENT_TERMINATE, NULL); 394 efl_event_callback_call(efl_main_loop_get(), EFL_LOOP_EVENT_TERMINATE, NULL);
395 395
396 ecore_system_modules_unload(); 396 ecore_system_modules_unload();
397 397
diff --git a/src/lib/ecore/ecore_events.c b/src/lib/ecore/ecore_events.c
index 7b9f536a30..258e10e663 100644
--- a/src/lib/ecore/ecore_events.c
+++ b/src/lib/ecore/ecore_events.c
@@ -247,7 +247,7 @@ _ecore_event_init(void)
247 247
248 _event_msg_handler = 248 _event_msg_handler =
249 efl_loop_message_handler_get(EFL_LOOP_CLASS, 249 efl_loop_message_handler_get(EFL_LOOP_CLASS,
250 ML_OBJ, 250 _mainloop_singleton,
251 ECORE_EVENT_MESSAGE_HANDLER_CLASS); 251 ECORE_EVENT_MESSAGE_HANDLER_CLASS);
252 if (!_event_msg_handler) 252 if (!_event_msg_handler)
253 { 253 {
diff --git a/src/lib/ecore/ecore_exe.c b/src/lib/ecore/ecore_exe.c
index eb5e9abcc6..908f677539 100644
--- a/src/lib/ecore/ecore_exe.c
+++ b/src/lib/ecore/ecore_exe.c
@@ -66,7 +66,7 @@ ecore_exe_pipe_run(const char *exe_cmd,
66 const void *data) 66 const void *data)
67{ 67{
68 EINA_MAIN_LOOP_CHECK_RETURN_VAL(NULL); 68 EINA_MAIN_LOOP_CHECK_RETURN_VAL(NULL);
69 Ecore_Exe *ret = efl_add(MY_CLASS, efl_app_main_loop_get(efl_app_get()), 69 Ecore_Exe *ret = efl_add(MY_CLASS, efl_loop_main_get(EFL_LOOP_CLASS),
70 ecore_obj_exe_command_set(efl_added, exe_cmd, 70 ecore_obj_exe_command_set(efl_added, exe_cmd,
71 flags)); 71 flags));
72 if (ret) 72 if (ret)
diff --git a/src/lib/ecore/ecore_idle_enterer.c b/src/lib/ecore/ecore_idle_enterer.c
index 9e4fa081f6..9ce4716c45 100644
--- a/src/lib/ecore/ecore_idle_enterer.c
+++ b/src/lib/ecore/ecore_idle_enterer.c
@@ -30,8 +30,8 @@ ecore_idle_enterer_before_add(Ecore_Task_Cb func,
30 30
31 // This avoid us duplicating code and should only be slightly slower 31 // This avoid us duplicating code and should only be slightly slower
32 // due to a useless cycle of callback registration 32 // due to a useless cycle of callback registration
33 efl_event_callback_array_del(ML_OBJ, ecore_idle_enterer_callbacks(), ie); 33 efl_event_callback_array_del(_mainloop_singleton, ecore_idle_enterer_callbacks(), ie);
34 efl_event_callback_array_priority_add(ML_OBJ, ecore_idle_enterer_callbacks(), EFL_CALLBACK_PRIORITY_BEFORE, ie); 34 efl_event_callback_array_priority_add(_mainloop_singleton, ecore_idle_enterer_callbacks(), EFL_CALLBACK_PRIORITY_BEFORE, ie);
35 35
36 return ie; 36 return ie;
37} 37}
diff --git a/src/lib/ecore/ecore_idler.c b/src/lib/ecore/ecore_idler.c
index e95403398a..ffd4579cae 100644
--- a/src/lib/ecore/ecore_idler.c
+++ b/src/lib/ecore/ecore_idler.c
@@ -57,7 +57,7 @@ _ecore_factorized_idle_del(Ecore_Idler *idler)
57 return idler->data; 57 return idler->data;
58 } 58 }
59 59
60 efl_event_callback_array_del(ML_OBJ, idler->desc, idler); 60 efl_event_callback_array_del(_mainloop_singleton, idler->desc, idler);
61 61
62 data = idler->data; 62 data = idler->data;
63 eina_mempool_free(idler_mp, idler); 63 eina_mempool_free(idler_mp, idler);
@@ -94,7 +94,7 @@ _ecore_factorized_idle_add(const Efl_Callback_Array_Item *desc,
94 ret->references = 0; 94 ret->references = 0;
95 ret->delete_me = EINA_FALSE; 95 ret->delete_me = EINA_FALSE;
96 96
97 efl_event_callback_array_add(ML_OBJ, desc, ret); 97 efl_event_callback_array_add(_mainloop_singleton, desc, ret);
98 98
99 return ret; 99 return ret;
100} 100}
diff --git a/src/lib/ecore/ecore_main.c b/src/lib/ecore/ecore_main.c
index 050851f7ec..bc3c6c84a9 100644
--- a/src/lib/ecore/ecore_main.c
+++ b/src/lib/ecore/ecore_main.c
@@ -1069,7 +1069,7 @@ void
1069_ecore_main_loop_init(void) 1069_ecore_main_loop_init(void)
1070{ 1070{
1071 DBG("_ecore_main_loop_init"); 1071 DBG("_ecore_main_loop_init");
1072 if (!efl_app_main_loop_get(efl_app_get())) ERR("Cannot create main loop object"); 1072 if (!efl_main_loop_get()) ERR("Cannot create main loop object");
1073 _ecore_main_loop_setup(ML_OBJ, ML_DAT); 1073 _ecore_main_loop_setup(ML_OBJ, ML_DAT);
1074} 1074}
1075 1075
@@ -1372,7 +1372,7 @@ ecore_main_fd_handler_add(int fd,
1372{ 1372{
1373 Ecore_Fd_Handler *fdh = NULL; 1373 Ecore_Fd_Handler *fdh = NULL;
1374 EINA_MAIN_LOOP_CHECK_RETURN_VAL(NULL); 1374 EINA_MAIN_LOOP_CHECK_RETURN_VAL(NULL);
1375 fdh = _ecore_main_fd_handler_add(efl_app_main_loop_get(efl_app_get()), 1375 fdh = _ecore_main_fd_handler_add(efl_loop_main_get(EFL_LOOP_CLASS),
1376 ML_DAT, NULL, fd, flags, func, data, 1376 ML_DAT, NULL, fd, flags, func, data,
1377 buf_func, buf_data, EINA_FALSE); 1377 buf_func, buf_data, EINA_FALSE);
1378 if (fdh) fdh->legacy = EINA_TRUE; 1378 if (fdh) fdh->legacy = EINA_TRUE;
@@ -1388,7 +1388,7 @@ ecore_main_fd_handler_file_add(int fd,
1388 const void *buf_data) 1388 const void *buf_data)
1389{ 1389{
1390 EINA_MAIN_LOOP_CHECK_RETURN_VAL(NULL); 1390 EINA_MAIN_LOOP_CHECK_RETURN_VAL(NULL);
1391 return _ecore_main_fd_handler_add(efl_app_main_loop_get(efl_app_get()), 1391 return _ecore_main_fd_handler_add(efl_loop_main_get(EFL_LOOP_CLASS),
1392 ML_DAT, NULL, fd, flags, func, data, 1392 ML_DAT, NULL, fd, flags, func, data,
1393 buf_func, buf_data, EINA_TRUE); 1393 buf_func, buf_data, EINA_TRUE);
1394} 1394}
diff --git a/src/lib/ecore/ecore_private.h b/src/lib/ecore/ecore_private.h
index b5cba2d4aa..7ff80f57c3 100644
--- a/src/lib/ecore/ecore_private.h
+++ b/src/lib/ecore/ecore_private.h
@@ -113,13 +113,6 @@ struct _Efl_Loop_Future_Scheduler
113 Efl_Loop_Data *loop_data; 113 Efl_Loop_Data *loop_data;
114}; 114};
115 115
116typedef struct _Efl_App_Data
117{
118 Eo *main_loop;
119 Efl_Loop_Data *main_loop_data;
120 Eina_List *loops; // contains non-main_loop objects
121} Efl_App_Data;
122
123struct _Efl_Loop_Data 116struct _Efl_Loop_Data
124{ 117{
125 double loop_time; 118 double loop_time;
@@ -515,10 +508,10 @@ GENERIC_ALLOC_FREE_HEADER(Ecore_Win32_Handler, ecore_win32_handler);
515 508
516#undef GENERIC_ALLOC_FREE_HEADER 509#undef GENERIC_ALLOC_FREE_HEADER
517 510
518Eo *_efl_app; 511extern Eo *_mainloop_singleton;
519Efl_App_Data *_efl_app_data; 512extern Efl_Loop_Data *_mainloop_singleton_data;
520#define ML_OBJ (_efl_app_data->main_loop) 513#define ML_OBJ _mainloop_singleton
521#define ML_DAT (_efl_app_data->main_loop_data) 514#define ML_DAT _mainloop_singleton_data
522//#define ML_DAT efl_data_scope_get(ML_OBJ, EFL_LOOP_CLASS) 515//#define ML_DAT efl_data_scope_get(ML_OBJ, EFL_LOOP_CLASS)
523 516
524extern Efl_Version _app_efl_version; 517extern Efl_Version _app_efl_version;
@@ -532,7 +525,7 @@ void ecore_loop_promise_fulfill(Efl_Promise *p);
532// access to direct input cb 525// access to direct input cb
533#define ECORE_EVAS_INTERNAL 526#define ECORE_EVAS_INTERNAL
534 527
535#define EFL_LOOP_DATA efl_data_scope_get(efl_app_main_loop_get(efl_app_get()), EFL_LOOP_CLASS) 528#define EFL_LOOP_DATA efl_data_scope_get(efl_loop_main_get(EFL_LOOP_CLASS), EFL_LOOP_CLASS)
536 529
537EOAPI Eina_Bool efl_loop_message_process(Eo *obj); 530EOAPI Eina_Bool efl_loop_message_process(Eo *obj);
538 531
diff --git a/src/lib/ecore/ecore_signal.c b/src/lib/ecore/ecore_signal.c
index 40a1b58eb6..98934e63b3 100644
--- a/src/lib/ecore/ecore_signal.c
+++ b/src/lib/ecore/ecore_signal.c
@@ -46,7 +46,7 @@ typedef struct _Signal_Data
46} Signal_Data; 46} Signal_Data;
47 47
48static Eina_Bool 48static Eina_Bool
49_ecore_signal_pipe_read(Eo *obj EINA_UNUSED) 49_ecore_signal_pipe_read(Eo *obj)
50{ 50{
51 Signal_Data sdata; 51 Signal_Data sdata;
52 int ret; 52 int ret;
@@ -74,10 +74,14 @@ _ecore_signal_pipe_read(Eo *obj EINA_UNUSED)
74 ecore_event_add(ECORE_EVENT_SIGNAL_USER, e, 74 ecore_event_add(ECORE_EVENT_SIGNAL_USER, e,
75 _ecore_signal_generic_free, NULL); 75 _ecore_signal_generic_free, NULL);
76 } 76 }
77 if (sdata.sig == SIGUSR1) 77 Eo *loop = efl_provider_find(obj, EFL_LOOP_CLASS);
78 efl_event_callback_call(_efl_app, EFL_APP_EVENT_SIGNAL_USR1, NULL); 78 if (loop)
79 else 79 {
80 efl_event_callback_call(_efl_app, EFL_APP_EVENT_SIGNAL_USR2, NULL); 80 if (sdata.sig == SIGUSR1)
81 efl_event_callback_call(loop, EFL_LOOP_EVENT_SIGNAL_USR1, NULL);
82 else
83 efl_event_callback_call(loop, EFL_LOOP_EVENT_SIGNAL_USR2, NULL);
84 }
81 } 85 }
82 break; 86 break;
83 case SIGHUP: 87 case SIGHUP:
@@ -89,7 +93,9 @@ _ecore_signal_pipe_read(Eo *obj EINA_UNUSED)
89 ecore_event_add(ECORE_EVENT_SIGNAL_HUP, e, 93 ecore_event_add(ECORE_EVENT_SIGNAL_HUP, e,
90 _ecore_signal_generic_free, NULL); 94 _ecore_signal_generic_free, NULL);
91 } 95 }
92 efl_event_callback_call(_efl_app, EFL_APP_EVENT_SIGNAL_HUP, NULL); 96 Eo *loop = efl_provider_find(obj, EFL_LOOP_CLASS);
97 if (loop)
98 efl_event_callback_call(loop, EFL_LOOP_EVENT_SIGNAL_HUP, NULL);
93 } 99 }
94 break; 100 break;
95 case SIGQUIT: 101 case SIGQUIT:
diff --git a/src/lib/ecore/ecore_thread.c b/src/lib/ecore/ecore_thread.c
index 03d9ce3664..2dc16ed389 100644
--- a/src/lib/ecore/ecore_thread.c
+++ b/src/lib/ecore/ecore_thread.c
@@ -1635,7 +1635,7 @@ ecore_thread_future_run(Ecore_Thread_Future_Cb heavy, const void *data, Eina_Fre
1635 1635
1636 efl_domain_current_push(EFL_ID_DOMAIN_SHARED); 1636 efl_domain_current_push(EFL_ID_DOMAIN_SHARED);
1637 1637
1638 efl_wref_add(efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())), &p); 1638 efl_wref_add(efl_add(EFL_PROMISE_CLASS, efl_main_loop_get()), &p);
1639 if (!p) goto end; 1639 if (!p) goto end;
1640 1640
1641 efl_object_override(p, &thread_safe_call); 1641 efl_object_override(p, &thread_safe_call);
diff --git a/src/lib/ecore/ecore_timer.c b/src/lib/ecore/ecore_timer.c
index 94d407e712..6ef4ab254c 100644
--- a/src/lib/ecore/ecore_timer.c
+++ b/src/lib/ecore/ecore_timer.c
@@ -183,7 +183,7 @@ ecore_timer_add(double in, Ecore_Task_Cb func, const void *data)
183 } 183 }
184 legacy->func = func; 184 legacy->func = func;
185 legacy->data = data; 185 legacy->data = data;
186 timer = efl_add(MY_CLASS, efl_app_main_loop_get(efl_app_get()), 186 timer = efl_add(MY_CLASS, efl_main_loop_get(),
187 efl_event_callback_array_add(efl_added, legacy_timer(), legacy), 187 efl_event_callback_array_add(efl_added, legacy_timer(), legacy),
188 efl_key_data_set(efl_added, "_legacy", legacy), 188 efl_key_data_set(efl_added, "_legacy", legacy),
189 efl_loop_timer_interval_set(efl_added, in)); 189 efl_loop_timer_interval_set(efl_added, in));
@@ -206,7 +206,7 @@ ecore_timer_loop_add(double in, Ecore_Task_Cb func, const void *data)
206 } 206 }
207 legacy->func = func; 207 legacy->func = func;
208 legacy->data = data; 208 legacy->data = data;
209 timer = efl_add(MY_CLASS, efl_app_main_loop_get(efl_app_get()), 209 timer = efl_add(MY_CLASS, efl_main_loop_get(),
210 efl_event_callback_array_add(efl_added, legacy_timer(), legacy), 210 efl_event_callback_array_add(efl_added, legacy_timer(), legacy),
211 efl_key_data_set(efl_added, "_legacy", legacy), 211 efl_key_data_set(efl_added, "_legacy", legacy),
212 efl_loop_timer_loop_reset(efl_added), 212 efl_loop_timer_loop_reset(efl_added),
diff --git a/src/lib/ecore/efl_app.c b/src/lib/ecore/efl_app.c
deleted file mode 100644
index f9a4999436..0000000000
--- a/src/lib/ecore/efl_app.c
+++ /dev/null
@@ -1,110 +0,0 @@
1#ifdef HAVE_CONFIG_H
2# include <config.h>
3#endif
4
5#include <stdlib.h>
6#include <stdio.h>
7#include <string.h>
8#include <unistd.h>
9#include <math.h>
10#include <sys/time.h>
11#ifndef _WIN32
12# include <sys/resource.h>
13#endif
14#include <errno.h>
15
16#include "Ecore.h"
17#include "ecore_private.h"
18
19#include "ecore_main_common.h"
20
21Eo *_efl_app;
22Efl_App_Data *_efl_app_data;
23
24EOLIAN static Efl_Object *
25_efl_app_efl_object_constructor(Eo *obj, Efl_App_Data *pd)
26{
27 if (_efl_app)
28 {
29 CRI("Efl.App object already exists!");
30 return NULL;
31 }
32 obj = efl_constructor(efl_super(obj, EFL_APP_CLASS));
33 if (!obj) return NULL;
34 _efl_app = obj;
35 _efl_app_data = pd;
36 pd->main_loop = efl_add(EFL_LOOP_CLASS, NULL);
37 pd->main_loop_data = efl_data_scope_get(pd->main_loop, EFL_LOOP_CLASS);
38
39 return obj;
40}
41
42EOLIAN static void
43_efl_app_efl_object_destructor(Eo *obj, Efl_App_Data *pd)
44{
45 Eo *loop;
46 Eina_List *l, *ll;
47
48 EINA_LIST_FOREACH_SAFE(pd->loops, l, ll, loop)
49 efl_del(loop);
50 efl_del(pd->main_loop);
51 pd->main_loop = NULL;
52 pd->main_loop_data = NULL;
53 efl_destructor(efl_super(obj, EFL_APP_CLASS));
54 if (obj != _efl_app) return;
55 _efl_app = NULL;
56 _efl_app_data = NULL;
57}
58
59Efl_Version _build_efl_version = { 0, 0, 0, 0, NULL, NULL };
60
61EWAPI void
62efl_build_version_set(int vmaj, int vmin, int vmic, int revision,
63 const char *flavor, const char *build_id)
64{
65 // note: EFL has not been initialized yet at this point (ie. no eina call)
66 _build_efl_version.major = vmaj;
67 _build_efl_version.minor = vmin;
68 _build_efl_version.micro = vmic;
69 _build_efl_version.revision = revision;
70 free((char *)_build_efl_version.flavor);
71 free((char *)_build_efl_version.build_id);
72 _build_efl_version.flavor = eina_strdup(flavor);
73 _build_efl_version.build_id = eina_strdup(build_id);
74}
75
76EOLIAN static const Efl_Version *
77_efl_app_build_efl_version_get(Eo *obj EINA_UNUSED, Efl_App_Data *pd EINA_UNUSED)
78{
79 return &_build_efl_version;
80}
81
82EOLIAN static const Efl_Version *
83_efl_app_efl_version_get(Eo *obj EINA_UNUSED, Efl_App_Data *pd EINA_UNUSED)
84{
85 /* vanilla EFL: flavor = NULL */
86 static const Efl_Version version = {
87 .major = VMAJ,
88 .minor = VMIN,
89 .micro = VMIC,
90 .revision = VREV,
91 .build_id = EFL_BUILD_ID,
92 .flavor = NULL
93 };
94 return &version;
95}
96
97EOLIAN static Eo *
98_efl_app_main_loop_get(Eo *obj EINA_UNUSED, Efl_App_Data *pd)
99{
100 return pd->main_loop;
101}
102
103EAPI Eo *
104efl_app_get(void)
105{
106 if (_efl_app) return _efl_app;
107 return efl_add(EFL_APP_CLASS, NULL);
108}
109
110#include "efl_app.eo.c"
diff --git a/src/lib/ecore/efl_app.eo b/src/lib/ecore/efl_app.eo
deleted file mode 100644
index a913f8b4bf..0000000000
--- a/src/lib/ecore/efl_app.eo
+++ /dev/null
@@ -1,50 +0,0 @@
1import efl_types;
2
3class Efl.App (Efl.Object)
4{
5 [[ The EFL application
6
7 Efl.App provides an abstraction to represent the overall application. It is
8 the parent of all main loops and contains various properties for the
9 environment and current process.
10 ]]
11
12 methods {
13 @property main_loop {
14 [[Points to the main loop instance of the application.]]
15 get {}
16 values {
17 main_loop: Efl.Loop; [[Application main loop]]
18 }
19 }
20 @property build_efl_version {
21 [[Indicates the version of EFL with which this application was compiled.
22
23 This might differ from @.efl_version.
24 ]]
25 get {}
26 values {
27 @cref version: Efl.Version; [[Efl version]]
28 }
29 }
30 @property efl_version {
31 [[Indicates the currently running version of EFL.
32
33 This might differ from @.build_efl_version.
34 ]]
35 get {}
36 values {
37 @cref version: Efl.Version; [[Efl version]]
38 }
39 }
40 }
41 events {
42 signal,usr1; [[System specific, but on unix maps to SIGUSR1 signal to the process - only called on main loop object]]
43 signal,usr2; [[System specific, but on unix maps to SIGUSR2 signal to the process - only called on main loop object]]
44 signal,hup; [[System specific, but on unix maps to SIGHUP signal to the process - only called on main loop object]]
45 }
46 implements {
47 Efl.Object.constructor;
48 Efl.Object.destructor;
49 }
50}
diff --git a/src/lib/ecore/efl_general.h b/src/lib/ecore/efl_general.h
index dd03d25791..256f1065a4 100644
--- a/src/lib/ecore/efl_general.h
+++ b/src/lib/ecore/efl_general.h
@@ -93,10 +93,10 @@
93 _efl_startup_time = ecore_time_unix_get(); \ 93 _efl_startup_time = ecore_time_unix_get(); \
94 _EFL_APP_VERSION_SET(); \ 94 _EFL_APP_VERSION_SET(); \
95 ecore_init(); \ 95 ecore_init(); \
96 efl_event_callback_add(efl_app_main_loop_get(efl_app_get()), EFL_LOOP_EVENT_ARGUMENTS, efl_main, NULL); \ 96 efl_event_callback_add(efl_main_loop_get(), EFL_LOOP_EVENT_ARGUMENTS, efl_main, NULL); \
97 ecore_init_ex(argc, argv); \ 97 ecore_init_ex(argc, argv); \
98 __EFL_MAIN_CONSTRUCTOR; \ 98 __EFL_MAIN_CONSTRUCTOR; \
99 ret__ = efl_loop_begin(efl_app_main_loop_get(efl_app_get())); \ 99 ret__ = efl_loop_begin(efl_main_loop_get()); \
100 real__ = efl_loop_exit_code_process(ret__); \ 100 real__ = efl_loop_exit_code_process(ret__); \
101 __EFL_MAIN_DESTRUCTOR; \ 101 __EFL_MAIN_DESTRUCTOR; \
102 ecore_shutdown_ex(); \ 102 ecore_shutdown_ex(); \
@@ -117,10 +117,10 @@
117 _efl_startup_time = ecore_time_unix_get(); \ 117 _efl_startup_time = ecore_time_unix_get(); \
118 _EFL_APP_VERSION_SET(); \ 118 _EFL_APP_VERSION_SET(); \
119 ecore_init(); \ 119 ecore_init(); \
120 efl_event_callback_array_add(efl_app_main_loop_get(efl_app_get()), _efl_main_ex(), NULL); \ 120 efl_event_callback_array_add(efl_main_loop_get(), _efl_main_ex(), NULL); \
121 ecore_init_ex(argc, argv); \ 121 ecore_init_ex(argc, argv); \
122 __EFL_MAIN_CONSTRUCTOR; \ 122 __EFL_MAIN_CONSTRUCTOR; \
123 ret__ = efl_loop_begin(efl_app_main_loop_get(efl_app_get())); \ 123 ret__ = efl_loop_begin(efl_main_loop_get()); \
124 real__ = efl_loop_exit_code_process(ret__); \ 124 real__ = efl_loop_exit_code_process(ret__); \
125 __EFL_MAIN_DESTRUCTOR; \ 125 __EFL_MAIN_DESTRUCTOR; \
126 ecore_shutdown_ex(); \ 126 ecore_shutdown_ex(); \
diff --git a/src/lib/ecore/efl_loop.c b/src/lib/ecore/efl_loop.c
index 5495dd4bf4..74a12deb50 100644
--- a/src/lib/ecore/efl_loop.c
+++ b/src/lib/ecore/efl_loop.c
@@ -53,11 +53,31 @@ _efl_loop_message_handler_get(Eo *obj EINA_UNUSED, void *pd EINA_UNUSED, Efl_Loo
53 return mh.handler; 53 return mh.handler;
54} 54}
55 55
56Efl_Version _app_efl_version = { 0, 0, 0, 0, NULL, NULL };
57
58Eo *_mainloop_singleton = NULL;
59Efl_Loop_Data *_mainloop_singleton_data = NULL;
60
56extern Eina_Lock _environ_lock; 61extern Eina_Lock _environ_lock;
57static Eina_List *_environ_strings_set = NULL; 62static Eina_List *_environ_strings_set = NULL;
58 63
59static void _clean_old_environ(void); 64static void _clean_old_environ(void);
60 65
66EOLIAN static Efl_Loop *
67_efl_loop_main_get(Efl_Class *klass EINA_UNUSED, void *_pd EINA_UNUSED)
68{
69 if (_mainloop_singleton) return _mainloop_singleton;
70 _mainloop_singleton = efl_add(EFL_LOOP_CLASS, NULL);
71 _mainloop_singleton_data = efl_data_scope_get(_mainloop_singleton, EFL_LOOP_CLASS);
72 return _mainloop_singleton;
73}
74
75EAPI Eo *
76efl_main_loop_get(void)
77{
78 return efl_loop_main_get(EFL_LOOP_CLASS);
79}
80
61EOLIAN static void 81EOLIAN static void
62_efl_loop_iterate(Eo *obj, Efl_Loop_Data *pd) 82_efl_loop_iterate(Eo *obj, Efl_Loop_Data *pd)
63{ 83{
@@ -104,7 +124,7 @@ efl_exit(int exit_code)
104 124
105 eina_value_setup(&v, EINA_VALUE_TYPE_INT); 125 eina_value_setup(&v, EINA_VALUE_TYPE_INT);
106 eina_value_set(&v, &exit_code); 126 eina_value_set(&v, &exit_code);
107 efl_loop_quit(efl_app_main_loop_get(efl_app_get()), v); 127 efl_loop_quit(efl_main_loop_get(), v);
108} 128}
109 129
110EOLIAN static Efl_Object * 130EOLIAN static Efl_Object *
@@ -302,10 +322,6 @@ _efl_loop_efl_object_constructor(Eo *obj, Efl_Loop_Data *pd)
302 obj = efl_constructor(efl_super(obj, EFL_LOOP_CLASS)); 322 obj = efl_constructor(efl_super(obj, EFL_LOOP_CLASS));
303 if (!obj) return NULL; 323 if (!obj) return NULL;
304 324
305 efl_parent_set(obj, _efl_app);
306 if (ML_OBJ)
307 _efl_app_data->loops = eina_list_append(_efl_app_data->loops, obj);
308
309 efl_event_callback_array_add(obj, event_catcher_watch(), pd); 325 efl_event_callback_array_add(obj, event_catcher_watch(), pd);
310 326
311 pd->loop_time = ecore_time_get(); 327 pd->loop_time = ecore_time_get();
@@ -349,11 +365,13 @@ _efl_loop_efl_object_destructor(Eo *obj, Efl_Loop_Data *pd)
349 pd->env.environ_copy = NULL; 365 pd->env.environ_copy = NULL;
350 eina_lock_release(&_environ_lock); 366 eina_lock_release(&_environ_lock);
351 367
352 efl_parent_set(obj, NULL);
353 if (obj != ML_OBJ)
354 _efl_app_data->loops = eina_list_remove(_efl_app_data->loops, obj);
355
356 efl_destructor(efl_super(obj, EFL_LOOP_CLASS)); 368 efl_destructor(efl_super(obj, EFL_LOOP_CLASS));
369
370 if (obj == _mainloop_singleton)
371 {
372 _mainloop_singleton = NULL;
373 _mainloop_singleton_data = NULL;
374 }
357} 375}
358 376
359static void 377static void
@@ -380,7 +398,7 @@ _efl_loop_arguments_send(void *data, const Eina_Value v,
380 arge.initialization = initialization; 398 arge.initialization = initialization;
381 initialization = EINA_FALSE; 399 initialization = EINA_FALSE;
382 400
383 efl_event_callback_call(efl_app_main_loop_get(efl_app_get()), 401 efl_event_callback_call(efl_main_loop_get(),
384 EFL_LOOP_EVENT_ARGUMENTS, &arge); 402 EFL_LOOP_EVENT_ARGUMENTS, &arge);
385on_error: 403on_error:
386 _efl_loop_arguments_cleanup(arga); 404 _efl_loop_arguments_cleanup(arga);
@@ -397,17 +415,17 @@ ecore_loop_arguments_send(int argc, const char **argv)
397 Eina_Array *arga; 415 Eina_Array *arga;
398 int i = 0; 416 int i = 0;
399 417
400 efl_task_arg_reset(efl_app_main_loop_get(efl_app_get())); 418 efl_task_arg_reset(efl_main_loop_get());
401 arga = eina_array_new(argc); 419 arga = eina_array_new(argc);
402 for (i = 0; i < argc; i++) 420 for (i = 0; i < argc; i++)
403 { 421 {
404 eina_array_push(arga, eina_stringshare_add(argv[i])); 422 eina_array_push(arga, eina_stringshare_add(argv[i]));
405 efl_task_arg_append(efl_app_main_loop_get(efl_app_get()), argv[i]); 423 efl_task_arg_append(efl_main_loop_get(), argv[i]);
406 } 424 }
407 425
408 job = eina_future_then(efl_loop_job(efl_app_main_loop_get(efl_app_get())), 426 job = eina_future_then(efl_loop_job(efl_main_loop_get()),
409 _efl_loop_arguments_send, arga); 427 _efl_loop_arguments_send, arga);
410 efl_future_Eina_FutureXXX_then(efl_app_main_loop_get(efl_app_get()), job); 428 efl_future_Eina_FutureXXX_then(efl_main_loop_get(), job);
411} 429}
412 430
413// Only one main loop handle for now 431// Only one main loop handle for now
@@ -692,6 +710,42 @@ _efl_loop_message_process(Eo *obj, Efl_Loop_Data *pd)
692 710
693EOAPI EFL_FUNC_BODY(efl_loop_message_process, Eina_Bool, 0); 711EOAPI EFL_FUNC_BODY(efl_loop_message_process, Eina_Bool, 0);
694 712
713EWAPI void
714efl_build_version_set(int vmaj, int vmin, int vmic, int revision,
715 const char *flavor, const char *build_id)
716{
717 // note: EFL has not been initialized yet at this point (ie. no eina call)
718 _app_efl_version.major = vmaj;
719 _app_efl_version.minor = vmin;
720 _app_efl_version.micro = vmic;
721 _app_efl_version.revision = revision;
722 free((char *)_app_efl_version.flavor);
723 free((char *)_app_efl_version.build_id);
724 _app_efl_version.flavor = flavor ? strdup(flavor) : NULL;
725 _app_efl_version.build_id = build_id ? strdup(build_id) : NULL;
726}
727
728EOLIAN static const Efl_Version *
729_efl_loop_app_efl_version_get(Eo *obj EINA_UNUSED, Efl_Loop_Data *pd EINA_UNUSED)
730{
731 return &_app_efl_version;
732}
733
734EOLIAN static const Efl_Version *
735_efl_loop_efl_version_get(Eo *obj EINA_UNUSED, Efl_Loop_Data *pd EINA_UNUSED)
736{
737 /* vanilla EFL: flavor = NULL */
738 static const Efl_Version version = {
739 .major = VMAJ,
740 .minor = VMIN,
741 .micro = VMIC,
742 .revision = VREV,
743 .build_id = EFL_BUILD_ID,
744 .flavor = NULL
745 };
746 return &version;
747}
748
695static void 749static void
696_env_sync(Efl_Loop_Data *pd, Efl_Task_Data *td) 750_env_sync(Efl_Loop_Data *pd, Efl_Task_Data *td)
697{ 751{
diff --git a/src/lib/ecore/efl_loop.eo b/src/lib/ecore/efl_loop.eo
index d851750a02..e6c1229772 100644
--- a/src/lib/ecore/efl_loop.eo
+++ b/src/lib/ecore/efl_loop.eo
@@ -20,6 +20,33 @@ class Efl.Loop (Efl.Task)
20 you can provide these if you need to. 20 you can provide these if you need to.
21 ]] 21 ]]
22 methods { 22 methods {
23 @property main @class {
24 [[Points to the main loop instance of the application.]]
25 get {}
26 values {
27 main_loop: Efl.Loop; [[Application main loop]]
28 }
29 }
30 @property app_efl_version {
31 [[Indicates the version of EFL with which this application was compiled.
32
33 This might differ from @.efl_version.
34 ]]
35 get {}
36 values {
37 @cref version: Efl.Version; [[Efl version]]
38 }
39 }
40 @property efl_version {
41 [[Indicates the currently running version of EFL.
42
43 This might differ from @.app_efl_version.
44 ]]
45 get {}
46 values {
47 @cref version: Efl.Version; [[Efl version]]
48 }
49 }
23 iterate { 50 iterate {
24 [[Runs a single iteration of the main loop to process everything on the 51 [[Runs a single iteration of the main loop to process everything on the
25 queue.]] 52 queue.]]
@@ -124,6 +151,9 @@ class Efl.Loop (Efl.Task)
124 pause; [[Called when the window is not going be displayed for some time]] 151 pause; [[Called when the window is not going be displayed for some time]]
125 resume; [[Called before a window is rendered after a pause event]] 152 resume; [[Called before a window is rendered after a pause event]]
126 terminate; [[Called before starting the shutdown of Elementary]] 153 terminate; [[Called before starting the shutdown of Elementary]]
154 signal,usr1; [[System specific, but on unix maps to SIGUSR1 signal to the process - only called on main loop object]]
155 signal,usr2; [[System specific, but on unix maps to SIGUSR2 signal to the process - only called on main loop object]]
156 signal,hup; [[System specific, but on unix maps to SIGHUP signal to the process - only called on main loop object]]
127 } 157 }
128 implements { 158 implements {
129 Efl.Object.constructor; 159 Efl.Object.constructor;
diff --git a/src/lib/ecore/efl_loop_consumer.c b/src/lib/ecore/efl_loop_consumer.c
index fa53e0f12a..670e91bbc6 100644
--- a/src/lib/ecore/efl_loop_consumer.c
+++ b/src/lib/ecore/efl_loop_consumer.c
@@ -17,7 +17,7 @@ _efl_loop_consumer_loop_get(Eo *obj, Efl_Loop_Consumer_Data *pd EINA_UNUSED)
17 Efl_Loop *loop = efl_provider_find(obj, EFL_LOOP_CLASS); 17 Efl_Loop *loop = efl_provider_find(obj, EFL_LOOP_CLASS);
18 if (!loop && eina_main_loop_is()) 18 if (!loop && eina_main_loop_is())
19 { 19 {
20 loop = efl_app_main_loop_get(efl_app_get()); 20 loop = efl_main_loop_get();
21 ERR("Failed to get the loop on object %p from the main thread! " 21 ERR("Failed to get the loop on object %p from the main thread! "
22 "Returning the main loop: %p", obj, loop); 22 "Returning the main loop: %p", obj, loop);
23 } 23 }
diff --git a/src/lib/ecore/efl_model_composite_boolean.c b/src/lib/ecore/efl_model_composite_boolean.c
index d88dff1c32..d8c8e38376 100644
--- a/src/lib/ecore/efl_model_composite_boolean.c
+++ b/src/lib/ecore/efl_model_composite_boolean.c
@@ -160,7 +160,7 @@ _efl_model_composite_boolean_children_efl_model_property_get(Eo *obj EINA_UNUSED
160 Efl_Model_Hash_Value *hv = eina_hash_find(pd->parent_pd->values, property); 160 Efl_Model_Hash_Value *hv = eina_hash_find(pd->parent_pd->values, property);
161 if (hv) 161 if (hv)
162 { 162 {
163 Efl_Promise *promise = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 163 Efl_Promise *promise = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
164 Efl_Future *rfuture = efl_promise_future_get(promise); 164 Efl_Future *rfuture = efl_promise_future_get(promise);
165 165
166 Eina_Value *eina_value = eina_value_new(EINA_VALUE_TYPE_UCHAR); 166 Eina_Value *eina_value = eina_value_new(EINA_VALUE_TYPE_UCHAR);
@@ -180,7 +180,7 @@ _efl_model_composite_boolean_children_efl_model_property_get(Eo *obj EINA_UNUSED
180 return efl_model_property_get(pd->composite_child, property); 180 return efl_model_property_get(pd->composite_child, property);
181 else 181 else
182 { 182 {
183 Efl_Promise *promise = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 183 Efl_Promise *promise = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
184 Efl_Future *rfuture = efl_promise_future_get(promise); 184 Efl_Future *rfuture = efl_promise_future_get(promise);
185 185
186 efl_promise_failed_set(promise, EFL_MODEL_ERROR_NOT_FOUND); 186 efl_promise_failed_set(promise, EFL_MODEL_ERROR_NOT_FOUND);
@@ -192,7 +192,7 @@ static Efl_Future *
192_efl_model_composite_boolean_children_efl_model_property_set(Eo *obj EINA_UNUSED, 192_efl_model_composite_boolean_children_efl_model_property_set(Eo *obj EINA_UNUSED,
193 Efl_Model_Composite_Boolean_Children_Data *pd, const char *property, const Eina_Value *value) 193 Efl_Model_Composite_Boolean_Children_Data *pd, const char *property, const Eina_Value *value)
194{ 194{
195 Efl_Promise *promise = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 195 Efl_Promise *promise = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
196 Efl_Future *rfuture = efl_promise_future_get(promise); 196 Efl_Future *rfuture = efl_promise_future_get(promise);
197 197
198 Efl_Model_Hash_Value *hv = eina_hash_find(pd->parent_pd->values, property); 198 Efl_Model_Hash_Value *hv = eina_hash_find(pd->parent_pd->values, property);
@@ -567,7 +567,7 @@ _efl_model_composite_boolean_efl_model_property_get(Eo *obj EINA_UNUSED,
567 if (pd->composite_model) 567 if (pd->composite_model)
568 return efl_model_property_get(pd->composite_model, property); 568 return efl_model_property_get(pd->composite_model, property);
569 569
570 Efl_Promise *promise = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 570 Efl_Promise *promise = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
571 Efl_Future *rfuture = efl_promise_future_get(promise); 571 Efl_Future *rfuture = efl_promise_future_get(promise);
572 572
573 efl_promise_failed_set(promise, EFL_MODEL_ERROR_NOT_FOUND); 573 efl_promise_failed_set(promise, EFL_MODEL_ERROR_NOT_FOUND);
@@ -579,7 +579,7 @@ _efl_model_composite_boolean_efl_model_property_set(Eo *obj EINA_UNUSED, Efl_Mod
579 const char *property, const Eina_Value *value) 579 const char *property, const Eina_Value *value)
580{ 580{
581 581
582 Efl_Promise *promise = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 582 Efl_Promise *promise = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
583 Efl_Future *rfuture = efl_promise_future_get(promise); 583 Efl_Future *rfuture = efl_promise_future_get(promise);
584 584
585 if (pd->composite_model) 585 if (pd->composite_model)
@@ -598,7 +598,7 @@ _efl_model_composite_boolean_efl_model_property_set(Eo *obj EINA_UNUSED, Efl_Mod
598static Efl_Future * 598static Efl_Future *
599_efl_model_composite_boolean_efl_model_children_slice_get(Eo *obj, Efl_Model_Composite_Boolean_Data *pd, unsigned int start, unsigned int count) 599_efl_model_composite_boolean_efl_model_children_slice_get(Eo *obj, Efl_Model_Composite_Boolean_Data *pd, unsigned int start, unsigned int count)
600{ 600{
601 Efl_Promise *promise = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 601 Efl_Promise *promise = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
602 Efl_Future *rfuture = efl_promise_future_get(promise); 602 Efl_Future *rfuture = efl_promise_future_get(promise);
603 603
604 if (pd->composite_model) 604 if (pd->composite_model)
@@ -632,7 +632,7 @@ _efl_model_composite_boolean_efl_model_children_count_get(Eo *obj EINA_UNUSED, E
632 return efl_model_children_count_get(pd->composite_model); 632 return efl_model_children_count_get(pd->composite_model);
633 else 633 else
634 { 634 {
635 Efl_Promise *promise = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 635 Efl_Promise *promise = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
636 Efl_Future *rfuture = efl_promise_future_get(promise); 636 Efl_Future *rfuture = efl_promise_future_get(promise);
637 637
638 unsigned int *count = malloc(sizeof(unsigned int)); 638 unsigned int *count = malloc(sizeof(unsigned int));
diff --git a/src/lib/ecore/efl_model_composite_selection.c b/src/lib/ecore/efl_model_composite_selection.c
index c2e80a162a..dbbe43fc45 100644
--- a/src/lib/ecore/efl_model_composite_selection.c
+++ b/src/lib/ecore/efl_model_composite_selection.c
@@ -176,7 +176,7 @@ _efl_model_composite_selection_children_efl_model_property_set(Eo *obj EINA_UNUS
176 } 176 }
177 else 177 else
178 { 178 {
179 Efl_Promise *promise = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 179 Efl_Promise *promise = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
180 Efl_Future *rfuture = efl_promise_future_get(promise); 180 Efl_Future *rfuture = efl_promise_future_get(promise);
181 Eina_Value* true_value = eina_value_new(EINA_VALUE_TYPE_UCHAR); 181 Eina_Value* true_value = eina_value_new(EINA_VALUE_TYPE_UCHAR);
182 eina_value_set(true_value, EINA_TRUE); 182 eina_value_set(true_value, EINA_TRUE);
diff --git a/src/lib/ecore/efl_model_container.c b/src/lib/ecore/efl_model_container.c
index 4c423d6e3a..71bb9f192b 100644
--- a/src/lib/ecore/efl_model_container.c
+++ b/src/lib/ecore/efl_model_container.c
@@ -236,7 +236,7 @@ _efl_model_container_efl_model_properties_get(Eo *obj EINA_UNUSED, Efl_Model_Con
236Efl_Future * 236Efl_Future *
237_efl_model_container_efl_model_property_set(Eo *obj EINA_UNUSED, Efl_Model_Container_Data *sd EINA_UNUSED, const char *property EINA_UNUSED, const Eina_Value *value EINA_UNUSED) 237_efl_model_container_efl_model_property_set(Eo *obj EINA_UNUSED, Efl_Model_Container_Data *sd EINA_UNUSED, const char *property EINA_UNUSED, const Eina_Value *value EINA_UNUSED)
238{ 238{
239 Efl_Promise *promise = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 239 Efl_Promise *promise = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
240 Efl_Future* future = efl_promise_future_get(promise); 240 Efl_Future* future = efl_promise_future_get(promise);
241 241
242 efl_promise_failed_set(promise, EFL_MODEL_ERROR_NOT_FOUND); 242 efl_promise_failed_set(promise, EFL_MODEL_ERROR_NOT_FOUND);
@@ -247,7 +247,7 @@ Efl_Future *
247_efl_model_container_efl_model_property_get(Eo *obj EINA_UNUSED, Efl_Model_Container_Data *sd EINA_UNUSED, const char *property EINA_UNUSED) 247_efl_model_container_efl_model_property_get(Eo *obj EINA_UNUSED, Efl_Model_Container_Data *sd EINA_UNUSED, const char *property EINA_UNUSED)
248{ 248{
249 249
250 Efl_Promise *promise = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 250 Efl_Promise *promise = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
251 Efl_Future* future = efl_promise_future_get(promise); 251 Efl_Future* future = efl_promise_future_get(promise);
252 252
253 efl_promise_failed_set(promise, EFL_MODEL_ERROR_NOT_FOUND); 253 efl_promise_failed_set(promise, EFL_MODEL_ERROR_NOT_FOUND);
@@ -257,7 +257,7 @@ _efl_model_container_efl_model_property_get(Eo *obj EINA_UNUSED, Efl_Model_Conta
257static Efl_Future * 257static Efl_Future *
258_efl_model_container_efl_model_children_slice_get(Eo *obj EINA_UNUSED, Efl_Model_Container_Data *sd, unsigned int start, unsigned int count) 258_efl_model_container_efl_model_children_slice_get(Eo *obj EINA_UNUSED, Efl_Model_Container_Data *sd, unsigned int start, unsigned int count)
259{ 259{
260 Efl_Promise *promise = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 260 Efl_Promise *promise = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
261 Efl_Future* future = efl_promise_future_get(promise); 261 Efl_Future* future = efl_promise_future_get(promise);
262 262
263 Eina_Accessor* accessor = efl_model_list_slice(sd->children, start, count); 263 Eina_Accessor* accessor = efl_model_list_slice(sd->children, start, count);
@@ -269,7 +269,7 @@ _efl_model_container_efl_model_children_slice_get(Eo *obj EINA_UNUSED, Efl_Model
269static Efl_Future * 269static Efl_Future *
270_efl_model_container_efl_model_children_count_get(Eo *obj EINA_UNUSED, Efl_Model_Container_Data *sd) 270_efl_model_container_efl_model_children_count_get(Eo *obj EINA_UNUSED, Efl_Model_Container_Data *sd)
271{ 271{
272 Efl_Promise *promise = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 272 Efl_Promise *promise = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
273 Efl_Future* future = efl_promise_future_get(promise); 273 Efl_Future* future = efl_promise_future_get(promise);
274 274
275 unsigned int *count = calloc(1, sizeof(unsigned int)); 275 unsigned int *count = calloc(1, sizeof(unsigned int));
diff --git a/src/lib/ecore/efl_model_container_item.c b/src/lib/ecore/efl_model_container_item.c
index 9604a34fd6..cb95c2f4db 100644
--- a/src/lib/ecore/efl_model_container_item.c
+++ b/src/lib/ecore/efl_model_container_item.c
@@ -44,7 +44,7 @@ _efl_model_container_item_efl_model_property_set(Eo *obj EINA_UNUSED, Efl_Model_
44 Eina_Stringshare *prop_name; 44 Eina_Stringshare *prop_name;
45 Child_Property_Data *cpd; 45 Child_Property_Data *cpd;
46 void *data, *new_data; 46 void *data, *new_data;
47 Efl_Promise *promise = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 47 Efl_Promise *promise = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
48 Efl_Future* future = efl_promise_future_get(promise); 48 Efl_Future* future = efl_promise_future_get(promise);
49 49
50 if (!sd->parent_data) 50 if (!sd->parent_data)
@@ -105,7 +105,7 @@ _efl_model_container_item_efl_model_property_get(Eo *obj EINA_UNUSED, Efl_Model_
105 Eina_Stringshare *prop_name; 105 Eina_Stringshare *prop_name;
106 Child_Property_Data *cpd; 106 Child_Property_Data *cpd;
107 Eina_Value *value; 107 Eina_Value *value;
108 Efl_Promise *promise = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 108 Efl_Promise *promise = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
109 Efl_Future* future = efl_promise_future_get(promise); 109 Efl_Future* future = efl_promise_future_get(promise);
110 110
111 if (!sd->parent_data) 111 if (!sd->parent_data)
@@ -152,7 +152,7 @@ _efl_model_container_item_efl_model_property_get(Eo *obj EINA_UNUSED, Efl_Model_
152EOLIAN static Efl_Future * 152EOLIAN static Efl_Future *
153_efl_model_container_item_efl_model_children_slice_get(Eo *obj EINA_UNUSED, Efl_Model_Container_Item_Data *sd EINA_UNUSED, unsigned int start EINA_UNUSED, unsigned int count EINA_UNUSED) 153_efl_model_container_item_efl_model_children_slice_get(Eo *obj EINA_UNUSED, Efl_Model_Container_Item_Data *sd EINA_UNUSED, unsigned int start EINA_UNUSED, unsigned int count EINA_UNUSED)
154{ 154{
155 Efl_Promise *promise = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 155 Efl_Promise *promise = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
156 Efl_Future* future = efl_promise_future_get(promise); 156 Efl_Future* future = efl_promise_future_get(promise);
157 157
158 efl_promise_value_set(promise, NULL, NULL); 158 efl_promise_value_set(promise, NULL, NULL);
@@ -163,7 +163,7 @@ _efl_model_container_item_efl_model_children_slice_get(Eo *obj EINA_UNUSED, Efl_
163EOLIAN static Efl_Future * 163EOLIAN static Efl_Future *
164_efl_model_container_item_efl_model_children_count_get(Eo *obj EINA_UNUSED, Efl_Model_Container_Item_Data *sd EINA_UNUSED) 164_efl_model_container_item_efl_model_children_count_get(Eo *obj EINA_UNUSED, Efl_Model_Container_Item_Data *sd EINA_UNUSED)
165{ 165{
166 Efl_Promise *promise = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 166 Efl_Promise *promise = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
167 Efl_Future* future = efl_promise_future_get(promise); 167 Efl_Future* future = efl_promise_future_get(promise);
168 168
169 unsigned int *count = calloc(1, sizeof(unsigned int)); 169 unsigned int *count = calloc(1, sizeof(unsigned int));
diff --git a/src/lib/ecore/efl_model_item.c b/src/lib/ecore/efl_model_item.c
index 4a71470792..571f3e4131 100644
--- a/src/lib/ecore/efl_model_item.c
+++ b/src/lib/ecore/efl_model_item.c
@@ -70,7 +70,7 @@ _efl_model_item_efl_model_properties_get(Eo *obj EINA_UNUSED, Efl_Model_Item_Dat
70static Efl_Future* 70static Efl_Future*
71_efl_model_item_efl_model_property_set(Eo *obj EINA_UNUSED, Efl_Model_Item_Data *sd, const char *property, const Eina_Value *value) 71_efl_model_item_efl_model_property_set(Eo *obj EINA_UNUSED, Efl_Model_Item_Data *sd, const char *property, const Eina_Value *value)
72{ 72{
73 Efl_Promise *promise = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 73 Efl_Promise *promise = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
74 Efl_Future* future = efl_promise_future_get(promise); 74 Efl_Future* future = efl_promise_future_get(promise);
75 Efl_Model_Property_Event evt; 75 Efl_Model_Property_Event evt;
76 76
@@ -119,7 +119,7 @@ err1:
119static Efl_Future * 119static Efl_Future *
120_efl_model_item_efl_model_property_get(Eo *obj EINA_UNUSED, Efl_Model_Item_Data *sd, const char *property) 120_efl_model_item_efl_model_property_get(Eo *obj EINA_UNUSED, Efl_Model_Item_Data *sd, const char *property)
121{ 121{
122 Efl_Promise *promise = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 122 Efl_Promise *promise = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
123 Efl_Future *rfuture = efl_promise_future_get(promise); 123 Efl_Future *rfuture = efl_promise_future_get(promise);
124 124
125 Eina_Stringshare *sshare = eina_stringshare_add(property); 125 Eina_Stringshare *sshare = eina_stringshare_add(property);
@@ -136,7 +136,7 @@ _efl_model_item_efl_model_property_get(Eo *obj EINA_UNUSED, Efl_Model_Item_Data
136static Efl_Future * 136static Efl_Future *
137_efl_model_item_efl_model_children_slice_get(Eo *obj EINA_UNUSED, Efl_Model_Item_Data *sd, unsigned int start, unsigned int count) 137_efl_model_item_efl_model_children_slice_get(Eo *obj EINA_UNUSED, Efl_Model_Item_Data *sd, unsigned int start, unsigned int count)
138{ 138{
139 Efl_Promise *promise = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 139 Efl_Promise *promise = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
140 Efl_Future *rfuture = efl_promise_future_get(promise); 140 Efl_Future *rfuture = efl_promise_future_get(promise);
141 141
142 Eina_Accessor* accessor = efl_model_list_slice(sd->children, start, count); 142 Eina_Accessor* accessor = efl_model_list_slice(sd->children, start, count);
@@ -148,7 +148,7 @@ _efl_model_item_efl_model_children_slice_get(Eo *obj EINA_UNUSED, Efl_Model_Item
148static Efl_Future * 148static Efl_Future *
149_efl_model_item_efl_model_children_count_get(Eo *obj EINA_UNUSED, Efl_Model_Item_Data *sd) 149_efl_model_item_efl_model_children_count_get(Eo *obj EINA_UNUSED, Efl_Model_Item_Data *sd)
150{ 150{
151 Efl_Promise *promise = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 151 Efl_Promise *promise = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
152 Efl_Future *rfuture = efl_promise_future_get(promise); 152 Efl_Future *rfuture = efl_promise_future_get(promise);
153 153
154 unsigned int *count = calloc(1, sizeof(unsigned int)); 154 unsigned int *count = calloc(1, sizeof(unsigned int));
diff --git a/src/lib/ecore_con/ecore_con_legacy.c b/src/lib/ecore_con/ecore_con_legacy.c
index c3412eef80..ea8c31f6cd 100644
--- a/src/lib/ecore_con/ecore_con_legacy.c
+++ b/src/lib/ecore_con/ecore_con_legacy.c
@@ -818,7 +818,7 @@ _ecore_con_client_ssl_upgrade_job(void *data, const Eina_Value v,
818 const Eina_Future *dead EINA_UNUSED) 818 const Eina_Future *dead EINA_UNUSED)
819{ 819{
820 Ecore_Con_Client *cl = data; 820 Ecore_Con_Client *cl = data;
821 Eo *loop = efl_app_main_loop_get(efl_app_get()); 821 Eo *loop = efl_main_loop_get();
822 Eo *inner_socket; 822 Eo *inner_socket;
823 Eo *socket; 823 Eo *socket;
824 Eo *tcp_socket; 824 Eo *tcp_socket;
@@ -1604,7 +1604,7 @@ _ecore_con_server_server_ssl_job(void *data, const Eina_Value v,
1604 const Eina_Future *dead EINA_UNUSED) 1604 const Eina_Future *dead EINA_UNUSED)
1605{ 1605{
1606 Ecore_Con_Server *svr = data; 1606 Ecore_Con_Server *svr = data;
1607 Eo *loop = efl_app_main_loop_get(efl_app_get()); 1607 Eo *loop = efl_main_loop_get();
1608 Eo *ssl_ctx; 1608 Eo *ssl_ctx;
1609 Eo *inner_server; 1609 Eo *inner_server;
1610 Eo *server; 1610 Eo *server;
@@ -1683,7 +1683,7 @@ ecore_con_server_add(Ecore_Con_Type compl_type,
1683 return NULL; 1683 return NULL;
1684 } 1684 }
1685 1685
1686 loop = efl_app_main_loop_get(efl_app_get()); 1686 loop = efl_main_loop_get();
1687 EINA_SAFETY_ON_NULL_RETURN_VAL(loop, NULL); 1687 EINA_SAFETY_ON_NULL_RETURN_VAL(loop, NULL);
1688 1688
1689 svr = _ecore_con_server_new(EINA_FALSE, compl_type, name, port, data); 1689 svr = _ecore_con_server_new(EINA_FALSE, compl_type, name, port, data);
@@ -1946,7 +1946,7 @@ _ecore_con_server_dialer_ssl_job(void *data, const Eina_Value v,
1946 const Eina_Future *dead EINA_UNUSED) 1946 const Eina_Future *dead EINA_UNUSED)
1947{ 1947{
1948 Ecore_Con_Server *svr = data; 1948 Ecore_Con_Server *svr = data;
1949 Eo *loop = efl_app_main_loop_get(efl_app_get()); 1949 Eo *loop = efl_main_loop_get();
1950 Eo *ssl_ctx; 1950 Eo *ssl_ctx;
1951 Eo *inner_dialer; 1951 Eo *inner_dialer;
1952 Eo *dialer; 1952 Eo *dialer;
@@ -2036,7 +2036,7 @@ _ecore_con_server_dialer_ssl_upgrade_job(void *data, const Eina_Value v,
2036 const Eina_Future *dead EINA_UNUSED) 2036 const Eina_Future *dead EINA_UNUSED)
2037{ 2037{
2038 Ecore_Con_Server *svr = data; 2038 Ecore_Con_Server *svr = data;
2039 Eo *loop = efl_app_main_loop_get(efl_app_get()); 2039 Eo *loop = efl_main_loop_get();
2040 Eo *ssl_ctx; 2040 Eo *ssl_ctx;
2041 Eo *inner_dialer; 2041 Eo *inner_dialer;
2042 Eo *dialer; 2042 Eo *dialer;
@@ -2140,7 +2140,7 @@ ecore_con_server_connect(Ecore_Con_Type compl_type,
2140 2140
2141 type = compl_type & ECORE_CON_TYPE; 2141 type = compl_type & ECORE_CON_TYPE;
2142 2142
2143 loop = efl_app_main_loop_get(efl_app_get()); 2143 loop = efl_main_loop_get();
2144 EINA_SAFETY_ON_NULL_RETURN_VAL(loop, NULL); 2144 EINA_SAFETY_ON_NULL_RETURN_VAL(loop, NULL);
2145 2145
2146 svr = _ecore_con_server_new(EINA_TRUE, compl_type, name, port, data); 2146 svr = _ecore_con_server_new(EINA_TRUE, compl_type, name, port, data);
diff --git a/src/lib/ecore_con/ecore_con_url.c b/src/lib/ecore_con/ecore_con_url.c
index 43d13ff62e..e8ca8c4cdf 100644
--- a/src/lib/ecore_con/ecore_con_url.c
+++ b/src/lib/ecore_con/ecore_con_url.c
@@ -704,7 +704,7 @@ _ecore_con_url_request_prepare(Ecore_Con_Url *url_con, const char *method)
704 if (proxy_url) 704 if (proxy_url)
705 DBG("proxy_url='%s'", proxy_url); 705 DBG("proxy_url='%s'", proxy_url);
706 706
707 url_con->dialer = efl_add(EFL_NET_DIALER_HTTP_CLASS, efl_app_main_loop_get(efl_app_get()), 707 url_con->dialer = efl_add(EFL_NET_DIALER_HTTP_CLASS, efl_main_loop_get(),
708 efl_net_dialer_http_method_set(efl_added, url_con->custom_request ? url_con->custom_request : method), 708 efl_net_dialer_http_method_set(efl_added, url_con->custom_request ? url_con->custom_request : method),
709 efl_net_dialer_http_primary_mode_set(efl_added, (strcmp(method, "PUT") == 0) ? EFL_NET_DIALER_HTTP_PRIMARY_MODE_UPLOAD : EFL_NET_DIALER_HTTP_PRIMARY_MODE_DOWNLOAD), 709 efl_net_dialer_http_primary_mode_set(efl_added, (strcmp(method, "PUT") == 0) ? EFL_NET_DIALER_HTTP_PRIMARY_MODE_UPLOAD : EFL_NET_DIALER_HTTP_PRIMARY_MODE_DOWNLOAD),
710 efl_net_dialer_proxy_set(efl_added, proxy_url), 710 efl_net_dialer_proxy_set(efl_added, proxy_url),
diff --git a/src/lib/ecore_con/efl_net_ip_address.c b/src/lib/ecore_con/efl_net_ip_address.c
index 9b5cec2bdb..13e14a052d 100644
--- a/src/lib/ecore_con/efl_net_ip_address.c
+++ b/src/lib/ecore_con/efl_net_ip_address.c
@@ -547,7 +547,7 @@ _efl_net_ip_address_resolve(Eo *cls EINA_UNUSED, void *pd EINA_UNUSED, const cha
547 ctx->thread = efl_net_ip_resolve_async_new(host, port, &hints, _efl_net_ip_address_resolve_done, ctx); 547 ctx->thread = efl_net_ip_resolve_async_new(host, port, &hints, _efl_net_ip_address_resolve_done, ctx);
548 EINA_SAFETY_ON_NULL_GOTO(ctx->thread, error_thread); 548 EINA_SAFETY_ON_NULL_GOTO(ctx->thread, error_thread);
549 549
550 ctx->promise = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get()), 550 ctx->promise = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get(),
551 efl_event_callback_add(efl_added, EFL_EVENT_DEL, _efl_net_ip_address_resolve_del, ctx)); 551 efl_event_callback_add(efl_added, EFL_EVENT_DEL, _efl_net_ip_address_resolve_del, ctx));
552 EINA_SAFETY_ON_NULL_GOTO(ctx->promise, error_promise); 552 EINA_SAFETY_ON_NULL_GOTO(ctx->promise, error_promise);
553 553
diff --git a/src/lib/ecore_file/ecore_file_download.c b/src/lib/ecore_file/ecore_file_download.c
index fdbb405715..1323dbc8e6 100644
--- a/src/lib/ecore_file/ecore_file_download.c
+++ b/src/lib/ecore_file/ecore_file_download.c
@@ -215,7 +215,7 @@ ecore_file_download_full(const char *url,
215 return EINA_FALSE; 215 return EINA_FALSE;
216 } 216 }
217 217
218 loop = efl_app_main_loop_get(efl_app_get()); 218 loop = efl_main_loop_get();
219 EINA_SAFETY_ON_NULL_RETURN_VAL(loop, EINA_FALSE); 219 EINA_SAFETY_ON_NULL_RETURN_VAL(loop, EINA_FALSE);
220 220
221 job = calloc(1, sizeof(Ecore_File_Download_Job)); 221 job = calloc(1, sizeof(Ecore_File_Download_Job));
diff --git a/src/lib/ecore_ipc/ecore_ipc.c b/src/lib/ecore_ipc/ecore_ipc.c
index 84e1f54eda..c0fcd8be63 100644
--- a/src/lib/ecore_ipc/ecore_ipc.c
+++ b/src/lib/ecore_ipc/ecore_ipc.c
@@ -382,7 +382,7 @@ EAPI Ecore_Ipc_Server *
382ecore_ipc_server_add(Ecore_Ipc_Type type, const char *name, int port, const void *data) 382ecore_ipc_server_add(Ecore_Ipc_Type type, const char *name, int port, const void *data)
383{ 383{
384 Ecore_Ipc_Server *svr; 384 Ecore_Ipc_Server *svr;
385 Eo *loop = efl_app_main_loop_get(efl_app_get()); 385 Eo *loop = efl_main_loop_get();
386 char *address = NULL; 386 char *address = NULL;
387 Eina_Error err; 387 Eina_Error err;
388#ifdef EFL_NET_SERVER_UNIX_CLASS 388#ifdef EFL_NET_SERVER_UNIX_CLASS
@@ -404,7 +404,7 @@ ecore_ipc_server_add(Ecore_Ipc_Type type, const char *name, int port, const void
404 404
405 new_mask = S_IRGRP | S_IWGRP | S_IXGRP | S_IROTH | S_IWOTH | S_IXOTH; 405 new_mask = S_IRGRP | S_IWGRP | S_IXGRP | S_IROTH | S_IWOTH | S_IXOTH;
406 406
407 svr->server = efl_add(EFL_NET_SERVER_UNIX_CLASS, efl_app_main_loop_get(efl_app_get()), 407 svr->server = efl_add(EFL_NET_SERVER_UNIX_CLASS, efl_main_loop_get(),
408 efl_net_server_unix_leading_directories_create_set(efl_added, EINA_TRUE, S_IRUSR | S_IWUSR | S_IXUSR)); 408 efl_net_server_unix_leading_directories_create_set(efl_added, EINA_TRUE, S_IRUSR | S_IWUSR | S_IXUSR));
409 EINA_SAFETY_ON_NULL_GOTO(svr->server, error_server); 409 EINA_SAFETY_ON_NULL_GOTO(svr->server, error_server);
410 } 410 }
@@ -418,7 +418,7 @@ ecore_ipc_server_add(Ecore_Ipc_Type type, const char *name, int port, const void
418 new_mask = 0; 418 new_mask = 0;
419 local_system = EINA_TRUE; 419 local_system = EINA_TRUE;
420 420
421 svr->server = efl_add(EFL_NET_SERVER_UNIX_CLASS, efl_app_main_loop_get(efl_app_get())); 421 svr->server = efl_add(EFL_NET_SERVER_UNIX_CLASS, efl_main_loop_get());
422 EINA_SAFETY_ON_NULL_GOTO(svr->server, error_server); 422 EINA_SAFETY_ON_NULL_GOTO(svr->server, error_server);
423 } 423 }
424#endif /* EFL_NET_SERVER_UNIX_CLASS */ 424#endif /* EFL_NET_SERVER_UNIX_CLASS */
@@ -431,7 +431,7 @@ ecore_ipc_server_add(Ecore_Ipc_Type type, const char *name, int port, const void
431 // TODO: specify SECURITY_ATTRIBUTES to use or some 431 // TODO: specify SECURITY_ATTRIBUTES to use or some
432 // Efl_Net_Server_Windows API to limit access 432 // Efl_Net_Server_Windows API to limit access
433 433
434 svr->server = efl_add(EFL_NET_SERVER_WINDOWS_CLASS, efl_app_main_loop_get(efl_app_get())); 434 svr->server = efl_add(EFL_NET_SERVER_WINDOWS_CLASS, efl_main_loop_get());
435 EINA_SAFETY_ON_NULL_GOTO(svr->server, error_server); 435 EINA_SAFETY_ON_NULL_GOTO(svr->server, error_server);
436 } 436 }
437 else if ((type & ECORE_IPC_TYPE) == ECORE_IPC_LOCAL_SYSTEM) 437 else if ((type & ECORE_IPC_TYPE) == ECORE_IPC_LOCAL_SYSTEM)
@@ -442,7 +442,7 @@ ecore_ipc_server_add(Ecore_Ipc_Type type, const char *name, int port, const void
442 // TODO: specify SECURITY_ATTRIBUTES to use or some 442 // TODO: specify SECURITY_ATTRIBUTES to use or some
443 // Efl_Net_Server_Windows API to limit access 443 // Efl_Net_Server_Windows API to limit access
444 444
445 svr->server = efl_add(EFL_NET_SERVER_WINDOWS_CLASS, efl_app_main_loop_get(efl_app_get())); 445 svr->server = efl_add(EFL_NET_SERVER_WINDOWS_CLASS, efl_main_loop_get());
446 EINA_SAFETY_ON_NULL_GOTO(svr->server, error_server); 446 EINA_SAFETY_ON_NULL_GOTO(svr->server, error_server);
447 } 447 }
448#endif /* EFL_NET_SERVER_WINDOWS_CLASS */ 448#endif /* EFL_NET_SERVER_WINDOWS_CLASS */
@@ -653,7 +653,7 @@ EAPI Ecore_Ipc_Server *
653ecore_ipc_server_connect(Ecore_Ipc_Type type, char *name, int port, const void *data) 653ecore_ipc_server_connect(Ecore_Ipc_Type type, char *name, int port, const void *data)
654{ 654{
655 Ecore_Ipc_Server *svr; 655 Ecore_Ipc_Server *svr;
656 Eo *loop = efl_app_main_loop_get(efl_app_get()); 656 Eo *loop = efl_main_loop_get();
657 char *address = NULL; 657 char *address = NULL;
658 Eina_Error err; 658 Eina_Error err;
659 659
@@ -681,7 +681,7 @@ ecore_ipc_server_connect(Ecore_Ipc_Type type, char *name, int port, const void *
681 goto error_dialer; 681 goto error_dialer;
682 } 682 }
683 683
684 svr->dialer.dialer = efl_add(EFL_NET_DIALER_UNIX_CLASS, efl_app_main_loop_get(efl_app_get())); 684 svr->dialer.dialer = efl_add(EFL_NET_DIALER_UNIX_CLASS, efl_main_loop_get());
685 EINA_SAFETY_ON_NULL_GOTO(svr->dialer.dialer, error_dialer); 685 EINA_SAFETY_ON_NULL_GOTO(svr->dialer.dialer, error_dialer);
686 } 686 }
687 else if ((type & ECORE_IPC_TYPE) == ECORE_IPC_LOCAL_SYSTEM) 687 else if ((type & ECORE_IPC_TYPE) == ECORE_IPC_LOCAL_SYSTEM)
@@ -689,7 +689,7 @@ ecore_ipc_server_connect(Ecore_Ipc_Type type, char *name, int port, const void *
689 address = ecore_con_local_path_new(EINA_TRUE, name, port); 689 address = ecore_con_local_path_new(EINA_TRUE, name, port);
690 EINA_SAFETY_ON_NULL_GOTO(address, error_dialer); 690 EINA_SAFETY_ON_NULL_GOTO(address, error_dialer);
691 691
692 svr->dialer.dialer = efl_add(EFL_NET_DIALER_UNIX_CLASS, efl_app_main_loop_get(efl_app_get())); 692 svr->dialer.dialer = efl_add(EFL_NET_DIALER_UNIX_CLASS, efl_main_loop_get());
693 EINA_SAFETY_ON_NULL_GOTO(svr->dialer.dialer, error_dialer); 693 EINA_SAFETY_ON_NULL_GOTO(svr->dialer.dialer, error_dialer);
694 } 694 }
695#endif /* EFL_NET_DIALER_UNIX_CLASS */ 695#endif /* EFL_NET_DIALER_UNIX_CLASS */
@@ -699,7 +699,7 @@ ecore_ipc_server_connect(Ecore_Ipc_Type type, char *name, int port, const void *
699 address = ecore_con_local_path_new(EINA_FALSE, name, port); 699 address = ecore_con_local_path_new(EINA_FALSE, name, port);
700 EINA_SAFETY_ON_NULL_GOTO(address, error_dialer); 700 EINA_SAFETY_ON_NULL_GOTO(address, error_dialer);
701 701
702 svr->dialer.dialer = efl_add(EFL_NET_DIALER_WINDOWS_CLASS, efl_app_main_loop_get(efl_app_get())); 702 svr->dialer.dialer = efl_add(EFL_NET_DIALER_WINDOWS_CLASS, efl_main_loop_get());
703 EINA_SAFETY_ON_NULL_GOTO(svr->dialer.dialer, error_dialer); 703 EINA_SAFETY_ON_NULL_GOTO(svr->dialer.dialer, error_dialer);
704 } 704 }
705 else if ((type & ECORE_IPC_TYPE) == ECORE_IPC_LOCAL_SYSTEM) 705 else if ((type & ECORE_IPC_TYPE) == ECORE_IPC_LOCAL_SYSTEM)
@@ -707,7 +707,7 @@ ecore_ipc_server_connect(Ecore_Ipc_Type type, char *name, int port, const void *
707 address = ecore_con_local_path_new(EINA_TRUE, name, port); 707 address = ecore_con_local_path_new(EINA_TRUE, name, port);
708 EINA_SAFETY_ON_NULL_GOTO(address, error_dialer); 708 EINA_SAFETY_ON_NULL_GOTO(address, error_dialer);
709 709
710 svr->dialer.dialer = efl_add(EFL_NET_DIALER_WINDOWS_CLASS, efl_app_main_loop_get(efl_app_get())); 710 svr->dialer.dialer = efl_add(EFL_NET_DIALER_WINDOWS_CLASS, efl_main_loop_get());
711 EINA_SAFETY_ON_NULL_GOTO(svr->dialer.dialer, error_dialer); 711 EINA_SAFETY_ON_NULL_GOTO(svr->dialer.dialer, error_dialer);
712 } 712 }
713#endif /* EFL_NET_DIALER_WINDOWS_CLASS */ 713#endif /* EFL_NET_DIALER_WINDOWS_CLASS */
diff --git a/src/lib/edje/edje_main.c b/src/lib/edje/edje_main.c
index d308df68a1..551b4f2e6e 100644
--- a/src/lib/edje/edje_main.c
+++ b/src/lib/edje/edje_main.c
@@ -85,9 +85,9 @@ edje_init(void)
85 _edje_scale = FROM_DOUBLE(1.0); 85 _edje_scale = FROM_DOUBLE(1.0);
86 _edje_global_obj = efl_add(EDJE_GLOBAL_CLASS, NULL); 86 _edje_global_obj = efl_add(EDJE_GLOBAL_CLASS, NULL);
87 if (!_edje_global_obj || 87 if (!_edje_global_obj ||
88 !efl_loop_register(efl_app_main_loop_get(efl_app_get()), EFL_GFX_COLOR_CLASS_INTERFACE, _edje_global_obj) || 88 !efl_loop_register(efl_main_loop_get(), EFL_GFX_COLOR_CLASS_INTERFACE, _edje_global_obj) ||
89 !efl_loop_register(efl_app_main_loop_get(efl_app_get()), EFL_GFX_TEXT_CLASS_INTERFACE, _edje_global_obj) || 89 !efl_loop_register(efl_main_loop_get(), EFL_GFX_TEXT_CLASS_INTERFACE, _edje_global_obj) ||
90 !efl_loop_register(efl_app_main_loop_get(efl_app_get()), EFL_GFX_SIZE_CLASS_INTERFACE, _edje_global_obj)) 90 !efl_loop_register(efl_main_loop_get(), EFL_GFX_SIZE_CLASS_INTERFACE, _edje_global_obj))
91 goto shutdown_efreet; 91 goto shutdown_efreet;
92 92
93 _edje_edd_init(); 93 _edje_edd_init();
@@ -150,9 +150,9 @@ shutdown_all:
150 _edje_edd_shutdown(); 150 _edje_edd_shutdown();
151 if (_edje_global_obj) 151 if (_edje_global_obj)
152 { 152 {
153 efl_loop_unregister(efl_app_main_loop_get(efl_app_get()), EFL_GFX_COLOR_CLASS_INTERFACE, _edje_global_obj); 153 efl_loop_unregister(efl_main_loop_get(), EFL_GFX_COLOR_CLASS_INTERFACE, _edje_global_obj);
154 efl_loop_unregister(efl_app_main_loop_get(efl_app_get()), EFL_GFX_TEXT_CLASS_INTERFACE, _edje_global_obj); 154 efl_loop_unregister(efl_main_loop_get(), EFL_GFX_TEXT_CLASS_INTERFACE, _edje_global_obj);
155 efl_loop_unregister(efl_app_main_loop_get(efl_app_get()), EFL_GFX_SIZE_CLASS_INTERFACE, _edje_global_obj); 155 efl_loop_unregister(efl_main_loop_get(), EFL_GFX_SIZE_CLASS_INTERFACE, _edje_global_obj);
156 efl_del(_edje_global_obj); 156 efl_del(_edje_global_obj);
157 _edje_global_obj = NULL; 157 _edje_global_obj = NULL;
158 } 158 }
@@ -209,9 +209,9 @@ _edje_shutdown_core(void)
209 _edje_text_class_hash_free(); 209 _edje_text_class_hash_free();
210 _edje_size_class_hash_free(); 210 _edje_size_class_hash_free();
211 _edje_edd_shutdown(); 211 _edje_edd_shutdown();
212 efl_loop_unregister(efl_app_main_loop_get(efl_app_get()), EFL_GFX_COLOR_CLASS_INTERFACE, _edje_global_obj); 212 efl_loop_unregister(efl_main_loop_get(), EFL_GFX_COLOR_CLASS_INTERFACE, _edje_global_obj);
213 efl_loop_unregister(efl_app_main_loop_get(efl_app_get()), EFL_GFX_TEXT_CLASS_INTERFACE, _edje_global_obj); 213 efl_loop_unregister(efl_main_loop_get(), EFL_GFX_TEXT_CLASS_INTERFACE, _edje_global_obj);
214 efl_loop_unregister(efl_app_main_loop_get(efl_app_get()), EFL_GFX_SIZE_CLASS_INTERFACE, _edje_global_obj); 214 efl_loop_unregister(efl_main_loop_get(), EFL_GFX_SIZE_CLASS_INTERFACE, _edje_global_obj);
215 efl_del(_edje_global_obj); 215 efl_del(_edje_global_obj);
216 _edje_global_obj = NULL; 216 _edje_global_obj = NULL;
217 217
diff --git a/src/lib/edje/edje_private.h b/src/lib/edje/edje_private.h
index 02cbceaeab..0261581f04 100644
--- a/src/lib/edje/edje_private.h
+++ b/src/lib/edje/edje_private.h
@@ -2415,7 +2415,7 @@ static inline Edje_Global *
2415_edje_global(void) 2415_edje_global(void)
2416{ 2416{
2417#ifndef NDEBUG 2417#ifndef NDEBUG
2418 return efl_provider_find(efl_app_main_loop_get(efl_app_get()), EFL_GFX_COLOR_CLASS_INTERFACE); 2418 return efl_provider_find(efl_main_loop_get(), EFL_GFX_COLOR_CLASS_INTERFACE);
2419#else 2419#else
2420 extern Edje_Global *_edje_global_obj; 2420 extern Edje_Global *_edje_global_obj;
2421 return _edje_global_obj; 2421 return _edje_global_obj;
diff --git a/src/lib/eio/eio_main.c b/src/lib/eio/eio_main.c
index 60d6796c87..44c4e9dfc0 100644
--- a/src/lib/eio/eio_main.c
+++ b/src/lib/eio/eio_main.c
@@ -319,8 +319,8 @@ eio_init(void)
319 319
320 efreet_mime_init(); 320 efreet_mime_init();
321 321
322 io_manager = efl_add(EFL_IO_MANAGER_CLASS, efl_app_main_loop_get(efl_app_get())); 322 io_manager = efl_add(EFL_IO_MANAGER_CLASS, efl_main_loop_get());
323 efl_loop_register(efl_app_main_loop_get(efl_app_get()), EFL_IO_MANAGER_CLASS, io_manager); 323 efl_loop_register(efl_main_loop_get(), EFL_IO_MANAGER_CLASS, io_manager);
324 324
325 eina_log_timing(_eio_log_dom_global, 325 eina_log_timing(_eio_log_dom_global,
326 EINA_LOG_STATE_STOP, 326 EINA_LOG_STATE_STOP,
@@ -358,7 +358,7 @@ eio_shutdown(void)
358 EINA_LOG_STATE_START, 358 EINA_LOG_STATE_START,
359 EINA_LOG_STATE_SHUTDOWN); 359 EINA_LOG_STATE_SHUTDOWN);
360 360
361 efl_loop_unregister(efl_app_main_loop_get(efl_app_get()), EFL_IO_MANAGER_CLASS, io_manager); 361 efl_loop_unregister(efl_main_loop_get(), EFL_IO_MANAGER_CLASS, io_manager);
362 efl_del(io_manager); 362 efl_del(io_manager);
363 io_manager = NULL; 363 io_manager = NULL;
364 364
diff --git a/src/lib/eio/eio_model.c b/src/lib/eio/eio_model.c
index cb1d388e75..ec2672d7f1 100644
--- a/src/lib/eio/eio_model.c
+++ b/src/lib/eio/eio_model.c
@@ -824,7 +824,7 @@ _eio_model_efl_object_provider_find(const Eo *obj, Eio_Model_Data *priv EINA_UNU
824 824
825 // Provide main loop even if we don't have a loop user parent 825 // Provide main loop even if we don't have a loop user parent
826 if (!provider && (klass == EFL_LOOP_CLASS) && eina_main_loop_is()) 826 if (!provider && (klass == EFL_LOOP_CLASS) && eina_main_loop_is())
827 return efl_app_main_loop_get(efl_app_get()); 827 return efl_main_loop_get();
828 828
829 return provider; 829 return provider;
830} 830}
diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c
index 8196635b1b..f9f9723d8e 100644
--- a/src/lib/elementary/efl_ui_win.c
+++ b/src/lib/elementary/efl_ui_win.c
@@ -5431,7 +5431,7 @@ _elm_win_finalize_internal(Eo *obj, Efl_Ui_Win_Data *sd, const char *name, Efl_U
5431 efl_access_window_created_signal_emit(obj); 5431 efl_access_window_created_signal_emit(obj);
5432 5432
5433 // attach config API 5433 // attach config API
5434 efl_composite_attach(obj, efl_provider_find(efl_app_main_loop_get(efl_app_get()), EFL_CONFIG_GLOBAL_CLASS)); 5434 efl_composite_attach(obj, efl_provider_find(efl_main_loop_get(), EFL_CONFIG_GLOBAL_CLASS));
5435 5435
5436 efl_event_callback_array_add(sd->evas, _elm_evas_tracking(), sd); 5436 efl_event_callback_array_add(sd->evas, _elm_evas_tracking(), sd);
5437 efl_event_callback_array_add(obj, _elm_win_evas_feed_fake_callbacks(), sd->evas); 5437 efl_event_callback_array_add(obj, _elm_win_evas_feed_fake_callbacks(), sd->evas);
diff --git a/src/lib/elementary/elm_config.c b/src/lib/elementary/elm_config.c
index 5763011f36..ae760472ab 100644
--- a/src/lib/elementary/elm_config.c
+++ b/src/lib/elementary/elm_config.c
@@ -1666,8 +1666,8 @@ static void
1666_config_load(void) 1666_config_load(void)
1667{ 1667{
1668 _efl_config_obj = efl_add(EFL_CONFIG_GLOBAL_CLASS, NULL); 1668 _efl_config_obj = efl_add(EFL_CONFIG_GLOBAL_CLASS, NULL);
1669 efl_loop_register(efl_app_main_loop_get(efl_app_get()), EFL_CONFIG_INTERFACE, _efl_config_obj); 1669 efl_loop_register(efl_main_loop_get(), EFL_CONFIG_INTERFACE, _efl_config_obj);
1670 efl_loop_register(efl_app_main_loop_get(efl_app_get()), EFL_CONFIG_GLOBAL_CLASS, _efl_config_obj); 1670 efl_loop_register(efl_main_loop_get(), EFL_CONFIG_GLOBAL_CLASS, _efl_config_obj);
1671 efl_del_intercept_set(_efl_config_obj, _efl_config_obj_del); 1671 efl_del_intercept_set(_efl_config_obj, _efl_config_obj_del);
1672 _elm_config = _config_user_load(); 1672 _elm_config = _config_user_load();
1673 if (_elm_config) 1673 if (_elm_config)
@@ -4620,8 +4620,8 @@ void
4620_elm_config_shutdown(void) 4620_elm_config_shutdown(void)
4621{ 4621{
4622 efl_del_intercept_set(_efl_config_obj, NULL); 4622 efl_del_intercept_set(_efl_config_obj, NULL);
4623 efl_loop_unregister(efl_app_main_loop_get(efl_app_get()), EFL_CONFIG_INTERFACE, _efl_config_obj); 4623 efl_loop_unregister(efl_main_loop_get(), EFL_CONFIG_INTERFACE, _efl_config_obj);
4624 efl_loop_unregister(efl_app_main_loop_get(efl_app_get()), EFL_CONFIG_GLOBAL_CLASS, _efl_config_obj); 4624 efl_loop_unregister(efl_main_loop_get(), EFL_CONFIG_GLOBAL_CLASS, _efl_config_obj);
4625 ELM_SAFE_FREE(_efl_config_obj, efl_del); 4625 ELM_SAFE_FREE(_efl_config_obj, efl_del);
4626 ELM_SAFE_FREE(_elm_config, _config_free); 4626 ELM_SAFE_FREE(_elm_config, _config_free);
4627 ELM_SAFE_FREE(_elm_preferred_engine, eina_stringshare_del); 4627 ELM_SAFE_FREE(_elm_preferred_engine, eina_stringshare_del);
diff --git a/src/lib/elementary/elm_glview.c b/src/lib/elementary/elm_glview.c
index 7dabd3aafd..8f48ba4f38 100644
--- a/src/lib/elementary/elm_glview.c
+++ b/src/lib/elementary/elm_glview.c
@@ -165,7 +165,7 @@ _render_cb(void *obj, const Efl_Event *event EINA_UNUSED)
165 return; 165 return;
166 166
167 on_error: 167 on_error:
168 efl_event_callback_del(efl_app_main_loop_get(efl_app_get()), 168 efl_event_callback_del(efl_main_loop_get(),
169 EFL_LOOP_EVENT_IDLE_ENTER, 169 EFL_LOOP_EVENT_IDLE_ENTER,
170 _render_cb, 170 _render_cb,
171 obj); 171 obj);
@@ -187,7 +187,7 @@ _set_render_policy_callback(Evas_Object *obj)
187 evas_object_image_data_update_add(wd->resize_obj, 0, 0, sd->w, sd->h); 187 evas_object_image_data_update_add(wd->resize_obj, 0, 0, sd->w, sd->h);
188 } 188 }
189 // Delete idle_enterer if it for some reason is around 189 // Delete idle_enterer if it for some reason is around
190 efl_event_callback_del(efl_app_main_loop_get(efl_app_get()), 190 efl_event_callback_del(efl_main_loop_get(),
191 EFL_LOOP_EVENT_IDLE_ENTER, 191 EFL_LOOP_EVENT_IDLE_ENTER,
192 _render_cb, 192 _render_cb,
193 obj); 193 obj);
@@ -202,7 +202,7 @@ _set_render_policy_callback(Evas_Object *obj)
202 202
203 case ELM_GLVIEW_RENDER_POLICY_ALWAYS: 203 case ELM_GLVIEW_RENDER_POLICY_ALWAYS:
204 if (evas_object_image_pixels_dirty_get(wd->resize_obj) && !sd->render_idle_enterer) 204 if (evas_object_image_pixels_dirty_get(wd->resize_obj) && !sd->render_idle_enterer)
205 sd->render_idle_enterer = efl_event_callback_priority_add(efl_app_main_loop_get(efl_app_get()), 205 sd->render_idle_enterer = efl_event_callback_priority_add(efl_main_loop_get(),
206 EFL_LOOP_EVENT_IDLE_ENTER, 206 EFL_LOOP_EVENT_IDLE_ENTER,
207 EFL_CALLBACK_PRIORITY_BEFORE, 207 EFL_CALLBACK_PRIORITY_BEFORE,
208 _render_cb, 208 _render_cb,
@@ -297,7 +297,7 @@ _elm_glview_efl_canvas_group_group_del(Eo *obj, Elm_Glview_Data *sd)
297 //TODO:will be optimised 297 //TODO:will be optimised
298 efl_event_callback_legacy_call(obj, ELM_GLVIEW_EVENT_DESTROYED, NULL); 298 efl_event_callback_legacy_call(obj, ELM_GLVIEW_EVENT_DESTROYED, NULL);
299 299
300 efl_event_callback_del(efl_app_main_loop_get(efl_app_get()), 300 efl_event_callback_del(efl_main_loop_get(),
301 EFL_LOOP_EVENT_IDLE_ENTER, 301 EFL_LOOP_EVENT_IDLE_ENTER,
302 _render_cb, 302 _render_cb,
303 obj); 303 obj);
@@ -529,7 +529,7 @@ _elm_glview_draw_request(Eo *obj, Elm_Glview_Data *sd)
529 evas_object_image_data_update_add(wd->resize_obj, 0, 0, sd->w, sd->h); 529 evas_object_image_data_update_add(wd->resize_obj, 0, 0, sd->w, sd->h);
530 if (sd->render_policy == ELM_GLVIEW_RENDER_POLICY_ALWAYS && 530 if (sd->render_policy == ELM_GLVIEW_RENDER_POLICY_ALWAYS &&
531 !sd->render_idle_enterer) 531 !sd->render_idle_enterer)
532 sd->render_idle_enterer = efl_event_callback_priority_add(efl_app_main_loop_get(efl_app_get()), 532 sd->render_idle_enterer = efl_event_callback_priority_add(efl_main_loop_get(),
533 EFL_LOOP_EVENT_IDLE_ENTER, 533 EFL_LOOP_EVENT_IDLE_ENTER,
534 EFL_CALLBACK_PRIORITY_BEFORE, 534 EFL_CALLBACK_PRIORITY_BEFORE,
535 _render_cb, obj); 535 _render_cb, obj);
diff --git a/src/lib/elementary/elm_main.c b/src/lib/elementary/elm_main.c
index 8d2a4aaf16..646b2ee474 100644
--- a/src/lib/elementary/elm_main.c
+++ b/src/lib/elementary/elm_main.c
@@ -1148,16 +1148,16 @@ elm_quicklaunch_fork(int argc,
1148 { 1148 {
1149 if (qre_pause && qre_resume && qre_terminate) 1149 if (qre_pause && qre_resume && qre_terminate)
1150 { 1150 {
1151 efl_event_callback_array_add(efl_app_main_loop_get(efl_app_get()), _qre_main_ex(), NULL); 1151 efl_event_callback_array_add(efl_main_loop_get(), _qre_main_ex(), NULL);
1152 } 1152 }
1153 else 1153 else
1154 { 1154 {
1155 efl_event_callback_add(efl_app_main_loop_get(efl_app_get()), EFL_LOOP_EVENT_ARGUMENTS, qre_main, NULL); 1155 efl_event_callback_add(efl_main_loop_get(), EFL_LOOP_EVENT_ARGUMENTS, qre_main, NULL);
1156 } 1156 }
1157 1157
1158 ecore_init_ex(argc, argv); 1158 ecore_init_ex(argc, argv);
1159 1159
1160 ret = efl_loop_exit_code_process(efl_loop_begin(efl_app_main_loop_get(efl_app_get()))); 1160 ret = efl_loop_exit_code_process(efl_loop_begin(efl_main_loop_get()));
1161 1161
1162 ecore_shutdown_ex(); 1162 ecore_shutdown_ex();
1163 1163
@@ -1304,12 +1304,12 @@ elm_policy_set(unsigned int policy,
1304 { 1304 {
1305 if (value == ELM_POLICY_EXIT_WINDOWS_DEL) 1305 if (value == ELM_POLICY_EXIT_WINDOWS_DEL)
1306 { 1306 {
1307 efl_event_callback_add(efl_app_main_loop_get(efl_app_get()), EFL_LOOP_EVENT_TERMINATE, 1307 efl_event_callback_add(efl_main_loop_get(), EFL_LOOP_EVENT_TERMINATE,
1308 _on_terminate, NULL); 1308 _on_terminate, NULL);
1309 } 1309 }
1310 else 1310 else
1311 { 1311 {
1312 efl_event_callback_del(efl_app_main_loop_get(efl_app_get()), EFL_LOOP_EVENT_TERMINATE, 1312 efl_event_callback_del(efl_main_loop_get(), EFL_LOOP_EVENT_TERMINATE,
1313 _on_terminate, NULL); 1313 _on_terminate, NULL);
1314 } 1314 }
1315 } 1315 }
diff --git a/src/lib/evas/canvas/evas_main.c b/src/lib/evas/canvas/evas_main.c
index ee7d0cf626..45fae21bce 100644
--- a/src/lib/evas/canvas/evas_main.c
+++ b/src/lib/evas/canvas/evas_main.c
@@ -842,7 +842,7 @@ _evas_canvas_efl_object_provider_find(const Eo *eo_e,
842 if (klass == EVAS_CANVAS_CLASS) 842 if (klass == EVAS_CANVAS_CLASS)
843 return (Eo *)eo_e; 843 return (Eo *)eo_e;
844 else if (klass == EFL_LOOP_CLASS) 844 else if (klass == EFL_LOOP_CLASS)
845 return efl_app_main_loop_get(efl_app_get()); 845 return efl_main_loop_get();
846 else if (klass == EFL_CANVAS_GESTURE_MANAGER_CLASS) 846 else if (klass == EFL_CANVAS_GESTURE_MANAGER_CLASS)
847 return e->gesture_manager; 847 return e->gesture_manager;
848 return efl_provider_find(efl_super(eo_e, MY_CLASS), klass); 848 return efl_provider_find(efl_super(eo_e, MY_CLASS), klass);
@@ -851,7 +851,7 @@ _evas_canvas_efl_object_provider_find(const Eo *eo_e,
851EOLIAN static Efl_Loop * 851EOLIAN static Efl_Loop *
852_evas_canvas_efl_loop_consumer_loop_get(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e EINA_UNUSED) 852_evas_canvas_efl_loop_consumer_loop_get(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e EINA_UNUSED)
853{ 853{
854 return efl_app_main_loop_get(efl_app_get()); 854 return efl_main_loop_get();
855} 855}
856 856
857Ector_Surface * 857Ector_Surface *
diff --git a/src/lib/evas/canvas/evas_object_main.c b/src/lib/evas/canvas/evas_object_main.c
index b685378dc9..49d0586c8e 100644
--- a/src/lib/evas/canvas/evas_object_main.c
+++ b/src/lib/evas/canvas/evas_object_main.c
@@ -2330,7 +2330,7 @@ _efl_canvas_object_efl_object_provider_find(const Eo *eo_obj EINA_UNUSED, Evas_O
2330 return obj->layer->evas->evas; 2330 return obj->layer->evas->evas;
2331 } 2331 }
2332 else if (klass == EFL_LOOP_CLASS) 2332 else if (klass == EFL_LOOP_CLASS)
2333 return efl_app_main_loop_get(efl_app_get()); 2333 return efl_main_loop_get();
2334fallback: 2334fallback:
2335 return efl_provider_find(efl_super(eo_obj, MY_CLASS), klass); 2335 return efl_provider_find(efl_super(eo_obj, MY_CLASS), klass);
2336} 2336}
@@ -2338,7 +2338,7 @@ fallback:
2338EOLIAN static Efl_Loop * 2338EOLIAN static Efl_Loop *
2339_efl_canvas_object_efl_loop_consumer_loop_get(Eo *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj EINA_UNUSED) 2339_efl_canvas_object_efl_loop_consumer_loop_get(Eo *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj EINA_UNUSED)
2340{ 2340{
2341 return efl_app_main_loop_get(efl_app_get()); 2341 return efl_main_loop_get();
2342} 2342}
2343 2343
2344EOLIAN static void 2344EOLIAN static void
diff --git a/src/lib/evas/canvas/evas_object_textblock.c b/src/lib/evas/canvas/evas_object_textblock.c
index e1baafd613..33a5bac389 100644
--- a/src/lib/evas/canvas/evas_object_textblock.c
+++ b/src/lib/evas/canvas/evas_object_textblock.c
@@ -16251,7 +16251,7 @@ _dummy_cancel(void *data EINA_UNUSED, const Eina_Promise *dead EINA_UNUSED)
16251static Eina_Future_Scheduler * 16251static Eina_Future_Scheduler *
16252_future_scheduler_get(void) 16252_future_scheduler_get(void)
16253{ 16253{
16254 return efl_loop_future_scheduler_get(efl_app_main_loop_get(efl_app_get())); 16254 return efl_loop_future_scheduler_get(efl_main_loop_get());
16255} 16255}
16256 16256
16257EOLIAN static Eina_Future * 16257EOLIAN static Eina_Future *