davemds pushed a commit to branch master.

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

commit bbb747eb5ec6c7cd125e18f7467443a620d76919
Author: Dave Andreoli <[email protected]>
Date:   Sun Jan 4 22:30:19 2015 +0100

    New style enums for eo
---
 efl/eo/efl.eo.pyx        | 14 +++----------
 include/efl.c_eo.pxd     | 40 ++++++++++++++++++++++++++++++++++++
 include/efl.eo.enums.pxd | 53 ------------------------------------------------
 3 files changed, 43 insertions(+), 64 deletions(-)

diff --git a/efl/eo/efl.eo.pyx b/efl/eo/efl.eo.pyx
index 238ff32..d3b2466 100644
--- a/efl/eo/efl.eo.pyx
+++ b/efl/eo/efl.eo.pyx
@@ -27,9 +27,8 @@ from efl.c_eo cimport Eo as cEo, eo_init, eo_shutdown, 
eo_del, eo_do, \
     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
-
-cimport efl.eo.enums as enums
+    eo_event_global_freeze, eo_event_global_thaw, \
+    eo_event_global_freeze_count_get, EO_CALLBACK_STOP
 
 from efl.utils.logger cimport add_logger
 
@@ -169,13 +168,6 @@ cdef void _register_decorated_callbacks(Eo obj):
 ######################################################################
 
 
-EO_CALLBACK_STOP = enums.EO_CALLBACK_STOP
-EO_CALLBACK_CONTINUE = enums.EO_CALLBACK_CONTINUE
-
-
-######################################################################
-
-
 cdef Eina_Bool _eo_event_del_cb(void *data, cEo *obj,
                                 const Eo_Event_Description *desc,
                                 void *event_info) with gil:
@@ -191,7 +183,7 @@ cdef Eina_Bool _eo_event_del_cb(void *data, cEo *obj,
     self.obj = NULL
     Py_DECREF(self)
 
-    return enums.EO_CALLBACK_STOP
+    return EO_CALLBACK_STOP
 
 
 cdef class Eo(object):
diff --git a/include/efl.c_eo.pxd b/include/efl.c_eo.pxd
index c1cb2f8..e2a0393 100644
--- a/include/efl.c_eo.pxd
+++ b/include/efl.c_eo.pxd
@@ -18,6 +18,46 @@
 from efl.eina cimport Eina_Bool
 
 cdef extern from "Eo.h":
+
+    ####################################################################
+    # Enums (not exported to python, only for internal use)
+    #
+    cdef enum:
+        EO_BASE_SUB_ID_CONSTRUCTOR
+        EO_BASE_SUB_ID_DESTRUCTOR
+        EO_BASE_SUB_ID_PARENT_SET
+        EO_BASE_SUB_ID_PARENT_GET
+        EO_BASE_SUB_ID_CHILDREN_ITERATOR_NEW
+        EO_BASE_SUB_ID_DATA_SET
+        EO_BASE_SUB_ID_DATA_GET
+        EO_BASE_SUB_ID_DATA_DEL
+        EO_BASE_SUB_ID_WREF_ADD
+        EO_BASE_SUB_ID_WREF_DEL
+        EO_BASE_SUB_ID_EVENT_CALLBACK_PRIORITY_ADD
+        EO_BASE_SUB_ID_EVENT_CALLBACK_DEL
+        EO_BASE_SUB_ID_EVENT_CALLBACK_ARRAY_PRIORITY_ADD
+        EO_BASE_SUB_ID_EVENT_CALLBACK_ARRAY_DEL
+        EO_BASE_SUB_ID_EVENT_CALLBACK_CALL
+        EO_BASE_SUB_ID_EVENT_CALLBACK_FORWARDER_ADD
+        EO_BASE_SUB_ID_EVENT_CALLBACK_FORWARDER_DEL
+        EO_BASE_SUB_ID_EVENT_FREEZE
+        EO_BASE_SUB_ID_EVENT_THAW
+        EO_BASE_SUB_ID_EVENT_FREEZE_GET
+        EO_BASE_SUB_ID_EVENT_GLOBAL_FREEZE
+        EO_BASE_SUB_ID_EVENT_GLOBAL_THAW
+        EO_BASE_SUB_ID_EVENT_GLOBAL_FREEZE_GET
+        EO_BASE_SUB_ID_DBG_INFO_GET
+        EO_BASE_SUB_ID_LAST
+
+    cdef enum:
+        EO_CALLBACK_PRIORITY_BEFORE
+        EO_CALLBACK_PRIORITY_DEFAULT
+        EO_CALLBACK_PRIORITY_AFTER
+
+    cdef enum:
+        EO_CALLBACK_STOP
+        EO_CALLBACK_CONTINUE
+
     ####################################################################
     # Structures
     #
diff --git a/include/efl.eo.enums.pxd b/include/efl.eo.enums.pxd
deleted file mode 100644
index d1aaae5..0000000
--- a/include/efl.eo.enums.pxd
+++ /dev/null
@@ -1,53 +0,0 @@
-# Copyright (C) 2007-2015 various contributors (see AUTHORS)
-#
-# This file is part of Python-EFL.
-#
-# Python-EFL is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 3 of the License, or (at your option) any later version.
-#
-# Python-EFL is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public License
-# along with this Python-EFL.  If not, see <http://www.gnu.org/licenses/>.
-
-cdef extern from "Eo.h":
-    enum:
-        EO_BASE_SUB_ID_CONSTRUCTOR
-        EO_BASE_SUB_ID_DESTRUCTOR
-        EO_BASE_SUB_ID_PARENT_SET
-        EO_BASE_SUB_ID_PARENT_GET
-        EO_BASE_SUB_ID_CHILDREN_ITERATOR_NEW
-        EO_BASE_SUB_ID_DATA_SET
-        EO_BASE_SUB_ID_DATA_GET
-        EO_BASE_SUB_ID_DATA_DEL
-        EO_BASE_SUB_ID_WREF_ADD
-        EO_BASE_SUB_ID_WREF_DEL
-        EO_BASE_SUB_ID_EVENT_CALLBACK_PRIORITY_ADD
-        EO_BASE_SUB_ID_EVENT_CALLBACK_DEL
-        EO_BASE_SUB_ID_EVENT_CALLBACK_ARRAY_PRIORITY_ADD
-        EO_BASE_SUB_ID_EVENT_CALLBACK_ARRAY_DEL
-        EO_BASE_SUB_ID_EVENT_CALLBACK_CALL
-        EO_BASE_SUB_ID_EVENT_CALLBACK_FORWARDER_ADD
-        EO_BASE_SUB_ID_EVENT_CALLBACK_FORWARDER_DEL
-        EO_BASE_SUB_ID_EVENT_FREEZE
-        EO_BASE_SUB_ID_EVENT_THAW
-        EO_BASE_SUB_ID_EVENT_FREEZE_GET
-        EO_BASE_SUB_ID_EVENT_GLOBAL_FREEZE
-        EO_BASE_SUB_ID_EVENT_GLOBAL_THAW
-        EO_BASE_SUB_ID_EVENT_GLOBAL_FREEZE_GET
-        EO_BASE_SUB_ID_DBG_INFO_GET
-        EO_BASE_SUB_ID_LAST
-
-    enum:
-        EO_CALLBACK_PRIORITY_BEFORE
-        EO_CALLBACK_PRIORITY_DEFAULT
-        EO_CALLBACK_PRIORITY_AFTER
-
-    enum:
-        EO_CALLBACK_STOP
-        EO_CALLBACK_CONTINUE

-- 


Reply via email to