Update to new Eo callback stop mechanism
#FollowTheWhiteRabbit (tm)
This commit is contained in:
parent
36ca39e015
commit
be3069b280
|
@ -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:
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in New Issue