forked from enlightenment/efl
ecore: make efl_loop_future_scheduler_get shouldn't be exposed in the object function.
Function declared in a .eo are something that we want to allow people to inherit from or use in a binding. I can't think of a situation where that would be the case for this function and it solves at the same time problem of needing a shared interface for both loop and loop_user.
This commit is contained in:
parent
706bdcd771
commit
8400859213
|
@ -40,6 +40,8 @@ extern "C" {
|
|||
|
||||
#include "efl_loop_user.eo.h"
|
||||
|
||||
EAPI Eina_Future_Scheduler *efl_loop_future_scheduler_get(Eo *obj);
|
||||
|
||||
#include "efl_loop_fd.eo.h"
|
||||
|
||||
#include "efl_promise.eo.h"
|
||||
|
|
|
@ -3390,12 +3390,15 @@ _efl_loop_efl_version_get(Eo *obj EINA_UNUSED, Efl_Loop_Data *pd EINA_UNUSED)
|
|||
return &version;
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Future_Scheduler *
|
||||
_efl_loop_future_scheduler_get(Eo *obj EINA_UNUSED,
|
||||
Efl_Loop_Data *pd EINA_UNUSED)
|
||||
EAPI Eina_Future_Scheduler *
|
||||
efl_loop_future_scheduler_get(Eo *obj)
|
||||
{
|
||||
return _ecore_event_future_scheduler_get();
|
||||
if (!obj) return NULL;
|
||||
|
||||
if (efl_isa(obj, EFL_LOOP_CLASS))
|
||||
return _ecore_event_future_scheduler_get();
|
||||
|
||||
return efl_loop_future_scheduler_get(efl_loop_get(obj));
|
||||
}
|
||||
|
||||
|
||||
#include "efl_loop.eo.c"
|
||||
|
|
|
@ -70,18 +70,6 @@ class Efl.Loop (Efl.Object)
|
|||
@in exit_code: ubyte; [[Returned value by begin()]]
|
||||
}
|
||||
}
|
||||
@property future_scheduler {
|
||||
[[Gets the Eina_Future_Scheduler for a given mainloop.
|
||||
|
||||
The Eina_Future_Scheduler returned by this function
|
||||
should be used for creating promises (eina_promise_new())
|
||||
so then can properly schedule resolve/reject events.
|
||||
]]
|
||||
get {}
|
||||
values {
|
||||
scheduler: ptr(Eina.Future.Scheduler); [[The scheduler.]]
|
||||
}
|
||||
}
|
||||
Eina_FutureXXX_job {
|
||||
[[A future promise that will be resolved from a clean main
|
||||
loop context as soon as possible.
|
||||
|
|
|
@ -29,10 +29,4 @@ _efl_loop_user_efl_object_parent_set(Eo *obj, Efl_Loop_User_Data *pd EINA_UNUSED
|
|||
efl_parent_set(efl_super(obj, EFL_LOOP_USER_CLASS), parent);
|
||||
}
|
||||
|
||||
static Eina_Future_Scheduler *
|
||||
_efl_loop_user_future_scheduler_get(Eo *obj, Efl_Loop_User_Data *pd EINA_UNUSED)
|
||||
{
|
||||
return efl_loop_future_scheduler_get(efl_loop_get(obj));
|
||||
}
|
||||
|
||||
#include "efl_loop_user.eo.c"
|
||||
|
|
|
@ -14,18 +14,6 @@ class Efl.Loop_User (Efl.Object)
|
|||
loop: Efl.Loop; [[Efl loop]]
|
||||
}
|
||||
}
|
||||
@property future_scheduler {
|
||||
[[Gets the Eina_Future_Scheduler for a given mainloop.
|
||||
|
||||
The Eina_Future_Scheduler returned by this function
|
||||
should be used for creating promises (eina_promise_new())
|
||||
so then can properly schedule resolve/reject events.
|
||||
]]
|
||||
get {}
|
||||
values {
|
||||
scheduler: ptr(Eina.Future.Scheduler); [[The scheduler.]]
|
||||
}
|
||||
}
|
||||
}
|
||||
implements {
|
||||
Efl.Object.parent { set; }
|
||||
|
|
Loading…
Reference in New Issue