summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKai Huuhko <kai.huuhko@gmail.com>2016-03-09 20:07:05 +0200
committerKai Huuhko <kai.huuhko@gmail.com>2016-03-09 20:07:05 +0200
commit77d023dfe1fecfc980968c91bd8e170b06539e15 (patch)
tree2169cb0a10773d5ca6dd052d91e403a5a7c8c199
parent05c19962dc966f4ca1d64435ad29c7f9d49ef170 (diff)
More Eo updates
-rw-r--r--efl/elementary/systray.pxi4
-rw-r--r--efl/eo/efl.eo.pyx10
-rw-r--r--include/efl.c_eo.pxd7
3 files changed, 11 insertions, 10 deletions
diff --git a/efl/elementary/systray.pxi b/efl/elementary/systray.pxi
index e08cd80..4407ecc 100644
--- a/efl/elementary/systray.pxi
+++ b/efl/elementary/systray.pxi
@@ -26,7 +26,9 @@ cdef class Systray(Eo):
26 """ 26 """
27 27
28 def __init__(self, Eo parent not None, *args, **kwargs): 28 def __init__(self, Eo parent not None, *args, **kwargs):
29 self._set_obj(eo_add(elm_systray_class_get(), parent.obj)) 29 cdef cEo *obj
30 eo_add(&obj, elm_systray_class_get(), parent.obj)
31 self._set_obj(obj)
30 self._set_properties_from_keyword_args(kwargs) 32 self._set_properties_from_keyword_args(kwargs)
31 33
32 property id: 34 property id:
diff --git a/efl/eo/efl.eo.pyx b/efl/eo/efl.eo.pyx
index aa5bbaf..73e905c 100644
--- a/efl/eo/efl.eo.pyx
+++ b/efl/eo/efl.eo.pyx
@@ -39,12 +39,12 @@ from efl.eina cimport Eina_Bool, \
39from efl.c_eo cimport Eo as cEo, eo_init, eo_shutdown, eo_del, \ 39from efl.c_eo cimport Eo as cEo, eo_init, eo_shutdown, eo_del, \
40 eo_class_name_get, eo_class_get, eo_base_class_get,\ 40 eo_class_name_get, eo_class_get, eo_base_class_get,\
41 eo_key_data_set, eo_key_data_get, eo_key_data_del, \ 41 eo_key_data_set, eo_key_data_get, eo_key_data_del, \
42 eo_event_callback_add, eo_event_callback_del, EO_EV_DEL, \ 42 eo_event_callback_add, eo_event_callback_del, EO_BASE_EVENT_DEL, \
43 eo_parent_get, eo_parent_set, Eo_Event_Description, \ 43 eo_parent_get, eo_parent_set, Eo_Event_Description, \
44 eo_event_freeze, eo_event_thaw, eo_event_freeze_count_get, \ 44 eo_event_freeze, eo_event_thaw, eo_event_freeze_count_get, \
45 eo_event_global_freeze, eo_event_global_thaw, \ 45 eo_event_global_freeze, eo_event_global_thaw, \
46 eo_event_global_freeze_count_get, EO_CALLBACK_STOP, \ 46 eo_event_global_freeze_count_get, EO_CALLBACK_STOP, \
47 eo_children_iterator_new, Eo_Event2 47 eo_children_iterator_new, Eo_Event
48 48
49from efl.utils.logger cimport add_logger 49from efl.utils.logger cimport add_logger
50 50
@@ -182,14 +182,14 @@ cdef void _register_decorated_callbacks(Eo obj):
182###################################################################### 182######################################################################
183 183
184 184
185cdef Eina_Bool _eo_event_del_cb(void *data, const Eo_Event2 *event) with gil: 185cdef Eina_Bool _eo_event_del_cb(void *data, const Eo_Event *event) with gil:
186 cdef: 186 cdef:
187 Eo self = <Eo>data 187 Eo self = <Eo>data
188 const char *cls_name = eo_class_name_get(eo_class_get(self.obj)) 188 const char *cls_name = eo_class_name_get(eo_class_get(self.obj))
189 189
190 EINA_LOG_DOM_DBG(PY_EFL_EO_LOG_DOMAIN, "Deleting Eo: %s", cls_name) 190 EINA_LOG_DOM_DBG(PY_EFL_EO_LOG_DOMAIN, "Deleting Eo: %s", cls_name)
191 191
192 eo_event_callback_del(self.obj, EO_EV_DEL, _eo_event_del_cb, <const void *>self) 192 eo_event_callback_del(self.obj, EO_BASE_EVENT_DEL, _eo_event_del_cb, <const void *>self)
193 eo_key_data_del(self.obj, "python-eo") 193 eo_key_data_del(self.obj, "python-eo")
194 self.obj = NULL 194 self.obj = NULL
195 Py_DECREF(self) 195 Py_DECREF(self)
@@ -253,7 +253,7 @@ cdef class Eo(object):
253 253
254 self.obj = obj 254 self.obj = obj
255 eo_key_data_set(self.obj, "python-eo", <void *>self) 255 eo_key_data_set(self.obj, "python-eo", <void *>self)
256 eo_event_callback_add(self.obj, EO_EV_DEL, _eo_event_del_cb, <const void *>self) 256 eo_event_callback_add(self.obj, EO_BASE_EVENT_DEL, _eo_event_del_cb, <const void *>self)
257 Py_INCREF(self) 257 Py_INCREF(self)
258 258
259 return 1 259 return 1
diff --git a/include/efl.c_eo.pxd b/include/efl.c_eo.pxd
index 66207ab..d4906fa 100644
--- a/include/efl.c_eo.pxd
+++ b/include/efl.c_eo.pxd
@@ -77,20 +77,19 @@ cdef extern from "Eo.h":
77 const Eo_Event_Description *desc # The event description. */ 77 const Eo_Event_Description *desc # The event description. */
78 void *event_info # Extra event information passed by the event caller. */ 78 void *event_info # Extra event information passed by the event caller. */
79 ctypedef _Eo_Event Eo_Event 79 ctypedef _Eo_Event Eo_Event
80 ctypedef _Eo_Event Eo_Event2
81 80
82 81
83 #################################################################### 82 ####################################################################
84 # Eo Events 83 # Eo Events
85 # 84 #
86 85
87 cdef const Eo_Event_Description *EO_EV_DEL 86 cdef const Eo_Event_Description *EO_BASE_EVENT_DEL
88 87
89 88
90 #################################################################### 89 ####################################################################
91 # Other typedefs 90 # Other typedefs
92 # 91 #
93 ctypedef Eina_Bool (*Eo_Event_Cb)(void *data, const Eo_Event2 *event) 92 ctypedef Eina_Bool (*Eo_Event_Cb)(void *data, const Eo_Event *event)
94 93
95 ctypedef void (*eo_key_data_free_func)(void *) 94 ctypedef void (*eo_key_data_free_func)(void *)
96 95
@@ -101,7 +100,7 @@ cdef extern from "Eo.h":
101 int eo_init() 100 int eo_init()
102 int eo_shutdown() 101 int eo_shutdown()
103 102
104 Eo *eo_add(const Eo_Class *klass, Eo *parent, ...) 103 void eo_add(Eo **objp, const Eo_Class *klass, Eo *parent, ...)
105 Eo *eo_ref(const Eo *obj) 104 Eo *eo_ref(const Eo *obj)
106 void eo_unref(const Eo *obj) 105 void eo_unref(const Eo *obj)
107 int eo_ref_get(const Eo *obj) 106 int eo_ref_get(const Eo *obj)