summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Hollerbach <marcel@osg.samsung.com>2017-11-01 15:24:36 +0100
committerMarcel Hollerbach <marcel@osg.samsung.com>2017-11-01 15:26:52 +0100
commit08d104498c7a72f1e60e030c70f8d809465051c8 (patch)
treeee6eaf81a8069182e05f05e4e0231da48dc124f8
parent9021c752cb526aa69d1da90c9eeb14d77f1e1037 (diff)
downloadefl-08d104498c7a72f1e60e030c70f8d809465051c8.tar.gz
efl_ui_focus_manager: improve debug informations
-rw-r--r--src/lib/elementary/efl_ui_focus_manager.eo4
-rw-r--r--src/lib/elementary/efl_ui_focus_manager_calc.c40
-rw-r--r--src/lib/elementary/elm_widget.c2
3 files changed, 34 insertions, 12 deletions
diff --git a/src/lib/elementary/efl_ui_focus_manager.eo b/src/lib/elementary/efl_ui_focus_manager.eo
index 60d75788fd..5dc0e25583 100644
--- a/src/lib/elementary/efl_ui_focus_manager.eo
+++ b/src/lib/elementary/efl_ui_focus_manager.eo
@@ -11,9 +11,11 @@ struct Efl.Ui.Focus.Relations {
down : list<Efl.Ui.Focus.Object>; [[[List of objects below]]
next : Efl.Ui.Focus.Object; [[[Next object]]
prev : Efl.Ui.Focus.Object; [[Previous object]]
- type : string; [[Object type]]
parent : Efl.Ui.Focus.Object; [[Parent object]]
redirect : Efl.Ui.Focus.Manager; [[Redirect manager]]
+ node : Efl.Ui.Focus.Object; [[The node where this is the information from]]
+ logical : bool; [[true if this node is only logical]]
+ position_in_history : int; [[The position in the history stack]]
}
struct Efl.Ui.Focus.Manager.Logical_End_Detail {
diff --git a/src/lib/elementary/efl_ui_focus_manager_calc.c b/src/lib/elementary/efl_ui_focus_manager_calc.c
index 1500a3fb79..61c2c7c4d4 100644
--- a/src/lib/elementary/efl_ui_focus_manager_calc.c
+++ b/src/lib/elementary/efl_ui_focus_manager_calc.c
@@ -1597,16 +1597,13 @@ _efl_ui_focus_manager_calc_efl_ui_focus_manager_fetch(Eo *obj, Efl_Ui_Focus_Mana
res->down = DIR_CLONE(EFL_UI_FOCUS_DIRECTION_DOWN);
res->next = (tmp = _next(n)) ? tmp->focusable : NULL;
res->prev = (tmp = _prev(n)) ? tmp->focusable : NULL;
- switch(n->type)
- {
- case NODE_TYPE_ONLY_LOGICAL:
- res->type = "logical";
- break;
- case NODE_TYPE_NORMAL:
- res->type = "normal";
- break;
- }
- res->parent = T(n).parent->focusable;
+ res->position_in_history = eina_list_data_idx(pd->focus_stack, n);
+ res->node = child;
+
+ res->logical = (n->type == NODE_TYPE_ONLY_LOGICAL);
+
+ if (T(n).parent)
+ res->parent = T(n).parent->focusable;
res->redirect = n->redirect_manager;
#undef DIR_CLONE
@@ -1690,5 +1687,28 @@ _efl_ui_focus_manager_calc_efl_ui_focus_manager_request_subchild(Eo *obj, Efl_Ui
return NULL;
}
+EOLIAN static void
+_efl_ui_focus_manager_calc_efl_object_dbg_info_get(Eo *obj, Efl_Ui_Focus_Manager_Calc_Data *pd, Efl_Dbg_Info *root)
+{
+ efl_dbg_info_get(efl_super(obj, MY_CLASS), root);
+ Efl_Dbg_Info *append, *group = EFL_DBG_INFO_LIST_APPEND(root, "Efl.Ui.Focus.Manager");
+ Eina_Iterator *iter;
+ Eina_Value *list;
+ Node *node;
+
+ list = eina_value_list_new(EINA_VALUE_TYPE_UINT64);
+
+ append = EFL_DBG_INFO_LIST_APPEND(group, "children");
+
+ iter = eina_hash_iterator_data_new(pd->node_hash);
+ EINA_ITERATOR_FOREACH(iter, node)
+ {
+ EFL_DBG_INFO_APPEND(append, "-", EINA_VALUE_TYPE_UINT64, node->focusable);
+ }
+ eina_iterator_free(iter);
+}
+
+#define EFL_UI_FOCUS_MANAGER_CALC_EXTRA_OPS \
+ EFL_OBJECT_OP_FUNC(efl_dbg_info_get, _efl_ui_focus_manager_calc_efl_object_dbg_info_get)
#include "efl_ui_focus_manager_calc.eo.c"
diff --git a/src/lib/elementary/elm_widget.c b/src/lib/elementary/elm_widget.c
index 421ccf6060..26ec1563eb 100644
--- a/src/lib/elementary/elm_widget.c
+++ b/src/lib/elementary/elm_widget.c
@@ -3152,7 +3152,7 @@ _elm_widget_efl_object_dbg_info_get(Eo *eo_obj, Elm_Widget_Smart_Data *_pd EINA_
{
focus = EFL_DBG_INFO_LIST_APPEND(group, "Focus");
- EFL_DBG_INFO_APPEND(focus, "type", EINA_VALUE_TYPE_STRING, rel->type);
+ EFL_DBG_INFO_APPEND(focus, "logical", EINA_VALUE_TYPE_CHAR, rel->logical );
EFL_DBG_INFO_APPEND(focus, "manager", EINA_VALUE_TYPE_UINT64, _pd->focus.manager);
EFL_DBG_INFO_APPEND(focus, "parent", EINA_VALUE_TYPE_UINT64, rel->parent);
EFL_DBG_INFO_APPEND(focus, "next", EINA_VALUE_TYPE_UINT64 , rel->next);