summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Andreoli <dave@gurumeditation.it>2015-08-03 18:16:26 +0200
committerDave Andreoli <dave@gurumeditation.it>2015-08-03 18:16:26 +0200
commit634c56d14ca142e46f9bcfc380aded081a5ef3be (patch)
tree3ef30fe1f7c43326b1f6cb0a56795351a0555bc7
parentf3b385890292fa315dd8a639c0b823b1484ea407 (diff)
New 1.15 API: Window.autohide
-rw-r--r--doc/elementary/elementary.rst6
-rw-r--r--efl/elementary/elementary_cdef.pxi1
-rw-r--r--efl/elementary/window.pxi29
-rw-r--r--efl/elementary/window_cdef.pxi2
4 files changed, 38 insertions, 0 deletions
diff --git a/doc/elementary/elementary.rst b/doc/elementary/elementary.rst
index 197ca59..6349fa0 100644
--- a/doc/elementary/elementary.rst
+++ b/doc/elementary/elementary.rst
@@ -115,6 +115,12 @@ Quit policy types
115 115
116 Quit when the application's last window is closed 116 Quit when the application's last window is closed
117 117
118.. data:: ELM_POLICY_QUIT_LAST_WINDOW_HIDDEN
119
120 Quit when the application's last window is hidden
121
122 .. versionadded:: 1.15
123
118 124
119.. _Elm_Policy_Exit: 125.. _Elm_Policy_Exit:
120 126
diff --git a/efl/elementary/elementary_cdef.pxi b/efl/elementary/elementary_cdef.pxi
index bc1a105..2e3c1cc 100644
--- a/efl/elementary/elementary_cdef.pxi
+++ b/efl/elementary/elementary_cdef.pxi
@@ -66,6 +66,7 @@ cdef extern from "Elementary.h":
66 cpdef enum Elm_Policy_Quit: 66 cpdef enum Elm_Policy_Quit:
67 ELM_POLICY_QUIT_NONE 67 ELM_POLICY_QUIT_NONE
68 ELM_POLICY_QUIT_LAST_WINDOW_CLOSED 68 ELM_POLICY_QUIT_LAST_WINDOW_CLOSED
69 ELM_POLICY_QUIT_LAST_WINDOW_HIDDEN
69 ctypedef enum Elm_Policy_Quit: 70 ctypedef enum Elm_Policy_Quit:
70 pass 71 pass
71 72
diff --git a/efl/elementary/window.pxi b/efl/elementary/window.pxi
index e57e84c..ae0665f 100644
--- a/efl/elementary/window.pxi
+++ b/efl/elementary/window.pxi
@@ -209,6 +209,35 @@ cdef class Window(Object):
209 def autodel_get(self): 209 def autodel_get(self):
210 return elm_win_autodel_get(self.obj) 210 return elm_win_autodel_get(self.obj)
211 211
212 property autohide:
213 """The window's autohide state.
214
215 This property works similarly to :func:`autodel`, automatically handling
216 "delete,request" signals when set to ``True``, with the difference
217 that it will hide the window, instead of destroying it.
218
219 It is specially designed to work together with
220 ELM_POLICY_QUIT_LAST_WINDOW_HIDDEN which allows exiting Elementary's
221 main loop when all the windows are hidden.
222
223 .. note:: :func:`autodel` and :func:`autohide` are not mutually exclusive.
224 The window will be deleted if both are set to ``True``.
225
226 :type: bool
227
228 .. versionadded:: 1.15
229
230 """
231 def __get__(self):
232 return elm_win_autohide_get(self.obj)
233 def __set__(self, autohide):
234 elm_win_autohide_set(self.obj, autohide)
235
236 def autohide_set(self, autohide):
237 elm_win_autohide_set(self.obj, autohide)
238 def autohide_get(self):
239 return elm_win_autohide_get(self.obj)
240
212 def activate(self): 241 def activate(self):
213 """Activate a window object. 242 """Activate a window object.
214 243
diff --git a/efl/elementary/window_cdef.pxi b/efl/elementary/window_cdef.pxi
index bc9caee..2485c46 100644
--- a/efl/elementary/window_cdef.pxi
+++ b/efl/elementary/window_cdef.pxi
@@ -81,6 +81,8 @@ cdef extern from "Elementary.h":
81 const Evas_Object *elm_win_icon_object_get(const Evas_Object*) 81 const Evas_Object *elm_win_icon_object_get(const Evas_Object*)
82 void elm_win_autodel_set(Evas_Object *obj, Eina_Bool autodel) 82 void elm_win_autodel_set(Evas_Object *obj, Eina_Bool autodel)
83 Eina_Bool elm_win_autodel_get(const Evas_Object *obj) 83 Eina_Bool elm_win_autodel_get(const Evas_Object *obj)
84 void elm_win_autohide_set(Evas_Object *obj, Eina_Bool autodel)
85 Eina_Bool elm_win_autohide_get(const Evas_Object *obj)
84 void elm_win_activate(Evas_Object *obj) 86 void elm_win_activate(Evas_Object *obj)
85 void elm_win_lower(Evas_Object *obj) 87 void elm_win_lower(Evas_Object *obj)
86 void elm_win_raise(Evas_Object *obj) 88 void elm_win_raise(Evas_Object *obj)