parent
79979d9d2d
commit
3d31901da7
|
@ -1334,6 +1334,30 @@ cdef class Window(Object):
|
||||||
def floating_mode_get(self):
|
def floating_mode_get(self):
|
||||||
return bool(elm_win_floating_mode_get(self.obj))
|
return bool(elm_win_floating_mode_get(self.obj))
|
||||||
|
|
||||||
|
property noblank:
|
||||||
|
"""The noblank property of a window.
|
||||||
|
|
||||||
|
The "noblank" property is a way to request the display on which the
|
||||||
|
window is shown does not blank, screensaver or otherwise hide or
|
||||||
|
obscure the window. It is intended for uses such as media playback on a
|
||||||
|
television where a user may not want to be interrupted by an idle
|
||||||
|
screen. The noblank property may have no effect if the window is
|
||||||
|
iconified/minimized or hidden.
|
||||||
|
|
||||||
|
:type: bool
|
||||||
|
|
||||||
|
.. versionadded:: 1.18
|
||||||
|
|
||||||
|
"""
|
||||||
|
def __get__(self):
|
||||||
|
return bool(elm_win_noblank_get(self.obj))
|
||||||
|
def __set__(self, bint noblank):
|
||||||
|
elm_win_noblank_set(self.obj, noblank)
|
||||||
|
|
||||||
|
def noblank_set(self, bint noblank):
|
||||||
|
elm_win_noblank_set(self.obj, noblank)
|
||||||
|
def noblank_get(self):
|
||||||
|
return bool(elm_win_noblank_get(self.obj))
|
||||||
|
|
||||||
def callback_delete_request_add(self, func, *args, **kwargs):
|
def callback_delete_request_add(self, func, *args, **kwargs):
|
||||||
"""The user requested to close the window. See :py:attr:`autodel`."""
|
"""The user requested to close the window. See :py:attr:`autodel`."""
|
||||||
|
|
|
@ -186,5 +186,8 @@ cdef extern from "Elementary.h":
|
||||||
void elm_win_floating_mode_set(Evas_Object *obj, Eina_Bool floating)
|
void elm_win_floating_mode_set(Evas_Object *obj, Eina_Bool floating)
|
||||||
Eina_Bool elm_win_floating_mode_get(const Evas_Object *obj)
|
Eina_Bool elm_win_floating_mode_get(const Evas_Object *obj)
|
||||||
|
|
||||||
|
Eina_Bool elm_win_noblank_get(const Evas_Object *obj)
|
||||||
|
void elm_win_noblank_set(Evas_Object *obj, Eina_Bool noblank)
|
||||||
|
|
||||||
# X specific call - won't work on non-x engines (return 0)
|
# X specific call - won't work on non-x engines (return 0)
|
||||||
unsigned int elm_win_xwindow_get(const Evas_Object *obj)
|
unsigned int elm_win_xwindow_get(const Evas_Object *obj)
|
||||||
|
|
|
@ -35,6 +35,10 @@ def cb_iconify_and_deiconify(bt, win):
|
||||||
def cb_win_moved(win):
|
def cb_win_moved(win):
|
||||||
print("MOVE - win geom: x %d, y %d, w %d, h %d" % win.geometry)
|
print("MOVE - win geom: x %d, y %d, w %d, h %d" % win.geometry)
|
||||||
|
|
||||||
|
def set_and_report(win, prop, val):
|
||||||
|
setattr(win, prop, val)
|
||||||
|
print("Property: '%s' is now: '%s'" % (prop, getattr(win, prop)))
|
||||||
|
|
||||||
def window_states_clicked(obj):
|
def window_states_clicked(obj):
|
||||||
win = Window("window-states", ELM_WIN_BASIC, autodel=True,
|
win = Window("window-states", ELM_WIN_BASIC, autodel=True,
|
||||||
title="Window States test", size=(280, 400))
|
title="Window States test", size=(280, 400))
|
||||||
|
@ -114,12 +118,17 @@ def window_states_clicked(obj):
|
||||||
ck.show()
|
ck.show()
|
||||||
|
|
||||||
ck = Check(win, text="Borderless")
|
ck = Check(win, text="Borderless")
|
||||||
ck.callback_changed_add(lambda c: win.borderless_set(c.state))
|
ck.callback_changed_add(lambda c: set_and_report(win, 'borderless', c.state))
|
||||||
hbox.pack_end(ck)
|
hbox.pack_end(ck)
|
||||||
ck.show()
|
ck.show()
|
||||||
|
|
||||||
ck = Check(win, text="Fullscreen")
|
ck = Check(win, text="Fullscreen")
|
||||||
ck.callback_changed_add(lambda c: win.fullscreen_set(c.state))
|
ck.callback_changed_add(lambda c: set_and_report(win, 'fullscreen', c.state))
|
||||||
|
hbox.pack_end(ck)
|
||||||
|
ck.show()
|
||||||
|
|
||||||
|
ck = Check(win, text="NoBlank")
|
||||||
|
ck.callback_changed_add(lambda c: set_and_report(win, 'noblank', c.state))
|
||||||
hbox.pack_end(ck)
|
hbox.pack_end(ck)
|
||||||
ck.show()
|
ck.show()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue