forked from enlightenment/efl
[access] export some APIs,and remove unnecessary lines.
+ elm_access_object_register(); + elm_access_object_unregister(); + elm_access_text_set(); + elm_access_text_get(); + elm_access_cb_set(); These APIs are to use edje part, evas object as an accessible object. and do not create access object, because access object would be created at run time. This is different with internal API _elm_access_object_register(); SVN revision: 81659
This commit is contained in:
parent
56de89a84d
commit
f10fb3e115
|
@ -1470,9 +1470,7 @@ _elm_multibuttonentry_smart_text_get(Eo *obj, void *_pd, va_list *list)
|
||||||
}
|
}
|
||||||
|
|
||||||
static char *
|
static char *
|
||||||
_access_info_cb(void *data __UNUSED__,
|
_access_info_cb(void *data __UNUSED__, Evas_Object *obj)
|
||||||
Evas_Object *obj,
|
|
||||||
Elm_Widget_Item *item __UNUSED__)
|
|
||||||
{
|
{
|
||||||
char *ret;
|
char *ret;
|
||||||
Eina_Strbuf *buf;
|
Eina_Strbuf *buf;
|
||||||
|
|
|
@ -111,12 +111,12 @@ _access_obj_over_timeout_cb(void *data)
|
||||||
{
|
{
|
||||||
if (ac->on_highlight) ac->on_highlight(ac->on_highlight_data);
|
if (ac->on_highlight) ac->on_highlight(ac->on_highlight_data);
|
||||||
_elm_access_object_hilight(data);
|
_elm_access_object_hilight(data);
|
||||||
_elm_access_read(ac, ELM_ACCESS_CANCEL, data, NULL);
|
_elm_access_read(ac, ELM_ACCESS_CANCEL, data);
|
||||||
_elm_access_read(ac, ELM_ACCESS_TYPE, data, NULL);
|
_elm_access_read(ac, ELM_ACCESS_TYPE, data);
|
||||||
_elm_access_read(ac, ELM_ACCESS_INFO, data, NULL);
|
_elm_access_read(ac, ELM_ACCESS_INFO, data);
|
||||||
_elm_access_read(ac, ELM_ACCESS_STATE, data, NULL);
|
_elm_access_read(ac, ELM_ACCESS_STATE, data);
|
||||||
_elm_access_read(ac, ELM_ACCESS_EXTERNAL_INFO, data, NULL);
|
_elm_access_read(ac, ELM_ACCESS_CONTEXT_INFO, data);
|
||||||
_elm_access_read(ac, ELM_ACCESS_DONE, data, NULL);
|
_elm_access_read(ac, ELM_ACCESS_DONE, data);
|
||||||
}
|
}
|
||||||
ac->delay_timer = NULL;
|
ac->delay_timer = NULL;
|
||||||
return EINA_FALSE;
|
return EINA_FALSE;
|
||||||
|
@ -331,7 +331,7 @@ _elm_access_highlight_cycle(Evas_Object *obj, Elm_Focus_Direction dir)
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI char *
|
EAPI char *
|
||||||
_elm_access_text_get(const Elm_Access_Info *ac, int type, Evas_Object *obj, Elm_Widget_Item *item)
|
_elm_access_text_get(const Elm_Access_Info *ac, int type, Evas_Object *obj)
|
||||||
{
|
{
|
||||||
Elm_Access_Item *ai;
|
Elm_Access_Item *ai;
|
||||||
Eina_List *l;
|
Eina_List *l;
|
||||||
|
@ -341,7 +341,7 @@ _elm_access_text_get(const Elm_Access_Info *ac, int type, Evas_Object *obj, Elm_
|
||||||
{
|
{
|
||||||
if (ai->type == type)
|
if (ai->type == type)
|
||||||
{
|
{
|
||||||
if (ai->func) return ai->func((void *)(ai->data), obj, item);
|
if (ai->func) return ai->func((void *)(ai->data), obj);
|
||||||
else if (ai->data) return strdup(ai->data);
|
else if (ai->data) return strdup(ai->data);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -350,9 +350,9 @@ _elm_access_text_get(const Elm_Access_Info *ac, int type, Evas_Object *obj, Elm_
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
_elm_access_read(Elm_Access_Info *ac, int type, Evas_Object *obj, Elm_Widget_Item *item)
|
_elm_access_read(Elm_Access_Info *ac, int type, Evas_Object *obj)
|
||||||
{
|
{
|
||||||
char *txt = _elm_access_text_get(ac, type, obj, item);
|
char *txt = _elm_access_text_get(ac, type, obj);
|
||||||
|
|
||||||
_access_init();
|
_access_init();
|
||||||
if (mapi)
|
if (mapi)
|
||||||
|
@ -406,7 +406,7 @@ _elm_access_object_get(const Evas_Object *obj)
|
||||||
EAPI void
|
EAPI void
|
||||||
_elm_access_object_hilight(Evas_Object *obj)
|
_elm_access_object_hilight(Evas_Object *obj)
|
||||||
{
|
{
|
||||||
Evas_Object *o;
|
Evas_Object *o, *parent_obj;
|
||||||
Evas_Coord x, y, w, h;
|
Evas_Coord x, y, w, h;
|
||||||
|
|
||||||
o = evas_object_name_find(evas_object_evas_get(obj), "_elm_access_disp");
|
o = evas_object_name_find(evas_object_evas_get(obj), "_elm_access_disp");
|
||||||
|
@ -433,7 +433,13 @@ _elm_access_object_hilight(Evas_Object *obj)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
evas_object_data_set(o, "_elm_access_target", obj);
|
evas_object_data_set(o, "_elm_access_target", obj);
|
||||||
elm_widget_theme_object_set(obj, o, "access", "base", "default");
|
|
||||||
|
parent_obj = obj;
|
||||||
|
if (!elm_widget_is(obj))
|
||||||
|
parent_obj = evas_object_data_get(obj, "_elm_access_parent");
|
||||||
|
|
||||||
|
elm_widget_theme_object_set(parent_obj, o, "access", "base", "default");
|
||||||
|
|
||||||
evas_object_event_callback_add(obj, EVAS_CALLBACK_DEL,
|
evas_object_event_callback_add(obj, EVAS_CALLBACK_DEL,
|
||||||
_access_obj_hilight_del_cb, NULL);
|
_access_obj_hilight_del_cb, NULL);
|
||||||
evas_object_event_callback_add(obj, EVAS_CALLBACK_HIDE,
|
evas_object_event_callback_add(obj, EVAS_CALLBACK_HIDE,
|
||||||
|
@ -500,8 +506,7 @@ _content_move(void *data, Evas *e __UNUSED__, Evas_Object *obj,
|
||||||
}
|
}
|
||||||
|
|
||||||
static char *
|
static char *
|
||||||
_part_access_info_cb(void *data, Evas_Object *obj,
|
_part_access_info_cb(void *data, Evas_Object *obj)
|
||||||
Elm_Widget_Item *item __UNUSED__)
|
|
||||||
{
|
{
|
||||||
Evas_Object *eobj = data;
|
Evas_Object *eobj = data;
|
||||||
if (!eobj) return NULL;
|
if (!eobj) return NULL;
|
||||||
|
@ -783,11 +788,74 @@ static const Eo_Class_Description class_desc = {
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
|
EAPI void
|
||||||
|
elm_access_text_set(Evas_Object *obj, int type, const char *text)
|
||||||
|
{
|
||||||
|
_elm_access_text_set(_elm_access_object_get(obj), type, text);
|
||||||
|
}
|
||||||
|
|
||||||
|
EAPI char *
|
||||||
|
elm_access_text_get(Evas_Object *obj, int type)
|
||||||
|
{
|
||||||
|
return _elm_access_text_get(_elm_access_object_get(obj), type, obj);
|
||||||
|
}
|
||||||
|
|
||||||
|
EAPI void
|
||||||
|
elm_access_cb_set(Evas_Object *obj, int type,
|
||||||
|
Elm_Access_Content_Cb func, const void *data)
|
||||||
|
{
|
||||||
|
_elm_access_callback_set(_elm_access_object_get(obj), type, func, data);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
EAPI void
|
||||||
|
elm_access_object_register(Evas_Object *parent, Evas_Object *target)
|
||||||
|
{
|
||||||
|
Elm_Access_Info *ai;
|
||||||
|
|
||||||
|
if (!parent || !target) return;
|
||||||
|
|
||||||
|
evas_object_event_callback_add(target, EVAS_CALLBACK_MOUSE_IN,
|
||||||
|
_access_obj_mouse_in_cb, target);
|
||||||
|
evas_object_event_callback_add(target, EVAS_CALLBACK_MOUSE_OUT,
|
||||||
|
_access_obj_mouse_out_cb, target);
|
||||||
|
evas_object_event_callback_add(target, EVAS_CALLBACK_DEL,
|
||||||
|
_access_obj_del_cb, target);
|
||||||
|
ai = calloc(1, sizeof(Elm_Access_Info));
|
||||||
|
evas_object_data_set(target, "_elm_access", ai);
|
||||||
|
|
||||||
|
//TODO: evas_object_data_del(); parent should take care of children.
|
||||||
|
evas_object_data_set(target, "_elm_access_parent", parent);
|
||||||
|
}
|
||||||
|
|
||||||
|
EAPI void
|
||||||
|
elm_access_object_unregister(Evas_Object *obj)
|
||||||
|
{
|
||||||
|
Elm_Access_Info *ac;
|
||||||
|
|
||||||
|
evas_object_event_callback_del_full(obj, EVAS_CALLBACK_MOUSE_IN,
|
||||||
|
_access_obj_mouse_in_cb, obj);
|
||||||
|
evas_object_event_callback_del_full(obj, EVAS_CALLBACK_MOUSE_OUT,
|
||||||
|
_access_obj_mouse_out_cb, obj);
|
||||||
|
evas_object_event_callback_del_full(obj, EVAS_CALLBACK_DEL,
|
||||||
|
_access_obj_del_cb, obj);
|
||||||
|
|
||||||
|
ac = evas_object_data_get(obj, "_elm_access");
|
||||||
|
evas_object_data_del(obj, "_elm_access");
|
||||||
|
if (ac)
|
||||||
|
{
|
||||||
|
_elm_access_clear(ac);
|
||||||
|
free(ac);
|
||||||
|
}
|
||||||
|
|
||||||
|
evas_object_data_del(obj, "_elm_access_parent");
|
||||||
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
elm_access_external_info_set(Evas_Object *obj, const char *text)
|
elm_access_external_info_set(Evas_Object *obj, const char *text)
|
||||||
{
|
{
|
||||||
_elm_access_text_set
|
_elm_access_text_set
|
||||||
(_elm_access_object_get(obj), ELM_ACCESS_EXTERNAL_INFO, text);
|
(_elm_access_object_get(obj), ELM_ACCESS_CONTEXT_INFO, text);
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI char *
|
EAPI char *
|
||||||
|
@ -796,7 +864,7 @@ elm_access_external_info_get(const Evas_Object *obj)
|
||||||
Elm_Access_Info *ac;
|
Elm_Access_Info *ac;
|
||||||
|
|
||||||
ac = _elm_access_object_get(obj);
|
ac = _elm_access_object_get(obj);
|
||||||
return _elm_access_text_get(ac, ELM_ACCESS_EXTERNAL_INFO, obj, NULL);
|
return _elm_access_text_get(ac, ELM_ACCESS_CONTEXT_INFO, (Evas_Object *)obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
EO_DEFINE_CLASS(elm_obj_access_class_get, &class_desc, ELM_OBJ_WIDGET_CLASS, NULL);
|
EO_DEFINE_CLASS(elm_obj_access_class_get, &class_desc, ELM_OBJ_WIDGET_CLASS, NULL);
|
||||||
|
|
|
@ -10,6 +10,73 @@
|
||||||
|
|
||||||
const Eo_Class *elm_obj_access_class_get(void) EINA_CONST;
|
const Eo_Class *elm_obj_access_class_get(void) EINA_CONST;
|
||||||
|
|
||||||
EAPI void elm_access_external_info_set(Evas_Object *obj, const char *text);
|
#define ELM_ACCESS_TYPE 0 /* when reading out widget or item
|
||||||
|
* this is read first */
|
||||||
|
#define ELM_ACCESS_INFO 1 /* next read is info - this is
|
||||||
|
* normally label */
|
||||||
|
#define ELM_ACCESS_STATE 2 /* if there is a state (eg checkbox)
|
||||||
|
* then read state out */
|
||||||
|
#define ELM_ACCESS_CONTEXT_INFO 3 /* to give contextual information */
|
||||||
|
|
||||||
EAPI char * elm_access_external_info_get(const Evas_Object *obj);
|
typedef char *(*Elm_Access_Content_Cb)(void *data, Evas_Object *obj);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Register evas object as an accessible object.
|
||||||
|
* @since 1.8
|
||||||
|
*
|
||||||
|
* @param parent accessibility parent object. this should be one of widget.
|
||||||
|
* @param target evas object to register as an accessible object.
|
||||||
|
*
|
||||||
|
* @ingroup Access
|
||||||
|
*/
|
||||||
|
EAPI void elm_access_object_register(Evas_Object *parent, Evas_Object *target);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Unregister accessible object.
|
||||||
|
* @since 1.8
|
||||||
|
*
|
||||||
|
* @param obj accessible object.
|
||||||
|
*
|
||||||
|
* @ingroup Access
|
||||||
|
*/
|
||||||
|
EAPI void elm_access_object_unregister(Evas_Object *target);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Set text to give information for specific type.
|
||||||
|
* @since 1.8
|
||||||
|
*
|
||||||
|
* @param obj accessible object.
|
||||||
|
* @param type
|
||||||
|
* @param text
|
||||||
|
|
||||||
|
* @ingroup Access
|
||||||
|
*/
|
||||||
|
EAPI void elm_access_text_set(Evas_Object *obj, int type, const char *text);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Set text to give information for specific type.
|
||||||
|
* @since 1.8
|
||||||
|
*
|
||||||
|
* @param obj accessible object.
|
||||||
|
* @param type
|
||||||
|
|
||||||
|
* @ingroup Access
|
||||||
|
*/
|
||||||
|
EAPI char * elm_access_text_get(Evas_Object *obj, int type);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Set callback to give information for specific type.
|
||||||
|
* @since 1.8
|
||||||
|
*
|
||||||
|
* @param obj accessible object.
|
||||||
|
* @param type
|
||||||
|
* @param func
|
||||||
|
* @param data
|
||||||
|
*
|
||||||
|
* @ingroup Access
|
||||||
|
*/
|
||||||
|
EAPI void elm_access_cb_set(Evas_Object *obj, int type, Elm_Access_Content_Cb func, const void *data);
|
||||||
|
|
||||||
|
//TODO: remvoe below - use elm_access_text_set(); or elm_access_cb_set();
|
||||||
|
EINA_DEPRECATED EAPI void elm_access_external_info_set(Evas_Object *obj, const char *text);
|
||||||
|
EINA_DEPRECATED EAPI char * elm_access_external_info_get(const Evas_Object *obj);
|
||||||
|
|
|
@ -150,9 +150,7 @@ _elm_bubble_smart_text_set(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
|
||||||
}
|
}
|
||||||
|
|
||||||
static char *
|
static char *
|
||||||
_access_info_cb(void *data __UNUSED__,
|
_access_info_cb(void *data __UNUSED__, Evas_Object *obj)
|
||||||
Evas_Object *obj,
|
|
||||||
Elm_Widget_Item *item __UNUSED__)
|
|
||||||
{
|
{
|
||||||
char *ret;
|
char *ret;
|
||||||
Eina_Strbuf *buf;
|
Eina_Strbuf *buf;
|
||||||
|
|
|
@ -264,9 +264,7 @@ _on_unpressed_signal(void *data,
|
||||||
}
|
}
|
||||||
|
|
||||||
static char *
|
static char *
|
||||||
_access_info_cb(void *data __UNUSED__,
|
_access_info_cb(void *data __UNUSED__, Evas_Object *obj)
|
||||||
Evas_Object *obj,
|
|
||||||
Elm_Widget_Item *item __UNUSED__)
|
|
||||||
{
|
{
|
||||||
const char *txt = elm_widget_access_info_get(obj);
|
const char *txt = elm_widget_access_info_get(obj);
|
||||||
|
|
||||||
|
@ -277,9 +275,7 @@ _access_info_cb(void *data __UNUSED__,
|
||||||
}
|
}
|
||||||
|
|
||||||
static char *
|
static char *
|
||||||
_access_state_cb(void *data __UNUSED__,
|
_access_state_cb(void *data __UNUSED__, Evas_Object *obj)
|
||||||
Evas_Object *obj,
|
|
||||||
Elm_Widget_Item *item __UNUSED__)
|
|
||||||
{
|
{
|
||||||
if (elm_widget_disabled_get(obj))
|
if (elm_widget_disabled_get(obj))
|
||||||
return strdup(E_("State: Disabled"));
|
return strdup(E_("State: Disabled"));
|
||||||
|
|
|
@ -198,9 +198,7 @@ _set_month_year(Elm_Calendar_Smart_Data *sd)
|
||||||
}
|
}
|
||||||
|
|
||||||
static char *
|
static char *
|
||||||
_access_info_cb(void *data __UNUSED__,
|
_access_info_cb(void *data __UNUSED__, Evas_Object *obj)
|
||||||
Evas_Object *obj,
|
|
||||||
Elm_Widget_Item *item __UNUSED__)
|
|
||||||
{
|
{
|
||||||
char *ret;
|
char *ret;
|
||||||
Eina_Strbuf *buf;
|
Eina_Strbuf *buf;
|
||||||
|
|
|
@ -193,9 +193,7 @@ _elm_check_smart_theme(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
|
||||||
}
|
}
|
||||||
|
|
||||||
static char *
|
static char *
|
||||||
_access_info_cb(void *data __UNUSED__,
|
_access_info_cb(void *data __UNUSED__, Evas_Object *obj)
|
||||||
Evas_Object *obj,
|
|
||||||
Elm_Widget_Item *item __UNUSED__)
|
|
||||||
{
|
{
|
||||||
const char *txt = elm_widget_access_info_get(obj);
|
const char *txt = elm_widget_access_info_get(obj);
|
||||||
|
|
||||||
|
@ -206,9 +204,7 @@ _access_info_cb(void *data __UNUSED__,
|
||||||
}
|
}
|
||||||
|
|
||||||
static char *
|
static char *
|
||||||
_access_state_cb(void *data,
|
_access_state_cb(void *data, Evas_Object *obj)
|
||||||
Evas_Object *obj,
|
|
||||||
Elm_Widget_Item *item __UNUSED__)
|
|
||||||
{
|
{
|
||||||
Elm_Check_Smart_Data *sd = eo_data_get(data, MY_CLASS);
|
Elm_Check_Smart_Data *sd = eo_data_get(data, MY_CLASS);
|
||||||
const char *on_text, *off_text;
|
const char *on_text, *off_text;
|
||||||
|
|
|
@ -607,9 +607,7 @@ _ticker(void *data)
|
||||||
}
|
}
|
||||||
|
|
||||||
static char *
|
static char *
|
||||||
_access_info_cb(void *data __UNUSED__,
|
_access_info_cb(void *data __UNUSED__, Evas_Object *obj)
|
||||||
Evas_Object *obj,
|
|
||||||
Elm_Widget_Item *item __UNUSED__)
|
|
||||||
{
|
{
|
||||||
int hrs;
|
int hrs;
|
||||||
char *ret;
|
char *ret;
|
||||||
|
@ -641,9 +639,7 @@ _access_info_cb(void *data __UNUSED__,
|
||||||
}
|
}
|
||||||
|
|
||||||
static char *
|
static char *
|
||||||
_access_state_cb(void *data __UNUSED__,
|
_access_state_cb(void *data __UNUSED__, Evas_Object *obj)
|
||||||
Evas_Object *obj,
|
|
||||||
Elm_Widget_Item *item __UNUSED__)
|
|
||||||
{
|
{
|
||||||
ELM_CLOCK_DATA_GET(obj, sd);
|
ELM_CLOCK_DATA_GET(obj, sd);
|
||||||
if (sd->edit)
|
if (sd->edit)
|
||||||
|
|
|
@ -1308,9 +1308,7 @@ _on_color_released(void *data,
|
||||||
}
|
}
|
||||||
|
|
||||||
static char *
|
static char *
|
||||||
_access_info_cb(void *data,
|
_access_info_cb(void *data, Evas_Object *obj __UNUSED__)
|
||||||
Evas_Object *obj __UNUSED__,
|
|
||||||
Elm_Widget_Item *item __UNUSED__)
|
|
||||||
{
|
{
|
||||||
char *ret;
|
char *ret;
|
||||||
Eina_Strbuf *buf;
|
Eina_Strbuf *buf;
|
||||||
|
|
|
@ -737,9 +737,7 @@ _field_list_init(Evas_Object *obj)
|
||||||
}
|
}
|
||||||
|
|
||||||
static char *
|
static char *
|
||||||
_access_info_cb(void *data,
|
_access_info_cb(void *data, Evas_Object *obj __UNUSED__)
|
||||||
Evas_Object *obj __UNUSED__,
|
|
||||||
Elm_Widget_Item *item __UNUSED__)
|
|
||||||
{
|
{
|
||||||
char *ret;
|
char *ret;
|
||||||
Eina_Strbuf *buf;
|
Eina_Strbuf *buf;
|
||||||
|
|
|
@ -548,9 +548,7 @@ _item_click_cb(void *data,
|
||||||
}
|
}
|
||||||
|
|
||||||
static char *
|
static char *
|
||||||
_access_info_cb(void *data,
|
_access_info_cb(void *data, Evas_Object *obj __UNUSED__)
|
||||||
Evas_Object *obj __UNUSED__,
|
|
||||||
Elm_Widget_Item *item __UNUSED__)
|
|
||||||
{
|
{
|
||||||
Elm_Diskselector_Item *it = (Elm_Diskselector_Item *)data;
|
Elm_Diskselector_Item *it = (Elm_Diskselector_Item *)data;
|
||||||
const char *txt = NULL;
|
const char *txt = NULL;
|
||||||
|
|
|
@ -2634,9 +2634,7 @@ proceed:
|
||||||
}
|
}
|
||||||
|
|
||||||
static char *
|
static char *
|
||||||
_access_info_cb(void *data __UNUSED__,
|
_access_info_cb(void *data __UNUSED__, Evas_Object *obj)
|
||||||
Evas_Object *obj,
|
|
||||||
Elm_Widget_Item *item __UNUSED__)
|
|
||||||
{
|
{
|
||||||
const char *txt;
|
const char *txt;
|
||||||
|
|
||||||
|
@ -2653,9 +2651,7 @@ _access_info_cb(void *data __UNUSED__,
|
||||||
}
|
}
|
||||||
|
|
||||||
static char *
|
static char *
|
||||||
_access_state_cb(void *data __UNUSED__,
|
_access_state_cb(void *data __UNUSED__, Evas_Object *obj)
|
||||||
Evas_Object *obj,
|
|
||||||
Elm_Widget_Item *item __UNUSED__)
|
|
||||||
{
|
{
|
||||||
Eina_Strbuf *buf;
|
Eina_Strbuf *buf;
|
||||||
char *txt;
|
char *txt;
|
||||||
|
|
|
@ -570,9 +570,7 @@ _item_unrealize_cb(Elm_Gen_Item *it)
|
||||||
}
|
}
|
||||||
|
|
||||||
static char *
|
static char *
|
||||||
_access_info_cb(void *data,
|
_access_info_cb(void *data, Evas_Object *obj __UNUSED__)
|
||||||
Evas_Object *obj __UNUSED__,
|
|
||||||
Elm_Widget_Item *item __UNUSED__)
|
|
||||||
{
|
{
|
||||||
Elm_Gen_Item *it = (Elm_Gen_Item *)data;
|
Elm_Gen_Item *it = (Elm_Gen_Item *)data;
|
||||||
ELM_GENGRID_ITEM_CHECK_OR_RETURN(it, NULL);
|
ELM_GENGRID_ITEM_CHECK_OR_RETURN(it, NULL);
|
||||||
|
@ -597,9 +595,7 @@ _access_info_cb(void *data,
|
||||||
}
|
}
|
||||||
|
|
||||||
static char *
|
static char *
|
||||||
_access_state_cb(void *data,
|
_access_state_cb(void *data, Evas_Object *obj __UNUSED__)
|
||||||
Evas_Object *obj __UNUSED__,
|
|
||||||
Elm_Widget_Item *item __UNUSED__)
|
|
||||||
{
|
{
|
||||||
Elm_Gen_Item *it = (Elm_Gen_Item *)data;
|
Elm_Gen_Item *it = (Elm_Gen_Item *)data;
|
||||||
ELM_GENGRID_ITEM_CHECK_OR_RETURN(it, NULL);
|
ELM_GENGRID_ITEM_CHECK_OR_RETURN(it, NULL);
|
||||||
|
|
|
@ -1239,9 +1239,7 @@ _item_content_realize(Elm_Gen_Item *it,
|
||||||
}
|
}
|
||||||
|
|
||||||
static char *
|
static char *
|
||||||
_access_info_cb(void *data,
|
_access_info_cb(void *data, Evas_Object *obj __UNUSED__)
|
||||||
Evas_Object *obj __UNUSED__,
|
|
||||||
Elm_Widget_Item *item __UNUSED__)
|
|
||||||
{
|
{
|
||||||
Elm_Gen_Item *it = (Elm_Gen_Item *)data;
|
Elm_Gen_Item *it = (Elm_Gen_Item *)data;
|
||||||
ELM_GENLIST_ITEM_CHECK_OR_RETURN(it, NULL);
|
ELM_GENLIST_ITEM_CHECK_OR_RETURN(it, NULL);
|
||||||
|
@ -1266,9 +1264,7 @@ _access_info_cb(void *data,
|
||||||
}
|
}
|
||||||
|
|
||||||
static char *
|
static char *
|
||||||
_access_state_cb(void *data,
|
_access_state_cb(void *data, Evas_Object *obj __UNUSED__)
|
||||||
Evas_Object *obj __UNUSED__,
|
|
||||||
Elm_Widget_Item *item __UNUSED__)
|
|
||||||
{
|
{
|
||||||
Elm_Gen_Item *it = (Elm_Gen_Item *)data;
|
Elm_Gen_Item *it = (Elm_Gen_Item *)data;
|
||||||
ELM_GENLIST_ITEM_CHECK_OR_RETURN(it, NULL);
|
ELM_GENLIST_ITEM_CHECK_OR_RETURN(it, NULL);
|
||||||
|
|
|
@ -72,9 +72,7 @@ _index_box_clear(Evas_Object *obj,
|
||||||
}
|
}
|
||||||
|
|
||||||
static char *
|
static char *
|
||||||
_access_info_cb(void *data,
|
_access_info_cb(void *data, Evas_Object *obj __UNUSED__)
|
||||||
Evas_Object *obj __UNUSED__,
|
|
||||||
Elm_Widget_Item *item __UNUSED__)
|
|
||||||
{
|
{
|
||||||
const char *txt = NULL;
|
const char *txt = NULL;
|
||||||
|
|
||||||
|
|
|
@ -322,9 +322,7 @@ _elm_label_smart_translate(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
|
||||||
}
|
}
|
||||||
|
|
||||||
static char *
|
static char *
|
||||||
_access_info_cb(void *data __UNUSED__,
|
_access_info_cb(void *data __UNUSED__, Evas_Object *obj)
|
||||||
Evas_Object *obj,
|
|
||||||
Elm_Widget_Item *item __UNUSED__)
|
|
||||||
{
|
{
|
||||||
const char *txt = elm_widget_access_info_get(obj);
|
const char *txt = elm_widget_access_info_get(obj);
|
||||||
|
|
||||||
|
|
|
@ -1347,9 +1347,7 @@ _item_del_pre_hook(Elm_Object_Item *it)
|
||||||
}
|
}
|
||||||
|
|
||||||
static char *
|
static char *
|
||||||
_access_info_cb(void *data,
|
_access_info_cb(void *data, Evas_Object *obj __UNUSED__)
|
||||||
Evas_Object *obj __UNUSED__,
|
|
||||||
Elm_Widget_Item *item __UNUSED__)
|
|
||||||
{
|
{
|
||||||
Elm_List_Item *it = (Elm_List_Item *)data;
|
Elm_List_Item *it = (Elm_List_Item *)data;
|
||||||
const char *txt = NULL;
|
const char *txt = NULL;
|
||||||
|
@ -1362,9 +1360,7 @@ _access_info_cb(void *data,
|
||||||
}
|
}
|
||||||
|
|
||||||
static char *
|
static char *
|
||||||
_access_state_cb(void *data,
|
_access_state_cb(void *data, Evas_Object *obj __UNUSED__)
|
||||||
Evas_Object *obj __UNUSED__,
|
|
||||||
Elm_Widget_Item *item __UNUSED__)
|
|
||||||
{
|
{
|
||||||
Elm_List_Item *it = (Elm_List_Item *)data;
|
Elm_List_Item *it = (Elm_List_Item *)data;
|
||||||
if (!it) return NULL;
|
if (!it) return NULL;
|
||||||
|
|
|
@ -35,9 +35,7 @@ _elm_panel_smart_sizing_eval(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
|
||||||
}
|
}
|
||||||
|
|
||||||
static char *
|
static char *
|
||||||
_access_state_cb(void *data,
|
_access_state_cb(void *data, Evas_Object *obj __UNUSED__)
|
||||||
Evas_Object *obj __UNUSED__,
|
|
||||||
Elm_Widget_Item *item __UNUSED__)
|
|
||||||
{
|
{
|
||||||
ELM_PANEL_DATA_GET(data, sd);
|
ELM_PANEL_DATA_GET(data, sd);
|
||||||
|
|
||||||
|
|
|
@ -198,9 +198,7 @@ _elm_progressbar_smart_theme(Eo *obj, void *_pd, va_list *list)
|
||||||
}
|
}
|
||||||
|
|
||||||
static char *
|
static char *
|
||||||
_access_info_cb(void *data __UNUSED__,
|
_access_info_cb(void *data __UNUSED__, Evas_Object *obj)
|
||||||
Evas_Object *obj,
|
|
||||||
Elm_Widget_Item *item __UNUSED__)
|
|
||||||
{
|
{
|
||||||
const char *txt = elm_widget_access_info_get(obj);
|
const char *txt = elm_widget_access_info_get(obj);
|
||||||
|
|
||||||
|
@ -211,9 +209,7 @@ _access_info_cb(void *data __UNUSED__,
|
||||||
}
|
}
|
||||||
|
|
||||||
static char *
|
static char *
|
||||||
_access_state_cb(void *data __UNUSED__,
|
_access_state_cb(void *data __UNUSED__, Evas_Object *obj)
|
||||||
Evas_Object *obj,
|
|
||||||
Elm_Widget_Item *item __UNUSED__)
|
|
||||||
{
|
{
|
||||||
char *ret;
|
char *ret;
|
||||||
Eina_Strbuf *buf;
|
Eina_Strbuf *buf;
|
||||||
|
|
|
@ -239,9 +239,7 @@ _radio_on_cb(void *data,
|
||||||
}
|
}
|
||||||
|
|
||||||
static char *
|
static char *
|
||||||
_access_info_cb(void *data __UNUSED__,
|
_access_info_cb(void *data __UNUSED__, Evas_Object *obj)
|
||||||
Evas_Object *obj,
|
|
||||||
Elm_Widget_Item *item __UNUSED__)
|
|
||||||
{
|
{
|
||||||
const char *txt = elm_widget_access_info_get(obj);
|
const char *txt = elm_widget_access_info_get(obj);
|
||||||
|
|
||||||
|
@ -252,9 +250,7 @@ _access_info_cb(void *data __UNUSED__,
|
||||||
}
|
}
|
||||||
|
|
||||||
static char *
|
static char *
|
||||||
_access_state_cb(void *data __UNUSED__,
|
_access_state_cb(void *data __UNUSED__, Evas_Object *obj)
|
||||||
Evas_Object *obj,
|
|
||||||
Elm_Widget_Item *item __UNUSED__)
|
|
||||||
{
|
{
|
||||||
ELM_RADIO_DATA_GET(obj, sd);
|
ELM_RADIO_DATA_GET(obj, sd);
|
||||||
|
|
||||||
|
|
|
@ -494,9 +494,7 @@ _item_del_pre_hook(Elm_Object_Item *it)
|
||||||
}
|
}
|
||||||
|
|
||||||
static char *
|
static char *
|
||||||
_access_info_cb(void *data,
|
_access_info_cb(void *data, Evas_Object *obj __UNUSED__)
|
||||||
Evas_Object *obj __UNUSED__,
|
|
||||||
Elm_Widget_Item *item __UNUSED__)
|
|
||||||
{
|
{
|
||||||
const char *txt = NULL;
|
const char *txt = NULL;
|
||||||
Elm_Segment_Item *it = (Elm_Segment_Item *)data;
|
Elm_Segment_Item *it = (Elm_Segment_Item *)data;
|
||||||
|
@ -509,9 +507,7 @@ _access_info_cb(void *data,
|
||||||
}
|
}
|
||||||
|
|
||||||
static char *
|
static char *
|
||||||
_access_state_cb(void *data,
|
_access_state_cb(void *data, Evas_Object *obj __UNUSED__)
|
||||||
Evas_Object *obj __UNUSED__,
|
|
||||||
Elm_Widget_Item *item __UNUSED__)
|
|
||||||
{
|
{
|
||||||
Elm_Segment_Item *it = (Elm_Segment_Item *)data;
|
Elm_Segment_Item *it = (Elm_Segment_Item *)data;
|
||||||
ELM_SEGMENT_CONTROL_ITEM_CHECK_OR_RETURN(it, NULL);
|
ELM_SEGMENT_CONTROL_ITEM_CHECK_OR_RETURN(it, NULL);
|
||||||
|
|
|
@ -711,9 +711,7 @@ _elm_slider_smart_calculate(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
|
||||||
}
|
}
|
||||||
|
|
||||||
static char *
|
static char *
|
||||||
_access_info_cb(void *data __UNUSED__,
|
_access_info_cb(void *data __UNUSED__, Evas_Object *obj)
|
||||||
Evas_Object *obj,
|
|
||||||
Elm_Widget_Item *item __UNUSED__)
|
|
||||||
{
|
{
|
||||||
const char *txt = elm_widget_access_info_get(obj);
|
const char *txt = elm_widget_access_info_get(obj);
|
||||||
|
|
||||||
|
@ -724,9 +722,7 @@ _access_info_cb(void *data __UNUSED__,
|
||||||
}
|
}
|
||||||
|
|
||||||
static char *
|
static char *
|
||||||
_access_state_cb(void *data __UNUSED__,
|
_access_state_cb(void *data __UNUSED__, Evas_Object *obj)
|
||||||
Evas_Object *obj,
|
|
||||||
Elm_Widget_Item *item __UNUSED__)
|
|
||||||
{
|
{
|
||||||
char *ret;
|
char *ret;
|
||||||
Eina_Strbuf *buf = eina_strbuf_new();
|
Eina_Strbuf *buf = eina_strbuf_new();
|
||||||
|
|
|
@ -496,9 +496,7 @@ _elm_spinner_smart_on_focus(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
|
||||||
}
|
}
|
||||||
|
|
||||||
static char *
|
static char *
|
||||||
_access_info_cb(void *data,
|
_access_info_cb(void *data, Evas_Object *obj)
|
||||||
Evas_Object *obj,
|
|
||||||
Elm_Widget_Item *item __UNUSED__)
|
|
||||||
{
|
{
|
||||||
Evas_Object *spinner;
|
Evas_Object *spinner;
|
||||||
const char *txt = elm_widget_access_info_get(obj);
|
const char *txt = elm_widget_access_info_get(obj);
|
||||||
|
@ -511,9 +509,7 @@ _access_info_cb(void *data,
|
||||||
}
|
}
|
||||||
|
|
||||||
static char *
|
static char *
|
||||||
_access_state_cb(void *data,
|
_access_state_cb(void *data, Evas_Object *obj __UNUSED__)
|
||||||
Evas_Object *obj __UNUSED__,
|
|
||||||
Elm_Widget_Item *item __UNUSED__)
|
|
||||||
{
|
{
|
||||||
if (elm_widget_disabled_get(data))
|
if (elm_widget_disabled_get(data))
|
||||||
return strdup(E_("State: Disabled"));
|
return strdup(E_("State: Disabled"));
|
||||||
|
|
|
@ -1625,9 +1625,7 @@ _layout(Evas_Object *o,
|
||||||
}
|
}
|
||||||
|
|
||||||
static char *
|
static char *
|
||||||
_access_info_cb(void *data,
|
_access_info_cb(void *data, Evas_Object *obj __UNUSED__)
|
||||||
Evas_Object *obj __UNUSED__,
|
|
||||||
Elm_Widget_Item *item __UNUSED__)
|
|
||||||
{
|
{
|
||||||
Elm_Toolbar_Item *it = (Elm_Toolbar_Item *)data;
|
Elm_Toolbar_Item *it = (Elm_Toolbar_Item *)data;
|
||||||
const char *txt = ((Elm_Widget_Item *)it)->access_info;
|
const char *txt = ((Elm_Widget_Item *)it)->access_info;
|
||||||
|
@ -1639,9 +1637,7 @@ _access_info_cb(void *data,
|
||||||
}
|
}
|
||||||
|
|
||||||
static char *
|
static char *
|
||||||
_access_state_cb(void *data,
|
_access_state_cb(void *data, Evas_Object *obj __UNUSED__)
|
||||||
Evas_Object *obj __UNUSED__,
|
|
||||||
Elm_Widget_Item *item __UNUSED__)
|
|
||||||
{
|
{
|
||||||
Elm_Toolbar_Item *it = (Elm_Toolbar_Item *)data;
|
Elm_Toolbar_Item *it = (Elm_Toolbar_Item *)data;
|
||||||
|
|
||||||
|
|
|
@ -456,20 +456,9 @@ typedef void (*Elm_Widget_Signal_Emit_Cb)(void *data, const cha
|
||||||
typedef void (*Elm_Widget_Disable_Cb)(void *data);
|
typedef void (*Elm_Widget_Disable_Cb)(void *data);
|
||||||
typedef Eina_Bool (*Elm_Widget_Del_Pre_Cb)(void *data);
|
typedef Eina_Bool (*Elm_Widget_Del_Pre_Cb)(void *data);
|
||||||
|
|
||||||
#define ELM_ACCESS_TYPE 0 /* when reading out widget or item
|
|
||||||
* this is read first */
|
|
||||||
#define ELM_ACCESS_INFO 1 /* next read is info - this is
|
|
||||||
* normally label */
|
|
||||||
#define ELM_ACCESS_STATE 2 /* if there is a state (eg checkbox)
|
|
||||||
* then read state out */
|
|
||||||
#define ELM_ACCESS_CONTENT 3 /* read ful content - eg all of the
|
|
||||||
* label, not a shortened version */
|
|
||||||
#define ELM_ACCESS_EXTERNAL_INFO 4 /* information set by application side */
|
|
||||||
|
|
||||||
#define ELM_ACCESS_DONE -1 /* sentence done - send done event here */
|
#define ELM_ACCESS_DONE -1 /* sentence done - send done event here */
|
||||||
#define ELM_ACCESS_CANCEL -2 /* stop reading immediately */
|
#define ELM_ACCESS_CANCEL -2 /* stop reading immediately */
|
||||||
|
|
||||||
typedef char *(*Elm_Access_Content_Cb)(void *data, Evas_Object *obj, Elm_Widget_Item *item);
|
|
||||||
typedef void (*Elm_Access_On_Highlight_Cb)(void *data);
|
typedef void (*Elm_Access_On_Highlight_Cb)(void *data);
|
||||||
typedef void (*Elm_Access_Activate_Cb)(void *data, Evas_Object *part_obj, Elm_Widget_Item *item);
|
typedef void (*Elm_Access_Activate_Cb)(void *data, Evas_Object *part_obj, Elm_Widget_Item *item);
|
||||||
|
|
||||||
|
@ -501,8 +490,8 @@ struct _Elm_Access_Info
|
||||||
EAPI void _elm_access_clear(Elm_Access_Info *ac);
|
EAPI void _elm_access_clear(Elm_Access_Info *ac);
|
||||||
EAPI void _elm_access_text_set(Elm_Access_Info *ac, int type, const char *text);
|
EAPI void _elm_access_text_set(Elm_Access_Info *ac, int type, const char *text);
|
||||||
EAPI void _elm_access_callback_set(Elm_Access_Info *ac, int type, Elm_Access_Content_Cb func, const void *data);
|
EAPI void _elm_access_callback_set(Elm_Access_Info *ac, int type, Elm_Access_Content_Cb func, const void *data);
|
||||||
EAPI char *_elm_access_text_get(const Elm_Access_Info *ac, int type, Evas_Object *obj, Elm_Widget_Item *item); /* this is ok it actually returns a strduped string - it's meant to! */
|
EAPI char *_elm_access_text_get(const Elm_Access_Info *ac, int type, Evas_Object *obj); /* this is ok it actually returns a strduped string - it's meant to! */
|
||||||
EAPI void _elm_access_read(Elm_Access_Info *ac, int type, Evas_Object *obj, Elm_Widget_Item *item);
|
EAPI void _elm_access_read(Elm_Access_Info *ac, int type, Evas_Object *obj);
|
||||||
EAPI void _elm_access_say(const char *txt);
|
EAPI void _elm_access_say(const char *txt);
|
||||||
EAPI Elm_Access_Info *_elm_access_object_get(const Evas_Object *obj);
|
EAPI Elm_Access_Info *_elm_access_object_get(const Evas_Object *obj);
|
||||||
EAPI void _elm_access_object_hilight(Evas_Object *obj);
|
EAPI void _elm_access_object_hilight(Evas_Object *obj);
|
||||||
|
|
Loading…
Reference in New Issue