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.
#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"
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"
@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.
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"
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; }