ecore: rename Ecore_Mainloop to Efl.Loop.

This commit is contained in:
Cedric BAIL 2016-04-21 15:11:32 -07:00
parent 9efefb1f2e
commit 454722cf6f
8 changed files with 32 additions and 31 deletions

View File

@ -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 = \

View File

@ -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);

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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;
}

View File

@ -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"

View File

@ -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;
};

View File

@ -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 {