From f426ed101c01715cd1f089ba4cdb32bdbd201b81 Mon Sep 17 00:00:00 2001 From: Shinwoo Kim Date: Thu, 6 Dec 2012 10:56:29 +0000 Subject: [PATCH] [access] elm_access_external_info_set(Evas_Object*, const char*) initial draft i would like to export an API which name is elm_access_external_info_set(Evas_Object *, const char*); this will be using by application side to set additional accessibility information. widget could have different information which could be different in another context. for example: there would be an entry which is for user ID, and there would be another entry which is for password. in this case, developer would like to add additional information for each entry as below. entry for user id reads "entry (default information), this entry is for user id (additional information)" entry for password reads "entry, this entry is for password" for this reason, i have attached patch. please review the patch and give feedbacks. SVN revision: 80339 --- legacy/elementary/src/lib/Elementary.h.in | 1 + legacy/elementary/src/lib/Makefile.am | 1 + legacy/elementary/src/lib/elm_access.c | 12 ++++++++---- legacy/elementary/src/lib/elm_access.h | 14 ++++++++++++++ legacy/elementary/src/lib/elm_widget.h | 21 +++++++++++---------- 5 files changed, 35 insertions(+), 14 deletions(-) create mode 100644 legacy/elementary/src/lib/elm_access.h diff --git a/legacy/elementary/src/lib/Elementary.h.in b/legacy/elementary/src/lib/Elementary.h.in index 3f3fe3472e..6739579196 100644 --- a/legacy/elementary/src/lib/Elementary.h.in +++ b/legacy/elementary/src/lib/Elementary.h.in @@ -161,6 +161,7 @@ EAPI extern Elm_Version *elm_version; #include /* special widgets - types used elsewhere */ +#include #include #include #include diff --git a/legacy/elementary/src/lib/Makefile.am b/legacy/elementary/src/lib/Makefile.am index 254e83401e..528e7b4f7e 100644 --- a/legacy/elementary/src/lib/Makefile.am +++ b/legacy/elementary/src/lib/Makefile.am @@ -120,6 +120,7 @@ elc_hoversel.h \ elc_multibuttonentry.h \ elc_naviframe.h \ elc_popup.h \ +elm_access.h \ elm_actionslider.h \ elm_app.h \ elm_authors.h \ diff --git a/legacy/elementary/src/lib/elm_access.c b/legacy/elementary/src/lib/elm_access.c index ad151dd85b..98ad7fba4e 100644 --- a/legacy/elementary/src/lib/elm_access.c +++ b/legacy/elementary/src/lib/elm_access.c @@ -1,10 +1,6 @@ #include #include "elm_priv.h" -const Eo_Class *elm_obj_access_class_get(void) EINA_CONST; - -#define ELM_OBJ_ACCESS_CLASS elm_obj_access_class_get() - #define MY_CLASS ELM_OBJ_ACCESS_CLASS #define MY_CLASS_NAME "elm_access" @@ -119,6 +115,7 @@ _access_obj_over_timeout_cb(void *data) _elm_access_read(ac, ELM_ACCESS_TYPE, data, NULL); _elm_access_read(ac, ELM_ACCESS_INFO, data, NULL); _elm_access_read(ac, ELM_ACCESS_STATE, data, NULL); + _elm_access_read(ac, ELM_ACCESS_EXTERNAL_INFO, data, NULL); _elm_access_read(ac, ELM_ACCESS_DONE, data, NULL); } ac->delay_timer = NULL; @@ -786,5 +783,12 @@ static const Eo_Class_Description class_desc = { NULL }; +EAPI void +elm_access_external_info_set(Evas_Object *obj, const char *text) +{ + _elm_access_text_set + (_elm_access_object_get(obj), ELM_ACCESS_EXTERNAL_INFO, text); +} + EO_DEFINE_CLASS(elm_obj_access_class_get, &class_desc, ELM_OBJ_WIDGET_CLASS, NULL); diff --git a/legacy/elementary/src/lib/elm_access.h b/legacy/elementary/src/lib/elm_access.h new file mode 100644 index 0000000000..d92057c7ea --- /dev/null +++ b/legacy/elementary/src/lib/elm_access.h @@ -0,0 +1,14 @@ +/** + * @defgroup Naviframe Naviframe + * @ingroup Elementary + * + * TODO: description + * + */ + +#define ELM_OBJ_ACCESS_CLASS elm_obj_access_class_get() + +const Eo_Class *elm_obj_access_class_get(void) EINA_CONST; + +EAPI void +elm_access_external_info_set(Evas_Object *obj, const char *text); diff --git a/legacy/elementary/src/lib/elm_widget.h b/legacy/elementary/src/lib/elm_widget.h index b260f18923..3ff2f53632 100644 --- a/legacy/elementary/src/lib/elm_widget.h +++ b/legacy/elementary/src/lib/elm_widget.h @@ -456,17 +456,18 @@ typedef void (*Elm_Widget_Signal_Emit_Cb)(void *data, const cha typedef void (*Elm_Widget_Disable_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_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_CANCEL -2 /* stop reading immediately */ +#define ELM_ACCESS_DONE -1 /* sentence done - send done event here */ +#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);