summaryrefslogtreecommitdiff
path: root/examples/elementary/test_win.py
diff options
context:
space:
mode:
authordavemds <dave@gurumeditation.it>2013-03-31 16:37:53 +0200
committerdavemds <dave@gurumeditation.it>2013-03-31 16:37:53 +0200
commit54bda657e011f86ef64d07b0afb99a98b36a40bc (patch)
tree677e6458800cd7de3aa186fcc1164df59a9d216c /examples/elementary/test_win.py
parentd5682ff7e052f0b9cee29d86a1a36555d4d13429 (diff)
Python-EFL: add a test for Window.fullscreen prop
Diffstat (limited to 'examples/elementary/test_win.py')
-rw-r--r--examples/elementary/test_win.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/examples/elementary/test_win.py b/examples/elementary/test_win.py
index 5f68bbf..d1527af 100644
--- a/examples/elementary/test_win.py
+++ b/examples/elementary/test_win.py
@@ -15,11 +15,16 @@ from efl.elementary.slider import Slider
15 15
16def cb_alpha(bt, win, bg, on): 16def cb_alpha(bt, win, bg, on):
17 win.alpha = on 17 win.alpha = on
18 print("alpha: %s" % win.alpha)
18 if on: 19 if on:
19 bg.hide() 20 bg.hide()
20 else: 21 else:
21 bg.show() 22 bg.show()
22 23
24def cb_fullscreen(bt, win, fs):
25 win.fullscreen = fs
26 print("fullscreen: %s" % win.fullscreen)
27
23def cb_rot(bt, win, ck, rot): 28def cb_rot(bt, win, ck, rot):
24 if ck.state: 29 if ck.state:
25 win.rotation_with_resize_set(rot) 30 win.rotation_with_resize_set(rot)
@@ -65,6 +70,15 @@ def window_states_clicked(obj):
65 hbox.pack_end(bt) 70 hbox.pack_end(bt)
66 bt.show() 71 bt.show()
67 72
73 for state in [True, False]:
74 bt = Button(win)
75 bt.text = "FS " + ("On" if state else "Off")
76 bt.size_hint_align = (evas.EVAS_HINT_FILL, 0.0)
77 bt.size_hint_weight = (evas.EVAS_HINT_EXPAND, 0.0)
78 bt.callback_clicked_add(cb_fullscreen, win, state)
79 hbox.pack_end(bt)
80 bt.show()
81
68 sl = Slider(win) 82 sl = Slider(win)
69 sl.text = "Visual test" 83 sl.text = "Visual test"
70 sl.indicator_format = "%3.0f" 84 sl.indicator_format = "%3.0f"