static void
_access_highlight_read(Elm_Access_Info *ac, Evas_Object *obj)
{
+ int type;
+ char *txt = NULL;
+ Eina_Strbuf *strbuf;
+
+ strbuf = eina_strbuf_new();
+
if (_elm_config->access_mode != ELM_ACCESS_MODE_OFF)
{
if (ac->on_highlight) ac->on_highlight(ac->on_highlight_data);
_elm_access_object_hilight(obj);
- _elm_access_read(ac, ELM_ACCESS_CANCEL, obj);
- _elm_access_read(ac, ELM_ACCESS_TYPE, obj);
- _elm_access_read(ac, ELM_ACCESS_INFO, obj);
- _elm_access_read(ac, ELM_ACCESS_STATE, obj);
- _elm_access_read(ac, ELM_ACCESS_CONTEXT_INFO, obj);
- _elm_access_read(ac, ELM_ACCESS_DONE, obj);
+
+ for (type = ELM_ACCESS_INFO_FIRST + 1; type < ELM_ACCESS_INFO_LAST; type++)
+ {
+ txt = _elm_access_text_get(ac, type, obj);
+ if (txt && (strlen(txt) > 0))
+ {
+ if (eina_strbuf_length_get(strbuf) > 0)
+ eina_strbuf_append_printf(strbuf, ", %s", txt);
+ else
+ eina_strbuf_append(strbuf, txt);
+
+ free(txt);
+ }
+ }
}
+
+ txt = eina_strbuf_string_steal(strbuf);
+ eina_strbuf_free(strbuf);
+
+ _elm_access_say(txt);
+ free(txt);
}
static Eina_Bool
const Eo_Class *elm_obj_access_class_get(void) EINA_CONST;
-#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 */
+enum _Elm_Access_Info_Type
+{
+ ELM_ACCESS_INFO_FIRST = -1,
+ ELM_ACCESS_INFO, /* next read is info - this is
+ * normally label */
+ ELM_ACCESS_TYPE, /* when reading out widget or item
+ * this is read first */
+ ELM_ACCESS_STATE, /* if there is a state (eg checkbox)
+ * then read state out */
+ ELM_ACCESS_CONTEXT_INFO, /* to give contextual information */
+ ELM_ACCESS_INFO_LAST
+};
+
+/**
+ * @typedef Elm_Access_Info_Type
+ */
+typedef enum _Elm_Access_Info_Type Elm_Access_Info_Type;
typedef char *(*Elm_Access_Info_Cb)(void *data, Evas_Object *obj);
typedef void (*Elm_Access_Activate_Cb)(void *data, Evas_Object *part_obj, Elm_Object_Item *item);