summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCedric BAIL <cedric.bail@free.fr>2019-07-11 15:18:34 -0700
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2019-07-17 21:57:57 +0200
commite0ee318fe11996b3dbbc2b5080349f0548c9fc52 (patch)
tree535aabc58d67834ed09ca9beaa7993b315e96f97
parent16b662d5d10f1f75e5ab88574371ec87430541b1 (diff)
eo: use efl_provider_{un,}register infrastructure instead of Efl_Loop one.
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de> Differential Revision: https://phab.enlightenment.org/D9296
-rw-r--r--src/lib/ecore/ecore_events.c2
-rw-r--r--src/lib/ecore/efl_loop.c2
-rw-r--r--src/lib/edje/edje_main.c18
-rw-r--r--src/lib/eio/eio_main.c4
-rw-r--r--src/lib/elementary/elm_config.c12
-rw-r--r--src/tests/ecore/efl_app_test_loop.c8
6 files changed, 23 insertions, 23 deletions
diff --git a/src/lib/ecore/ecore_events.c b/src/lib/ecore/ecore_events.c
index 01a4c3d019..76de86b7a7 100644
--- a/src/lib/ecore/ecore_events.c
+++ b/src/lib/ecore/ecore_events.c
@@ -233,7 +233,7 @@ _ecore_event_init(void)
233 if ((!choice) || (!choice[0])) choice = "chained_mempool"; 233 if ((!choice) || (!choice[0])) choice = "chained_mempool";
234 234
235 _event_msg_handler = efl_add(ECORE_EVENT_MESSAGE_HANDLER_CLASS, _mainloop_singleton); 235 _event_msg_handler = efl_add(ECORE_EVENT_MESSAGE_HANDLER_CLASS, _mainloop_singleton);
236 efl_loop_register(_mainloop_singleton, ECORE_EVENT_MESSAGE_HANDLER_CLASS, _event_msg_handler); 236 efl_provider_register(_mainloop_singleton, ECORE_EVENT_MESSAGE_HANDLER_CLASS, _event_msg_handler);
237 237
238 if (!_event_msg_handler) 238 if (!_event_msg_handler)
239 { 239 {
diff --git a/src/lib/ecore/efl_loop.c b/src/lib/ecore/efl_loop.c
index a21aeeae01..b8a910cc8a 100644
--- a/src/lib/ecore/efl_loop.c
+++ b/src/lib/ecore/efl_loop.c
@@ -276,7 +276,7 @@ _efl_loop_efl_object_constructor(Eo *obj, Efl_Loop_Data *pd)
276 pd->epoll_fd = -1; 276 pd->epoll_fd = -1;
277 pd->timer_fd = -1; 277 pd->timer_fd = -1;
278 pd->future_message_handler = efl_add(EFL_LOOP_MESSAGE_FUTURE_HANDLER_CLASS, obj); 278 pd->future_message_handler = efl_add(EFL_LOOP_MESSAGE_FUTURE_HANDLER_CLASS, obj);
279 efl_loop_register(obj, EFL_LOOP_MESSAGE_FUTURE_HANDLER_CLASS, pd->future_message_handler); 279 efl_provider_register(obj, EFL_LOOP_MESSAGE_FUTURE_HANDLER_CLASS, pd->future_message_handler);
280 280
281 return obj; 281 return obj;
282} 282}
diff --git a/src/lib/edje/edje_main.c b/src/lib/edje/edje_main.c
index d794c961b4..02bab59444 100644
--- a/src/lib/edje/edje_main.c
+++ b/src/lib/edje/edje_main.c
@@ -84,9 +84,9 @@ edje_init(void)
84 _edje_scale = FROM_DOUBLE(1.0); 84 _edje_scale = FROM_DOUBLE(1.0);
85 _edje_global_obj = efl_add(EDJE_GLOBAL_CLASS, efl_main_loop_get()); 85 _edje_global_obj = efl_add(EDJE_GLOBAL_CLASS, efl_main_loop_get());
86 EINA_SAFETY_ON_TRUE_GOTO(!_edje_global_obj, shutdown_efreet); 86 EINA_SAFETY_ON_TRUE_GOTO(!_edje_global_obj, shutdown_efreet);
87 EINA_SAFETY_ON_TRUE_GOTO(!efl_loop_register(efl_main_loop_get(), EFL_GFX_COLOR_CLASS_MIXIN, _edje_global_obj), shutdown_efreet); 87 EINA_SAFETY_ON_TRUE_GOTO(!efl_provider_register(efl_main_loop_get(), EFL_GFX_COLOR_CLASS_MIXIN, _edje_global_obj), shutdown_efreet);
88 EINA_SAFETY_ON_TRUE_GOTO(!efl_loop_register(efl_main_loop_get(), EFL_GFX_TEXT_CLASS_INTERFACE, _edje_global_obj), shutdown_efreet); 88 EINA_SAFETY_ON_TRUE_GOTO(!efl_provider_register(efl_main_loop_get(), EFL_GFX_TEXT_CLASS_INTERFACE, _edje_global_obj), shutdown_efreet);
89 EINA_SAFETY_ON_TRUE_GOTO(!efl_loop_register(efl_main_loop_get(), EFL_GFX_SIZE_CLASS_INTERFACE, _edje_global_obj), shutdown_efreet); 89 EINA_SAFETY_ON_TRUE_GOTO(!efl_provider_register(efl_main_loop_get(), EFL_GFX_SIZE_CLASS_INTERFACE, _edje_global_obj), shutdown_efreet);
90 90
91 _edje_edd_init(); 91 _edje_edd_init();
92 _edje_text_init(); 92 _edje_text_init();
@@ -154,9 +154,9 @@ shutdown_all:
154 _edje_edd_shutdown(); 154 _edje_edd_shutdown();
155 if (_edje_global_obj) 155 if (_edje_global_obj)
156 { 156 {
157 efl_loop_unregister(efl_main_loop_get(), EFL_GFX_COLOR_CLASS_MIXIN, _edje_global_obj); 157 efl_provider_unregister(efl_main_loop_get(), EFL_GFX_COLOR_CLASS_MIXIN, _edje_global_obj);
158 efl_loop_unregister(efl_main_loop_get(), EFL_GFX_TEXT_CLASS_INTERFACE, _edje_global_obj); 158 efl_provider_unregister(efl_main_loop_get(), EFL_GFX_TEXT_CLASS_INTERFACE, _edje_global_obj);
159 efl_loop_unregister(efl_main_loop_get(), EFL_GFX_SIZE_CLASS_INTERFACE, _edje_global_obj); 159 efl_provider_unregister(efl_main_loop_get(), EFL_GFX_SIZE_CLASS_INTERFACE, _edje_global_obj);
160 efl_del(_edje_global_obj); 160 efl_del(_edje_global_obj);
161 _edje_global_obj = NULL; 161 _edje_global_obj = NULL;
162 } 162 }
@@ -213,9 +213,9 @@ _edje_shutdown_core(void)
213 _edje_text_class_hash_free(); 213 _edje_text_class_hash_free();
214 _edje_size_class_hash_free(); 214 _edje_size_class_hash_free();
215 _edje_edd_shutdown(); 215 _edje_edd_shutdown();
216 efl_loop_unregister(efl_main_loop_get(), EFL_GFX_COLOR_CLASS_MIXIN, _edje_global_obj); 216 efl_provider_unregister(efl_main_loop_get(), EFL_GFX_COLOR_CLASS_MIXIN, _edje_global_obj);
217 efl_loop_unregister(efl_main_loop_get(), EFL_GFX_TEXT_CLASS_INTERFACE, _edje_global_obj); 217 efl_provider_unregister(efl_main_loop_get(), EFL_GFX_TEXT_CLASS_INTERFACE, _edje_global_obj);
218 efl_loop_unregister(efl_main_loop_get(), EFL_GFX_SIZE_CLASS_INTERFACE, _edje_global_obj); 218 efl_provider_unregister(efl_main_loop_get(), EFL_GFX_SIZE_CLASS_INTERFACE, _edje_global_obj);
219 efl_del(_edje_global_obj); 219 efl_del(_edje_global_obj);
220 _edje_global_obj = NULL; 220 _edje_global_obj = NULL;
221 221
diff --git a/src/lib/eio/eio_main.c b/src/lib/eio/eio_main.c
index 44c4e9dfc0..5c2141113d 100644
--- a/src/lib/eio/eio_main.c
+++ b/src/lib/eio/eio_main.c
@@ -320,7 +320,7 @@ eio_init(void)
320 efreet_mime_init(); 320 efreet_mime_init();
321 321
322 io_manager = efl_add(EFL_IO_MANAGER_CLASS, efl_main_loop_get()); 322 io_manager = efl_add(EFL_IO_MANAGER_CLASS, efl_main_loop_get());
323 efl_loop_register(efl_main_loop_get(), EFL_IO_MANAGER_CLASS, io_manager); 323 efl_provider_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_main_loop_get(), EFL_IO_MANAGER_CLASS, io_manager); 361 efl_provider_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/elementary/elm_config.c b/src/lib/elementary/elm_config.c
index 13b59ed4fd..6093ca73cd 100644
--- a/src/lib/elementary/elm_config.c
+++ b/src/lib/elementary/elm_config.c
@@ -1712,8 +1712,8 @@ _config_load(void)
1712 if (_efl_config_obj) 1712 if (_efl_config_obj)
1713 { 1713 {
1714 efl_del_intercept_set(_efl_config_obj, NULL); 1714 efl_del_intercept_set(_efl_config_obj, NULL);
1715 efl_loop_unregister(efl_main_loop_get(), EFL_CONFIG_INTERFACE, _efl_config_obj); 1715 efl_provider_unregister(efl_main_loop_get(), EFL_CONFIG_INTERFACE, _efl_config_obj);
1716 efl_loop_unregister(efl_main_loop_get(), EFL_CONFIG_GLOBAL_CLASS, _efl_config_obj); 1716 efl_provider_unregister(efl_main_loop_get(), EFL_CONFIG_GLOBAL_CLASS, _efl_config_obj);
1717 ELM_SAFE_FREE(_efl_config_obj, efl_del); 1717 ELM_SAFE_FREE(_efl_config_obj, efl_del);
1718 ELM_SAFE_FREE(_elm_config, _config_free); 1718 ELM_SAFE_FREE(_elm_config, _config_free);
1719 _elm_font_overlays_del_free(); 1719 _elm_font_overlays_del_free();
@@ -1721,8 +1721,8 @@ _config_load(void)
1721 ELM_SAFE_FREE(_elm_key_bindings, eina_hash_free); 1721 ELM_SAFE_FREE(_elm_key_bindings, eina_hash_free);
1722 } 1722 }
1723 _efl_config_obj = efl_add(EFL_CONFIG_GLOBAL_CLASS, efl_main_loop_get()); 1723 _efl_config_obj = efl_add(EFL_CONFIG_GLOBAL_CLASS, efl_main_loop_get());
1724 efl_loop_register(efl_main_loop_get(), EFL_CONFIG_INTERFACE, _efl_config_obj); 1724 efl_provider_register(efl_main_loop_get(), EFL_CONFIG_INTERFACE, _efl_config_obj);
1725 efl_loop_register(efl_main_loop_get(), EFL_CONFIG_GLOBAL_CLASS, _efl_config_obj); 1725 efl_provider_register(efl_main_loop_get(), EFL_CONFIG_GLOBAL_CLASS, _efl_config_obj);
1726 efl_del_intercept_set(_efl_config_obj, _efl_config_obj_del); 1726 efl_del_intercept_set(_efl_config_obj, _efl_config_obj_del);
1727 if (!_use_build_config) 1727 if (!_use_build_config)
1728 { 1728 {
@@ -4662,8 +4662,8 @@ void
4662_elm_config_shutdown(void) 4662_elm_config_shutdown(void)
4663{ 4663{
4664 efl_del_intercept_set(_efl_config_obj, NULL); 4664 efl_del_intercept_set(_efl_config_obj, NULL);
4665 efl_loop_unregister(efl_main_loop_get(), EFL_CONFIG_INTERFACE, _efl_config_obj); 4665 efl_provider_unregister(efl_main_loop_get(), EFL_CONFIG_INTERFACE, _efl_config_obj);
4666 efl_loop_unregister(efl_main_loop_get(), EFL_CONFIG_GLOBAL_CLASS, _efl_config_obj); 4666 efl_provider_unregister(efl_main_loop_get(), EFL_CONFIG_GLOBAL_CLASS, _efl_config_obj);
4667 ELM_SAFE_FREE(_efl_config_obj, efl_del); 4667 ELM_SAFE_FREE(_efl_config_obj, efl_del);
4668 ELM_SAFE_FREE(_elm_config, _config_free); 4668 ELM_SAFE_FREE(_elm_config, _config_free);
4669 ELM_SAFE_FREE(_elm_preferred_engine, eina_stringshare_del); 4669 ELM_SAFE_FREE(_elm_preferred_engine, eina_stringshare_del);
diff --git a/src/tests/ecore/efl_app_test_loop.c b/src/tests/ecore/efl_app_test_loop.c
index 7b8dafccf3..6fa85a0300 100644
--- a/src/tests/ecore/efl_app_test_loop.c
+++ b/src/tests/ecore/efl_app_test_loop.c
@@ -10,7 +10,7 @@
10#include "efl_app_suite.h" 10#include "efl_app_suite.h"
11#include "../efl_check.h" 11#include "../efl_check.h"
12 12
13EFL_START_TEST(efl_app_test_efl_loop_register) 13EFL_START_TEST(efl_app_test_efl_provider_register)
14{ 14{
15 Efl_Object *t, *n; 15 Efl_Object *t, *n;
16 16
@@ -25,13 +25,13 @@ EFL_START_TEST(efl_app_test_efl_loop_register)
25 25
26 n = efl_add(EFL_LOOP_TIMER_CLASS, efl_app_main_get(), 26 n = efl_add(EFL_LOOP_TIMER_CLASS, efl_app_main_get(),
27 efl_loop_timer_interval_set(efl_added, 1.0)); 27 efl_loop_timer_interval_set(efl_added, 1.0));
28 efl_loop_register(efl_app_main_get(), EFL_LOOP_TIMER_CLASS, n); 28 efl_provider_register(efl_app_main_get(), EFL_LOOP_TIMER_CLASS, n);
29 29
30 t = efl_provider_find(efl_app_main_get(), EFL_LOOP_TIMER_CLASS); 30 t = efl_provider_find(efl_app_main_get(), EFL_LOOP_TIMER_CLASS);
31 fail_if(!efl_isa(t, EFL_LOOP_TIMER_CLASS)); 31 fail_if(!efl_isa(t, EFL_LOOP_TIMER_CLASS));
32 fail_if(t != n); 32 fail_if(t != n);
33 33
34 efl_loop_unregister(efl_app_main_get(), EFL_LOOP_TIMER_CLASS, n); 34 efl_provider_unregister(efl_app_main_get(), EFL_LOOP_TIMER_CLASS, n);
35 35
36 t = efl_provider_find(efl_app_main_get(), EFL_LOOP_TIMER_CLASS); 36 t = efl_provider_find(efl_app_main_get(), EFL_LOOP_TIMER_CLASS);
37 fail_if(t != NULL); 37 fail_if(t != NULL);
@@ -101,7 +101,7 @@ EFL_END_TEST
101 101
102void efl_app_test_efl_loop(TCase *tc) 102void efl_app_test_efl_loop(TCase *tc)
103{ 103{
104 tcase_add_test(tc, efl_app_test_efl_loop_register); 104 tcase_add_test(tc, efl_app_test_efl_provider_register);
105 tcase_add_test(tc, efl_app_test_efl_loop_concentric); 105 tcase_add_test(tc, efl_app_test_efl_loop_concentric);
106 tcase_add_test(tc, efl_loop_test_realized_name); 106 tcase_add_test(tc, efl_loop_test_realized_name);
107} 107}