summaryrefslogtreecommitdiff
path: root/efl
diff options
context:
space:
mode:
authordavemds <dave@gurumeditation.it>2014-03-01 16:35:20 +0100
committerdavemds <dave@gurumeditation.it>2014-03-01 16:35:20 +0100
commitde154b7930e8bacee2b9b11d17733b1d504eddd4 (patch)
tree0b5d0262353442e2ed55993ce91af04ee58119cc /efl
parent9f6cf51f80535bba89651ca8f54f6ecbd1a69c15 (diff)
Python-EFL: New 1.9 API: Naviframe.title_enabled (title_visible deprecated)
Diffstat (limited to 'efl')
-rw-r--r--efl/elementary/naviframe.pxd2
-rw-r--r--efl/elementary/naviframe.pyx67
2 files changed, 67 insertions, 2 deletions
diff --git a/efl/elementary/naviframe.pxd b/efl/elementary/naviframe.pxd
index 1e2a3f9..94a4cad 100644
--- a/efl/elementary/naviframe.pxd
+++ b/efl/elementary/naviframe.pxd
@@ -18,6 +18,8 @@ cdef extern from "Elementary.h":
18 const_char * elm_naviframe_item_style_get(Elm_Object_Item *it) 18 const_char * elm_naviframe_item_style_get(Elm_Object_Item *it)
19 void elm_naviframe_item_title_visible_set(Elm_Object_Item *it, Eina_Bool visible) 19 void elm_naviframe_item_title_visible_set(Elm_Object_Item *it, Eina_Bool visible)
20 Eina_Bool elm_naviframe_item_title_visible_get(Elm_Object_Item *it) 20 Eina_Bool elm_naviframe_item_title_visible_get(Elm_Object_Item *it)
21 void elm_naviframe_item_title_enabled_set(Elm_Object_Item *it, Eina_Bool enabled, Eina_Bool transition)
22 Eina_Bool elm_naviframe_item_title_enabled_get(Elm_Object_Item *it)
21 void elm_naviframe_prev_btn_auto_pushed_set(Evas_Object *obj, Eina_Bool auto_pushed) 23 void elm_naviframe_prev_btn_auto_pushed_set(Evas_Object *obj, Eina_Bool auto_pushed)
22 Eina_Bool elm_naviframe_prev_btn_auto_pushed_get(Evas_Object *obj) 24 Eina_Bool elm_naviframe_prev_btn_auto_pushed_get(Evas_Object *obj)
23 Eina_List *elm_naviframe_items_get(Evas_Object *obj) 25 Eina_List *elm_naviframe_items_get(Evas_Object *obj)
diff --git a/efl/elementary/naviframe.pyx b/efl/elementary/naviframe.pyx
index 0fe5b4c..8c3c78b 100644
--- a/efl/elementary/naviframe.pyx
+++ b/efl/elementary/naviframe.pyx
@@ -70,8 +70,8 @@ them are supported:
70This widget emits the following signals, besides the ones sent from 70This widget emits the following signals, besides the ones sent from
71:py:class:`~efl.elementary.layout_class.LayoutClass`: 71:py:class:`~efl.elementary.layout_class.LayoutClass`:
72 72
73- ``transition,finished`` - When the transition is finished in changing the 73- ``transition,finished`` - When the transition is finished in changing the item
74 item 74- ``title,transition,finished`` - When the title area's transition is finished
75- ``title,clicked`` - User clicked title area 75- ``title,clicked`` - User clicked title area
76- ``focused`` - When the naviframe has received focus. (since 1.8) 76- ``focused`` - When the naviframe has received focus. (since 1.8)
77- ``unfocused`` - When the naviframe has lost focus. (since 1.8) 77- ``unfocused`` - When the naviframe has lost focus. (since 1.8)
@@ -334,6 +334,9 @@ cdef class NaviframeItem(ObjectItem):
334 334
335 :type: bool 335 :type: bool
336 336
337 .. deprecated:: 1.9
338 Use :py:attr:`title_enabled` instead.
339
337 """ 340 """
338 def __get__(self): 341 def __get__(self):
339 return bool(elm_naviframe_item_title_visible_get(self.item)) 342 return bool(elm_naviframe_item_title_visible_get(self.item))
@@ -341,11 +344,64 @@ cdef class NaviframeItem(ObjectItem):
341 def __set__(self, visible): 344 def __set__(self, visible):
342 elm_naviframe_item_title_visible_set(self.item, visible) 345 elm_naviframe_item_title_visible_set(self.item, visible)
343 346
347 @DEPRECATED("1.9", "Use :py:func:`title_enabled_set` instead.")
344 def title_visible_set(self, visible): 348 def title_visible_set(self, visible):
345 elm_naviframe_item_title_visible_set(self.item, visible) 349 elm_naviframe_item_title_visible_set(self.item, visible)
350 @DEPRECATED("1.9", "Use :py:func:`title_enabled_get` instead.")
346 def title_visible_get(self): 351 def title_visible_get(self):
347 return bool(elm_naviframe_item_title_visible_get(self.item)) 352 return bool(elm_naviframe_item_title_visible_get(self.item))
348 353
354 property title_enabled:
355 """Enable/Disable the title area and the transition effect.
356
357 When the title area is disabled, then the controls would be hidden so as
358 to expand the content area to full-size.
359
360 :type: getter: bool - setter: (bool, bool)
361
362 .. note:: This property is somehow strange, the setter and the getter
363 have different param numbers. The second param in the setter
364 choose if the title transition should be animated or not
365
366 .. seealso:: :py:func:`title_enabled_set` and :py:func:`title_enabled_set`
367
368 .. versionadded:: 1.9
369
370 """
371 def __get__(self):
372 return bool(elm_naviframe_item_title_enabled_get(self.item))
373
374 def __set__(self, value):
375 enabled, transition = value
376 elm_naviframe_item_title_enabled_set(self.item, enabled, transition)
377
378 def title_enabled_set(self, enabled, transition):
379 """title_enabled_set(self, enabled, transition)
380
381 Enable/Disable the title area with transition effect.
382
383 :param enabled: if `True`, title area will be visible, hidden otherwise.
384 :type enabled: bool
385 :param transition: if `True`, transition effect of the title will be visible.
386 :type transition: bool
387
388 .. versionadded:: 1.9
389
390 """
391 elm_naviframe_item_title_enabled_set(self.item, enabled, transition)
392
393 def title_enabled_get(self):
394 """title_enabled_get() -> bool
395
396 :return: `True` if the title is visible.
397 :rtype: bool
398
399 .. versionadded:: 1.9
400
401 """
402 return bool(elm_naviframe_item_title_enabled_get(self.item))
403
404
349cdef class Naviframe(LayoutClass): 405cdef class Naviframe(LayoutClass):
350 406
351 """This is the class that actually implements the widget.""" 407 """This is the class that actually implements the widget."""
@@ -511,6 +567,13 @@ cdef class Naviframe(LayoutClass):
511 def callback_transition_finished_del(self, func): 567 def callback_transition_finished_del(self, func):
512 self._callback_del("transition,finished", func) 568 self._callback_del("transition,finished", func)
513 569
570 def callback_title_transition_finished_add(self, func, *args, **kwargs):
571 """When the title transition is finished."""
572 self._callback_add("title,transition,finished", func, *args, **kwargs)
573
574 def callback_title_transition_finished_del(self, func):
575 self._callback_del("title,transition,finished", func)
576
514 def callback_title_clicked_add(self, func, *args, **kwargs): 577 def callback_title_clicked_add(self, func, *args, **kwargs):
515 """User clicked title area.""" 578 """User clicked title area."""
516 self._callback_add("title,clicked", func, *args, **kwargs) 579 self._callback_add("title,clicked", func, *args, **kwargs)