kuuko pushed a commit to branch master. http://git.enlightenment.org/bindings/python/python-efl.git/commit/?id=71456d0d62171858c1bf086b25eecc121ab7f5b2
commit 71456d0d62171858c1bf086b25eecc121ab7f5b2 Author: Kai Huuhko <[email protected]> Date: Wed May 28 00:25:55 2014 +0300 Elementary.configuration: Add missing properties --- efl/elementary/configuration.pxd | 13 +++- efl/elementary/configuration.pyx | 135 +++++++++++++++++++++++++++++++++++++-- efl/elementary/enums.pxd | 11 ++++ 3 files changed, 151 insertions(+), 8 deletions(-) diff --git a/efl/elementary/configuration.pxd b/efl/elementary/configuration.pxd index 009110e..49b02c0 100644 --- a/efl/elementary/configuration.pxd +++ b/efl/elementary/configuration.pxd @@ -1,6 +1,6 @@ from efl.evas cimport Eina_Bool, Eina_List, Evas_Coord, Evas_Font_Size from enums cimport Elm_Softcursor_Mode, Elm_Focus_Move_Policy, \ - Elm_Focus_Autoscroll_Mode + Elm_Focus_Autoscroll_Mode, Edje_Channel cdef extern from "Elementary.h": ctypedef struct Elm_Font_Overlay: @@ -16,7 +16,7 @@ cdef extern from "Elementary.h": const char *name const char *desc - + ctypedef struct _Elm_Color_Overlay_Color: int r, g, b, a @@ -155,3 +155,12 @@ cdef extern from "Elementary.h": void elm_config_glayer_long_tap_start_timeout_set(double long_tap_timeout) double elm_config_glayer_double_tap_timeout_get() void elm_config_glayer_double_tap_timeout_set(double double_tap_timeout) + + Eina_Bool elm_config_magnifier_enable_get() + void elm_config_magnifier_enable_set(Eina_Bool enable) + double elm_config_magnifier_scale_get() + void elm_config_magnifier_scale_set(double scale) + Eina_Bool elm_config_audio_mute_get(Edje_Channel channel) + void elm_config_audio_mute_set(Edje_Channel channel, Eina_Bool mute) + Eina_Bool elm_config_atspi_mode_get() + void elm_config_atspi_mode_set(Eina_Bool is_atspi) diff --git a/efl/elementary/configuration.pyx b/efl/elementary/configuration.pyx index 284137f..ed40e15 100644 --- a/efl/elementary/configuration.pyx +++ b/efl/elementary/configuration.pyx @@ -79,6 +79,15 @@ The following are the available engines: - "psl1ght" +ATSPI AT-SPI2 Accessibility +=========================== + +Elementary widgets support Linux Accessibility standard. For more +information please visit: +http://www.linuxfoundation.org/collaborate/workgroups/accessibility/atk/at-spi/at-spi_on_d-bus + + + Enumerations ------------ @@ -99,6 +108,44 @@ Elm_Softcursor_Mode Never use a softcursor + +.. _Edje_Channel: + +Audio Channels +============== + +.. data:: EDJE_CHANNEL_EFFECT + + Standard audio effects + +.. data:: EDJE_CHANNEL_BACKGROUND + + Background audio sounds + +.. data:: EDJE_CHANNEL_MUSIC + + Music audio + +.. data:: EDJE_CHANNEL_FOREGROUND + + Foreground audio sounds + +.. data:: EDJE_CHANNEL_INTERFACE + + Sounds related to the interface + +.. data:: EDJE_CHANNEL_INPUT + + Sounds related to regular input + +.. data:: EDJE_CHANNEL_ALERT + + Sounds for major alerts + +.. data:: EDJE_CHANNEL_ALL + + All audio channels (convenience) + """ from cpython cimport PyUnicode_AsUTF8String @@ -111,6 +158,15 @@ 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 +EDJE_CHANNEL_EFFECT = enums.EDJE_CHANNEL_EFFECT +EDJE_CHANNEL_BACKGROUND = enums.EDJE_CHANNEL_BACKGROUND +EDJE_CHANNEL_MUSIC = enums.EDJE_CHANNEL_MUSIC +EDJE_CHANNEL_FOREGROUND = enums.EDJE_CHANNEL_FOREGROUND +EDJE_CHANNEL_INTERFACE = enums.EDJE_CHANNEL_INTERFACE +EDJE_CHANNEL_INPUT = enums.EDJE_CHANNEL_INPUT +EDJE_CHANNEL_ALERT = enums.EDJE_CHANNEL_ALERT +EDJE_CHANNEL_ALL = enums.EDJE_CHANNEL_ALL + cdef class Configuration(object): @@ -694,7 +750,7 @@ cdef class Configuration(object): :type: list of tuples (color_class_name, color_class_description) .. versionadded:: 1.10 - + """ def __get__(self): cdef: @@ -723,7 +779,7 @@ cdef class Configuration(object): :type: list of tuples (color_class, (r, g, b, a), (r2, g2, b2, a2), (r3, g3, b3, a3)) .. versionadded:: 1.10 - + """ def __get__(self): cdef: @@ -773,11 +829,11 @@ cdef class Configuration(object): :param a3: Shadow Alpha value .. versionadded:: 1.10 - + """ if isinstance(cc, unicode): cc = PyUnicode_AsUTF8String(cc) elm_config_color_overlay_set(<const char *>cc, - r, g, b, a, r2, g2, b2, a2, r3, g3, b3, a3) + r, g, b, a, r2, g2, b2, a2, r3, g3, b3, a3) def color_overlay_unset(self, cc): """Unset a color overlay for a given Elementary color class. @@ -788,7 +844,7 @@ cdef class Configuration(object): :param cc: The color class name .. versionadded:: 1.10 - + """ if isinstance(cc, unicode): cc = PyUnicode_AsUTF8String(cc) elm_config_color_overlay_unset(cc) @@ -798,7 +854,7 @@ cdef class Configuration(object): color_overlay_unset() on the current Elementary window. .. versionadded:: 1.10 - + """ elm_config_color_overlay_apply() @@ -1124,6 +1180,73 @@ cdef class Configuration(object): def __set__(self, double double_tap_timeout): elm_config_glayer_double_tap_timeout_set(double_tap_timeout) + property magnifier_enabled: + """The magnifier enabled state for entries + + :type: bool + + .. versionadded:: 1.10 + + """ + def __get__(self): + return bool(elm_config_magnifier_enable_get()) + + def __set__(self, bint enable): + elm_config_magnifier_enable_set(enable) + + property magnifier_scale: + """The amount of scaling the magnifer does + + :type: float + + .. versionadded:: 1.10 + + """ + def __get__(self): + return elm_config_magnifier_scale_get() + + def __set__(self, double scale): + elm_config_magnifier_scale_set(scale) + + def audio_mute_get(self, Edje_Channel channel): + """Get the mute state of an audio channel for effects + + :param channel: The channel to get the mute state of + :return: The mute state + + .. versionadded:: 1.10 + + """ + return bool(elm_config_audio_mute_get(channel)) + + def audio_mute_set(self, Edje_Channel channel, bint mute): + """Set the mute state of the specified channel + + :param channel: The channel to set the mute state of + :param mute: The mute state to set + + .. versionadded:: 1.10 + + """ + elm_config_audio_mute_set(channel, mute) + + property atspi_mode: + """ATSPI mode + + :type: bool + + .. note:: Enables Linux Accessibility support for Elementary widgets. + + .. versionadded:: 1.10 + + """ + def __get__(self): + return bool(elm_config_atspi_mode_get()) + + def __set__(self, bint is_atspi): + elm_config_atspi_mode_set(is_atspi) + + #For compatibility def config_finger_size_get(): return elm_config_finger_size_get() diff --git a/efl/elementary/enums.pxd b/efl/elementary/enums.pxd index 5d04f1f..410e55b 100644 --- a/efl/elementary/enums.pxd +++ b/efl/elementary/enums.pxd @@ -588,3 +588,14 @@ cdef extern from "Elementary.h": ELM_XDND_ACTION_LIST ELM_XDND_ACTION_LINK ELM_XDND_ACTION_DESCRIPTION + +cdef extern from "Edje.h": + ctypedef enum Edje_Channel: + EDJE_CHANNEL_EFFECT # Standard audio effects + EDJE_CHANNEL_BACKGROUND # Background audio sounds + EDJE_CHANNEL_MUSIC # Music audio + EDJE_CHANNEL_FOREGROUND # Foreground audio sounds + EDJE_CHANNEL_INTERFACE # Sounds related to the interface + EDJE_CHANNEL_INPUT # Sounds related to regular input + EDJE_CHANNEL_ALERT # Sounds for major alerts + EDJE_CHANNEL_ALL # All audio channels (convenience) --
