summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2018-02-27 14:10:12 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2018-03-03 13:40:33 +0900
commit1c74aaa7e9c9fa1732b467aca5ee1458e3721f0a (patch)
treeaa8cfdf82e579b61cec0ca3d08d2d9cfc4eab651 /src
parent6f092071ac54d10dde39889571518e4b9d17308f (diff)
Revert "cxx: Fix manual code after efl_app change."
This reverts commit 135154303bea691c6f7f9472a5dec32d9103c38d. Revert "efl: move signal events from efl.loop to efl.app" This reverts commit 3dbca39f98288580c62a43c179ac11621433ec88. Revert "efl: add test suite for efl_app" This reverts commit 3e94be5d73256a7f5c02d3a9474173226be7beff. Revert "efl: create Efl.App class, the parent of Efl.Loop" This reverts commit 28fe00b94e55575c15684959b89a614d5a579309. Go back to before efl.app because I think this should be done with superclassing here not a parent object. reasons? 1. multiple loops per single thread make no sense. so if multilpe loop objects they wont be contained in a single app object and then deleted like this. 2. the app object is not really sharable in this design so it cant be accessed from other threads 3. it makes it harder to get the main loop or app object (well 2 func calls one calling the other and more typing. it is longer to type and more work where it is not necessary, and again it can't work from other threads unless we go duplicating efl.app per thread and then what is the point of splittyign out the signal events from efl.loop then?) etc.
Diffstat (limited to 'src')
-rw-r--r--src/Makefile_Ecore.am51
-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/bindings/cxx/eo_cxx/eo_promise.hh2
-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_signal.c18
-rw-r--r--src/lib/ecore/ecore_thread.c2
-rw-r--r--src/lib/ecore/ecore_timer.c4
-rw-r--r--src/lib/ecore/efl_app.c110
-rw-r--r--src/lib/ecore/efl_app.eo50
-rw-r--r--src/lib/ecore/efl_general.h8
-rw-r--r--src/lib/ecore/efl_loop.c82
-rw-r--r--src/lib/ecore/efl_loop.eo30
-rw-r--r--src/lib/ecore/efl_loop_consumer.c2
-rw-r--r--src/lib/ecore/efl_model_composite_boolean.c14
-rw-r--r--src/lib/ecore/efl_model_composite_selection.c2
-rw-r--r--src/lib/ecore/efl_model_container.c8
-rw-r--r--src/lib/ecore/efl_model_container_item.c8
-rw-r--r--src/lib/ecore/efl_model_item.c8
-rw-r--r--src/lib/ecore_con/ecore_con_legacy.c12
-rw-r--r--src/lib/ecore_con/ecore_con_url.c2
-rw-r--r--src/lib/ecore_con/efl_net_ip_address.c2
-rw-r--r--src/lib/ecore_file/ecore_file_download.c2
-rw-r--r--src/lib/ecore_ipc/ecore_ipc.c20
-rw-r--r--src/lib/edje/edje_main.c18
-rw-r--r--src/lib/edje/edje_private.h2
-rw-r--r--src/lib/eio/eio_main.c6
-rw-r--r--src/lib/eio/eio_model.c2
-rw-r--r--src/lib/elementary/efl_ui_win.c2
-rw-r--r--src/lib/elementary/elm_config.c8
-rw-r--r--src/lib/elementary/elm_glview.c10
-rw-r--r--src/lib/elementary/elm_main.c10
-rw-r--r--src/lib/evas/canvas/evas_main.c4
-rw-r--r--src/lib/evas/canvas/evas_object_main.c4
-rw-r--r--src/lib/evas/canvas/evas_object_textblock.c2
-rw-r--r--src/tests/ecore/ecore_test_args.c6
-rw-r--r--src/tests/ecore/ecore_test_ecore.c67
-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/efl_app_suite.c106
-rw-r--r--src/tests/ecore/efl_app_suite.h8
-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
-rw-r--r--src/tests/eo_cxx/eo_cxx_test_promise.cc66
65 files changed, 373 insertions, 549 deletions
diff --git a/src/Makefile_Ecore.am b/src/Makefile_Ecore.am
index 01d581b280..28a46d374d 100644
--- a/src/Makefile_Ecore.am
+++ b/src/Makefile_Ecore.am
@@ -8,7 +8,6 @@ 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 \
12 lib/ecore/efl_loop.eo \ 11 lib/ecore/efl_loop.eo \
13 lib/ecore/efl_loop_consumer.eo \ 12 lib/ecore/efl_loop_consumer.eo \
14 lib/ecore/efl_loop_fd.eo \ 13 lib/ecore/efl_loop_fd.eo \
@@ -96,7 +95,6 @@ lib/ecore/ecore_job.c \
96lib/ecore/ecore_main.c \ 95lib/ecore/ecore_main.c \
97lib/ecore/ecore_event_message.c \ 96lib/ecore/ecore_event_message.c \
98lib/ecore/ecore_event_message_handler.c \ 97lib/ecore/ecore_event_message_handler.c \
99lib/ecore/efl_app.c \
100lib/ecore/efl_loop.c \ 98lib/ecore/efl_loop.c \
101lib/ecore/efl_loop_consumer.c \ 99lib/ecore/efl_loop_consumer.c \
102lib/ecore/efl_loop_fd.c \ 100lib/ecore/efl_loop_fd.c \
@@ -264,8 +262,8 @@ endif
264 262
265if EFL_ENABLE_TESTS 263if EFL_ENABLE_TESTS
266 264
267check_PROGRAMS += tests/ecore/ecore_suite tests/ecore/efl_app_suite 265check_PROGRAMS += tests/ecore/ecore_suite
268TESTS += tests/ecore/ecore_suite tests/ecore/efl_app_suite 266TESTS += tests/ecore/ecore_suite
269 267
270tests_ecore_ecore_suite_SOURCES = \ 268tests_ecore_ecore_suite_SOURCES = \
271tests/ecore/ecore_suite.c \ 269tests/ecore/ecore_suite.c \
@@ -324,51 +322,6 @@ tests_ecore_ecore_suite_DEPENDENCIES = \
324@USE_ECORE_FB_INTERNAL_LIBS@ \ 322@USE_ECORE_FB_INTERNAL_LIBS@ \
325@USE_ECORE_INPUT_INTERNAL_LIBS@ 323@USE_ECORE_INPUT_INTERNAL_LIBS@
326 324
327tests_ecore_efl_app_suite_SOURCES = \
328tests/ecore/efl_app_suite.c \
329tests/ecore/efl_app_suite.h
330
331tests_ecore_efl_app_suite_CPPFLAGS = -I$(top_builddir)/src/lib/efl \
332-DTESTS_SRC_DIR=\"$(top_srcdir)/src/tests/ecore\" \
333-DTESTS_BUILD_DIR=\"$(top_builddir)/src/tests/ecore\" \
334@CHECK_CFLAGS@ \
335@ECORE_CFLAGS@ \
336@ECORE_AUDIO_CFLAGS@ \
337@ECORE_FILE_CFLAGS@ \
338@ECORE_X_CFLAGS@ \
339@ECORE_IMF_CFLAGS@ \
340@ECORE_EVAS_CFLAGS@ \
341@ECORE_WAYLAND_CFLAGS@ \
342@ECORE_WAYLAND_SRV_CFLAGS@ \
343@ECORE_DRM_CFLAGS@ \
344@ECORE_FB_CFLAGS@ \
345@ECORE_INPUT_CFLAGS@
346
347tests_ecore_efl_app_suite_LDADD = \
348@CHECK_LIBS@ \
349@USE_ECORE_LIBS@ \
350@USE_ECORE_AUDIO_LIBS@ \
351@USE_ECORE_FILE_LIBS@ \
352@USE_ECORE_X_LIBS@ \
353@USE_ECORE_IMF_LIBS@ \
354@USE_ECORE_EVAS_LIBS@ \
355@USE_ECORE_WAYLAND_LIBS@ \
356@USE_ECORE_FB_LIBS@ \
357@ECORE_WAYLAND_SRV_LIBS@ \
358@ECORE_DRM_LIBS@ \
359@USE_ECORE_INPUT_LIBS@
360tests_ecore_efl_app_suite_DEPENDENCIES = \
361@USE_ECORE_INTERNAL_LIBS@ \
362@USE_ECORE_AUDIO_INTERNAL_LIBS@ \
363@USE_ECORE_FILE_INTERNAL_LIBS@ \
364@USE_ECORE_X_INTERNAL_LIBS@ \
365@USE_ECORE_IMF_INTERNAL_LIBS@ \
366@USE_ECORE_EVAS_INTERNAL_LIBS@ \
367@USE_ECORE_WAYLAND_INTERNAL_LIBS@ \
368@USE_ECORE_DRM_INTERNAL_LIBS@ \
369@USE_ECORE_FB_INTERNAL_LIBS@ \
370@USE_ECORE_INPUT_INTERNAL_LIBS@
371
372if HAVE_ECORE_X 325if HAVE_ECORE_X
373tests_ecore_ecore_suite_SOURCES += tests/ecore/ecore_test_ecore_x.c 326tests_ecore_ecore_suite_SOURCES += tests/ecore/ecore_test_ecore_x.c
374endif 327endif
diff --git a/src/bin/eeze/eeze_scanner/eeze_scanner.c b/src/bin/eeze/eeze_scanner/eeze_scanner.c
index 896afe9e83..c4d23ea34f 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_app_main_loop_get(efl_app_get()); 497 loop = efl_main_loop_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 a227296553..02d22ecdb6 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_app_main_loop_get(efl_app_get()); 154 loop = efl_main_loop_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 3aa3151a29..cd4a819eaf 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_app_main_loop_get(efl_app_get()); 572 loop = efl_main_loop_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_app_main_loop_get(efl_app_get()); 627 loop = efl_main_loop_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/bindings/cxx/eo_cxx/eo_promise.hh b/src/bindings/cxx/eo_cxx/eo_promise.hh
index 421cd4f357..5e18e69986 100644
--- a/src/bindings/cxx/eo_cxx/eo_promise.hh
+++ b/src/bindings/cxx/eo_cxx/eo_promise.hh
@@ -30,7 +30,7 @@ struct promise_common
30 explicit promise_common(std::nullptr_t) : _promise(nullptr) {} 30 explicit promise_common(std::nullptr_t) : _promise(nullptr) {}
31 promise_common() 31 promise_common()
32 { 32 {
33 _promise = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 33 _promise = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
34 } 34 }
35 ~promise_common() 35 ~promise_common()
36 { 36 {
diff --git a/src/examples/eio/efl_io_manager_ls.c b/src/examples/eio/efl_io_manager_ls.c
index b73e4544ef..65d5511026 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_app_main_loop_get(efl_app_get())); 53 Efl_Io_Manager *job = efl_add(EFL_IO_MANAGER_CLASS, efl_main_loop_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 9c3b93f08e..5c731c1186 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_app_main_loop_get(efl_app_get())); 68 job = efl_add(EFL_IO_MANAGER_CLASS, efl_main_loop_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 f5c009610f..3c39d3fc49 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_app_main_loop_get(efl_app_get())); 86 job = efl_add(EFL_IO_MANAGER_CLASS, efl_main_loop_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 26afba6b64..fb197b650c 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_app_main_loop_get(efl_app_get()), 252 root = efl_add_ref(ELDBUS_MODEL_OBJECT_CLASS, efl_main_loop_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 35b2415d3f..f5ce92d805 100644
--- a/src/lib/ecore/Ecore_Eo.h
+++ b/src/lib/ecore/Ecore_Eo.h
@@ -48,7 +48,6 @@
48#include "efl_exe.eo.h" 48#include "efl_exe.eo.h"
49 49
50#include "efl_loop.eo.h" 50#include "efl_loop.eo.h"
51#include "efl_app.eo.h"
52 51
53/** 52/**
54 * @brief Quits the main loop once all the events currently on the queue have 53 * @brief Quits the main loop once all the events currently on the queue have
@@ -103,7 +102,7 @@ EAPI Eina_Promise *efl_loop_promise_new(const Eo *obj, Eina_Promise_Cancel_Cb ca
103#include "efl_interpolator_cubic_bezier.eo.h" 102#include "efl_interpolator_cubic_bezier.eo.h"
104 103
105/* We ue the factory pattern here, so you shouldn't call eo_add directly. */ 104/* We ue the factory pattern here, so you shouldn't call eo_add directly. */
106EAPI Eo *efl_app_get(void); 105EAPI Eo *efl_main_loop_get(void);
107 106
108typedef struct _Efl_Future_Composite_Progress Efl_Future_All_Progress; 107typedef struct _Efl_Future_Composite_Progress Efl_Future_All_Progress;
109 108
diff --git a/src/lib/ecore/ecore.c b/src/lib/ecore/ecore.c
index b5ec2c8c7b..d911bc4e23 100644
--- a/src/lib/ecore/ecore.c
+++ b/src/lib/ecore/ecore.c
@@ -323,7 +323,7 @@ ecore_init(void)
323 sec = ((double) atoi(getenv("WATCHDOG_USEC"))) / 1000 / 1000; 323 sec = ((double) atoi(getenv("WATCHDOG_USEC"))) / 1000 / 1000;
324 324
325 _systemd_watchdog = 325 _systemd_watchdog =
326 efl_add(EFL_LOOP_TIMER_CLASS, efl_app_main_loop_get(efl_app_get()), 326 efl_add(EFL_LOOP_TIMER_CLASS, efl_main_loop_get(),
327 efl_loop_timer_interval_set(efl_added, sec / 2), 327 efl_loop_timer_interval_set(efl_added, sec / 2),
328 efl_event_callback_add(efl_added, 328 efl_event_callback_add(efl_added,
329 EFL_LOOP_TIMER_EVENT_TICK, 329 EFL_LOOP_TIMER_EVENT_TICK,
@@ -347,7 +347,7 @@ ecore_init(void)
347 ecore_system_modules_load(); 347 ecore_system_modules_load();
348 348
349 if (getenv("EFL_FIRST_LOOP")) 349 if (getenv("EFL_FIRST_LOOP"))
350 efl_event_callback_add(efl_app_main_loop_get(efl_app_get()), 350 efl_event_callback_add(efl_main_loop_get(),
351 EFL_LOOP_EVENT_RESUME, 351 EFL_LOOP_EVENT_RESUME,
352 _efl_first_loop_iterate, 352 _efl_first_loop_iterate,
353 getenv("EFL_FIRST_LOOP")); 353 getenv("EFL_FIRST_LOOP"));
@@ -391,7 +391,7 @@ ecore_shutdown(void)
391 if (_ecore_init_count-- != _ecore_init_count_threshold) 391 if (_ecore_init_count-- != _ecore_init_count_threshold)
392 goto end; 392 goto end;
393 393
394 efl_event_callback_call(efl_app_main_loop_get(efl_app_get()), EFL_LOOP_EVENT_TERMINATE, NULL); 394 efl_event_callback_call(efl_main_loop_get(), EFL_LOOP_EVENT_TERMINATE, NULL);
395 395
396 ecore_system_modules_unload(); 396 ecore_system_modules_unload();
397 397
diff --git a/src/lib/ecore/ecore_events.c b/src/lib/ecore/ecore_events.c
index 7b9f536a30..258e10e663 100644
--- a/src/lib/ecore/ecore_events.c
+++ b/src/lib/ecore/ecore_events.c
@@ -247,7 +247,7 @@ _ecore_event_init(void)
247 247
248 _event_msg_handler = 248 _event_msg_handler =
249 efl_loop_message_handler_get(EFL_LOOP_CLASS, 249 efl_loop_message_handler_get(EFL_LOOP_CLASS,
250 ML_OBJ, 250 _mainloop_singleton,
251 ECORE_EVENT_MESSAGE_HANDLER_CLASS); 251 ECORE_EVENT_MESSAGE_HANDLER_CLASS);
252 if (!_event_msg_handler) 252 if (!_event_msg_handler)
253 { 253 {
diff --git a/src/lib/ecore/ecore_exe.c b/src/lib/ecore/ecore_exe.c
index eb5e9abcc6..908f677539 100644
--- a/src/lib/ecore/ecore_exe.c
+++ b/src/lib/ecore/ecore_exe.c
@@ -66,7 +66,7 @@ ecore_exe_pipe_run(const char *exe_cmd,
66 const void *data) 66 const void *data)
67{ 67{
68 EINA_MAIN_LOOP_CHECK_RETURN_VAL(NULL); 68 EINA_MAIN_LOOP_CHECK_RETURN_VAL(NULL);
69 Ecore_Exe *ret = efl_add(MY_CLASS, efl_app_main_loop_get(efl_app_get()), 69 Ecore_Exe *ret = efl_add(MY_CLASS, efl_loop_main_get(EFL_LOOP_CLASS),
70 ecore_obj_exe_command_set(efl_added, exe_cmd, 70 ecore_obj_exe_command_set(efl_added, exe_cmd,
71 flags)); 71 flags));
72 if (ret) 72 if (ret)
diff --git a/src/lib/ecore/ecore_idle_enterer.c b/src/lib/ecore/ecore_idle_enterer.c
index 9e4fa081f6..9ce4716c45 100644
--- a/src/lib/ecore/ecore_idle_enterer.c
+++ b/src/lib/ecore/ecore_idle_enterer.c
@@ -30,8 +30,8 @@ ecore_idle_enterer_before_add(Ecore_Task_Cb func,
30 30
31 // This avoid us duplicating code and should only be slightly slower 31 // This avoid us duplicating code and should only be slightly slower
32 // due to a useless cycle of callback registration 32 // due to a useless cycle of callback registration
33 efl_event_callback_array_del(ML_OBJ, ecore_idle_enterer_callbacks(), ie); 33 efl_event_callback_array_del(_mainloop_singleton, ecore_idle_enterer_callbacks(), ie);
34 efl_event_callback_array_priority_add(ML_OBJ, ecore_idle_enterer_callbacks(), EFL_CALLBACK_PRIORITY_BEFORE, ie); 34 efl_event_callback_array_priority_add(_mainloop_singleton, ecore_idle_enterer_callbacks(), EFL_CALLBACK_PRIORITY_BEFORE, ie);
35 35
36 return ie; 36 return ie;
37} 37}
diff --git a/src/lib/ecore/ecore_idler.c b/src/lib/ecore/ecore_idler.c
index e95403398a..ffd4579cae 100644
--- a/src/lib/ecore/ecore_idler.c
+++ b/src/lib/ecore/ecore_idler.c
@@ -57,7 +57,7 @@ _ecore_factorized_idle_del(Ecore_Idler *idler)
57 return idler->data; 57 return idler->data;
58 } 58 }
59 59
60 efl_event_callback_array_del(ML_OBJ, idler->desc, idler); 60 efl_event_callback_array_del(_mainloop_singleton, idler->desc, idler);
61 61
62 data = idler->data; 62 data = idler->data;
63 eina_mempool_free(idler_mp, idler); 63 eina_mempool_free(idler_mp, idler);
@@ -94,7 +94,7 @@ _ecore_factorized_idle_add(const Efl_Callback_Array_Item *desc,
94 ret->references = 0; 94 ret->references = 0;
95 ret->delete_me = EINA_FALSE; 95 ret->delete_me = EINA_FALSE;
96 96
97 efl_event_callback_array_add(ML_OBJ, desc, ret); 97 efl_event_callback_array_add(_mainloop_singleton, desc, ret);
98 98
99 return ret; 99 return ret;
100} 100}
diff --git a/src/lib/ecore/ecore_main.c b/src/lib/ecore/ecore_main.c
index 050851f7ec..bc3c6c84a9 100644
--- a/src/lib/ecore/ecore_main.c
+++ b/src/lib/ecore/ecore_main.c
@@ -1069,7 +1069,7 @@ void
1069_ecore_main_loop_init(void) 1069_ecore_main_loop_init(void)
1070{ 1070{
1071 DBG("_ecore_main_loop_init"); 1071 DBG("_ecore_main_loop_init");
1072 if (!efl_app_main_loop_get(efl_app_get())) ERR("Cannot create main loop object"); 1072 if (!efl_main_loop_get()) ERR("Cannot create main loop object");
1073 _ecore_main_loop_setup(ML_OBJ, ML_DAT); 1073 _ecore_main_loop_setup(ML_OBJ, ML_DAT);
1074} 1074}
1075 1075
@@ -1372,7 +1372,7 @@ ecore_main_fd_handler_add(int fd,
1372{ 1372{
1373 Ecore_Fd_Handler *fdh = NULL; 1373 Ecore_Fd_Handler *fdh = NULL;
1374 EINA_MAIN_LOOP_CHECK_RETURN_VAL(NULL); 1374 EINA_MAIN_LOOP_CHECK_RETURN_VAL(NULL);
1375 fdh = _ecore_main_fd_handler_add(efl_app_main_loop_get(efl_app_get()), 1375 fdh = _ecore_main_fd_handler_add(efl_loop_main_get(EFL_LOOP_CLASS),
1376 ML_DAT, NULL, fd, flags, func, data, 1376 ML_DAT, NULL, fd, flags, func, data,
1377 buf_func, buf_data, EINA_FALSE); 1377 buf_func, buf_data, EINA_FALSE);
1378 if (fdh) fdh->legacy = EINA_TRUE; 1378 if (fdh) fdh->legacy = EINA_TRUE;
@@ -1388,7 +1388,7 @@ ecore_main_fd_handler_file_add(int fd,
1388 const void *buf_data) 1388 const void *buf_data)
1389{ 1389{
1390 EINA_MAIN_LOOP_CHECK_RETURN_VAL(NULL); 1390 EINA_MAIN_LOOP_CHECK_RETURN_VAL(NULL);
1391 return _ecore_main_fd_handler_add(efl_app_main_loop_get(efl_app_get()), 1391 return _ecore_main_fd_handler_add(efl_loop_main_get(EFL_LOOP_CLASS),
1392 ML_DAT, NULL, fd, flags, func, data, 1392 ML_DAT, NULL, fd, flags, func, data,
1393 buf_func, buf_data, EINA_TRUE); 1393 buf_func, buf_data, EINA_TRUE);
1394} 1394}
diff --git a/src/lib/ecore/ecore_private.h b/src/lib/ecore/ecore_private.h
index b5cba2d4aa..7ff80f57c3 100644
--- a/src/lib/ecore/ecore_private.h
+++ b/src/lib/ecore/ecore_private.h
@@ -113,13 +113,6 @@ struct _Efl_Loop_Future_Scheduler
113 Efl_Loop_Data *loop_data; 113 Efl_Loop_Data *loop_data;
114}; 114};
115 115
116typedef struct _Efl_App_Data
117{
118 Eo *main_loop;
119 Efl_Loop_Data *main_loop_data;
120 Eina_List *loops; // contains non-main_loop objects
121} Efl_App_Data;
122
123struct _Efl_Loop_Data 116struct _Efl_Loop_Data
124{ 117{
125 double loop_time; 118 double loop_time;
@@ -515,10 +508,10 @@ GENERIC_ALLOC_FREE_HEADER(Ecore_Win32_Handler, ecore_win32_handler);
515 508
516#undef GENERIC_ALLOC_FREE_HEADER 509#undef GENERIC_ALLOC_FREE_HEADER
517 510
518Eo *_efl_app; 511extern Eo *_mainloop_singleton;
519Efl_App_Data *_efl_app_data; 512extern Efl_Loop_Data *_mainloop_singleton_data;
520#define ML_OBJ (_efl_app_data->main_loop) 513#define ML_OBJ _mainloop_singleton
521#define ML_DAT (_efl_app_data->main_loop_data) 514#define ML_DAT _mainloop_singleton_data
522//#define ML_DAT efl_data_scope_get(ML_OBJ, EFL_LOOP_CLASS) 515//#define ML_DAT efl_data_scope_get(ML_OBJ, EFL_LOOP_CLASS)
523 516
524extern Efl_Version _app_efl_version; 517extern Efl_Version _app_efl_version;
@@ -532,7 +525,7 @@ void ecore_loop_promise_fulfill(Efl_Promise *p);
532// access to direct input cb 525// access to direct input cb
533#define ECORE_EVAS_INTERNAL 526#define ECORE_EVAS_INTERNAL
534 527
535#define EFL_LOOP_DATA efl_data_scope_get(efl_app_main_loop_get(efl_app_get()), EFL_LOOP_CLASS) 528#define EFL_LOOP_DATA efl_data_scope_get(efl_loop_main_get(EFL_LOOP_CLASS), EFL_LOOP_CLASS)
536 529
537EOAPI Eina_Bool efl_loop_message_process(Eo *obj); 530EOAPI Eina_Bool efl_loop_message_process(Eo *obj);
538 531
diff --git a/src/lib/ecore/ecore_signal.c b/src/lib/ecore/ecore_signal.c
index 40a1b58eb6..98934e63b3 100644
--- a/src/lib/ecore/ecore_signal.c
+++ b/src/lib/ecore/ecore_signal.c
@@ -46,7 +46,7 @@ typedef struct _Signal_Data
46} Signal_Data; 46} Signal_Data;
47 47
48static Eina_Bool 48static Eina_Bool
49_ecore_signal_pipe_read(Eo *obj EINA_UNUSED) 49_ecore_signal_pipe_read(Eo *obj)
50{ 50{
51 Signal_Data sdata; 51 Signal_Data sdata;
52 int ret; 52 int ret;
@@ -74,10 +74,14 @@ _ecore_signal_pipe_read(Eo *obj EINA_UNUSED)
74 ecore_event_add(ECORE_EVENT_SIGNAL_USER, e, 74 ecore_event_add(ECORE_EVENT_SIGNAL_USER, e,
75 _ecore_signal_generic_free, NULL); 75 _ecore_signal_generic_free, NULL);
76 } 76 }
77 if (sdata.sig == SIGUSR1) 77 Eo *loop = efl_provider_find(obj, EFL_LOOP_CLASS);
78 efl_event_callback_call(_efl_app, EFL_APP_EVENT_SIGNAL_USR1, NULL); 78 if (loop)
79 else 79 {
80 efl_event_callback_call(_efl_app, EFL_APP_EVENT_SIGNAL_USR2, NULL); 80 if (sdata.sig == SIGUSR1)
81 efl_event_callback_call(loop, EFL_LOOP_EVENT_SIGNAL_USR1, NULL);
82 else
83 efl_event_callback_call(loop, EFL_LOOP_EVENT_SIGNAL_USR2, NULL);
84 }
81 } 85 }
82 break; 86 break;
83 case SIGHUP: 87 case SIGHUP:
@@ -89,7 +93,9 @@ _ecore_signal_pipe_read(Eo *obj EINA_UNUSED)
89 ecore_event_add(ECORE_EVENT_SIGNAL_HUP, e, 93 ecore_event_add(ECORE_EVENT_SIGNAL_HUP, e,
90 _ecore_signal_generic_free, NULL); 94 _ecore_signal_generic_free, NULL);
91 } 95 }
92 efl_event_callback_call(_efl_app, EFL_APP_EVENT_SIGNAL_HUP, NULL); 96 Eo *loop = efl_provider_find(obj, EFL_LOOP_CLASS);
97 if (loop)
98 efl_event_callback_call(loop, EFL_LOOP_EVENT_SIGNAL_HUP, NULL);
93 } 99 }
94 break; 100 break;
95 case SIGQUIT: 101 case SIGQUIT:
diff --git a/src/lib/ecore/ecore_thread.c b/src/lib/ecore/ecore_thread.c
index 03d9ce3664..2dc16ed389 100644
--- a/src/lib/ecore/ecore_thread.c
+++ b/src/lib/ecore/ecore_thread.c
@@ -1635,7 +1635,7 @@ ecore_thread_future_run(Ecore_Thread_Future_Cb heavy, const void *data, Eina_Fre
1635 1635
1636 efl_domain_current_push(EFL_ID_DOMAIN_SHARED); 1636 efl_domain_current_push(EFL_ID_DOMAIN_SHARED);
1637 1637
1638 efl_wref_add(efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())), &p); 1638 efl_wref_add(efl_add(EFL_PROMISE_CLASS, efl_main_loop_get()), &p);
1639 if (!p) goto end; 1639 if (!p) goto end;
1640 1640
1641 efl_object_override(p, &thread_safe_call); 1641 efl_object_override(p, &thread_safe_call);
diff --git a/src/lib/ecore/ecore_timer.c b/src/lib/ecore/ecore_timer.c
index 94d407e712..6ef4ab254c 100644
--- a/src/lib/ecore/ecore_timer.c
+++ b/src/lib/ecore/ecore_timer.c
@@ -183,7 +183,7 @@ ecore_timer_add(double in, Ecore_Task_Cb func, const void *data)
183 } 183 }
184 legacy->func = func; 184 legacy->func = func;
185 legacy->data = data; 185 legacy->data = data;
186 timer = efl_add(MY_CLASS, efl_app_main_loop_get(efl_app_get()), 186 timer = efl_add(MY_CLASS, efl_main_loop_get(),
187 efl_event_callback_array_add(efl_added, legacy_timer(), legacy), 187 efl_event_callback_array_add(efl_added, legacy_timer(), legacy),
188 efl_key_data_set(efl_added, "_legacy", legacy), 188 efl_key_data_set(efl_added, "_legacy", legacy),
189 efl_loop_timer_interval_set(efl_added, in)); 189 efl_loop_timer_interval_set(efl_added, in));
@@ -206,7 +206,7 @@ ecore_timer_loop_add(double in, Ecore_Task_Cb func, const void *data)
206 } 206 }
207 legacy->func = func; 207 legacy->func = func;
208 legacy->data = data; 208 legacy->data = data;
209 timer = efl_add(MY_CLASS, efl_app_main_loop_get(efl_app_get()), 209 timer = efl_add(MY_CLASS, efl_main_loop_get(),
210 efl_event_callback_array_add(efl_added, legacy_timer(), legacy), 210 efl_event_callback_array_add(efl_added, legacy_timer(), legacy),
211 efl_key_data_set(efl_added, "_legacy", legacy), 211 efl_key_data_set(efl_added, "_legacy", legacy),
212 efl_loop_timer_loop_reset(efl_added), 212 efl_loop_timer_loop_reset(efl_added),
diff --git a/src/lib/ecore/efl_app.c b/src/lib/ecore/efl_app.c
deleted file mode 100644
index f9a4999436..0000000000
--- a/src/lib/ecore/efl_app.c
+++ /dev/null
@@ -1,110 +0,0 @@
1#ifdef HAVE_CONFIG_H
2# include <config.h>
3#endif
4
5#include <stdlib.h>
6#include <stdio.h>
7#include <string.h>
8#include <unistd.h>
9#include <math.h>
10#include <sys/time.h>
11#ifndef _WIN32
12# include <sys/resource.h>
13#endif
14#include <errno.h>
15
16#include "Ecore.h"
17#include "ecore_private.h"
18
19#include "ecore_main_common.h"
20
21Eo *_efl_app;
22Efl_App_Data *_efl_app_data;
23
24EOLIAN static Efl_Object *
25_efl_app_efl_object_constructor(Eo *obj, Efl_App_Data *pd)
26{
27 if (_efl_app)
28 {
29 CRI("Efl.App object already exists!");
30 return NULL;
31 }
32 obj = efl_constructor(efl_super(obj, EFL_APP_CLASS));
33 if (!obj) return NULL;
34 _efl_app = obj;
35 _efl_app_data = pd;
36 pd->main_loop = efl_add(EFL_LOOP_CLASS, NULL);
37 pd->main_loop_data = efl_data_scope_get(pd->main_loop, EFL_LOOP_CLASS);
38
39 return obj;
40}
41
42EOLIAN static void
43_efl_app_efl_object_destructor(Eo *obj, Efl_App_Data *pd)
44{
45 Eo *loop;
46 Eina_List *l, *ll;
47
48 EINA_LIST_FOREACH_SAFE(pd->loops, l, ll, loop)
49 efl_del(loop);
50 efl_del(pd->main_loop);
51 pd->main_loop = NULL;
52 pd->main_loop_data = NULL;
53 efl_destructor(efl_super(obj, EFL_APP_CLASS));
54 if (obj != _efl_app) return;
55 _efl_app = NULL;
56 _efl_app_data = NULL;
57}
58
59Efl_Version _build_efl_version = { 0, 0, 0, 0, NULL, NULL };
60
61EWAPI void
62efl_build_version_set(int vmaj, int vmin, int vmic, int revision,
63 const char *flavor, const char *build_id)
64{
65 // note: EFL has not been initialized yet at this point (ie. no eina call)
66 _build_efl_version.major = vmaj;
67 _build_efl_version.minor = vmin;
68 _build_efl_version.micro = vmic;
69 _build_efl_version.revision = revision;
70 free((char *)_build_efl_version.flavor);
71 free((char *)_build_efl_version.build_id);
72 _build_efl_version.flavor = eina_strdup(flavor);
73 _build_efl_version.build_id = eina_strdup(build_id);
74}
75
76EOLIAN static const Efl_Version *
77_efl_app_build_efl_version_get(Eo *obj EINA_UNUSED, Efl_App_Data *pd EINA_UNUSED)
78{
79 return &_build_efl_version;
80}
81
82EOLIAN static const Efl_Version *
83_efl_app_efl_version_get(Eo *obj EINA_UNUSED, Efl_App_Data *pd EINA_UNUSED)
84{
85 /* vanilla EFL: flavor = NULL */
86 static const Efl_Version version = {
87 .major = VMAJ,
88 .minor = VMIN,
89 .micro = VMIC,
90 .revision = VREV,
91 .build_id = EFL_BUILD_ID,
92 .flavor = NULL
93 };
94 return &version;
95}
96
97EOLIAN static Eo *
98_efl_app_main_loop_get(Eo *obj EINA_UNUSED, Efl_App_Data *pd)
99{
100 return pd->main_loop;
101}
102
103EAPI Eo *
104efl_app_get(void)
105{
106 if (_efl_app) return _efl_app;
107 return efl_add(EFL_APP_CLASS, NULL);
108}
109
110#include "efl_app.eo.c"
diff --git a/src/lib/ecore/efl_app.eo b/src/lib/ecore/efl_app.eo
deleted file mode 100644
index a913f8b4bf..0000000000
--- a/src/lib/ecore/efl_app.eo
+++ /dev/null
@@ -1,50 +0,0 @@
1import efl_types;
2
3class Efl.App (Efl.Object)
4{
5 [[ The EFL application
6
7 Efl.App provides an abstraction to represent the overall application. It is
8 the parent of all main loops and contains various properties for the
9 environment and current process.
10 ]]
11
12 methods {
13 @property main_loop {
14 [[Points to the main loop instance of the application.]]
15 get {}
16 values {
17 main_loop: Efl.Loop; [[Application main loop]]
18 }
19 }
20 @property build_efl_version {
21 [[Indicates the version of EFL with which this application was compiled.
22
23 This might differ from @.efl_version.
24 ]]
25 get {}
26 values {
27 @cref version: Efl.Version; [[Efl version]]
28 }
29 }
30 @property efl_version {
31 [[Indicates the currently running version of EFL.
32
33 This might differ from @.build_efl_version.
34 ]]
35 get {}
36 values {
37 @cref version: Efl.Version; [[Efl version]]
38 }
39 }
40 }
41 events {
42 signal,usr1; [[System specific, but on unix maps to SIGUSR1 signal to the process - only called on main loop object]]
43 signal,usr2; [[System specific, but on unix maps to SIGUSR2 signal to the process - only called on main loop object]]
44 signal,hup; [[System specific, but on unix maps to SIGHUP signal to the process - only called on main loop object]]
45 }
46 implements {
47 Efl.Object.constructor;
48 Efl.Object.destructor;
49 }
50}
diff --git a/src/lib/ecore/efl_general.h b/src/lib/ecore/efl_general.h
index dd03d25791..256f1065a4 100644
--- a/src/lib/ecore/efl_general.h
+++ b/src/lib/ecore/efl_general.h
@@ -93,10 +93,10 @@
93 _efl_startup_time = ecore_time_unix_get(); \ 93 _efl_startup_time = ecore_time_unix_get(); \
94 _EFL_APP_VERSION_SET(); \ 94 _EFL_APP_VERSION_SET(); \
95 ecore_init(); \ 95 ecore_init(); \
96 efl_event_callback_add(efl_app_main_loop_get(efl_app_get()), EFL_LOOP_EVENT_ARGUMENTS, efl_main, NULL); \ 96 efl_event_callback_add(efl_main_loop_get(), EFL_LOOP_EVENT_ARGUMENTS, efl_main, NULL); \
97 ecore_init_ex(argc, argv); \ 97 ecore_init_ex(argc, argv); \
98 __EFL_MAIN_CONSTRUCTOR; \ 98 __EFL_MAIN_CONSTRUCTOR; \
99 ret__ = efl_loop_begin(efl_app_main_loop_get(efl_app_get())); \ 99 ret__ = efl_loop_begin(efl_main_loop_get()); \
100 real__ = efl_loop_exit_code_process(ret__); \ 100 real__ = efl_loop_exit_code_process(ret__); \
101 __EFL_MAIN_DESTRUCTOR; \ 101 __EFL_MAIN_DESTRUCTOR; \
102 ecore_shutdown_ex(); \ 102 ecore_shutdown_ex(); \
@@ -117,10 +117,10 @@
117 _efl_startup_time = ecore_time_unix_get(); \ 117 _efl_startup_time = ecore_time_unix_get(); \
118 _EFL_APP_VERSION_SET(); \ 118 _EFL_APP_VERSION_SET(); \
119 ecore_init(); \ 119 ecore_init(); \
120 efl_event_callback_array_add(efl_app_main_loop_get(efl_app_get()), _efl_main_ex(), NULL); \ 120 efl_event_callback_array_add(efl_main_loop_get(), _efl_main_ex(), NULL); \
121 ecore_init_ex(argc, argv); \ 121 ecore_init_ex(argc, argv); \
122 __EFL_MAIN_CONSTRUCTOR; \ 122 __EFL_MAIN_CONSTRUCTOR; \
123 ret__ = efl_loop_begin(efl_app_main_loop_get(efl_app_get())); \ 123 ret__ = efl_loop_begin(efl_main_loop_get()); \
124 real__ = efl_loop_exit_code_process(ret__); \ 124 real__ = efl_loop_exit_code_process(ret__); \
125 __EFL_MAIN_DESTRUCTOR; \ 125 __EFL_MAIN_DESTRUCTOR; \
126 ecore_shutdown_ex(); \ 126 ecore_shutdown_ex(); \
diff --git a/src/lib/ecore/efl_loop.c b/src/lib/ecore/efl_loop.c
index 5495dd4bf4..74a12deb50 100644
--- a/src/lib/ecore/efl_loop.c
+++ b/src/lib/ecore/efl_loop.c
@@ -53,11 +53,31 @@ _efl_loop_message_handler_get(Eo *obj EINA_UNUSED, void *pd EINA_UNUSED, Efl_Loo
53 return mh.handler; 53 return mh.handler;
54} 54}
55 55
56Efl_Version _app_efl_version = { 0, 0, 0, 0, NULL, NULL };
57
58Eo *_mainloop_singleton = NULL;
59Efl_Loop_Data *_mainloop_singleton_data = NULL;
60
56extern Eina_Lock _environ_lock; 61extern Eina_Lock _environ_lock;
57static Eina_List *_environ_strings_set = NULL; 62static Eina_List *_environ_strings_set = NULL;
58 63
59static void _clean_old_environ(void); 64static void _clean_old_environ(void);
60 65
66EOLIAN static Efl_Loop *
67_efl_loop_main_get(Efl_Class *klass EINA_UNUSED, void *_pd EINA_UNUSED)
68{
69 if (_mainloop_singleton) return _mainloop_singleton;
70 _mainloop_singleton = efl_add(EFL_LOOP_CLASS, NULL);
71 _mainloop_singleton_data = efl_data_scope_get(_mainloop_singleton, EFL_LOOP_CLASS);
72 return _mainloop_singleton;
73}
74
75EAPI Eo *
76efl_main_loop_get(void)
77{
78 return efl_loop_main_get(EFL_LOOP_CLASS);
79}
80
61EOLIAN static void 81EOLIAN static void
62_efl_loop_iterate(Eo *obj, Efl_Loop_Data *pd) 82_efl_loop_iterate(Eo *obj, Efl_Loop_Data *pd)
63{ 83{
@@ -104,7 +124,7 @@ efl_exit(int exit_code)
104 124
105 eina_value_setup(&v, EINA_VALUE_TYPE_INT); 125 eina_value_setup(&v, EINA_VALUE_TYPE_INT);
106 eina_value_set(&v, &exit_code); 126 eina_value_set(&v, &exit_code);
107 efl_loop_quit(efl_app_main_loop_get(efl_app_get()), v); 127 efl_loop_quit(efl_main_loop_get(), v);
108} 128}
109 129
110EOLIAN static Efl_Object * 130EOLIAN static Efl_Object *
@@ -302,10 +322,6 @@ _efl_loop_efl_object_constructor(Eo *obj, Efl_Loop_Data *pd)
302 obj = efl_constructor(efl_super(obj, EFL_LOOP_CLASS)); 322 obj = efl_constructor(efl_super(obj, EFL_LOOP_CLASS));
303 if (!obj) return NULL; 323 if (!obj) return NULL;
304 324
305 efl_parent_set(obj, _efl_app);
306 if (ML_OBJ)
307 _efl_app_data->loops = eina_list_append(_efl_app_data->loops, obj);
308
309 efl_event_callback_array_add(obj, event_catcher_watch(), pd); 325 efl_event_callback_array_add(obj, event_catcher_watch(), pd);
310 326
311 pd->loop_time = ecore_time_get(); 327 pd->loop_time = ecore_time_get();
@@ -349,11 +365,13 @@ _efl_loop_efl_object_destructor(Eo *obj, Efl_Loop_Data *pd)
349 pd->env.environ_copy = NULL; 365 pd->env.environ_copy = NULL;
350 eina_lock_release(&_environ_lock); 366 eina_lock_release(&_environ_lock);
351 367
352 efl_parent_set(obj, NULL);
353 if (obj != ML_OBJ)
354 _efl_app_data->loops = eina_list_remove(_efl_app_data->loops, obj);
355
356 efl_destructor(efl_super(obj, EFL_LOOP_CLASS)); 368 efl_destructor(efl_super(obj, EFL_LOOP_CLASS));
369
370 if (obj == _mainloop_singleton)
371 {
372 _mainloop_singleton = NULL;
373 _mainloop_singleton_data = NULL;
374 }
357} 375}
358 376
359static void 377static void
@@ -380,7 +398,7 @@ _efl_loop_arguments_send(void *data, const Eina_Value v,
380 arge.initialization = initialization; 398 arge.initialization = initialization;
381 initialization = EINA_FALSE; 399 initialization = EINA_FALSE;
382 400
383 efl_event_callback_call(efl_app_main_loop_get(efl_app_get()), 401 efl_event_callback_call(efl_main_loop_get(),
384 EFL_LOOP_EVENT_ARGUMENTS, &arge); 402 EFL_LOOP_EVENT_ARGUMENTS, &arge);
385on_error: 403on_error:
386 _efl_loop_arguments_cleanup(arga); 404 _efl_loop_arguments_cleanup(arga);
@@ -397,17 +415,17 @@ ecore_loop_arguments_send(int argc, const char **argv)
397 Eina_Array *arga; 415 Eina_Array *arga;
398 int i = 0; 416 int i = 0;
399 417
400 efl_task_arg_reset(efl_app_main_loop_get(efl_app_get())); 418 efl_task_arg_reset(efl_main_loop_get());
401 arga = eina_array_new(argc); 419 arga = eina_array_new(argc);
402 for (i = 0; i < argc; i++) 420 for (i = 0; i < argc; i++)
403 { 421 {
404 eina_array_push(arga, eina_stringshare_add(argv[i])); 422 eina_array_push(arga, eina_stringshare_add(argv[i]));
405 efl_task_arg_append(efl_app_main_loop_get(efl_app_get()), argv[i]); 423 efl_task_arg_append(efl_main_loop_get(), argv[i]);
406 } 424 }
407 425
408 job = eina_future_then(efl_loop_job(efl_app_main_loop_get(efl_app_get())), 426 job = eina_future_then(efl_loop_job(efl_main_loop_get()),
409 _efl_loop_arguments_send, arga); 427 _efl_loop_arguments_send, arga);
410 efl_future_Eina_FutureXXX_then(efl_app_main_loop_get(efl_app_get()), job); 428 efl_future_Eina_FutureXXX_then(efl_main_loop_get(), job);
411} 429}
412 430
413// Only one main loop handle for now 431// Only one main loop handle for now
@@ -692,6 +710,42 @@ _efl_loop_message_process(Eo *obj, Efl_Loop_Data *pd)
692 710
693EOAPI EFL_FUNC_BODY(efl_loop_message_process, Eina_Bool, 0); 711EOAPI EFL_FUNC_BODY(efl_loop_message_process, Eina_Bool, 0);
694 712
713EWAPI void
714efl_build_version_set(int vmaj, int vmin, int vmic, int revision,
715 const char *flavor, const char *build_id)
716{
717 // note: EFL has not been initialized yet at this point (ie. no eina call)
718 _app_efl_version.major = vmaj;
719 _app_efl_version.minor = vmin;
720 _app_efl_version.micro = vmic;
721 _app_efl_version.revision = revision;
722 free((char *)_app_efl_version.flavor);
723 free((char *)_app_efl_version.build_id);
724 _app_efl_version.flavor = flavor ? strdup(flavor) : NULL;
725 _app_efl_version.build_id = build_id ? strdup(build_id) : NULL;
726}
727
728EOLIAN static const Efl_Version *
729_efl_loop_app_efl_version_get(Eo *obj EINA_UNUSED, Efl_Loop_Data *pd EINA_UNUSED)
730{
731 return &_app_efl_version;
732}
733
734EOLIAN static const Efl_Version *
735_efl_loop_efl_version_get(Eo *obj EINA_UNUSED, Efl_Loop_Data *pd EINA_UNUSED)
736{
737 /* vanilla EFL: flavor = NULL */
738 static const Efl_Version version = {
739 .major = VMAJ,
740 .minor = VMIN,
741 .micro = VMIC,
742 .revision = VREV,
743 .build_id = EFL_BUILD_ID,
744 .flavor = NULL
745 };
746 return &version;
747}
748
695static void 749static void
696_env_sync(Efl_Loop_Data *pd, Efl_Task_Data *td) 750_env_sync(Efl_Loop_Data *pd, Efl_Task_Data *td)
697{ 751{
diff --git a/src/lib/ecore/efl_loop.eo b/src/lib/ecore/efl_loop.eo
index d851750a02..e6c1229772 100644
--- a/src/lib/ecore/efl_loop.eo
+++ b/src/lib/ecore/efl_loop.eo
@@ -20,6 +20,33 @@ class Efl.Loop (Efl.Task)
20 you can provide these if you need to. 20 you can provide these if you need to.
21 ]] 21 ]]
22 methods { 22 methods {
23 @property main @class {
24 [[Points to the main loop instance of the application.]]
25 get {}
26 values {
27 main_loop: Efl.Loop; [[Application main loop]]
28 }
29 }
30 @property app_efl_version {
31 [[Indicates the version of EFL with which this application was compiled.
32
33 This might differ from @.efl_version.
34 ]]
35 get {}
36 values {
37 @cref version: Efl.Version; [[Efl version]]
38 }
39 }
40 @property efl_version {
41 [[Indicates the currently running version of EFL.
42
43 This might differ from @.app_efl_version.
44 ]]
45 get {}
46 values {
47 @cref version: Efl.Version; [[Efl version]]
48 }
49 }
23 iterate { 50 iterate {
24 [[Runs a single iteration of the main loop to process everything on the 51 [[Runs a single iteration of the main loop to process everything on the
25 queue.]] 52 queue.]]
@@ -124,6 +151,9 @@ class Efl.Loop (Efl.Task)
124 pause; [[Called when the window is not going be displayed for some time]] 151 pause; [[Called when the window is not going be displayed for some time]]
125 resume; [[Called before a window is rendered after a pause event]] 152 resume; [[Called before a window is rendered after a pause event]]
126 terminate; [[Called before starting the shutdown of Elementary]] 153 terminate; [[Called before starting the shutdown of Elementary]]
154 signal,usr1; [[System specific, but on unix maps to SIGUSR1 signal to the process - only called on main loop object]]
155 signal,usr2; [[System specific, but on unix maps to SIGUSR2 signal to the process - only called on main loop object]]
156 signal,hup; [[System specific, but on unix maps to SIGHUP signal to the process - only called on main loop object]]
127 } 157 }
128 implements { 158 implements {
129 Efl.Object.constructor; 159 Efl.Object.constructor;
diff --git a/src/lib/ecore/efl_loop_consumer.c b/src/lib/ecore/efl_loop_consumer.c
index fa53e0f12a..670e91bbc6 100644
--- a/src/lib/ecore/efl_loop_consumer.c
+++ b/src/lib/ecore/efl_loop_consumer.c
@@ -17,7 +17,7 @@ _efl_loop_consumer_loop_get(Eo *obj, Efl_Loop_Consumer_Data *pd EINA_UNUSED)
17 Efl_Loop *loop = efl_provider_find(obj, EFL_LOOP_CLASS); 17 Efl_Loop *loop = efl_provider_find(obj, EFL_LOOP_CLASS);
18 if (!loop && eina_main_loop_is()) 18 if (!loop && eina_main_loop_is())
19 { 19 {
20 loop = efl_app_main_loop_get(efl_app_get()); 20 loop = efl_main_loop_get();
21 ERR("Failed to get the loop on object %p from the main thread! " 21 ERR("Failed to get the loop on object %p from the main thread! "
22 "Returning the main loop: %p", obj, loop); 22 "Returning the main loop: %p", obj, loop);
23 } 23 }
diff --git a/src/lib/ecore/efl_model_composite_boolean.c b/src/lib/ecore/efl_model_composite_boolean.c
index d88dff1c32..d8c8e38376 100644
--- a/src/lib/ecore/efl_model_composite_boolean.c
+++ b/src/lib/ecore/efl_model_composite_boolean.c
@@ -160,7 +160,7 @@ _efl_model_composite_boolean_children_efl_model_property_get(Eo *obj EINA_UNUSED
160 Efl_Model_Hash_Value *hv = eina_hash_find(pd->parent_pd->values, property); 160 Efl_Model_Hash_Value *hv = eina_hash_find(pd->parent_pd->values, property);
161 if (hv) 161 if (hv)
162 { 162 {
163 Efl_Promise *promise = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 163 Efl_Promise *promise = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
164 Efl_Future *rfuture = efl_promise_future_get(promise); 164 Efl_Future *rfuture = efl_promise_future_get(promise);
165 165
166 Eina_Value *eina_value = eina_value_new(EINA_VALUE_TYPE_UCHAR); 166 Eina_Value *eina_value = eina_value_new(EINA_VALUE_TYPE_UCHAR);
@@ -180,7 +180,7 @@ _efl_model_composite_boolean_children_efl_model_property_get(Eo *obj EINA_UNUSED
180 return efl_model_property_get(pd->composite_child, property); 180 return efl_model_property_get(pd->composite_child, property);
181 else 181 else
182 { 182 {
183 Efl_Promise *promise = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 183 Efl_Promise *promise = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
184 Efl_Future *rfuture = efl_promise_future_get(promise); 184 Efl_Future *rfuture = efl_promise_future_get(promise);
185 185
186 efl_promise_failed_set(promise, EFL_MODEL_ERROR_NOT_FOUND); 186 efl_promise_failed_set(promise, EFL_MODEL_ERROR_NOT_FOUND);
@@ -192,7 +192,7 @@ static Efl_Future *
192_efl_model_composite_boolean_children_efl_model_property_set(Eo *obj EINA_UNUSED, 192_efl_model_composite_boolean_children_efl_model_property_set(Eo *obj EINA_UNUSED,
193 Efl_Model_Composite_Boolean_Children_Data *pd, const char *property, const Eina_Value *value) 193 Efl_Model_Composite_Boolean_Children_Data *pd, const char *property, const Eina_Value *value)
194{ 194{
195 Efl_Promise *promise = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 195 Efl_Promise *promise = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
196 Efl_Future *rfuture = efl_promise_future_get(promise); 196 Efl_Future *rfuture = efl_promise_future_get(promise);
197 197
198 Efl_Model_Hash_Value *hv = eina_hash_find(pd->parent_pd->values, property); 198 Efl_Model_Hash_Value *hv = eina_hash_find(pd->parent_pd->values, property);
@@ -567,7 +567,7 @@ _efl_model_composite_boolean_efl_model_property_get(Eo *obj EINA_UNUSED,
567 if (pd->composite_model) 567 if (pd->composite_model)
568 return efl_model_property_get(pd->composite_model, property); 568 return efl_model_property_get(pd->composite_model, property);
569 569
570 Efl_Promise *promise = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 570 Efl_Promise *promise = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
571 Efl_Future *rfuture = efl_promise_future_get(promise); 571 Efl_Future *rfuture = efl_promise_future_get(promise);
572 572
573 efl_promise_failed_set(promise, EFL_MODEL_ERROR_NOT_FOUND); 573 efl_promise_failed_set(promise, EFL_MODEL_ERROR_NOT_FOUND);
@@ -579,7 +579,7 @@ _efl_model_composite_boolean_efl_model_property_set(Eo *obj EINA_UNUSED, Efl_Mod
579 const char *property, const Eina_Value *value) 579 const char *property, const Eina_Value *value)
580{ 580{
581 581
582 Efl_Promise *promise = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 582 Efl_Promise *promise = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
583 Efl_Future *rfuture = efl_promise_future_get(promise); 583 Efl_Future *rfuture = efl_promise_future_get(promise);
584 584
585 if (pd->composite_model) 585 if (pd->composite_model)
@@ -598,7 +598,7 @@ _efl_model_composite_boolean_efl_model_property_set(Eo *obj EINA_UNUSED, Efl_Mod
598static Efl_Future * 598static Efl_Future *
599_efl_model_composite_boolean_efl_model_children_slice_get(Eo *obj, Efl_Model_Composite_Boolean_Data *pd, unsigned int start, unsigned int count) 599_efl_model_composite_boolean_efl_model_children_slice_get(Eo *obj, Efl_Model_Composite_Boolean_Data *pd, unsigned int start, unsigned int count)
600{ 600{
601 Efl_Promise *promise = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 601 Efl_Promise *promise = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
602 Efl_Future *rfuture = efl_promise_future_get(promise); 602 Efl_Future *rfuture = efl_promise_future_get(promise);
603 603
604 if (pd->composite_model) 604 if (pd->composite_model)
@@ -632,7 +632,7 @@ _efl_model_composite_boolean_efl_model_children_count_get(Eo *obj EINA_UNUSED, E
632 return efl_model_children_count_get(pd->composite_model); 632 return efl_model_children_count_get(pd->composite_model);
633 else 633 else
634 { 634 {
635 Efl_Promise *promise = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 635 Efl_Promise *promise = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
636 Efl_Future *rfuture = efl_promise_future_get(promise); 636 Efl_Future *rfuture = efl_promise_future_get(promise);
637 637
638 unsigned int *count = malloc(sizeof(unsigned int)); 638 unsigned int *count = malloc(sizeof(unsigned int));
diff --git a/src/lib/ecore/efl_model_composite_selection.c b/src/lib/ecore/efl_model_composite_selection.c
index c2e80a162a..dbbe43fc45 100644
--- a/src/lib/ecore/efl_model_composite_selection.c
+++ b/src/lib/ecore/efl_model_composite_selection.c
@@ -176,7 +176,7 @@ _efl_model_composite_selection_children_efl_model_property_set(Eo *obj EINA_UNUS
176 } 176 }
177 else 177 else
178 { 178 {
179 Efl_Promise *promise = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 179 Efl_Promise *promise = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
180 Efl_Future *rfuture = efl_promise_future_get(promise); 180 Efl_Future *rfuture = efl_promise_future_get(promise);
181 Eina_Value* true_value = eina_value_new(EINA_VALUE_TYPE_UCHAR); 181 Eina_Value* true_value = eina_value_new(EINA_VALUE_TYPE_UCHAR);
182 eina_value_set(true_value, EINA_TRUE); 182 eina_value_set(true_value, EINA_TRUE);
diff --git a/src/lib/ecore/efl_model_container.c b/src/lib/ecore/efl_model_container.c
index 4c423d6e3a..71bb9f192b 100644
--- a/src/lib/ecore/efl_model_container.c
+++ b/src/lib/ecore/efl_model_container.c
@@ -236,7 +236,7 @@ _efl_model_container_efl_model_properties_get(Eo *obj EINA_UNUSED, Efl_Model_Con
236Efl_Future * 236Efl_Future *
237_efl_model_container_efl_model_property_set(Eo *obj EINA_UNUSED, Efl_Model_Container_Data *sd EINA_UNUSED, const char *property EINA_UNUSED, const Eina_Value *value EINA_UNUSED) 237_efl_model_container_efl_model_property_set(Eo *obj EINA_UNUSED, Efl_Model_Container_Data *sd EINA_UNUSED, const char *property EINA_UNUSED, const Eina_Value *value EINA_UNUSED)
238{ 238{
239 Efl_Promise *promise = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 239 Efl_Promise *promise = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
240 Efl_Future* future = efl_promise_future_get(promise); 240 Efl_Future* future = efl_promise_future_get(promise);
241 241
242 efl_promise_failed_set(promise, EFL_MODEL_ERROR_NOT_FOUND); 242 efl_promise_failed_set(promise, EFL_MODEL_ERROR_NOT_FOUND);
@@ -247,7 +247,7 @@ Efl_Future *
247_efl_model_container_efl_model_property_get(Eo *obj EINA_UNUSED, Efl_Model_Container_Data *sd EINA_UNUSED, const char *property EINA_UNUSED) 247_efl_model_container_efl_model_property_get(Eo *obj EINA_UNUSED, Efl_Model_Container_Data *sd EINA_UNUSED, const char *property EINA_UNUSED)
248{ 248{
249 249
250 Efl_Promise *promise = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 250 Efl_Promise *promise = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
251 Efl_Future* future = efl_promise_future_get(promise); 251 Efl_Future* future = efl_promise_future_get(promise);
252 252
253 efl_promise_failed_set(promise, EFL_MODEL_ERROR_NOT_FOUND); 253 efl_promise_failed_set(promise, EFL_MODEL_ERROR_NOT_FOUND);
@@ -257,7 +257,7 @@ _efl_model_container_efl_model_property_get(Eo *obj EINA_UNUSED, Efl_Model_Conta
257static Efl_Future * 257static Efl_Future *
258_efl_model_container_efl_model_children_slice_get(Eo *obj EINA_UNUSED, Efl_Model_Container_Data *sd, unsigned int start, unsigned int count) 258_efl_model_container_efl_model_children_slice_get(Eo *obj EINA_UNUSED, Efl_Model_Container_Data *sd, unsigned int start, unsigned int count)
259{ 259{
260 Efl_Promise *promise = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 260 Efl_Promise *promise = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
261 Efl_Future* future = efl_promise_future_get(promise); 261 Efl_Future* future = efl_promise_future_get(promise);
262 262
263 Eina_Accessor* accessor = efl_model_list_slice(sd->children, start, count); 263 Eina_Accessor* accessor = efl_model_list_slice(sd->children, start, count);
@@ -269,7 +269,7 @@ _efl_model_container_efl_model_children_slice_get(Eo *obj EINA_UNUSED, Efl_Model
269static Efl_Future * 269static Efl_Future *
270_efl_model_container_efl_model_children_count_get(Eo *obj EINA_UNUSED, Efl_Model_Container_Data *sd) 270_efl_model_container_efl_model_children_count_get(Eo *obj EINA_UNUSED, Efl_Model_Container_Data *sd)
271{ 271{
272 Efl_Promise *promise = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 272 Efl_Promise *promise = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
273 Efl_Future* future = efl_promise_future_get(promise); 273 Efl_Future* future = efl_promise_future_get(promise);
274 274
275 unsigned int *count = calloc(1, sizeof(unsigned int)); 275 unsigned int *count = calloc(1, sizeof(unsigned int));
diff --git a/src/lib/ecore/efl_model_container_item.c b/src/lib/ecore/efl_model_container_item.c
index 9604a34fd6..cb95c2f4db 100644
--- a/src/lib/ecore/efl_model_container_item.c
+++ b/src/lib/ecore/efl_model_container_item.c
@@ -44,7 +44,7 @@ _efl_model_container_item_efl_model_property_set(Eo *obj EINA_UNUSED, Efl_Model_
44 Eina_Stringshare *prop_name; 44 Eina_Stringshare *prop_name;
45 Child_Property_Data *cpd; 45 Child_Property_Data *cpd;
46 void *data, *new_data; 46 void *data, *new_data;
47 Efl_Promise *promise = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 47 Efl_Promise *promise = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
48 Efl_Future* future = efl_promise_future_get(promise); 48 Efl_Future* future = efl_promise_future_get(promise);
49 49
50 if (!sd->parent_data) 50 if (!sd->parent_data)
@@ -105,7 +105,7 @@ _efl_model_container_item_efl_model_property_get(Eo *obj EINA_UNUSED, Efl_Model_
105 Eina_Stringshare *prop_name; 105 Eina_Stringshare *prop_name;
106 Child_Property_Data *cpd; 106 Child_Property_Data *cpd;
107 Eina_Value *value; 107 Eina_Value *value;
108 Efl_Promise *promise = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 108 Efl_Promise *promise = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
109 Efl_Future* future = efl_promise_future_get(promise); 109 Efl_Future* future = efl_promise_future_get(promise);
110 110
111 if (!sd->parent_data) 111 if (!sd->parent_data)
@@ -152,7 +152,7 @@ _efl_model_container_item_efl_model_property_get(Eo *obj EINA_UNUSED, Efl_Model_
152EOLIAN static Efl_Future * 152EOLIAN static Efl_Future *
153_efl_model_container_item_efl_model_children_slice_get(Eo *obj EINA_UNUSED, Efl_Model_Container_Item_Data *sd EINA_UNUSED, unsigned int start EINA_UNUSED, unsigned int count EINA_UNUSED) 153_efl_model_container_item_efl_model_children_slice_get(Eo *obj EINA_UNUSED, Efl_Model_Container_Item_Data *sd EINA_UNUSED, unsigned int start EINA_UNUSED, unsigned int count EINA_UNUSED)
154{ 154{
155 Efl_Promise *promise = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 155 Efl_Promise *promise = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
156 Efl_Future* future = efl_promise_future_get(promise); 156 Efl_Future* future = efl_promise_future_get(promise);
157 157
158 efl_promise_value_set(promise, NULL, NULL); 158 efl_promise_value_set(promise, NULL, NULL);
@@ -163,7 +163,7 @@ _efl_model_container_item_efl_model_children_slice_get(Eo *obj EINA_UNUSED, Efl_
163EOLIAN static Efl_Future * 163EOLIAN static Efl_Future *
164_efl_model_container_item_efl_model_children_count_get(Eo *obj EINA_UNUSED, Efl_Model_Container_Item_Data *sd EINA_UNUSED) 164_efl_model_container_item_efl_model_children_count_get(Eo *obj EINA_UNUSED, Efl_Model_Container_Item_Data *sd EINA_UNUSED)
165{ 165{
166 Efl_Promise *promise = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 166 Efl_Promise *promise = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
167 Efl_Future* future = efl_promise_future_get(promise); 167 Efl_Future* future = efl_promise_future_get(promise);
168 168
169 unsigned int *count = calloc(1, sizeof(unsigned int)); 169 unsigned int *count = calloc(1, sizeof(unsigned int));
diff --git a/src/lib/ecore/efl_model_item.c b/src/lib/ecore/efl_model_item.c
index 4a71470792..571f3e4131 100644
--- a/src/lib/ecore/efl_model_item.c
+++ b/src/lib/ecore/efl_model_item.c
@@ -70,7 +70,7 @@ _efl_model_item_efl_model_properties_get(Eo *obj EINA_UNUSED, Efl_Model_Item_Dat
70static Efl_Future* 70static Efl_Future*
71_efl_model_item_efl_model_property_set(Eo *obj EINA_UNUSED, Efl_Model_Item_Data *sd, const char *property, const Eina_Value *value) 71_efl_model_item_efl_model_property_set(Eo *obj EINA_UNUSED, Efl_Model_Item_Data *sd, const char *property, const Eina_Value *value)
72{ 72{
73 Efl_Promise *promise = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 73 Efl_Promise *promise = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
74 Efl_Future* future = efl_promise_future_get(promise); 74 Efl_Future* future = efl_promise_future_get(promise);
75 Efl_Model_Property_Event evt; 75 Efl_Model_Property_Event evt;
76 76
@@ -119,7 +119,7 @@ err1:
119static Efl_Future * 119static Efl_Future *
120_efl_model_item_efl_model_property_get(Eo *obj EINA_UNUSED, Efl_Model_Item_Data *sd, const char *property) 120_efl_model_item_efl_model_property_get(Eo *obj EINA_UNUSED, Efl_Model_Item_Data *sd, const char *property)
121{ 121{
122 Efl_Promise *promise = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 122 Efl_Promise *promise = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
123 Efl_Future *rfuture = efl_promise_future_get(promise); 123 Efl_Future *rfuture = efl_promise_future_get(promise);
124 124
125 Eina_Stringshare *sshare = eina_stringshare_add(property); 125 Eina_Stringshare *sshare = eina_stringshare_add(property);
@@ -136,7 +136,7 @@ _efl_model_item_efl_model_property_get(Eo *obj EINA_UNUSED, Efl_Model_Item_Data
136static Efl_Future * 136static Efl_Future *
137_efl_model_item_efl_model_children_slice_get(Eo *obj EINA_UNUSED, Efl_Model_Item_Data *sd, unsigned int start, unsigned int count) 137_efl_model_item_efl_model_children_slice_get(Eo *obj EINA_UNUSED, Efl_Model_Item_Data *sd, unsigned int start, unsigned int count)
138{ 138{
139 Efl_Promise *promise = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 139 Efl_Promise *promise = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
140 Efl_Future *rfuture = efl_promise_future_get(promise); 140 Efl_Future *rfuture = efl_promise_future_get(promise);
141 141
142 Eina_Accessor* accessor = efl_model_list_slice(sd->children, start, count); 142 Eina_Accessor* accessor = efl_model_list_slice(sd->children, start, count);
@@ -148,7 +148,7 @@ _efl_model_item_efl_model_children_slice_get(Eo *obj EINA_UNUSED, Efl_Model_Item
148static Efl_Future * 148static Efl_Future *
149_efl_model_item_efl_model_children_count_get(Eo *obj EINA_UNUSED, Efl_Model_Item_Data *sd) 149_efl_model_item_efl_model_children_count_get(Eo *obj EINA_UNUSED, Efl_Model_Item_Data *sd)
150{ 150{
151 Efl_Promise *promise = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 151 Efl_Promise *promise = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
152 Efl_Future *rfuture = efl_promise_future_get(promise); 152 Efl_Future *rfuture = efl_promise_future_get(promise);
153 153
154 unsigned int *count = calloc(1, sizeof(unsigned int)); 154 unsigned int *count = calloc(1, sizeof(unsigned int));
diff --git a/src/lib/ecore_con/ecore_con_legacy.c b/src/lib/ecore_con/ecore_con_legacy.c
index c3412eef80..ea8c31f6cd 100644
--- a/src/lib/ecore_con/ecore_con_legacy.c
+++ b/src/lib/ecore_con/ecore_con_legacy.c
@@ -818,7 +818,7 @@ _ecore_con_client_ssl_upgrade_job(void *data, const Eina_Value v,
818 const Eina_Future *dead EINA_UNUSED) 818 const Eina_Future *dead EINA_UNUSED)
819{ 819{
820 Ecore_Con_Client *cl = data; 820 Ecore_Con_Client *cl = data;
821 Eo *loop = efl_app_main_loop_get(efl_app_get()); 821 Eo *loop = efl_main_loop_get();
822 Eo *inner_socket; 822 Eo *inner_socket;
823 Eo *socket; 823 Eo *socket;
824 Eo *tcp_socket; 824 Eo *tcp_socket;
@@ -1604,7 +1604,7 @@ _ecore_con_server_server_ssl_job(void *data, const Eina_Value v,
1604 const Eina_Future *dead EINA_UNUSED) 1604 const Eina_Future *dead EINA_UNUSED)
1605{ 1605{
1606 Ecore_Con_Server *svr = data; 1606 Ecore_Con_Server *svr = data;
1607 Eo *loop = efl_app_main_loop_get(efl_app_get()); 1607 Eo *loop = efl_main_loop_get();
1608 Eo *ssl_ctx; 1608 Eo *ssl_ctx;
1609 Eo *inner_server; 1609 Eo *inner_server;
1610 Eo *server; 1610 Eo *server;
@@ -1683,7 +1683,7 @@ ecore_con_server_add(Ecore_Con_Type compl_type,
1683 return NULL; 1683 return NULL;
1684 } 1684 }
1685 1685
1686 loop = efl_app_main_loop_get(efl_app_get()); 1686 loop = efl_main_loop_get();
1687 EINA_SAFETY_ON_NULL_RETURN_VAL(loop, NULL); 1687 EINA_SAFETY_ON_NULL_RETURN_VAL(loop, NULL);
1688 1688
1689 svr = _ecore_con_server_new(EINA_FALSE, compl_type, name, port, data); 1689 svr = _ecore_con_server_new(EINA_FALSE, compl_type, name, port, data);
@@ -1946,7 +1946,7 @@ _ecore_con_server_dialer_ssl_job(void *data, const Eina_Value v,
1946 const Eina_Future *dead EINA_UNUSED) 1946 const Eina_Future *dead EINA_UNUSED)
1947{ 1947{
1948 Ecore_Con_Server *svr = data; 1948 Ecore_Con_Server *svr = data;
1949 Eo *loop = efl_app_main_loop_get(efl_app_get()); 1949 Eo *loop = efl_main_loop_get();
1950 Eo *ssl_ctx; 1950 Eo *ssl_ctx;
1951 Eo *inner_dialer; 1951 Eo *inner_dialer;
1952 Eo *dialer; 1952 Eo *dialer;
@@ -2036,7 +2036,7 @@ _ecore_con_server_dialer_ssl_upgrade_job(void *data, const Eina_Value v,
2036 const Eina_Future *dead EINA_UNUSED) 2036 const Eina_Future *dead EINA_UNUSED)
2037{ 2037{
2038 Ecore_Con_Server *svr = data; 2038 Ecore_Con_Server *svr = data;
2039 Eo *loop = efl_app_main_loop_get(efl_app_get()); 2039 Eo *loop = efl_main_loop_get();
2040 Eo *ssl_ctx; 2040 Eo *ssl_ctx;
2041 Eo *inner_dialer; 2041 Eo *inner_dialer;
2042 Eo *dialer; 2042 Eo *dialer;
@@ -2140,7 +2140,7 @@ ecore_con_server_connect(Ecore_Con_Type compl_type,
2140 2140
2141 type = compl_type & ECORE_CON_TYPE; 2141 type = compl_type & ECORE_CON_TYPE;
2142 2142
2143 loop = efl_app_main_loop_get(efl_app_get()); 2143 loop = efl_main_loop_get();
2144 EINA_SAFETY_ON_NULL_RETURN_VAL(loop, NULL); 2144 EINA_SAFETY_ON_NULL_RETURN_VAL(loop, NULL);
2145 2145
2146 svr = _ecore_con_server_new(EINA_TRUE, compl_type, name, port, data); 2146 svr = _ecore_con_server_new(EINA_TRUE, compl_type, name, port, data);
diff --git a/src/lib/ecore_con/ecore_con_url.c b/src/lib/ecore_con/ecore_con_url.c
index 43d13ff62e..e8ca8c4cdf 100644
--- a/src/lib/ecore_con/ecore_con_url.c
+++ b/src/lib/ecore_con/ecore_con_url.c
@@ -704,7 +704,7 @@ _ecore_con_url_request_prepare(Ecore_Con_Url *url_con, const char *method)
704 if (proxy_url) 704 if (proxy_url)
705 DBG("proxy_url='%s'", proxy_url); 705 DBG("proxy_url='%s'", proxy_url);
706 706
707 url_con->dialer = efl_add(EFL_NET_DIALER_HTTP_CLASS, efl_app_main_loop_get(efl_app_get()), 707 url_con->dialer = efl_add(EFL_NET_DIALER_HTTP_CLASS, efl_main_loop_get(),
708 efl_net_dialer_http_method_set(efl_added, url_con->custom_request ? url_con->custom_request : method), 708 efl_net_dialer_http_method_set(efl_added, url_con->custom_request ? url_con->custom_request : method),
709 efl_net_dialer_http_primary_mode_set(efl_added, (strcmp(method, "PUT") == 0) ? EFL_NET_DIALER_HTTP_PRIMARY_MODE_UPLOAD : EFL_NET_DIALER_HTTP_PRIMARY_MODE_DOWNLOAD), 709 efl_net_dialer_http_primary_mode_set(efl_added, (strcmp(method, "PUT") == 0) ? EFL_NET_DIALER_HTTP_PRIMARY_MODE_UPLOAD : EFL_NET_DIALER_HTTP_PRIMARY_MODE_DOWNLOAD),
710 efl_net_dialer_proxy_set(efl_added, proxy_url), 710 efl_net_dialer_proxy_set(efl_added, proxy_url),
diff --git a/src/lib/ecore_con/efl_net_ip_address.c b/src/lib/ecore_con/efl_net_ip_address.c
index 9b5cec2bdb..13e14a052d 100644
--- a/src/lib/ecore_con/efl_net_ip_address.c
+++ b/src/lib/ecore_con/efl_net_ip_address.c
@@ -547,7 +547,7 @@ _efl_net_ip_address_resolve(Eo *cls EINA_UNUSED, void *pd EINA_UNUSED, const cha
547 ctx->thread = efl_net_ip_resolve_async_new(host, port, &hints, _efl_net_ip_address_resolve_done, ctx); 547 ctx->thread = efl_net_ip_resolve_async_new(host, port, &hints, _efl_net_ip_address_resolve_done, ctx);
548 EINA_SAFETY_ON_NULL_GOTO(ctx->thread, error_thread); 548 EINA_SAFETY_ON_NULL_GOTO(ctx->thread, error_thread);
549 549
550 ctx->promise = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get()), 550 ctx->promise = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get(),
551 efl_event_callback_add(efl_added, EFL_EVENT_DEL, _efl_net_ip_address_resolve_del, ctx)); 551 efl_event_callback_add(efl_added, EFL_EVENT_DEL, _efl_net_ip_address_resolve_del, ctx));
552 EINA_SAFETY_ON_NULL_GOTO(ctx->promise, error_promise); 552 EINA_SAFETY_ON_NULL_GOTO(ctx->promise, error_promise);
553 553
diff --git a/src/lib/ecore_file/ecore_file_download.c b/src/lib/ecore_file/ecore_file_download.c
index fdbb405715..1323dbc8e6 100644
--- a/src/lib/ecore_file/ecore_file_download.c
+++ b/src/lib/ecore_file/ecore_file_download.c
@@ -215,7 +215,7 @@ ecore_file_download_full(const char *url,
215 return EINA_FALSE; 215 return EINA_FALSE;
216 } 216 }
217 217
218 loop = efl_app_main_loop_get(efl_app_get()); 218 loop = efl_main_loop_get();
219 EINA_SAFETY_ON_NULL_RETURN_VAL(loop, EINA_FALSE); 219 EINA_SAFETY_ON_NULL_RETURN_VAL(loop, EINA_FALSE);
220 220
221 job = calloc(1, sizeof(Ecore_File_Download_Job)); 221 job = calloc(1, sizeof(Ecore_File_Download_Job));
diff --git a/src/lib/ecore_ipc/ecore_ipc.c b/src/lib/ecore_ipc/ecore_ipc.c
index 84e1f54eda..c0fcd8be63 100644
--- a/src/lib/ecore_ipc/ecore_ipc.c
+++ b/src/lib/ecore_ipc/ecore_ipc.c
@@ -382,7 +382,7 @@ EAPI Ecore_Ipc_Server *
382ecore_ipc_server_add(Ecore_Ipc_Type type, const char *name, int port, const void *data) 382ecore_ipc_server_add(Ecore_Ipc_Type type, const char *name, int port, const void *data)
383{ 383{
384 Ecore_Ipc_Server *svr; 384 Ecore_Ipc_Server *svr;
385 Eo *loop = efl_app_main_loop_get(efl_app_get()); 385 Eo *loop = efl_main_loop_get();
386 char *address = NULL; 386 char *address = NULL;
387 Eina_Error err; 387 Eina_Error err;
388#ifdef EFL_NET_SERVER_UNIX_CLASS 388#ifdef EFL_NET_SERVER_UNIX_CLASS
@@ -404,7 +404,7 @@ ecore_ipc_server_add(Ecore_Ipc_Type type, const char *name, int port, const void
404 404
405 new_mask = S_IRGRP | S_IWGRP | S_IXGRP | S_IROTH | S_IWOTH | S_IXOTH; 405 new_mask = S_IRGRP | S_IWGRP | S_IXGRP | S_IROTH | S_IWOTH | S_IXOTH;
406 406
407 svr->server = efl_add(EFL_NET_SERVER_UNIX_CLASS, efl_app_main_loop_get(efl_app_get()), 407 svr->server = efl_add(EFL_NET_SERVER_UNIX_CLASS, efl_main_loop_get(),
408 efl_net_server_unix_leading_directories_create_set(efl_added, EINA_TRUE, S_IRUSR | S_IWUSR | S_IXUSR)); 408 efl_net_server_unix_leading_directories_create_set(efl_added, EINA_TRUE, S_IRUSR | S_IWUSR | S_IXUSR));
409 EINA_SAFETY_ON_NULL_GOTO(svr->server, error_server); 409 EINA_SAFETY_ON_NULL_GOTO(svr->server, error_server);
410 } 410 }
@@ -418,7 +418,7 @@ ecore_ipc_server_add(Ecore_Ipc_Type type, const char *name, int port, const void
418 new_mask = 0; 418 new_mask = 0;
419 local_system = EINA_TRUE; 419 local_system = EINA_TRUE;
420 420
421 svr->server = efl_add(EFL_NET_SERVER_UNIX_CLASS, efl_app_main_loop_get(efl_app_get())); 421 svr->server = efl_add(EFL_NET_SERVER_UNIX_CLASS, efl_main_loop_get());
422 EINA_SAFETY_ON_NULL_GOTO(svr->server, error_server); 422 EINA_SAFETY_ON_NULL_GOTO(svr->server, error_server);
423 } 423 }
424#endif /* EFL_NET_SERVER_UNIX_CLASS */ 424#endif /* EFL_NET_SERVER_UNIX_CLASS */
@@ -431,7 +431,7 @@ ecore_ipc_server_add(Ecore_Ipc_Type type, const char *name, int port, const void
431 // TODO: specify SECURITY_ATTRIBUTES to use or some 431 // TODO: specify SECURITY_ATTRIBUTES to use or some
432 // Efl_Net_Server_Windows API to limit access 432 // Efl_Net_Server_Windows API to limit access
433 433
434 svr->server = efl_add(EFL_NET_SERVER_WINDOWS_CLASS, efl_app_main_loop_get(efl_app_get())); 434 svr->server = efl_add(EFL_NET_SERVER_WINDOWS_CLASS, efl_main_loop_get());
435 EINA_SAFETY_ON_NULL_GOTO(svr->server, error_server); 435 EINA_SAFETY_ON_NULL_GOTO(svr->server, error_server);
436 } 436 }
437 else if ((type & ECORE_IPC_TYPE) == ECORE_IPC_LOCAL_SYSTEM) 437 else if ((type & ECORE_IPC_TYPE) == ECORE_IPC_LOCAL_SYSTEM)
@@ -442,7 +442,7 @@ ecore_ipc_server_add(Ecore_Ipc_Type type, const char *name, int port, const void
442 // TODO: specify SECURITY_ATTRIBUTES to use or some 442 // TODO: specify SECURITY_ATTRIBUTES to use or some
443 // Efl_Net_Server_Windows API to limit access 443 // Efl_Net_Server_Windows API to limit access
444 444
445 svr->server = efl_add(EFL_NET_SERVER_WINDOWS_CLASS, efl_app_main_loop_get(efl_app_get())); 445 svr->server = efl_add(EFL_NET_SERVER_WINDOWS_CLASS, efl_main_loop_get());
446 EINA_SAFETY_ON_NULL_GOTO(svr->server, error_server); 446 EINA_SAFETY_ON_NULL_GOTO(svr->server, error_server);
447 } 447 }
448#endif /* EFL_NET_SERVER_WINDOWS_CLASS */ 448#endif /* EFL_NET_SERVER_WINDOWS_CLASS */
@@ -653,7 +653,7 @@ EAPI Ecore_Ipc_Server *
653ecore_ipc_server_connect(Ecore_Ipc_Type type, char *name, int port, const void *data) 653ecore_ipc_server_connect(Ecore_Ipc_Type type, char *name, int port, const void *data)
654{ 654{
655 Ecore_Ipc_Server *svr; 655 Ecore_Ipc_Server *svr;
656 Eo *loop = efl_app_main_loop_get(efl_app_get()); 656 Eo *loop = efl_main_loop_get();
657 char *address = NULL; 657 char *address = NULL;
658 Eina_Error err; 658 Eina_Error err;
659 659
@@ -681,7 +681,7 @@ ecore_ipc_server_connect(Ecore_Ipc_Type type, char *name, int port, const void *
681 goto error_dialer; 681 goto error_dialer;
682 } 682 }
683 683
684 svr->dialer.dialer = efl_add(EFL_NET_DIALER_UNIX_CLASS, efl_app_main_loop_get(efl_app_get())); 684 svr->dialer.dialer = efl_add(EFL_NET_DIALER_UNIX_CLASS, efl_main_loop_get());
685 EINA_SAFETY_ON_NULL_GOTO(svr->dialer.dialer, error_dialer); 685 EINA_SAFETY_ON_NULL_GOTO(svr->dialer.dialer, error_dialer);
686 } 686 }
687 else if ((type & ECORE_IPC_TYPE) == ECORE_IPC_LOCAL_SYSTEM) 687 else if ((type & ECORE_IPC_TYPE) == ECORE_IPC_LOCAL_SYSTEM)
@@ -689,7 +689,7 @@ ecore_ipc_server_connect(Ecore_Ipc_Type type, char *name, int port, const void *
689 address = ecore_con_local_path_new(EINA_TRUE, name, port); 689 address = ecore_con_local_path_new(EINA_TRUE, name, port);
690 EINA_SAFETY_ON_NULL_GOTO(address, error_dialer); 690 EINA_SAFETY_ON_NULL_GOTO(address, error_dialer);
691 691
692 svr->dialer.dialer = efl_add(EFL_NET_DIALER_UNIX_CLASS, efl_app_main_loop_get(efl_app_get())); 692 svr->dialer.dialer = efl_add(EFL_NET_DIALER_UNIX_CLASS, efl_main_loop_get());
693 EINA_SAFETY_ON_NULL_GOTO(svr->dialer.dialer, error_dialer); 693 EINA_SAFETY_ON_NULL_GOTO(svr->dialer.dialer, error_dialer);
694 } 694 }
695#endif /* EFL_NET_DIALER_UNIX_CLASS */ 695#endif /* EFL_NET_DIALER_UNIX_CLASS */
@@ -699,7 +699,7 @@ ecore_ipc_server_connect(Ecore_Ipc_Type type, char *name, int port, const void *
699 address = ecore_con_local_path_new(EINA_FALSE, name, port); 699 address = ecore_con_local_path_new(EINA_FALSE, name, port);
700 EINA_SAFETY_ON_NULL_GOTO(address, error_dialer); 700 EINA_SAFETY_ON_NULL_GOTO(address, error_dialer);
701 701
702 svr->dialer.dialer = efl_add(EFL_NET_DIALER_WINDOWS_CLASS, efl_app_main_loop_get(efl_app_get())); 702 svr->dialer.dialer = efl_add(EFL_NET_DIALER_WINDOWS_CLASS, efl_main_loop_get());
703 EINA_SAFETY_ON_NULL_GOTO(svr->dialer.dialer, error_dialer); 703 EINA_SAFETY_ON_NULL_GOTO(svr->dialer.dialer, error_dialer);
704 } 704 }
705 else if ((type & ECORE_IPC_TYPE) == ECORE_IPC_LOCAL_SYSTEM) 705 else if ((type & ECORE_IPC_TYPE) == ECORE_IPC_LOCAL_SYSTEM)
@@ -707,7 +707,7 @@ ecore_ipc_server_connect(Ecore_Ipc_Type type, char *name, int port, const void *
707 address = ecore_con_local_path_new(EINA_TRUE, name, port); 707 address = ecore_con_local_path_new(EINA_TRUE, name, port);
708 EINA_SAFETY_ON_NULL_GOTO(address, error_dialer); 708 EINA_SAFETY_ON_NULL_GOTO(address, error_dialer);
709 709
710 svr->dialer.dialer = efl_add(EFL_NET_DIALER_WINDOWS_CLASS, efl_app_main_loop_get(efl_app_get())); 710 svr->dialer.dialer = efl_add(EFL_NET_DIALER_WINDOWS_CLASS, efl_main_loop_get());
711 EINA_SAFETY_ON_NULL_GOTO(svr->dialer.dialer, error_dialer); 711 EINA_SAFETY_ON_NULL_GOTO(svr->dialer.dialer, error_dialer);
712 } 712 }
713#endif /* EFL_NET_DIALER_WINDOWS_CLASS */ 713#endif /* EFL_NET_DIALER_WINDOWS_CLASS */
diff --git a/src/lib/edje/edje_main.c b/src/lib/edje/edje_main.c
index d308df68a1..551b4f2e6e 100644
--- a/src/lib/edje/edje_main.c
+++ b/src/lib/edje/edje_main.c
@@ -85,9 +85,9 @@ edje_init(void)
85 _edje_scale = FROM_DOUBLE(1.0); 85 _edje_scale = FROM_DOUBLE(1.0);
86 _edje_global_obj = efl_add(EDJE_GLOBAL_CLASS, NULL); 86 _edje_global_obj = efl_add(EDJE_GLOBAL_CLASS, NULL);
87 if (!_edje_global_obj || 87 if (!_edje_global_obj ||
88 !efl_loop_register(efl_app_main_loop_get(efl_app_get()), EFL_GFX_COLOR_CLASS_INTERFACE, _edje_global_obj) || 88 !efl_loop_register(efl_main_loop_get(), EFL_GFX_COLOR_CLASS_INTERFACE, _edje_global_obj) ||
89 !efl_loop_register(efl_app_main_loop_get(efl_app_get()), EFL_GFX_TEXT_CLASS_INTERFACE, _edje_global_obj) || 89 !efl_loop_register(efl_main_loop_get(), EFL_GFX_TEXT_CLASS_INTERFACE, _edje_global_obj) ||
90 !efl_loop_register(efl_app_main_loop_get(efl_app_get()), EFL_GFX_SIZE_CLASS_INTERFACE, _edje_global_obj)) 90 !efl_loop_register(efl_main_loop_get(), EFL_GFX_SIZE_CLASS_INTERFACE, _edje_global_obj))
91 goto shutdown_efreet; 91 goto shutdown_efreet;
92 92
93 _edje_edd_init(); 93 _edje_edd_init();
@@ -150,9 +150,9 @@ shutdown_all:
150 _edje_edd_shutdown(); 150 _edje_edd_shutdown();
151 if (_edje_global_obj) 151 if (_edje_global_obj)
152 { 152 {
153 efl_loop_unregister(efl_app_main_loop_get(efl_app_get()), EFL_GFX_COLOR_CLASS_INTERFACE, _edje_global_obj); 153 efl_loop_unregister(efl_main_loop_get(), EFL_GFX_COLOR_CLASS_INTERFACE, _edje_global_obj);
154 efl_loop_unregister(efl_app_main_loop_get(efl_app_get()), EFL_GFX_TEXT_CLASS_INTERFACE, _edje_global_obj); 154 efl_loop_unregister(efl_main_loop_get(), EFL_GFX_TEXT_CLASS_INTERFACE, _edje_global_obj);
155 efl_loop_unregister(efl_app_main_loop_get(efl_app_get()), EFL_GFX_SIZE_CLASS_INTERFACE, _edje_global_obj); 155 efl_loop_unregister(efl_main_loop_get(), EFL_GFX_SIZE_CLASS_INTERFACE, _edje_global_obj);
156 efl_del(_edje_global_obj); 156 efl_del(_edje_global_obj);
157 _edje_global_obj = NULL; 157 _edje_global_obj = NULL;
158 } 158 }
@@ -209,9 +209,9 @@ _edje_shutdown_core(void)
209 _edje_text_class_hash_free(); 209 _edje_text_class_hash_free();
210 _edje_size_class_hash_free(); 210 _edje_size_class_hash_free();
211 _edje_edd_shutdown(); 211 _edje_edd_shutdown();
212 efl_loop_unregister(efl_app_main_loop_get(efl_app_get()), EFL_GFX_COLOR_CLASS_INTERFACE, _edje_global_obj); 212 efl_loop_unregister(efl_main_loop_get(), EFL_GFX_COLOR_CLASS_INTERFACE, _edje_global_obj);
213 efl_loop_unregister(efl_app_main_loop_get(efl_app_get()), EFL_GFX_TEXT_CLASS_INTERFACE, _edje_global_obj); 213 efl_loop_unregister(efl_main_loop_get(), EFL_GFX_TEXT_CLASS_INTERFACE, _edje_global_obj);
214 efl_loop_unregister(efl_app_main_loop_get(efl_app_get()), EFL_GFX_SIZE_CLASS_INTERFACE, _edje_global_obj); 214 efl_loop_unregister(efl_main_loop_get(), EFL_GFX_SIZE_CLASS_INTERFACE, _edje_global_obj);
215 efl_del(_edje_global_obj); 215 efl_del(_edje_global_obj);
216 _edje_global_obj = NULL; 216 _edje_global_obj = NULL;
217 217
diff --git a/src/lib/edje/edje_private.h b/src/lib/edje/edje_private.h
index 02cbceaeab..0261581f04 100644
--- a/src/lib/edje/edje_private.h
+++ b/src/lib/edje/edje_private.h
@@ -2415,7 +2415,7 @@ static inline Edje_Global *
2415_edje_global(void) 2415_edje_global(void)
2416{ 2416{
2417#ifndef NDEBUG 2417#ifndef NDEBUG
2418 return efl_provider_find(efl_app_main_loop_get(efl_app_get()), EFL_GFX_COLOR_CLASS_INTERFACE); 2418 return efl_provider_find(efl_main_loop_get(), EFL_GFX_COLOR_CLASS_INTERFACE);
2419#else 2419#else
2420 extern Edje_Global *_edje_global_obj; 2420 extern Edje_Global *_edje_global_obj;
2421 return _edje_global_obj; 2421 return _edje_global_obj;
diff --git a/src/lib/eio/eio_main.c b/src/lib/eio/eio_main.c
index 60d6796c87..44c4e9dfc0 100644
--- a/src/lib/eio/eio_main.c
+++ b/src/lib/eio/eio_main.c
@@ -319,8 +319,8 @@ eio_init(void)
319 319
320 efreet_mime_init(); 320 efreet_mime_init();
321 321
322 io_manager = efl_add(EFL_IO_MANAGER_CLASS, efl_app_main_loop_get(efl_app_get())); 322 io_manager = efl_add(EFL_IO_MANAGER_CLASS, efl_main_loop_get());
323 efl_loop_register(efl_app_main_loop_get(efl_app_get()), EFL_IO_MANAGER_CLASS, io_manager); 323 efl_loop_register(efl_main_loop_get(), EFL_IO_MANAGER_CLASS, io_manager);
324 324
325 eina_log_timing(_eio_log_dom_global, 325 eina_log_timing(_eio_log_dom_global,
326 EINA_LOG_STATE_STOP, 326 EINA_LOG_STATE_STOP,
@@ -358,7 +358,7 @@ eio_shutdown(void)
358 EINA_LOG_STATE_START, 358 EINA_LOG_STATE_START,
359 EINA_LOG_STATE_SHUTDOWN); 359 EINA_LOG_STATE_SHUTDOWN);
360 360
361 efl_loop_unregister(efl_app_main_loop_get(efl_app_get()), EFL_IO_MANAGER_CLASS, io_manager); 361 efl_loop_unregister(efl_main_loop_get(), EFL_IO_MANAGER_CLASS, io_manager);
362 efl_del(io_manager); 362 efl_del(io_manager);
363 io_manager = NULL; 363 io_manager = NULL;
364 364
diff --git a/src/lib/eio/eio_model.c b/src/lib/eio/eio_model.c
index cb1d388e75..ec2672d7f1 100644
--- a/src/lib/eio/eio_model.c
+++ b/src/lib/eio/eio_model.c
@@ -824,7 +824,7 @@ _eio_model_efl_object_provider_find(const Eo *obj, Eio_Model_Data *priv EINA_UNU
824 824
825 // Provide main loop even if we don't have a loop user parent 825 // Provide main loop even if we don't have a loop user parent
826 if (!provider && (klass == EFL_LOOP_CLASS) && eina_main_loop_is()) 826 if (!provider && (klass == EFL_LOOP_CLASS) && eina_main_loop_is())
827 return efl_app_main_loop_get(efl_app_get()); 827 return efl_main_loop_get();
828 828
829 return provider; 829 return provider;
830} 830}
diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c
index 8196635b1b..f9f9723d8e 100644
--- a/src/lib/elementary/efl_ui_win.c
+++ b/src/lib/elementary/efl_ui_win.c
@@ -5431,7 +5431,7 @@ _elm_win_finalize_internal(Eo *obj, Efl_Ui_Win_Data *sd, const char *name, Efl_U
5431 efl_access_window_created_signal_emit(obj); 5431 efl_access_window_created_signal_emit(obj);
5432 5432
5433 // attach config API 5433 // attach config API
5434 efl_composite_attach(obj, efl_provider_find(efl_app_main_loop_get(efl_app_get()), EFL_CONFIG_GLOBAL_CLASS)); 5434 efl_composite_attach(obj, efl_provider_find(efl_main_loop_get(), EFL_CONFIG_GLOBAL_CLASS));
5435 5435
5436 efl_event_callback_array_add(sd->evas, _elm_evas_tracking(), sd); 5436 efl_event_callback_array_add(sd->evas, _elm_evas_tracking(), sd);
5437 efl_event_callback_array_add(obj, _elm_win_evas_feed_fake_callbacks(), sd->evas); 5437 efl_event_callback_array_add(obj, _elm_win_evas_feed_fake_callbacks(), sd->evas);
diff --git a/src/lib/elementary/elm_config.c b/src/lib/elementary/elm_config.c
index 5763011f36..ae760472ab 100644
--- a/src/lib/elementary/elm_config.c
+++ b/src/lib/elementary/elm_config.c
@@ -1666,8 +1666,8 @@ static void
1666_config_load(void) 1666_config_load(void)
1667{ 1667{
1668 _efl_config_obj = efl_add(EFL_CONFIG_GLOBAL_CLASS, NULL); 1668 _efl_config_obj = efl_add(EFL_CONFIG_GLOBAL_CLASS, NULL);
1669 efl_loop_register(efl_app_main_loop_get(efl_app_get()), EFL_CONFIG_INTERFACE, _efl_config_obj); 1669 efl_loop_register(efl_main_loop_get(), EFL_CONFIG_INTERFACE, _efl_config_obj);
1670 efl_loop_register(efl_app_main_loop_get(efl_app_get()), EFL_CONFIG_GLOBAL_CLASS, _efl_config_obj); 1670 efl_loop_register(efl_main_loop_get(), EFL_CONFIG_GLOBAL_CLASS, _efl_config_obj);
1671 efl_del_intercept_set(_efl_config_obj, _efl_config_obj_del); 1671 efl_del_intercept_set(_efl_config_obj, _efl_config_obj_del);
1672 _elm_config = _config_user_load(); 1672 _elm_config = _config_user_load();
1673 if (_elm_config) 1673 if (_elm_config)
@@ -4620,8 +4620,8 @@ void
4620_elm_config_shutdown(void) 4620_elm_config_shutdown(void)
4621{ 4621{
4622 efl_del_intercept_set(_efl_config_obj, NULL); 4622 efl_del_intercept_set(_efl_config_obj, NULL);
4623 efl_loop_unregister(efl_app_main_loop_get(efl_app_get()), EFL_CONFIG_INTERFACE, _efl_config_obj); 4623 efl_loop_unregister(efl_main_loop_get(), EFL_CONFIG_INTERFACE, _efl_config_obj);
4624 efl_loop_unregister(efl_app_main_loop_get(efl_app_get()), EFL_CONFIG_GLOBAL_CLASS, _efl_config_obj); 4624 efl_loop_unregister(efl_main_loop_get(), EFL_CONFIG_GLOBAL_CLASS, _efl_config_obj);
4625 ELM_SAFE_FREE(_efl_config_obj, efl_del); 4625 ELM_SAFE_FREE(_efl_config_obj, efl_del);
4626 ELM_SAFE_FREE(_elm_config, _config_free); 4626 ELM_SAFE_FREE(_elm_config, _config_free);
4627 ELM_SAFE_FREE(_elm_preferred_engine, eina_stringshare_del); 4627 ELM_SAFE_FREE(_elm_preferred_engine, eina_stringshare_del);
diff --git a/src/lib/elementary/elm_glview.c b/src/lib/elementary/elm_glview.c
index 7dabd3aafd..8f48ba4f38 100644
--- a/src/lib/elementary/elm_glview.c
+++ b/src/lib/elementary/elm_glview.c
@@ -165,7 +165,7 @@ _render_cb(void *obj, const Efl_Event *event EINA_UNUSED)
165 return; 165 return;
166 166
167 on_error: 167 on_error:
168 efl_event_callback_del(efl_app_main_loop_get(efl_app_get()), 168 efl_event_callback_del(efl_main_loop_get(),
169 EFL_LOOP_EVENT_IDLE_ENTER, 169 EFL_LOOP_EVENT_IDLE_ENTER,
170 _render_cb, 170 _render_cb,
171 obj); 171 obj);
@@ -187,7 +187,7 @@ _set_render_policy_callback(Evas_Object *obj)
187 evas_object_image_data_update_add(wd->resize_obj, 0, 0, sd->w, sd->h); 187 evas_object_image_data_update_add(wd->resize_obj, 0, 0, sd->w, sd->h);
188 } 188 }
189 // Delete idle_enterer if it for some reason is around 189 // Delete idle_enterer if it for some reason is around
190 efl_event_callback_del(efl_app_main_loop_get(efl_app_get()), 190 efl_event_callback_del(efl_main_loop_get(),
191 EFL_LOOP_EVENT_IDLE_ENTER, 191 EFL_LOOP_EVENT_IDLE_ENTER,
192 _render_cb, 192 _render_cb,
193 obj); 193 obj);
@@ -202,7 +202,7 @@ _set_render_policy_callback(Evas_Object *obj)
202 202
203 case ELM_GLVIEW_RENDER_POLICY_ALWAYS: 203 case ELM_GLVIEW_RENDER_POLICY_ALWAYS:
204 if (evas_object_image_pixels_dirty_get(wd->resize_obj) && !sd->render_idle_enterer) 204 if (evas_object_image_pixels_dirty_get(wd->resize_obj) && !sd->render_idle_enterer)
205 sd->render_idle_enterer = efl_event_callback_priority_add(efl_app_main_loop_get(efl_app_get()), 205 sd->render_idle_enterer = efl_event_callback_priority_add(efl_main_loop_get(),
206 EFL_LOOP_EVENT_IDLE_ENTER, 206 EFL_LOOP_EVENT_IDLE_ENTER,
207 EFL_CALLBACK_PRIORITY_BEFORE, 207 EFL_CALLBACK_PRIORITY_BEFORE,
208 _render_cb, 208 _render_cb,
@@ -297,7 +297,7 @@ _elm_glview_efl_canvas_group_group_del(Eo *obj, Elm_Glview_Data *sd)
297 //TODO:will be optimised 297 //TODO:will be optimised
298 efl_event_callback_legacy_call(obj, ELM_GLVIEW_EVENT_DESTROYED, NULL); 298 efl_event_callback_legacy_call(obj, ELM_GLVIEW_EVENT_DESTROYED, NULL);
299 299
300 efl_event_callback_del(efl_app_main_loop_get(efl_app_get()), 300 efl_event_callback_del(efl_main_loop_get(),
301 EFL_LOOP_EVENT_IDLE_ENTER, 301 EFL_LOOP_EVENT_IDLE_ENTER,
302 _render_cb, 302 _render_cb,
303 obj); 303 obj);
@@ -529,7 +529,7 @@ _elm_glview_draw_request(Eo *obj, Elm_Glview_Data *sd)
529 evas_object_image_data_update_add(wd->resize_obj, 0, 0, sd->w, sd->h); 529 evas_object_image_data_update_add(wd->resize_obj, 0, 0, sd->w, sd->h);
530 if (sd->render_policy == ELM_GLVIEW_RENDER_POLICY_ALWAYS && 530 if (sd->render_policy == ELM_GLVIEW_RENDER_POLICY_ALWAYS &&
531 !sd->render_idle_enterer) 531 !sd->render_idle_enterer)
532 sd->render_idle_enterer = efl_event_callback_priority_add(efl_app_main_loop_get(efl_app_get()), 532 sd->render_idle_enterer = efl_event_callback_priority_add(efl_main_loop_get(),
533 EFL_LOOP_EVENT_IDLE_ENTER, 533 EFL_LOOP_EVENT_IDLE_ENTER,
534 EFL_CALLBACK_PRIORITY_BEFORE, 534 EFL_CALLBACK_PRIORITY_BEFORE,
535 _render_cb, obj); 535 _render_cb, obj);
diff --git a/src/lib/elementary/elm_main.c b/src/lib/elementary/elm_main.c
index 8d2a4aaf16..646b2ee474 100644
--- a/src/lib/elementary/elm_main.c
+++ b/src/lib/elementary/elm_main.c
@@ -1148,16 +1148,16 @@ elm_quicklaunch_fork(int argc,
1148 { 1148 {
1149 if (qre_pause && qre_resume && qre_terminate) 1149 if (qre_pause && qre_resume && qre_terminate)
1150 { 1150 {
1151 efl_event_callback_array_add(efl_app_main_loop_get(efl_app_get()), _qre_main_ex(), NULL); 1151 efl_event_callback_array_add(efl_main_loop_get(), _qre_main_ex(), NULL);
1152 } 1152 }
1153 else 1153 else
1154 { 1154 {
1155 efl_event_callback_add(efl_app_main_loop_get(efl_app_get()), EFL_LOOP_EVENT_ARGUMENTS, qre_main, NULL); 1155 efl_event_callback_add(efl_main_loop_get(), EFL_LOOP_EVENT_ARGUMENTS, qre_main, NULL);
1156 } 1156 }
1157 1157
1158 ecore_init_ex(argc, argv); 1158 ecore_init_ex(argc, argv);
1159 1159
1160 ret = efl_loop_exit_code_process(efl_loop_begin(efl_app_main_loop_get(efl_app_get()))); 1160 ret = efl_loop_exit_code_process(efl_loop_begin(efl_main_loop_get()));
1161 1161
1162 ecore_shutdown_ex(); 1162 ecore_shutdown_ex();
1163 1163
@@ -1304,12 +1304,12 @@ elm_policy_set(unsigned int policy,
1304 { 1304 {
1305 if (value == ELM_POLICY_EXIT_WINDOWS_DEL) 1305 if (value == ELM_POLICY_EXIT_WINDOWS_DEL)
1306 { 1306 {
1307 efl_event_callback_add(efl_app_main_loop_get(efl_app_get()), EFL_LOOP_EVENT_TERMINATE, 1307 efl_event_callback_add(efl_main_loop_get(), EFL_LOOP_EVENT_TERMINATE,
1308 _on_terminate, NULL); 1308 _on_terminate, NULL);
1309 } 1309 }
1310 else 1310 else
1311 { 1311 {
1312 efl_event_callback_del(efl_app_main_loop_get(efl_app_get()), EFL_LOOP_EVENT_TERMINATE, 1312 efl_event_callback_del(efl_main_loop_get(), EFL_LOOP_EVENT_TERMINATE,
1313 _on_terminate, NULL); 1313 _on_terminate, NULL);
1314 } 1314 }
1315 } 1315 }
diff --git a/src/lib/evas/canvas/evas_main.c b/src/lib/evas/canvas/evas_main.c
index ee7d0cf626..45fae21bce 100644
--- a/src/lib/evas/canvas/evas_main.c
+++ b/src/lib/evas/canvas/evas_main.c
@@ -842,7 +842,7 @@ _evas_canvas_efl_object_provider_find(const Eo *eo_e,
842 if (klass == EVAS_CANVAS_CLASS) 842 if (klass == EVAS_CANVAS_CLASS)
843 return (Eo *)eo_e; 843 return (Eo *)eo_e;
844 else if (klass == EFL_LOOP_CLASS) 844 else if (klass == EFL_LOOP_CLASS)
845 return efl_app_main_loop_get(efl_app_get()); 845 return efl_main_loop_get();
846 else if (klass == EFL_CANVAS_GESTURE_MANAGER_CLASS) 846 else if (klass == EFL_CANVAS_GESTURE_MANAGER_CLASS)
847 return e->gesture_manager; 847 return e->gesture_manager;
848 return efl_provider_find(efl_super(eo_e, MY_CLASS), klass); 848 return efl_provider_find(efl_super(eo_e, MY_CLASS), klass);
@@ -851,7 +851,7 @@ _evas_canvas_efl_object_provider_find(const Eo *eo_e,
851EOLIAN static Efl_Loop * 851EOLIAN static Efl_Loop *
852_evas_canvas_efl_loop_consumer_loop_get(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e EINA_UNUSED) 852_evas_canvas_efl_loop_consumer_loop_get(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e EINA_UNUSED)
853{ 853{
854 return efl_app_main_loop_get(efl_app_get()); 854 return efl_main_loop_get();
855} 855}
856 856
857Ector_Surface * 857Ector_Surface *
diff --git a/src/lib/evas/canvas/evas_object_main.c b/src/lib/evas/canvas/evas_object_main.c
index b685378dc9..49d0586c8e 100644
--- a/src/lib/evas/canvas/evas_object_main.c
+++ b/src/lib/evas/canvas/evas_object_main.c
@@ -2330,7 +2330,7 @@ _efl_canvas_object_efl_object_provider_find(const Eo *eo_obj EINA_UNUSED, Evas_O
2330 return obj->layer->evas->evas; 2330 return obj->layer->evas->evas;
2331 } 2331 }
2332 else if (klass == EFL_LOOP_CLASS) 2332 else if (klass == EFL_LOOP_CLASS)
2333 return efl_app_main_loop_get(efl_app_get()); 2333 return efl_main_loop_get();
2334fallback: 2334fallback:
2335 return efl_provider_find(efl_super(eo_obj, MY_CLASS), klass); 2335 return efl_provider_find(efl_super(eo_obj, MY_CLASS), klass);
2336} 2336}
@@ -2338,7 +2338,7 @@ fallback:
2338EOLIAN static Efl_Loop * 2338EOLIAN static Efl_Loop *
2339_efl_canvas_object_efl_loop_consumer_loop_get(Eo *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj EINA_UNUSED) 2339_efl_canvas_object_efl_loop_consumer_loop_get(Eo *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj EINA_UNUSED)
2340{ 2340{
2341 return efl_app_main_loop_get(efl_app_get()); 2341 return efl_main_loop_get();
2342} 2342}
2343 2343
2344EOLIAN static void 2344EOLIAN static void
diff --git a/src/lib/evas/canvas/evas_object_textblock.c b/src/lib/evas/canvas/evas_object_textblock.c
index e1baafd613..33a5bac389 100644
--- a/src/lib/evas/canvas/evas_object_textblock.c
+++ b/src/lib/evas/canvas/evas_object_textblock.c
@@ -16251,7 +16251,7 @@ _dummy_cancel(void *data EINA_UNUSED, const Eina_Promise *dead EINA_UNUSED)
16251static Eina_Future_Scheduler * 16251static Eina_Future_Scheduler *
16252_future_scheduler_get(void) 16252_future_scheduler_get(void)
16253{ 16253{
16254 return efl_loop_future_scheduler_get(efl_app_main_loop_get(efl_app_get())); 16254 return efl_loop_future_scheduler_get(efl_main_loop_get());
16255} 16255}
16256 16256
16257EOLIAN static Eina_Future * 16257EOLIAN static Eina_Future *
diff --git a/src/tests/ecore/ecore_test_args.c b/src/tests/ecore/ecore_test_args.c
index 94e5b3f0fa..36bb7d8858 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_app_main_loop_get(efl_app_get()), EFL_LOOP_EVENT_ARGUMENTS, 30 efl_event_callback_add(efl_main_loop_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_app_main_loop_get(efl_app_get()), EFL_LOOP_EVENT_ARGUMENTS, 55 efl_event_callback_add(efl_main_loop_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_app_main_loop_get(efl_app_get()), EFL_LOOP_EVENT_ARGUMENTS, 75 efl_event_callback_add(efl_main_loop_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 f94e9055b5..492c2aa033 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_app_main_loop_get(efl_app_get()), 320 fd = efl_add(EFL_LOOP_FD_CLASS, efl_main_loop_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_app_main_loop_get(efl_app_get()), 363 fd = efl_add(EFL_LOOP_FD_CLASS, efl_main_loop_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));
@@ -857,6 +857,67 @@ START_TEST(ecore_test_ecore_main_loop_poller_add_del)
857} 857}
858END_TEST 858END_TEST
859 859
860START_TEST(ecore_test_efl_loop_register)
861{
862 Efl_Object *t, *n;
863
864 ecore_init();
865
866 t = efl_provider_find(efl_main_loop_get(), EFL_LOOP_CLASS);
867 fail_if(!efl_isa(t, EFL_LOOP_CLASS));
868
869 t = efl_provider_find(efl_main_loop_get(), EFL_LOOP_TIMER_CLASS);
870 fail_if(t != NULL);
871
872 n = efl_add(EFL_LOOP_TIMER_CLASS, efl_main_loop_get());
873 fail_if(n != NULL);
874
875 n = efl_add(EFL_LOOP_TIMER_CLASS, efl_main_loop_get(),
876 efl_loop_timer_interval_set(efl_added, 1.0));
877 efl_loop_register(efl_main_loop_get(), EFL_LOOP_TIMER_CLASS, n);
878
879 t = efl_provider_find(efl_main_loop_get(), EFL_LOOP_TIMER_CLASS);
880 fail_if(!efl_isa(t, EFL_LOOP_TIMER_CLASS));
881 fail_if(t != n);
882
883 efl_loop_unregister(efl_main_loop_get(), EFL_LOOP_TIMER_CLASS, n);
884
885 t = efl_provider_find(efl_main_loop_get(), EFL_LOOP_TIMER_CLASS);
886 fail_if(t != NULL);
887
888 ecore_shutdown();
889}
890END_TEST
891
892START_TEST(ecore_test_efl_app_version)
893{
894 const Efl_Version *ver;
895 Eo *loop;
896
897 ecore_init();
898
899 loop = efl_loop_main_get(EFL_LOOP_CLASS);
900 fail_if(!efl_isa(loop, EFL_LOOP_CLASS));
901
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);
904 fail_if(!ver);
905 fail_if(ver->major != EFL_VERSION_MAJOR);
906 fail_if(ver->minor != EFL_VERSION_MINOR);
907 fail_if(ver->micro != 0);
908 fail_if(ver->revision != 0);
909 fail_if(ver->flavor);
910 fail_if(!eina_streq(ver->build_id, EFL_BUILD_ID));
911
912 ver = efl_loop_efl_version_get(loop);
913 fail_if(!ver);
914 fail_if(ver->major != EFL_VERSION_MAJOR);
915 fail_if(ver->minor != EFL_VERSION_MINOR);
916
917 ecore_shutdown();
918}
919END_TEST
920
860void ecore_test_ecore(TCase *tc) 921void ecore_test_ecore(TCase *tc)
861{ 922{
862 tcase_add_test(tc, ecore_test_ecore_init); 923 tcase_add_test(tc, ecore_test_ecore_init);
@@ -879,4 +940,6 @@ void ecore_test_ecore(TCase *tc)
879 tcase_add_test(tc, ecore_test_ecore_main_loop_poller_add_del); 940 tcase_add_test(tc, ecore_test_ecore_main_loop_poller_add_del);
880 tcase_add_test(tc, ecore_test_efl_loop_fd); 941 tcase_add_test(tc, ecore_test_efl_loop_fd);
881 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);
944 tcase_add_test(tc, ecore_test_efl_app_version);
882} 945}
diff --git a/src/tests/ecore/ecore_test_promise.c b/src/tests/ecore/ecore_test_promise.c
index fc36792ea2..3a3aab6277 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_app_main_loop_get(efl_app_get())); 69 p = efl_add(EFL_PROMISE_CLASS, efl_main_loop_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_app_main_loop_get(efl_app_get())); 109 p = efl_add(EFL_PROMISE_CLASS, efl_main_loop_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_app_main_loop_get(efl_app_get())); 149 p = efl_add(EFL_PROMISE_CLASS, efl_main_loop_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_app_main_loop_get(efl_app_get())); 194 p = efl_add(EFL_PROMISE_CLASS, efl_main_loop_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_app_main_loop_get(efl_app_get())); 232 p = efl_add(EFL_PROMISE_CLASS, efl_main_loop_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_app_main_loop_get(efl_app_get())); 313 p = efl_add(EFL_PROMISE_CLASS, efl_main_loop_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_app_main_loop_get(efl_app_get())); 360 p = efl_add(EFL_PROMISE_CLASS, efl_main_loop_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_app_main_loop_get(efl_app_get())); 412 p = efl_add(EFL_PROMISE_CLASS, efl_main_loop_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_app_main_loop_get(efl_app_get())); 457 p = efl_add(EFL_PROMISE_CLASS, efl_main_loop_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_app_main_loop_get(efl_app_get())); 500 p = efl_add(EFL_PROMISE_CLASS, efl_main_loop_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_app_main_loop_get(efl_app_get())); 548 p = efl_add(EFL_PROMISE_CLASS, efl_main_loop_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_app_main_loop_get(efl_app_get())); 591 p = efl_add(EFL_PROMISE_CLASS, efl_main_loop_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_app_main_loop_get(efl_app_get())); 633 p = efl_add(EFL_PROMISE_CLASS, efl_main_loop_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_app_main_loop_get(efl_app_get())); 685 p = efl_add(EFL_PROMISE_CLASS, efl_main_loop_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_app_main_loop_get(efl_app_get())); 745 p = efl_add(EFL_PROMISE_CLASS, efl_main_loop_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_app_main_loop_get(efl_app_get())); 785 p = efl_add(EFL_PROMISE_CLASS, efl_main_loop_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_app_main_loop_get(efl_app_get())); 846 p1 = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
847 p2 = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 847 p2 = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
848 p3 = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 848 p3 = efl_add(EFL_PROMISE_CLASS, efl_main_loop_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_app_main_loop_get(efl_app_get())); 896 p1 = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
897 p2 = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 897 p2 = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
898 p3 = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 898 p3 = efl_add(EFL_PROMISE_CLASS, efl_main_loop_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_app_main_loop_get(efl_app_get())); 954 p1 = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
955 p2 = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 955 p2 = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
956 p3 = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 956 p3 = efl_add(EFL_PROMISE_CLASS, efl_main_loop_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_app_main_loop_get(efl_app_get()), 992 o = efl_add(EFL_LOOP_TIMER_CLASS, efl_main_loop_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_app_main_loop_get(efl_app_get())); 994 p = efl_add(EFL_PROMISE_CLASS, efl_main_loop_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_app_main_loop_get(efl_app_get()), 1002 o = efl_add(EFL_LOOP_TIMER_CLASS, efl_main_loop_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_app_main_loop_get(efl_app_get())); 1029 p = efl_add(EFL_PROMISE_CLASS, efl_main_loop_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 0f70e17a1d..ff663f1685 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_app_main_loop_get(efl_app_get())); 159 return efl_loop_future_scheduler_get(efl_main_loop_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_app_main_loop_get(efl_app_get()), 0.0001), 493 f = eina_future_then(efl_loop_timeout(efl_main_loop_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_app_main_loop_get(efl_app_get())), 509 f = eina_future_then(efl_loop_job(efl_main_loop_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_app_main_loop_get(efl_app_get())), 525 f = eina_future_then(efl_loop_idle(efl_main_loop_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 ffbd1b5b1b..8895a36cf2 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_app_main_loop_get(efl_app_get()), 270 et = efl_add(EFL_LOOP_TIMER_CLASS, efl_main_loop_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/efl_app_suite.c b/src/tests/ecore/efl_app_suite.c
deleted file mode 100644
index 7bd52d58b0..0000000000
--- a/src/tests/ecore/efl_app_suite.c
+++ /dev/null
@@ -1,106 +0,0 @@
1#ifdef HAVE_CONFIG_H
2# include <config.h>
3#endif
4
5#include <stdio.h>
6#include <unistd.h>
7#define EFL_NOLEGACY_API_SUPPORT
8#include <Efl_Core.h>
9#include <Efl_Net.h>
10#include "efl_app_suite.h"
11#include "../efl_check.h"
12
13START_TEST(efl_app_test_efl_loop_register)
14{
15 Efl_Object *t, *n, *parent;
16
17 ecore_init();
18
19 t = efl_provider_find(efl_app_main_loop_get(efl_app_get()), EFL_LOOP_CLASS);
20 fail_if(!efl_isa(t, EFL_LOOP_CLASS));
21
22 parent = efl_parent_get(t);
23 fail_if(!efl_isa(parent, EFL_APP_CLASS));
24 fail_if(parent != efl_app_get());
25
26 t = efl_provider_find(efl_app_main_loop_get(efl_app_get()), EFL_LOOP_TIMER_CLASS);
27 fail_if(t != NULL);
28
29 n = efl_add(EFL_LOOP_TIMER_CLASS, efl_app_main_loop_get(efl_app_get()));
30 fail_if(n != NULL);
31
32 n = efl_add(EFL_LOOP_TIMER_CLASS, efl_app_main_loop_get(efl_app_get()),
33 efl_loop_timer_interval_set(efl_added, 1.0));
34 efl_loop_register(efl_app_main_loop_get(efl_app_get()), EFL_LOOP_TIMER_CLASS, n);
35
36 t = efl_provider_find(efl_app_main_loop_get(efl_app_get()), EFL_LOOP_TIMER_CLASS);
37 fail_if(!efl_isa(t, EFL_LOOP_TIMER_CLASS));
38 fail_if(t != n);
39
40 efl_loop_unregister(efl_app_main_loop_get(efl_app_get()), EFL_LOOP_TIMER_CLASS, n);
41
42 t = efl_provider_find(efl_app_main_loop_get(efl_app_get()), EFL_LOOP_TIMER_CLASS);
43 fail_if(t != NULL);
44
45 ecore_shutdown();
46}
47END_TEST
48
49START_TEST(efl_app_test_efl_build_version)
50{
51 const Efl_Version *ver;
52 Eo *app;
53
54 ecore_init();
55
56 app = efl_app_get();
57 fail_if(!efl_isa(app, EFL_APP_CLASS));
58
59 efl_build_version_set(EFL_VERSION_MAJOR, EFL_VERSION_MINOR, 0, 0, NULL, EFL_BUILD_ID);
60 ver = efl_app_build_efl_version_get(app);
61 fail_if(!ver);
62 fail_if(ver->major != EFL_VERSION_MAJOR);
63 fail_if(ver->minor != EFL_VERSION_MINOR);
64 fail_if(ver->micro != 0);
65 fail_if(ver->revision != 0);
66 fail_if(ver->flavor);
67 fail_if(!eina_streq(ver->build_id, EFL_BUILD_ID));
68
69 ver = efl_app_efl_version_get(app);
70 fail_if(!ver);
71 fail_if(ver->major != EFL_VERSION_MAJOR);
72 fail_if(ver->minor != EFL_VERSION_MINOR);
73
74 ecore_shutdown();
75}
76END_TEST
77
78void efl_test_efl_app(TCase *tc)
79{
80 tcase_add_test(tc, efl_app_test_efl_loop_register);
81 tcase_add_test(tc, efl_app_test_efl_build_version);
82}
83
84
85static const Efl_Test_Case etc[] = {
86 { "Efl_App", efl_test_efl_app },
87 { NULL, NULL }
88};
89
90int
91main(int argc, char **argv)
92{
93 int failed_count;
94
95 if (!_efl_test_option_disp(argc, argv, etc))
96 return 0;
97
98#ifdef NEED_RUN_IN_TREE
99 putenv("EFL_RUN_IN_TREE=1");
100#endif
101
102 failed_count = _efl_suite_build_and_run(argc - 1, (const char **)argv + 1,
103 "Efl_App", etc);
104
105 return (failed_count == 0) ? 0 : 255;
106}
diff --git a/src/tests/ecore/efl_app_suite.h b/src/tests/ecore/efl_app_suite.h
deleted file mode 100644
index c04dcbe37f..0000000000
--- a/src/tests/ecore/efl_app_suite.h
+++ /dev/null
@@ -1,8 +0,0 @@
1#ifndef _EFL_APP_SUITE_H
2#define _EFL_APP_SUITE_H
3
4#include <check.h>
5
6void efl_app_test_efl_app(TCase *tc);
7
8#endif /* _EFL_APP_SUITE_H */
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 a5ad6d191e..563af26c60 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_app_main_loop_get(efl_app_get()), t); \ 120 Eina_Future *_timeout_future = efl_loop_timeout(efl_main_loop_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 abbd7405de..81ab19d2c7 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_app_main_loop_get(efl_app_get()), eio_model_path_set(efl_added, EFL_MODEL_TEST_FILENAME_PATH)); 117 filemodel = efl_add(EIO_MODEL_CLASS, efl_main_loop_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 b78b297157..e6b14d57b8 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_app_main_loop_get(efl_app_get()), eio_model_path_set(efl_added, tmpdir)); 115 filemodel = efl_add(EIO_MODEL_CLASS, efl_main_loop_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 198117dc22..2e396c1ad6 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_app_main_loop_get(efl_app_get())); 159 Efl_Io_Manager *job = efl_add(EFL_IO_MANAGER_CLASS, efl_main_loop_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_app_main_loop_get(efl_app_get())); 209 job = efl_add(EFL_IO_MANAGER_CLASS, efl_main_loop_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_app_main_loop_get(efl_app_get())); 260 job = efl_add(EFL_IO_MANAGER_CLASS, efl_main_loop_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_app_main_loop_get(efl_app_get())); 314 job = efl_add(EFL_IO_MANAGER_CLASS, efl_main_loop_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_app_main_loop_get(efl_app_get()), EFL_IO_MANAGER_CLASS) != NULL); 343 fail_if(efl_provider_find(efl_main_loop_get(), EFL_IO_MANAGER_CLASS) != NULL);
344 344
345 eio_init(); 345 eio_init();
346 346
347 manager = efl_provider_find(efl_app_main_loop_get(efl_app_get()), EFL_IO_MANAGER_CLASS); 347 manager = efl_provider_find(efl_main_loop_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 186d28939f..136ae4dc16 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_app_main_loop_get(efl_app_get())); 133 job = efl_add(EFL_IO_MANAGER_CLASS, efl_main_loop_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 df4d49ff4e..49814ec95a 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_app_main_loop_get(efl_app_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_main_loop_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_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)); 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));
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 4298f87e4a..df74b5c13f 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_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)); 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));
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 52ce99593a..be90e9c033 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_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)); 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));
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 f701fa043d..ec8d3bd5b3 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_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)); 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));
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 77abc56696..15a799837e 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_app_main_loop_get(efl_app_get()), EFL_CONFIG_INTERFACE); 16 Eo *cfg = efl_provider_find(efl_main_loop_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_app_main_loop_get(efl_app_get()), EFL_CONFIG_INTERFACE); 153 Eo *cfg = efl_provider_find(efl_main_loop_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_app_main_loop_get(efl_app_get()), EFL_CONFIG_INTERFACE); 188 Eo *cfg = efl_provider_find(efl_main_loop_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++)
diff --git a/src/tests/eo_cxx/eo_cxx_test_promise.cc b/src/tests/eo_cxx/eo_cxx_test_promise.cc
index cba047e8d5..642c9c00c4 100644
--- a/src/tests/eo_cxx/eo_cxx_test_promise.cc
+++ b/src/tests/eo_cxx/eo_cxx_test_promise.cc
@@ -16,7 +16,7 @@ START_TEST(eo_cxx_future_construct_and_destroy)
16 ecore_init(); 16 ecore_init();
17 17
18 { 18 {
19 p = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 19 p = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
20 fail_if(!p); 20 fail_if(!p);
21 21
22 f = efl_promise_future_get(p); 22 f = efl_promise_future_get(p);
@@ -35,7 +35,7 @@ START_TEST(eo_cxx_future_wait)
35 35
36 ecore_init(); 36 ecore_init();
37 37
38 p = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 38 p = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
39 fail_if(!p); 39 fail_if(!p);
40 40
41 f = efl_promise_future_get(p); 41 f = efl_promise_future_get(p);
@@ -74,7 +74,7 @@ START_TEST(eo_cxx_future_get)
74 74
75 ecore_init(); 75 ecore_init();
76 76
77 p = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 77 p = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
78 fail_if(!p); 78 fail_if(!p);
79 79
80 f = efl_promise_future_get(p); 80 f = efl_promise_future_get(p);
@@ -114,7 +114,7 @@ START_TEST(eo_cxx_future_get_error)
114 114
115 ecore_init(); 115 ecore_init();
116 116
117 p = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 117 p = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
118 fail_if(!p); 118 fail_if(!p);
119 119
120 f = efl_promise_future_get(p); 120 f = efl_promise_future_get(p);
@@ -157,7 +157,7 @@ START_TEST(eo_cxx_future_then_value)
157 157
158 ecore_init(); 158 ecore_init();
159 159
160 promise = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 160 promise = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
161 fail_if(!promise); 161 fail_if(!promise);
162 162
163 f = efl_promise_future_get(promise); 163 f = efl_promise_future_get(promise);
@@ -208,13 +208,13 @@ START_TEST(eo_cxx_future_composite_construct_and_destroy)
208 ecore_init(); 208 ecore_init();
209 209
210 { 210 {
211 Efl_Promise *p1 = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 211 Efl_Promise *p1 = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
212 fail_if(!p1); 212 fail_if(!p1);
213 213
214 Efl_Future *f1 = efl_promise_future_get(p1); 214 Efl_Future *f1 = efl_promise_future_get(p1);
215 fail_if(!f1); 215 fail_if(!f1);
216 216
217 Efl_Promise *p2 = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 217 Efl_Promise *p2 = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
218 fail_if(!p1); 218 fail_if(!p1);
219 219
220 Efl_Future *f2 = efl_promise_future_get(p2); 220 Efl_Future *f2 = efl_promise_future_get(p2);
@@ -236,13 +236,13 @@ START_TEST(eo_cxx_future_composite_wait)
236 ecore_init(); 236 ecore_init();
237 237
238 { 238 {
239 Efl_Promise *p1 = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 239 Efl_Promise *p1 = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
240 fail_if(!p1); 240 fail_if(!p1);
241 241
242 Efl_Future* f1 = efl_promise_future_get(p1); 242 Efl_Future* f1 = efl_promise_future_get(p1);
243 fail_if(!f1); 243 fail_if(!f1);
244 244
245 Efl_Promise *p2 = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 245 Efl_Promise *p2 = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
246 fail_if(!p2); 246 fail_if(!p2);
247 247
248 Efl_Future* f2 = efl_promise_future_get(p2); 248 Efl_Future* f2 = efl_promise_future_get(p2);
@@ -286,13 +286,13 @@ START_TEST(eo_cxx_future_composite_get)
286 ecore_init(); 286 ecore_init();
287 287
288 { 288 {
289 Efl_Promise *p1 = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 289 Efl_Promise *p1 = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
290 fail_if(!p1); 290 fail_if(!p1);
291 291
292 Efl_Future *f1 = efl_promise_future_get(p1); 292 Efl_Future *f1 = efl_promise_future_get(p1);
293 fail_if(!f1); 293 fail_if(!f1);
294 294
295 Efl_Promise *p2 = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 295 Efl_Promise *p2 = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
296 fail_if(!p2); 296 fail_if(!p2);
297 297
298 Efl_Future *f2 = efl_promise_future_get(p2); 298 Efl_Future *f2 = efl_promise_future_get(p2);
@@ -339,13 +339,13 @@ START_TEST(eo_cxx_future_composite_then_value)
339 ecore_init(); 339 ecore_init();
340 340
341 { 341 {
342 Efl_Promise *p1 = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 342 Efl_Promise *p1 = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
343 fail_if(!p1); 343 fail_if(!p1);
344 344
345 Efl_Future *f1 = efl_promise_future_get(p1); 345 Efl_Future *f1 = efl_promise_future_get(p1);
346 fail_if(!f1); 346 fail_if(!f1);
347 347
348 Efl_Promise *p2 = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 348 Efl_Promise *p2 = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
349 fail_if(!p2); 349 fail_if(!p2);
350 350
351 Efl_Future *f2 = efl_promise_future_get(p2); 351 Efl_Future *f2 = efl_promise_future_get(p2);
@@ -403,13 +403,13 @@ START_TEST(eo_cxx_future_all_construct_and_destroy)
403 ecore_init(); 403 ecore_init();
404 404
405 { 405 {
406 Efl_Promise *p1 = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 406 Efl_Promise *p1 = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
407 fail_if(!p1); 407 fail_if(!p1);
408 408
409 Efl_Future *f1 = efl_promise_future_get(p1); 409 Efl_Future *f1 = efl_promise_future_get(p1);
410 fail_if(!f1); 410 fail_if(!f1);
411 411
412 Efl_Promise *p2 = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 412 Efl_Promise *p2 = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
413 fail_if(!p1); 413 fail_if(!p1);
414 414
415 Efl_Future *f2 = efl_promise_future_get(p2); 415 Efl_Future *f2 = efl_promise_future_get(p2);
@@ -431,13 +431,13 @@ START_TEST(eo_cxx_future_all_wait)
431 ecore_init(); 431 ecore_init();
432 432
433 { 433 {
434 Efl_Promise *p1 = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 434 Efl_Promise *p1 = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
435 fail_if(!p1); 435 fail_if(!p1);
436 436
437 Efl_Future* f1 = efl_promise_future_get(p1); 437 Efl_Future* f1 = efl_promise_future_get(p1);
438 fail_if(!f1); 438 fail_if(!f1);
439 439
440 Efl_Promise *p2 = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 440 Efl_Promise *p2 = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
441 fail_if(!p2); 441 fail_if(!p2);
442 442
443 Efl_Future* f2 = efl_promise_future_get(p2); 443 Efl_Future* f2 = efl_promise_future_get(p2);
@@ -478,13 +478,13 @@ START_TEST(eo_cxx_future_all_get)
478 ecore_init(); 478 ecore_init();
479 479
480 { 480 {
481 Efl_Promise *p1 = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 481 Efl_Promise *p1 = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
482 fail_if(!p1); 482 fail_if(!p1);
483 483
484 Efl_Future *f1 = efl_promise_future_get(p1); 484 Efl_Future *f1 = efl_promise_future_get(p1);
485 fail_if(!f1); 485 fail_if(!f1);
486 486
487 Efl_Promise *p2 = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 487 Efl_Promise *p2 = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
488 fail_if(!p2); 488 fail_if(!p2);
489 489
490 Efl_Future *f2 = efl_promise_future_get(p2); 490 Efl_Future *f2 = efl_promise_future_get(p2);
@@ -528,13 +528,13 @@ START_TEST(eo_cxx_future_all_then_value)
528 ecore_init(); 528 ecore_init();
529 529
530 { 530 {
531 Efl_Promise *p1 = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 531 Efl_Promise *p1 = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
532 fail_if(!p1); 532 fail_if(!p1);
533 533
534 Efl_Future *f1 = efl_promise_future_get(p1); 534 Efl_Future *f1 = efl_promise_future_get(p1);
535 fail_if(!f1); 535 fail_if(!f1);
536 536
537 Efl_Promise *p2 = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 537 Efl_Promise *p2 = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
538 fail_if(!p2); 538 fail_if(!p2);
539 539
540 Efl_Future *f2 = efl_promise_future_get(p2); 540 Efl_Future *f2 = efl_promise_future_get(p2);
@@ -591,13 +591,13 @@ START_TEST(eo_cxx_future_race_construct_and_destroy)
591 ecore_init(); 591 ecore_init();
592 592
593 { 593 {
594 Efl_Promise *p1 = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 594 Efl_Promise *p1 = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
595 fail_if(!p1); 595 fail_if(!p1);
596 596
597 Efl_Future *f1 = efl_promise_future_get(p1); 597 Efl_Future *f1 = efl_promise_future_get(p1);
598 fail_if(!f1); 598 fail_if(!f1);
599 599
600 Efl_Promise *p2 = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 600 Efl_Promise *p2 = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
601 fail_if(!p1); 601 fail_if(!p1);
602 602
603 Efl_Future *f2 = efl_promise_future_get(p2); 603 Efl_Future *f2 = efl_promise_future_get(p2);
@@ -617,13 +617,13 @@ START_TEST(eo_cxx_future_race_wait)
617 ecore_init(); 617 ecore_init();
618 618
619 { 619 {
620 Efl_Promise *p1 = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 620 Efl_Promise *p1 = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
621 fail_if(!p1); 621 fail_if(!p1);
622 622
623 Efl_Future* f1 = efl_promise_future_get(p1); 623 Efl_Future* f1 = efl_promise_future_get(p1);
624 fail_if(!f1); 624 fail_if(!f1);
625 625
626 Efl_Promise *p2 = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 626 Efl_Promise *p2 = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
627 fail_if(!p2); 627 fail_if(!p2);
628 628
629 Efl_Future* f2 = efl_promise_future_get(p2); 629 Efl_Future* f2 = efl_promise_future_get(p2);
@@ -661,13 +661,13 @@ START_TEST(eo_cxx_future_race_get)
661 ecore_init(); 661 ecore_init();
662 662
663 { 663 {
664 Efl_Promise *p1 = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 664 Efl_Promise *p1 = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
665 fail_if(!p1); 665 fail_if(!p1);
666 666
667 Efl_Future *f1 = efl_promise_future_get(p1); 667 Efl_Future *f1 = efl_promise_future_get(p1);
668 fail_if(!f1); 668 fail_if(!f1);
669 669
670 Efl_Promise *p2 = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 670 Efl_Promise *p2 = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
671 fail_if(!p2); 671 fail_if(!p2);
672 672
673 Efl_Future *f2 = efl_promise_future_get(p2); 673 Efl_Future *f2 = efl_promise_future_get(p2);
@@ -707,13 +707,13 @@ START_TEST(eo_cxx_future_race_then_value)
707 ecore_init(); 707 ecore_init();
708 708
709 { 709 {
710 Efl_Promise *p1 = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 710 Efl_Promise *p1 = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
711 fail_if(!p1); 711 fail_if(!p1);
712 712
713 Efl_Future *f1 = efl_promise_future_get(p1); 713 Efl_Future *f1 = efl_promise_future_get(p1);
714 fail_if(!f1); 714 fail_if(!f1);
715 715
716 Efl_Promise *p2 = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 716 Efl_Promise *p2 = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
717 fail_if(!p2); 717 fail_if(!p2);
718 718
719 Efl_Future *f2 = efl_promise_future_get(p2); 719 Efl_Future *f2 = efl_promise_future_get(p2);
@@ -765,13 +765,13 @@ START_TEST(eo_cxx_future_race_variant_get)
765 ecore_init(); 765 ecore_init();
766 766
767 { 767 {
768 Efl_Promise *p1 = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 768 Efl_Promise *p1 = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
769 fail_if(!p1); 769 fail_if(!p1);
770 770
771 Efl_Future *f1 = efl_promise_future_get(p1); 771 Efl_Future *f1 = efl_promise_future_get(p1);
772 fail_if(!f1); 772 fail_if(!f1);
773 773
774 Efl_Promise *p2 = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 774 Efl_Promise *p2 = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
775 fail_if(!p2); 775 fail_if(!p2);
776 776
777 Efl_Future *f2 = efl_promise_future_get(p2); 777 Efl_Future *f2 = efl_promise_future_get(p2);
@@ -812,13 +812,13 @@ START_TEST(eo_cxx_future_race_variant_then_value)
812 ecore_init(); 812 ecore_init();
813 813
814 { 814 {
815 Efl_Promise *p1 = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 815 Efl_Promise *p1 = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
816 fail_if(!p1); 816 fail_if(!p1);
817 817
818 Efl_Future *f1 = efl_promise_future_get(p1); 818 Efl_Future *f1 = efl_promise_future_get(p1);
819 fail_if(!f1); 819 fail_if(!f1);
820 820
821 Efl_Promise *p2 = efl_add(EFL_PROMISE_CLASS, efl_app_main_loop_get(efl_app_get())); 821 Efl_Promise *p2 = efl_add(EFL_PROMISE_CLASS, efl_main_loop_get());
822 fail_if(!p2); 822 fail_if(!p2);
823 823
824 Efl_Future *f2 = efl_promise_future_get(p2); 824 Efl_Future *f2 = efl_promise_future_get(p2);