summaryrefslogtreecommitdiff
path: root/efl/ecore
diff options
context:
space:
mode:
authorKai Huuhko <kai.huuhko@gmail.com>2013-04-21 15:43:37 +0000
committerKai Huuhko <kai.huuhko@gmail.com>2013-04-22 20:20:21 +0300
commit724b99909565257a5fe15dd321377532d46a1d5c (patch)
tree0366329aee0c9cf31ab2dc3d1263d26da2699dc1 /efl/ecore
parent1753d43b7d874182e67f6844145995548c9e4138 (diff)
Ecore: Optimizations.
Diffstat (limited to 'efl/ecore')
-rw-r--r--efl/ecore/efl.ecore.pyx198
-rw-r--r--efl/ecore/efl.ecore_events.pxi10
-rw-r--r--efl/ecore/efl.ecore_exe.pxi99
3 files changed, 227 insertions, 80 deletions
diff --git a/efl/ecore/efl.ecore.pyx b/efl/ecore/efl.ecore.pyx
index fbd8204..a554bac 100644
--- a/efl/ecore/efl.ecore.pyx
+++ b/efl/ecore/efl.ecore.pyx
@@ -15,32 +15,178 @@
15# You should have received a copy of the GNU Lesser General Public License 15# You should have received a copy of the GNU Lesser General Public License
16# along with this Python-EFL. If not, see <http://www.gnu.org/licenses/>. 16# along with this Python-EFL. If not, see <http://www.gnu.org/licenses/>.
17 17
18"""
19
20.. _Ecore_Fd_Handler_Flags:
21
22Fd handler flags
23================
24
25What to monitor the file descriptor for: reading, writing or error.
26
27.. data:: ECORE_FD_READ
28
29 Fd Read mask
30
31.. data:: ECORE_FD_WRITE
32
33 Fd Write mask
34
35.. data:: ECORE_FD_ERROR
36
37 Fd Error mask
38
39
40.. _Ecore_Exe_Flags:
41
42Exe flags
43=========
44
45Flags for executing a child with its stdin and/or stdout piped back.
46
47.. data:: ECORE_EXE_NONE
48
49 No exe flags at all
50
51.. data:: ECORE_EXE_PIPE_READ
52
53 Exe Pipe Read mask
54
55.. data:: ECORE_EXE_PIPE_WRITE
56
57 Exe Pipe Write mask
58
59.. data:: ECORE_EXE_PIPE_ERROR
60
61 Exe Pipe error mask
62
63.. data:: ECORE_EXE_PIPE_READ_LINE_BUFFERED
64
65 Reads are buffered until a newline and split 1 line per Ecore_Exe_Event_Data_Line
66
67.. data:: ECORE_EXE_PIPE_ERROR_LINE_BUFFERED
68
69 Errors are buffered until a newline and split 1 line per Ecore_Exe_Event_Data_Line
70
71.. data:: ECORE_EXE_PIPE_AUTO
72
73 stdout and stderr are buffered automatically
74
75.. data:: ECORE_EXE_RESPAWN
76
77 FIXME: Exe is restarted if it dies
78
79.. data:: ECORE_EXE_USE_SH
80
81 Use /bin/sh to run the command.
82
83.. data:: ECORE_EXE_NOT_LEADER
84
85 Do not use setsid() to have the executed process be its own session leader
86
87.. data:: ECORE_EXE_TERM_WITH_PARENT
88
89 Makes child receive SIGTERM when parent dies.
90
91
92Callback return values
93======================
94ECORE_CALLBACK_CANCEL EINA_FALSE /**< Return value to remove a callback */
95ECORE_CALLBACK_RENEW EINA_TRUE /**< Return value to keep a callback */
96
97Event return values
98===================
99ECORE_CALLBACK_PASS_ON EINA_TRUE /**< Return value to pass event to next handler */
100ECORE_CALLBACK_DONE EINA_FALSE /**< Return value to stop event handling */
101
102
103.. _Ecore_Pos_Map:
104
105Position mappings for the animation
106===================================
107
108.. data:: ECORE_POS_MAP_LINEAR
109
110 Linear 0.0 -> 1.0
111
112.. data:: ECORE_POS_MAP_ACCELERATE
113
114 Start slow then speed up
115
116.. data:: ECORE_POS_MAP_DECELERATE
117
118 Start fast then slow down
119
120.. data:: ECORE_POS_MAP_SINUSOIDAL
121
122 Start slow, speed up then slow down at end
123
124.. data:: ECORE_POS_MAP_ACCELERATE_FACTOR
125
126 Start slow then speed up, v1 being a power factor, 0.0 being linear, 1.0 being normal accelerate, 2.0 being much more pronounced accelerate (squared), 3.0 being cubed, etc.
127
128.. data:: ECORE_POS_MAP_DECELERATE_FACTOR
129
130 Start fast then slow down, v1 being a power factor, 0.0 being linear, 1.0 being normal decelerate, 2.0 being much more pronounced decelerate (squared), 3.0 being cubed, etc.
131
132.. data:: ECORE_POS_MAP_SINUSOIDAL_FACTOR
133
134 Start slow, speed up then slow down at end, v1 being a power factor, 0.0 being linear, 1.0 being normal sinusoidal, 2.0 being much more pronounced sinusoidal (squared), 3.0 being cubed, etc.
135
136.. data:: ECORE_POS_MAP_DIVISOR_INTERP
137
138 Start at gradient * v1, interpolated via power of v2 curve
139
140.. data:: ECORE_POS_MAP_BOUNCE
141
142 Start at 0.0 then "drop" like a ball bouncing to the ground at 1.0, and bounce v2 times, with decay factor of v1
143
144.. data:: ECORE_POS_MAP_SPRING
145
146 Start at 0.0 then "wobble" like a spring rest position 1.0, and wobble v2 times, with decay factor of v1
147
148
149.. _Ecore_Animator_Source:
150
151Timing sources for animators
152============================
153
154.. data:: ECORE_ANIMATOR_SOURCE_TIMER
155
156 The default system clock/timer based animator that ticks every "frametime" seconds
157
158.. data:: ECORE_ANIMATOR_SOURCE_CUSTOM
159
160 A custom animator trigger that you need to call ecore_animator_trigger() to make it tick
161
162
163"""
164
18import traceback 165import traceback
19from efl.eo cimport Eo, PY_REFCOUNT, _ctouni 166from efl.eo cimport Eo, PY_REFCOUNT, _ctouni
20from cpython cimport Py_INCREF, Py_DECREF 167from cpython cimport Py_INCREF, Py_DECREF
168cimport efl.ecore.enums as enums
21 169
22 170ECORE_CALLBACK_CANCEL = enums.ECORE_CALLBACK_CANCEL
23ECORE_CALLBACK_CANCEL = 0 171ECORE_CALLBACK_RENEW = enums.ECORE_CALLBACK_RENEW
24ECORE_CALLBACK_RENEW = 1
25 172
26# Ecore_Fd_Handler_Flags: 173# Ecore_Fd_Handler_Flags:
27ECORE_FD_READ = 1 174ECORE_FD_READ = enums.ECORE_FD_READ
28ECORE_FD_WRITE = 2 175ECORE_FD_WRITE = enums.ECORE_FD_WRITE
29ECORE_FD_ERROR = 4 176ECORE_FD_ERROR = enums.ECORE_FD_ERROR
30ECORE_FD_ALL = 7 177ECORE_FD_ALL = 7
31 178
32
33# Ecore_Exe_Flags: 179# Ecore_Exe_Flags:
34ECORE_EXE_PIPE_READ = 1 180ECORE_EXE_PIPE_READ = enums.ECORE_EXE_PIPE_READ
35ECORE_EXE_PIPE_WRITE = 2 181ECORE_EXE_PIPE_WRITE = enums.ECORE_EXE_PIPE_WRITE
36ECORE_EXE_PIPE_ERROR = 4 182ECORE_EXE_PIPE_ERROR = enums.ECORE_EXE_PIPE_ERROR
37ECORE_EXE_PIPE_READ_LINE_BUFFERED = 8 183ECORE_EXE_PIPE_READ_LINE_BUFFERED = enums.ECORE_EXE_PIPE_READ_LINE_BUFFERED
38ECORE_EXE_PIPE_ERROR_LINE_BUFFERED = 16 184ECORE_EXE_PIPE_ERROR_LINE_BUFFERED = enums.ECORE_EXE_PIPE_ERROR_LINE_BUFFERED
39ECORE_EXE_PIPE_AUTO = 32 185ECORE_EXE_PIPE_AUTO = enums.ECORE_EXE_PIPE_AUTO
40ECORE_EXE_RESPAWN = 64 186ECORE_EXE_RESPAWN = enums.ECORE_EXE_RESPAWN
41ECORE_EXE_USE_SH = 128 187ECORE_EXE_USE_SH = enums.ECORE_EXE_USE_SH
42ECORE_EXE_NOT_LEADER = 256 188ECORE_EXE_NOT_LEADER = enums.ECORE_EXE_NOT_LEADER
43ECORE_EXE_TERM_WITH_PARENT = 512 189ECORE_EXE_TERM_WITH_PARENT = enums.ECORE_EXE_TERM_WITH_PARENT
44 190
45ECORE_EXE_PRIORITY_INHERIT = 9999 191ECORE_EXE_PRIORITY_INHERIT = 9999
46 192
@@ -79,15 +225,15 @@ def init():
79 225
80 global _event_type_mapping 226 global _event_type_mapping
81 _event_type_mapping = { 227 _event_type_mapping = {
82 ECORE_EVENT_SIGNAL_USER: EventSignalUser, 228 enums.ECORE_EVENT_SIGNAL_USER: EventSignalUser,
83 ECORE_EVENT_SIGNAL_HUP: EventSignalHup, 229 enums.ECORE_EVENT_SIGNAL_HUP: EventSignalHup,
84 ECORE_EVENT_SIGNAL_EXIT: EventSignalExit, 230 enums.ECORE_EVENT_SIGNAL_EXIT: EventSignalExit,
85 ECORE_EVENT_SIGNAL_POWER: EventSignalPower, 231 enums.ECORE_EVENT_SIGNAL_POWER: EventSignalPower,
86 ECORE_EVENT_SIGNAL_REALTIME: EventSignalRealtime, 232 enums.ECORE_EVENT_SIGNAL_REALTIME: EventSignalRealtime,
87 ECORE_EXE_EVENT_ADD: EventExeAdd, 233 enums.ECORE_EXE_EVENT_ADD: EventExeAdd,
88 ECORE_EXE_EVENT_DEL: EventExeDel, 234 enums.ECORE_EXE_EVENT_DEL: EventExeDel,
89 ECORE_EXE_EVENT_DATA: EventExeData, 235 enums.ECORE_EXE_EVENT_DATA: EventExeData,
90 ECORE_EXE_EVENT_ERROR: EventExeData, 236 enums.ECORE_EXE_EVENT_ERROR: EventExeData,
91 } 237 }
92 238
93 ecore_file_init() 239 ecore_file_init()
diff --git a/efl/ecore/efl.ecore_events.pxi b/efl/ecore/efl.ecore_events.pxi
index 687e298..79b03a1 100644
--- a/efl/ecore/efl.ecore_events.pxi
+++ b/efl/ecore/efl.ecore_events.pxi
@@ -166,7 +166,7 @@ cdef class EventSignalUser2(EventSignalUser):
166 166
167cdef class EventHandlerSignalUser(EventHandler): 167cdef class EventHandlerSignalUser(EventHandler):
168 def __init__(self, func, *args, **kargs): 168 def __init__(self, func, *args, **kargs):
169 EventHandler.__init__(self, ECORE_EVENT_SIGNAL_USER, 169 EventHandler.__init__(self, enums.ECORE_EVENT_SIGNAL_USER,
170 func, *args, **kargs) 170 func, *args, **kargs)
171 171
172 cdef Eina_Bool _exec(self, void *event) except 2: 172 cdef Eina_Bool _exec(self, void *event) except 2:
@@ -198,7 +198,7 @@ cdef class EventSignalHup(Event):
198 198
199 199
200def on_signal_hup(func, *args, **kargs): 200def on_signal_hup(func, *args, **kargs):
201 return EventHandler(ECORE_EVENT_SIGNAL_HUP, func, *args, **kargs) 201 return EventHandler(enums.ECORE_EVENT_SIGNAL_HUP, func, *args, **kargs)
202 202
203 203
204cdef class EventSignalExit(Event): 204cdef class EventSignalExit(Event):
@@ -245,7 +245,7 @@ cdef class EventSignalTerminate(EventSignalExit):
245 245
246cdef class EventHandlerSignalExit(EventHandler): 246cdef class EventHandlerSignalExit(EventHandler):
247 def __init__(self, func, *args, **kargs): 247 def __init__(self, func, *args, **kargs):
248 EventHandler.__init__(self, ECORE_EVENT_SIGNAL_EXIT, 248 EventHandler.__init__(self, enums.ECORE_EVENT_SIGNAL_EXIT,
249 func, *args, **kargs) 249 func, *args, **kargs)
250 250
251 cdef Eina_Bool _exec(self, void *event) except 2: 251 cdef Eina_Bool _exec(self, void *event) except 2:
@@ -279,7 +279,7 @@ cdef class EventSignalPower(Event):
279 279
280 280
281def on_signal_power(func, *args, **kargs): 281def on_signal_power(func, *args, **kargs):
282 return EventHandler(ECORE_EVENT_SIGNAL_POWER, func, *args, **kargs) 282 return EventHandler(enums.ECORE_EVENT_SIGNAL_POWER, func, *args, **kargs)
283 283
284 284
285cdef class EventSignalRealtime(Event): 285cdef class EventSignalRealtime(Event):
@@ -297,7 +297,7 @@ cdef class EventSignalRealtime(Event):
297 297
298 298
299def on_signal_realtime(func, *args, **kargs): 299def on_signal_realtime(func, *args, **kargs):
300 return EventHandler(ECORE_EVENT_SIGNAL_REALTIME, func, *args, **kargs) 300 return EventHandler(enums.ECORE_EVENT_SIGNAL_REALTIME, func, *args, **kargs)
301 301
302 302
303cdef class CustomEvent(Event): 303cdef class CustomEvent(Event):
diff --git a/efl/ecore/efl.ecore_exe.pxi b/efl/ecore/efl.ecore_exe.pxi
index 17d4ab4..c724e30 100644
--- a/efl/ecore/efl.ecore_exe.pxi
+++ b/efl/ecore/efl.ecore_exe.pxi
@@ -25,47 +25,50 @@ cdef extern from "Python.h":
25 25
26cdef exe_flags2str(int value): 26cdef exe_flags2str(int value):
27 flags = [] 27 flags = []
28 if value & ECORE_EXE_PIPE_READ: 28 if value & enums.ECORE_EXE_PIPE_READ:
29 flags.append("PIPE_READ") 29 flags.append("PIPE_READ")
30 if value & ECORE_EXE_PIPE_WRITE: 30 if value & enums.ECORE_EXE_PIPE_WRITE:
31 flags.append("PIPE_WRITE") 31 flags.append("PIPE_WRITE")
32 if value & ECORE_EXE_PIPE_ERROR: 32 if value & enums.ECORE_EXE_PIPE_ERROR:
33 flags.append("PIPE_ERROR") 33 flags.append("PIPE_ERROR")
34 if value & ECORE_EXE_PIPE_READ_LINE_BUFFERED: 34 if value & enums.ECORE_EXE_PIPE_READ_LINE_BUFFERED:
35 flags.append("PIPE_READ_LINE_BUFFERED") 35 flags.append("PIPE_READ_LINE_BUFFERED")
36 if value & ECORE_EXE_PIPE_ERROR_LINE_BUFFERED: 36 if value & enums.ECORE_EXE_PIPE_ERROR_LINE_BUFFERED:
37 flags.append("PIPE_ERROR_LINE_BUFFERED") 37 flags.append("PIPE_ERROR_LINE_BUFFERED")
38 if value & ECORE_EXE_PIPE_AUTO: 38 if value & enums.ECORE_EXE_PIPE_AUTO:
39 flags.append("PIPE_AUTO") 39 flags.append("PIPE_AUTO")
40 if value & ECORE_EXE_RESPAWN: 40 if value & enums.ECORE_EXE_RESPAWN:
41 flags.append("RESPAWN") 41 flags.append("RESPAWN")
42 if value & ECORE_EXE_USE_SH: 42 if value & enums.ECORE_EXE_USE_SH:
43 flags.append("USE_SH") 43 flags.append("USE_SH")
44 if value & ECORE_EXE_NOT_LEADER: 44 if value & enums.ECORE_EXE_NOT_LEADER:
45 flags.append("NOT_LEADER") 45 flags.append("NOT_LEADER")
46 return ", ".join(flags) 46 return ", ".join(flags)
47 47
48 48
49cdef Eina_Bool _exe_event_filter_cb(void *data, int type, void *event) with gil: 49cdef Eina_Bool _exe_event_filter_cb(void *data, int type, void *event) with gil:
50 cdef ExeEventFilter self = <ExeEventFilter>data 50 cdef:
51 cdef Ecore_Exe_Event_Add *e_add 51 ExeEventFilter self = <ExeEventFilter>data
52 cdef Ecore_Exe_Event_Del *e_del 52 Ecore_Exe_Event_Add *e_add
53 cdef Ecore_Exe_Event_Data *e_data 53 Ecore_Exe_Event_Del *e_del
54 cdef Event e 54 Ecore_Exe_Event_Data *e_data
55 Event e
56 list cbs
57 tuple cb
55 58
56 try: 59 try:
57 assert self.event_type == type, "event is not what we asked? impossible" 60 assert self.event_type == type, "event is not what we asked? impossible"
58 if type == ECORE_EXE_EVENT_ADD: 61 if type == enums.ECORE_EXE_EVENT_ADD:
59 e_add = <Ecore_Exe_Event_Add *>event 62 e_add = <Ecore_Exe_Event_Add *>event
60 if e_add.exe != self.exe: 63 if e_add.exe != self.exe:
61 return 1 64 return 1
62 e = EventExeAdd() 65 e = EventExeAdd()
63 elif type == ECORE_EXE_EVENT_DEL: 66 elif type == enums.ECORE_EXE_EVENT_DEL:
64 e_del = <Ecore_Exe_Event_Del *>event 67 e_del = <Ecore_Exe_Event_Del *>event
65 if e_del.exe != self.exe: 68 if e_del.exe != self.exe:
66 return 1 69 return 1
67 e = EventExeDel() 70 e = EventExeDel()
68 elif type == ECORE_EXE_EVENT_DATA or type == ECORE_EXE_EVENT_ERROR: 71 elif type == enums.ECORE_EXE_EVENT_DATA or type == enums.ECORE_EXE_EVENT_ERROR:
69 e_data = <Ecore_Exe_Event_Data *>event 72 e_data = <Ecore_Exe_Event_Data *>event
70 if e_data.exe != self.exe: 73 if e_data.exe != self.exe:
71 return 1 74 return 1
@@ -76,10 +79,10 @@ cdef Eina_Bool _exe_event_filter_cb(void *data, int type, void *event) with gil:
76 r = e._set_obj(event) 79 r = e._set_obj(event)
77 assert r != -1, "exe is not known?! impossible!" 80 assert r != -1, "exe is not known?! impossible!"
78 81
79 cb = tuple(self.callbacks) # copy, so we can change self.callbacks 82 cbs = self.callbacks[:] # copy, so we can change self.callbacks
80 for func, args, kargs in cb: 83 for cb in cbs:
81 try: 84 try:
82 func(self.owner, e, *args, **kargs) 85 cb[0](self.owner, e, *cb[1], **cb[2])
83 except: 86 except:
84 traceback.print_exc() 87 traceback.print_exc()
85 88
@@ -91,9 +94,6 @@ cdef Eina_Bool _exe_event_filter_cb(void *data, int type, void *event) with gil:
91 94
92cdef class ExeEventFilter: 95cdef class ExeEventFilter:
93 def __cinit__(self, *a, **ka): 96 def __cinit__(self, *a, **ka):
94 self.exe = NULL
95 self.handler = NULL
96 self.owner = None
97 self.event_type = -1 97 self.event_type = -1
98 self.callbacks = [] 98 self.callbacks = []
99 99
@@ -104,7 +104,7 @@ cdef class ExeEventFilter:
104 104
105 self.exe = NULL 105 self.exe = NULL
106 self.owner = None 106 self.owner = None
107 self.event_type = None 107 self.event_type = -1
108 self.callbacks = None 108 self.callbacks = None
109 109
110 def __init__(self, Exe exe not None, int event_type): 110 def __init__(self, Exe exe not None, int event_type):
@@ -409,7 +409,9 @@ cdef class Exe(object):
409 :return: success or failure. 409 :return: success or failure.
410 :rtype: bool 410 :rtype: bool
411 """ 411 """
412 cdef Py_buffer buf_view 412 cdef:
413 Py_buffer buf_view
414 bint ret
413 415
414 if isinstance(buf, (str, unicode)): 416 if isinstance(buf, (str, unicode)):
415 buf = PyUnicode_AsUTF8String(buf) 417 buf = PyUnicode_AsUTF8String(buf)
@@ -423,7 +425,7 @@ cdef class Exe(object):
423 "given size (%d) is larger than buffer size (%d)." % 425 "given size (%d) is larger than buffer size (%d)." %
424 (size, buf_view.len)) 426 (size, buf_view.len))
425 427
426 ret = bool(ecore_exe_send(self.exe, <const_void *>buf_view.buf, buf_view.len)) 428 ret = ecore_exe_send(self.exe, <const_void *>buf_view.buf, buf_view.len)
427 PyBuffer_Release(&buf_view) 429 PyBuffer_Release(&buf_view)
428 return ret 430 return ret
429 431
@@ -449,9 +451,8 @@ cdef class Exe(object):
449 ecore_exe_auto_limits_set(self.exe, start_bytes, end_bytes, 451 ecore_exe_auto_limits_set(self.exe, start_bytes, end_bytes,
450 start_lines, end_lines) 452 start_lines, end_lines)
451 453
452 def event_data_get(self, int flags): 454 # TODO:
453 pass 455 #def event_data_get(self, int flags):
454 # TODO:
455 #Ecore_Exe_Event_Data *ecore_exe_event_data_get(Ecore_Exe *exe, Ecore_Exe_Flags flags) 456 #Ecore_Exe_Event_Data *ecore_exe_event_data_get(Ecore_Exe *exe, Ecore_Exe_Flags flags)
456 #void ecore_exe_event_data_free(Ecore_Exe_Event_Data *data) 457 #void ecore_exe_event_data_free(Ecore_Exe_Event_Data *data)
457 458
@@ -645,10 +646,10 @@ cdef class Exe(object):
645 :see: on_exe_add_event_add() 646 :see: on_exe_add_event_add()
646 647
647 """ 648 """
648 filter = self.__callbacks.get(ECORE_EXE_EVENT_ADD) 649 filter = self.__callbacks.get(enums.ECORE_EXE_EVENT_ADD)
649 if filter is None: 650 if filter is None:
650 filter = ExeEventFilter(self, ECORE_EXE_EVENT_ADD) 651 filter = ExeEventFilter(self, enums.ECORE_EXE_EVENT_ADD)
651 self.__callbacks[ECORE_EXE_EVENT_ADD] = filter 652 self.__callbacks[enums.ECORE_EXE_EVENT_ADD] = filter
652 filter.callback_add(func, args, kargs) 653 filter.callback_add(func, args, kargs)
653 654
654 def on_add_event_del(self, func, *args, **kargs): 655 def on_add_event_del(self, func, *args, **kargs):
@@ -659,7 +660,7 @@ cdef class Exe(object):
659 :raise ValueError: if parameters don't match an already 660 :raise ValueError: if parameters don't match an already
660 registered callback. 661 registered callback.
661 """ 662 """
662 filter = self.__callbacks.get(ECORE_EXE_EVENT_ADD) 663 filter = self.__callbacks.get(enums.ECORE_EXE_EVENT_ADD)
663 if filter is None: 664 if filter is None:
664 raise ValueError("callback not registered %s, args=%s, kargs=%s" % 665 raise ValueError("callback not registered %s, args=%s, kargs=%s" %
665 (func, args, kargs)) 666 (func, args, kargs))
@@ -681,10 +682,10 @@ cdef class Exe(object):
681 :see: on_del_event_del() 682 :see: on_del_event_del()
682 :see: on_exe_del_event_add() 683 :see: on_exe_del_event_add()
683 """ 684 """
684 filter = self.__callbacks.get(ECORE_EXE_EVENT_DEL) 685 filter = self.__callbacks.get(enums.ECORE_EXE_EVENT_DEL)
685 if filter is None: 686 if filter is None:
686 filter = ExeEventFilter(self, ECORE_EXE_EVENT_DEL) 687 filter = ExeEventFilter(self, enums.ECORE_EXE_EVENT_DEL)
687 self.__callbacks[ECORE_EXE_EVENT_DEL] = filter 688 self.__callbacks[enums.ECORE_EXE_EVENT_DEL] = filter
688 filter.callback_add(func, args, kargs) 689 filter.callback_add(func, args, kargs)
689 690
690 def on_del_event_del(self, func, *args, **kargs): 691 def on_del_event_del(self, func, *args, **kargs):
@@ -695,7 +696,7 @@ cdef class Exe(object):
695 :raise ValueError: if parameters don't match an already 696 :raise ValueError: if parameters don't match an already
696 registered callback. 697 registered callback.
697 """ 698 """
698 filter = self.__callbacks.get(ECORE_EXE_EVENT_DEL) 699 filter = self.__callbacks.get(enums.ECORE_EXE_EVENT_DEL)
699 if filter is None: 700 if filter is None:
700 raise ValueError("callback not registered %s, args=%s, kargs=%s" % 701 raise ValueError("callback not registered %s, args=%s, kargs=%s" %
701 (func, args, kargs)) 702 (func, args, kargs))
@@ -717,10 +718,10 @@ cdef class Exe(object):
717 :see: on_data_event_del() 718 :see: on_data_event_del()
718 :see: on_exe_data_event_add() 719 :see: on_exe_data_event_add()
719 """ 720 """
720 filter = self.__callbacks.get(ECORE_EXE_EVENT_DATA) 721 filter = self.__callbacks.get(enums.ECORE_EXE_EVENT_DATA)
721 if filter is None: 722 if filter is None:
722 filter = ExeEventFilter(self, ECORE_EXE_EVENT_DATA) 723 filter = ExeEventFilter(self, enums.ECORE_EXE_EVENT_DATA)
723 self.__callbacks[ECORE_EXE_EVENT_DATA] = filter 724 self.__callbacks[enums.ECORE_EXE_EVENT_DATA] = filter
724 filter.callback_add(func, args, kargs) 725 filter.callback_add(func, args, kargs)
725 726
726 def on_data_event_del(self, func, *args, **kargs): 727 def on_data_event_del(self, func, *args, **kargs):
@@ -731,7 +732,7 @@ cdef class Exe(object):
731 :raise ValueError: if parameters don't match an already 732 :raise ValueError: if parameters don't match an already
732 registered callback. 733 registered callback.
733 """ 734 """
734 filter = self.__callbacks.get(ECORE_EXE_EVENT_DATA) 735 filter = self.__callbacks.get(enums.ECORE_EXE_EVENT_DATA)
735 if filter is None: 736 if filter is None:
736 raise ValueError("callback not registered %s, args=%s, kargs=%s" % 737 raise ValueError("callback not registered %s, args=%s, kargs=%s" %
737 (func, args, kargs)) 738 (func, args, kargs))
@@ -753,10 +754,10 @@ cdef class Exe(object):
753 :see: on_error_event_del() 754 :see: on_error_event_del()
754 :see: on_exe_error_event_add() 755 :see: on_exe_error_event_add()
755 """ 756 """
756 filter = self.__callbacks.get(ECORE_EXE_EVENT_ERROR) 757 filter = self.__callbacks.get(enums.ECORE_EXE_EVENT_ERROR)
757 if filter is None: 758 if filter is None:
758 filter = ExeEventFilter(self, ECORE_EXE_EVENT_ERROR) 759 filter = ExeEventFilter(self, enums.ECORE_EXE_EVENT_ERROR)
759 self.__callbacks[ECORE_EXE_EVENT_ERROR] = filter 760 self.__callbacks[enums.ECORE_EXE_EVENT_ERROR] = filter
760 filter.callback_add(func, args, kargs) 761 filter.callback_add(func, args, kargs)
761 762
762 def on_error_event_del(self, func, *args, **kargs): 763 def on_error_event_del(self, func, *args, **kargs):
@@ -767,7 +768,7 @@ cdef class Exe(object):
767 :raise ValueError: if parameters don't match an already 768 :raise ValueError: if parameters don't match an already
768 registered callback. 769 registered callback.
769 """ 770 """
770 filter = self.__callbacks.get(ECORE_EXE_EVENT_ERROR) 771 filter = self.__callbacks.get(enums.ECORE_EXE_EVENT_ERROR)
771 if filter is None: 772 if filter is None:
772 raise ValueError("callback not registered %s, args=%s, kargs=%s" % 773 raise ValueError("callback not registered %s, args=%s, kargs=%s" %
773 (func, args, kargs)) 774 (func, args, kargs))
@@ -910,7 +911,7 @@ def on_exe_add_event_add(func, *args, **kargs):
910 :see: EventHandler 911 :see: EventHandler
911 :see: EventHandlerExe 912 :see: EventHandlerExe
912 """ 913 """
913 return EventHandlerExe(ECORE_EXE_EVENT_ADD, func, *args, **kargs) 914 return EventHandlerExe(enums.ECORE_EXE_EVENT_ADD, func, *args, **kargs)
914 915
915 916
916def on_exe_del_event_add(func, *args, **kargs): 917def on_exe_del_event_add(func, *args, **kargs):
@@ -919,7 +920,7 @@ def on_exe_del_event_add(func, *args, **kargs):
919 :see: EventHandler 920 :see: EventHandler
920 :see: EventHandlerExe 921 :see: EventHandlerExe
921 """ 922 """
922 return EventHandlerExe(ECORE_EXE_EVENT_DEL, func, *args, **kargs) 923 return EventHandlerExe(enums.ECORE_EXE_EVENT_DEL, func, *args, **kargs)
923 924
924 925
925def on_exe_data_event_add(func, *args, **kargs): 926def on_exe_data_event_add(func, *args, **kargs):
@@ -928,7 +929,7 @@ def on_exe_data_event_add(func, *args, **kargs):
928 :see: EventHandler 929 :see: EventHandler
929 :see: EventHandlerExe 930 :see: EventHandlerExe
930 """ 931 """
931 return EventHandlerExe(ECORE_EXE_EVENT_DATA, func, *args, **kargs) 932 return EventHandlerExe(enums.ECORE_EXE_EVENT_DATA, func, *args, **kargs)
932 933
933 934
934def on_exe_error_event_add(func, *args, **kargs): 935def on_exe_error_event_add(func, *args, **kargs):
@@ -937,4 +938,4 @@ def on_exe_error_event_add(func, *args, **kargs):
937 :see: L{EventHandler} 938 :see: L{EventHandler}
938 :see: L{EventHandlerExe} 939 :see: L{EventHandlerExe}
939 """ 940 """
940 return EventHandlerExe(ECORE_EXE_EVENT_ERROR, func, *args, **kargs) 941 return EventHandlerExe(enums.ECORE_EXE_EVENT_ERROR, func, *args, **kargs)