From 454722cf6fd0ad512770d88e612f6c8df3a6149e Mon Sep 17 00:00:00 2001 From: Cedric BAIL Date: Thu, 21 Apr 2016 15:11:32 -0700 Subject: [PATCH] ecore: rename Ecore_Mainloop to Efl.Loop. --- src/Makefile_Ecore.am | 2 +- src/lib/ecore/Ecore_Eo.h | 2 +- src/lib/ecore/ecore_idle_enterer.c | 4 +-- src/lib/ecore/ecore_idle_exiter.c | 4 +-- src/lib/ecore/ecore_idler.c | 6 ++--- src/lib/ecore/ecore_main.c | 26 +++++++++---------- src/lib/ecore/ecore_private.h | 4 +-- .../ecore/{ecore_mainloop.eo => efl_loop.eo} | 15 ++++++----- 8 files changed, 32 insertions(+), 31 deletions(-) rename src/lib/ecore/{ecore_mainloop.eo => efl_loop.eo} (70%) diff --git a/src/Makefile_Ecore.am b/src/Makefile_Ecore.am index e3aa65101b..58df14b00b 100644 --- a/src/Makefile_Ecore.am +++ b/src/Makefile_Ecore.am @@ -10,7 +10,7 @@ ecore_eolian_files_legacy = \ ecore_eolian_files = \ $(ecore_eolian_files_legacy) \ - lib/ecore/ecore_mainloop.eo \ + lib/ecore/efl_loop.eo \ lib/ecore/ecore_parent.eo ecore_eolian_type_files = \ diff --git a/src/lib/ecore/Ecore_Eo.h b/src/lib/ecore/Ecore_Eo.h index fa256b927f..04bc2f66a9 100644 --- a/src/lib/ecore/Ecore_Eo.h +++ b/src/lib/ecore/Ecore_Eo.h @@ -72,7 +72,7 @@ extern "C" { * @{ */ -#include "ecore_mainloop.eo.h" +#include "efl_loop.eo.h" /* We ue the factory pattern here, so you shouldn't call eo_add directly. */ EAPI Eo *ecore_main_loop_get(void); diff --git a/src/lib/ecore/ecore_idle_enterer.c b/src/lib/ecore/ecore_idle_enterer.c index 5bcbab810d..0cefb05d0f 100644 --- a/src/lib/ecore/ecore_idle_enterer.c +++ b/src/lib/ecore/ecore_idle_enterer.c @@ -10,7 +10,7 @@ #include "ecore_private.h" EO_CALLBACKS_ARRAY_DEFINE(ecore_idle_enterer_callbacks, - { ECORE_MAINLOOP_EVENT_IDLE_ENTER, _ecore_factorized_idle_process }, + { EFL_LOOP_EVENT_IDLE_ENTER, _ecore_factorized_idle_process }, { EO_BASE_EVENT_DEL, _ecore_factorized_idle_event_del }); @@ -45,5 +45,5 @@ ecore_idle_enterer_del(Ecore_Idle_Enterer *idle_enterer) void _ecore_idle_enterer_call(Eo *loop) { - eo_event_callback_call(loop, ECORE_MAINLOOP_EVENT_IDLE_ENTER, NULL); + eo_event_callback_call(loop, EFL_LOOP_EVENT_IDLE_ENTER, NULL); } diff --git a/src/lib/ecore/ecore_idle_exiter.c b/src/lib/ecore/ecore_idle_exiter.c index 07660d6dd9..acd7294385 100644 --- a/src/lib/ecore/ecore_idle_exiter.c +++ b/src/lib/ecore/ecore_idle_exiter.c @@ -10,7 +10,7 @@ #include "ecore_private.h" EO_CALLBACKS_ARRAY_DEFINE(ecore_idle_exiter_callbacks, - { ECORE_MAINLOOP_EVENT_IDLE_EXIT, _ecore_factorized_idle_process }, + { EFL_LOOP_EVENT_IDLE_EXIT, _ecore_factorized_idle_process }, { EO_BASE_EVENT_DEL, _ecore_factorized_idle_event_del }); EAPI Ecore_Idle_Exiter * @@ -29,5 +29,5 @@ ecore_idle_exiter_del(Ecore_Idle_Exiter *idle_exiter) void _ecore_idle_exiter_call(Eo *loop) { - eo_event_callback_call(loop, ECORE_MAINLOOP_EVENT_IDLE_EXIT, NULL); + eo_event_callback_call(loop, EFL_LOOP_EVENT_IDLE_EXIT, NULL); } diff --git a/src/lib/ecore/ecore_idler.c b/src/lib/ecore/ecore_idler.c index db429287b9..97c06396c1 100644 --- a/src/lib/ecore/ecore_idler.c +++ b/src/lib/ecore/ecore_idler.c @@ -84,7 +84,7 @@ _ecore_factorized_idle_add(const Eo_Callback_Array_Item *desc, /* Specific to Ecore_Idler implementation */ EO_CALLBACKS_ARRAY_DEFINE(ecore_idler_callbacks, - { ECORE_MAINLOOP_EVENT_IDLE, _ecore_factorized_idle_process }, + { EFL_LOOP_EVENT_IDLE, _ecore_factorized_idle_process }, { EO_BASE_EVENT_DEL, _ecore_factorized_idle_event_del }); EAPI Ecore_Idler * @@ -103,13 +103,13 @@ ecore_idler_del(Ecore_Idler *idler) void _ecore_idler_all_call(Eo *loop) { - eo_event_callback_call(loop, ECORE_MAINLOOP_EVENT_IDLE, NULL); + eo_event_callback_call(loop, EFL_LOOP_EVENT_IDLE, NULL); } int _ecore_idler_exist(Eo *loop) { - Ecore_Mainloop_Data *dt = eo_data_scope_get(loop, ECORE_MAINLOOP_CLASS); + Efl_Loop_Data *dt = eo_data_scope_get(loop, EFL_LOOP_CLASS); return dt->idlers; } diff --git a/src/lib/ecore/ecore_main.c b/src/lib/ecore/ecore_main.c index 6f8c5f14b6..fef3a1a709 100644 --- a/src/lib/ecore/ecore_main.c +++ b/src/lib/ecore/ecore_main.c @@ -1160,7 +1160,7 @@ _ecore_main_loop_init(void) detect_time_changes_start(); - _mainloop_singleton = eo_add(ECORE_MAINLOOP_CLASS, NULL); + _mainloop_singleton = eo_add(EFL_LOOP_CLASS, NULL); } void @@ -2719,31 +2719,31 @@ EAPI Eo *ecore_main_loop_get(void) { if (!_mainloop_singleton) { - _mainloop_singleton = eo_add(ECORE_MAINLOOP_CLASS, NULL); + _mainloop_singleton = eo_add(EFL_LOOP_CLASS, NULL); } return _mainloop_singleton; } EOLIAN static void -_ecore_mainloop_iterate(Eo *obj EINA_UNUSED, Ecore_Mainloop_Data *pd EINA_UNUSED) +_efl_loop_iterate(Eo *obj EINA_UNUSED, Efl_Loop_Data *pd EINA_UNUSED) { ecore_main_loop_iterate(); } -EOLIAN static int _ecore_mainloop_iterate_may_block(Eo *obj EINA_UNUSED, Ecore_Mainloop_Data *pd EINA_UNUSED, int may_block) +EOLIAN static int _efl_loop_iterate_may_block(Eo *obj EINA_UNUSED, Efl_Loop_Data *pd EINA_UNUSED, int may_block) { return ecore_main_loop_iterate_may_block(may_block); } EOLIAN static void -_ecore_mainloop_begin(Eo *obj EINA_UNUSED, Ecore_Mainloop_Data *pd EINA_UNUSED) +_efl_loop_begin(Eo *obj EINA_UNUSED, Efl_Loop_Data *pd EINA_UNUSED) { ecore_main_loop_begin(); } EOLIAN static void -_ecore_mainloop_quit(Eo *obj EINA_UNUSED, Ecore_Mainloop_Data *pd EINA_UNUSED) +_efl_loop_quit(Eo *obj EINA_UNUSED, Efl_Loop_Data *pd EINA_UNUSED) { ecore_main_loop_quit(); } @@ -2752,12 +2752,12 @@ static Eina_Bool _check_event_catcher_add(void *data, const Eo_Event *event) { const Eo_Callback_Array_Item *array = event->info; - Ecore_Mainloop_Data *pd = data; + Efl_Loop_Data *pd = data; int i; for (i = 0; array[i].desc != NULL; i++) { - if (array[i].desc == ECORE_MAINLOOP_EVENT_IDLE) + if (array[i].desc == EFL_LOOP_EVENT_IDLE) { ++pd->idlers; } @@ -2770,12 +2770,12 @@ static Eina_Bool _check_event_catcher_del(void *data, const Eo_Event *event) { const Eo_Callback_Array_Item *array = event->info; - Ecore_Mainloop_Data *pd = data; + Efl_Loop_Data *pd = data; int i; for (i = 0; array[i].desc != NULL; i++) { - if (array[i].desc == ECORE_MAINLOOP_EVENT_IDLE) + if (array[i].desc == EFL_LOOP_EVENT_IDLE) { --pd->idlers; } @@ -2789,12 +2789,12 @@ EO_CALLBACKS_ARRAY_DEFINE(event_catcher_watch, { EO_BASE_EVENT_CALLBACK_DEL, _check_event_catcher_del }); EOLIAN static Eo_Base * -_ecore_mainloop_eo_base_constructor(Eo *obj, Ecore_Mainloop_Data *pd) +_efl_loop_eo_base_constructor(Eo *obj, Efl_Loop_Data *pd) { - eo_constructor(eo_super(obj, ECORE_MAINLOOP_CLASS)); + eo_constructor(eo_super(obj, EFL_LOOP_CLASS)); eo_event_callback_array_add(obj, event_catcher_watch(), pd); return obj; } -#include "ecore_mainloop.eo.c" +#include "efl_loop.eo.c" diff --git a/src/lib/ecore/ecore_private.h b/src/lib/ecore/ecore_private.h index 62c6578378..76431d298f 100644 --- a/src/lib/ecore/ecore_private.h +++ b/src/lib/ecore/ecore_private.h @@ -87,8 +87,8 @@ extern int _ecore_log_dom; typedef struct _Ecore_Factorized_Idle Ecore_Factorized_Idle; -typedef struct _Ecore_Mainloop_Data Ecore_Mainloop_Data; -struct _Ecore_Mainloop_Data +typedef struct _Efl_Loop_Data Efl_Loop_Data; +struct _Efl_Loop_Data { int idlers; }; diff --git a/src/lib/ecore/ecore_mainloop.eo b/src/lib/ecore/efl_loop.eo similarity index 70% rename from src/lib/ecore/ecore_mainloop.eo rename to src/lib/ecore/efl_loop.eo index 326890c91c..80fac0a62a 100644 --- a/src/lib/ecore/ecore_mainloop.eo +++ b/src/lib/ecore/efl_loop.eo @@ -1,13 +1,14 @@ -class Ecore_Mainloop (Eo.Base) +class Efl.Loop (Eo.Base) { - [[The Ecore Main Loop + [[The Efl Main Loop - Ecore is a clean and tiny event loop library with many modules to do lots of - convenient things for a programmer, to save time and effort. It's small and - lean, designed to work from embedded systems all the way up to large and - powerful multi-cpu workstations. The main loop has a number of primitives to + Efl main loop provide a clean and tiny event loop library with many modules to + do lots of convenient things for a programmer, to save time and effort. It's + small and lean, designed to work from embedded systems all the way up to large + and powerful multi-cpu workstations. The main loop has a number of primitives to be used with its main loop. It serializes all the primitives and allows for - great responsiveness without the need for threads(or any other concurrency). + great responsiveness without the need for threads (or any other concurrency), but + provide them if you need to. ]] legacy_prefix: null; methods {