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
73 Elm_Access_Action_Type action_type;
74 Eina_Bool highlight_cycle : 1;
77 typedef struct _Elm_Access_Action_Info Elm_Access_Action_Info;
80 * @brief Register evas object as an accessible object.
83 * @param obj The evas object to register as an accessible object.
84 * @param parent The elementary object which is used for creating
89 EAPI Evas_Object *elm_access_object_register(Evas_Object *obj, Evas_Object *parent);
92 * @brief Unregister accessible object.
95 * @param obj The Evas object to unregister accessible object.
99 EAPI void elm_access_object_unregister(Evas_Object *obj);
102 * @brief Get an accessible object of the evas object.
105 * @param obj The evas object.
106 * @return Accessible object of the evas object or NULL for any error
110 EAPI Evas_Object *elm_access_object_get(const Evas_Object *obj);
113 * @brief Set text to give information for specific type.
116 * @param obj Accessible object.
117 * @param type The type of content that will be read
118 * @param text The text information that will be read
120 * @see elm_access_info_cb_set
123 EAPI void elm_access_info_set(Evas_Object *obj, int type, const char *text);
126 * @brief Set text to give information for specific type.
129 * @param obj Accessible object.
130 * @param type The type of content that will be read
132 * @see elm_access_info_cb_set
135 EAPI char *elm_access_info_get(const Evas_Object *obj, int type);
138 * @brief Set content callback to give information for specific type.
141 * @param obj Accessible object.
142 * @param type The type of content that will be read
143 * @param func The function to be called when the content is read
144 * @param data The data pointer to be passed to @p func
146 * The type would be one of ELM_ACCESS_TYPE, ELM_ACCESS_INFO,
147 * ELM_ACCESS_STATE, ELM_ACCESS_CONTEXT_INFO.
149 * In the case of button widget, the content of ELM_ACCESS_TYPE would be
150 * "button". The label of button such as "ok", "cancel" is for ELM_ACCESS_INFO.
151 * If the button is disabled, content of ELM_ACCESS_STATE would be "disabled".
152 * And if there is contextual information, use ELM_ACCESS_CONTEXT_INFO.
156 EAPI void elm_access_info_cb_set(Evas_Object *obj, int type, Elm_Access_Info_Cb func, const void *data);
159 * @brief Set activate callback to activate highlight object.
162 * @param obj Accessible object.
163 * @param func The function to be called when the activate gesture is detected
164 * @param data The data pointer to be passed to @p func
168 EAPI void elm_access_activate_cb_set(Evas_Object *obj, Elm_Access_Activate_Cb func, void *data);
171 * @brief Read out text information directly.
174 * @param text The text information that will be read
176 * This function will not free the @p text internally.
180 EAPI void elm_access_say(const char *text);
183 * @brief Give the highlight to the object directly.
186 * @param obj The object that will have the highlight and its information be read.
188 * The object should be an elementary object or an access object.
190 * @see elm_access_object_get
193 EAPI void elm_access_highlight_set(Evas_Object* obj);
195 EAPI Eina_Bool elm_access_action(Evas_Object *obj, const Elm_Access_Action_Type type, void *action_info);
197 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);
198 //TODO: remvoe below - use elm_access_text_set(); or elm_access_cb_set();
199 EINA_DEPRECATED EAPI void elm_access_external_info_set(Evas_Object *obj, const char *text);
200 EINA_DEPRECATED EAPI char *elm_access_external_info_get(const Evas_Object *obj);