[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
This commit is contained in:
Shinwoo Kim 2012-12-06 10:56:29 +00:00
parent c9f53ba831
commit f426ed101c
5 changed files with 35 additions and 14 deletions

View File

@ -161,6 +161,7 @@ EAPI extern Elm_Version *elm_version;
#include <elm_sys_notify.h>
/* special widgets - types used elsewhere */
#include <elm_access.h>
#include <elm_icon.h>
#include <elm_scroller.h>
#include <elm_entry.h>

View File

@ -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 \

View File

@ -1,10 +1,6 @@
#include <Elementary.h>
#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);

View File

@ -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);

View File

@ -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);