kuuko pushed a commit to branch master.

http://git.enlightenment.org/bindings/python/python-efl.git/commit/?id=05c19962dc966f4ca1d64435ad29c7f9d49ef170

commit 05c19962dc966f4ca1d64435ad29c7f9d49ef170
Author: Kai Huuhko <kai.huu...@gmail.com>
Date:   Fri Mar 4 11:07:51 2016 +0200

    Follow changes in Eo
    
    - version 4 (eo_add changes coming later)
    - events
---
 efl/elementary/elementary_cdef.pxi |   2 +-
 efl/elementary/systray.pxi         | 130 ++++++++++++-------------------------
 efl/elementary/systray_cdef.pxi    |  34 +++++-----
 efl/eo/efl.eo.pyx                  |  62 +++++++-----------
 efl/evas/efl.evas_object_smart.pxi |  28 ++++----
 include/efl.c_eo.pxd               |  54 ++++++++-------
 6 files changed, 128 insertions(+), 182 deletions(-)

diff --git a/efl/elementary/elementary_cdef.pxi 
b/efl/elementary/elementary_cdef.pxi
index 2e3c1cc..bf56d09 100644
--- a/efl/elementary/elementary_cdef.pxi
+++ b/efl/elementary/elementary_cdef.pxi
@@ -1,4 +1,4 @@
-from efl.c_eo cimport Eo as cEo, Eo_Class, eo_add, eo_do, eo_do_ret
+from efl.c_eo cimport Eo as cEo, Eo_Class, eo_add
 from efl.eina cimport Eina_Rectangle, Eina_Compare_Cb, \
     eina_list_free, eina_list_append, eina_stringshare_del
 from efl.evas cimport Eina_List, Eina_Bool, Evas_Object, Evas_Font_Size, \
diff --git a/efl/elementary/systray.pxi b/efl/elementary/systray.pxi
index 7bf021b..e08cd80 100644
--- a/efl/elementary/systray.pxi
+++ b/efl/elementary/systray.pxi
@@ -37,27 +37,21 @@ cdef class Systray(Eo):
         """
         def __set__(self, value):
             if isinstance(value, unicode): value = 
PyUnicode_AsUTF8String(value)
-            eo_do(self.obj, elm_obj_systray_id_set(
-                <const char *>value if value is not None else NULL
+            elm_obj_systray_id_set(
+                self.obj, <const char *>value if value is not None else NULL
                 )
-            )
 
         def __get__(self):
-            cdef const char *value = ""
-            eo_do_ret(self.obj, value, elm_obj_systray_id_get())
-            return _ctouni(value)
+            return _ctouni(elm_obj_systray_id_get(self.obj))
 
     def id_set(self, value):
         if isinstance(value, unicode): value = PyUnicode_AsUTF8String(value)
-        eo_do(self.obj, elm_obj_systray_id_set(
-            <const char *>value if value is not None else NULL
+        elm_obj_systray_id_set(
+            self.obj, <const char *>value if value is not None else NULL
             )
-        )
 
     def id_get(self):
-        cdef const char *value = ""
-        eo_do_ret(self.obj, value, elm_obj_systray_id_get())
-        return _ctouni(value)
+        return _ctouni(elm_obj_systray_id_get(self.obj))
 
     property category:
         """
@@ -68,20 +62,16 @@ cdef class Systray(Eo):
 
         """
         def __set__(self, Elm_Systray_Category value):
-            eo_do(self.obj, elm_obj_systray_category_set(value))
+            elm_obj_systray_category_set(self.obj, value)
 
         def __get__(self):
-            cdef Elm_Systray_Category value = ELM_SYSTRAY_CATEGORY_APP_STATUS
-            eo_do_ret(self.obj, value, elm_obj_systray_category_get())
-            return <Elm_Systray_Category>value
+            return <Elm_Systray_Category>elm_obj_systray_category_get(self.obj)
 
     def category_set(self, Elm_Systray_Category value):
-        eo_do(self.obj, elm_obj_systray_category_set(value))
+        elm_obj_systray_category_set(self.obj, value)
 
     def category_get(self):
-        cdef Elm_Systray_Category value = ELM_SYSTRAY_CATEGORY_APP_STATUS
-        eo_do_ret(self.obj, value, elm_obj_systray_category_get())
-        return value
+        return <Elm_Systray_Category>elm_obj_systray_category_get(self.obj)
 
     property icon_theme_path:
         """The path to the theme where the icons can be found.
@@ -92,27 +82,21 @@ cdef class Systray(Eo):
         """
         def __set__(self, value):
             if isinstance(value, unicode): value = 
PyUnicode_AsUTF8String(value)
-            eo_do(self.obj, elm_obj_systray_icon_theme_path_set(
-                <const char *>value if value is not None else NULL
+            elm_obj_systray_icon_theme_path_set(
+                self.obj, <const char *>value if value is not None else NULL
                 )
-            )
 
         def __get__(self):
-            cdef const char *value = ""
-            eo_do_ret(self.obj, value, elm_obj_systray_icon_theme_path_get())
-            return _ctouni(value)
+            return _ctouni(elm_obj_systray_icon_theme_path_get(self.obj))
 
     def icon_theme_path_set(self, value):
         if isinstance(value, unicode): value = PyUnicode_AsUTF8String(value)
-        eo_do(self.obj, elm_obj_systray_icon_theme_path_set(
-            <const char *>value if value is not None else NULL
+        elm_obj_systray_icon_theme_path_set(
+            self.obj, <const char *>value if value is not None else NULL
             )
-        )
 
     def icon_theme_path_get(self):
-        cdef const char *value = ""
-        eo_do_ret(self.obj, value, elm_obj_systray_icon_theme_path_get())
-        return _ctouni(value)
+        return _ctouni(elm_obj_systray_icon_theme_path_get(self.obj))
 
     property menu:
         """The D-Bus Menu to be shown when the Status Notifier Item is 
activated by the user.
@@ -120,20 +104,16 @@ cdef class Systray(Eo):
         :type: :class:`~efl.elementary.menu.Menu`
         """
         def __set__(self, Eo value):
-            eo_do(self.obj, elm_obj_systray_menu_set(value.obj))
+            elm_obj_systray_menu_set(self.obj, value.obj)
 
         def __get__(self):
-            cdef const cEo *value = NULL
-            eo_do_ret(self.obj, value, elm_obj_systray_menu_get())
-            return object_from_instance(<cEo *>value)
+            return object_from_instance(elm_obj_systray_menu_get(self.obj))
 
     def menu_set(self, Eo value):
-        eo_do(self.obj, elm_obj_systray_menu_set(value.obj))
+        elm_obj_systray_menu_set(self.obj, value.obj)
 
     def menu_get(self):
-        cdef const cEo *value = NULL
-        eo_do_ret(self.obj, value, elm_obj_systray_menu_get())
-        return object_from_instance(<cEo *>value)
+        return object_from_instance(elm_obj_systray_menu_get(self.obj))
 
     property att_icon_name:
         """The name of the attention icon to be used by the Status Notifier 
Item.
@@ -142,27 +122,21 @@ cdef class Systray(Eo):
         """
         def __set__(self, value):
             if isinstance(value, unicode): value = 
PyUnicode_AsUTF8String(value)
-            eo_do(self.obj, elm_obj_systray_att_icon_name_set(
-                <const char *>value if value is not None else NULL
+            elm_obj_systray_att_icon_name_set(
+                self.obj, <const char *>value if value is not None else NULL
                 )
-            )
 
         def __get__(self):
-            cdef const char *value = ""
-            eo_do_ret(self.obj, value, elm_obj_systray_att_icon_name_get())
-            return _ctouni(value)
+            return _ctouni(elm_obj_systray_att_icon_name_get(self.obj))
 
     def att_icon_name_set(self, value):
         if isinstance(value, unicode): value = PyUnicode_AsUTF8String(value)
-        eo_do(self.obj, elm_obj_systray_att_icon_name_set(
-            <const char *>value if value is not None else NULL
+        elm_obj_systray_att_icon_name_set(
+            self.obj, <const char *>value if value is not None else NULL
             )
-        )
 
     def att_icon_name_get(self):
-        cdef const char *value = ""
-        eo_do_ret(self.obj, value, elm_obj_systray_att_icon_name_get())
-        return _ctouni(value)
+        return _ctouni(elm_obj_systray_att_icon_name_get(self.obj))
 
     property status:
         """The status of the Status Notifier Item.
@@ -170,20 +144,16 @@ cdef class Systray(Eo):
         :type: :ref:`Elm_Systray_Status`
         """
         def __set__(self, Elm_Systray_Status value):
-            eo_do(self.obj, elm_obj_systray_status_set(value))
+            elm_obj_systray_status_set(self.obj, value)
 
         def __get__(self):
-            cdef Elm_Systray_Status value = ELM_SYSTRAY_STATUS_PASSIVE
-            eo_do_ret(self.obj, value, elm_obj_systray_status_get())
-            return value
+            return elm_obj_systray_status_get(self.obj)
 
     def status_set(self, Elm_Systray_Status value):
-        eo_do(self.obj, elm_obj_systray_status_set(value))
+        elm_obj_systray_status_set(self.obj, value)
 
     def status_get(self):
-        cdef Elm_Systray_Status value = ELM_SYSTRAY_STATUS_PASSIVE
-        eo_do_ret(self.obj, value, elm_obj_systray_status_get())
-        return value
+        return elm_obj_systray_status_get(self.obj)
 
     property icon_name:
         """The name of the icon to be used by the Status Notifier Item.
@@ -192,27 +162,21 @@ cdef class Systray(Eo):
         """
         def __set__(self, value):
             if isinstance(value, unicode): value = 
PyUnicode_AsUTF8String(value)
-            eo_do(self.obj, elm_obj_systray_icon_name_set(
-                <const char *>value if value is not None else NULL
+            elm_obj_systray_icon_name_set(
+                self.obj, <const char *>value if value is not None else NULL
                 )
-            )
 
         def __get__(self):
-            cdef const char *value = ""
-            eo_do_ret(self.obj, value, elm_obj_systray_icon_name_get())
-            return _ctouni(value)
+            return _ctouni(elm_obj_systray_icon_name_get(self.obj))
 
     def icon_name_set(self, value):
         if isinstance(value, unicode): value = PyUnicode_AsUTF8String(value)
-        eo_do(self.obj, elm_obj_systray_icon_name_set(
-            <const char *>value if value is not None else NULL
+        elm_obj_systray_icon_name_set(
+            self.obj, <const char *>value if value is not None else NULL
             )
-        )
 
     def icon_name_get(self):
-        cdef const char *value = ""
-        eo_do_ret(self.obj, value, elm_obj_systray_icon_name_get())
-        return _ctouni(value)
+        return _ctouni(elm_obj_systray_icon_name_get(self.obj))
 
     property title:
         """The title of the Status Notifier Item.
@@ -221,27 +185,21 @@ cdef class Systray(Eo):
         """
         def __set__(self, value):
             if isinstance(value, unicode): value = 
PyUnicode_AsUTF8String(value)
-            eo_do(self.obj, elm_obj_systray_title_set(
-                <const char *>value if value is not None else NULL
+            elm_obj_systray_title_set(
+                self.obj, <const char *>value if value is not None else NULL
                 )
-            )
 
         def __get__(self):
-            cdef const char *value = ""
-            eo_do_ret(self.obj, value, elm_obj_systray_title_get())
-            return _ctouni(value)
+            return _ctouni(elm_obj_systray_title_get(self.obj))
 
     def title_set(self, value):
         if isinstance(value, unicode): value = PyUnicode_AsUTF8String(value)
-        eo_do(self.obj, elm_obj_systray_title_set(
-            <const char *>value if value is not None else NULL
+        elm_obj_systray_title_set(
+            self.obj, <const char *>value if value is not None else NULL
             )
-        )
 
     def title_get(self):
-        cdef const char *value = ""
-        eo_do_ret(self.obj, value, elm_obj_systray_title_get())
-        return _ctouni(value)
+        return _ctouni(elm_obj_systray_title_get(self.obj))
 
     def register(self):
         """Register this Status Notifier Item in the System Tray Watcher.
@@ -251,9 +209,7 @@ cdef class Systray(Eo):
         :func:`on_systray_ready`, is emitted.
 
         """
-        cdef Eina_Bool value = 0
-        eo_do_ret(self.obj, value, elm_obj_systray_register())
-        return value
+        return elm_obj_systray_register(self.obj)
 
 
 def on_systray_ready(func, *args, **kwargs):
diff --git a/efl/elementary/systray_cdef.pxi b/efl/elementary/systray_cdef.pxi
index f4b558f..62e8451 100644
--- a/efl/elementary/systray_cdef.pxi
+++ b/efl/elementary/systray_cdef.pxi
@@ -21,20 +21,20 @@ cdef extern from "Elementary.h":
 
     const Eo_Class *elm_systray_class_get()
 
-    void  elm_obj_systray_id_set(const char *id)
-    const char * elm_obj_systray_id_get()
-    void  elm_obj_systray_category_set(Elm_Systray_Category cat)
-    Elm_Systray_Category  elm_obj_systray_category_get()
-    void  elm_obj_systray_icon_theme_path_set(const char *icon_theme_path)
-    const char * elm_obj_systray_icon_theme_path_get()
-    void  elm_obj_systray_menu_set(const cEo *menu)
-    const cEo * elm_obj_systray_menu_get()
-    void  elm_obj_systray_att_icon_name_set(const char *att_icon_name)
-    const char * elm_obj_systray_att_icon_name_get()
-    void  elm_obj_systray_status_set(Elm_Systray_Status st)
-    Elm_Systray_Status  elm_obj_systray_status_get()
-    void  elm_obj_systray_icon_name_set(const char *icon_name)
-    const char * elm_obj_systray_icon_name_get()
-    void  elm_obj_systray_title_set(const char *title)
-    const char * elm_obj_systray_title_get()
-    Eina_Bool  elm_obj_systray_register()
+    void  elm_obj_systray_id_set(cEo *obj, const char *id)
+    const char * elm_obj_systray_id_get(const cEo *obj)
+    void  elm_obj_systray_category_set(cEo *obj, Elm_Systray_Category cat)
+    Elm_Systray_Category  elm_obj_systray_category_get(const cEo *obj)
+    void  elm_obj_systray_icon_theme_path_set(cEo *obj, const char 
*icon_theme_path)
+    const char * elm_obj_systray_icon_theme_path_get(const cEo *obj)
+    void  elm_obj_systray_menu_set(cEo *obj, const cEo *menu)
+    const cEo * elm_obj_systray_menu_get(const cEo *obj)
+    void  elm_obj_systray_att_icon_name_set(cEo *obj, const char 
*att_icon_name)
+    const char * elm_obj_systray_att_icon_name_get(const cEo *obj)
+    void  elm_obj_systray_status_set(cEo *obj, Elm_Systray_Status st)
+    Elm_Systray_Status  elm_obj_systray_status_get(const cEo *obj)
+    void  elm_obj_systray_icon_name_set(cEo *obj, const char *icon_name)
+    const char * elm_obj_systray_icon_name_get(const cEo *obj)
+    void  elm_obj_systray_title_set(cEo *obj, const char *title)
+    const char * elm_obj_systray_title_get(const cEo *obj)
+    Eina_Bool  elm_obj_systray_register(const cEo *obj)
diff --git a/efl/eo/efl.eo.pyx b/efl/eo/efl.eo.pyx
index 391c4a7..aa5bbaf 100644
--- a/efl/eo/efl.eo.pyx
+++ b/efl/eo/efl.eo.pyx
@@ -36,15 +36,15 @@ from efl.eina cimport Eina_Bool, \
     Eina_Hash, eina_hash_string_superfast_new, eina_hash_add, eina_hash_del, \
     eina_hash_find, EINA_LOG_DOM_DBG, EINA_LOG_DOM_INFO, \
     Eina_Iterator, eina_iterator_next, eina_iterator_free
-from efl.c_eo cimport Eo as cEo, eo_init, eo_shutdown, eo_del, eo_do, \
-    eo_do_ret, eo_class_name_get, eo_class_get, eo_base_class_get,\
+from efl.c_eo cimport Eo as cEo, eo_init, eo_shutdown, eo_del, \
+    eo_class_name_get, eo_class_get, eo_base_class_get,\
     eo_key_data_set, eo_key_data_get, eo_key_data_del, \
     eo_event_callback_add, eo_event_callback_del, EO_EV_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_children_iterator_new
+    eo_children_iterator_new, Eo_Event2
 
 from efl.utils.logger cimport add_logger
 
@@ -71,18 +71,13 @@ init()
 atexit.register(shutdown)
 
 def event_global_freeze_count_get():
-    cdef int fcount = 0
-    fcount = <int>eo_do_ret(<const cEo *>eo_base_class_get(), fcount,
-                            eo_event_global_freeze_count_get())
-    return fcount
+    return eo_event_global_freeze_count_get(<const cEo *>eo_base_class_get())
 
 def event_global_freeze():
-    eo_do(<const cEo *>eo_base_class_get(),
-          eo_event_global_freeze())
+    eo_event_global_freeze(<const cEo *>eo_base_class_get())
 
 def event_global_thaw():
-    eo_do(<const cEo *>eo_base_class_get(),
-          eo_event_global_thaw())
+    eo_event_global_thaw(<const cEo *>eo_base_class_get())
 
 ######################################################################
 
@@ -125,7 +120,7 @@ cdef api object object_from_instance(cEo *obj):
     if obj == NULL:
         return None
 
-    data = eo_do_ret(obj, data, eo_key_data_get("python-eo"))
+    data = eo_key_data_get(obj, "python-eo")
     if data != NULL:
         EINA_LOG_DOM_DBG(PY_EFL_EO_LOG_DOMAIN,
             "Returning a Python object instance for Eo of type %s.", cls_name)
@@ -187,18 +182,15 @@ cdef void _register_decorated_callbacks(Eo obj):
 ######################################################################
 
 
-cdef Eina_Bool _eo_event_del_cb(void *data, cEo *obj,
-                                const Eo_Event_Description *desc,
-                                void *event_info) with gil:
+cdef Eina_Bool _eo_event_del_cb(void *data, const Eo_Event2 *event) with gil:
     cdef:
         Eo self = <Eo>data
-        const char *cls_name = eo_class_name_get(eo_class_get(obj))
+        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_do(self.obj,
-        eo_event_callback_del(EO_EV_DEL, _eo_event_del_cb, <const void *>self))
-    eo_do(self.obj, eo_key_data_del("python-eo"))
+    eo_event_callback_del(self.obj, EO_EV_DEL, _eo_event_del_cb, <const void 
*>self)
+    eo_key_data_del(self.obj, "python-eo")
     self.obj = NULL
     Py_DECREF(self)
 
@@ -244,7 +236,7 @@ cdef class Eo(object):
     def __repr__(self):
         cdef cEo *parent = NULL
         if self.obj != NULL:
-            parent = <cEo *>eo_do_ret(self.obj, parent, eo_parent_get())
+            parent = eo_parent_get(self.obj)
         return ("<%s object (Eo) at %#x (obj=%#x, parent=%#x, refcount=%d)>") 
% (
             type(self).__name__,
             <uintptr_t><void *>self,
@@ -260,9 +252,8 @@ cdef class Eo(object):
         assert obj != NULL, "Cannot set a NULL object"
 
         self.obj = obj
-        eo_do(self.obj, eo_key_data_set("python-eo", <void *>self))
-        eo_do(self.obj,
-            eo_event_callback_add(EO_EV_DEL, _eo_event_del_cb, <const void 
*>self))
+        eo_key_data_set(self.obj, "python-eo", <void *>self)
+        eo_event_callback_add(self.obj, EO_EV_DEL, _eo_event_del_cb, <const 
void *>self)
         Py_INCREF(self)
 
         return 1
@@ -274,10 +265,7 @@ cdef class Eo(object):
         return 1
 
     def __iter__(self):
-        cdef:
-            void *tmp = NULL
-        eo_do_ret(self.obj, tmp, eo_children_iterator_new())
-        return EoIterator.create(<Eina_Iterator *>tmp)
+        return EoIterator.create(eo_children_iterator_new(self.obj))
 
     def delete(self):
         """Delete the object and free internal resources.
@@ -305,28 +293,24 @@ cdef class Eo(object):
 
         """
         def __set__(self, Eo parent):
-            eo_do(self.obj, eo_parent_set(parent.obj))
+            eo_parent_set(self.obj, parent.obj)
 
         def __get__(self):
-            cdef cEo *parent = NULL
-            parent = <cEo *>eo_do_ret(self.obj, parent, eo_parent_get())
-            return object_from_instance(parent)
+            return object_from_instance(eo_parent_get(self.obj))
 
     def parent_set(self, Eo parent):
-        eo_do(self.obj, eo_parent_set(parent.obj))
+        eo_parent_set(self.obj, parent.obj)
 
     def parent_get(self):
-        cdef cEo *parent = NULL
-        parent = <cEo *>eo_do_ret(self.obj, parent, eo_parent_get())
-        return object_from_instance(parent)
+        return object_from_instance(eo_parent_get(self.obj))
 
     def event_freeze(self):
         """Pause event propagation for this object."""
-        eo_do(self.obj, eo_event_freeze())
+        eo_event_freeze(self.obj)
 
     def event_thaw(self):
         """Restart event propagation for this object."""
-        eo_do(self.obj, eo_event_thaw())
+        eo_event_thaw(self.obj)
 
     def event_freeze_count_get(self):
         """Get the event freeze count for this object.
@@ -335,6 +319,4 @@ cdef class Eo(object):
         :rtype: int
 
         """
-        cdef int fcount = 0
-        fcount = <int>eo_do_ret(self.obj, fcount, eo_event_freeze_count_get())
-        return fcount
+        return eo_event_freeze_count_get(self.obj)
diff --git a/efl/evas/efl.evas_object_smart.pxi 
b/efl/evas/efl.evas_object_smart.pxi
index e74948c..931e581 100644
--- a/efl/evas/efl.evas_object_smart.pxi
+++ b/efl/evas/efl.evas_object_smart.pxi
@@ -16,7 +16,7 @@
 # along with this Python-EFL.  If not, see <http://www.gnu.org/licenses/>.
 
 from efl.utils.conversions cimport eina_list_objects_to_python_list
-from efl.c_eo cimport eo_do, eo_do_ret, eo_key_data_del, eo_key_data_set, 
eo_key_data_get
+from efl.c_eo cimport eo_key_data_del, eo_key_data_set, eo_key_data_get
 from efl.eo cimport Eo, EoIterator
 
 from cpython cimport Py_INCREF, Py_DECREF, PyObject_Call, \
@@ -106,7 +106,7 @@ cdef void _smart_object_delete(Evas_Object *o) with gil:
         return
     cls = <Smart>tmp
 
-    eo_do_ret(o, tmp, eo_key_data_get("python-eo"))
+    tmp = eo_key_data_get(o, "python-eo")
     if tmp == NULL:
         EINA_LOG_DOM_WARN(PY_EFL_EVAS_LOG_DOMAIN, "obj is NULL!", NULL)
         obj = None
@@ -131,7 +131,7 @@ cdef void _smart_object_move(Evas_Object *o, Evas_Coord x, 
Evas_Coord y) with gi
         return
     cls = <Smart>tmp
 
-    eo_do_ret(o, tmp, eo_key_data_get("python-eo"))
+    tmp = eo_key_data_get(o, "python-eo")
     if tmp == NULL:
         EINA_LOG_DOM_WARN(PY_EFL_EVAS_LOG_DOMAIN, "obj is NULL!", NULL)
         obj = None
@@ -156,7 +156,7 @@ cdef void _smart_object_resize(Evas_Object *o, Evas_Coord 
w, Evas_Coord h) with
         return
     cls = <Smart>tmp
 
-    eo_do_ret(o, tmp, eo_key_data_get("python-eo"))
+    tmp = eo_key_data_get(o, "python-eo")
     if tmp == NULL:
         EINA_LOG_DOM_WARN(PY_EFL_EVAS_LOG_DOMAIN, "obj is NULL!", NULL)
         obj = None
@@ -181,7 +181,7 @@ cdef void _smart_object_show(Evas_Object *o) with gil:
         return
     cls = <Smart>tmp
 
-    eo_do_ret(o, tmp, eo_key_data_get("python-eo"))
+    tmp = eo_key_data_get(o, "python-eo")
     if tmp == NULL:
         EINA_LOG_DOM_WARN(PY_EFL_EVAS_LOG_DOMAIN, "obj is NULL!", NULL)
         obj = None
@@ -206,7 +206,7 @@ cdef void _smart_object_hide(Evas_Object *o) with gil:
         return
     cls = <Smart>tmp
 
-    eo_do_ret(o, tmp, eo_key_data_get("python-eo"))
+    tmp = eo_key_data_get(o, "python-eo")
     if tmp == NULL:
         EINA_LOG_DOM_WARN(PY_EFL_EVAS_LOG_DOMAIN, "obj is NULL!", NULL)
         obj = None
@@ -231,7 +231,7 @@ cdef void _smart_object_color_set(Evas_Object *o, int r, 
int g, int b, int a) wi
         return
     cls = <Smart>tmp
 
-    eo_do_ret(o, tmp, eo_key_data_get("python-eo"))
+    tmp = eo_key_data_get(o, "python-eo")
     if tmp == NULL:
         EINA_LOG_DOM_WARN(PY_EFL_EVAS_LOG_DOMAIN, "obj is NULL!", NULL)
         obj = None
@@ -257,7 +257,7 @@ cdef void _smart_object_clip_set(Evas_Object *o, 
Evas_Object *clip) with gil:
         return
     cls = <Smart>tmp
 
-    eo_do_ret(o, tmp, eo_key_data_get("python-eo"))
+    tmp = eo_key_data_get(o, "python-eo")
     if tmp == NULL:
         EINA_LOG_DOM_WARN(PY_EFL_EVAS_LOG_DOMAIN, "obj is NULL!", NULL)
         obj = None
@@ -284,7 +284,7 @@ cdef void _smart_object_clip_unset(Evas_Object *o) with gil:
         return
     cls = <Smart>tmp
 
-    eo_do_ret(o, tmp, eo_key_data_get("python-eo"))
+    tmp = eo_key_data_get(o, "python-eo")
     if tmp == NULL:
         EINA_LOG_DOM_WARN(PY_EFL_EVAS_LOG_DOMAIN, "obj is NULL!", NULL)
         obj = None
@@ -309,7 +309,7 @@ cdef void _smart_object_calculate(Evas_Object *o) with gil:
         return
     cls = <Smart>tmp
 
-    eo_do_ret(o, tmp, eo_key_data_get("python-eo"))
+    tmp = eo_key_data_get(o, "python-eo")
     if tmp == NULL:
         EINA_LOG_DOM_WARN(PY_EFL_EVAS_LOG_DOMAIN, "obj is NULL!", NULL)
         obj = None
@@ -335,7 +335,7 @@ cdef void _smart_object_member_add(Evas_Object *o, 
Evas_Object *clip) with gil:
         return
     cls = <Smart>tmp
 
-    eo_do_ret(o, tmp, eo_key_data_get("python-eo"))
+    tmp = eo_key_data_get(o, "python-eo")
     if tmp == NULL:
         EINA_LOG_DOM_WARN(PY_EFL_EVAS_LOG_DOMAIN, "obj is NULL!", NULL)
         obj = None
@@ -363,7 +363,7 @@ cdef void _smart_object_member_del(Evas_Object *o, 
Evas_Object *clip) with gil:
         return
     cls = <Smart>tmp
 
-    eo_do_ret(o, tmp, eo_key_data_get("python-eo"))
+    tmp = eo_key_data_get(o, "python-eo")
     if tmp == NULL:
         EINA_LOG_DOM_WARN(PY_EFL_EVAS_LOG_DOMAIN, "obj is NULL!", NULL)
         obj = None
@@ -406,7 +406,7 @@ cdef void _smart_callback(void *data, Evas_Object *o, void 
*event_info) with gil
         list tmp_args
         list lst
 
-    eo_do_ret(o, tmp, eo_key_data_get("python-eo"))
+    tmp = eo_key_data_get(o, "python-eo")
     if tmp == NULL:
         EINA_LOG_DOM_ERR(PY_EFL_EVAS_LOG_DOMAIN, "obj is NULL!", NULL)
         return
@@ -704,7 +704,7 @@ cdef class SmartObject(Object):
         assert obj != NULL, "Cannot set a NULL object"
 
         self.obj = obj
-        eo_do(self.obj, eo_key_data_set("python-eo", <void *>self))
+        eo_key_data_set(self.obj, "python-eo", <void *>self)
         evas_object_event_callback_add(obj, EVAS_CALLBACK_FREE,
                                        obj_free_cb, <void *>self)
         Py_INCREF(self)
diff --git a/include/efl.c_eo.pxd b/include/efl.c_eo.pxd
index 11cb094..66207ab 100644
--- a/include/efl.c_eo.pxd
+++ b/include/efl.c_eo.pxd
@@ -62,25 +62,35 @@ cdef extern from "Eo.h":
     # Structures
     #
     ctypedef struct Eo
+    ctypedef Eo Eo_Base
 
     ctypedef struct Eo_Class
 
-    ctypedef struct Eo_Event_Description:
-        const char *name
-        const char *doc
-        Eina_Bool unfreezable
+    ctypedef struct _Eo_Event_Description:
+        const char *name # name of the event.
+        Eina_Bool unfreezable # Eina_True if the event cannot be frozen.
+        Eina_Bool legacy_is # Internal use: if is a legacy event.
+    ctypedef _Eo_Event_Description Eo_Event_Description
+
+    ctypedef struct _Eo_Event:
+        Eo_Base *obj # The object the event was called on. */
+        const Eo_Event_Description *desc # The event description. */
+        void *event_info # Extra event information passed by the event caller. 
*/
+    ctypedef _Eo_Event Eo_Event
+    ctypedef _Eo_Event Eo_Event2
 
 
     ####################################################################
     # Eo Events
     #
+
     cdef const Eo_Event_Description *EO_EV_DEL
 
 
     ####################################################################
     # Other typedefs
     #
-    ctypedef Eina_Bool (*Eo_Event_Cb)(void *data, Eo *obj, const 
Eo_Event_Description *desc, void *event_info)
+    ctypedef Eina_Bool (*Eo_Event_Cb)(void *data, const Eo_Event2 *event)
 
     ctypedef void (*eo_key_data_free_func)(void *)
 
@@ -99,32 +109,30 @@ cdef extern from "Eo.h":
 
     void eo_wref_add(Eo **wref)
 
-    void eo_do(Eo *obj, ...)
-    void *eo_do_ret(Eo *obj, ...)
     const Eo_Class *eo_base_class_get()
 
-    void  eo_key_data_set(const char *key, const void *data)
-    void *eo_key_data_get(const char *key)
-    void  eo_key_data_del(const char *key)
+    void  eo_key_data_set(Eo *obj, const char *key, const void *data)
+    void *eo_key_data_get(Eo *obj, const char *key)
+    void  eo_key_data_del(Eo *obj, const char *key)
 
     const Eo_Class *eo_class_get(const Eo *obj)
     const char *eo_class_name_get(const Eo_Class *klass)
 
-    void eo_parent_set(Eo *parent)
-    Eo  *eo_parent_get()
+    void eo_parent_set(Eo *obj, Eo *parent)
+    Eo  *eo_parent_get(const Eo *obj)
 
-    void eo_event_callback_forwarder_add(const Eo_Event_Description *desc, Eo 
*new_obj)
-    void eo_event_callback_forwarder_del(const Eo_Event_Description *desc, Eo 
*new_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)
 
-    void eo_event_freeze()
-    void eo_event_thaw()
-    int eo_event_freeze_count_get()
+    void eo_event_freeze(Eo *obj)
+    void eo_event_thaw(Eo *obj)
+    int eo_event_freeze_count_get(const Eo *obj)
 
-    void eo_event_global_freeze()
-    void eo_event_global_thaw()
-    int eo_event_global_freeze_count_get()
+    void eo_event_global_freeze(Eo *obj)
+    void eo_event_global_thaw(Eo *obj)
+    int eo_event_global_freeze_count_get(const Eo *obj)
 
-    void eo_event_callback_add(const Eo_Event_Description *desc, Eo_Event_Cb 
cb, const void *data)
-    void eo_event_callback_del(const Eo_Event_Description *desc, Eo_Event_Cb 
cb, const void *data)
+    void eo_event_callback_add(Eo *obj, const Eo_Event_Description *desc, 
Eo_Event_Cb cb, const void *data)
+    void eo_event_callback_del(Eo *obj, const Eo_Event_Description *desc, 
Eo_Event_Cb cb, const void *data)
 
-    Eina_Iterator * eo_children_iterator_new()
+    Eina_Iterator * eo_children_iterator_new(Eo *obj)

-- 


Reply via email to