davemds pushed a commit to branch master. http://git.enlightenment.org/bindings/python/python-efl.git/commit/?id=be3069b28011e8cce228342e2daff83162e10220
commit be3069b28011e8cce228342e2daff83162e10220 Author: Dave Andreoli <d...@gurumeditation.it> Date: Sun Jun 26 15:54:36 2016 +0200 Update to new Eo callback stop mechanism #FollowTheWhiteRabbit (tm) --- efl/eo/efl.eo.pyx | 7 +++---- include/efl.c_eo.pxd | 6 ++---- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/efl/eo/efl.eo.pyx b/efl/eo/efl.eo.pyx index bd3549a..d7f8432 100644 --- a/efl/eo/efl.eo.pyx +++ b/efl/eo/efl.eo.pyx @@ -43,7 +43,7 @@ from efl.c_eo cimport Eo as cEo, eo_init, eo_shutdown, eo_del, \ eo_parent_get, eo_parent_set, Eo_Event_Description, \ eo_event_freeze, eo_event_thaw, eo_event_freeze_count_get, \ eo_event_global_freeze, eo_event_global_thaw, \ - eo_event_global_freeze_count_get, EO_CALLBACK_STOP, \ + eo_event_global_freeze_count_get, eo_event_callback_stop, \ eo_children_iterator_new, Eo_Event from efl.utils.logger cimport add_logger @@ -182,20 +182,19 @@ cdef void _register_decorated_callbacks(Eo obj): ###################################################################### -cdef Eina_Bool _eo_event_del_cb(void *data, const Eo_Event *event) with gil: +cdef void _eo_event_del_cb(void *data, const Eo_Event *event) with gil: cdef: Eo self = <Eo>data const char *cls_name = eo_class_name_get(eo_class_get(self.obj)) EINA_LOG_DOM_DBG(PY_EFL_EO_LOG_DOMAIN, "Deleting Eo: %s", cls_name) + eo_event_callback_stop(self.obj) eo_event_callback_del(self.obj, EO_EVENT_DEL, _eo_event_del_cb, <const void *>self) eo_key_data_set(self.obj, "python-eo", NULL) self.obj = NULL Py_DECREF(self) - return EO_CALLBACK_STOP - cdef class EoIterator: diff --git a/include/efl.c_eo.pxd b/include/efl.c_eo.pxd index a21cfd3..02f0b99 100644 --- a/include/efl.c_eo.pxd +++ b/include/efl.c_eo.pxd @@ -54,9 +54,6 @@ cdef extern from "Eo.h": EO_CALLBACK_PRIORITY_DEFAULT EO_CALLBACK_PRIORITY_AFTER - cdef enum: - EO_CALLBACK_STOP - EO_CALLBACK_CONTINUE #################################################################### # Structures @@ -89,7 +86,7 @@ cdef extern from "Eo.h": #################################################################### # Other typedefs # - ctypedef Eina_Bool (*Eo_Event_Cb)(void *data, const Eo_Event *event) + ctypedef void (*Eo_Event_Cb)(void *data, const Eo_Event *event) ctypedef void (*eo_key_data_free_func)(void *) @@ -119,6 +116,7 @@ cdef extern from "Eo.h": void eo_parent_set(Eo *obj, Eo *parent) Eo *eo_parent_get(const Eo *obj) + void eo_event_callback_stop(Eo *obj) void eo_event_callback_forwarder_add(Eo *obj, const Eo_Event_Description *desc, Eo *new_obj) void eo_event_callback_forwarder_del(Eo *obj, const Eo_Event_Description *desc, Eo *new_obj) --