Sync with tizen branch 26/95026/1 accepted/tizen/3.0/common/20161114.081227 accepted/tizen/3.0/ivi/20161103.001839 accepted/tizen/3.0/mobile/20161103.001752 accepted/tizen/3.0/tv/20161103.001805 accepted/tizen/3.0/wearable/20161103.001821 submit/tizen_3.0/20161102.073057 submit/tizen_3.0_common/20161110.084657
authorsooyeon.kim <sooyeon.kim@samsung.com>
Wed, 2 Nov 2016 06:40:22 +0000 (15:40 +0900)
committersooyeon.kim <sooyeon.kim@samsung.com>
Wed, 2 Nov 2016 06:40:51 +0000 (15:40 +0900)
Change-Id: I148f15e77296f591ac36b99f5fa71c34ed33944e
Signed-off-by: sooyeon.kim <sooyeon.kim@samsung.com>
src/vc_elm_core.c
src/vc_elm_efl_dump.c
src/vc_elm_efl_dump.h
src/vc_elm_widget_wrapper.c

index 31e506e78c035912e613381ac061734b3c13c79e..594198b0ffb58b86b66384f301d06e600e489a2c 100644 (file)
@@ -1159,7 +1159,7 @@ static void __vc_add_commands()
                        ea_object_dump_list_clear();
                        g_dump_list = NULL;
                }
-               g_dump_list = ea_object_dump_full_list_get();
+               g_dump_list = ea_object_dump_full_list_get(EINA_TRUE);
                VC_ELM_LOG_DBG("Count (%d)", eina_list_count(g_dump_list));
 
                Eina_List *dump_iter = NULL;
@@ -1717,7 +1717,7 @@ static void __vc_elm_event_window_focus_in(void *data, Evas_Object *obj, void *e
        (void)obj;
        (void)event_info;
 
-       vc_widget_set_foreground(EINA_TRUE);
+       //vc_widget_set_foreground(EINA_TRUE);
 
        VC_ELM_LOG_DBG("Focus in");
 }
@@ -1731,7 +1731,7 @@ static void __vc_elm_event_window_focus_out(void *data, Evas_Object *obj, void *
        (void)obj;
        (void)event_info;
 
-       vc_widget_set_foreground(EINA_FALSE);
+       //vc_widget_set_foreground(EINA_FALSE);
 
        _vc_elm_turn_off_tooltips();
 
index f59c03e6c20ada6e22b3ac2aecc435a8c230d982..dda3002bef03be76fbb9ada079828d94ce45a338 100644 (file)
@@ -324,6 +324,179 @@ next:
      }
 }
 
+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_List *children = NULL, *l = NULL;
+   Evas_Object *child, *smart_parent_obj = NULL;
+   Evas_Coord x = 0, y = 0, w = 0, h = 0;
+   Eina_Bool is_clip = EINA_FALSE;
+   int r = 0, g = 0, b = 0, a = 0;
+   const char *ret = NULL;
+   double val = 0.0;
+   const char *file = NULL, *key = NULL, *group = NULL, *text = NULL;
+   Edje_Info *edje_info = NULL;
+   Object_Info *object_info = NULL;
+
+   // visible check
+   if (!evas_object_is_visible_get(obj)) return;
+
+   // viewport check
+   evas_object_geometry_get(obj, &x, &y, &w, &h);
+
+   if (!RECTS_INTERSECT(x,y,w,h, util_mgr->x, util_mgr->y, util_mgr->w, util_mgr->h)) return;
+
+   // clipper check
+   if (evas_object_clipees_get(obj)) is_clip = EINA_TRUE;
+   if (is_clip) goto next;
+
+   if (!strcmp(evas_object_type_get(obj), "text") || !strcmp(evas_object_type_get(obj), "textblock"))
+     {
+        if (!parent_widget_focusable) goto next;
+     }
+
+   object_info = calloc(1, sizeof(Object_Info));
+
+   object_info->parent = parent;
+
+   object_info->address = (int)obj;
+   object_info->geometry_info.x = x;
+   object_info->geometry_info.y = y;
+   object_info->geometry_info.w = w;
+   object_info->geometry_info.h = h;
+
+   if (elm_widget_is(obj))
+     {
+        if (elm_object_focus_get(obj))
+          object_info->focus = EINA_TRUE;
+        else
+          object_info->focus = EINA_FALSE;
+
+        if (elm_widget_can_focus_get(obj) &&
+            (!elm_object_disabled_get(obj)))
+          {
+             object_info->focusable = EINA_TRUE;
+             parent_widget_focusable = EINA_TRUE;
+          }
+        else
+          {
+             object_info->focusable = EINA_FALSE;
+             parent_widget_focusable = EINA_FALSE;
+          }
+     }
+
+   // evas object type check
+   if (evas_object_is_swallow_rect(obj))
+     {
+        object_info->type = calloc(1, strlen("swallow") + 1);
+        strncpy(object_info->type, "swallow", strlen("swallow") + 1);
+     }
+   else if (evas_object_type_match(obj, "rectangle"))
+     {
+        object_info->type = calloc(1, strlen("rect") + 1);
+        strncpy(object_info->type, "rect", strlen("rect") + 1);
+        evas_object_color_get(obj, &r, &g, &b, &a);
+        object_info->rgb_info.r = r;
+        object_info->rgb_info.g = g;
+        object_info->rgb_info.b = b;
+        object_info->rgb_info.a = a;
+     }
+   else
+     {
+        object_info->type = calloc(1, strlen(evas_object_type_get(obj)) + 1);
+        strncpy(object_info->type, evas_object_type_get(obj), strlen(evas_object_type_get(obj)) + 1);
+     }
+
+   smart_parent_obj = evas_object_smart_parent_get(obj);
+
+   // image info save
+   if (!strcmp(evas_object_type_get(obj), "elm_icon") ||
+       !strcmp(evas_object_type_get(obj), "elm_image"))
+     {
+        elm_image_file_get(obj, &file, &key);
+        evas_object_data_set(obj, "image_name", file);
+     }
+
+   // image name check
+   if (smart_parent_obj && evas_object_type_match(obj, "image")
+       && (evas_object_type_match(smart_parent_obj, "elm_icon")
+           || evas_object_type_match(smart_parent_obj, "elm_image")))
+     {
+        if ((ret = evas_object_data_get(smart_parent_obj, "image_name")))
+          {
+             _extract_edje_file_name(object_info, ret);
+             evas_object_data_del(smart_parent_obj, "edje_image_name");
+          }
+     }
+
+   // edje info save
+   if(evas_object_type_match(obj, "edje"))
+     {
+        edje_object_file_get(obj, &file, &group);
+        if (group)
+          {
+             object_info->group = calloc(1, strlen(group) + 1);
+             strncpy(object_info->group, group, strlen(group) + 1);
+          }
+
+        _extract_edje_file_name(object_info, file);
+        _edje_file_info_save(util_mgr, obj);
+     }
+
+   // edje info check
+   if( !is_clip && smart_parent_obj
+       && !elm_widget_is(obj) && evas_object_type_match(smart_parent_obj, "edje"))
+     {
+        EINA_LIST_FOREACH(util_mgr->edje_part_name_list, l, edje_info)
+          {
+             if(edje_info->obj == obj)
+               {
+                  if (edje_info->color_class)
+                    {
+                       object_info->color_class = calloc(1, strlen(edje_info->color_class) + 1);
+                       strncpy(object_info->color_class, edje_info->color_class, strlen(edje_info->color_class) + 1);
+                    }
+
+                  ret = edje_object_part_state_get(evas_object_smart_parent_get(obj), edje_info->part_name, &val);
+                  object_info->part_name = calloc(1, strlen(edje_info->part_name) + 1);
+                  object_info->part_state = calloc(1, strlen(ret) + 1);
+                  strncpy(object_info->part_name, edje_info->part_name, strlen(edje_info->part_name) + 1);
+                  strncpy(object_info->part_state, ret, strlen(ret) + 1);
+
+                  if (edje_info->image_name)
+                    {
+                       object_info->image_name = calloc(1, strlen(edje_info->image_name) + 1);
+                       strncpy(object_info->image_name, edje_info->image_name, strlen(edje_info->image_name) + 1);
+                    }
+                  break;
+               }
+          }
+     }
+
+   text = NULL;
+   if (!strcmp(evas_object_type_get(obj), "text"))
+     text = eina_stringshare_add(evas_object_text_text_get(obj));
+   else if (!strcmp(evas_object_type_get(obj), "textblock"))
+     {
+        ret = evas_object_textblock_text_markup_get(obj);
+        text = eina_stringshare_add(evas_textblock_text_markup_to_utf8(obj, ret));
+     }
+   if (text && strlen(text) > 0)
+     {
+        object_info->text = calloc(1, strlen(text) + 1);
+        strncpy(object_info->text, text, strlen(text) + 1);
+     }
+
+   ret_list = eina_list_append(ret_list, object_info);
+next:
+   if (!evas_object_type_match(obj, "rectangle") && !evas_object_type_match(obj, "text") && !evas_object_type_match(obj, "image"))
+     {
+        children = evas_object_smart_members_get(obj);
+        EINA_LIST_FREE(children, child)
+           _obj_tree_items_exclude_unfocusable_text(util_mgr, child, object_info, parent_widget_focusable);
+     }
+}
+
 static void
 _obj_tree_text_items(Ea_Util_Mgr *util_mgr, Evas_Object *obj)
 {
@@ -380,7 +553,72 @@ next:
 }
 
 static void
-_object_tree(Ea_Util_Mgr *util_mgr, int val)
+_obj_tree_text_items_exclude_unfocusable_text(Ea_Util_Mgr *util_mgr, Evas_Object *obj, Eina_Bool parent_widget_focusable)
+{
+   Eina_List *children = NULL, *l = NULL;
+   Evas_Object *child;
+   Evas_Coord x = 0, y = 0, w = 0, h = 0;
+   Eina_Bool is_clip = EINA_FALSE;
+   const char *ret = NULL;
+   const char *text = NULL;
+   char* data = NULL;
+   Eina_Bool check;
+
+   // visible check
+   if (!evas_object_is_visible_get(obj)) return;
+
+   // viewport check
+   evas_object_geometry_get(obj, &x, &y, &w, &h);
+
+   if (!RECTS_INTERSECT(x,y,w,h, util_mgr->x, util_mgr->y, util_mgr->w, util_mgr->h)) return;
+
+   // clipper check
+   if (evas_object_clipees_get(obj)) is_clip = EINA_TRUE;
+   if (is_clip) goto next;
+
+   if (elm_widget_is(obj))
+     {
+        if (elm_widget_can_focus_get(obj)) parent_widget_focusable = EINA_TRUE;
+        else parent_widget_focusable = EINA_FALSE;
+     }
+
+   text = NULL;
+   if (!strcmp(evas_object_type_get(obj), "text"))
+     {
+        if (!parent_widget_focusable) goto next;
+        text = eina_stringshare_add(evas_object_text_text_get(obj));
+     }
+   else if (!strcmp(evas_object_type_get(obj), "textblock"))
+     {
+        if (!parent_widget_focusable) goto next;
+        ret = evas_object_textblock_text_markup_get(obj);
+        text = eina_stringshare_add(evas_textblock_text_markup_to_utf8(obj, ret));
+     }
+   if (text && strlen(text) > 0)
+     {
+        check = EINA_TRUE;
+        EINA_LIST_FOREACH(ret_text_list, l, data)
+          {
+             if (!strcmp(data, text))
+               {
+                  check = EINA_FALSE;
+                  break;
+               }
+          }
+        if (check) ret_text_list = eina_list_append(ret_text_list, text);
+     }
+
+next:
+   if (!evas_object_type_match(obj, "rectangle") && !evas_object_type_match(obj, "text") && !evas_object_type_match(obj, "image"))
+     {
+        children = evas_object_smart_members_get(obj);
+        EINA_LIST_FREE(children, child)
+           _obj_tree_text_items_exclude_unfocusable_text(util_mgr, child, parent_widget_focusable);
+     }
+}
+
+static void
+_object_tree(Ea_Util_Mgr *util_mgr, int val, Eina_Bool exclude_unfocusable_text)
 {
    Eina_List *objs = NULL;
    Evas_Object *obj = NULL;
@@ -389,14 +627,30 @@ _object_tree(Ea_Util_Mgr *util_mgr, int val)
 
    if (val == 1)
      {
+        if (exclude_unfocusable_text)
+          {
+             EINA_LIST_FREE(objs, obj)
+                _obj_tree_items_exclude_unfocusable_text(util_mgr, obj, NULL, EINA_FALSE);
+          }
+        else
+          {
         EINA_LIST_FREE(objs, obj)
            _obj_tree_items(util_mgr, obj, NULL);
      }
+     }
    else if (val == 2)
      {
+        if (exclude_unfocusable_text)
+          {
+             EINA_LIST_FREE(objs, obj)
+                _obj_tree_text_items_exclude_unfocusable_text(util_mgr, obj, EINA_FALSE);
+          }
+        else
+          {
         EINA_LIST_FREE(objs, obj)
            _obj_tree_text_items(util_mgr, obj);
      }
+     }
 }
 
 void
@@ -410,7 +664,7 @@ ea_object_dump_list_clear(void)
 }
 
 Eina_List*
-ea_object_dump_full_list_get(void)
+ea_object_dump_full_list_get(Eina_Bool exclude_unfocusable_text)
 {
    Eina_List *ecore_evas_list = NULL;
    Ecore_Evas *ee = NULL;
@@ -439,7 +693,7 @@ ea_object_dump_full_list_get(void)
        ecore_wl_screen_size_get(&util_mgr->w, &util_mgr->h);
 
 
-        _object_tree(util_mgr, 1);
+        _object_tree(util_mgr, 1, exclude_unfocusable_text);
      }
 
 exit:
@@ -451,7 +705,7 @@ exit:
 }
 
 Eina_List*
-ea_object_dump_text_list_get(void)
+ea_object_dump_text_list_get(Eina_Bool exclude_unfocusable_text)
 {
    Eina_List *ecore_evas_list = NULL;
    Ecore_Evas *ee = NULL;
@@ -476,7 +730,7 @@ ea_object_dump_text_list_get(void)
        util_mgr->y = 0;
        ecore_wl_screen_size_get(&util_mgr->w, &util_mgr->h);
 
-        _object_tree(util_mgr, 2);
+        _object_tree(util_mgr, 2, exclude_unfocusable_text);
      }
 
 exit:
index 3962b0e60475822b49aabe955152c0d056b0d125..e51dacbf4eaf0bf4193b008240478136d0e4e358 100644 (file)
@@ -72,8 +72,8 @@ struct _Object_Info
 };
 
 void ea_object_dump_list_clear(void);
-Eina_List *ea_object_dump_full_list_get(void);
-Eina_List *ea_object_dump_text_list_get(void);
+Eina_List *ea_object_dump_full_list_get(Eina_Bool);
+Eina_List *ea_object_dump_text_list_get(Eina_Bool);
 Eina_List *ea_object_dump_find_data(Eina_List*, const char*, const char*);
 Object_Info *ea_object_dump_parent_widget_data_get(const Object_Info*);
 
index 290298e701c2e3ef689890ea5f5d16a3413f568f..2841c84a21e4b130ae4ed677b152a5377c4d154a 100644 (file)
@@ -219,7 +219,7 @@ static void __vc_state_changed_cb(vc_state_e previous, vc_state_e current, void
                break;
        case VC_STATE_READY:
                curr = "VC_STATE_READY";
-               vc_widget_set_foreground(EINA_TRUE);
+               //vc_widget_set_foreground(EINA_TRUE);
                vc_widget_get_current_language(&tmp_lang);
                if (NULL != tmp_lang) {
                        int ret = asprintf(&lang, "%s.UTF-8", tmp_lang);