summaryrefslogtreecommitdiff
path: root/efl
diff options
context:
space:
mode:
authorKai Huuhko <kai.huuhko@gmail.com>2014-05-28 00:25:55 +0300
committerKai Huuhko <kai.huuhko@gmail.com>2014-05-28 00:25:55 +0300
commit71456d0d62171858c1bf086b25eecc121ab7f5b2 (patch)
tree95b0559941a7988812df681628a2d089b77e76df /efl
parentc5f91c4a8cecd60c8674c0b06976e1a21c7c6422 (diff)
Elementary.configuration: Add missing properties
Diffstat (limited to 'efl')
-rw-r--r--efl/elementary/configuration.pxd13
-rw-r--r--efl/elementary/configuration.pyx135
-rw-r--r--efl/elementary/enums.pxd11
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 @@
1from efl.evas cimport Eina_Bool, Eina_List, Evas_Coord, Evas_Font_Size 1from efl.evas cimport Eina_Bool, Eina_List, Evas_Coord, Evas_Font_Size
2from enums cimport Elm_Softcursor_Mode, Elm_Focus_Move_Policy, \ 2from enums cimport Elm_Softcursor_Mode, Elm_Focus_Move_Policy, \
3 Elm_Focus_Autoscroll_Mode 3 Elm_Focus_Autoscroll_Mode, Edje_Channel
4 4
5cdef extern from "Elementary.h": 5cdef extern from "Elementary.h":
6 ctypedef struct Elm_Font_Overlay: 6 ctypedef struct Elm_Font_Overlay:
@@ -16,7 +16,7 @@ cdef extern from "Elementary.h":
16 const char *name 16 const char *name
17 const char *desc 17 const char *desc
18 18
19 19
20 ctypedef struct _Elm_Color_Overlay_Color: 20 ctypedef struct _Elm_Color_Overlay_Color:
21 int r, g, b, a 21 int r, g, b, a
22 22
@@ -155,3 +155,12 @@ cdef extern from "Elementary.h":
155 void elm_config_glayer_long_tap_start_timeout_set(double long_tap_timeout) 155 void elm_config_glayer_long_tap_start_timeout_set(double long_tap_timeout)
156 double elm_config_glayer_double_tap_timeout_get() 156 double elm_config_glayer_double_tap_timeout_get()
157 void elm_config_glayer_double_tap_timeout_set(double double_tap_timeout) 157 void elm_config_glayer_double_tap_timeout_set(double double_tap_timeout)
158
159 Eina_Bool elm_config_magnifier_enable_get()
160 void elm_config_magnifier_enable_set(Eina_Bool enable)
161 double elm_config_magnifier_scale_get()
162 void elm_config_magnifier_scale_set(double scale)
163 Eina_Bool elm_config_audio_mute_get(Edje_Channel channel)
164 void elm_config_audio_mute_set(Edje_Channel channel, Eina_Bool mute)
165 Eina_Bool elm_config_atspi_mode_get()
166 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:
79- "psl1ght" 79- "psl1ght"
80 80
81 81
82ATSPI AT-SPI2 Accessibility
83===========================
84
85Elementary widgets support Linux Accessibility standard. For more
86information please visit:
87http://www.linuxfoundation.org/collaborate/workgroups/accessibility/atk/at-spi/at-spi_on_d-bus
88
89
90
82Enumerations 91Enumerations
83------------ 92------------
84 93
@@ -99,6 +108,44 @@ Elm_Softcursor_Mode
99 108
100 Never use a softcursor 109 Never use a softcursor
101 110
111
112.. _Edje_Channel:
113
114Audio Channels
115==============
116
117.. data:: EDJE_CHANNEL_EFFECT
118
119 Standard audio effects
120
121.. data:: EDJE_CHANNEL_BACKGROUND
122
123 Background audio sounds
124
125.. data:: EDJE_CHANNEL_MUSIC
126
127 Music audio
128
129.. data:: EDJE_CHANNEL_FOREGROUND
130
131 Foreground audio sounds
132
133.. data:: EDJE_CHANNEL_INTERFACE
134
135 Sounds related to the interface
136
137.. data:: EDJE_CHANNEL_INPUT
138
139 Sounds related to regular input
140
141.. data:: EDJE_CHANNEL_ALERT
142
143 Sounds for major alerts
144
145.. data:: EDJE_CHANNEL_ALL
146
147 All audio channels (convenience)
148
102""" 149"""
103 150
104from cpython cimport PyUnicode_AsUTF8String 151from cpython cimport PyUnicode_AsUTF8String
@@ -111,6 +158,15 @@ ELM_SOFTCURSOR_MODE_AUTO = enums.ELM_SOFTCURSOR_MODE_AUTO
111ELM_SOFTCURSOR_MODE_ON = enums.ELM_SOFTCURSOR_MODE_ON 158ELM_SOFTCURSOR_MODE_ON = enums.ELM_SOFTCURSOR_MODE_ON
112ELM_SOFTCURSOR_MODE_OFF = enums.ELM_SOFTCURSOR_MODE_OFF 159ELM_SOFTCURSOR_MODE_OFF = enums.ELM_SOFTCURSOR_MODE_OFF
113 160
161EDJE_CHANNEL_EFFECT = enums.EDJE_CHANNEL_EFFECT
162EDJE_CHANNEL_BACKGROUND = enums.EDJE_CHANNEL_BACKGROUND
163EDJE_CHANNEL_MUSIC = enums.EDJE_CHANNEL_MUSIC
164EDJE_CHANNEL_FOREGROUND = enums.EDJE_CHANNEL_FOREGROUND
165EDJE_CHANNEL_INTERFACE = enums.EDJE_CHANNEL_INTERFACE
166EDJE_CHANNEL_INPUT = enums.EDJE_CHANNEL_INPUT
167EDJE_CHANNEL_ALERT = enums.EDJE_CHANNEL_ALERT
168EDJE_CHANNEL_ALL = enums.EDJE_CHANNEL_ALL
169
114 170
115cdef class Configuration(object): 171cdef class Configuration(object):
116 172
@@ -694,7 +750,7 @@ cdef class Configuration(object):
694 :type: list of tuples (color_class_name, color_class_description) 750 :type: list of tuples (color_class_name, color_class_description)
695 751
696 .. versionadded:: 1.10 752 .. versionadded:: 1.10
697 753
698 """ 754 """
699 def __get__(self): 755 def __get__(self):
700 cdef: 756 cdef:
@@ -723,7 +779,7 @@ cdef class Configuration(object):
723 :type: list of tuples (color_class, (r, g, b, a), (r2, g2, b2, a2), (r3, g3, b3, a3)) 779 :type: list of tuples (color_class, (r, g, b, a), (r2, g2, b2, a2), (r3, g3, b3, a3))
724 780
725 .. versionadded:: 1.10 781 .. versionadded:: 1.10
726 782
727 """ 783 """
728 def __get__(self): 784 def __get__(self):
729 cdef: 785 cdef:
@@ -773,11 +829,11 @@ cdef class Configuration(object):
773 :param a3: Shadow Alpha value 829 :param a3: Shadow Alpha value
774 830
775 .. versionadded:: 1.10 831 .. versionadded:: 1.10
776 832
777 """ 833 """
778 if isinstance(cc, unicode): cc = PyUnicode_AsUTF8String(cc) 834 if isinstance(cc, unicode): cc = PyUnicode_AsUTF8String(cc)
779 elm_config_color_overlay_set(<const char *>cc, 835 elm_config_color_overlay_set(<const char *>cc,
780 r, g, b, a, r2, g2, b2, a2, r3, g3, b3, a3) 836 r, g, b, a, r2, g2, b2, a2, r3, g3, b3, a3)
781 837
782 def color_overlay_unset(self, cc): 838 def color_overlay_unset(self, cc):
783 """Unset a color overlay for a given Elementary color class. 839 """Unset a color overlay for a given Elementary color class.
@@ -788,7 +844,7 @@ cdef class Configuration(object):
788 :param cc: The color class name 844 :param cc: The color class name
789 845
790 .. versionadded:: 1.10 846 .. versionadded:: 1.10
791 847
792 """ 848 """
793 if isinstance(cc, unicode): cc = PyUnicode_AsUTF8String(cc) 849 if isinstance(cc, unicode): cc = PyUnicode_AsUTF8String(cc)
794 elm_config_color_overlay_unset(cc) 850 elm_config_color_overlay_unset(cc)
@@ -798,7 +854,7 @@ cdef class Configuration(object):
798 color_overlay_unset() on the current Elementary window. 854 color_overlay_unset() on the current Elementary window.
799 855
800 .. versionadded:: 1.10 856 .. versionadded:: 1.10
801 857
802 """ 858 """
803 elm_config_color_overlay_apply() 859 elm_config_color_overlay_apply()
804 860
@@ -1124,6 +1180,73 @@ cdef class Configuration(object):
1124 def __set__(self, double double_tap_timeout): 1180 def __set__(self, double double_tap_timeout):
1125 elm_config_glayer_double_tap_timeout_set(double_tap_timeout) 1181 elm_config_glayer_double_tap_timeout_set(double_tap_timeout)
1126 1182
1183 property magnifier_enabled:
1184 """The magnifier enabled state for entries
1185
1186 :type: bool
1187
1188 .. versionadded:: 1.10
1189
1190 """
1191 def __get__(self):
1192 return bool(elm_config_magnifier_enable_get())
1193
1194 def __set__(self, bint enable):
1195 elm_config_magnifier_enable_set(enable)
1196
1197 property magnifier_scale:
1198 """The amount of scaling the magnifer does
1199
1200 :type: float
1201
1202 .. versionadded:: 1.10
1203
1204 """
1205 def __get__(self):
1206 return elm_config_magnifier_scale_get()
1207
1208 def __set__(self, double scale):
1209 elm_config_magnifier_scale_set(scale)
1210
1211 def audio_mute_get(self, Edje_Channel channel):
1212 """Get the mute state of an audio channel for effects
1213
1214 :param channel: The channel to get the mute state of
1215 :return: The mute state
1216
1217 .. versionadded:: 1.10
1218
1219 """
1220 return bool(elm_config_audio_mute_get(channel))
1221
1222 def audio_mute_set(self, Edje_Channel channel, bint mute):
1223 """Set the mute state of the specified channel
1224
1225 :param channel: The channel to set the mute state of
1226 :param mute: The mute state to set
1227
1228 .. versionadded:: 1.10
1229
1230 """
1231 elm_config_audio_mute_set(channel, mute)
1232
1233 property atspi_mode:
1234 """ATSPI mode
1235
1236 :type: bool
1237
1238 .. note:: Enables Linux Accessibility support for Elementary widgets.
1239
1240 .. versionadded:: 1.10
1241
1242 """
1243 def __get__(self):
1244 return bool(elm_config_atspi_mode_get())
1245
1246 def __set__(self, bint is_atspi):
1247 elm_config_atspi_mode_set(is_atspi)
1248
1249
1127#For compatibility 1250#For compatibility
1128def config_finger_size_get(): 1251def config_finger_size_get():
1129 return elm_config_finger_size_get() 1252 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":
588 ELM_XDND_ACTION_LIST 588 ELM_XDND_ACTION_LIST
589 ELM_XDND_ACTION_LINK 589 ELM_XDND_ACTION_LINK
590 ELM_XDND_ACTION_DESCRIPTION 590 ELM_XDND_ACTION_DESCRIPTION
591
592cdef extern from "Edje.h":
593 ctypedef enum Edje_Channel:
594 EDJE_CHANNEL_EFFECT # Standard audio effects
595 EDJE_CHANNEL_BACKGROUND # Background audio sounds
596 EDJE_CHANNEL_MUSIC # Music audio
597 EDJE_CHANNEL_FOREGROUND # Foreground audio sounds
598 EDJE_CHANNEL_INTERFACE # Sounds related to the interface
599 EDJE_CHANNEL_INPUT # Sounds related to regular input
600 EDJE_CHANNEL_ALERT # Sounds for major alerts
601 EDJE_CHANNEL_ALL # All audio channels (convenience)