New style enums for ecore
This commit is contained in:
parent
f9e8906724
commit
419405e456
|
@ -158,6 +158,10 @@ Position mappings for the animation
|
||||||
|
|
||||||
Start at 0.0 then "wobble" like a spring rest position 1.0, and wobble v2 times, with decay factor of v1
|
Start at 0.0 then "wobble" like a spring rest position 1.0, and wobble v2 times, with decay factor of v1
|
||||||
|
|
||||||
|
.. data:: ECORE_POS_MAP_CUBIC_BEZIER
|
||||||
|
|
||||||
|
TODO: Follow the cubic-bezier curve calculated with the control points (x1, y1), (x2, y2)
|
||||||
|
|
||||||
|
|
||||||
.. _Ecore_Animator_Source:
|
.. _Ecore_Animator_Source:
|
||||||
|
|
||||||
|
@ -218,50 +222,7 @@ import traceback
|
||||||
from efl.eo cimport Eo, PY_REFCOUNT
|
from efl.eo cimport Eo, PY_REFCOUNT
|
||||||
from efl.utils.conversions cimport _ctouni
|
from efl.utils.conversions cimport _ctouni
|
||||||
from cpython cimport Py_INCREF, Py_DECREF
|
from cpython cimport Py_INCREF, Py_DECREF
|
||||||
cimport efl.ecore.enums as enums
|
|
||||||
|
|
||||||
ECORE_CALLBACK_CANCEL = enums.ECORE_CALLBACK_CANCEL
|
|
||||||
ECORE_CALLBACK_RENEW = enums.ECORE_CALLBACK_RENEW
|
|
||||||
|
|
||||||
ECORE_CALLBACK_PASS_ON = enums.ECORE_CALLBACK_PASS_ON
|
|
||||||
ECORE_CALLBACK_DONE = enums.ECORE_CALLBACK_DONE
|
|
||||||
|
|
||||||
# Ecore_Fd_Handler_Flags:
|
|
||||||
ECORE_FD_READ = enums.ECORE_FD_READ
|
|
||||||
ECORE_FD_WRITE = enums.ECORE_FD_WRITE
|
|
||||||
ECORE_FD_ERROR = enums.ECORE_FD_ERROR
|
|
||||||
ECORE_FD_ALL = 7
|
|
||||||
|
|
||||||
# Ecore_Exe_Flags:
|
|
||||||
ECORE_EXE_PIPE_READ = enums.ECORE_EXE_PIPE_READ
|
|
||||||
ECORE_EXE_PIPE_WRITE = enums.ECORE_EXE_PIPE_WRITE
|
|
||||||
ECORE_EXE_PIPE_ERROR = enums.ECORE_EXE_PIPE_ERROR
|
|
||||||
ECORE_EXE_PIPE_READ_LINE_BUFFERED = enums.ECORE_EXE_PIPE_READ_LINE_BUFFERED
|
|
||||||
ECORE_EXE_PIPE_ERROR_LINE_BUFFERED = enums.ECORE_EXE_PIPE_ERROR_LINE_BUFFERED
|
|
||||||
ECORE_EXE_PIPE_AUTO = enums.ECORE_EXE_PIPE_AUTO
|
|
||||||
ECORE_EXE_RESPAWN = enums.ECORE_EXE_RESPAWN
|
|
||||||
ECORE_EXE_USE_SH = enums.ECORE_EXE_USE_SH
|
|
||||||
ECORE_EXE_NOT_LEADER = enums.ECORE_EXE_NOT_LEADER
|
|
||||||
ECORE_EXE_TERM_WITH_PARENT = enums.ECORE_EXE_TERM_WITH_PARENT
|
|
||||||
|
|
||||||
ECORE_EXE_PRIORITY_INHERIT = 9999
|
|
||||||
|
|
||||||
# Ecore_File_Progress_Return:
|
|
||||||
ECORE_FILE_PROGRESS_CONTINUE = 0
|
|
||||||
ECORE_FILE_PROGRESS_ABORT = 1
|
|
||||||
|
|
||||||
# Ecore_File_Event
|
|
||||||
ECORE_FILE_EVENT_NONE = enums.ECORE_FILE_EVENT_NONE
|
|
||||||
ECORE_FILE_EVENT_CREATED_FILE = enums.ECORE_FILE_EVENT_CREATED_FILE
|
|
||||||
ECORE_FILE_EVENT_CREATED_DIRECTORY = enums.ECORE_FILE_EVENT_CREATED_DIRECTORY
|
|
||||||
ECORE_FILE_EVENT_DELETED_FILE = enums.ECORE_FILE_EVENT_DELETED_FILE
|
|
||||||
ECORE_FILE_EVENT_DELETED_DIRECTORY = enums.ECORE_FILE_EVENT_DELETED_DIRECTORY
|
|
||||||
ECORE_FILE_EVENT_DELETED_SELF = enums.ECORE_FILE_EVENT_DELETED_SELF
|
|
||||||
ECORE_FILE_EVENT_MODIFIED = enums.ECORE_FILE_EVENT_MODIFIED
|
|
||||||
ECORE_FILE_EVENT_CLOSED = enums.ECORE_FILE_EVENT_CLOSED
|
|
||||||
|
|
||||||
# Ecore_Poller_Type:
|
|
||||||
ECORE_POLLER_CORE = enums.ECORE_POLLER_CORE
|
|
||||||
|
|
||||||
|
|
||||||
cdef Eina_Bool _ecore_task_cb(void *data) with gil:
|
cdef Eina_Bool _ecore_task_cb(void *data) with gil:
|
||||||
|
@ -293,16 +254,16 @@ def init():
|
||||||
|
|
||||||
global _event_type_mapping
|
global _event_type_mapping
|
||||||
_event_type_mapping = {
|
_event_type_mapping = {
|
||||||
enums.ECORE_EVENT_SIGNAL_USER: EventSignalUser,
|
ECORE_EVENT_SIGNAL_USER: EventSignalUser,
|
||||||
enums.ECORE_EVENT_SIGNAL_HUP: EventSignalHup,
|
ECORE_EVENT_SIGNAL_HUP: EventSignalHup,
|
||||||
enums.ECORE_EVENT_SIGNAL_EXIT: EventSignalExit,
|
ECORE_EVENT_SIGNAL_EXIT: EventSignalExit,
|
||||||
enums.ECORE_EVENT_SIGNAL_POWER: EventSignalPower,
|
ECORE_EVENT_SIGNAL_POWER: EventSignalPower,
|
||||||
enums.ECORE_EVENT_SIGNAL_REALTIME: EventSignalRealtime,
|
ECORE_EVENT_SIGNAL_REALTIME: EventSignalRealtime,
|
||||||
enums.ECORE_EXE_EVENT_ADD: EventExeAdd,
|
ECORE_EXE_EVENT_ADD: EventExeAdd,
|
||||||
enums.ECORE_EXE_EVENT_DEL: EventExeDel,
|
ECORE_EXE_EVENT_DEL: EventExeDel,
|
||||||
enums.ECORE_EXE_EVENT_DATA: EventExeData,
|
ECORE_EXE_EVENT_DATA: EventExeData,
|
||||||
enums.ECORE_EXE_EVENT_ERROR: EventExeData,
|
ECORE_EXE_EVENT_ERROR: EventExeData,
|
||||||
}
|
}
|
||||||
|
|
||||||
ecore_file_init()
|
ecore_file_init()
|
||||||
return r
|
return r
|
||||||
|
|
|
@ -166,7 +166,7 @@ cdef class EventSignalUser2(EventSignalUser):
|
||||||
|
|
||||||
cdef class EventHandlerSignalUser(EventHandler):
|
cdef class EventHandlerSignalUser(EventHandler):
|
||||||
def __init__(self, func, *args, **kargs):
|
def __init__(self, func, *args, **kargs):
|
||||||
EventHandler.__init__(self, enums.ECORE_EVENT_SIGNAL_USER,
|
EventHandler.__init__(self, ECORE_EVENT_SIGNAL_USER,
|
||||||
func, *args, **kargs)
|
func, *args, **kargs)
|
||||||
|
|
||||||
cdef Eina_Bool _exec(self, void *event) except 2:
|
cdef Eina_Bool _exec(self, void *event) except 2:
|
||||||
|
@ -198,7 +198,7 @@ cdef class EventSignalHup(Event):
|
||||||
|
|
||||||
|
|
||||||
def on_signal_hup(func, *args, **kargs):
|
def on_signal_hup(func, *args, **kargs):
|
||||||
return EventHandler(enums.ECORE_EVENT_SIGNAL_HUP, func, *args, **kargs)
|
return EventHandler(ECORE_EVENT_SIGNAL_HUP, func, *args, **kargs)
|
||||||
|
|
||||||
|
|
||||||
cdef class EventSignalExit(Event):
|
cdef class EventSignalExit(Event):
|
||||||
|
@ -245,7 +245,7 @@ cdef class EventSignalTerminate(EventSignalExit):
|
||||||
|
|
||||||
cdef class EventHandlerSignalExit(EventHandler):
|
cdef class EventHandlerSignalExit(EventHandler):
|
||||||
def __init__(self, func, *args, **kargs):
|
def __init__(self, func, *args, **kargs):
|
||||||
EventHandler.__init__(self, enums.ECORE_EVENT_SIGNAL_EXIT,
|
EventHandler.__init__(self, ECORE_EVENT_SIGNAL_EXIT,
|
||||||
func, *args, **kargs)
|
func, *args, **kargs)
|
||||||
|
|
||||||
cdef Eina_Bool _exec(self, void *event) except 2:
|
cdef Eina_Bool _exec(self, void *event) except 2:
|
||||||
|
@ -279,7 +279,7 @@ cdef class EventSignalPower(Event):
|
||||||
|
|
||||||
|
|
||||||
def on_signal_power(func, *args, **kargs):
|
def on_signal_power(func, *args, **kargs):
|
||||||
return EventHandler(enums.ECORE_EVENT_SIGNAL_POWER, func, *args, **kargs)
|
return EventHandler(ECORE_EVENT_SIGNAL_POWER, func, *args, **kargs)
|
||||||
|
|
||||||
|
|
||||||
cdef class EventSignalRealtime(Event):
|
cdef class EventSignalRealtime(Event):
|
||||||
|
@ -297,7 +297,7 @@ cdef class EventSignalRealtime(Event):
|
||||||
|
|
||||||
|
|
||||||
def on_signal_realtime(func, *args, **kargs):
|
def on_signal_realtime(func, *args, **kargs):
|
||||||
return EventHandler(enums.ECORE_EVENT_SIGNAL_REALTIME, func, *args, **kargs)
|
return EventHandler(ECORE_EVENT_SIGNAL_REALTIME, func, *args, **kargs)
|
||||||
|
|
||||||
|
|
||||||
cdef class CustomEvent(Event):
|
cdef class CustomEvent(Event):
|
||||||
|
|
|
@ -25,23 +25,23 @@ cdef extern from "Python.h":
|
||||||
|
|
||||||
cdef exe_flags2str(int value):
|
cdef exe_flags2str(int value):
|
||||||
flags = []
|
flags = []
|
||||||
if value & enums.ECORE_EXE_PIPE_READ:
|
if value & ECORE_EXE_PIPE_READ:
|
||||||
flags.append("PIPE_READ")
|
flags.append("PIPE_READ")
|
||||||
if value & enums.ECORE_EXE_PIPE_WRITE:
|
if value & ECORE_EXE_PIPE_WRITE:
|
||||||
flags.append("PIPE_WRITE")
|
flags.append("PIPE_WRITE")
|
||||||
if value & enums.ECORE_EXE_PIPE_ERROR:
|
if value & ECORE_EXE_PIPE_ERROR:
|
||||||
flags.append("PIPE_ERROR")
|
flags.append("PIPE_ERROR")
|
||||||
if value & enums.ECORE_EXE_PIPE_READ_LINE_BUFFERED:
|
if value & ECORE_EXE_PIPE_READ_LINE_BUFFERED:
|
||||||
flags.append("PIPE_READ_LINE_BUFFERED")
|
flags.append("PIPE_READ_LINE_BUFFERED")
|
||||||
if value & enums.ECORE_EXE_PIPE_ERROR_LINE_BUFFERED:
|
if value & ECORE_EXE_PIPE_ERROR_LINE_BUFFERED:
|
||||||
flags.append("PIPE_ERROR_LINE_BUFFERED")
|
flags.append("PIPE_ERROR_LINE_BUFFERED")
|
||||||
if value & enums.ECORE_EXE_PIPE_AUTO:
|
if value & ECORE_EXE_PIPE_AUTO:
|
||||||
flags.append("PIPE_AUTO")
|
flags.append("PIPE_AUTO")
|
||||||
if value & enums.ECORE_EXE_RESPAWN:
|
if value & ECORE_EXE_RESPAWN:
|
||||||
flags.append("RESPAWN")
|
flags.append("RESPAWN")
|
||||||
if value & enums.ECORE_EXE_USE_SH:
|
if value & ECORE_EXE_USE_SH:
|
||||||
flags.append("USE_SH")
|
flags.append("USE_SH")
|
||||||
if value & enums.ECORE_EXE_NOT_LEADER:
|
if value & ECORE_EXE_NOT_LEADER:
|
||||||
flags.append("NOT_LEADER")
|
flags.append("NOT_LEADER")
|
||||||
return ", ".join(flags)
|
return ", ".join(flags)
|
||||||
|
|
||||||
|
@ -58,17 +58,17 @@ cdef Eina_Bool _exe_event_filter_cb(void *data, int type, void *event) with gil:
|
||||||
|
|
||||||
try:
|
try:
|
||||||
assert self.event_type == type, "event is not what we asked? impossible"
|
assert self.event_type == type, "event is not what we asked? impossible"
|
||||||
if type == enums.ECORE_EXE_EVENT_ADD:
|
if type == ECORE_EXE_EVENT_ADD:
|
||||||
e_add = <Ecore_Exe_Event_Add *>event
|
e_add = <Ecore_Exe_Event_Add *>event
|
||||||
if e_add.exe != self.exe:
|
if e_add.exe != self.exe:
|
||||||
return 1
|
return 1
|
||||||
e = EventExeAdd()
|
e = EventExeAdd()
|
||||||
elif type == enums.ECORE_EXE_EVENT_DEL:
|
elif type == ECORE_EXE_EVENT_DEL:
|
||||||
e_del = <Ecore_Exe_Event_Del *>event
|
e_del = <Ecore_Exe_Event_Del *>event
|
||||||
if e_del.exe != self.exe:
|
if e_del.exe != self.exe:
|
||||||
return 1
|
return 1
|
||||||
e = EventExeDel()
|
e = EventExeDel()
|
||||||
elif type == enums.ECORE_EXE_EVENT_DATA or type == enums.ECORE_EXE_EVENT_ERROR:
|
elif type == ECORE_EXE_EVENT_DATA or type == ECORE_EXE_EVENT_ERROR:
|
||||||
e_data = <Ecore_Exe_Event_Data *>event
|
e_data = <Ecore_Exe_Event_Data *>event
|
||||||
if e_data.exe != self.exe:
|
if e_data.exe != self.exe:
|
||||||
return 1
|
return 1
|
||||||
|
@ -632,10 +632,10 @@ cdef class Exe(object):
|
||||||
:see: on_exe_add_event_add()
|
:see: on_exe_add_event_add()
|
||||||
|
|
||||||
"""
|
"""
|
||||||
filter = self.__callbacks.get(enums.ECORE_EXE_EVENT_ADD)
|
filter = self.__callbacks.get(ECORE_EXE_EVENT_ADD)
|
||||||
if filter is None:
|
if filter is None:
|
||||||
filter = ExeEventFilter(self, enums.ECORE_EXE_EVENT_ADD)
|
filter = ExeEventFilter(self, ECORE_EXE_EVENT_ADD)
|
||||||
self.__callbacks[enums.ECORE_EXE_EVENT_ADD] = filter
|
self.__callbacks[ECORE_EXE_EVENT_ADD] = filter
|
||||||
filter.callback_add(func, args, kargs)
|
filter.callback_add(func, args, kargs)
|
||||||
|
|
||||||
def on_add_event_del(self, func, *args, **kargs):
|
def on_add_event_del(self, func, *args, **kargs):
|
||||||
|
@ -646,7 +646,7 @@ cdef class Exe(object):
|
||||||
:raise ValueError: if parameters don't match an already
|
:raise ValueError: if parameters don't match an already
|
||||||
registered callback.
|
registered callback.
|
||||||
"""
|
"""
|
||||||
filter = self.__callbacks.get(enums.ECORE_EXE_EVENT_ADD)
|
filter = self.__callbacks.get(ECORE_EXE_EVENT_ADD)
|
||||||
if filter is None:
|
if filter is None:
|
||||||
raise ValueError("callback not registered %s, args=%s, kargs=%s" %
|
raise ValueError("callback not registered %s, args=%s, kargs=%s" %
|
||||||
(func, args, kargs))
|
(func, args, kargs))
|
||||||
|
@ -668,10 +668,10 @@ cdef class Exe(object):
|
||||||
:see: on_del_event_del()
|
:see: on_del_event_del()
|
||||||
:see: on_exe_del_event_add()
|
:see: on_exe_del_event_add()
|
||||||
"""
|
"""
|
||||||
filter = self.__callbacks.get(enums.ECORE_EXE_EVENT_DEL)
|
filter = self.__callbacks.get(ECORE_EXE_EVENT_DEL)
|
||||||
if filter is None:
|
if filter is None:
|
||||||
filter = ExeEventFilter(self, enums.ECORE_EXE_EVENT_DEL)
|
filter = ExeEventFilter(self, ECORE_EXE_EVENT_DEL)
|
||||||
self.__callbacks[enums.ECORE_EXE_EVENT_DEL] = filter
|
self.__callbacks[ECORE_EXE_EVENT_DEL] = filter
|
||||||
filter.callback_add(func, args, kargs)
|
filter.callback_add(func, args, kargs)
|
||||||
|
|
||||||
def on_del_event_del(self, func, *args, **kargs):
|
def on_del_event_del(self, func, *args, **kargs):
|
||||||
|
@ -682,7 +682,7 @@ cdef class Exe(object):
|
||||||
:raise ValueError: if parameters don't match an already
|
:raise ValueError: if parameters don't match an already
|
||||||
registered callback.
|
registered callback.
|
||||||
"""
|
"""
|
||||||
filter = self.__callbacks.get(enums.ECORE_EXE_EVENT_DEL)
|
filter = self.__callbacks.get(ECORE_EXE_EVENT_DEL)
|
||||||
if filter is None:
|
if filter is None:
|
||||||
raise ValueError("callback not registered %s, args=%s, kargs=%s" %
|
raise ValueError("callback not registered %s, args=%s, kargs=%s" %
|
||||||
(func, args, kargs))
|
(func, args, kargs))
|
||||||
|
@ -704,10 +704,10 @@ cdef class Exe(object):
|
||||||
:see: on_data_event_del()
|
:see: on_data_event_del()
|
||||||
:see: on_exe_data_event_add()
|
:see: on_exe_data_event_add()
|
||||||
"""
|
"""
|
||||||
filter = self.__callbacks.get(enums.ECORE_EXE_EVENT_DATA)
|
filter = self.__callbacks.get(ECORE_EXE_EVENT_DATA)
|
||||||
if filter is None:
|
if filter is None:
|
||||||
filter = ExeEventFilter(self, enums.ECORE_EXE_EVENT_DATA)
|
filter = ExeEventFilter(self, ECORE_EXE_EVENT_DATA)
|
||||||
self.__callbacks[enums.ECORE_EXE_EVENT_DATA] = filter
|
self.__callbacks[ECORE_EXE_EVENT_DATA] = filter
|
||||||
filter.callback_add(func, args, kargs)
|
filter.callback_add(func, args, kargs)
|
||||||
|
|
||||||
def on_data_event_del(self, func, *args, **kargs):
|
def on_data_event_del(self, func, *args, **kargs):
|
||||||
|
@ -718,7 +718,7 @@ cdef class Exe(object):
|
||||||
:raise ValueError: if parameters don't match an already
|
:raise ValueError: if parameters don't match an already
|
||||||
registered callback.
|
registered callback.
|
||||||
"""
|
"""
|
||||||
filter = self.__callbacks.get(enums.ECORE_EXE_EVENT_DATA)
|
filter = self.__callbacks.get(ECORE_EXE_EVENT_DATA)
|
||||||
if filter is None:
|
if filter is None:
|
||||||
raise ValueError("callback not registered %s, args=%s, kargs=%s" %
|
raise ValueError("callback not registered %s, args=%s, kargs=%s" %
|
||||||
(func, args, kargs))
|
(func, args, kargs))
|
||||||
|
@ -740,10 +740,10 @@ cdef class Exe(object):
|
||||||
:see: on_error_event_del()
|
:see: on_error_event_del()
|
||||||
:see: on_exe_error_event_add()
|
:see: on_exe_error_event_add()
|
||||||
"""
|
"""
|
||||||
filter = self.__callbacks.get(enums.ECORE_EXE_EVENT_ERROR)
|
filter = self.__callbacks.get(ECORE_EXE_EVENT_ERROR)
|
||||||
if filter is None:
|
if filter is None:
|
||||||
filter = ExeEventFilter(self, enums.ECORE_EXE_EVENT_ERROR)
|
filter = ExeEventFilter(self, ECORE_EXE_EVENT_ERROR)
|
||||||
self.__callbacks[enums.ECORE_EXE_EVENT_ERROR] = filter
|
self.__callbacks[ECORE_EXE_EVENT_ERROR] = filter
|
||||||
filter.callback_add(func, args, kargs)
|
filter.callback_add(func, args, kargs)
|
||||||
|
|
||||||
def on_error_event_del(self, func, *args, **kargs):
|
def on_error_event_del(self, func, *args, **kargs):
|
||||||
|
@ -754,7 +754,7 @@ cdef class Exe(object):
|
||||||
:raise ValueError: if parameters don't match an already
|
:raise ValueError: if parameters don't match an already
|
||||||
registered callback.
|
registered callback.
|
||||||
"""
|
"""
|
||||||
filter = self.__callbacks.get(enums.ECORE_EXE_EVENT_ERROR)
|
filter = self.__callbacks.get(ECORE_EXE_EVENT_ERROR)
|
||||||
if filter is None:
|
if filter is None:
|
||||||
raise ValueError("callback not registered %s, args=%s, kargs=%s" %
|
raise ValueError("callback not registered %s, args=%s, kargs=%s" %
|
||||||
(func, args, kargs))
|
(func, args, kargs))
|
||||||
|
@ -880,7 +880,7 @@ def on_exe_add_event_add(func, *args, **kargs):
|
||||||
:see: EventHandler
|
:see: EventHandler
|
||||||
:see: EventHandlerExe
|
:see: EventHandlerExe
|
||||||
"""
|
"""
|
||||||
return EventHandlerExe(enums.ECORE_EXE_EVENT_ADD, func, *args, **kargs)
|
return EventHandlerExe(ECORE_EXE_EVENT_ADD, func, *args, **kargs)
|
||||||
|
|
||||||
|
|
||||||
def on_exe_del_event_add(func, *args, **kargs):
|
def on_exe_del_event_add(func, *args, **kargs):
|
||||||
|
@ -889,7 +889,7 @@ def on_exe_del_event_add(func, *args, **kargs):
|
||||||
:see: EventHandler
|
:see: EventHandler
|
||||||
:see: EventHandlerExe
|
:see: EventHandlerExe
|
||||||
"""
|
"""
|
||||||
return EventHandlerExe(enums.ECORE_EXE_EVENT_DEL, func, *args, **kargs)
|
return EventHandlerExe(ECORE_EXE_EVENT_DEL, func, *args, **kargs)
|
||||||
|
|
||||||
|
|
||||||
def on_exe_data_event_add(func, *args, **kargs):
|
def on_exe_data_event_add(func, *args, **kargs):
|
||||||
|
@ -898,7 +898,7 @@ def on_exe_data_event_add(func, *args, **kargs):
|
||||||
:see: EventHandler
|
:see: EventHandler
|
||||||
:see: EventHandlerExe
|
:see: EventHandlerExe
|
||||||
"""
|
"""
|
||||||
return EventHandlerExe(enums.ECORE_EXE_EVENT_DATA, func, *args, **kargs)
|
return EventHandlerExe(ECORE_EXE_EVENT_DATA, func, *args, **kargs)
|
||||||
|
|
||||||
|
|
||||||
def on_exe_error_event_add(func, *args, **kargs):
|
def on_exe_error_event_add(func, *args, **kargs):
|
||||||
|
@ -907,4 +907,4 @@ def on_exe_error_event_add(func, *args, **kargs):
|
||||||
:see: :py:class:`EventHandler`
|
:see: :py:class:`EventHandler`
|
||||||
:see: :py:class:`EventHandlerExe`
|
:see: :py:class:`EventHandlerExe`
|
||||||
"""
|
"""
|
||||||
return EventHandlerExe(enums.ECORE_EXE_EVENT_ERROR, func, *args, **kargs)
|
return EventHandlerExe(ECORE_EXE_EVENT_ERROR, func, *args, **kargs)
|
||||||
|
|
|
@ -5,7 +5,7 @@ from object_item cimport Elm_Object_Item
|
||||||
from general cimport Elm_Tooltip_Item_Content_Cb
|
from general cimport Elm_Tooltip_Item_Content_Cb
|
||||||
from enums cimport Elm_Genlist_Item_Scrollto_Type, Elm_Object_Select_Mode, \
|
from enums cimport Elm_Genlist_Item_Scrollto_Type, Elm_Object_Select_Mode, \
|
||||||
Elm_Object_Multi_Select_Mode, Elm_Glob_Match_Flags, Elm_Gengrid_Reorder_Type
|
Elm_Object_Multi_Select_Mode, Elm_Glob_Match_Flags, Elm_Gengrid_Reorder_Type
|
||||||
from efl.ecore.enums cimport Ecore_Pos_Map
|
from efl.ecore cimport Ecore_Pos_Map
|
||||||
|
|
||||||
cdef extern from "Elementary.h":
|
cdef extern from "Elementary.h":
|
||||||
ctypedef char *(*GengridItemLabelGetFunc) (void *data, Evas_Object *obj, const char *part)
|
ctypedef char *(*GengridItemLabelGetFunc) (void *data, Evas_Object *obj, const char *part)
|
||||||
|
|
|
@ -1,86 +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 "Ecore.h":
|
|
||||||
enum:
|
|
||||||
ECORE_EVENT_SIGNAL_USER
|
|
||||||
ECORE_EVENT_SIGNAL_HUP
|
|
||||||
ECORE_EVENT_SIGNAL_EXIT
|
|
||||||
ECORE_EVENT_SIGNAL_POWER
|
|
||||||
ECORE_EVENT_SIGNAL_REALTIME
|
|
||||||
|
|
||||||
int ECORE_EXE_EVENT_ADD
|
|
||||||
int ECORE_EXE_EVENT_DEL
|
|
||||||
int ECORE_EXE_EVENT_DATA
|
|
||||||
int ECORE_EXE_EVENT_ERROR
|
|
||||||
|
|
||||||
enum:
|
|
||||||
ECORE_CALLBACK_CANCEL
|
|
||||||
ECORE_CALLBACK_RENEW
|
|
||||||
|
|
||||||
enum:
|
|
||||||
ECORE_CALLBACK_PASS_ON
|
|
||||||
ECORE_CALLBACK_DONE
|
|
||||||
|
|
||||||
ctypedef enum Ecore_Fd_Handler_Flags:
|
|
||||||
ECORE_FD_READ
|
|
||||||
ECORE_FD_WRITE
|
|
||||||
ECORE_FD_ERROR
|
|
||||||
|
|
||||||
ctypedef enum Ecore_Exe_Flags:
|
|
||||||
ECORE_EXE_NONE
|
|
||||||
ECORE_EXE_PIPE_READ
|
|
||||||
ECORE_EXE_PIPE_WRITE
|
|
||||||
ECORE_EXE_PIPE_ERROR
|
|
||||||
ECORE_EXE_PIPE_READ_LINE_BUFFERED
|
|
||||||
ECORE_EXE_PIPE_ERROR_LINE_BUFFERED
|
|
||||||
ECORE_EXE_PIPE_AUTO
|
|
||||||
ECORE_EXE_RESPAWN
|
|
||||||
ECORE_EXE_USE_SH
|
|
||||||
ECORE_EXE_NOT_LEADER
|
|
||||||
ECORE_EXE_TERM_WITH_PARENT
|
|
||||||
|
|
||||||
ctypedef enum Ecore_Pos_Map:
|
|
||||||
ECORE_POS_MAP_LINEAR
|
|
||||||
ECORE_POS_MAP_ACCELERATE
|
|
||||||
ECORE_POS_MAP_DECELERATE
|
|
||||||
ECORE_POS_MAP_SINUSOIDAL
|
|
||||||
ECORE_POS_MAP_ACCELERATE_FACTOR
|
|
||||||
ECORE_POS_MAP_DECELERATE_FACTOR
|
|
||||||
ECORE_POS_MAP_SINUSOIDAL_FACTOR
|
|
||||||
ECORE_POS_MAP_DIVISOR_INTERP
|
|
||||||
ECORE_POS_MAP_BOUNCE
|
|
||||||
ECORE_POS_MAP_SPRING
|
|
||||||
|
|
||||||
ctypedef enum Ecore_Animator_Source:
|
|
||||||
ECORE_ANIMATOR_SOURCE_TIMER
|
|
||||||
ECORE_ANIMATOR_SOURCE_CUSTOM
|
|
||||||
|
|
||||||
ctypedef enum Ecore_Poller_Type:
|
|
||||||
ECORE_POLLER_CORE
|
|
||||||
|
|
||||||
|
|
||||||
cdef extern from "Ecore_File.h":
|
|
||||||
ctypedef enum Ecore_File_Event:
|
|
||||||
ECORE_FILE_EVENT_NONE
|
|
||||||
ECORE_FILE_EVENT_CREATED_FILE
|
|
||||||
ECORE_FILE_EVENT_CREATED_DIRECTORY
|
|
||||||
ECORE_FILE_EVENT_DELETED_FILE
|
|
||||||
ECORE_FILE_EVENT_DELETED_DIRECTORY
|
|
||||||
ECORE_FILE_EVENT_DELETED_SELF
|
|
||||||
ECORE_FILE_EVENT_MODIFIED
|
|
||||||
ECORE_FILE_EVENT_CLOSED
|
|
|
@ -18,11 +18,91 @@
|
||||||
from efl.eina cimport *
|
from efl.eina cimport *
|
||||||
from efl.c_eo cimport Eo as cEo
|
from efl.c_eo cimport Eo as cEo
|
||||||
from efl.eo cimport Eo
|
from efl.eo cimport Eo
|
||||||
from efl.ecore.enums cimport Ecore_Fd_Handler_Flags, Ecore_Exe_Flags, \
|
|
||||||
Ecore_File_Event, Ecore_Poller_Type
|
|
||||||
|
|
||||||
|
|
||||||
cdef extern from "Ecore.h":
|
cdef extern from "Ecore.h":
|
||||||
|
|
||||||
|
####################################################################
|
||||||
|
# Define (this are not really correct, but works)
|
||||||
|
#
|
||||||
|
cpdef enum:
|
||||||
|
ECORE_EVENT_NONE
|
||||||
|
ECORE_EVENT_SIGNAL_USER
|
||||||
|
ECORE_EVENT_SIGNAL_HUP
|
||||||
|
ECORE_EVENT_SIGNAL_EXIT
|
||||||
|
ECORE_EVENT_SIGNAL_POWER
|
||||||
|
ECORE_EVENT_SIGNAL_REALTIME
|
||||||
|
ECORE_EVENT_MEMORY_STATE
|
||||||
|
ECORE_EVENT_POWER_STATE
|
||||||
|
ECORE_EVENT_LOCALE_CHANGED
|
||||||
|
ECORE_EVENT_HOSTNAME_CHANGED
|
||||||
|
ECORE_EVENT_SYSTEM_TIMEDATE_CHANGED
|
||||||
|
ECORE_EVENT_COUNT
|
||||||
|
|
||||||
|
ECORE_CALLBACK_CANCEL
|
||||||
|
ECORE_CALLBACK_RENEW
|
||||||
|
|
||||||
|
ECORE_CALLBACK_PASS_ON
|
||||||
|
ECORE_CALLBACK_DONE
|
||||||
|
|
||||||
|
ECORE_EXE_PRIORITY_INHERIT
|
||||||
|
|
||||||
|
int ECORE_EXE_EVENT_ADD
|
||||||
|
int ECORE_EXE_EVENT_DEL
|
||||||
|
int ECORE_EXE_EVENT_DATA
|
||||||
|
int ECORE_EXE_EVENT_ERROR
|
||||||
|
|
||||||
|
####################################################################
|
||||||
|
# Enums
|
||||||
|
#
|
||||||
|
cpdef enum Ecore_Fd_Handler_Flags:
|
||||||
|
ECORE_FD_READ
|
||||||
|
ECORE_FD_WRITE
|
||||||
|
ECORE_FD_ERROR
|
||||||
|
ctypedef enum Ecore_Fd_Handler_Flags:
|
||||||
|
pass
|
||||||
|
|
||||||
|
cpdef enum Ecore_Exe_Flags:
|
||||||
|
ECORE_EXE_NONE
|
||||||
|
ECORE_EXE_PIPE_READ
|
||||||
|
ECORE_EXE_PIPE_WRITE
|
||||||
|
ECORE_EXE_PIPE_ERROR
|
||||||
|
ECORE_EXE_PIPE_READ_LINE_BUFFERED
|
||||||
|
ECORE_EXE_PIPE_ERROR_LINE_BUFFERED
|
||||||
|
ECORE_EXE_PIPE_AUTO
|
||||||
|
ECORE_EXE_RESPAWN
|
||||||
|
ECORE_EXE_USE_SH
|
||||||
|
ECORE_EXE_NOT_LEADER
|
||||||
|
ECORE_EXE_TERM_WITH_PARENT
|
||||||
|
ctypedef enum Ecore_Exe_Flags:
|
||||||
|
pass
|
||||||
|
|
||||||
|
cpdef enum Ecore_Pos_Map:
|
||||||
|
ECORE_POS_MAP_LINEAR
|
||||||
|
ECORE_POS_MAP_ACCELERATE
|
||||||
|
ECORE_POS_MAP_DECELERATE
|
||||||
|
ECORE_POS_MAP_SINUSOIDAL
|
||||||
|
ECORE_POS_MAP_ACCELERATE_FACTOR
|
||||||
|
ECORE_POS_MAP_DECELERATE_FACTOR
|
||||||
|
ECORE_POS_MAP_SINUSOIDAL_FACTOR
|
||||||
|
ECORE_POS_MAP_DIVISOR_INTERP
|
||||||
|
ECORE_POS_MAP_BOUNCE
|
||||||
|
ECORE_POS_MAP_SPRING
|
||||||
|
ECORE_POS_MAP_CUBIC_BEZIER
|
||||||
|
ctypedef enum Ecore_Pos_Map:
|
||||||
|
pass
|
||||||
|
|
||||||
|
cpdef enum Ecore_Animator_Source:
|
||||||
|
ECORE_ANIMATOR_SOURCE_TIMER
|
||||||
|
ECORE_ANIMATOR_SOURCE_CUSTOM
|
||||||
|
ctypedef enum Ecore_Animator_Source:
|
||||||
|
pass
|
||||||
|
|
||||||
|
cpdef enum Ecore_Poller_Type:
|
||||||
|
ECORE_POLLER_CORE
|
||||||
|
ctypedef enum Ecore_Poller_Type:
|
||||||
|
pass
|
||||||
|
|
||||||
####################################################################
|
####################################################################
|
||||||
# Basic Types
|
# Basic Types
|
||||||
#
|
#
|
||||||
|
@ -172,6 +252,24 @@ cdef extern from "Ecore.h":
|
||||||
|
|
||||||
cdef extern from "Ecore_File.h":
|
cdef extern from "Ecore_File.h":
|
||||||
|
|
||||||
|
cpdef enum Ecore_File_Event:
|
||||||
|
ECORE_FILE_EVENT_NONE
|
||||||
|
ECORE_FILE_EVENT_CREATED_FILE
|
||||||
|
ECORE_FILE_EVENT_CREATED_DIRECTORY
|
||||||
|
ECORE_FILE_EVENT_DELETED_FILE
|
||||||
|
ECORE_FILE_EVENT_DELETED_DIRECTORY
|
||||||
|
ECORE_FILE_EVENT_DELETED_SELF
|
||||||
|
ECORE_FILE_EVENT_MODIFIED
|
||||||
|
ECORE_FILE_EVENT_CLOSED
|
||||||
|
ctypedef enum Ecore_File_Event:
|
||||||
|
pass
|
||||||
|
|
||||||
|
cpdef enum Ecore_File_Progress_Return:
|
||||||
|
ECORE_FILE_PROGRESS_CONTINUE
|
||||||
|
ECORE_FILE_PROGRESS_ABORT
|
||||||
|
ctypedef enum Ecore_File_Progress_Return:
|
||||||
|
pass
|
||||||
|
|
||||||
ctypedef struct Ecore_File_Download_Job
|
ctypedef struct Ecore_File_Download_Job
|
||||||
ctypedef struct Ecore_File_Monitor
|
ctypedef struct Ecore_File_Monitor
|
||||||
|
|
||||||
|
@ -179,7 +277,6 @@ cdef extern from "Ecore_File.h":
|
||||||
ctypedef int (*Ecore_File_Download_Progress_Cb)(void *data, const char *file, long int dltotal, long int dlnow, long int ultotal, long int ulnow)
|
ctypedef int (*Ecore_File_Download_Progress_Cb)(void *data, const char *file, long int dltotal, long int dlnow, long int ultotal, long int ulnow)
|
||||||
ctypedef void (*Ecore_File_Monitor_Cb)(void *data, Ecore_File_Monitor *em, Ecore_File_Event event, const char *path)
|
ctypedef void (*Ecore_File_Monitor_Cb)(void *data, Ecore_File_Monitor *em, Ecore_File_Event event, const char *path)
|
||||||
|
|
||||||
|
|
||||||
int ecore_file_init()
|
int ecore_file_init()
|
||||||
int ecore_file_shutdown()
|
int ecore_file_shutdown()
|
||||||
void ecore_file_download_abort(Ecore_File_Download_Job *job)
|
void ecore_file_download_abort(Ecore_File_Download_Job *job)
|
||||||
|
|
Loading…
Reference in New Issue