New style enums for eo
This commit is contained in:
parent
728ff202e4
commit
bbb747eb5e
|
@ -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):
|
||||
|
|
|
@ -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
|
||||
#
|
||||
|
|
|
@ -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
|
Loading…
Reference in New Issue