Elementary: Disable Accessibility parts

This commit is contained in:
Kai Huuhko 2013-11-02 16:23:30 +02:00
parent a2364dba2c
commit d8a6a5c614
7 changed files with 92 additions and 91 deletions

View File

@ -86,8 +86,8 @@ cdef extern from "Elementary.h":
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)
#TODO: Eina_Bool elm_config_access_get()
#TODO: 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)

View File

@ -654,23 +654,23 @@ cdef class Configuration(object):
<const_char *>a2 if a2 is not None else NULL,
size)
# TODO:
# property access:
# """Access mode
property access:
"""Access mode
# :type: bool
:type: bool
# .. note::
.. 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
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, bint is_access):
elm_config_access_set(is_access)
# """
# def __get__(self):
# return bool(elm_config_access_get())
# def __set__(self, bint is_access):
# elm_config_access_set(is_access)
property selection_unfocused_clear:
"""Whether selection should be cleared when entry widget is unfocused.

View File

@ -153,9 +153,9 @@ cdef extern from "Elementary.h":
void elm_object_domain_part_text_translatable_set(Evas_Object *obj, const_char *part, const_char *domain, Eina_Bool translatable)
# Access (elm_access.h)
Evas_Object * elm_access_object_get(const_Evas_Object *obj)
void elm_access_highlight_set(Evas_Object* obj)
void elm_access_object_unregister(Evas_Object *obj)
#TODO: Evas_Object * elm_access_object_get(const_Evas_Object *obj)
#TODO: void elm_access_highlight_set(Evas_Object* obj)
#TODO: void elm_access_object_unregister(Evas_Object *obj)
cdef class Canvas(evasCanvas):

View File

@ -468,19 +468,19 @@ cdef class Object(evasObject):
def content_unset(self):
return object_from_instance(elm_object_content_unset(self.obj))
def access_info_set(self, txt):
"""access_info_set(unicode txt)
# def access_info_set(self, txt):
# """access_info_set(unicode txt)
Set the text to read out when in accessibility mode
# Set the text to read out when in accessibility mode
:param txt: The text that describes the widget to people with poor
or no vision
:type txt: string
# :param txt: The text that describes the widget to people with poor
# or no vision
# :type txt: string
"""
if isinstance(txt, unicode): txt = PyUnicode_AsUTF8String(txt)
elm_object_access_info_set(self.obj,
<const_char *>txt if txt is not None else NULL)
# """
# if isinstance(txt, unicode): txt = PyUnicode_AsUTF8String(txt)
# elm_object_access_info_set(self.obj,
# <const_char *>txt if txt is not None else NULL)
def name_find(self, name not None, int recurse = 0):
"""name_find(unicode name, int recurse = 0) -> evas.Object
@ -1936,34 +1936,34 @@ cdef class Object(evasObject):
# raise RuntimeError
#
# Access
# ======
# Access (TODO)
# =============
def unregister(self):
"""Unregister accessible object.
# def unregister(self):
# """Unregister accessible object.
:since: 1.8
# :since: 1.8
"""
elm_access_object_unregister(self.obj)
# """
# elm_access_object_unregister(self.obj)
property access_object:
"""Get an accessible object of the evas object.
# property access_object:
# """Get an accessible object of the evas object.
:since: 1.8
# :since: 1.8
:type: Object
# :type: Object
"""
def __get__(self):
return object_from_instance(elm_access_object_get(self.obj))
# """
# def __get__(self):
# return object_from_instance(elm_access_object_get(self.obj))
def access_highlight_set(self):
"""Give the highlight to the object directly.
# def access_highlight_set(self):
# """Give the highlight to the object directly.
:since: 1.8
# :since: 1.8
The object should be an elementary object or an access object.
# The object should be an elementary object or an access object.
"""
elm_access_highlight_set(self.obj)
# """
# elm_access_highlight_set(self.obj)

View File

@ -25,7 +25,7 @@ cdef extern from "Elementary.h":
const_char * elm_object_item_translatable_part_text_get(const_Elm_Object_Item *it, const_char *part)
void elm_object_item_domain_part_text_translatable_set(Elm_Object_Item *it, const_char *part, const_char *domain, Eina_Bool translatable)
void elm_object_item_access_info_set(Elm_Object_Item *it, const_char *txt)
#TODO: void elm_object_item_access_info_set(Elm_Object_Item *it, const_char *txt)
void * elm_object_item_data_get(Elm_Object_Item *item)
void elm_object_item_data_set(Elm_Object_Item *item, void *data)
void elm_object_item_signal_emit(Elm_Object_Item *it, const_char *emission, const_char *source)
@ -48,12 +48,12 @@ cdef extern from "Elementary.h":
void elm_object_item_cursor_engine_only_set(Elm_Object_Item *it, Eina_Bool engine_only)
Eina_Bool elm_object_item_cursor_engine_only_get(Elm_Object_Item *it)
Evas_Object * elm_object_item_access_register(Elm_Object_Item *item)
void elm_object_item_access_unregister(Elm_Object_Item *item)
Evas_Object * elm_object_item_access_object_get(const_Elm_Object_Item *item)
void elm_object_item_access_order_set(Elm_Object_Item *item, Eina_List *objs)
const_Eina_List *elm_object_item_access_order_get(const_Elm_Object_Item *item)
void elm_object_item_access_order_unset(Elm_Object_Item *item)
#TODO: Evas_Object * elm_object_item_access_register(Elm_Object_Item *item)
#TODO: void elm_object_item_access_unregister(Elm_Object_Item *item)
#TODO: Evas_Object * elm_object_item_access_object_get(const_Elm_Object_Item *item)
#TODO: void elm_object_item_access_order_set(Elm_Object_Item *item, Eina_List *objs)
#TODO: const_Eina_List *elm_object_item_access_order_get(const_Elm_Object_Item *item)
#TODO: void elm_object_item_access_order_unset(Elm_Object_Item *item)

View File

@ -361,19 +361,20 @@ cdef class ObjectItem(object):
cpdef text_get(self):
return _ctouni(elm_object_item_text_get(self.item))
property access_info:
"""Set the text to read out when in accessibility mode
# TODO:
# property access_info:
# """Set the text to read out when in accessibility mode
:type: string
# :type: string
"""
def __set__(self, txt):
self.access_info_set(txt)
# """
# def __set__(self, txt):
# self.access_info_set(txt)
cpdef access_info_set(self, txt):
if isinstance(txt, unicode): txt = PyUnicode_AsUTF8String(txt)
elm_object_item_access_info_set(self.item,
<const_char *>txt if txt is not None else NULL)
# cpdef access_info_set(self, txt):
# if isinstance(txt, unicode): txt = PyUnicode_AsUTF8String(txt)
# elm_object_item_access_info_set(self.item,
# <const_char *>txt if txt is not None else NULL)
def signal_emit(self, emission, source):
"""signal_emit(unicode emission, unicode source)
@ -592,42 +593,42 @@ cdef class ObjectItem(object):
def cursor_engine_only_get(self):
return elm_object_item_cursor_engine_only_get(self.item)
# TODO: Accessibility
# def access_unregister(self):
# """Unregister accessible object of the object item.
# :since: 1.9
def access_unregister(self):
"""Unregister accessible object of the object item.
:since: 1.8
# """
# elm_object_item_access_unregister(self.item)
"""
elm_object_item_access_unregister(self.item)
# property access_object:
# """Get an accessible object of the object item.
property access_object:
"""Get an accessible object of the object item.
# :since: 1.9
:since: 1.8
# :return: Accessible object of the object item or NULL for any error
:return: Accessible object of the object item or NULL for any error
# """
# def __get__(self):
# return object_from_instance(elm_object_item_access_object_get(self.item))
"""
def __get__(self):
return object_from_instance(elm_object_item_access_object_get(self.item))
# property access_order:
# """Access highlight order
property access_order:
"""Access highlight order
# :since: 1.9
:since: 1.8
# :type: list of Objects
:type: list of Objects
# """
# def __set__(self, list value):
# elm_object_item_access_order_set(self.item,
# python_list_objects_to_eina_list(value))
"""
def __set__(self, list value):
elm_object_item_access_order_set(self.item,
python_list_objects_to_eina_list(value))
# def __get__(self):
# eina_list_objects_to_python_list(elm_object_item_access_order_get(self.item))
def __get__(self):
eina_list_objects_to_python_list(elm_object_item_access_order_get(self.item))
def __del__(self):
elm_object_item_access_order_unset(self.item)
# def __del__(self):
# elm_object_item_access_order_unset(self.item)
_object_mapping_register("elm_object_item", ObjectItem)

View File

@ -163,7 +163,7 @@ if set(("build", "build_ext", "install", "bdist", "sdist")) & set(sys.argv):
# Elementary
elm_exts = [
Extension("elementary.access", ["efl/elementary/access"+module_suffix]),
#Extension("elementary.access", ["efl/elementary/access"+module_suffix]),
Extension("elementary.actionslider", ["efl/elementary/actionslider"+module_suffix]),
Extension("elementary.background", ["efl/elementary/background"+module_suffix]),
Extension("elementary.box", ["efl/elementary/box"+module_suffix]),