New 1.16 API: Elm.Object.focus_region_show_mode

This commit is contained in:
Davide Andreoli 2015-11-14 16:37:20 +01:00
parent 435e57ca44
commit ed5f93850f
3 changed files with 49 additions and 0 deletions

View File

@ -137,6 +137,24 @@ Focus autoscroll mode
.. versionadded:: 1.10
.. _Elm_Focus_Region_Show_Mode:
Focus region show mode
----------------------
.. data:: ELM_FOCUS_REGION_SHOW_WIDGET
as a widget
.. versionadded:: 1.16
.. data:: ELM_FOCUS_REGION_SHOW_ITEM
as an item
.. versionadded:: 1.16
.. _Elm_Input_Event_Type:
Input event types

View File

@ -943,6 +943,29 @@ cdef class Object(SmartObject):
def focus_move_policy_set(self, Elm_Focus_Move_Policy policy):
elm_object_focus_move_policy_set(self.obj, policy)
property focus_region_show_mode:
"""The focus movement policy for the object.
When the focus is move to the object in scroller, it is scrolled to
show the focus region as a widget. If the focus region want to be shown
as an item, set the mode ELM_FOCUS_REGION_SHOW_ITEM. If then, it will
be scrolled as an item.
:type: :ref:`Elm_Focus_Region_Show_Mode`
.. versionadded:: 1.16
"""
def __get__(self):
return elm_object_focus_region_show_mode_get(self.obj)
def __set__(self, Elm_Focus_Region_Show_Mode mode):
elm_object_focus_region_show_mode_set(self.obj, mode)
def focus_region_show_mode_get(self):
return elm_object_focus_region_show_mode_get(self.obj)
def focus_region_show_mode_set(self, Elm_Focus_Region_Show_Mode mode):
elm_object_focus_region_show_mode_set(self.obj, mode)
#
# Mirroring

View File

@ -39,6 +39,12 @@ cdef extern from "Elementary.h":
ctypedef enum Elm_Focus_Move_Policy:
pass
cpdef enum Elm_Focus_Region_Show_Mode:
ELM_FOCUS_REGION_SHOW_WIDGET
ELM_FOCUS_REGION_SHOW_ITEM
ctypedef enum Elm_Focus_Region_Show_Mode:
pass
cpdef enum Elm_Focus_Autoscroll_Mode:
ELM_FOCUS_AUTOSCROLL_MODE_SHOW
ELM_FOCUS_AUTOSCROLL_MODE_NONE
@ -173,6 +179,8 @@ cdef extern from "Elementary.h":
Elm_Object_Item * elm_object_focused_item_get(const Evas_Object *obj)
void elm_object_focus_move_policy_set(Evas_Object *obj, Elm_Focus_Move_Policy policy)
Elm_Focus_Move_Policy elm_object_focus_move_policy_get(Evas_Object *obj)
void elm_object_focus_region_show_mode_set(Evas_Object *obj, Elm_Focus_Region_Show_Mode mode)
Elm_Focus_Region_Show_Mode elm_object_focus_region_show_mode_get(const Evas_Object *obj)
# Object - Mirroring (elm_mirroring.h)
Eina_Bool elm_object_mirrored_get(const Evas_Object *obj)