summaryrefslogtreecommitdiff
path: root/src/lib/elementary
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 /src/lib/elementary
parent9021c752cb526aa69d1da90c9eeb14d77f1e1037 (diff)
efl_ui_focus_manager: improve debug informations
Diffstat (limited to 'src/lib/elementary')
-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 {
11 down : list<Efl.Ui.Focus.Object>; [[[List of objects below]] 11 down : list<Efl.Ui.Focus.Object>; [[[List of objects below]]
12 next : Efl.Ui.Focus.Object; [[[Next object]] 12 next : Efl.Ui.Focus.Object; [[[Next object]]
13 prev : Efl.Ui.Focus.Object; [[Previous object]] 13 prev : Efl.Ui.Focus.Object; [[Previous object]]
14 type : string; [[Object type]]
15 parent : Efl.Ui.Focus.Object; [[Parent object]] 14 parent : Efl.Ui.Focus.Object; [[Parent object]]
16 redirect : Efl.Ui.Focus.Manager; [[Redirect manager]] 15 redirect : Efl.Ui.Focus.Manager; [[Redirect manager]]
16 node : Efl.Ui.Focus.Object; [[The node where this is the information from]]
17 logical : bool; [[true if this node is only logical]]
18 position_in_history : int; [[The position in the history stack]]
17} 19}
18 20
19struct Efl.Ui.Focus.Manager.Logical_End_Detail { 21struct 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
1597 res->down = DIR_CLONE(EFL_UI_FOCUS_DIRECTION_DOWN); 1597 res->down = DIR_CLONE(EFL_UI_FOCUS_DIRECTION_DOWN);
1598 res->next = (tmp = _next(n)) ? tmp->focusable : NULL; 1598 res->next = (tmp = _next(n)) ? tmp->focusable : NULL;
1599 res->prev = (tmp = _prev(n)) ? tmp->focusable : NULL; 1599 res->prev = (tmp = _prev(n)) ? tmp->focusable : NULL;
1600 switch(n->type) 1600 res->position_in_history = eina_list_data_idx(pd->focus_stack, n);
1601 { 1601 res->node = child;
1602 case NODE_TYPE_ONLY_LOGICAL: 1602
1603 res->type = "logical"; 1603 res->logical = (n->type == NODE_TYPE_ONLY_LOGICAL);
1604 break; 1604
1605 case NODE_TYPE_NORMAL: 1605 if (T(n).parent)
1606 res->type = "normal"; 1606 res->parent = T(n).parent->focusable;
1607 break;
1608 }
1609 res->parent = T(n).parent->focusable;
1610 res->redirect = n->redirect_manager; 1607 res->redirect = n->redirect_manager;
1611#undef DIR_CLONE 1608#undef DIR_CLONE
1612 1609
@@ -1690,5 +1687,28 @@ _efl_ui_focus_manager_calc_efl_ui_focus_manager_request_subchild(Eo *obj, Efl_Ui
1690 return NULL; 1687 return NULL;
1691} 1688}
1692 1689
1690EOLIAN static void
1691_efl_ui_focus_manager_calc_efl_object_dbg_info_get(Eo *obj, Efl_Ui_Focus_Manager_Calc_Data *pd, Efl_Dbg_Info *root)
1692{
1693 efl_dbg_info_get(efl_super(obj, MY_CLASS), root);
1694 Efl_Dbg_Info *append, *group = EFL_DBG_INFO_LIST_APPEND(root, "Efl.Ui.Focus.Manager");
1695 Eina_Iterator *iter;
1696 Eina_Value *list;
1697 Node *node;
1698
1699 list = eina_value_list_new(EINA_VALUE_TYPE_UINT64);
1700
1701 append = EFL_DBG_INFO_LIST_APPEND(group, "children");
1702
1703 iter = eina_hash_iterator_data_new(pd->node_hash);
1704 EINA_ITERATOR_FOREACH(iter, node)
1705 {
1706 EFL_DBG_INFO_APPEND(append, "-", EINA_VALUE_TYPE_UINT64, node->focusable);
1707 }
1708 eina_iterator_free(iter);
1709}
1710
1711#define EFL_UI_FOCUS_MANAGER_CALC_EXTRA_OPS \
1712 EFL_OBJECT_OP_FUNC(efl_dbg_info_get, _efl_ui_focus_manager_calc_efl_object_dbg_info_get)
1693 1713
1694#include "efl_ui_focus_manager_calc.eo.c" 1714#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_
3152 { 3152 {
3153 focus = EFL_DBG_INFO_LIST_APPEND(group, "Focus"); 3153 focus = EFL_DBG_INFO_LIST_APPEND(group, "Focus");
3154 3154
3155 EFL_DBG_INFO_APPEND(focus, "type", EINA_VALUE_TYPE_STRING, rel->type); 3155 EFL_DBG_INFO_APPEND(focus, "logical", EINA_VALUE_TYPE_CHAR, rel->logical );
3156 EFL_DBG_INFO_APPEND(focus, "manager", EINA_VALUE_TYPE_UINT64, _pd->focus.manager); 3156 EFL_DBG_INFO_APPEND(focus, "manager", EINA_VALUE_TYPE_UINT64, _pd->focus.manager);
3157 EFL_DBG_INFO_APPEND(focus, "parent", EINA_VALUE_TYPE_UINT64, rel->parent); 3157 EFL_DBG_INFO_APPEND(focus, "parent", EINA_VALUE_TYPE_UINT64, rel->parent);
3158 EFL_DBG_INFO_APPEND(focus, "next", EINA_VALUE_TYPE_UINT64 , rel->next); 3158 EFL_DBG_INFO_APPEND(focus, "next", EINA_VALUE_TYPE_UINT64 , rel->next);