/*
- * Copyright (c) 2011-2014 Samsung Electronics Co., Ltd All Rights Reserved
+ * Copyright (c) 2011-2016 Samsung Electronics Co., Ltd All Rights Reserved
*
* Licensed under the Apache License, Version 2.0 (the License);
* you may not use this file except in compliance with the License.
#include <stdbool.h>
#include <stdlib.h>
#include <Ecore_Evas.h>
+#include <efl_util.h>
#include <libxml/parser.h>
#include <voice_control_widget.h>
#include "vc_elm_tooltip.h"
#include "vc_elm_rectangle.h"
+#include "vc_elm_efl_dump.h"
+
#ifdef _
#undef _
#endif
static Ecore_Timer *g_animation_view_idler = NULL;
static Eina_Bool g_view_changed = EINA_FALSE;
+static Eina_List *g_dump_list = NULL;
+
+static Eina_List *g_allowed_text_part_list = NULL;
+
#define HIDE 0xa
#define X_VISIBILITY_TOLERANCE 32.0
#define Y_VISIBILITY_TOLERANCE 54.0
return ret;
}
+static Eina_Bool __click_event(void *data)
+{
+ (void)data;
+ efl_util_inputgen_h input_h;
+ input_h = efl_util_input_initialize_generator(EFL_UTIL_INPUT_DEVTYPE_KEYBOARD);
+ if (NULL != input_h) {
+ efl_util_input_generate_key(input_h, "Return", 1);
+ efl_util_input_generate_key(input_h, "Return", 0);
+ efl_util_input_deinitialize_generator(input_h);
+ }
+
+ VC_ELM_LOG_INFO("click!!!!!");
+
+ return EINA_FALSE;
+}
+
+static void __focused_cb(void *data, Evas_Object *obj, void *event_info)
+{
+ (void)event_info;
+ char* event = (char*)data;
+
+ if (NULL != event) {
+ if (!strcmp("focused", event)) {
+ evas_object_smart_callback_del(obj, "focused", __focused_cb);
+ } else if (!strcmp("item,focused", event)) {
+ evas_object_smart_callback_del(obj, "item,focused", __focused_cb);
+ }
+
+ ecore_timer_add(0.5, __click_event, NULL);
+ }
+}
+
/**
* @brief Function that matches recognition result to the registered actions
* and calls for action execution
free(tmp_cmd);
return EINA_TRUE;
+ } else {
+ int auto_mode = 0;
+ int click_method = 0;
+ _vc_elm_get_auto_register_mode(&auto_mode, &click_method);
+ if (1 == auto_mode) {
+ Eina_List *dump_iter = NULL;
+ void *data = NULL;
+ Eina_Bool text_found = EINA_FALSE;
+ 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)) {
+ if (!strcmp(info->text, cmd)) {
+ int x = info->geometry_info.x;
+ int y = info->geometry_info.y;
+ int w = info->geometry_info.w;
+ int h = info->geometry_info.h;
+ VC_ELM_LOG_DBG("Click event : %s x(%d) y(%d) w(%d) h(%d), address(%d) type(%s)", info->text, x, y, w, h, info->address, info->type);
+ if (0 == click_method) {
+ evas_event_feed_mouse_move(evas_object_evas_get((Evas_Object*)(info->address)), x + w/2, y + h/2, 0, NULL);
+ evas_event_feed_mouse_down(evas_object_evas_get((Evas_Object*)(info->address)), 1, EVAS_BUTTON_NONE, 1, NULL);
+ evas_event_feed_mouse_up(evas_object_evas_get((Evas_Object*)(info->address)), 1, EVAS_BUTTON_NONE, 2, NULL);
+ } else if (1 == click_method) {
+ VC_ELM_LOG_DBG("click method - focus/key");
+ Object_Info* parent_info = ea_object_dump_parent_widget_data_get(info);
+
+ if (NULL != parent_info && EINA_TRUE == parent_info->focusable) {
+ VC_ELM_LOG_DBG("Focusable Parent");
+ VC_ELM_LOG_DBG("Click event");
+ evas_object_smart_callback_add((Evas_Object*)(parent_info->address), "focused", __focused_cb, "focused");
+ elm_object_focus_set((Evas_Object*)(parent_info->address), EINA_TRUE);
+ } else {
+ Object_Info* grand_info = ea_object_dump_parent_widget_data_get(parent_info);
+ while (NULL != grand_info) {
+ if (EINA_TRUE == grand_info->focusable) {
+ VC_ELM_LOG_DBG("Focusable Grand parent");
+ Elm_Object_Item* item = elm_genlist_at_xy_item_get((Evas_Object*)(grand_info->address), x + w/2, y + h/2, NULL);
+ if (NULL != item && EINA_FALSE == elm_object_item_disabled_get(item)) {
+ VC_ELM_LOG_DBG("Click event");
+ evas_object_smart_callback_add((Evas_Object*)(grand_info->address), "item,focused", __focused_cb, "item,focused");
+ elm_object_item_focus_set(item, EINA_TRUE);
+ elm_object_focus_set((Evas_Object*)(grand_info->address), EINA_TRUE);
+ } else {
+ item = elm_genlist_at_xy_item_get((Evas_Object*)(grand_info->address), x + w + w/2, y + h/2, NULL);
+ if (NULL != item && EINA_FALSE == elm_object_item_disabled_get(item)) {
+ VC_ELM_LOG_DBG("Click event 2");
+ evas_object_smart_callback_add((Evas_Object*)(grand_info->address), "item,focused", __focused_cb, "item,focused");
+ elm_object_item_focus_set(item, EINA_TRUE);
+ elm_object_focus_set((Evas_Object*)(grand_info->address), EINA_TRUE);
+ }
+ }
+ break;
+ } else {
+ grand_info = ea_object_dump_parent_widget_data_get(grand_info);
+ }
+ }
+ }
+ VC_ELM_LOG_DBG("Nothing");
+ } else {
+ VC_ELM_LOG_DBG("Invalid click method");
+ }
+
+ /* Propagation */
+ //return EINA_TRUE;
+ text_found = EINA_TRUE;
+ }
+ }
+ }
+ }
+ }
+ ea_object_dump_list_clear();
+ g_dump_list = NULL;
+ return text_found;
+ }
}
return EINA_FALSE;
g_config_action_map = eina_hash_string_superfast_new(__hash_entry_stringshare_free_cb);
g_config_widget_map = eina_hash_string_superfast_new(__hash_entry_eina_list_free_cb);
+
+ if (NULL == g_allowed_text_part_list) {
+ g_allowed_text_part_list = eina_list_append(g_allowed_text_part_list, "elm.text");
+ }
+
ret = _vc_elm_core_read_xml_data();
g_view_changed = EINA_FALSE;
VC_ELM_LOG_DBG("XML RETURNED %d", ret);
void _vc_elm_core_fini()
{
+ if (NULL != g_allowed_text_part_list) {
+ char *data;
+ EINA_LIST_FREE(g_allowed_text_part_list, data) {
+ free(data);
+ data = NULL;
+ }
+
+ g_allowed_text_part_list = NULL;
+ }
+
eina_hash_free(g_widget_info_hash);
g_widget_info_hash = NULL;
eina_stringshare_del(obj_name);
}
+ int auto_mode = -1;
+ int click_method = -1;
+ _vc_elm_get_auto_register_mode(&auto_mode, &click_method);
+ VC_ELM_LOG_DBG("Auto mode (%d) Click method (%d)", auto_mode, click_method);
+ if (1 == auto_mode) {
+ if (NULL != g_dump_list) {
+ ea_object_dump_list_clear();
+ g_dump_list = NULL;
+ }
+ g_dump_list = ea_object_dump_full_list_get();
+ VC_ELM_LOG_DBG("Count (%d)", eina_list_count(g_dump_list));
+
+ Eina_List *dump_iter = NULL;
+ void *data = NULL;
+ 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);
+ _vc_elm_widget_wrapper_add_command(info->text, NULL);
+ }
+ }
+ }
+ }
+ }
+
_vc_elm_widget_wrapper_commit_commands(&__result_cb, NULL);
}
g_view_changed = EINA_TRUE;
__idle_changed(NULL);
}
+
+int _vc_elm_core_add_allowed_text_part(const char* text_part)
+{
+ if (NULL == g_allowed_text_part_list) {
+ return -1;
+ }
+
+ g_allowed_text_part_list = eina_list_append(g_allowed_text_part_list, text_part);
+ VC_ELM_LOG_DBG("Add Allowed text part (%s)", text_part);
+ return 0;
+}
+
+int _vc_elm_core_remove_allowed_text_part()
+{
+ char *data;
+
+ EINA_LIST_FREE(g_allowed_text_part_list, data) {
+ free(data);
+ data = NULL;
+ }
+
+ g_allowed_text_part_list = eina_list_append(g_allowed_text_part_list, "elm.text");
+ VC_ELM_LOG_DBG("Remove Allowed text part");
+ return 0;
+}
--- /dev/null
+/*
+ * Copyright (c) 2015-2016 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * @file vc_elm_efl_dump.c
+ * @brief The private module for efl object dump.
+ * @author Jaeyong Hwang <j_yong.hwang@samsung.com>
+ */
+
+#include "vc_elm_efl_dump.h"
+
+typedef struct _Ea_Util_Mgr
+{
+ Evas *evas;
+ FILE *fp;
+
+ Eina_List *edje_part_name_list;
+ int x,y,w,h;
+} Ea_Util_Mgr;
+
+typedef struct _Edje_Info
+{
+ const Evas_Object *obj;
+
+ char *part_name;
+ const char *image_name;
+ const char *color_class;
+
+} Edje_Info;
+
+#define SPANS_COMMON(x1, w1, x2, w2) \
+ (!(( (int)((x2) + (int)(w2)) <= (int)(x1)) || (int)((x2) >= (int)((x1) + (int)(w1)))))
+
+#define RECTS_INTERSECT(x, y, w, h, xx, yy, ww, hh) \
+ ((SPANS_COMMON((x), (w), (xx), (ww))) && (SPANS_COMMON((y), (h), (yy), (hh))))
+
+Eina_List *ret_list = NULL;
+Eina_List *ret_text_list = NULL;
+
+static Eina_Bool
+evas_object_is_visible_get(Evas_Object *obj)
+{
+ int r = 0, g = 0, b = 0, a = 0;
+ Evas_Coord x = 0, y = 0, w = 0, h = 0;
+ Evas_Object *clip = NULL;
+ int vis = 0;
+
+ evas_object_color_get(obj, &r, &g, &b, &a);
+ evas_object_geometry_get(obj, &x, &y, &w, &h);
+
+ if (evas_object_visible_get(obj)) vis = 1;
+ clip = evas_object_clip_get(obj);
+ if (clip) evas_object_color_get(obj, &r, &g, &b, &a);
+ if (clip && !evas_object_visible_get(clip)) vis = 0;
+
+ if (clip && a == 0) vis = 0;
+
+ if (0 == vis)
+ return EINA_FALSE;
+ else
+ return EINA_TRUE;
+}
+
+static Eina_Bool
+evas_object_type_match(const Evas_Object *obj, const char *type)
+{
+ int ret = strcmp(evas_object_type_get(obj), type);
+
+ if (!ret) return EINA_TRUE;
+ return EINA_FALSE;
+}
+
+static Eina_Bool
+evas_object_is_swallow_rect(const Evas_Object *obj)
+{
+ int r = 0, g = 0, b = 0, a = 0;
+
+ evas_object_color_get(obj, &r, &g, &b, &a);
+ if (!r && !g && !b && !a
+ && evas_object_pointer_mode_get(obj) == EVAS_OBJECT_POINTER_MODE_NOGRAB
+ && evas_object_pass_events_get(obj))
+ return EINA_TRUE;
+
+ return EINA_FALSE;
+}
+
+static void
+_extract_edje_file_name(Object_Info *object_info, const char *full_path)
+{
+ char name[255] = {0, };
+ unsigned int i, cnt = 0;
+
+ if (!full_path) return;
+
+ for (i = 0; i < strlen(full_path); i++)
+ {
+ if (full_path[i] == '/')
+ {
+ cnt = 0;
+ continue;
+ }
+ name[cnt++] = full_path[i];
+ }
+ name[cnt] = '\0';
+ object_info->edje_file = calloc(1, strlen(name) + 1);
+ strncpy(object_info->edje_file, name, strlen(name) + 1);
+}
+
+static void
+_edje_file_info_save(Ea_Util_Mgr *util_mgr, const Evas_Object *obj)
+{
+ Evas_Object *ed = NULL;
+ const Evas_Object *pobj = NULL;
+ Eina_List *parts = NULL, *l = NULL;
+ Edje_Info *edje_info = NULL;
+ const char *file = NULL, *group = NULL, *pname = NULL, *ret = NULL;
+ double val = 0.0;
+
+ if(!evas_object_type_match(obj, "edje")) return;
+
+ edje_object_file_get(obj, &file, &group);
+
+ ed = edje_edit_object_add(util_mgr->evas); // evas new ??
+ if (edje_object_file_set(ed, file, group))
+ {
+ parts = edje_edit_parts_list_get(ed);
+ EINA_LIST_FOREACH(parts, l, pname)
+ {
+ if ((pobj = edje_object_part_object_get(obj, pname)))
+ {
+ edje_info = malloc(sizeof(Edje_Info));
+ edje_info->obj = pobj;
+ edje_info->part_name = strdup(pname);
+ ret = edje_object_part_state_get(obj, edje_info->part_name, &val);
+
+ if (ret)
+ {
+ edje_info->color_class = edje_edit_state_color_class_get(ed, edje_info->part_name , ret, val);
+ edje_info->image_name = edje_edit_state_image_get(ed, edje_info->part_name , ret, val);
+ }
+
+ util_mgr->edje_part_name_list = eina_list_append(util_mgr->edje_part_name_list, edje_info);
+
+ }
+ }
+ edje_edit_string_list_free(parts);
+ }
+ evas_object_del(ed);
+}
+
+static void
+_obj_tree_items(Ea_Util_Mgr *util_mgr, Evas_Object *obj, Object_Info *parent)
+{
+ 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;
+
+ 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;
+ else
+ object_info->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(util_mgr, child, object_info);
+ }
+}
+
+static void
+_obj_tree_text_items(Ea_Util_Mgr *util_mgr, Evas_Object *obj)
+{
+ 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;
+
+ 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)
+ {
+ 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(util_mgr, child);
+ }
+}
+
+static void
+_object_tree(Ea_Util_Mgr *util_mgr, int val)
+{
+ Eina_List *objs = NULL;
+ Evas_Object *obj = NULL;
+
+ objs = evas_objects_in_rectangle_get(util_mgr->evas, SHRT_MIN, SHRT_MIN, USHRT_MAX, USHRT_MAX, EINA_TRUE, EINA_TRUE);
+
+ if (val == 1)
+ {
+ EINA_LIST_FREE(objs, obj)
+ _obj_tree_items(util_mgr, obj, NULL);
+ }
+ else if (val == 2)
+ {
+ EINA_LIST_FREE(objs, obj)
+ _obj_tree_text_items(util_mgr, obj);
+ }
+}
+
+void
+ea_object_dump_list_clear(void)
+{
+ Object_Info *obj_info = NULL;
+ EINA_LIST_FREE(ret_list, obj_info)
+ free(obj_info);
+
+ ret_list = NULL;
+}
+
+Eina_List*
+ea_object_dump_full_list_get(void)
+{
+ Eina_List *ecore_evas_list = NULL;
+ Ecore_Evas *ee = NULL;
+ Evas *evas = NULL;
+
+ if (!ret_list)
+ ea_object_dump_list_clear();
+
+ Ea_Util_Mgr *util_mgr = calloc(1, sizeof(Ea_Util_Mgr));
+ if (!util_mgr)
+ {
+ printf("Fail : utility manager memory alloc\n");
+ goto exit;
+ }
+
+ ecore_evas_list = ecore_evas_ecore_evas_list_get();
+
+ EINA_LIST_FREE(ecore_evas_list, ee)
+ {
+ evas = ecore_evas_get(ee);
+ util_mgr->evas = evas;
+
+ ecore_wl_sync();
+ util_mgr->x = 0;
+ util_mgr->y = 0;
+ ecore_wl_screen_size_get(&util_mgr->w, &util_mgr->h);
+
+
+ _object_tree(util_mgr, 1);
+ }
+
+exit:
+ if (!util_mgr) return NULL;
+ if (util_mgr->edje_part_name_list)
+ eina_list_free(util_mgr->edje_part_name_list); // need to check
+ free(util_mgr);
+ return ret_list;
+}
+
+Eina_List*
+ea_object_dump_text_list_get(void)
+{
+ Eina_List *ecore_evas_list = NULL;
+ Ecore_Evas *ee = NULL;
+ Evas *evas = NULL;
+
+ Ea_Util_Mgr *util_mgr = calloc(1, sizeof(Ea_Util_Mgr));
+ if (!util_mgr)
+ {
+ printf("Fail : utility manager memory alloc\n");
+ goto exit;
+ }
+
+ ecore_evas_list = ecore_evas_ecore_evas_list_get();
+
+ EINA_LIST_FREE(ecore_evas_list, ee)
+ {
+ evas = ecore_evas_get(ee);
+ util_mgr->evas = evas;
+
+ ecore_wl_sync();
+ util_mgr->x = 0;
+ util_mgr->y = 0;
+ ecore_wl_screen_size_get(&util_mgr->w, &util_mgr->h);
+
+ _object_tree(util_mgr, 2);
+ }
+
+exit:
+ if (!util_mgr) return NULL;
+ free(util_mgr);
+ return ret_text_list;
+}
+
+Eina_List*
+ea_object_dump_find_data(Eina_List *list, const char *str1, const char *str2)
+{
+ Eina_List *l = NULL;
+ Object_Info *data = NULL;
+ Eina_List *ret_data_list = NULL;
+
+ if (!list) return NULL;
+ if (!str1 || !str2) return NULL;
+
+ if (!strcmp(str1, "type"))
+ {
+ EINA_LIST_FOREACH(list, l, data)
+ {
+ if (data->type)
+ if (!strcmp(data->type, str2)) ret_data_list = eina_list_append(ret_data_list, data);
+ }
+ }
+ else if (!strcmp(str1, "edje_file"))
+ {
+ EINA_LIST_FOREACH(list, l, data)
+ {
+ if (data->edje_file)
+ if (!strcmp(data->edje_file, str2)) ret_data_list = eina_list_append(ret_data_list, data);
+ }
+ }
+ else if (!strcmp(str1, "group"))
+ {
+ EINA_LIST_FOREACH(list, l, data)
+ {
+ if (data->group)
+ if (!strcmp(data->group, str2)) ret_data_list = eina_list_append(ret_data_list, data);
+ }
+ }
+ else if (!strcmp(str1, "image_name"))
+ {
+ EINA_LIST_FOREACH(list, l, data)
+ {
+ if (data->image_name)
+ if (!strcmp(data->image_name, str2)) ret_data_list = eina_list_append(ret_data_list, data);
+ }
+ }
+ else if (!strcmp(str1, "color_class"))
+ {
+ EINA_LIST_FOREACH(list, l, data)
+ {
+ if (data->color_class)
+ if (!strcmp(data->color_class, str2)) ret_data_list = eina_list_append(ret_data_list, data);
+ }
+ }
+ else if (!strcmp(str1, "part_name"))
+ {
+ EINA_LIST_FOREACH(list, l, data)
+ {
+ if (data->part_name)
+ if (!strcmp(data->part_name, str2)) ret_data_list = eina_list_append(ret_data_list, data);
+ }
+ }
+ else if (!strcmp(str1, "part_state"))
+ {
+ EINA_LIST_FOREACH(list, l, data)
+ {
+ if (data->part_state)
+ if (!strcmp(data->part_state, str2)) ret_data_list = eina_list_append(ret_data_list, data);
+ }
+ }
+ else if (!strcmp(str1, "text"))
+ {
+ EINA_LIST_FOREACH(list, l, data)
+ {
+ if (data->text)
+ if (!strcmp(data->text, str2)) ret_data_list = eina_list_append(ret_data_list, data);
+ }
+ }
+
+ return ret_data_list;
+}
+
+Object_Info*
+ea_object_dump_parent_widget_data_get(const Object_Info *obj_info)
+{
+ Object_Info *parent_info = NULL;
+
+ parent_info = obj_info->parent;
+ while (parent_info)
+ {
+ if (strstr(parent_info->type, "elm"))
+ return parent_info;
+ parent_info = parent_info->parent;
+ }
+ return NULL;
+}