forked from enlightenment/efl
Ecore mainloop: Add .eo implementation.
This commit is contained in:
parent
9969737640
commit
17e99e6750
|
@ -21,6 +21,8 @@ BUILT_SOURCES += \
|
|||
lib/ecore/ecore_animator.eo.c \
|
||||
lib/ecore/ecore_animator.eo.h \
|
||||
lib/ecore/ecore_animator.eo.legacy.h \
|
||||
lib/ecore/ecore_mainloop.eo.c \
|
||||
lib/ecore/ecore_mainloop.eo.h \
|
||||
lib/ecore/ecore_parent.eo.c \
|
||||
lib/ecore/ecore_parent.eo.h
|
||||
|
||||
|
@ -33,6 +35,7 @@ ecoreeolianfiles_DATA = \
|
|||
lib/ecore/ecore_idle_enterer.eo \
|
||||
lib/ecore/ecore_idle_exiter.eo \
|
||||
lib/ecore/ecore_animator.eo \
|
||||
lib/ecore/ecore_mainloop.eo \
|
||||
lib/ecore/ecore_parent.eo
|
||||
|
||||
EXTRA_DIST += \
|
||||
|
@ -56,6 +59,7 @@ nodist_installed_ecoremainheaders_DATA = \
|
|||
lib/ecore/ecore_idle_enterer.eo.h \
|
||||
lib/ecore/ecore_idle_exiter.eo.h \
|
||||
lib/ecore/ecore_animator.eo.h \
|
||||
lib/ecore/ecore_mainloop.eo.h \
|
||||
lib/ecore/ecore_parent.eo.h \
|
||||
lib/ecore/ecore_timer.eo.legacy.h \
|
||||
lib/ecore/ecore_poller.eo.legacy.h \
|
||||
|
|
|
@ -63,6 +63,21 @@ extern "C" {
|
|||
|
||||
#include "ecore_job.eo.h"
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @ingroup Ecore_MainLoop_Group
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
|
||||
#include "ecore_mainloop.eo.h"
|
||||
|
||||
/* We ue the factory pattern here, so you shouldn't call eo_add directly. */
|
||||
EAPI Eo *ecore_main_loop_get(void);
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
|
|
@ -2309,3 +2309,58 @@ _ecore_main_win32_select(int nfds EINA_UNUSED,
|
|||
}
|
||||
|
||||
#endif
|
||||
|
||||
static Eo *_mainloop_singleton = NULL;
|
||||
|
||||
EAPI Eo *ecore_main_loop_get(void)
|
||||
{
|
||||
if (!_mainloop_singleton)
|
||||
{
|
||||
_mainloop_singleton = eo_add(ECORE_MAINLOOP_CLASS, NULL);
|
||||
}
|
||||
|
||||
return _mainloop_singleton;
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
_ecore_mainloop_select_func_set(Eo *obj EINA_UNUSED, void *pd EINA_UNUSED, Ecore_Select_Function select_func)
|
||||
{
|
||||
ecore_main_loop_select_func_set(select_func);
|
||||
}
|
||||
|
||||
EOLIAN static Ecore_Select_Function
|
||||
_ecore_mainloop_select_func_get(Eo *obj EINA_UNUSED, void *pd EINA_UNUSED)
|
||||
{
|
||||
return ecore_main_loop_select_func_get();
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
_ecore_mainloop_iterate(Eo *obj EINA_UNUSED, void *pd EINA_UNUSED)
|
||||
{
|
||||
ecore_main_loop_iterate();
|
||||
}
|
||||
|
||||
EOLIAN static int _ecore_mainloop_iterate_may_block(Eo *obj EINA_UNUSED, void *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, void *pd EINA_UNUSED)
|
||||
{
|
||||
ecore_main_loop_begin();
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
_ecore_mainloop_quit(Eo *obj EINA_UNUSED, void *pd EINA_UNUSED)
|
||||
{
|
||||
ecore_main_loop_quit();
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_ecore_mainloop_animator_ticked(Eo *obj EINA_UNUSED, void *pd EINA_UNUSED)
|
||||
{
|
||||
return ecore_main_loop_animator_ticked_get();
|
||||
}
|
||||
|
||||
#include "ecore_mainloop.eo.c"
|
||||
|
|
|
@ -0,0 +1,34 @@
|
|||
class Ecore_Mainloop (Eo_Base)
|
||||
{
|
||||
legacy_prefix: null;
|
||||
data: null;
|
||||
properties {
|
||||
select_func {
|
||||
set {
|
||||
}
|
||||
get {
|
||||
}
|
||||
values {
|
||||
Ecore_Select_Function select_func;
|
||||
}
|
||||
}
|
||||
}
|
||||
methods {
|
||||
iterate {
|
||||
}
|
||||
iterate_may_block {
|
||||
return int;
|
||||
params {
|
||||
int may_block;
|
||||
}
|
||||
}
|
||||
begin {
|
||||
}
|
||||
quit {
|
||||
}
|
||||
animator_ticked {
|
||||
/* FIXME: Should it be a prooperty? */
|
||||
return Eina_Bool;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue