diff options
author | junkyu han <junkyu.han@samsung.com> | 2016-12-08 17:31:06 +0900 |
---|---|---|
committer | junkyu han <junkyu.han@samsung.com> | 2016-12-08 17:31:42 +0900 |
commit | e91cff91a617c101280029f9e817e93bd1e4d0f9 (patch) | |
tree | 8ad9666bda04cbc0b6750ba39ec8f5cecfc4852b | |
parent | fde4e83668c9635d09c480f4b7020c648f3aba8f (diff) | |
parent | 1575eaa9315ec7ef4cc5f3c0e5ab8159972bebfc (diff) | |
download | w3-home-e91cff91a617c101280029f9e817e93bd1e4d0f9.tar.gz w3-home-e91cff91a617c101280029f9e817e93bd1e4d0f9.tar.bz2 w3-home-e91cff91a617c101280029f9e817e93bd1e4d0f9.zip |
Merge branch 'tizen' into tizen_3.0 "Add description to widget"submit/tizen_3.0/20161208.083247accepted/tizen/3.0/wearable/20161209.102535
Change-Id: I0defa512ec9ac995bff6b0f60556254310a40b57
-rwxr-xr-x | home/include/screen_reader_handler.h | 2 | ||||
-rwxr-xr-x | home/src/edit.c | 9 | ||||
-rwxr-xr-x | home/src/page.c | 3 | ||||
-rwxr-xr-x | home/src/screen_reader_handler.c | 6 | ||||
-rwxr-xr-x | home/src/scroller.c | 20 |
5 files changed, 18 insertions, 22 deletions
diff --git a/home/include/screen_reader_handler.h b/home/include/screen_reader_handler.h index 58a2981..2459f9f 100755 --- a/home/include/screen_reader_handler.h +++ b/home/include/screen_reader_handler.h @@ -49,7 +49,7 @@ typedef struct { void screen_reader_update(void); void screen_reader_read(char *str, Eina_Bool discardable); void screen_reader_update_name(Evas_Object *target_obj, const char *name); -void screen_reader_update_widget_name(Evas_Object *target_obj, const char *name); +void screen_reader_update_widget_description(Evas_Object *target_obj, const char *name); void screen_reader_update_description(Evas_Object *target_obj, const char *description); void screen_reader_set_highlight(Evas_Object *target_obj, Eina_Bool highlight); access_info_t *screen_reader_create_access_info(Evas_Object *target, Evas_Object *parent, char *name, char *description, Elm_Accessible_Reading_Info_Type type); diff --git a/home/src/edit.c b/home/src/edit.c index 9b70dcd..c354e71 100755 --- a/home/src/edit.c +++ b/home/src/edit.c @@ -995,7 +995,7 @@ static void _remove_widget(Evas_Object *page) evas_object_del(page_info->item); page_destroy(page); page_arrange_plus_page(layout_info->scroller, 0); - scroller_update_access_widget_name(layout_info->scroller); + scroller_update_access_widget_description(layout_info->scroller); page_current = scroller_get_focused_page(edit_info->scroller); ret_if(!page_current); @@ -1118,7 +1118,7 @@ static Evas_Object *_add_widget_in_normal(Evas_Object *layout, const char *id, c scroller_push_page(layout_info->scroller, page, SCROLLER_PUSH_TYPE_LAST); page_arrange_plus_page(layout_info->scroller, 1); - scroller_update_access_widget_name(layout_info->scroller); + scroller_update_access_widget_description(layout_info->scroller); page_info_list = scroller_write_list(layout_info->scroller); if (page_info_list) { @@ -1213,7 +1213,7 @@ static Evas_Object *add_widget_in_edit(Evas_Object *layout, const char *id, cons scroller_push_page_before(layout_info->scroller, page, scroller_info->plus_page); page_arrange_plus_page(layout_info->scroller, 1); - scroller_update_access_widget_name(layout_info->scroller); + scroller_update_access_widget_description(layout_info->scroller); page_inner = elm_object_part_content_unset(page, "inner"); if (page_inner) evas_object_move(page_inner, 0, 0); @@ -2260,9 +2260,10 @@ Evas_Object *_create_plus_page(Evas_Object *edit) access_info_t *access_info = NULL; Evas_Object *target = (Evas_Object *)edje_object_part_object_get(elm_layout_edje_get(plus_item), "mask"); char *name = _("IDS_HS_BODY_ADD_WIDGET"); + char *role = _("IDS_HS_BODY_BUTTON_T_TTS"); Evas_Object *item_ao = NULL; - access_info = screen_reader_create_access_info(target, page_info->item, name, NULL, ELM_ACCESSIBLE_READING_INFO_TYPE_NAME); + access_info = screen_reader_create_access_info(target, page_info->item, name, role, ELM_ACCESSIBLE_READING_INFO_TYPE_NAME | ELM_ACCESSIBLE_READING_INFO_TYPE_DESCRIPTION); if (!access_info) { _E("Failed to create access info"); evas_object_del(plus_item); diff --git a/home/src/page.c b/home/src/page.c index d67cdbc..5caf1ed 100755 --- a/home/src/page.c +++ b/home/src/page.c @@ -410,9 +410,10 @@ HAPI Evas_Object *page_create_plus_page(Evas_Object *scroller) access_info_t *access_info = NULL; Evas_Object *target = (Evas_Object *)edje_object_part_object_get(elm_layout_edje_get(plus_item), "mask"); char *name = _("IDS_HS_BODY_ADD_WIDGET"); + char *role = _("IDS_HS_BODY_BUTTON_T_TTS"); Evas_Object *item_ao = NULL; - access_info = screen_reader_create_access_info(target, page_info->item, name, NULL, ELM_ACCESSIBLE_READING_INFO_TYPE_NAME); + access_info = screen_reader_create_access_info(target, page_info->item, name, role, ELM_ACCESSIBLE_READING_INFO_TYPE_NAME | ELM_ACCESSIBLE_READING_INFO_TYPE_DESCRIPTION); item_ao = screen_reader_create_access_object(access_info); if (!item_ao) { _E("Failed to create access object"); diff --git a/home/src/screen_reader_handler.c b/home/src/screen_reader_handler.c index 1f26246..1647e32 100755 --- a/home/src/screen_reader_handler.c +++ b/home/src/screen_reader_handler.c @@ -41,9 +41,9 @@ Evas_Object *screen_reader_create_access_object(access_info_t *access_info) access_obj = elm_access_object_register(access_info->target, access_info->parent); elm_atspi_accessible_name_set(access_obj, access_info->name); + elm_atspi_accessible_description_set(access_obj, access_info->description); elm_atspi_accessible_translation_domain_set(access_obj, PROJECT); elm_atspi_accessible_reading_info_type_set(access_obj, access_info->type); - elm_atspi_accessible_role_set(access_obj, ELM_ATSPI_ROLE_UNKNOWN); elm_atspi_accessible_can_highlight_set(access_obj, EINA_FALSE); return access_obj; @@ -77,7 +77,7 @@ access_info_t *screen_reader_create_access_info(Evas_Object *target, Evas_Object return access_info; } -void screen_reader_update_widget_name(Evas_Object *target_obj, const char *name) +void screen_reader_update_widget_description(Evas_Object *target_obj, const char *name) { Evas_Object *access_obj = NULL; @@ -88,7 +88,7 @@ void screen_reader_update_widget_name(Evas_Object *target_obj, const char *name) access_obj = elm_access_object_get(target_obj); if (access_obj) { - elm_atspi_accessible_name_set(access_obj, name); + elm_atspi_accessible_description_set(access_obj, name); } } diff --git a/home/src/scroller.c b/home/src/scroller.c index 2f068c6..e0f0124 100755 --- a/home/src/scroller.c +++ b/home/src/scroller.c @@ -954,17 +954,15 @@ HAPI Evas_Object *scroller_create(Evas_Object *layout, Evas_Object *parent, int -HAPI void scroller_update_access_widget_name(Evas_Object *scroller) +HAPI void scroller_update_access_widget_description(Evas_Object *scroller) { Eina_List *widget_list = NULL; Eina_List *find_list = NULL; scroller_info_s *scroller_info = NULL; Evas_Object *page = NULL; page_info_s *page_info = NULL; - char *widget_name = NULL; int total_count = 0; int position = 0; - char tmp_buf[2056]; char buf[2056]; ret_if(!scroller); @@ -983,16 +981,12 @@ HAPI void scroller_update_access_widget_name(Evas_Object *scroller) page_info = evas_object_data_get(page, DATA_KEY_PAGE_INFO); if (!page_info) continue; - if (page_info->direction == PAGE_DIRECTION_RIGHT) { - widget_name = page_read_title(page); - if (!widget_name) continue; - - snprintf(tmp_buf, sizeof(tmp_buf), _("IDS_AT_BODY_PAGE_P1SD_OF_P2SD_T_TTS"), position, total_count); - snprintf(buf, sizeof(buf), "%s%s", tmp_buf, widget_name); + if (scroller_info->plus_page == page) continue; - screen_reader_update_widget_name(page_info->access_info->target, buf); + if (page_info->direction == PAGE_DIRECTION_RIGHT) { + snprintf(buf, sizeof(buf), _("IDS_AT_BODY_PAGE_P1SD_OF_P2SD_T_TTS"), position, total_count); - free(widget_name); + screen_reader_update_widget_description(page_info->access_info->target, buf); } } } @@ -1443,7 +1437,7 @@ static Eina_Bool _push_all_page_cb(void *data) page_info_s *real_page_info = NULL; Evas_Object *item_ao = NULL; - access_info = screen_reader_create_access_info(page_info->item, page_info->item, name, NULL, ELM_ACCESSIBLE_READING_INFO_TYPE_NAME); + access_info = screen_reader_create_access_info(page_info->item, page_info->item, name, NULL, ELM_ACCESSIBLE_READING_INFO_TYPE_NAME | ELM_ACCESSIBLE_READING_INFO_TYPE_DESCRIPTION); if (!access_info) { _E("Failed to create access_info from screen reader"); evas_object_del(page_info->page); @@ -1518,7 +1512,7 @@ END: wms_change_favorite_order(W_HOME_WMS_BACKUP); - scroller_update_access_widget_name(scroller); + scroller_update_access_widget_description(scroller); return ECORE_CALLBACK_CANCEL; } |