2 * @defgroup Access Access
9 #define MSG_DOMAIN_CONTROL_ACCESS (int)ECORE_X_ATOM_E_ILLUME_ACCESS_CONTROL
11 enum _Elm_Access_Info_Type
13 ELM_ACCESS_INFO_FIRST = -1,
14 ELM_ACCESS_INFO, /* next read is info - this is
16 ELM_ACCESS_TYPE, /* when reading out widget or item
17 * this is read first */
18 ELM_ACCESS_STATE, /* if there is a state (eg checkbox)
19 * then read state out */
20 ELM_ACCESS_CONTEXT_INFO, /* to give contextual information */
25 * @typedef Elm_Access_Info_Type
27 typedef enum _Elm_Access_Info_Type Elm_Access_Info_Type;
29 typedef char *(*Elm_Access_Info_Cb)(void *data, Evas_Object *obj);
30 typedef void (*Elm_Access_Activate_Cb)(void *data, Evas_Object *part_obj, Elm_Object_Item *item);
33 * @enum _Elm_Access_Action_Type
34 * Enum of supported access action types.
36 enum _Elm_Access_Action_Type
38 ELM_ACCESS_ACTION_FIRST = -1,
40 ELM_ACCESS_ACTION_HIGHLIGHT, /* highlight an object */
41 ELM_ACCESS_ACTION_UNHIGHLIGHT, /* unhighlight an object */
42 ELM_ACCESS_ACTION_HIGHLIGHT_NEXT, /* set highlight to next object */
43 ELM_ACCESS_ACTION_HIGHLIGHT_PREV, /* set highlight to previous object */
44 ELM_ACCESS_ACTION_ACTIVATE, /* activate a highlight object */
45 ELM_ACCESS_ACTION_VALUE_CHANGE, /* TODO: deprecate this */
46 ELM_ACCESS_ACTION_SCROLL, /* scroll if one of highlight object parents
48 ELM_ACCESS_ACTION_UP, /* change value up of highlight object */
49 ELM_ACCESS_ACTION_DOWN, /* change value down of highlight object */
50 ELM_ACCESS_ACTION_BACK, /* go back to a previous view
51 ex: pop naviframe item */
52 ELM_ACCESS_ACTION_READ, /* highlight an object */
54 ELM_ACCESS_ACTION_LAST
58 * @typedef Elm_Access_Action_Type
60 typedef enum _Elm_Access_Action_Type Elm_Access_Action_Type;
62 struct _Elm_Access_Action_Info
66 unsigned int mouse_type; /* 0: mouse down
70 Elm_Access_Action_Type action_type;
71 Elm_Access_Action_Type action_by;
72 Eina_Bool highlight_cycle : 1;
75 typedef struct _Elm_Access_Action_Info Elm_Access_Action_Info;
78 * @typedef Elm_Access_Action_Cb
79 * User callback to make access object do specific action
80 * @param data user data
81 * @param action_info information to classify the action
82 * Returns EINA_TRUE on success, EINA FALSE otherwise
85 typedef Eina_Bool (*Elm_Access_Action_Cb)(void *data, Evas_Object *obj, Elm_Access_Action_Info *action_info);
88 * @brief Register evas object as an accessible object.
91 * @param obj The evas object to register as an accessible object.
92 * @param parent The elementary object which is used for creating
97 EAPI Evas_Object *elm_access_object_register(Evas_Object *obj, Evas_Object *parent);
100 * @brief Unregister accessible object.
103 * @param obj The Evas object to unregister accessible object.
107 EAPI void elm_access_object_unregister(Evas_Object *obj);
110 * @brief Get an accessible object of the evas object.
113 * @param obj The evas object.
114 * @return Accessible object of the evas object or NULL for any error
118 EAPI Evas_Object *elm_access_object_get(const Evas_Object *obj);
121 * @brief Set text to give information for specific type.
124 * @param obj Accessible object.
125 * @param type The type of content that will be read
126 * @param text The text information that will be read
128 * @see elm_access_info_cb_set
131 EAPI void elm_access_info_set(Evas_Object *obj, int type, const char *text);
134 * @brief Set text to give information for specific type.
137 * @param obj Accessible object.
138 * @param type The type of content that will be read
140 * @see elm_access_info_cb_set
143 EAPI char *elm_access_info_get(const Evas_Object *obj, int type);
146 * @brief Set content callback to give information for specific type.
149 * @param obj Accessible object.
150 * @param type The type of content that will be read
151 * @param func The function to be called when the content is read
152 * @param data The data pointer to be passed to @p func
154 * The type would be one of ELM_ACCESS_TYPE, ELM_ACCESS_INFO,
155 * ELM_ACCESS_STATE, ELM_ACCESS_CONTEXT_INFO.
157 * In the case of button widget, the content of ELM_ACCESS_TYPE would be
158 * "button". The label of button such as "ok", "cancel" is for ELM_ACCESS_INFO.
159 * If the button is disabled, content of ELM_ACCESS_STATE would be "disabled".
160 * And if there is contextual information, use ELM_ACCESS_CONTEXT_INFO.
164 EAPI void elm_access_info_cb_set(Evas_Object *obj, int type, Elm_Access_Info_Cb func, const void *data);
167 * @brief Set activate callback to activate highlight object.
170 * @param obj Accessible object.
171 * @param func The function to be called when the activate gesture is detected
172 * @param data The data pointer to be passed to @p func
176 EAPI void elm_access_activate_cb_set(Evas_Object *obj, Elm_Access_Activate_Cb func, void *data);
179 * @brief Read out text information directly.
182 * @param text The text information that will be read
184 * This function will not free the @p text internally.
188 EAPI void elm_access_say(const char *text);
191 * @brief Give the highlight to the object directly.
194 * @param obj The object that will have the highlight and its information be read.
196 * The object should be an elementary object or an access object.
198 * @see elm_access_object_get
201 EAPI void elm_access_highlight_set(Evas_Object* obj);
203 EAPI Eina_Bool elm_access_action(Evas_Object *obj, const Elm_Access_Action_Type type, void *action_info);
205 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);
206 //TODO: remvoe below - use elm_access_text_set(); or elm_access_cb_set();
207 EINA_DEPRECATED EAPI void elm_access_external_info_set(Evas_Object *obj, const char *text);
208 EINA_DEPRECATED EAPI char *elm_access_external_info_get(const Evas_Object *obj);