if (NULL == item) {
item = elm_genlist_at_xy_item_get((Evas_Object*)(parent_info->address), x + w + w/2, y + h/2, NULL);
}
+ } else if (NULL != widget_type && !strcmp(widget_type, "Elm_List")) {
+ item = elm_list_at_xy_item_get((Evas_Object*)(parent_info->address), x + w/2, y + h/2, NULL);
+ if (NULL == item) {
+ item = elm_list_at_xy_item_get((Evas_Object*)(parent_info->address), x + w + w/2, y + h/2, NULL);
+ }
} else if (NULL != widget_type && !strcmp(widget_type, "Elm_Gengrid")) {
int xposret, yposret;
item = elm_gengrid_at_xy_item_get((Evas_Object*)(parent_info->address), x + w/2, y + h/2, &xposret, &yposret);
EINA_LIST_FOREACH(g_dump_list, dump_iter, data) {
Object_Info* info = (Object_Info*)data;
- if (NULL != info && NULL != info->text /*&& NULL != info->part_name*/) {
-// Eina_List *iter = NULL;
-// char *part_name = NULL;
-// EINA_LIST_FOREACH(g_allowed_text_part_list, iter, part_name) {
-// if (NULL != part_name && !strcmp(part_name, info->part_name)) {
- VC_ELM_LOG_DBG("Text (%s), Part(%s)", info->text, info->part_name);
- VC_ELM_LOG_DBG("x(%d) y(%d) w(%d) h(%d)", info->geometry_info.x, info->geometry_info.y, info->geometry_info.w, info->geometry_info.h);
- Object_Info* parent = ea_object_dump_parent_widget_data_get(info);
- Object_Info* grand = ea_object_dump_parent_widget_data_get(parent);
- if (NULL != parent && NULL != grand) {
- const char *widget_type = NULL;
- widget_type = elm_widget_type_get((const Evas_Object*)grand->address);
- while (NULL == widget_type) {
- grand = ea_object_dump_parent_widget_data_get(grand);
- if (NULL == grand) {
- break;
- }
- widget_type = elm_widget_type_get((const Evas_Object*)grand->address);
- }
+ if (NULL != info && NULL != info->text) {
+ VC_ELM_LOG_DBG("Text (%s), Part(%s)", info->text, info->part_name);
+ VC_ELM_LOG_DBG("x(%d) y(%d) w(%d) h(%d)", info->geometry_info.x, info->geometry_info.y, info->geometry_info.w, info->geometry_info.h);
+ Object_Info* parent = ea_object_dump_parent_widget_data_get(info);
+ Object_Info* grand = ea_object_dump_parent_widget_data_get(parent);
+
+ const char *widget_type = NULL;
+ if (NULL != parent && NULL != grand) {
+ widget_type = elm_widget_type_get((const Evas_Object*)grand->address);
+ while (NULL == widget_type) {
+ grand = ea_object_dump_parent_widget_data_get(grand);
+ if (NULL == grand) {
+ break;
+ }
+ widget_type = elm_widget_type_get((const Evas_Object*)grand->address);
+ }
+ }
+ VC_ELM_LOG_DBG("info(%s) parent(%s) grand(%s)", elm_widget_type_get((Evas_Object*)info->address), (!parent) ? "NULL" : elm_widget_type_get((Evas_Object*)parent->address), widget_type);
+ // VC_ELM_LOG_DBG("info(%s) parent(%s) grand(%s)", evas_object_type_get((Evas_Object*)info->address), evas_object_type_get((Evas_Object*)parent->address), evas_object_type_get((Evas_Object*)grand->address));
- VC_ELM_LOG_DBG("info(%s) parent(%s) grand(%s)", elm_widget_type_get((Evas_Object*)info->address), elm_widget_type_get((Evas_Object*)parent->address), widget_type);
- // VC_ELM_LOG_DBG("info(%s) parent(%s) grand(%s)", evas_object_type_get((Evas_Object*)info->address), evas_object_type_get((Evas_Object*)parent->address), evas_object_type_get((Evas_Object*)grand->address));
-
- if (NULL != widget_type && (!strcmp(widget_type, "Elm_Genlist") || !strcmp(widget_type, "Elm_Gengrid") || !strcmp(widget_type, "Elm_List"))) {
- int x = info->geometry_info.x;
- int y = info->geometry_info.y;
- int w = info->geometry_info.w;
- int h = info->geometry_info.h;
- Elm_Object_Item *it = __vc_elm_core_get_object_item_from_geometry_info((Evas_Object*)grand->address, widget_type, x, y, w, h);
- if (NULL != it) {
- _vc_elm_core_set_auto_item_object_command(it, info->text);
- VC_ELM_LOG_DBG("Get object from geometry(%p)", it);
- }
- } else if (NULL != widget_type && (!strcmp(widget_type, "Elm_Toolbar"))) {
- Elm_Object_Item *it = elm_toolbar_item_find_by_label((Evas_Object*)grand->address, info->text);
- if (NULL != it) {
- _vc_elm_core_set_auto_item_object_command(it, info->text);
- VC_ELM_LOG_DBG("Get object from label(%p)", it);
- }
- } else if (NULL != widget_type && (!strcmp(widget_type, "Elm_Ctxpopup"))) {
- /* TODO */
- } else {
- if (!_vc_elm_core_register_default_widget(_get_ui_object_name((Evas_Object*)info->address), EINA_FALSE, NULL) || (NULL == eina_hash_find(_vc_elm_core_get_config_widget_map(), elm_widget_type_get((Evas_Object*)info->address)))) {
- VC_ELM_LOG_ERR("Not supported widget");
- }
- _vc_elm_core_set_auto_object_command((Evas_Object*)info->address, info->text);
- }
- } else {
- if (!_vc_elm_core_register_default_widget(_get_ui_object_name((Evas_Object*)info->address), EINA_FALSE, NULL) || (NULL == eina_hash_find(_vc_elm_core_get_config_widget_map(), elm_widget_type_get((Evas_Object*)info->address)))) {
- VC_ELM_LOG_ERR("Not supported widget");
- }
- _vc_elm_core_set_auto_object_command((Evas_Object*)info->address, info->text);
+ if (NULL != widget_type && (!strcmp(widget_type, "Elm_Genlist") || !strcmp(widget_type, "Elm_Gengrid") || !strcmp(widget_type, "Elm_List"))) {
+ int x = info->geometry_info.x;
+ int y = info->geometry_info.y;
+ int w = info->geometry_info.w;
+ int h = info->geometry_info.h;
+ Elm_Object_Item *it = __vc_elm_core_get_object_item_from_geometry_info((Evas_Object*)grand->address, widget_type, x, y, w, h);
+ if (NULL != it) {
+ _vc_elm_core_set_auto_item_object_command(it, info->text);
+ VC_ELM_LOG_DBG("Get object from geometry(%p)", it);
+ continue;
+ }
+ } else if (NULL != widget_type && (!strcmp(widget_type, "Elm_Toolbar"))) {
+ Elm_Object_Item *it = elm_toolbar_item_find_by_label((Evas_Object*)grand->address, info->text);
+ if (NULL != it) {
+ _vc_elm_core_set_auto_item_object_command(it, info->text);
+ VC_ELM_LOG_DBG("Get object from label(%p)", it);
+ continue;
+ }
+ } else if (NULL != widget_type && (!strcmp(widget_type, "Elm_Ctxpopup"))) {
+ /* TODO */
+ VC_ELM_LOG_ERR("TODO - Elm_Ctxpopup");
+ } else {
+ VC_ELM_LOG_ERR("Not supported widget manually");
+ }
+ }
+ if (NULL != info) {
+ if (NULL != info->text && NULL != info->part_name) {
+ Eina_List *iter = NULL;
+ char *part_name = NULL;
+ EINA_LIST_FOREACH(g_allowed_text_part_list, iter, part_name) {
+ if (NULL != part_name && !strcmp(part_name, info->part_name)) {
+ VC_ELM_LOG_DBG("Text (%s), Part(%s)", info->text, info->part_name);
+ VC_ELM_LOG_ERR("Widget is supported automatically with part name");
+ _vc_elm_widget_wrapper_add_command(info->text, NULL);
}
-// }
-// }
+ }
+ } else {
+ if (!_vc_elm_core_register_default_widget(_get_ui_object_name((Evas_Object*)info->address), EINA_FALSE, NULL)
+ || (NULL == eina_hash_find(_vc_elm_core_get_config_widget_map(), elm_widget_type_get((Evas_Object*)info->address)))) {
+ VC_ELM_LOG_ERR("Not supported widget");
+ }
+ _vc_elm_core_set_auto_object_command((Evas_Object*)info->address, info->text);
+ continue;
+ }
}
}
VC_ELM_LOG_DBG("reading XML start");
doc = xmlParseFile(VC_ELM_CONFIG_XML);
if (doc == NULL) {
- VC_ELM_LOG_ERR("Failed to parse XML file");
+ VC_ELM_LOG_ERR("Failed to parse XML file, path(%s)", VC_ELM_CONFIG_XML);
return VC_ELM_ERROR_OPERATION_FAILED;
}
return EINA_FALSE;
}
+static Eina_Bool _has_accessible_name(Object_Info *object_info)
+{
+ Object_Info* parent_info = ea_object_dump_parent_widget_data_get(object_info);
+ while (NULL != parent_info) {
+ char* text = NULL;
+ Evas_Object *obj = (Evas_Object *)(parent_info->address);
+ const char* widget_type = elm_widget_type_get(obj);
+
+ if (NULL != widget_type) {
+ if (elm_atspi_accessible_name_get(obj) && EINA_TRUE == parent_info->focusable && EINA_TRUE == _is_clickable_object(obj)) {
+ text = elm_atspi_accessible_name_get(obj);
+ VC_ELM_LOG_DUMP("####### [DEBUG] atspi_text(%s)", text);
+ } else if (elm_atspi_accessible_name_get(obj) && !strcmp(widget_type, "Elm_Toolbar")) {
+ text = elm_atspi_accessible_name_get(obj);
+ VC_ELM_LOG_DUMP("####### [DEBUG] toolbar(%s)", text);
+ }
+ }
+ if (NULL != text) {
+ VC_ELM_LOG_DUMP("####### [DEBUG] widget_type(s), text(%s)", widget_type, text);
+ return EINA_TRUE;
+ }
+ parent_info = ea_object_dump_parent_widget_data_get(parent_info);
+ }
+ return EINA_FALSE;
+}
+
static void
_obj_tree_items_exclude_unfocusable_text(Ea_Util_Mgr *util_mgr, Evas_Object *obj, Object_Info *parent, Eina_Bool parent_widget_focusable, Eina_Bool list_type, int cnt)
{
} else if (elm_atspi_accessible_name_get(obj) && !strcmp(evas_object_type_get(obj), "elm_layout") && EINA_TRUE == _is_descendant_of_toolbar(object_info)) {
text = elm_atspi_accessible_name_get(obj);
VC_ELM_LOG_DUMP("####### [DEBUG] toolbar(%s)", text);
+ } else {
+ if (EINA_FALSE == _has_accessible_name(object_info)) {
+ if (!strcmp(evas_object_type_get(obj), "text")) {
+ text = eina_stringshare_add(evas_object_text_text_get(obj));
+ VC_ELM_LOG_DUMP("####### [DEBUG] text(%s), part_name(%s)", text, object_info->part_name);
+ } else if (!strcmp(evas_object_type_get(obj), "textblock")) {
+ ret = evas_object_textblock_text_markup_get(obj);
+ temp = evas_textblock_text_markup_to_utf8(obj, ret);
+ text = eina_stringshare_add(temp);
+ VC_ELM_LOG_DUMP("####### [DEBUG] textblock(%s), part_name(%s)", text, object_info->part_name);
+
+ if (NULL != temp) {
+ free(temp);
+ temp = NULL;
+ }
+ }
+ }
}
}
if (text && strlen(text) > 0) {
ea_object_dump_parent_widget_data_get(const Object_Info *obj_info)
{
if (NULL == obj_info) {
+ VC_ELM_LOG_DUMP("obj_info is NULL");
return NULL;
}