davemds pushed a commit to branch master.

http://git.enlightenment.org/bindings/python/python-efl.git/commit/?id=f8e87104124eadd060fed5f9a710347647a297af

commit f8e87104124eadd060fed5f9a710347647a297af
Author: davemds <[email protected]>
Date:   Sun May 4 15:52:53 2014 +0200

    New Configuration properties.
    
    * Configuration.focus_highlight_clip_disabled
    * Configuration.focus_move_policy
    * Configuration.focus_on_selection
---
 efl/elementary/configuration.pxd | 10 ++++++-
 efl/elementary/configuration.pyx | 63 ++++++++++++++++++++++++++++++++++++++++
 efl/elementary/enums.pxd         |  4 +++
 efl/elementary/object.pyx        | 20 +++++++++++++
 4 files changed, 96 insertions(+), 1 deletion(-)

diff --git a/efl/elementary/configuration.pxd b/efl/elementary/configuration.pxd
index 890d3b9..4c292a6 100644
--- a/efl/elementary/configuration.pxd
+++ b/efl/elementary/configuration.pxd
@@ -1,5 +1,5 @@
 from efl.evas cimport Eina_Bool, Eina_List, Evas_Coord, Evas_Font_Size
-from enums cimport Elm_Softcursor_Mode
+from enums cimport Elm_Softcursor_Mode, Elm_Focus_Move_Policy
 
 cdef extern from "Elementary.h":
     ctypedef struct Elm_Font_Overlay:
@@ -111,6 +111,14 @@ cdef extern from "Elementary.h":
     void                    elm_config_focus_highlight_enabled_set(Eina_Bool 
enable)
     Eina_Bool               elm_config_focus_highlight_animate_get()
     void                    elm_config_focus_highlight_animate_set(Eina_Bool 
animate)
+    Eina_Bool               elm_config_focus_highlight_clip_disabled_get()
+    void                    
elm_config_focus_highlight_clip_disabled_set(Eina_Bool disabled)
+    Elm_Focus_Move_Policy   elm_config_focus_move_policy_get()
+    void                    
elm_config_focus_move_policy_set(Elm_Focus_Move_Policy policy)
+    Eina_Bool               elm_config_item_focus_on_selection_get()
+    void                    elm_config_item_focus_on_selection_set(Eina_Bool 
enabled)
+
+
     Eina_Bool               elm_config_mirrored_get()
     void                    elm_config_mirrored_set(Eina_Bool mirrored)
 
diff --git a/efl/elementary/configuration.pyx b/efl/elementary/configuration.pyx
index 1fe10b3..9de76a2 100644
--- a/efl/elementary/configuration.pyx
+++ b/efl/elementary/configuration.pyx
@@ -844,6 +844,54 @@ cdef class Configuration(object):
         def __set__(self, bint animate):
             elm_config_focus_highlight_animate_set(animate)
 
+    property focus_highlight_clip_disabled:
+        """Whether the focus highlight clip feature is disabled.
+
+        If disabled return True, else return False.
+        If focus highlight clip feature is not disabled the focus highlight
+        can be clipped.
+
+        :type: bool
+
+        .. versionadded:: 1.10
+
+        """
+        def __get__(self):
+            return bool(elm_config_focus_highlight_clip_disabled_get())
+        def __set__(self, bint disabled):
+            elm_config_focus_highlight_clip_disabled_set(disabled)
+
+    property focus_move_policy:
+        """The focus movement policy.
+
+        How the focus is moved to another object. It can be
+        ELM_FOCUS_MOVE_POLICY_CLICK or ELM_FOCUS_MOVE_POLICY_IN. The first
+        means elementary focus is moved on elementary object click. The
+        second means elementary focus is moved on elementary object mouse in.
+
+        :type: Elm_Focus_Move_Policy
+
+        .. versionadded:: 1.10
+
+        """
+        def __get__(self):
+            return elm_config_focus_move_policy_get()
+        def __set__(self, policy):
+            elm_config_focus_move_policy_set(policy)
+
+    property focus_on_selection:
+        """Elementary item focus on selection.
+
+        :type: bool
+
+        .. versionadded:: 1.10
+
+        """
+        def __get__(self):
+            return bool(elm_config_item_focus_on_selection_get())
+        def __set__(self, bint enabled):
+            elm_config_item_focus_on_selection_set(enabled)
+
     property mirrored:
         """Get the system mirrored mode. This determines the default
         mirrored mode of widgets.
@@ -936,6 +984,21 @@ def focus_highlight_animate_get():
 def focus_highlight_animate_set(animate):
     elm_config_focus_highlight_animate_set(animate)
 
+def focus_highlight_clip_disabled_get():
+    return elm_config_focus_highlight_clip_disabled_get()
+def focus_highlight_clip_disabled_set(disabled):
+    elm_config_focus_highlight_clip_disabled_set(disabled)
+
+def focus_move_policy_get():
+    return elm_config_focus_move_policy_get()
+def focus_move_policy_set(policy):
+    elm_config_focus_move_policy_set(policy)
+
+def item_focus_on_selection_get():
+    return elm_config_item_focus_on_selection_get()
+def item_focus_on_selection_set(enabled):
+    elm_config_item_focus_on_selection_set(enabled)
+
 def preferred_engine_get():
     return _ctouni(elm_config_preferred_engine_get())
 def preferred_engine_set(engine):
diff --git a/efl/elementary/enums.pxd b/efl/elementary/enums.pxd
index 1983a05..de15cd7 100644
--- a/efl/elementary/enums.pxd
+++ b/efl/elementary/enums.pxd
@@ -161,6 +161,10 @@ cdef extern from "Elementary.h":
         ELM_FOCUS_RIGHT
         ELM_FOCUS_LEFT
 
+    ctypedef enum Elm_Focus_Move_Policy:
+        ELM_FOCUS_MOVE_POLICY_CLICK
+        ELM_FOCUS_MOVE_POLICY_IN
+
     ctypedef enum Elm_Genlist_Item_Type:
         ELM_GENLIST_ITEM_NONE
         ELM_GENLIST_ITEM_TREE
diff --git a/efl/elementary/object.pyx b/efl/elementary/object.pyx
index 8ceca49..6604b09 100644
--- a/efl/elementary/object.pyx
+++ b/efl/elementary/object.pyx
@@ -102,6 +102,23 @@ Focus direction
 
     .. versionadded:: 1.8.1
 
+.. _Elm_Focus_Move_Policy
+
+Focus move policy
+=================
+
+.. data:: ELM_FOCUS_MOVE_POLICY_CLICK
+
+    Give focus to object when they are clicked
+
+    .. versionadded:: 1.10
+
+.. data:: ELM_FOCUS_MOVE_POLICY_IN
+
+    Give focus to object on mouse-in
+
+    .. versionadded:: 1.10
+
 .. _Elm_Input_Event_Type:
 
 Input event types
@@ -249,6 +266,9 @@ ELM_FOCUS_DOWN = enums.ELM_FOCUS_DOWN
 ELM_FOCUS_RIGHT = enums.ELM_FOCUS_RIGHT
 ELM_FOCUS_LEFT = enums.ELM_FOCUS_LEFT
 
+ELM_FOCUS_MOVE_POLICY_CLICK = enums.ELM_FOCUS_MOVE_POLICY_CLICK
+ELM_FOCUS_MOVE_POLICY_IN = enums.ELM_FOCUS_MOVE_POLICY_IN
+
 EVAS_CALLBACK_KEY_DOWN = evasenums.EVAS_CALLBACK_KEY_DOWN
 EVAS_CALLBACK_KEY_UP = evasenums.EVAS_CALLBACK_KEY_UP
 EVAS_CALLBACK_MOUSE_WHEEL = evasenums.EVAS_CALLBACK_MOUSE_WHEEL

-- 


Reply via email to