aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorDave Andreoli <dave@gurumeditation.it>2015-08-03 14:09:36 +0200
committerDave Andreoli <dave@gurumeditation.it>2015-08-03 14:09:36 +0200
commit97dadf30da441d91ba46389c9f8b711ad611aca6 (patch)
treef8c40b5efc60f107499235e932cdb905e578a251 /examples
parentFix build on OSX (diff)
downloadpython-efl-97dadf30da441d91ba46389c9f8b711ad611aca6.tar.gz
New 1.15 API: EVAS_CALLBACK_CANVAS_VIEWPORT_RESIZE, with test
Also fixed EVAS_CALLBACK_AXIS_UPDATE that was half implemented
Diffstat (limited to 'examples')
-rw-r--r--examples/elementary/test_core_evas_canvas_callbacks.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/examples/elementary/test_core_evas_canvas_callbacks.py b/examples/elementary/test_core_evas_canvas_callbacks.py
index add53ae..e2f418c 100644
--- a/examples/elementary/test_core_evas_canvas_callbacks.py
+++ b/examples/elementary/test_core_evas_canvas_callbacks.py
@@ -7,6 +7,7 @@ from efl.evas import EVAS_HINT_EXPAND, EVAS_HINT_FILL, EXPAND_BOTH, FILL_BOTH, \
EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_IN, \
EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_OUT, \
EVAS_CALLBACK_RENDER_FLUSH_PRE, EVAS_CALLBACK_RENDER_FLUSH_POST, \
+ EVAS_CALLBACK_CANVAS_VIEWPORT_RESIZE, \
Text, Rectangle
# edje is imported because the canvas callbacks point to an edje obj,
@@ -30,6 +31,7 @@ def btn_del_cbs_cb(button):
canvas.event_callback_del(EVAS_CALLBACK_RENDER_FLUSH_POST, events_cb1)
canvas.event_callback_del(EVAS_CALLBACK_RENDER_PRE, events_cb1)
canvas.event_callback_del(EVAS_CALLBACK_RENDER_POST, events_cb1)
+ canvas.event_callback_del(EVAS_CALLBACK_CANVAS_VIEWPORT_RESIZE, events_cb1)
def events_cb1(rect, event_name):
@@ -70,6 +72,9 @@ def core_evas_canvas_callbacks_clicked(obj, item=None):
canvas.event_callback_add(EVAS_CALLBACK_RENDER_POST,
events_cb1, "EVAS_CALLBACK_RENDER_POST")
+ canvas.event_callback_add(EVAS_CALLBACK_CANVAS_VIEWPORT_RESIZE,
+ events_cb1, "EVAS_CALLBACK_CANVAS_VIEWPORT_RESIZE")
+
r2 = Rectangle(win.evas, size=(120,70), color=(0,100,0,100), pos=(70,70))
r2.show()