forked from enlightenment/efl
ecore: allow efl_loop_future_scheduler_get on all Efl.Loop.User.
This commit is contained in:
parent
a9aed90fde
commit
ba34b998eb
|
@ -29,4 +29,10 @@ _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,6 +14,18 @@ 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