summaryrefslogtreecommitdiff
path: root/examples/elementary/test_win.py
diff options
context:
space:
mode:
authorDave Andreoli <dave@gurumeditation.it>2016-08-13 15:18:26 +0200
committerDave Andreoli <dave@gurumeditation.it>2016-08-13 15:18:26 +0200
commit3d31901da738f0f969c0cffc3429cd11f160ba34 (patch)
treeaa9e1986c3d4f358e15f868e7c03362bba4af436 /examples/elementary/test_win.py
parent79979d9d2da86175e6331e565473116d65c230e4 (diff)
new 1.18 API: elm.Window.noblank
with test
Diffstat (limited to 'examples/elementary/test_win.py')
-rw-r--r--examples/elementary/test_win.py13
1 files changed, 11 insertions, 2 deletions
diff --git a/examples/elementary/test_win.py b/examples/elementary/test_win.py
index 89396f7..8dba282 100644
--- a/examples/elementary/test_win.py
+++ b/examples/elementary/test_win.py
@@ -35,6 +35,10 @@ def cb_iconify_and_deiconify(bt, win):
35def cb_win_moved(win): 35def cb_win_moved(win):
36 print("MOVE - win geom: x %d, y %d, w %d, h %d" % win.geometry) 36 print("MOVE - win geom: x %d, y %d, w %d, h %d" % win.geometry)
37 37
38def set_and_report(win, prop, val):
39 setattr(win, prop, val)
40 print("Property: '%s' is now: '%s'" % (prop, getattr(win, prop)))
41
38def window_states_clicked(obj): 42def window_states_clicked(obj):
39 win = Window("window-states", ELM_WIN_BASIC, autodel=True, 43 win = Window("window-states", ELM_WIN_BASIC, autodel=True,
40 title="Window States test", size=(280, 400)) 44 title="Window States test", size=(280, 400))
@@ -114,12 +118,17 @@ def window_states_clicked(obj):
114 ck.show() 118 ck.show()
115 119
116 ck = Check(win, text="Borderless") 120 ck = Check(win, text="Borderless")
117 ck.callback_changed_add(lambda c: win.borderless_set(c.state)) 121 ck.callback_changed_add(lambda c: set_and_report(win, 'borderless', c.state))
118 hbox.pack_end(ck) 122 hbox.pack_end(ck)
119 ck.show() 123 ck.show()
120 124
121 ck = Check(win, text="Fullscreen") 125 ck = Check(win, text="Fullscreen")
122 ck.callback_changed_add(lambda c: win.fullscreen_set(c.state)) 126 ck.callback_changed_add(lambda c: set_and_report(win, 'fullscreen', c.state))
127 hbox.pack_end(ck)
128 ck.show()
129
130 ck = Check(win, text="NoBlank")
131 ck.callback_changed_add(lambda c: set_and_report(win, 'noblank', c.state))
123 hbox.pack_end(ck) 132 hbox.pack_end(ck)
124 ck.show() 133 ck.show()
125 134