summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGustavo Sverzut Barbieri <barbieri@gmail.com>2012-01-19 14:42:03 +0000
committerGustavo Sverzut Barbieri <barbieri@gmail.com>2012-01-19 14:42:03 +0000
commit4d4d3762c335ef84f2899a8ae5351f834fbac7e8 (patch)
treeadda7270213bf845649c9aca6623dfcdc733feec
parent3f7bd8596224878074b85a4a2a41fd6457e27036 (diff)
python-evas: fix buildbot warnings.
yay! buildbot spotted a nice error showing unused functions, it was not using them because it was using the wrong functions (canvas instead of object). At the end the IMAGE_UNLOADED is also an object method, not a canvas one. also fix some stupid warning at evas_object_image_rotate.c, gcc is stupid enough to not notice src_alpha is just used if has_alpha is defined (I guess llvm will catch this "fix" as a warning!) SVN revision: 67344
-rw-r--r--evas/evas.c_evas_canvas_callbacks.pxi4
-rw-r--r--evas/evas.c_evas_object_callbacks.pxi16
-rw-r--r--evas/evas.c_evas_object_image.pxi8
-rw-r--r--evas/evas_object_image_rotate.c2
4 files changed, 18 insertions, 12 deletions
diff --git a/evas/evas.c_evas_canvas_callbacks.pxi b/evas/evas.c_evas_canvas_callbacks.pxi
index ad6f0f3..6d0c37a 100644
--- a/evas/evas.c_evas_canvas_callbacks.pxi
+++ b/evas/evas.c_evas_canvas_callbacks.pxi
@@ -162,9 +162,7 @@ cdef void cb_canvas_canvas_object_focus_out(void *data, Evas *e, void *e_inf) wi
162 162
163 163
164cdef void cb_canvas_image_unloaded(void *data, Evas *e, void *e_inf) with gil: 164cdef void cb_canvas_image_unloaded(void *data, Evas *e, void *e_inf) with gil:
165 cdef Evas_Object *obj = <Evas_Object*>e_inf 165 print "EVAS_CALLBACK_IMAGE_UNLOADED is not supported by canvas."
166 o = Object_from_instance(obj)
167 cb_canvas_dispatcher(<Canvas>data, o, EVAS_CALLBACK_IMAGE_UNLOADED)
168 166
169 167
170cdef void cb_canvas_render_pre(void *data, Evas *e, void *e_inf) with gil: 168cdef void cb_canvas_render_pre(void *data, Evas *e, void *e_inf) with gil:
diff --git a/evas/evas.c_evas_object_callbacks.pxi b/evas/evas.c_evas_object_callbacks.pxi
index ced0081..f2b39ef 100644
--- a/evas/evas.c_evas_object_callbacks.pxi
+++ b/evas/evas.c_evas_object_callbacks.pxi
@@ -232,14 +232,14 @@ cdef void cb_object_canvas_object_focus_out(void *data, Evas *e,
232 232
233cdef void cb_object_image_unloaded(void *data, Evas *e, 233cdef void cb_object_image_unloaded(void *data, Evas *e,
234 Evas_Object *obj, void *e_inf) with gil: 234 Evas_Object *obj, void *e_inf) with gil:
235 print "EVAS_CALLBACK_IMAGE_UNLOADED is not supported by object." 235 cb_object_dispatcher2(<Object>data, EVAS_CALLBACK_IMAGE_UNLOADED)
236 236
237cdef void cb_object_render_pre(void *data, Evas *e, 237cdef void cb_object_canvas_render_pre(void *data, Evas *e,
238 Evas_Object *obj, void *e_inf) with gil: 238 Evas_Object *obj, void *e_inf) with gil:
239 print "EVAS_CALLBACK_RENDER_PRE is not supported by object." 239 print "EVAS_CALLBACK_RENDER_PRE is not supported by object."
240 240
241cdef void cb_object_render_post(void *data, Evas *e, 241cdef void cb_object_canvas_render_post(void *data, Evas *e,
242 Evas_Object *obj, void *e_inf) with gil: 242 Evas_Object *obj, void *e_inf) with gil:
243 print "EVAS_CALLBACK_RENDER_POST is not supported by object." 243 print "EVAS_CALLBACK_RENDER_POST is not supported by object."
244 244
245 245
@@ -275,6 +275,6 @@ evas_object_event_callbacks[EVAS_CALLBACK_RENDER_FLUSH_PRE] = cb_object_render_f
275evas_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
276evas_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
277evas_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
278evas_canvas_event_callbacks[EVAS_CALLBACK_IMAGE_UNLOADED] = cb_canvas_image_unloaded 278evas_object_event_callbacks[EVAS_CALLBACK_IMAGE_UNLOADED] = cb_object_image_unloaded
279evas_canvas_event_callbacks[EVAS_CALLBACK_RENDER_PRE] = cb_canvas_render_pre 279evas_object_event_callbacks[EVAS_CALLBACK_RENDER_PRE] = cb_object_canvas_render_pre
280evas_canvas_event_callbacks[EVAS_CALLBACK_RENDER_POST] = cb_canvas_render_post 280evas_object_event_callbacks[EVAS_CALLBACK_RENDER_POST] = cb_object_canvas_render_post
diff --git a/evas/evas.c_evas_object_image.pxi b/evas/evas.c_evas_object_image.pxi
index 8226069..22fbae9 100644
--- a/evas/evas.c_evas_object_image.pxi
+++ b/evas/evas.c_evas_object_image.pxi
@@ -602,6 +602,14 @@ cdef public class Image(Object) [object PyEvasImage, type PyEvasImage_Type]:
602 "Same as event_callback_del(EVAS_CALLBACK_IMAGE_PRELOADED, ...)" 602 "Same as event_callback_del(EVAS_CALLBACK_IMAGE_PRELOADED, ...)"
603 self.event_callback_del(EVAS_CALLBACK_IMAGE_PRELOADED, func) 603 self.event_callback_del(EVAS_CALLBACK_IMAGE_PRELOADED, func)
604 604
605 def on_image_unloaded_add(self, func, *a, **k):
606 "Same as event_callback_add(EVAS_CALLBACK_IMAGE_UNLOADED, ...)"
607 self.event_callback_add(EVAS_CALLBACK_IMAGE_UNLOADED, func, *a, **k)
608
609 def on_image_unloaded_del(self, func):
610 "Same as event_callback_del(EVAS_CALLBACK_IMAGE_UNLOADED, ...)"
611 self.event_callback_del(EVAS_CALLBACK_IMAGE_UNLOADED, func)
612
605 613
606cdef extern from "Evas.h": # hack to force type to be known 614cdef extern from "Evas.h": # hack to force type to be known
607 cdef PyTypeObject PyEvasImage_Type # hack to install metaclass 615 cdef PyTypeObject PyEvasImage_Type # hack to install metaclass
diff --git a/evas/evas_object_image_rotate.c b/evas/evas_object_image_rotate.c
index 120dd08..060b6ea 100644
--- a/evas/evas_object_image_rotate.c
+++ b/evas/evas_object_image_rotate.c
@@ -352,7 +352,7 @@ _rgb565_image_rotate(Evas_Object_Image_Rotation rotation, DATA16 *dst, const DAT
352{ 352{
353 int dst_stride; 353 int dst_stride;
354 DATA8 *dst_alpha; 354 DATA8 *dst_alpha;
355 const DATA8 *src_alpha; 355 const DATA8 *src_alpha = NULL;
356 356
357 if (has_alpha) 357 if (has_alpha)
358 src_alpha = (const DATA8*)(src + src_stride * h); 358 src_alpha = (const DATA8*)(src + src_stride * h);