2 * @defgroup Access Access
9 enum _Elm_Access_Info_Type
11 ELM_ACCESS_INFO_FIRST = -1,
12 ELM_ACCESS_INFO, /* next read is info - this is
14 ELM_ACCESS_TYPE, /* when reading out widget or item
15 * this is read first */
16 ELM_ACCESS_STATE, /* if there is a state (eg checkbox)
17 * then read state out */
18 ELM_ACCESS_CONTEXT_INFO, /* to give contextual information */
23 * @typedef Elm_Access_Info_Type
25 typedef enum _Elm_Access_Info_Type Elm_Access_Info_Type;
27 typedef char *(*Elm_Access_Info_Cb)(void *data, Evas_Object *obj);
28 typedef void (*Elm_Access_Activate_Cb)(void *data, Evas_Object *part_obj, Elm_Object_Item *item);
31 * @typedef Elm_Access_Action_Cb
32 * User callback to make access object do specific action
33 * @param data user data
34 * @param action_info information to classify the action
35 * Returns EINA_TRUE on success, EINA FALSE otherwise
38 typedef Eina_Bool (*Elm_Access_Action_Cb)(void *data, Evas_Object *obj, void *action_info);
41 * @enum _Elm_Access_Action_Type
42 * Enum of supported access action types.
44 enum _Elm_Access_Action_Type
46 ELM_ACCESS_ACTION_FIRST = -1,
48 ELM_ACCESS_ACTION_HIGHLIGHT, /* highlight an object */
49 ELM_ACCESS_ACTION_UNHIGHLIGHT, /* unhighlight an object */
50 ELM_ACCESS_ACTION_HIGHLIGHT_NEXT, /* set highlight to next object */
51 ELM_ACCESS_ACTION_HIGHLIGHT_PREV, /* set highlight to previous object */
52 ELM_ACCESS_ACTION_ACTIVATE, /* activate a highlight object */
53 ELM_ACCESS_ACTION_VALUE_CHANGE, /* change value of highlight object */
54 ELM_ACCESS_ACTION_SCROLL, /* scroll if one of highlight object parents
56 ELM_ACCESS_ACTION_BACK, /* go back to a previous view
57 ex: pop naviframe item */
58 ELM_ACCESS_ACTION_READ, /* highlight an object */
60 ELM_ACCESS_ACTION_LAST
64 * @typedef Elm_Access_Action_Type
66 typedef enum _Elm_Access_Action_Type Elm_Access_Action_Type;
68 struct _Elm_Access_Action_Info
72 unsigned int mouse_type; /* 0: mouse down
76 Elm_Access_Action_Type action_type;
77 Eina_Bool highlight_cycle : 1;
80 typedef struct _Elm_Access_Action_Info Elm_Access_Action_Info;
83 * @brief Register evas object as an accessible object.
86 * @param obj The evas object to register as an accessible object.
87 * @param parent The elementary object which is used for creating
92 EAPI Evas_Object *elm_access_object_register(Evas_Object *obj, Evas_Object *parent);
95 * @brief Unregister accessible object.
98 * @param obj The Evas object to unregister accessible object.
102 EAPI void elm_access_object_unregister(Evas_Object *obj);
105 * @brief Get an accessible object of the evas object.
108 * @param obj The evas object.
109 * @return Accessible object of the evas object or NULL for any error
113 EAPI Evas_Object *elm_access_object_get(const Evas_Object *obj);
116 * @brief Set text to give information for specific type.
119 * @param obj Accessible object.
120 * @param type The type of content that will be read
121 * @param text The text information that will be read
123 * @see elm_access_info_cb_set
126 EAPI void elm_access_info_set(Evas_Object *obj, int type, const char *text);
129 * @brief Set text to give information for specific type.
132 * @param obj Accessible object.
133 * @param type The type of content that will be read
135 * @see elm_access_info_cb_set
138 EAPI char *elm_access_info_get(const Evas_Object *obj, int type);
141 * @brief Set content callback to give information for specific type.
144 * @param obj Accessible object.
145 * @param type The type of content that will be read
146 * @param func The function to be called when the content is read
147 * @param data The data pointer to be passed to @p func
149 * The type would be one of ELM_ACCESS_TYPE, ELM_ACCESS_INFO,
150 * ELM_ACCESS_STATE, ELM_ACCESS_CONTEXT_INFO.
152 * In the case of button widget, the content of ELM_ACCESS_TYPE would be
153 * "button". The label of button such as "ok", "cancel" is for ELM_ACCESS_INFO.
154 * If the button is disabled, content of ELM_ACCESS_STATE would be "disabled".
155 * And if there is contextual information, use ELM_ACCESS_CONTEXT_INFO.
159 EAPI void elm_access_info_cb_set(Evas_Object *obj, int type, Elm_Access_Info_Cb func, const void *data);
162 * @brief Set activate callback to activate highlight object.
165 * @param obj Accessible object.
166 * @param func The function to be called when the activate gesture is detected
167 * @param data The data pointer to be passed to @p func
171 EAPI void elm_access_activate_cb_set(Evas_Object *obj, Elm_Access_Activate_Cb func, void *data);
174 * @brief Read out text information directly.
177 * @param text The text information that will be read
179 * This function will not free the @p text internally.
183 EAPI void elm_access_say(const char *text);
186 * @brief Give the highlight to the object directly.
189 * @param obj The object that will have the highlight and its information be read.
191 * The object should be an elementary object or an access object.
193 * @see elm_access_object_get
196 EAPI void elm_access_highlight_set(Evas_Object* obj);
198 EAPI Eina_Bool elm_access_action(Evas_Object *obj, const Elm_Access_Action_Type type, void *action_info);
200 EAPI void elm_access_action_cb_set(Evas_Object *obj, const Elm_Access_Action_Type type, const Elm_Access_Action_Cb cb, const void *data);
201 //TODO: remvoe below - use elm_access_text_set(); or elm_access_cb_set();
202 EINA_DEPRECATED EAPI void elm_access_external_info_set(Evas_Object *obj, const char *text);
203 EINA_DEPRECATED EAPI char *elm_access_external_info_get(const Evas_Object *obj);