From 67c7eb3134d33c84ba72bb5ba8da6e718a30f511 Mon Sep 17 00:00:00 2001 From: Daniel Kolesa Date: Wed, 26 Apr 2017 14:25:37 +0200 Subject: [PATCH] eo: move future_link to C --- src/lib/eo/Eo.h | 9 +++++++++ src/lib/eo/efl_object.eo | 7 ------- src/lib/eo/eo_base_class.c | 5 ++++- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/src/lib/eo/Eo.h b/src/lib/eo/Eo.h index 259e1ac37c..60258a248e 100644 --- a/src/lib/eo/Eo.h +++ b/src/lib/eo/Eo.h @@ -341,6 +341,15 @@ EOAPI Eina_Bool efl_event_callback_call(Eo *obj, const Efl_Event_Description *de */ EOAPI Eina_Bool efl_event_callback_legacy_call(Eo *obj, const Efl_Event_Description *desc, void *event_info); +/** + * @brief Track a future life cycle and cancel it if the object dies. + * + * @param[in] link The future to link with the object + * + * @return @c true if it succeeded on setting up the tracking. + */ +EOAPI Eina_Bool efl_future_link(Eo *obj, Efl_Future *link); + /** * @addtogroup Eo_Debug_Information Eo's Debug information helper. * @{ diff --git a/src/lib/eo/efl_object.eo b/src/lib/eo/efl_object.eo index 6d0aa97bd4..8daa6cd33f 100644 --- a/src/lib/eo/efl_object.eo +++ b/src/lib/eo/efl_object.eo @@ -343,13 +343,6 @@ abstract Efl.Object () ]] return: bool; [[$true if it is. $false otherwise.]] } - future_link { - [[Track a future life cycle and cancel it if the object die]] - params { - @in link: future; [[The future to link with the object]] - } - return: bool; [[$true if it succeeded on setting up the tracking.]] - } } implements { class.constructor; diff --git a/src/lib/eo/eo_base_class.c b/src/lib/eo/eo_base_class.c index aafa65590a..fa9efbc30e 100644 --- a/src/lib/eo/eo_base_class.c +++ b/src/lib/eo/eo_base_class.c @@ -1951,6 +1951,8 @@ _efl_object_future_link_tracking_end(void *data, const Efl_Event *ev) _efl_object_extension_noneed(pd); } +EOAPI EFL_FUNC_BODYV(efl_future_link, Eina_Bool, 0, EFL_FUNC_CALL(link), Efl_Future *link); + EOLIAN static Eina_Bool _efl_object_future_link(Eo *obj EINA_UNUSED, Efl_Object_Data *pd, Efl_Future *link) { @@ -1971,6 +1973,7 @@ _efl_object_future_link(Eo *obj EINA_UNUSED, Efl_Object_Data *pd, Efl_Future *li EFL_OBJECT_OP_FUNC(efl_event_callback_array_del, _efl_object_event_callback_array_del), \ EFL_OBJECT_OP_FUNC(efl_event_callback_call, _efl_object_event_callback_call), \ EFL_OBJECT_OP_FUNC(efl_event_callback_legacy_call, _efl_object_event_callback_legacy_call), \ - EFL_OBJECT_OP_FUNC(efl_dbg_info_get, _efl_object_dbg_info_get) + EFL_OBJECT_OP_FUNC(efl_dbg_info_get, _efl_object_dbg_info_get), \ + EFL_OBJECT_OP_FUNC(efl_future_link, _efl_object_future_link) #include "efl_object.eo.c"