kuuko pushed a commit to branch master.

commit b7e0b00d9a7ed58f6859ee0fc3dc67740a89a96e
Author: Kai Huuhko <[email protected]>
Date:   Fri Apr 12 21:29:40 2013 +0000

    Elementary: Add missing API to Configuration.
---
 efl/elementary/configuration.pxd | 23 ++++++++--
 efl/elementary/configuration.pyx | 99 ++++++++++++++++++++++++++++++++++++++++
 efl/elementary/enums.pxd         |  5 ++
 3 files changed, 123 insertions(+), 4 deletions(-)

diff --git a/efl/elementary/configuration.pxd b/efl/elementary/configuration.pxd
index 8bed18b..4f0f668 100644
--- a/efl/elementary/configuration.pxd
+++ b/efl/elementary/configuration.pxd
@@ -1,29 +1,28 @@
 from efl.evas cimport Eina_Bool, Eina_List, const_Eina_List, Evas_Coord, 
Evas_Object, Evas_Font_Size
 from libc.string cimport const_char
+from enums cimport Elm_Softcursor_Mode
 
 cdef extern from "Elementary.h":
-
-    #font
     ctypedef struct Elm_Font_Overlay:
         const_char *text_class
         const_char *font
         Evas_Font_Size size
 
-    #text
     ctypedef struct Elm_Text_Class:
         const_char *name
         const_char *desc
 
-    # Config                (py3: TODO)
     Eina_Bool               elm_config_save()
     void                    elm_config_reload()
     void                    elm_config_all_flush()
+
     const_char *            elm_config_profile_get()
     const_char *            elm_config_profile_dir_get(const_char *profile, 
Eina_Bool is_user)
     void                    elm_config_profile_dir_free(const_char *p_dir)
     Eina_List *             elm_config_profile_list_get()
     void                    elm_config_profile_list_free(Eina_List *l)
     void                    elm_config_profile_set(const_char *profile)
+
     Eina_Bool               elm_config_scroll_bounce_enabled_get()
     void                    elm_config_scroll_bounce_enabled_set(Eina_Bool 
enabled)
     double                  elm_config_scroll_bounce_friction_get()
@@ -38,6 +37,8 @@ cdef extern from "Elementary.h":
     void                    
elm_config_scroll_thumbscroll_enabled_set(Eina_Bool enabled)
     unsigned int            elm_config_scroll_thumbscroll_threshold_get()
     void                    
elm_config_scroll_thumbscroll_threshold_set(unsigned int threshold)
+    unsigned int            elm_config_scroll_thumbscroll_hold_threshold_get()
+    void                    
elm_config_scroll_thumbscroll_hold_threshold_set(unsigned int threshold)
     double                  
elm_config_scroll_thumbscroll_momentum_threshold_get()
     void                    
elm_config_scroll_thumbscroll_momentum_threshold_set(double threshold)
     double                  elm_config_scroll_thumbscroll_friction_get()
@@ -46,30 +47,41 @@ cdef extern from "Elementary.h":
     void                    
elm_config_scroll_thumbscroll_border_friction_set(double friction)
     double                  
elm_config_scroll_thumbscroll_sensitivity_friction_get()
     void                    
elm_config_scroll_thumbscroll_sensitivity_friction_set(double friction)
+
     double                  elm_config_longpress_timeout_get()
     void                    elm_config_longpress_timeout_set(double 
longpress_timeout)
+    void                    elm_config_softcursor_mode_set(Elm_Softcursor_Mode 
mode)
+    Elm_Softcursor_Mode     elm_config_softcursor_mode_get()
     double                  elm_config_tooltip_delay_get()
     Eina_Bool               elm_config_tooltip_delay_set(double delay)
     int                     elm_config_cursor_engine_only_get()
     Eina_Bool               elm_config_cursor_engine_only_set(int engine_only)
     double                  elm_config_scale_get()
     void                    elm_config_scale_set(double scale)
+
     Eina_Bool               elm_config_password_show_last_get()
     void                    elm_config_password_show_last_set(Eina_Bool 
password_show_last)
     double                  elm_config_password_show_last_timeout_get()
     void                    elm_config_password_show_last_timeout_set(double 
password_show_last_timeout)
+
     const_char *            elm_config_engine_get()
     void                    elm_config_engine_set(const_char *engine)
     const_char *            elm_config_preferred_engine_get()
     void                    elm_config_preferred_engine_set(const_char *engine)
+
     Eina_List *             elm_config_text_classes_list_get()
     void                    elm_config_text_classes_list_free(Eina_List *list)
     Eina_List *             elm_config_font_overlay_list_get()
     void                    elm_config_font_overlay_set(const_char 
*text_class, const_char *font, Evas_Font_Size size)
+    Eina_Bool               elm_config_access_get()
+    void                    elm_config_access_set(Eina_Bool is_access)
+    Eina_Bool               elm_config_selection_unfocused_clear_get()
+    void                    elm_config_selection_unfocused_clear_set(Eina_Bool 
enabled)
     void                    elm_config_font_overlay_unset(const_char 
*text_class)
     void                    elm_config_font_overlay_apply()
     Evas_Coord              elm_config_finger_size_get()
     void                    elm_config_finger_size_set(Evas_Coord size)
+
     int                     elm_config_cache_flush_interval_get()
     void                    elm_config_cache_flush_interval_set(int size)
     Eina_Bool               elm_config_cache_flush_enabled_get()
@@ -82,9 +94,12 @@ cdef extern from "Elementary.h":
     void                    elm_config_cache_edje_file_cache_size_set(int size)
     int                     elm_config_cache_edje_collection_cache_size_get()
     void                    
elm_config_cache_edje_collection_cache_size_set(int size)
+
     Eina_Bool               elm_config_focus_highlight_enabled_get()
     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_mirrored_get()
     void                    elm_config_mirrored_set(Eina_Bool mirrored)
+
+    const_char *            elm_config_indicator_service_get(int rotation)
diff --git a/efl/elementary/configuration.pyx b/efl/elementary/configuration.pyx
index 5bdcd08..f4ddefd 100644
--- a/efl/elementary/configuration.pyx
+++ b/efl/elementary/configuration.pyx
@@ -16,10 +16,37 @@
 # along with this Python-EFL.  If not, see <http://www.gnu.org/licenses/>.
 #
 
+"""
+
+.. _Elm_Softcursor_Mode:
+
+.. rubric:: Elm_Softcursor_Mode
+
+.. data:: ELM_SOFTCURSOR_MODE_AUTO
+
+    Auto-detect if a software cursor should be used (default)
+
+.. data:: ELM_SOFTCURSOR_MODE_ON
+
+    Always use a softcursor
+
+.. data:: ELM_SOFTCURSOR_MODE_OFF
+
+    Never use a softcursor
+
+"""
+
 include "widget_header.pxi"
 
 from efl.eo cimport convert_eina_list_strings_to_python_list
 
+cimport enums
+
+ELM_SOFTCURSOR_MODE_AUTO = enums.ELM_SOFTCURSOR_MODE_AUTO
+ELM_SOFTCURSOR_MODE_ON = enums.ELM_SOFTCURSOR_MODE_ON
+ELM_SOFTCURSOR_MODE_OFF = enums.ELM_SOFTCURSOR_MODE_OFF
+
+
 cdef class Configuration(object):
 
     """
@@ -253,6 +280,19 @@ cdef class Configuration(object):
         def __set__(self, threshold):
             elm_config_scroll_thumbscroll_threshold_set(threshold)
 
+
+    property scroll_thumbscroll_hold_threshold:
+        """The number of pixels the range which can be scrolled,
+        while the scroller is holded.
+
+        :type: int
+
+        """
+        def __get__(self):
+            return elm_config_scroll_thumbscroll_hold_threshold_get()
+        def __set__(self, threshold):
+            elm_config_scroll_thumbscroll_hold_threshold_set(threshold)
+
     property scroll_thumbscroll_momentum_threshold:
         """The minimum speed of mouse cursor movement which will trigger list
         self scrolling animation after a mouse up event (pixels/second).
@@ -318,6 +358,24 @@ cdef class Configuration(object):
         def __set__(self, longpress_timeout):
             elm_config_longpress_timeout_set(longpress_timeout)
 
+    property softcursor_mode:
+        """The mode used for software provided mouse cursors inline in the 
window
+        canvas.
+
+        A software rendered cursor can be provided for rendering inline inside 
the
+        canvas windows in the event the native display system does not provide 
one
+        or the native oneis not wanted.
+
+        :type: Elm_Softcursor_Mode
+
+        """
+        def __set__(self, mode):
+            elm_config_softcursor_mode_set(mode)
+
+        def __get__(self):
+            return elm_config_softcursor_mode_get()
+
+
     property tooltip_delay:
         """The duration after which tooltip will be shown.
 
@@ -498,6 +556,35 @@ cdef class Configuration(object):
             <const_char *>a2 if a2 is not None else NULL,
             size)
 
+
+    property access:
+        """Access mode
+
+        :type: bool
+
+        .. note::
+
+            Elementary objects may have information (e.g. label on the
+            elm_button) to be read. This information is read by access module
+            when an object receives EVAS_CALLBACK_MOUSE_IN event
+
+        """
+        def __get__(self):
+            return bool(elm_config_access_get())
+        def __set__(self, is_access):
+            elm_config_access_set(is_access)
+
+    property selection_unfocused_clear:
+        """Whether selection should be cleared when entry widget is unfocused.
+
+        :type: bool
+
+        """
+        def __get__(self):
+            return bool(elm_config_selection_unfocused_clear_get())
+        def __set__(self, enabled):
+            elm_config_selection_unfocused_clear_set(enabled)
+
     def font_overlay_unset(self, text_class):
         """font_overlay_unset(unicode text_class)
 
@@ -666,6 +753,18 @@ cdef class Configuration(object):
         def __set__(self, mirrored):
             elm_config_mirrored_set(mirrored)
 
+    def indicator_service_get(self, int rotation):
+        """indicator_service_get(int rotation) -> unicode
+
+        Get the indicator service name according to the rotation degree.
+
+        :param rotation: The rotation which is related with the indicator 
service name, in degrees (0-360),
+
+        :return: The indicator service name according to the rotation degree.
+
+        """
+        return _ctouni(elm_config_indicator_service_get(rotation))
+
 
 #For compatibility
 def config_finger_size_get():
diff --git a/efl/elementary/enums.pxd b/efl/elementary/enums.pxd
index f4cfa5e..4c009cc 100644
--- a/efl/elementary/enums.pxd
+++ b/efl/elementary/enums.pxd
@@ -343,6 +343,11 @@ cdef extern from "Elementary.h":
         ELM_SCROLLER_POLICY_ON
         ELM_SCROLLER_POLICY_OFF
 
+    ctypedef enum Elm_Softcursor_Mode:
+        ELM_SOFTCURSOR_MODE_AUTO
+        ELM_SOFTCURSOR_MODE_ON
+        ELM_SOFTCURSOR_MODE_OFF
+
     ctypedef enum Elm_Text_Format:
         ELM_TEXT_FORMAT_PLAIN_UTF8
         ELM_TEXT_FORMAT_MARKUP_UTF8

-- 

------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter

Reply via email to