summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2018-02-26 12:16:20 -0500
committerMike Blumenkrantz <zmike@osg.samsung.com>2018-02-26 14:02:51 -0500
commit28fe00b94e55575c15684959b89a614d5a579309 (patch)
tree8188fc04dee84accff78db30b8d3014cf1f49033
parent403c014bd25e399b4d4fa6c17f9a2f1583250070 (diff)
efl: create Efl.App class, the parent of Efl.Loop
-rw-r--r--src/Makefile_Ecore.am2
-rw-r--r--src/bin/eeze/eeze_scanner/eeze_scanner.c2
-rw-r--r--src/bin/eeze/eeze_scanner_monitor/eeze_scanner_monitor.c2
-rw-r--r--src/bin/efl/efl_debugd.c4
-rw-r--r--src/examples/eio/efl_io_manager_ls.c2
-rw-r--r--src/examples/eio/efl_io_manager_open.c2
-rw-r--r--src/examples/eio/efl_io_manager_open_multi.c2
-rw-r--r--src/examples/eldbus/dbusmodel.c2
-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_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.eo45
-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.eo27
-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
-rw-r--r--src/tests/ecore/ecore_test_args.c6
-rw-r--r--src/tests/ecore/ecore_test_ecore.c34
-rw-r--r--src/tests/ecore/ecore_test_promise.c58
-rw-r--r--src/tests/ecore/ecore_test_promise2.c8
-rw-r--r--src/tests/ecore/ecore_test_timer.c2
-rw-r--r--src/tests/ecore_con/ecore_con_test_efl_net_ip_address.c2
-rw-r--r--src/tests/eio/eio_model_test_file.c2
-rw-r--r--src/tests/eio/eio_model_test_monitor_add.c2
-rw-r--r--src/tests/eio/eio_test_manager.c12
-rw-r--r--src/tests/eio/eio_test_manager_xattr.c2
-rw-r--r--src/tests/eldbus/eldbus_test_eldbus_model.c4
-rw-r--r--src/tests/eldbus/eldbus_test_eldbus_model_method.c2
-rw-r--r--src/tests/eldbus/eldbus_test_eldbus_model_signal.c2
-rw-r--r--src/tests/eldbus/eldbus_test_fake_server_eldbus_model_proxy.c2
-rw-r--r--src/tests/elementary/elm_test_config.c6
60 files changed, 358 insertions, 274 deletions
diff --git a/src/Makefile_Ecore.am b/src/Makefile_Ecore.am
index 28a46d374d..a758ebf9aa 100644
--- a/src/Makefile_Ecore.am
+++ b/src/Makefile_Ecore.am
@@ -8,6 +8,7 @@ ecore_eolian_files_legacy = \
8 lib/ecore/efl_loop_timer.eo 8 lib/ecore/efl_loop_timer.eo
9 9
10ecore_eolian_files_public = \ 10ecore_eolian_files_public = \
11 lib/ecore/efl_app.eo \
11 lib/ecore/efl_loop.eo \ 12 lib/ecore/efl_loop.eo \
12 lib/ecore/efl_loop_consumer.eo \ 13 lib/ecore/efl_loop_consumer.eo \
13 lib/ecore/efl_loop_fd.eo \ 14 lib/ecore/efl_loop_fd.eo \
@@ -95,6 +96,7 @@ lib/ecore/ecore_job.c \
95lib/ecore/ecore_main.c \ 96lib/ecore/ecore_main.c \
96lib/ecore/ecore_event_message.c \ 97lib/ecore/ecore_event_message.c \
97lib/ecore/ecore_event_message_handler.c \ 98lib/ecore/ecore_event_message_handler.c \
99lib/ecore/efl_app.c \
98lib/ecore/efl_loop.c \ 100lib/ecore/efl_loop.c \
99lib/ecore/efl_loop_consumer.c \ 101lib/ecore/efl_loop_consumer.c \
100lib/ecore/efl_loop_fd.c \ 102lib/ecore/efl_loop_fd.c \
diff --git a/src/bin/eeze/eeze_scanner/eeze_scanner.c b/src/bin/eeze/eeze_scanner/eeze_scanner.c
index c4d23ea34f..896afe9e83 100644
--- a/src/bin/eeze/eeze_scanner/eeze_scanner.c
+++ b/src/bin/eeze/eeze_scanner/eeze_scanner.c
@@ -494,7 +494,7 @@ main(void)
494 goto end; 494 goto end;
495 } 495 }
496 496
497 loop = efl_main_loop_get(); 497 loop = efl_app_main_loop_get(efl_app_get());
498 498
499#ifdef EFL_NET_SERVER_UNIX_CLASS 499#ifdef EFL_NET_SERVER_UNIX_CLASS
500 server = efl_add(EFL_NET_SERVER_SIMPLE_CLASS, loop, 500 server = efl_add(EFL_NET_SERVER_SIMPLE_CLASS, loop,
diff --git a/src/bin/eeze/eeze_scanner_monitor/eeze_scanner_monitor.c b/src/bin/eeze/eeze_scanner_monitor/eeze_scanner_monitor.c
index 02d22ecdb6..a227296553 100644
--- a/src/bin/eeze/eeze_scanner_monitor/eeze_scanner_monitor.c
+++ b/src/bin/eeze/eeze_scanner_monitor/eeze_scanner_monitor.c
@@ -151,7 +151,7 @@ main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
151 goto error_path; 151 goto error_path;
152 } 152 }
153 153
154 loop = efl_main_loop_get(); 154 loop = efl_app_main_loop_get(efl_app_get());
155 155
156#ifdef EFL_NET_DIALER_UNIX_CLASS 156#ifdef EFL_NET_DIALER_UNIX_CLASS
157 dialer = efl_add(EFL_NET_DIALER_SIMPLE_CLASS, loop, 157 dialer = efl_add(EFL_NET_DIALER_SIMPLE_CLASS, loop,
diff --git a/src/bin/efl/efl_debugd.c b/src/bin/efl/efl_debugd.c
index cd4a819eaf..3aa3151a29 100644
--- a/src/bin/efl/efl_debugd.c
+++ b/src/bin/efl/efl_debugd.c
@@ -569,7 +569,7 @@ _local_server_create(void)
569 snprintf(path, sizeof(path) - 1, "%s/%s/%s/%i", socket_path, 569 snprintf(path, sizeof(path) - 1, "%s/%s/%s/%i", socket_path,
570 LOCAL_SERVER_PATH, LOCAL_SERVER_NAME, LOCAL_SERVER_PORT); 570 LOCAL_SERVER_PATH, LOCAL_SERVER_NAME, LOCAL_SERVER_PORT);
571 571
572 loop = efl_main_loop_get(); 572 loop = efl_app_main_loop_get(efl_app_get());
573 573
574#ifdef EFL_NET_SERVER_UNIX_CLASS 574#ifdef EFL_NET_SERVER_UNIX_CLASS
575 _local_server = efl_add(EFL_NET_SERVER_SIMPLE_CLASS, loop, 575 _local_server = efl_add(EFL_NET_SERVER_SIMPLE_CLASS, loop,
@@ -624,7 +624,7 @@ _remote_server_create(void)
624 Eina_Bool ret = EINA_FALSE; 624 Eina_Bool ret = EINA_FALSE;
625 char address[256]; 625 char address[256];
626 626
627 loop = efl_main_loop_get(); 627 loop = efl_app_main_loop_get(efl_app_get());
628 628
629 _remote_server = efl_add(EFL_NET_SERVER_SIMPLE_CLASS, loop, 629 _remote_server = efl_add(EFL_NET_SERVER_SIMPLE_CLASS, loop,
630 efl_net_server_simple_inner_class_set(efl_added, EFL_NET_SERVER_TCP_CLASS)); 630 efl_net_server_simple_inner_class_set(efl_added, EFL_NET_SERVER_TCP_CLASS));
diff --git a/src/examples/eio/efl_io_manager_ls.c b/src/examples/eio/efl_io_manager_ls.c
index 65d5511026..b73e4544ef 100644
--- a/src/examples/eio/efl_io_manager_ls.c
+++ b/src/examples/eio/efl_io_manager_ls.c
@@ -50,7 +50,7 @@ progress_cb(void *data EINA_UNUSED, Eina_Accessor *access)
50 50
51void list_files(void *data) 51void list_files(void *data)
52{ 52{
53 Efl_Io_Manager *job = efl_add(EFL_IO_MANAGER_CLASS, efl_main_loop_get()); 53 Efl_Io_Manager *job = efl_add(EFL_IO_MANAGER_CLASS, efl_app_main_loop_get(efl_app_get()));
54 const char *path = data; 54 const char *path = data;
55 55
56 eina_future_then(efl_io_manager_ls(job, path, NULL, progress_cb, NULL), done_cb, NULL); 56 eina_future_then(efl_io_manager_ls(job, path, NULL, progress_cb, NULL), done_cb, NULL);
diff --git a/src/examples/eio/efl_io_manager_open.c b/src/examples/eio/efl_io_manager_open.c
index 5c731c1186..9c3b93f08e 100644
--- a/src/examples/eio/efl_io_manager_open.c
+++ b/src/examples/eio/efl_io_manager_open.c
@@ -65,7 +65,7 @@ void open_file(const char *path)
65{ 65{
66 Efl_Io_Manager *job; 66 Efl_Io_Manager *job;
67 67
68 job = efl_add(EFL_IO_MANAGER_CLASS, efl_main_loop_get()); 68 job = efl_add(EFL_IO_MANAGER_CLASS, efl_app_main_loop_get(efl_app_get()));
69 69
70 eina_future_chain(efl_io_manager_open(job, path, EINA_FALSE), 70 eina_future_chain(efl_io_manager_open(job, path, EINA_FALSE),
71 { .cb = _open_cb, .data = job }, 71 { .cb = _open_cb, .data = job },
diff --git a/src/examples/eio/efl_io_manager_open_multi.c b/src/examples/eio/efl_io_manager_open_multi.c
index 3c39d3fc49..f5c009610f 100644
--- a/src/examples/eio/efl_io_manager_open_multi.c
+++ b/src/examples/eio/efl_io_manager_open_multi.c
@@ -83,7 +83,7 @@ int main(int argc, char const *argv[])
83 eio_init(); 83 eio_init();
84 ecore_init(); 84 ecore_init();
85 85
86 job = efl_add(EFL_IO_MANAGER_CLASS, efl_main_loop_get()); 86 job = efl_add(EFL_IO_MANAGER_CLASS, efl_app_main_loop_get(efl_app_get()));
87 87
88 path = getenv("HOME"); 88 path = getenv("HOME");
89 path2 = "./"; 89 path2 = "./";
diff --git a/src/examples/eldbus/dbusmodel.c b/src/examples/eldbus/dbusmodel.c
index fb197b650c..26afba6b64 100644
--- a/src/examples/eldbus/dbusmodel.c
+++ b/src/examples/eldbus/dbusmodel.c
@@ -249,7 +249,7 @@ main(int argc, char **argv EINA_UNUSED)
249 ELDBUS_CONNECTION_TYPE_SYSTEM : 249 ELDBUS_CONNECTION_TYPE_SYSTEM :
250 ELDBUS_CONNECTION_TYPE_SESSION); 250 ELDBUS_CONNECTION_TYPE_SESSION);
251 251
252 root = efl_add_ref(ELDBUS_MODEL_OBJECT_CLASS, efl_main_loop_get(), 252 root = efl_add_ref(ELDBUS_MODEL_OBJECT_CLASS, efl_app_main_loop_get(efl_app_get()),
253 eldbus_model_object_custom_constructor(efl_added, conn_type, NULL, EINA_FALSE, bus_name, path), 253 eldbus_model_object_custom_constructor(efl_added, conn_type, NULL, EINA_FALSE, bus_name, path),
254 efl_event_callback_array_add(efl_added, event_cbs(), NULL)); 254 efl_event_callback_array_add(efl_added, event_cbs(), NULL));
255 255
diff --git a/src/lib/ecore/Ecore_Eo.h b/src/lib/ecore/Ecore_Eo.h
index f5ce92d805..35b2415d3f 100644
--- a/src/lib/ecore/Ecore_Eo.h
+++ b/src/lib/ecore/Ecore_Eo.h
@@ -48,6 +48,7 @@
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"
51 52
52/** 53/**
53 * @brief Quits the main loop once all the events currently on the queue have 54 * @brief Quits the main loop once all the events currently on the queue have
@@ -102,7 +103,7 @@ EAPI Eina_Promise *efl_loop_promise_new(const Eo *obj, Eina_Promise_Cancel_Cb ca
102#include "efl_interpolator_cubic_bezier.eo.h" 103#include "efl_interpolator_cubic_bezier.eo.h"
103 104
104/* We ue the factory pattern here, so you shouldn't call eo_add directly. */ 105/* We ue the factory pattern here, so you shouldn't call eo_add directly. */
105EAPI Eo *efl_main_loop_get(void); 106EAPI Eo *efl_app_get(void);
106 107
107typedef struct _Efl_Future_Composite_Progress Efl_Future_All_Progress; 108typedef struct _Efl_Future_Composite_Progress Efl_Future_All_Progress;
108 109
diff --git a/src/lib/ecore/ecore.c b/src/lib/ecore/ecore.c
index d911bc4e23..b5ec2c8c7b 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_main_loop_get(), 326 efl_add(EFL_LOOP_TIMER_CLASS, efl_app_main_loop_get(efl_app_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_main_loop_get(), 350 efl_event_callback_add(efl_app_main_loop_get(efl_app_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_main_loop_get(), EFL_LOOP_EVENT_TERMINATE, NULL); 394 efl_event_callback_call(efl_app_main_loop_get(efl_app_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 258e10e663..7b9f536a30 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 _mainloop_singleton, 250 ML_OBJ,
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 908f677539..eb5e9abcc6 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_loop_main_get(EFL_LOOP_CLASS), 69 Ecore_Exe *ret = efl_add(MY_CLASS, efl_app_main_loop_get(efl_app_get()),
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 9ce4716c45..9e4fa081f6 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(_mainloop_singleton, ecore_idle_enterer_callbacks(), ie); 33 efl_event_callback_array_del(ML_OBJ, ecore_idle_enterer_callbacks(), ie);
34 efl_event_callback_array_priority_add(_mainloop_singleton, ecore_idle_enterer_callbacks(), EFL_CALLBACK_PRIORITY_BEFORE, ie); 34 efl_event_callback_array_priority_add(ML_OBJ, 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 ffd4579cae..e95403398a 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(_mainloop_singleton, idler->desc, idler); 60 efl_event_callback_array_del(ML_OBJ, 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(_mainloop_singleton, desc, ret); 97 efl_event_callback_array_add(ML_OBJ, 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 bc3c6c84a9..050851f7ec 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_main_loop_get()) ERR("Cannot create main loop object"); 1072 if (!efl_app_main_loop_get(efl_app_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_loop_main_get(EFL_LOOP_CLASS), 1375 fdh = _ecore_main_fd_handler_add(efl_app_main_loop_get(efl_app_get()),
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_loop_main_get(EFL_LOOP_CLASS), 1391 return _ecore_main_fd_handler_add(efl_app_main_loop_get(efl_app_get()),
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 7ff80f57c3..b5cba2d4aa 100644
--- a/src/lib/ecore/ecore_private.h
+++ b/src/lib/ecore/ecore_private.h
@@ -113,6 +113,13 @@ 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
116struct _Efl_Loop_Data 123struct _Efl_Loop_Data
117{ 124{
118 double loop_time; 125 double loop_time;
@@ -508,10 +515,10 @@ GENERIC_ALLOC_FREE_HEADER(Ecore_Win32_Handler, ecore_win32_handler);
508 515
509#undef GENERIC_ALLOC_FREE_HEADER 516#undef GENERIC_ALLOC_FREE_HEADER
510 517
511extern Eo *_mainloop_singleton; 518Eo *_efl_app;
512extern Efl_Loop_Data *_mainloop_singleton_data; 519Efl_App_Data *_efl_app_data;
513#define ML_OBJ _mainloop_singleton 520#define ML_OBJ (_efl_app_data->main_loop)
514#define ML_DAT _mainloop_singleton_data 521#define ML_DAT (_efl_app_data->main_loop_data)
515//#define ML_DAT efl_data_scope_get(ML_OBJ, EFL_LOOP_CLASS) 522//#define ML_DAT efl_data_scope_get(ML_OBJ, EFL_LOOP_CLASS)
516 523
517extern Efl_Version _app_efl_version; 524extern Efl_Version _app_efl_version;
@@ -525,7 +532,7 @@ void ecore_loop_promise_fulfill(Efl_Promise *p);
525// access to direct input cb 532// access to direct input cb
526#define ECORE_EVAS_INTERNAL 533#define ECORE_EVAS_INTERNAL
527 534
528#define EFL_LOOP_DATA efl_data_scope_get(efl_loop_main_get(EFL_LOOP_CLASS), EFL_LOOP_CLASS) 535#define EFL_LOOP_DATA efl_data_scope_get(efl_app_main_loop_get(efl_app_get()), EFL_LOOP_CLASS)
529 536
530EOAPI Eina_Bool efl_loop_message_process(Eo *obj); 537EOAPI Eina_Bool efl_loop_message_process(Eo *obj);
531 538
diff --git a/src/lib/ecore/ecore_thread.c b/src/lib/ecore/ecore_thread.c
index 2dc16ed389..03d9ce3664 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_main_loop_get()), &p); 1638 efl_wref_add(efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_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 6ef4ab254c..94d407e712 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_main_loop_get(), 186 timer = efl_add(MY_CLASS, efl_app_main_loop_get(efl_app_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_main_loop_get(), 209 timer = efl_add(MY_CLASS, efl_app_main_loop_get(efl_app_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
new file mode 100644
index 0000000000..f9a4999436
--- /dev/null
+++ b/src/lib/ecore/efl_app.c
@@ -0,0 +1,110 @@
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
new file mode 100644
index 0000000000..6411984b78
--- /dev/null
+++ b/src/lib/ecore/efl_app.eo
@@ -0,0 +1,45 @@
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 implements {
42 Efl.Object.constructor;
43 Efl.Object.destructor;
44 }
45}
diff --git a/src/lib/ecore/efl_general.h b/src/lib/ecore/efl_general.h
index 256f1065a4..dd03d25791 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_main_loop_get(), EFL_LOOP_EVENT_ARGUMENTS, efl_main, NULL); \ 96 efl_event_callback_add(efl_app_main_loop_get(efl_app_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_main_loop_get()); \ 99 ret__ = efl_loop_begin(efl_app_main_loop_get(efl_app_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_main_loop_get(), _efl_main_ex(), NULL); \ 120 efl_event_callback_array_add(efl_app_main_loop_get(efl_app_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_main_loop_get()); \ 123 ret__ = efl_loop_begin(efl_app_main_loop_get(efl_app_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 74a12deb50..5495dd4bf4 100644
--- a/src/lib/ecore/efl_loop.c
+++ b/src/lib/ecore/efl_loop.c
@@ -53,31 +53,11 @@ _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
61extern Eina_Lock _environ_lock; 56extern Eina_Lock _environ_lock;
62static Eina_List *_environ_strings_set = NULL; 57static Eina_List *_environ_strings_set = NULL;
63 58
64static void _clean_old_environ(void); 59static void _clean_old_environ(void);
65 60
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
81EOLIAN static void 61EOLIAN static void
82_efl_loop_iterate(Eo *obj, Efl_Loop_Data *pd) 62_efl_loop_iterate(Eo *obj, Efl_Loop_Data *pd)
83{ 63{
@@ -124,7 +104,7 @@ efl_exit(int exit_code)
124 104
125 eina_value_setup(&v, EINA_VALUE_TYPE_INT); 105 eina_value_setup(&v, EINA_VALUE_TYPE_INT);
126 eina_value_set(&v, &exit_code); 106 eina_value_set(&v, &exit_code);
127 efl_loop_quit(efl_main_loop_get(), v); 107 efl_loop_quit(efl_app_main_loop_get(efl_app_get()), v);
128} 108}
129 109
130EOLIAN static Efl_Object * 110EOLIAN static Efl_Object *
@@ -322,6 +302,10 @@ _efl_loop_efl_object_constructor(Eo *obj, Efl_Loop_Data *pd)
322 obj = efl_constructor(efl_super(obj, EFL_LOOP_CLASS)); 302 obj = efl_constructor(efl_super(obj, EFL_LOOP_CLASS));
323 if (!obj) return NULL; 303 if (!obj) return NULL;
324 304
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
325 efl_event_callback_array_add(obj, event_catcher_watch(), pd); 309 efl_event_callback_array_add(obj, event_catcher_watch(), pd);
326 310
327 pd->loop_time = ecore_time_get(); 311 pd->loop_time = ecore_time_get();
@@ -365,13 +349,11 @@ _efl_loop_efl_object_destructor(Eo *obj, Efl_Loop_Data *pd)
365 pd->env.environ_copy = NULL; 349 pd->env.environ_copy = NULL;
366 eina_lock_release(&_environ_lock); 350 eina_lock_release(&_environ_lock);
367 351
368 efl_destructor(efl_super(obj, EFL_LOOP_CLASS)); 352 efl_parent_set(obj, NULL);
353 if (obj != ML_OBJ)
354 _efl_app_data->loops = eina_list_remove(_efl_app_data->loops, obj);
369 355
370 if (obj == _mainloop_singleton) 356 efl_destructor(efl_super(obj, EFL_LOOP_CLASS));
371 {
372 _mainloop_singleton = NULL;
373 _mainloop_singleton_data = NULL;
374 }
375} 357}
376 358
377static void 359static void
@@ -398,7 +380,7 @@ _efl_loop_arguments_send(void *data, const Eina_Value v,
398 arge.initialization = initialization; 380 arge.initialization = initialization;
399 initialization = EINA_FALSE; 381 initialization = EINA_FALSE;
400 382
401 efl_event_callback_call(efl_main_loop_get(), 383 efl_event_callback_call(efl_app_main_loop_get(efl_app_get()),
402 EFL_LOOP_EVENT_ARGUMENTS, &arge); 384 EFL_LOOP_EVENT_ARGUMENTS, &arge);
403on_error: 385on_error:
404 _efl_loop_arguments_cleanup(arga); 386 _efl_loop_arguments_cleanup(arga);
@@ -415,17 +397,17 @@ ecore_loop_arguments_send(int argc, const char **argv)
415 Eina_Array *arga; 397 Eina_Array *arga;
416 int i = 0; 398 int i = 0;
417 399
418 efl_task_arg_reset(efl_main_loop_get()); 400 efl_task_arg_reset(efl_app_main_loop_get(efl_app_get()));
419 arga = eina_array_new(argc); 401 arga = eina_array_new(argc);
420 for (i = 0; i < argc; i++) 402 for (i = 0; i < argc; i++)
421 { 403 {
422 eina_array_push(arga, eina_stringshare_add(argv[i])); 404 eina_array_push(arga, eina_stringshare_add(argv[i]));
423 efl_task_arg_append(efl_main_loop_get(), argv[i]); 405 efl_task_arg_append(efl_app_main_loop_get(efl_app_get()), argv[i]);
424 } 406 }
425 407
426 job = eina_future_then(efl_loop_job(efl_main_loop_get()), 408 job = eina_future_then(efl_loop_job(efl_app_main_loop_get(efl_app_get())),
427 _efl_loop_arguments_send, arga); 409 _efl_loop_arguments_send, arga);
428 efl_future_Eina_FutureXXX_then(efl_main_loop_get(), job); 410 efl_future_Eina_FutureXXX_then(efl_app_main_loop_get(efl_app_get()), job);
429} 411}
430 412
431// Only one main loop handle for now 413// Only one main loop handle for now
@@ -710,42 +692,6 @@ _efl_loop_message_process(Eo *obj, Efl_Loop_Data *pd)
710 692
711EOAPI EFL_FUNC_BODY(efl_loop_message_process, Eina_Bool, 0); 693EOAPI EFL_FUNC_BODY(efl_loop_message_process, Eina_Bool, 0);
712 694
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
749static void 695static void
750_env_sync(Efl_Loop_Data *pd, Efl_Task_Data *td) 696_env_sync(Efl_Loop_Data *pd, Efl_Task_Data *td)
751{ 697{
diff --git a/src/lib/ecore/efl_loop.eo b/src/lib/ecore/efl_loop.eo
index e6c1229772..e9bd12ef5c 100644
--- a/src/lib/ecore/efl_loop.eo
+++ b/src/lib/ecore/efl_loop.eo
@@ -20,33 +20,6 @@ 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 }
50 iterate { 23 iterate {
51 [[Runs a single iteration of the main loop to process everything on the 24 [[Runs a single iteration of the main loop to process everything on the
52 queue.]] 25 queue.]]
diff --git a/src/lib/ecore/efl_loop_consumer.c b/src/lib/ecore/efl_loop_consumer.c
index 670e91bbc6..fa53e0f12a 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_main_loop_get(); 20 loop = efl_app_main_loop_get(efl_app_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 d8c8e38376..d88dff1c32 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_main_loop_get()); 163 Efl_Promise *promise = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_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_main_loop_get()); 183 Efl_Promise *promise = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_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_main_loop_get()); 195 Efl_Promise *promise = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_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_main_loop_get()); 570 Efl_Promise *promise = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_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_main_loop_get()); 582 Efl_Promise *promise = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_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_main_loop_get()); 601 Efl_Promise *promise = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_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_main_loop_get()); 635 Efl_Promise *promise = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_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 dbbe43fc45..c2e80a162a 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_main_loop_get()); 179 Efl_Promise *promise = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_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 71bb9f192b..4c423d6e3a 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_main_loop_get()); 239 Efl_Promise *promise = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_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_main_loop_get()); 250 Efl_Promise *promise = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_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_main_loop_get()); 260 Efl_Promise *promise = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_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_main_loop_get()); 272 Efl_Promise *promise = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_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 cb95c2f4db..9604a34fd6 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_main_loop_get()); 47 Efl_Promise *promise = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_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_main_loop_get()); 108 Efl_Promise *promise = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_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_main_loop_get()); 155 Efl_Promise *promise = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_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_main_loop_get()); 166 Efl_Promise *promise = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_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 571f3e4131..4a71470792 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_main_loop_get()); 73 Efl_Promise *promise = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_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_main_loop_get()); 122 Efl_Promise *promise = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_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_main_loop_get()); 139 Efl_Promise *promise = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_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_main_loop_get()); 151 Efl_Promise *promise = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_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 ea8c31f6cd..c3412eef80 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_main_loop_get(); 821 Eo *loop = efl_app_main_loop_get(efl_app_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_main_loop_get(); 1607 Eo *loop = efl_app_main_loop_get(efl_app_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_main_loop_get(); 1686 loop = efl_app_main_loop_get(efl_app_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_main_loop_get(); 1949 Eo *loop = efl_app_main_loop_get(efl_app_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_main_loop_get(); 2039 Eo *loop = efl_app_main_loop_get(efl_app_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_main_loop_get(); 2143 loop = efl_app_main_loop_get(efl_app_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 e8ca8c4cdf..43d13ff62e 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_main_loop_get(), 707 url_con->dialer = efl_add(EFL_NET_DIALER_HTTP_CLASS, efl_app_main_loop_get(efl_app_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 13e14a052d..9b5cec2bdb 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_main_loop_get(), 550 ctx->promise = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_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 1323dbc8e6..fdbb405715 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_main_loop_get(); 218 loop = efl_app_main_loop_get(efl_app_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 c0fcd8be63..84e1f54eda 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_main_loop_get(); 385 Eo *loop = efl_app_main_loop_get(efl_app_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_main_loop_get(), 407 svr->server = efl_add(EFL_NET_SERVER_UNIX_CLASS, efl_app_main_loop_get(efl_app_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_main_loop_get()); 421 svr->server = efl_add(EFL_NET_SERVER_UNIX_CLASS, efl_app_main_loop_get(efl_app_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_main_loop_get()); 434 svr->server = efl_add(EFL_NET_SERVER_WINDOWS_CLASS, efl_app_main_loop_get(efl_app_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_main_loop_get()); 445 svr->server = efl_add(EFL_NET_SERVER_WINDOWS_CLASS, efl_app_main_loop_get(efl_app_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_main_loop_get(); 656 Eo *loop = efl_app_main_loop_get(efl_app_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_main_loop_get()); 684 svr->dialer.dialer = efl_add(EFL_NET_DIALER_UNIX_CLASS, efl_app_main_loop_get(efl_app_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_main_loop_get()); 692 svr->dialer.dialer = efl_add(EFL_NET_DIALER_UNIX_CLASS, efl_app_main_loop_get(efl_app_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_main_loop_get()); 702 svr->dialer.dialer = efl_add(EFL_NET_DIALER_WINDOWS_CLASS, efl_app_main_loop_get(efl_app_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_main_loop_get()); 710 svr->dialer.dialer = efl_add(EFL_NET_DIALER_WINDOWS_CLASS, efl_app_main_loop_get(efl_app_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 551b4f2e6e..d308df68a1 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_main_loop_get(), EFL_GFX_COLOR_CLASS_INTERFACE, _edje_global_obj) || 88 !efl_loop_register(efl_app_main_loop_get(efl_app_get()), EFL_GFX_COLOR_CLASS_INTERFACE, _edje_global_obj) ||
89 !efl_loop_register(efl_main_loop_get(), EFL_GFX_TEXT_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) ||
90 !efl_loop_register(efl_main_loop_get(), EFL_GFX_SIZE_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))
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_main_loop_get(), EFL_GFX_COLOR_CLASS_INTERFACE, _edje_global_obj); 153 efl_loop_unregister(efl_app_main_loop_get(efl_app_get()), EFL_GFX_COLOR_CLASS_INTERFACE, _edje_global_obj);
154 efl_loop_unregister(efl_main_loop_get(), EFL_GFX_TEXT_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);
155 efl_loop_unregister(efl_main_loop_get(), EFL_GFX_SIZE_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);
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_main_loop_get(), EFL_GFX_COLOR_CLASS_INTERFACE, _edje_global_obj); 212 efl_loop_unregister(efl_app_main_loop_get(efl_app_get()), EFL_GFX_COLOR_CLASS_INTERFACE, _edje_global_obj);
213 efl_loop_unregister(efl_main_loop_get(), EFL_GFX_TEXT_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);
214 efl_loop_unregister(efl_main_loop_get(), EFL_GFX_SIZE_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);
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 d130569a04..3d13c531eb 100644
--- a/src/lib/edje/edje_private.h
+++ b/src/lib/edje/edje_private.h
@@ -2402,7 +2402,7 @@ static inline Edje_Global *
2402_edje_global(void) 2402_edje_global(void)
2403{ 2403{
2404#ifndef NDEBUG 2404#ifndef NDEBUG
2405 return efl_provider_find(efl_main_loop_get(), EFL_GFX_COLOR_CLASS_INTERFACE); 2405 return efl_provider_find(efl_app_main_loop_get(efl_app_get()), EFL_GFX_COLOR_CLASS_INTERFACE);
2406#else 2406#else
2407 extern Edje_Global *_edje_global_obj; 2407 extern Edje_Global *_edje_global_obj;
2408 return _edje_global_obj; 2408 return _edje_global_obj;
diff --git a/src/lib/eio/eio_main.c b/src/lib/eio/eio_main.c
index 44c4e9dfc0..60d6796c87 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_main_loop_get()); 322 io_manager = efl_add(EFL_IO_MANAGER_CLASS, efl_app_main_loop_get(efl_app_get()));
323 efl_loop_register(efl_main_loop_get(), EFL_IO_MANAGER_CLASS, io_manager); 323 efl_loop_register(efl_app_main_loop_get(efl_app_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_main_loop_get(), EFL_IO_MANAGER_CLASS, io_manager); 361 efl_loop_unregister(efl_app_main_loop_get(efl_app_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 ec2672d7f1..cb1d388e75 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_main_loop_get(); 827 return efl_app_main_loop_get(efl_app_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 f9f9723d8e..8196635b1b 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_main_loop_get(), EFL_CONFIG_GLOBAL_CLASS)); 5434 efl_composite_attach(obj, efl_provider_find(efl_app_main_loop_get(efl_app_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 97afd11295..2f844aa58d 100644
--- a/src/lib/elementary/elm_config.c
+++ b/src/lib/elementary/elm_config.c
@@ -1660,8 +1660,8 @@ static void
1660_config_load(void) 1660_config_load(void)
1661{ 1661{
1662 _efl_config_obj = efl_add(EFL_CONFIG_GLOBAL_CLASS, NULL); 1662 _efl_config_obj = efl_add(EFL_CONFIG_GLOBAL_CLASS, NULL);
1663 efl_loop_register(efl_main_loop_get(), EFL_CONFIG_INTERFACE, _efl_config_obj); 1663 efl_loop_register(efl_app_main_loop_get(efl_app_get()), EFL_CONFIG_INTERFACE, _efl_config_obj);
1664 efl_loop_register(efl_main_loop_get(), EFL_CONFIG_GLOBAL_CLASS, _efl_config_obj); 1664 efl_loop_register(efl_app_main_loop_get(efl_app_get()), EFL_CONFIG_GLOBAL_CLASS, _efl_config_obj);
1665 efl_del_intercept_set(_efl_config_obj, _efl_config_obj_del); 1665 efl_del_intercept_set(_efl_config_obj, _efl_config_obj_del);
1666 _elm_config = _config_user_load(); 1666 _elm_config = _config_user_load();
1667 if (_elm_config) 1667 if (_elm_config)
@@ -4614,8 +4614,8 @@ void
4614_elm_config_shutdown(void) 4614_elm_config_shutdown(void)
4615{ 4615{
4616 efl_del_intercept_set(_efl_config_obj, NULL); 4616 efl_del_intercept_set(_efl_config_obj, NULL);
4617 efl_loop_unregister(efl_main_loop_get(), EFL_CONFIG_INTERFACE, _efl_config_obj); 4617 efl_loop_unregister(efl_app_main_loop_get(efl_app_get()), EFL_CONFIG_INTERFACE, _efl_config_obj);
4618 efl_loop_unregister(efl_main_loop_get(), EFL_CONFIG_GLOBAL_CLASS, _efl_config_obj); 4618 efl_loop_unregister(efl_app_main_loop_get(efl_app_get()), EFL_CONFIG_GLOBAL_CLASS, _efl_config_obj);
4619 ELM_SAFE_FREE(_efl_config_obj, efl_del); 4619 ELM_SAFE_FREE(_efl_config_obj, efl_del);
4620 ELM_SAFE_FREE(_elm_config, _config_free); 4620 ELM_SAFE_FREE(_elm_config, _config_free);
4621 ELM_SAFE_FREE(_elm_preferred_engine, eina_stringshare_del); 4621 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 8f48ba4f38..7dabd3aafd 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_main_loop_get(), 168 efl_event_callback_del(efl_app_main_loop_get(efl_app_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_main_loop_get(), 190 efl_event_callback_del(efl_app_main_loop_get(efl_app_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_main_loop_get(), 205 sd->render_idle_enterer = efl_event_callback_priority_add(efl_app_main_loop_get(efl_app_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_main_loop_get(), 300 efl_event_callback_del(efl_app_main_loop_get(efl_app_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_main_loop_get(), 532 sd->render_idle_enterer = efl_event_callback_priority_add(efl_app_main_loop_get(efl_app_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 646b2ee474..8d2a4aaf16 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_main_loop_get(), _qre_main_ex(), NULL); 1151 efl_event_callback_array_add(efl_app_main_loop_get(efl_app_get()), _qre_main_ex(), NULL);
1152 } 1152 }
1153 else 1153 else
1154 { 1154 {
1155 efl_event_callback_add(efl_main_loop_get(), EFL_LOOP_EVENT_ARGUMENTS, qre_main, NULL); 1155 efl_event_callback_add(efl_app_main_loop_get(efl_app_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_main_loop_get())); 1160 ret = efl_loop_exit_code_process(efl_loop_begin(efl_app_main_loop_get(efl_app_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_main_loop_get(), EFL_LOOP_EVENT_TERMINATE, 1307 efl_event_callback_add(efl_app_main_loop_get(efl_app_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_main_loop_get(), EFL_LOOP_EVENT_TERMINATE, 1312 efl_event_callback_del(efl_app_main_loop_get(efl_app_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 45fae21bce..ee7d0cf626 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_main_loop_get(); 845 return efl_app_main_loop_get(efl_app_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_main_loop_get(); 854 return efl_app_main_loop_get(efl_app_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 49d0586c8e..b685378dc9 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_main_loop_get(); 2333 return efl_app_main_loop_get(efl_app_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_main_loop_get(); 2341 return efl_app_main_loop_get(efl_app_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 33a5bac389..e1baafd613 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_main_loop_get()); 16254 return efl_loop_future_scheduler_get(efl_app_main_loop_get(efl_app_get()));
16255} 16255}
16256 16256
16257EOLIAN static Eina_Future * 16257EOLIAN static Eina_Future *
diff --git a/src/tests/ecore/ecore_test_args.c b/src/tests/ecore/ecore_test_args.c
index 36bb7d8858..94e5b3f0fa 100644
--- a/src/tests/ecore/ecore_test_args.c
+++ b/src/tests/ecore/ecore_test_args.c
@@ -27,7 +27,7 @@ _cb_args1(void *data EINA_UNUSED, const Efl_Event *event)
27START_TEST(ecore_test_args1) 27START_TEST(ecore_test_args1)
28{ 28{
29 ecore_init(); 29 ecore_init();
30 efl_event_callback_add(efl_main_loop_get(), EFL_LOOP_EVENT_ARGUMENTS, 30 efl_event_callback_add(efl_app_main_loop_get(efl_app_get()), EFL_LOOP_EVENT_ARGUMENTS,
31 _cb_args1, NULL); 31 _cb_args1, NULL);
32 ecore_loop_arguments_send(8, args); 32 ecore_loop_arguments_send(8, args);
33 ecore_main_loop_begin(); 33 ecore_main_loop_begin();
@@ -52,7 +52,7 @@ START_TEST(ecore_test_args2)
52 }; 52 };
53 53
54 ecore_init(); 54 ecore_init();
55 efl_event_callback_add(efl_main_loop_get(), EFL_LOOP_EVENT_ARGUMENTS, 55 efl_event_callback_add(efl_app_main_loop_get(efl_app_get()), EFL_LOOP_EVENT_ARGUMENTS,
56 _cb_args2, NULL); 56 _cb_args2, NULL);
57 ecore_loop_arguments_send(1, simple_args); 57 ecore_loop_arguments_send(1, simple_args);
58 ecore_main_loop_begin(); 58 ecore_main_loop_begin();
@@ -72,7 +72,7 @@ _cb_args3(void *data EINA_UNUSED, const Efl_Event *event)
72START_TEST(ecore_test_args3) 72START_TEST(ecore_test_args3)
73{ 73{
74 ecore_init(); 74 ecore_init();
75 efl_event_callback_add(efl_main_loop_get(), EFL_LOOP_EVENT_ARGUMENTS, 75 efl_event_callback_add(efl_app_main_loop_get(efl_app_get()), EFL_LOOP_EVENT_ARGUMENTS,
76 _cb_args3, NULL); 76 _cb_args3, NULL);
77 ecore_loop_arguments_send(0, NULL); 77 ecore_loop_arguments_send(0, NULL);
78 ecore_main_loop_begin(); 78 ecore_main_loop_begin();
diff --git a/src/tests/ecore/ecore_test_ecore.c b/src/tests/ecore/ecore_test_ecore.c
index 492c2aa033..de04c643cc 100644
--- a/src/tests/ecore/ecore_test_ecore.c
+++ b/src/tests/ecore/ecore_test_ecore.c
@@ -317,7 +317,7 @@ START_TEST(ecore_test_efl_loop_fd)
317 ret = pipe(comm); 317 ret = pipe(comm);
318 fail_if(ret != 0); 318 fail_if(ret != 0);
319 319
320 fd = efl_add(EFL_LOOP_FD_CLASS, efl_main_loop_get(), 320 fd = efl_add(EFL_LOOP_FD_CLASS, efl_app_main_loop_get(efl_app_get()),
321 efl_loop_fd_set(efl_added, comm[0]), 321 efl_loop_fd_set(efl_added, comm[0]),
322 efl_event_callback_add(efl_added, EFL_LOOP_FD_EVENT_READ, _eo_read_cb, &did)); 322 efl_event_callback_add(efl_added, EFL_LOOP_FD_EVENT_READ, _eo_read_cb, &did));
323 fail_if(fd == NULL); 323 fail_if(fd == NULL);
@@ -360,7 +360,7 @@ START_TEST(ecore_test_efl_loop_fd_lifecycle)
360 ret = pipe(comm); 360 ret = pipe(comm);
361 fail_if(ret != 0); 361 fail_if(ret != 0);
362 362
363 fd = efl_add(EFL_LOOP_FD_CLASS, efl_main_loop_get(), 363 fd = efl_add(EFL_LOOP_FD_CLASS, efl_app_main_loop_get(efl_app_get()),
364 efl_loop_fd_set(efl_added, comm[0]), 364 efl_loop_fd_set(efl_added, comm[0]),
365 efl_event_callback_add(efl_added, EFL_LOOP_FD_EVENT_READ, _eo_read_cb, &did), 365 efl_event_callback_add(efl_added, EFL_LOOP_FD_EVENT_READ, _eo_read_cb, &did),
366 efl_event_callback_add(efl_added, EFL_EVENT_DEL, _efl_del_cb, &dead)); 366 efl_event_callback_add(efl_added, EFL_EVENT_DEL, _efl_del_cb, &dead));
@@ -863,44 +863,44 @@ START_TEST(ecore_test_efl_loop_register)
863 863
864 ecore_init(); 864 ecore_init();
865 865
866 t = efl_provider_find(efl_main_loop_get(), EFL_LOOP_CLASS); 866 t = efl_provider_find(efl_app_main_loop_get(efl_app_get()), EFL_LOOP_CLASS);
867 fail_if(!efl_isa(t, EFL_LOOP_CLASS)); 867 fail_if(!efl_isa(t, EFL_LOOP_CLASS));
868 868
869 t = efl_provider_find(efl_main_loop_get(), EFL_LOOP_TIMER_CLASS); 869 t = efl_provider_find(efl_app_main_loop_get(efl_app_get()), EFL_LOOP_TIMER_CLASS);
870 fail_if(t != NULL); 870 fail_if(t != NULL);
871 871
872 n = efl_add(EFL_LOOP_TIMER_CLASS, efl_main_loop_get()); 872 n = efl_add(EFL_LOOP_TIMER_CLASS, efl_app_main_loop_get(efl_app_get()));
873 fail_if(n != NULL); 873 fail_if(n != NULL);
874 874
875 n = efl_add(EFL_LOOP_TIMER_CLASS, efl_main_loop_get(), 875 n = efl_add(EFL_LOOP_TIMER_CLASS, efl_app_main_loop_get(efl_app_get()),
876 efl_loop_timer_interval_set(efl_added, 1.0)); 876 efl_loop_timer_interval_set(efl_added, 1.0));
877 efl_loop_register(efl_main_loop_get(), EFL_LOOP_TIMER_CLASS, n); 877 efl_loop_register(efl_app_main_loop_get(efl_app_get()), EFL_LOOP_TIMER_CLASS, n);
878 878
879 t = efl_provider_find(efl_main_loop_get(), EFL_LOOP_TIMER_CLASS); 879 t = efl_provider_find(efl_app_main_loop_get(efl_app_get()), EFL_LOOP_TIMER_CLASS);
880 fail_if(!efl_isa(t, EFL_LOOP_TIMER_CLASS)); 880 fail_if(!efl_isa(t, EFL_LOOP_TIMER_CLASS));
881 fail_if(t != n); 881 fail_if(t != n);
882 882
883 efl_loop_unregister(efl_main_loop_get(), EFL_LOOP_TIMER_CLASS, n); 883 efl_loop_unregister(efl_app_main_loop_get(efl_app_get()), EFL_LOOP_TIMER_CLASS, n);
884 884
885 t = efl_provider_find(efl_main_loop_get(), EFL_LOOP_TIMER_CLASS); 885 t = efl_provider_find(efl_app_main_loop_get(efl_app_get()), EFL_LOOP_TIMER_CLASS);
886 fail_if(t != NULL); 886 fail_if(t != NULL);
887 887
888 ecore_shutdown(); 888 ecore_shutdown();
889} 889}
890END_TEST 890END_TEST
891 891
892START_TEST(ecore_test_efl_app_version) 892START_TEST(ecore_test_efl_build_version)
893{ 893{
894 const Efl_Version *ver; 894 const Efl_Version *ver;
895 Eo *loop; 895 Eo *app;
896 896
897 ecore_init(); 897 ecore_init();
898 898
899 loop = efl_loop_main_get(EFL_LOOP_CLASS); 899 app = efl_app_get();
900 fail_if(!efl_isa(loop, EFL_LOOP_CLASS)); 900 fail_if(!efl_isa(app, EFL_APP_CLASS));
901 901
902 efl_build_version_set(EFL_VERSION_MAJOR, EFL_VERSION_MINOR, 0, 0, NULL, EFL_BUILD_ID); 902 efl_build_version_set(EFL_VERSION_MAJOR, EFL_VERSION_MINOR, 0, 0, NULL, EFL_BUILD_ID);
903 ver = efl_loop_app_efl_version_get(loop); 903 ver = efl_app_build_efl_version_get(app);
904 fail_if(!ver); 904 fail_if(!ver);
905 fail_if(ver->major != EFL_VERSION_MAJOR); 905 fail_if(ver->major != EFL_VERSION_MAJOR);
906 fail_if(ver->minor != EFL_VERSION_MINOR); 906 fail_if(ver->minor != EFL_VERSION_MINOR);
@@ -909,7 +909,7 @@ START_TEST(ecore_test_efl_app_version)
909 fail_if(ver->flavor); 909 fail_if(ver->flavor);
910 fail_if(!eina_streq(ver->build_id, EFL_BUILD_ID)); 910 fail_if(!eina_streq(ver->build_id, EFL_BUILD_ID));
911 911
912 ver = efl_loop_efl_version_get(loop); 912 ver = efl_app_efl_version_get(app);
913 fail_if(!ver); 913 fail_if(!ver);
914 fail_if(ver->major != EFL_VERSION_MAJOR); 914 fail_if(ver->major != EFL_VERSION_MAJOR);
915 fail_if(ver->minor != EFL_VERSION_MINOR); 915 fail_if(ver->minor != EFL_VERSION_MINOR);
@@ -941,5 +941,5 @@ void ecore_test_ecore(TCase *tc)
941 tcase_add_test(tc, ecore_test_efl_loop_fd); 941 tcase_add_test(tc, ecore_test_efl_loop_fd);
942 tcase_add_test(tc, ecore_test_efl_loop_fd_lifecycle); 942 tcase_add_test(tc, ecore_test_efl_loop_fd_lifecycle);
943 tcase_add_test(tc, ecore_test_efl_loop_register); 943 tcase_add_test(tc, ecore_test_efl_loop_register);
944 tcase_add_test(tc, ecore_test_efl_app_version); 944 tcase_add_test(tc, ecore_test_efl_build_version);
945} 945}
diff --git a/src/tests/ecore/ecore_test_promise.c b/src/tests/ecore/ecore_test_promise.c
index 3a3aab6277..fc36792ea2 100644
--- a/src/tests/ecore/ecore_test_promise.c
+++ b/src/tests/ecore/ecore_test_promise.c
@@ -66,7 +66,7 @@ START_TEST(efl_test_promise_future_success)
66 66
67 ecore_init(); 67 ecore_init();
68 68
69 p = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get()); 69 p = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get()));
70 fail_if(!p); 70 fail_if(!p);
71 71
72 f = efl_promise_future_get(p); 72 f = efl_promise_future_get(p);
@@ -106,7 +106,7 @@ START_TEST(efl_test_promise_future_success_before_get)
106 106
107 ecore_init(); 107 ecore_init();
108 108
109 p = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get()); 109 p = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get()));
110 fail_if(!p); 110 fail_if(!p);
111 111
112 efl_promise_value_set(p, &value, NULL); 112 efl_promise_value_set(p, &value, NULL);
@@ -146,7 +146,7 @@ START_TEST(efl_test_promise_future_cancel)
146 146
147 ecore_init(); 147 ecore_init();
148 148
149 p = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get()); 149 p = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get()));
150 fail_if(!p); 150 fail_if(!p);
151 151
152 efl_future_use(&f, efl_promise_future_get(p)); 152 efl_future_use(&f, efl_promise_future_get(p));
@@ -191,7 +191,7 @@ START_TEST(efl_test_promise_before_future_success)
191 191
192 ecore_init(); 192 ecore_init();
193 193
194 p = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get()); 194 p = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get()));
195 fail_if(!p); 195 fail_if(!p);
196 196
197 f = efl_promise_future_get(p); 197 f = efl_promise_future_get(p);
@@ -229,7 +229,7 @@ START_TEST(efl_test_promise_before_future_cancel)
229 229
230 ecore_init(); 230 ecore_init();
231 231
232 p = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get()); 232 p = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get()));
233 fail_if(!p); 233 fail_if(!p);
234 234
235 efl_future_use(&f, efl_promise_future_get(p)); 235 efl_future_use(&f, efl_promise_future_get(p));
@@ -310,7 +310,7 @@ START_TEST(efl_test_promise_future_chain_success)
310 310
311 ecore_init(); 311 ecore_init();
312 312
313 p = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get()); 313 p = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get()));
314 fail_if(!p); 314 fail_if(!p);
315 315
316 f1 = efl_promise_future_get(p); 316 f1 = efl_promise_future_get(p);
@@ -357,7 +357,7 @@ START_TEST(efl_test_promise_future_chain_cancel)
357 357
358 ecore_init(); 358 ecore_init();
359 359
360 p = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get()); 360 p = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get()));
361 fail_if(!p); 361 fail_if(!p);
362 362
363 efl_future_use(&f1, efl_promise_future_get(p)); 363 efl_future_use(&f1, efl_promise_future_get(p));
@@ -409,7 +409,7 @@ START_TEST(efl_test_promise_future_multi_success)
409 409
410 ecore_init(); 410 ecore_init();
411 411
412 p = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get()); 412 p = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get()));
413 fail_if(!p); 413 fail_if(!p);
414 414
415 f = efl_promise_future_get(p); 415 f = efl_promise_future_get(p);
@@ -454,7 +454,7 @@ START_TEST(efl_test_promise_future_multi_success_noref)
454 454
455 ecore_init(); 455 ecore_init();
456 456
457 p = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get()); 457 p = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get()));
458 fail_if(!p); 458 fail_if(!p);
459 459
460 f = efl_promise_future_get(p); 460 f = efl_promise_future_get(p);
@@ -497,7 +497,7 @@ START_TEST(efl_test_promise_future_multi_cancel)
497 497
498 ecore_init(); 498 ecore_init();
499 499
500 p = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get()); 500 p = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get()));
501 fail_if(!p); 501 fail_if(!p);
502 502
503 efl_future_use(&f, efl_promise_future_get(p)); 503 efl_future_use(&f, efl_promise_future_get(p));
@@ -545,7 +545,7 @@ START_TEST(efl_test_promise_before_future_multi_success)
545 545
546 ecore_init(); 546 ecore_init();
547 547
548 p = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get()); 548 p = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get()));
549 fail_if(!p); 549 fail_if(!p);
550 550
551 f = efl_promise_future_get(p); 551 f = efl_promise_future_get(p);
@@ -588,7 +588,7 @@ START_TEST(efl_test_promise_before_future_multi_success_noref)
588 588
589 ecore_init(); 589 ecore_init();
590 590
591 p = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get()); 591 p = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get()));
592 fail_if(!p); 592 fail_if(!p);
593 593
594 f = efl_promise_future_get(p); 594 f = efl_promise_future_get(p);
@@ -630,7 +630,7 @@ START_TEST(efl_test_promise_before_future_multi_cancel)
630 630
631 ecore_init(); 631 ecore_init();
632 632
633 p = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get()); 633 p = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get()));
634 fail_if(!p); 634 fail_if(!p);
635 635
636 efl_future_use(&f, efl_promise_future_get(p)); 636 efl_future_use(&f, efl_promise_future_get(p));
@@ -682,7 +682,7 @@ START_TEST(efl_test_promise_before_future_multi_cancel_noref)
682 682
683 ecore_init(); 683 ecore_init();
684 684
685 p = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get()); 685 p = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get()));
686 fail_if(!p); 686 fail_if(!p);
687 687
688 efl_future_use(&f, efl_promise_future_get(p)); 688 efl_future_use(&f, efl_promise_future_get(p));
@@ -742,7 +742,7 @@ START_TEST(efl_test_promise_future_optional_success)
742 742
743 ecore_init(); 743 ecore_init();
744 744
745 p = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get()); 745 p = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get()));
746 fail_if(!p); 746 fail_if(!p);
747 747
748 f = efl_promise_future_get(p); 748 f = efl_promise_future_get(p);
@@ -782,7 +782,7 @@ START_TEST(efl_test_promise_future_optional_cancel)
782 782
783 ecore_init(); 783 ecore_init();
784 784
785 p = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get()); 785 p = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get()));
786 fail_if(!p); 786 fail_if(!p);
787 787
788 efl_future_use(&f, efl_promise_future_get(p)); 788 efl_future_use(&f, efl_promise_future_get(p));
@@ -843,9 +843,9 @@ START_TEST(efl_test_promise_all)
843 843
844 ecore_init(); 844 ecore_init();
845 845
846 p1 = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get()); 846 p1 = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get()));
847 p2 = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get()); 847 p2 = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get()));
848 p3 = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get()); 848 p3 = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get()));
849 fail_if(!p1 || !p2 || !p3); 849 fail_if(!p1 || !p2 || !p3);
850 850
851 f1 = efl_ref(efl_promise_future_get(p1)); 851 f1 = efl_ref(efl_promise_future_get(p1));
@@ -893,9 +893,9 @@ START_TEST(efl_test_promise_all_after_value_set)
893 893
894 ecore_init(); 894 ecore_init();
895 895
896 p1 = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get()); 896 p1 = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get()));
897 p2 = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get()); 897 p2 = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get()));
898 p3 = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get()); 898 p3 = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get()));
899 fail_if(!p1 || !p2 || !p3); 899 fail_if(!p1 || !p2 || !p3);
900 900
901 f1 = efl_promise_future_get(p1); 901 f1 = efl_promise_future_get(p1);
@@ -951,9 +951,9 @@ START_TEST(efl_test_promise_race)
951 951
952 ecore_init(); 952 ecore_init();
953 953
954 p1 = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get()); 954 p1 = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get()));
955 p2 = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get()); 955 p2 = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get()));
956 p3 = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get()); 956 p3 = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get()));
957 fail_if(!p1 || !p2 || !p3); 957 fail_if(!p1 || !p2 || !p3);
958 958
959 f1 = efl_ref(efl_promise_future_get(p1)); 959 f1 = efl_ref(efl_promise_future_get(p1));
@@ -989,9 +989,9 @@ START_TEST(efl_test_future_link)
989 989
990 ecore_init(); 990 ecore_init();
991 991
992 o = efl_add(EFL_LOOP_TIMER_CLASS, efl_main_loop_get(), 992 o = efl_add(EFL_LOOP_TIMER_CLASS, efl_app_main_loop_get(efl_app_get()),
993 efl_loop_timer_interval_set(efl_added, 0.0)); 993 efl_loop_timer_interval_set(efl_added, 0.0));
994 p = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get()); 994 p = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get()));
995 efl_future_use(&f, efl_promise_future_get(p)); 995 efl_future_use(&f, efl_promise_future_get(p));
996 efl_future_link(o, f); 996 efl_future_link(o, f);
997 997
@@ -999,7 +999,7 @@ START_TEST(efl_test_future_link)
999 efl_del(o); 999 efl_del(o);
1000 fail_if(f); 1000 fail_if(f);
1001 1001
1002 o = efl_add(EFL_LOOP_TIMER_CLASS, efl_main_loop_get(), 1002 o = efl_add(EFL_LOOP_TIMER_CLASS, efl_app_main_loop_get(efl_app_get()),
1003 efl_loop_timer_interval_set(efl_added, 0.0)); 1003 efl_loop_timer_interval_set(efl_added, 0.0));
1004 efl_future_use(&f, efl_promise_future_get(p)); 1004 efl_future_use(&f, efl_promise_future_get(p));
1005 efl_future_cancel(f); 1005 efl_future_cancel(f);
@@ -1026,7 +1026,7 @@ START_TEST(efl_test_recursive_mess)
1026 1026
1027 ecore_init(); 1027 ecore_init();
1028 1028
1029 p = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get()); 1029 p = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get()));
1030 efl_future_use(&recursive_future, efl_promise_future_get(p)); 1030 efl_future_use(&recursive_future, efl_promise_future_get(p));
1031 efl_future_then(recursive_future, _then_cleanup, _cancel, NULL, &done); 1031 efl_future_then(recursive_future, _then_cleanup, _cancel, NULL, &done);
1032 1032
diff --git a/src/tests/ecore/ecore_test_promise2.c b/src/tests/ecore/ecore_test_promise2.c
index ff663f1685..0f70e17a1d 100644
--- a/src/tests/ecore/ecore_test_promise2.c
+++ b/src/tests/ecore/ecore_test_promise2.c
@@ -156,7 +156,7 @@ _simple_timeout(void *data)
156static Eina_Future_Scheduler * 156static Eina_Future_Scheduler *
157_future_scheduler_get(void) 157_future_scheduler_get(void)
158{ 158{
159 return efl_loop_future_scheduler_get(efl_main_loop_get()); 159 return efl_loop_future_scheduler_get(efl_app_main_loop_get(efl_app_get()));
160} 160}
161 161
162static PromiseCtx * 162static PromiseCtx *
@@ -490,7 +490,7 @@ START_TEST(efl_test_timeout)
490 Eina_Bool done = EINA_FALSE; 490 Eina_Bool done = EINA_FALSE;
491 491
492 fail_if(!ecore_init()); 492 fail_if(!ecore_init());
493 f = eina_future_then(efl_loop_timeout(efl_main_loop_get(), 0.0001), 493 f = eina_future_then(efl_loop_timeout(efl_app_main_loop_get(efl_app_get()), 0.0001),
494 _promise_empty_done, &done); 494 _promise_empty_done, &done);
495 fail_if(!f); 495 fail_if(!f);
496 ecore_main_loop_begin(); 496 ecore_main_loop_begin();
@@ -506,7 +506,7 @@ START_TEST(efl_test_job)
506 Eina_Bool done = EINA_FALSE; 506 Eina_Bool done = EINA_FALSE;
507 507
508 fail_if(!ecore_init()); 508 fail_if(!ecore_init());
509 f = eina_future_then(efl_loop_job(efl_main_loop_get()), 509 f = eina_future_then(efl_loop_job(efl_app_main_loop_get(efl_app_get())),
510 _promise_empty_done, &done); 510 _promise_empty_done, &done);
511 fail_if(!f); 511 fail_if(!f);
512 ecore_main_loop_begin(); 512 ecore_main_loop_begin();
@@ -522,7 +522,7 @@ START_TEST(efl_test_idle)
522 Eina_Bool done = EINA_FALSE; 522 Eina_Bool done = EINA_FALSE;
523 523
524 fail_if(!ecore_init()); 524 fail_if(!ecore_init());
525 f = eina_future_then(efl_loop_idle(efl_main_loop_get()), 525 f = eina_future_then(efl_loop_idle(efl_app_main_loop_get(efl_app_get())),
526 _promise_empty_done, &done); 526 _promise_empty_done, &done);
527 fail_if(!f); 527 fail_if(!f);
528 ecore_main_loop_begin(); 528 ecore_main_loop_begin();
diff --git a/src/tests/ecore/ecore_test_timer.c b/src/tests/ecore/ecore_test_timer.c
index 8895a36cf2..ffbd1b5b1b 100644
--- a/src/tests/ecore/ecore_test_timer.c
+++ b/src/tests/ecore/ecore_test_timer.c
@@ -267,7 +267,7 @@ START_TEST(ecore_test_timer_lifecycle)
267 t = ecore_timer_add(1.0, _test_time_cb, &rl); 267 t = ecore_timer_add(1.0, _test_time_cb, &rl);
268 efl_event_callback_add((Eo*) t, EFL_EVENT_DEL, _test_death_cb, &dl); 268 efl_event_callback_add((Eo*) t, EFL_EVENT_DEL, _test_death_cb, &dl);
269 269
270 et = efl_add(EFL_LOOP_TIMER_CLASS, efl_main_loop_get(), 270 et = efl_add(EFL_LOOP_TIMER_CLASS, efl_app_main_loop_get(efl_app_get()),
271 efl_event_callback_add(efl_added, EFL_LOOP_TIMER_EVENT_TICK, _test_run_cb, &re), 271 efl_event_callback_add(efl_added, EFL_LOOP_TIMER_EVENT_TICK, _test_run_cb, &re),
272 efl_event_callback_add(efl_added, EFL_EVENT_DEL, _test_death_cb, &de), 272 efl_event_callback_add(efl_added, EFL_EVENT_DEL, _test_death_cb, &de),
273 efl_loop_timer_interval_set(efl_added, 1.0)); 273 efl_loop_timer_interval_set(efl_added, 1.0));
diff --git a/src/tests/ecore_con/ecore_con_test_efl_net_ip_address.c b/src/tests/ecore_con/ecore_con_test_efl_net_ip_address.c
index 563af26c60..a5ad6d191e 100644
--- a/src/tests/ecore_con/ecore_con_test_efl_net_ip_address.c
+++ b/src/tests/ecore_con/ecore_con_test_efl_net_ip_address.c
@@ -117,7 +117,7 @@ _timeout(void *data,
117 do \ 117 do \
118 { \ 118 { \
119 Eina_Bool _did_timeout = EINA_FALSE; \ 119 Eina_Bool _did_timeout = EINA_FALSE; \
120 Eina_Future *_timeout_future = efl_loop_timeout(efl_main_loop_get(), t); \ 120 Eina_Future *_timeout_future = efl_loop_timeout(efl_app_main_loop_get(efl_app_get()), t); \
121 eina_future_then(_timeout_future, _timeout, &_did_timeout); \ 121 eina_future_then(_timeout_future, _timeout, &_did_timeout); \
122 mark_point(); \ 122 mark_point(); \
123 ecore_main_loop_begin(); \ 123 ecore_main_loop_begin(); \
diff --git a/src/tests/eio/eio_model_test_file.c b/src/tests/eio/eio_model_test_file.c
index 81ab19d2c7..abbd7405de 100644
--- a/src/tests/eio/eio_model_test_file.c
+++ b/src/tests/eio/eio_model_test_file.c
@@ -114,7 +114,7 @@ START_TEST(eio_model_test_test_file)
114 fail_if(!efl_object_init(), "ERROR: Cannot init EO!\n"); 114 fail_if(!efl_object_init(), "ERROR: Cannot init EO!\n");
115 fail_if(!eio_init(), "ERROR: Cannot init EIO!\n"); 115 fail_if(!eio_init(), "ERROR: Cannot init EIO!\n");
116 116
117 filemodel = efl_add(EIO_MODEL_CLASS, efl_main_loop_get(), eio_model_path_set(efl_added, EFL_MODEL_TEST_FILENAME_PATH)); 117 filemodel = efl_add(EIO_MODEL_CLASS, efl_app_main_loop_get(efl_app_get()), eio_model_path_set(efl_added, EFL_MODEL_TEST_FILENAME_PATH));
118 fail_if(!filemodel, "ERROR: Cannot init model!\n"); 118 fail_if(!filemodel, "ERROR: Cannot init model!\n");
119 119
120 handler = ecore_event_handler_add(ECORE_EVENT_SIGNAL_EXIT, exit_func, NULL); 120 handler = ecore_event_handler_add(ECORE_EVENT_SIGNAL_EXIT, exit_func, NULL);
diff --git a/src/tests/eio/eio_model_test_monitor_add.c b/src/tests/eio/eio_model_test_monitor_add.c
index e6b14d57b8..b78b297157 100644
--- a/src/tests/eio/eio_model_test_monitor_add.c
+++ b/src/tests/eio/eio_model_test_monitor_add.c
@@ -112,7 +112,7 @@ START_TEST(eio_model_test_test_monitor_add)
112 112
113 tmpdir = eina_environment_tmp_get(); 113 tmpdir = eina_environment_tmp_get();
114 114
115 filemodel = efl_add(EIO_MODEL_CLASS, efl_main_loop_get(), eio_model_path_set(efl_added, tmpdir)); 115 filemodel = efl_add(EIO_MODEL_CLASS, efl_app_main_loop_get(efl_app_get()), eio_model_path_set(efl_added, tmpdir));
116 fail_if(!filemodel, "ERROR: Cannot init model!\n"); 116 fail_if(!filemodel, "ERROR: Cannot init model!\n");
117 117
118 efl_event_callback_add(filemodel, EFL_MODEL_EVENT_CHILD_ADDED, &_children_added_cb, filemodel); 118 efl_event_callback_add(filemodel, EFL_MODEL_EVENT_CHILD_ADDED, &_children_added_cb, filemodel);
diff --git a/src/tests/eio/eio_test_manager.c b/src/tests/eio/eio_test_manager.c
index 2e396c1ad6..198117dc22 100644
--- a/src/tests/eio/eio_test_manager.c
+++ b/src/tests/eio/eio_test_manager.c
@@ -156,7 +156,7 @@ _test_ls(Efl_Future *(*func)(Eo *obj, const char *path, Eina_Bool recursive),
156 uint64_t expected_test_count, 156 uint64_t expected_test_count,
157 const char* test_dirname) 157 const char* test_dirname)
158{ 158{
159 Efl_Io_Manager *job = efl_add(EFL_IO_MANAGER_CLASS, efl_main_loop_get()); 159 Efl_Io_Manager *job = efl_add(EFL_IO_MANAGER_CLASS, efl_app_main_loop_get(efl_app_get()));
160 Efl_Future *f = NULL; 160 Efl_Future *f = NULL;
161 uint64_t main_files = 0; 161 uint64_t main_files = 0;
162 162
@@ -206,7 +206,7 @@ START_TEST(efl_io_manager_test_stat)
206 nested_dirname = create_test_dirs(test_dirname); 206 nested_dirname = create_test_dirs(test_dirname);
207 nested_filename = get_full_path(test_dirname, files[3]); 207 nested_filename = get_full_path(test_dirname, files[3]);
208 208
209 job = efl_add(EFL_IO_MANAGER_CLASS, efl_main_loop_get()); 209 job = efl_add(EFL_IO_MANAGER_CLASS, efl_app_main_loop_get(efl_app_get()));
210 fail_if(!job); 210 fail_if(!job);
211 211
212 // Start testing 212 // Start testing
@@ -257,7 +257,7 @@ START_TEST(efl_io_manager_test_ls)
257 nested_filename = get_full_path(test_dirname, files[3]); 257 nested_filename = get_full_path(test_dirname, files[3]);
258 258
259 // Start testing 259 // Start testing
260 job = efl_add(EFL_IO_MANAGER_CLASS, efl_main_loop_get()); 260 job = efl_add(EFL_IO_MANAGER_CLASS, efl_app_main_loop_get(efl_app_get()));
261 fail_if(!job); 261 fail_if(!job);
262 262
263 f = efl_io_manager_ls(job, test_dirname, &main_files, _access_cb, NULL); 263 f = efl_io_manager_ls(job, test_dirname, &main_files, _access_cb, NULL);
@@ -311,7 +311,7 @@ START_TEST(efl_io_manager_test_open)
311 nested_dirname = create_test_dirs(test_dirname); 311 nested_dirname = create_test_dirs(test_dirname);
312 nested_filename = get_full_path(test_dirname, files[3]); 312 nested_filename = get_full_path(test_dirname, files[3]);
313 313
314 job = efl_add(EFL_IO_MANAGER_CLASS, efl_main_loop_get()); 314 job = efl_add(EFL_IO_MANAGER_CLASS, efl_app_main_loop_get(efl_app_get()));
315 315
316 f = efl_io_manager_open(job, nested_filename, EINA_FALSE); 316 f = efl_io_manager_open(job, nested_filename, EINA_FALSE);
317 eina_future_then(f, _open_done_cb, &opened_file); 317 eina_future_then(f, _open_done_cb, &opened_file);
@@ -340,11 +340,11 @@ START_TEST(efl_io_instantiated)
340 340
341 ecore_init(); 341 ecore_init();
342 342
343 fail_if(efl_provider_find(efl_main_loop_get(), EFL_IO_MANAGER_CLASS) != NULL); 343 fail_if(efl_provider_find(efl_app_main_loop_get(efl_app_get()), EFL_IO_MANAGER_CLASS) != NULL);
344 344
345 eio_init(); 345 eio_init();
346 346
347 manager = efl_provider_find(efl_main_loop_get(), EFL_IO_MANAGER_CLASS); 347 manager = efl_provider_find(efl_app_main_loop_get(efl_app_get()), EFL_IO_MANAGER_CLASS);
348 fail_if(manager == NULL); 348 fail_if(manager == NULL);
349 fail_if(!efl_isa(manager, EFL_IO_MANAGER_CLASS)); 349 fail_if(!efl_isa(manager, EFL_IO_MANAGER_CLASS));
350 350
diff --git a/src/tests/eio/eio_test_manager_xattr.c b/src/tests/eio/eio_test_manager_xattr.c
index 136ae4dc16..186d28939f 100644
--- a/src/tests/eio/eio_test_manager_xattr.c
+++ b/src/tests/eio/eio_test_manager_xattr.c
@@ -130,7 +130,7 @@ START_TEST(eio_test_job_xattr_set)
130 eina_init(); 130 eina_init();
131 eio_init(); 131 eio_init();
132 132
133 job = efl_add(EFL_IO_MANAGER_CLASS, efl_main_loop_get()); 133 job = efl_add(EFL_IO_MANAGER_CLASS, efl_app_main_loop_get(efl_app_get()));
134 134
135 test_file_path = get_full_path(XATTR_TEST_DIR, filename); 135 test_file_path = get_full_path(XATTR_TEST_DIR, filename);
136 fd = open(test_file_path, 136 fd = open(test_file_path,
diff --git a/src/tests/eldbus/eldbus_test_eldbus_model.c b/src/tests/eldbus/eldbus_test_eldbus_model.c
index 49814ec95a..df4d49ff4e 100644
--- a/src/tests/eldbus/eldbus_test_eldbus_model.c
+++ b/src/tests/eldbus/eldbus_test_eldbus_model.c
@@ -172,7 +172,7 @@ check_property(Eo *object, const char *property_name, const char *expected_value
172Eo * 172Eo *
173create_connection(void) 173create_connection(void)
174{ 174{
175 Eo *connection = efl_add_ref(ELDBUS_MODEL_CONNECTION_CLASS, efl_main_loop_get(), eldbus_model_connection_custom_constructor(efl_added, ELDBUS_CONNECTION_TYPE_SESSION, NULL, EINA_FALSE)); 175 Eo *connection = efl_add_ref(ELDBUS_MODEL_CONNECTION_CLASS, efl_app_main_loop_get(efl_app_get()), eldbus_model_connection_custom_constructor(efl_added, ELDBUS_CONNECTION_TYPE_SESSION, NULL, EINA_FALSE));
176 ck_assert_ptr_ne(NULL, connection); 176 ck_assert_ptr_ne(NULL, connection);
177 return connection; 177 return connection;
178} 178}
@@ -180,7 +180,7 @@ create_connection(void)
180Eo * 180Eo *
181create_object(void) 181create_object(void)
182{ 182{
183 Eo *object = efl_add_ref(ELDBUS_MODEL_OBJECT_CLASS, efl_main_loop_get(), eldbus_model_object_custom_constructor(efl_added, ELDBUS_CONNECTION_TYPE_SESSION, NULL, EINA_FALSE, ELDBUS_FDO_BUS, ELDBUS_FDO_PATH)); 183 Eo *object = efl_add_ref(ELDBUS_MODEL_OBJECT_CLASS, efl_app_main_loop_get(efl_app_get()), eldbus_model_object_custom_constructor(efl_added, ELDBUS_CONNECTION_TYPE_SESSION, NULL, EINA_FALSE, ELDBUS_FDO_BUS, ELDBUS_FDO_PATH));
184 ck_assert_ptr_ne(NULL, object); 184 ck_assert_ptr_ne(NULL, object);
185 return object; 185 return object;
186} 186}
diff --git a/src/tests/eldbus/eldbus_test_eldbus_model_method.c b/src/tests/eldbus/eldbus_test_eldbus_model_method.c
index df74b5c13f..4298f87e4a 100644
--- a/src/tests/eldbus/eldbus_test_eldbus_model_method.c
+++ b/src/tests/eldbus/eldbus_test_eldbus_model_method.c
@@ -29,7 +29,7 @@ _setup(void)
29 29
30 fake_server = fake_server_start(&fake_server_data); 30 fake_server = fake_server_start(&fake_server_data);
31 31
32 fake_server_object = efl_add(ELDBUS_MODEL_OBJECT_CLASS, efl_main_loop_get(), eldbus_model_object_custom_constructor(efl_added, ELDBUS_CONNECTION_TYPE_SESSION, NULL, EINA_FALSE, FAKE_SERVER_BUS, FAKE_SERVER_PATH)); 32 fake_server_object = efl_add(ELDBUS_MODEL_OBJECT_CLASS, efl_app_main_loop_get(efl_app_get()), eldbus_model_object_custom_constructor(efl_added, ELDBUS_CONNECTION_TYPE_SESSION, NULL, EINA_FALSE, FAKE_SERVER_BUS, FAKE_SERVER_PATH));
33 ck_assert_ptr_ne(NULL, fake_server_object); 33 ck_assert_ptr_ne(NULL, fake_server_object);
34 34
35 fake_server_proxy = eldbus_model_proxy_from_object_get(fake_server_object, FAKE_SERVER_INTERFACE); 35 fake_server_proxy = eldbus_model_proxy_from_object_get(fake_server_object, FAKE_SERVER_INTERFACE);
diff --git a/src/tests/eldbus/eldbus_test_eldbus_model_signal.c b/src/tests/eldbus/eldbus_test_eldbus_model_signal.c
index be90e9c033..52ce99593a 100644
--- a/src/tests/eldbus/eldbus_test_eldbus_model_signal.c
+++ b/src/tests/eldbus/eldbus_test_eldbus_model_signal.c
@@ -27,7 +27,7 @@ _setup(void)
27 27
28 fake_server = fake_server_start(&fake_server_data); 28 fake_server = fake_server_start(&fake_server_data);
29 29
30 fake_server_object = efl_add(ELDBUS_MODEL_OBJECT_CLASS, efl_main_loop_get(), eldbus_model_object_custom_constructor(efl_added, ELDBUS_CONNECTION_TYPE_SESSION, NULL, EINA_FALSE, FAKE_SERVER_BUS, FAKE_SERVER_PATH)); 30 fake_server_object = efl_add(ELDBUS_MODEL_OBJECT_CLASS, efl_app_main_loop_get(efl_app_get()), eldbus_model_object_custom_constructor(efl_added, ELDBUS_CONNECTION_TYPE_SESSION, NULL, EINA_FALSE, FAKE_SERVER_BUS, FAKE_SERVER_PATH));
31 ck_assert_ptr_ne(NULL, fake_server_object); 31 ck_assert_ptr_ne(NULL, fake_server_object);
32 32
33 fake_server_proxy = eldbus_model_proxy_from_object_get(fake_server_object, FAKE_SERVER_INTERFACE); 33 fake_server_proxy = eldbus_model_proxy_from_object_get(fake_server_object, FAKE_SERVER_INTERFACE);
diff --git a/src/tests/eldbus/eldbus_test_fake_server_eldbus_model_proxy.c b/src/tests/eldbus/eldbus_test_fake_server_eldbus_model_proxy.c
index ec8d3bd5b3..f701fa043d 100644
--- a/src/tests/eldbus/eldbus_test_fake_server_eldbus_model_proxy.c
+++ b/src/tests/eldbus/eldbus_test_fake_server_eldbus_model_proxy.c
@@ -33,7 +33,7 @@ _setup(void)
33 }; 33 };
34 fake_server = fake_server_start(&fake_server_data); 34 fake_server = fake_server_start(&fake_server_data);
35 35
36 fake_server_object = efl_add(ELDBUS_MODEL_OBJECT_CLASS, efl_main_loop_get(), eldbus_model_object_custom_constructor(efl_added, ELDBUS_CONNECTION_TYPE_SESSION, NULL, EINA_FALSE, FAKE_SERVER_BUS, FAKE_SERVER_PATH)); 36 fake_server_object = efl_add(ELDBUS_MODEL_OBJECT_CLASS, efl_app_main_loop_get(efl_app_get()), eldbus_model_object_custom_constructor(efl_added, ELDBUS_CONNECTION_TYPE_SESSION, NULL, EINA_FALSE, FAKE_SERVER_BUS, FAKE_SERVER_PATH));
37 ck_assert_ptr_ne(NULL, fake_server_object); 37 ck_assert_ptr_ne(NULL, fake_server_object);
38 38
39 fake_server_proxy = eldbus_model_proxy_from_object_get(fake_server_object, FAKE_SERVER_INTERFACE); 39 fake_server_proxy = eldbus_model_proxy_from_object_get(fake_server_object, FAKE_SERVER_INTERFACE);
diff --git a/src/tests/elementary/elm_test_config.c b/src/tests/elementary/elm_test_config.c
index 15a799837e..77abc56696 100644
--- a/src/tests/elementary/elm_test_config.c
+++ b/src/tests/elementary/elm_test_config.c
@@ -13,7 +13,7 @@ START_TEST (elm_config_eoapi)
13{ 13{
14 elm_init(1, NULL); 14 elm_init(1, NULL);
15 15
16 Eo *cfg = efl_provider_find(efl_main_loop_get(), EFL_CONFIG_INTERFACE); 16 Eo *cfg = efl_provider_find(efl_app_main_loop_get(efl_app_get()), EFL_CONFIG_INTERFACE);
17 fail_if(!cfg); 17 fail_if(!cfg);
18 18
19#define CONFIG_CHK(opt, typ, val) do { \ 19#define CONFIG_CHK(opt, typ, val) do { \
@@ -150,7 +150,7 @@ START_TEST (elm_config_win)
150{ 150{
151 elm_init(1, NULL); 151 elm_init(1, NULL);
152 152
153 Eo *cfg = efl_provider_find(efl_main_loop_get(), EFL_CONFIG_INTERFACE); 153 Eo *cfg = efl_provider_find(efl_app_main_loop_get(efl_app_get()), EFL_CONFIG_INTERFACE);
154 fail_if(!cfg); 154 fail_if(!cfg);
155 155
156 Eo *win = efl_add(EFL_UI_WIN_CLASS, NULL); 156 Eo *win = efl_add(EFL_UI_WIN_CLASS, NULL);
@@ -185,7 +185,7 @@ START_TEST (elm_config_profiles)
185 // this only tests some of the profile APIs. we're not going to mess with 185 // this only tests some of the profile APIs. we're not going to mess with
186 // the global config during make check :) 186 // the global config during make check :)
187 187
188 Eo *cfg = efl_provider_find(efl_main_loop_get(), EFL_CONFIG_INTERFACE); 188 Eo *cfg = efl_provider_find(efl_app_main_loop_get(efl_app_get()), EFL_CONFIG_INTERFACE);
189 fail_if(!cfg); 189 fail_if(!cfg);
190 190
191 for (int hidden = 0; hidden <= 1; hidden++) 191 for (int hidden = 0; hidden <= 1; hidden++)