static void _editing_mode_turnoff(Eext_Rotary_Selector_Data *rsd);
// ----------------------------------------- Accessibility API --------------------------------------//
-static Eina_Bool _accessibility_event_area_highlighted_cb(void *data, Evas_Object *obj, Elm_Access_Action_Info *action_info);
+static Eina_Bool _accessibility_event_area_action_cb(void *data, Evas_Object *obj, Elm_Access_Action_Info *action_info);
static void _accessibility_item_btn_highlighted_cb(void *data, Evas_Object *obj, void *event_info);
-static void _accessibility_set_relationship(Eext_Rotary_Selector_Data *rsd,int current_page);
+static void _accessibility_relationship_set(Eext_Rotary_Selector_Data *rsd,int current_page);
+static void _accessibility_event_area_reading_info_set(Eext_Rotary_Selector_Data *rsd);
static char *_accessibility_item_name_set_cb(void *data, Evas_Object *obj);
static char *_accessibility_name_set_cb(void *data, Evas_Object *obj);
static char *_accessibility_description_set_cb(void *data, Evas_Object *obj);
evas_object_smart_callback_add(rotary_selector, "more,option,opened", _rotary_selector_moreoption_opened_cb, rsd);
evas_object_smart_callback_add(rotary_selector, "more,option,closed", _rotary_selector_moreoption_closed_cb, rsd);
- elm_access_action_cb_set(rsd->event_area_access_object, ELM_ACCESS_ACTION_HIGHLIGHT, _accessibility_event_area_highlighted_cb, (Eext_Rotary_Selector_Data*)rsd);
- elm_access_action_cb_set(rsd->event_area_access_object, ELM_ACCESS_ACTION_UNHIGHLIGHT, _accessibility_event_area_highlighted_cb, (Eext_Rotary_Selector_Data*)rsd);
- elm_access_action_cb_set(rsd->event_area_access_object, ELM_ACCESS_ACTION_HIGHLIGHT_NEXT, _accessibility_event_area_highlighted_cb, (Eext_Rotary_Selector_Data*)rsd);
- elm_access_action_cb_set(rsd->event_area_access_object, ELM_ACCESS_ACTION_HIGHLIGHT_PREV, _accessibility_event_area_highlighted_cb, (Eext_Rotary_Selector_Data*)rsd);
+ elm_access_action_cb_set(rsd->event_area_access_object, ELM_ACCESS_ACTION_HIGHLIGHT, _accessibility_event_area_action_cb, (Eext_Rotary_Selector_Data*)rsd);
+ elm_access_action_cb_set(rsd->event_area_access_object, ELM_ACCESS_ACTION_UNHIGHLIGHT, _accessibility_event_area_action_cb, (Eext_Rotary_Selector_Data*)rsd);
+ elm_access_action_cb_set(rsd->event_area_access_object, ELM_ACCESS_ACTION_HIGHLIGHT_NEXT, _accessibility_event_area_action_cb, (Eext_Rotary_Selector_Data*)rsd);
+ elm_access_action_cb_set(rsd->event_area_access_object, ELM_ACCESS_ACTION_HIGHLIGHT_PREV, _accessibility_event_area_action_cb, (Eext_Rotary_Selector_Data*)rsd);
+
+ rsd->is_first_highlight = EINA_TRUE;
}
_rotary_selector_from_moreoption_set(rotary_selector, EINA_FALSE);
//
}
static Eina_Bool
-_accessibility_event_area_highlighted_cb(void *data, Evas_Object *obj, Elm_Access_Action_Info *action_info)
+_accessibility_event_area_action_cb(void *data, Evas_Object *obj, Elm_Access_Action_Info *action_info)
{
if(!elm_atspi_bridge_utils_is_screen_reader_enabled())
return EINA_FALSE;
{
case ELM_ACCESS_ACTION_UNHIGHLIGHT:
rsd->is_event_area_highlighted = EINA_FALSE;
- rsd->is_read_description = EINA_FALSE;
+ rsd->is_first_highlight = EINA_FALSE;
break;
case ELM_ACCESS_ACTION_HIGHLIGHT:
- if (rsd->is_read_description)
- {
- elm_atspi_accessible_name_cb_set(rsd->event_area_access_object, _accessibility_name_set_cb, (Eext_Rotary_Selector_Data*)rsd);
- elm_atspi_accessible_description_cb_set(rsd->event_area_access_object, _accessibility_description_set_cb, (Eext_Rotary_Selector_Data*)rsd);
- elm_atspi_accessible_reading_info_type_set(rsd->event_area_access_object, ELM_ACCESSIBLE_READING_INFO_TYPE_NAME | ELM_ACCESSIBLE_READING_INFO_TYPE_DESCRIPTION);
- action_info->action_by = -1;
- }
+ if (rsd->is_first_highlight)
+ action_info->action_by = -1;
+
if (action_info->action_by == ELM_ACCESS_ACTION_HIGHLIGHT_NEXT || (changed_list == 1 && rsd->control_by_rotary))
{
rsd->selected_index += 1;
_accessibility_page_change(rsd, previous_item_index, EINA_TRUE);
current_page = rsd->current_page + 1;
rsd->event_area_highlighted_state = EEXT_ROTARY_SELECTOR_ACCESSIBILITY_EVENTAREA_HIGHTLIHGTED_STATE_RIGHT;
- _accessibility_set_relationship(rsd, current_page);
+ _accessibility_relationship_set(rsd, current_page);
}
else if (action_info->action_by == ELM_ACCESS_ACTION_HIGHLIGHT_PREV || (changed_list == 2 && rsd->control_by_rotary))
{
_accessibility_page_change(rsd, previous_item_index, EINA_FALSE);
current_page = rsd->current_page - 1;
rsd->event_area_highlighted_state = EEXT_ROTARY_SELECTOR_ACCESSIBILITY_EVENTAREA_HIGHTLIHGTED_STATE_LEFT;
- _accessibility_set_relationship(rsd, current_page);
+ _accessibility_relationship_set(rsd, current_page);
}
else
{
- Elm_Accessible_Reading_Info_Type type = elm_atspi_accessible_reading_info_type_get(rsd->event_area_access_object);
- char buf[255] = "";
- if(type & ELM_ACCESSIBLE_READING_INFO_TYPE_NAME)
- {
- if(_rotary_selector_from_moreoption_get(rsd->rotary_selector))
- {
- const char *buf_name;
- buf_name = elm_atspi_accessible_name_get(rsd->event_area_access_object);
- if(buf_name)
- {
- limit = sizeof(buf) - strlen(buf) - 1;
- if (limit > 0)
- strncat(buf, buf_name, limit);
- }
- }
- }
- if(type & ELM_ACCESSIBLE_READING_INFO_TYPE_DESCRIPTION)
- {
- limit = sizeof(buf) - strlen(buf) - 1;
- if (limit > 0)
- strncat(buf, " ", limit);
- const char *buf_desc;
- buf_desc = elm_atspi_accessible_description_get(rsd->event_area_access_object);
- if(buf_desc)
- {
- limit = sizeof(buf) - strlen(buf) - 1;
- if (limit > 0)
- strncat(buf, buf_desc, limit);
- }
- }
- if(strcmp(buf,""))
- elm_atspi_bridge_utils_say(buf, EINA_TRUE, NULL, NULL);
- _accessibility_set_relationship(rsd, rsd->current_page);
+ _accessibility_relationship_set(rsd, rsd->current_page);
}
+ _accessibility_event_area_reading_info_set(rsd);
rsd->is_event_area_highlighted = EINA_TRUE;
ret = EINA_FALSE;
break;
current_page = rsd->current_page + 1;
rsd->event_area_highlighted_state = EEXT_ROTARY_SELECTOR_ACCESSIBILITY_EVENTAREA_HIGHTLIHGTED_STATE_RIGHT;
- _accessibility_set_relationship(rsd, current_page);
+ _accessibility_relationship_set(rsd, current_page);
+ _accessibility_event_area_reading_info_set(rsd);
ret = EINA_TRUE;
const char *buf_desc;
buf_desc = elm_atspi_accessible_description_get(rsd->event_area_access_object);
current_page = rsd->current_page - 1;
rsd->event_area_highlighted_state = EEXT_ROTARY_SELECTOR_ACCESSIBILITY_EVENTAREA_HIGHTLIHGTED_STATE_LEFT;
- _accessibility_set_relationship(rsd, current_page);
+ _accessibility_relationship_set(rsd, current_page);
+ _accessibility_event_area_reading_info_set(rsd);
ret = EINA_TRUE;
const char *buf_desc;
buf_desc = elm_atspi_accessible_description_get(rsd->event_area_access_object);
return ret;
}
-static void _accessibility_set_relationship(Eext_Rotary_Selector_Data *rsd,int current_page)
+static void _accessibility_event_area_reading_info_set(Eext_Rotary_Selector_Data *rsd)
+{
+ elm_atspi_accessible_description_cb_set(rsd->event_area_access_object, _accessibility_description_set_cb, (Eext_Rotary_Selector_Data*)rsd);
+ if (rsd->is_first_highlight)
+ {
+ elm_atspi_accessible_name_cb_set(rsd->event_area_access_object, _accessibility_name_set_cb, (Eext_Rotary_Selector_Data*)rsd);
+ elm_atspi_accessible_reading_info_type_set(rsd->event_area_access_object, ELM_ACCESSIBLE_READING_INFO_TYPE_NAME | ELM_ACCESSIBLE_READING_INFO_TYPE_DESCRIPTION);
+ }
+ else
+ {
+ elm_atspi_accessible_reading_info_type_set(rsd->event_area_access_object, ELM_ACCESSIBLE_READING_INFO_TYPE_DESCRIPTION);
+ }
+}
+
+static void _accessibility_relationship_set(Eext_Rotary_Selector_Data *rsd, int current_page)
{
Eext_Rotary_Selector_Item *item = NULL;
Eext_Rotary_Selector_Item *before_item = NULL;
int last_index = 0;
rsd->reading_page_number = current_page;
- elm_atspi_accessible_description_cb_set(rsd->event_area_access_object, _accessibility_description_set_cb, (Eext_Rotary_Selector_Data*)rsd);
- elm_atspi_accessible_reading_info_type_set(rsd->event_area_access_object, ELM_ACCESSIBLE_READING_INFO_TYPE_DESCRIPTION);
first_index = current_page*_ROTARY_SELECTOR_PAGE_ITEM_MAX;
Evas_Object *button = item->base.obj;
elm_atspi_accessible_can_highlight_set(button, EINA_TRUE);
}
- rsd->is_read_description = EINA_TRUE;
- elm_atspi_accessible_name_cb_set(rsd->event_area_access_object, _accessibility_name_set_cb, (Eext_Rotary_Selector_Data*)rsd);
- elm_atspi_accessible_description_cb_set(rsd->event_area_access_object, _accessibility_description_set_cb, (Eext_Rotary_Selector_Data*)rsd);
- elm_atspi_accessible_reading_info_type_set(rsd->event_area_access_object, ELM_ACCESSIBLE_READING_INFO_TYPE_NAME | ELM_ACCESSIBLE_READING_INFO_TYPE_DESCRIPTION);
-
+ rsd->is_first_highlight = EINA_TRUE;
+ _accessibility_event_area_reading_info_set(rsd);
elm_atspi_component_highlight_grab(rsd->event_area_access_object);
}
bindtextdomain (PACKAGE, LOCALE_DIR);
- if (rsd->is_read_description)
+ if (rsd->is_first_highlight)
{
snprintf(buf, sizeof(buf), _("WDS_TTS_TBBODY_ROTATE_BEZEL_TO_NAVIGATE_ITEMS"));
limit = sizeof(buf) - strlen(buf) - 1;
evas_object_smart_callback_add(rsd->rotary_selector, "more,option,opened", _rotary_selector_moreoption_opened_cb, rsd);
evas_object_smart_callback_add(rsd->rotary_selector, "more,option,closed", _rotary_selector_moreoption_closed_cb, rsd);
- elm_access_action_cb_set(rsd->event_area_access_object, ELM_ACCESS_ACTION_HIGHLIGHT, _accessibility_event_area_highlighted_cb, (Eext_Rotary_Selector_Data*)rsd);
- elm_access_action_cb_set(rsd->event_area_access_object, ELM_ACCESS_ACTION_HIGHLIGHT_NEXT, _accessibility_event_area_highlighted_cb, (Eext_Rotary_Selector_Data*)rsd);
- elm_access_action_cb_set(rsd->event_area_access_object, ELM_ACCESS_ACTION_HIGHLIGHT_PREV, _accessibility_event_area_highlighted_cb, (Eext_Rotary_Selector_Data*)rsd);
+ elm_access_action_cb_set(rsd->event_area_access_object, ELM_ACCESS_ACTION_HIGHLIGHT, _accessibility_event_area_action_cb, (Eext_Rotary_Selector_Data*)rsd);
+ elm_access_action_cb_set(rsd->event_area_access_object, ELM_ACCESS_ACTION_HIGHLIGHT_NEXT, _accessibility_event_area_action_cb, (Eext_Rotary_Selector_Data*)rsd);
+ elm_access_action_cb_set(rsd->event_area_access_object, ELM_ACCESS_ACTION_HIGHLIGHT_PREV, _accessibility_event_area_action_cb, (Eext_Rotary_Selector_Data*)rsd);
EINA_LIST_FOREACH(rsd->item_list, l, item)
{
evas_object_smart_callback_add(item->base.obj, "atspi,highlighted", _accessibility_item_btn_highlighted_cb, (Eext_Rotary_Selector_Data*)rsd);
}
- _accessibility_set_relationship(rsd, rsd->current_page);
- rsd->is_read_description = EINA_TRUE;
- //evpas_object_show(rsd->rotary_selector);
-
+ _accessibility_relationship_set(rsd, rsd->current_page);
+ rsd->is_first_highlight = EINA_TRUE;
+ _accessibility_event_area_reading_info_set(rsd);
}
}
else