summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGustavo Lima Chaves <glima@profusion.mobi>2011-12-22 13:25:56 +0000
committerGustavo Lima Chaves <glima@profusion.mobi>2011-12-22 13:25:56 +0000
commit0ad4c77c417c855ecac82ebdfa6b72818f113db7 (patch)
treedf6901861417c5316d0d13bb2afa0bb0c8aa4586
parent7dcaece08c792d6ea9de68878be27b98f38be20f (diff)
Put python-evas up to date WRT evas callbacks.
SVN revision: 66464
-rw-r--r--evas/__init__.py2
-rw-r--r--evas/evas.c_evas_canvas_callbacks.pxi28
-rw-r--r--evas/evas.c_evas_object_callbacks.pxi21
-rw-r--r--include/evas/c_evas.pxd4
4 files changed, 46 insertions, 9 deletions
diff --git a/evas/__init__.py b/evas/__init__.py
index 485c28f..729e667 100644
--- a/evas/__init__.py
+++ b/evas/__init__.py
@@ -60,6 +60,8 @@ EVAS_CALLBACK_RENDER_FLUSH_POST = 26
60EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_IN = 27 60EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_IN = 27
61EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_OUT = 28 61EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_OUT = 28
62EVAS_CALLBACK_IMAGE_UNLOADED = 29 62EVAS_CALLBACK_IMAGE_UNLOADED = 29
63EVAS_CALLBACK_RENDER_PRE = 30
64EVAS_CALLBACK_RENDER_POST = 31
63 65
64EVAS_BUTTON_NONE = 0 66EVAS_BUTTON_NONE = 0
65EVAS_BUTTON_DOUBLE_CLICK = 1 67EVAS_BUTTON_DOUBLE_CLICK = 1
diff --git a/evas/evas.c_evas_canvas_callbacks.pxi b/evas/evas.c_evas_canvas_callbacks.pxi
index a40ed77..ad6f0f3 100644
--- a/evas/evas.c_evas_canvas_callbacks.pxi
+++ b/evas/evas.c_evas_canvas_callbacks.pxi
@@ -161,9 +161,27 @@ cdef void cb_canvas_canvas_object_focus_out(void *data, Evas *e, void *e_inf) wi
161 cb_canvas_dispatcher(<Canvas>data, o, EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_OUT) 161 cb_canvas_dispatcher(<Canvas>data, o, EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_OUT)
162 162
163 163
164cdef void cb_canvas_image_unloaded(void *data, Evas *e, void *e_inf) with gil:
165 cdef Evas_Object *obj = <Evas_Object*>e_inf
166 o = Object_from_instance(obj)
167 cb_canvas_dispatcher(<Canvas>data, o, EVAS_CALLBACK_IMAGE_UNLOADED)
168
169
170cdef void cb_canvas_render_pre(void *data, Evas *e, void *e_inf) with gil:
171 cdef Evas_Object *obj = <Evas_Object*>e_inf
172 o = Object_from_instance(obj)
173 cb_canvas_dispatcher(<Canvas>data, o, EVAS_CALLBACK_RENDER_PRE)
174
175
176cdef void cb_canvas_render_post(void *data, Evas *e, void *e_inf) with gil:
177 cdef Evas_Object *obj = <Evas_Object*>e_inf
178 o = Object_from_instance(obj)
179 cb_canvas_dispatcher(<Canvas>data, o, EVAS_CALLBACK_RENDER_POST)
180
181
164cdef int evas_canvas_event_callbacks_len 182cdef int evas_canvas_event_callbacks_len
165cdef Evas_Event_Cb evas_canvas_event_callbacks[30] 183cdef Evas_Event_Cb evas_canvas_event_callbacks[32]
166evas_canvas_event_callbacks_len = 30 184evas_canvas_event_callbacks_len = 32
167evas_canvas_event_callbacks[EVAS_CALLBACK_MOUSE_IN] = cb_canvas_mouse_in 185evas_canvas_event_callbacks[EVAS_CALLBACK_MOUSE_IN] = cb_canvas_mouse_in
168evas_canvas_event_callbacks[EVAS_CALLBACK_MOUSE_OUT] = cb_canvas_mouse_out 186evas_canvas_event_callbacks[EVAS_CALLBACK_MOUSE_OUT] = cb_canvas_mouse_out
169evas_canvas_event_callbacks[EVAS_CALLBACK_MOUSE_DOWN] = cb_canvas_mouse_down 187evas_canvas_event_callbacks[EVAS_CALLBACK_MOUSE_DOWN] = cb_canvas_mouse_down
@@ -193,6 +211,6 @@ evas_canvas_event_callbacks[EVAS_CALLBACK_RENDER_FLUSH_PRE] = cb_canvas_render_f
193evas_canvas_event_callbacks[EVAS_CALLBACK_RENDER_FLUSH_POST] = cb_canvas_render_flush_post 211evas_canvas_event_callbacks[EVAS_CALLBACK_RENDER_FLUSH_POST] = cb_canvas_render_flush_post
194evas_canvas_event_callbacks[EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_IN] = cb_canvas_canvas_object_focus_in 212evas_canvas_event_callbacks[EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_IN] = cb_canvas_canvas_object_focus_in
195evas_canvas_event_callbacks[EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_OUT] = cb_canvas_canvas_object_focus_out 213evas_canvas_event_callbacks[EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_OUT] = cb_canvas_canvas_object_focus_out
196 214evas_canvas_event_callbacks[EVAS_CALLBACK_IMAGE_UNLOADED] = cb_canvas_image_unloaded
197## I just made it compile again. It's someone else job to make this work in python-evas... 215evas_canvas_event_callbacks[EVAS_CALLBACK_RENDER_PRE] = cb_canvas_render_pre
198#evas_canvas_event_callbacks[EVAS_CALLBACK_IMAGE_UNLOADED] = cb_canvas_image_unloaded 216evas_canvas_event_callbacks[EVAS_CALLBACK_RENDER_POST] = cb_canvas_render_post
diff --git a/evas/evas.c_evas_object_callbacks.pxi b/evas/evas.c_evas_object_callbacks.pxi
index 8bf1b95..ced0081 100644
--- a/evas/evas.c_evas_object_callbacks.pxi
+++ b/evas/evas.c_evas_object_callbacks.pxi
@@ -230,10 +230,22 @@ cdef void cb_object_canvas_object_focus_out(void *data, Evas *e,
230 Evas_Object *obj, void *e_inf) with gil: 230 Evas_Object *obj, void *e_inf) with gil:
231 print "EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_OUT is not supported by object." 231 print "EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_OUT is not supported by object."
232 232
233cdef void cb_object_image_unloaded(void *data, Evas *e,
234 Evas_Object *obj, void *e_inf) with gil:
235 print "EVAS_CALLBACK_IMAGE_UNLOADED is not supported by object."
236
237cdef void cb_object_render_pre(void *data, Evas *e,
238 Evas_Object *obj, void *e_inf) with gil:
239 print "EVAS_CALLBACK_RENDER_PRE is not supported by object."
240
241cdef void cb_object_render_post(void *data, Evas *e,
242 Evas_Object *obj, void *e_inf) with gil:
243 print "EVAS_CALLBACK_RENDER_POST is not supported by object."
244
233 245
234cdef int evas_object_event_callbacks_len 246cdef int evas_object_event_callbacks_len
235cdef Evas_Object_Event_Cb evas_object_event_callbacks[30] 247cdef Evas_Object_Event_Cb evas_object_event_callbacks[32]
236evas_object_event_callbacks_len = 30 248evas_object_event_callbacks_len = 32
237evas_object_event_callbacks[EVAS_CALLBACK_MOUSE_IN] = cb_object_mouse_in 249evas_object_event_callbacks[EVAS_CALLBACK_MOUSE_IN] = cb_object_mouse_in
238evas_object_event_callbacks[EVAS_CALLBACK_MOUSE_OUT] = cb_object_mouse_out 250evas_object_event_callbacks[EVAS_CALLBACK_MOUSE_OUT] = cb_object_mouse_out
239evas_object_event_callbacks[EVAS_CALLBACK_MOUSE_DOWN] = cb_object_mouse_down 251evas_object_event_callbacks[EVAS_CALLBACK_MOUSE_DOWN] = cb_object_mouse_down
@@ -263,5 +275,6 @@ evas_object_event_callbacks[EVAS_CALLBACK_RENDER_FLUSH_PRE] = cb_object_render_f
263evas_object_event_callbacks[EVAS_CALLBACK_RENDER_FLUSH_POST] = cb_object_render_flush_post 275evas_object_event_callbacks[EVAS_CALLBACK_RENDER_FLUSH_POST] = cb_object_render_flush_post
264evas_object_event_callbacks[EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_IN] = cb_object_canvas_object_focus_in 276evas_object_event_callbacks[EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_IN] = cb_object_canvas_object_focus_in
265evas_object_event_callbacks[EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_OUT] = cb_object_canvas_object_focus_out 277evas_object_event_callbacks[EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_OUT] = cb_object_canvas_object_focus_out
266## I just made it compile, it's someone else job to support this in python-evas... 278evas_canvas_event_callbacks[EVAS_CALLBACK_IMAGE_UNLOADED] = cb_canvas_image_unloaded
267#evas_object_event_callbacks[EVAS_CALLBACK_IMAGE_UNLOADED] = cb_object_image_unloaded 279evas_canvas_event_callbacks[EVAS_CALLBACK_RENDER_PRE] = cb_canvas_render_pre
280evas_canvas_event_callbacks[EVAS_CALLBACK_RENDER_POST] = cb_canvas_render_post
diff --git a/include/evas/c_evas.pxd b/include/evas/c_evas.pxd
index e9f76a9..9f336cd 100644
--- a/include/evas/c_evas.pxd
+++ b/include/evas/c_evas.pxd
@@ -74,6 +74,10 @@ cdef extern from "Evas.h":
74 cdef int EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_IN 74 cdef int EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_IN
75 cdef int EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_OUT 75 cdef int EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_OUT
76 cdef int EVAS_CALLBACK_LAST 76 cdef int EVAS_CALLBACK_LAST
77 cdef int EVAS_CALLBACK_IMAGE_UNLOADED
78 cdef int EVAS_CALLBACK_RENDER_PRE
79 cdef int EVAS_CALLBACK_RENDER_POST
80
77 81
78 ctypedef enum Evas_Pixel_Format: 82 ctypedef enum Evas_Pixel_Format:
79 EVAS_PIXEL_FORMAT_NONE = 0 83 EVAS_PIXEL_FORMAT_NONE = 0