summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaehwan Kim <jae.hwan.kim@samsung.com>2015-09-15 19:41:51 +0900
committerJaehwan Kim <jae.hwan.kim@samsung.com>2015-09-15 19:53:23 +0900
commit431492ec497eeaa130f5c2da27ce7a4c7eefe7f9 (patch)
tree1235a45c72f1d295de173db3fb2ff3545dfcb9d4
parentf3844dcef81ac4c6a74513469d21040169002253 (diff)
focus: add the APIs to set the focus next about item.
Add elm_object_focus_next_item_set/get, elm_object_item_focus_next_object_set/get and elm_object_item_focus_next_item_set/get. If the item and object is set at the same time, the item is preference to object when the focus moves. This feature is implemented about gengrid. It will be implemented about ohter widgets. @feature
-rw-r--r--src/lib/elc_ctxpopup.c6
-rw-r--r--src/lib/elc_fileselector.c6
-rw-r--r--src/lib/elc_fileselector_entry.c6
-rw-r--r--src/lib/elc_multibuttonentry.c6
-rw-r--r--src/lib/elc_naviframe.c4
-rw-r--r--src/lib/elc_popup.c4
-rw-r--r--src/lib/elm_access.c4
-rw-r--r--src/lib/elm_box.c4
-rw-r--r--src/lib/elm_bubble.c4
-rw-r--r--src/lib/elm_calendar.c4
-rw-r--r--src/lib/elm_clock.c4
-rw-r--r--src/lib/elm_colorselector.c4
-rw-r--r--src/lib/elm_datetime.c8
-rw-r--r--src/lib/elm_diskselector.c12
-rw-r--r--src/lib/elm_entry.c2
-rw-r--r--src/lib/elm_flip.c6
-rw-r--r--src/lib/elm_focus.h45
-rw-r--r--src/lib/elm_frame.c4
-rw-r--r--src/lib/elm_gengrid.c108
-rw-r--r--src/lib/elm_genlist.c16
-rw-r--r--src/lib/elm_glview.c4
-rw-r--r--src/lib/elm_grid.c4
-rw-r--r--src/lib/elm_index.c4
-rw-r--r--src/lib/elm_inwin.c4
-rw-r--r--src/lib/elm_layout.c6
-rw-r--r--src/lib/elm_list.c16
-rw-r--r--src/lib/elm_main.c17
-rw-r--r--src/lib/elm_map.c4
-rw-r--r--src/lib/elm_notify.c4
-rw-r--r--src/lib/elm_object_item.h2
-rw-r--r--src/lib/elm_panel.c10
-rw-r--r--src/lib/elm_panes.c10
-rw-r--r--src/lib/elm_photocam.c4
-rw-r--r--src/lib/elm_plug.c4
-rw-r--r--src/lib/elm_prefs.c6
-rw-r--r--src/lib/elm_scroller.c21
-rw-r--r--src/lib/elm_segment_control.c4
-rw-r--r--src/lib/elm_slider.c4
-rw-r--r--src/lib/elm_spinner.c8
-rw-r--r--src/lib/elm_table.c4
-rw-r--r--src/lib/elm_toolbar.c8
-rw-r--r--src/lib/elm_web2.c4
-rw-r--r--src/lib/elm_widget.c230
-rw-r--r--src/lib/elm_widget.eo41
-rw-r--r--src/lib/elm_widget.h15
-rw-r--r--src/lib/elm_widget_item.eo36
-rw-r--r--src/lib/elm_win.c12
47 files changed, 567 insertions, 176 deletions
diff --git a/src/lib/elc_ctxpopup.c b/src/lib/elc_ctxpopup.c
index 73954d4db..f23f5880a 100644
--- a/src/lib/elc_ctxpopup.c
+++ b/src/lib/elc_ctxpopup.c
@@ -71,15 +71,15 @@ _elm_ctxpopup_elm_widget_focus_direction_manager_is(Eo *obj EINA_UNUSED, Elm_Ctx
71} 71}
72 72
73EOLIAN static Eina_Bool 73EOLIAN static Eina_Bool
74_elm_ctxpopup_elm_widget_focus_next(Eo *obj EINA_UNUSED, Elm_Ctxpopup_Data *sd, Elm_Focus_Direction dir, Evas_Object **next) 74_elm_ctxpopup_elm_widget_focus_next(Eo *obj EINA_UNUSED, Elm_Ctxpopup_Data *sd, Elm_Focus_Direction dir, Evas_Object **next, Elm_Object_Item **next_item)
75{ 75{
76 if (!sd) 76 if (!sd)
77 return EINA_FALSE; 77 return EINA_FALSE;
78 78
79 if (!elm_widget_focus_next_get(sd->box, dir, next)) 79 if (!elm_widget_focus_next_get(sd->box, dir, next, next_item))
80 { 80 {
81 elm_widget_focused_object_clear(sd->box); 81 elm_widget_focused_object_clear(sd->box);
82 elm_widget_focus_next_get(sd->box, dir, next); 82 elm_widget_focus_next_get(sd->box, dir, next, next_item);
83 } 83 }
84 84
85 return EINA_TRUE; 85 return EINA_TRUE;
diff --git a/src/lib/elc_fileselector.c b/src/lib/elc_fileselector.c
index 8dc2e039c..74fee6662 100644
--- a/src/lib/elc_fileselector.c
+++ b/src/lib/elc_fileselector.c
@@ -2412,7 +2412,7 @@ _elm_fileselector_elm_widget_focus_next_manager_is(Eo *obj EINA_UNUSED, Elm_File
2412} 2412}
2413 2413
2414EOLIAN static Eina_Bool 2414EOLIAN static Eina_Bool
2415_elm_fileselector_elm_widget_focus_next(Eo *obj EINA_UNUSED, Elm_Fileselector_Data *sd, Elm_Focus_Direction dir, Evas_Object **next) 2415_elm_fileselector_elm_widget_focus_next(Eo *obj EINA_UNUSED, Elm_Fileselector_Data *sd, Elm_Focus_Direction dir, Evas_Object **next, Elm_Object_Item **next_item)
2416{ 2416{
2417 Eina_List *items = NULL; 2417 Eina_List *items = NULL;
2418 2418
@@ -2425,9 +2425,9 @@ _elm_fileselector_elm_widget_focus_next(Eo *obj EINA_UNUSED, Elm_Fileselector_Da
2425 if (sd->ok_button) items = eina_list_append(items, sd->ok_button); 2425 if (sd->ok_button) items = eina_list_append(items, sd->ok_button);
2426 2426
2427 if (_elm_config->access_mode) 2427 if (_elm_config->access_mode)
2428 return elm_widget_focus_list_next_get(obj, items, eina_list_data_get, dir, next); 2428 return elm_widget_focus_list_next_get(obj, items, eina_list_data_get, dir, next, next_item);
2429 2429
2430 if (!elm_widget_focus_list_next_get(obj, items, eina_list_data_get, dir, next)) 2430 if (!elm_widget_focus_list_next_get(obj, items, eina_list_data_get, dir, next, next_item))
2431 *next = (Evas_Object *)obj; 2431 *next = (Evas_Object *)obj;
2432 2432
2433 eina_list_free(items); 2433 eina_list_free(items);
diff --git a/src/lib/elc_fileselector_entry.c b/src/lib/elc_fileselector_entry.c
index 40f94a37a..ba06a6f1c 100644
--- a/src/lib/elc_fileselector_entry.c
+++ b/src/lib/elc_fileselector_entry.c
@@ -127,7 +127,7 @@ _elm_fileselector_entry_elm_widget_focus_direction_manager_is(Eo *obj EINA_UNUSE
127} 127}
128 128
129EOLIAN static Eina_Bool 129EOLIAN static Eina_Bool
130_elm_fileselector_entry_elm_widget_focus_next(Eo *obj EINA_UNUSED, Elm_Fileselector_Entry_Data *sd, Elm_Focus_Direction dir, Evas_Object **next) 130_elm_fileselector_entry_elm_widget_focus_next(Eo *obj EINA_UNUSED, Elm_Fileselector_Entry_Data *sd, Elm_Focus_Direction dir, Evas_Object **next, Elm_Object_Item **next_item)
131{ 131{
132 Evas_Object *chain[2]; 132 Evas_Object *chain[2];
133 Evas_Object *to_focus; 133 Evas_Object *to_focus;
@@ -149,11 +149,11 @@ _elm_fileselector_entry_elm_widget_focus_next(Eo *obj EINA_UNUSED, Elm_Fileselec
149 149
150 i = elm_widget_focus_get(chain[1]); 150 i = elm_widget_focus_get(chain[1]);
151 151
152 if (elm_widget_focus_next_get(chain[i], dir, next)) return EINA_TRUE; 152 if (elm_widget_focus_next_get(chain[i], dir, next, next_item)) return EINA_TRUE;
153 153
154 i = !i; 154 i = !i;
155 155
156 if (elm_widget_focus_next_get(chain[i], dir, &to_focus)) 156 if (elm_widget_focus_next_get(chain[i], dir, &to_focus, next_item))
157 { 157 {
158 *next = to_focus; 158 *next = to_focus;
159 return !!i; 159 return !!i;
diff --git a/src/lib/elc_multibuttonentry.c b/src/lib/elc_multibuttonentry.c
index 98e1b5332..e9c44e50a 100644
--- a/src/lib/elc_multibuttonentry.c
+++ b/src/lib/elc_multibuttonentry.c
@@ -321,7 +321,7 @@ _view_update(Elm_Multibuttonentry_Data *sd)
321} 321}
322 322
323EOLIAN static Eina_Bool 323EOLIAN static Eina_Bool
324_elm_multibuttonentry_elm_widget_on_focus(Eo *obj, Elm_Multibuttonentry_Data *sd) 324_elm_multibuttonentry_elm_widget_on_focus(Eo *obj, Elm_Multibuttonentry_Data *sd, Elm_Object_Item *item EINA_UNUSED)
325{ 325{
326 if (elm_widget_focus_get(obj)) 326 if (elm_widget_focus_get(obj))
327 { 327 {
@@ -1606,7 +1606,7 @@ _elm_multibuttonentry_elm_widget_focus_next_manager_is(Eo *obj EINA_UNUSED, Elm_
1606} 1606}
1607 1607
1608EOLIAN static Eina_Bool 1608EOLIAN static Eina_Bool
1609_elm_multibuttonentry_elm_widget_focus_next(Eo *obj, Elm_Multibuttonentry_Data *sd, Elm_Focus_Direction dir, Evas_Object **next) 1609_elm_multibuttonentry_elm_widget_focus_next(Eo *obj, Elm_Multibuttonentry_Data *sd, Elm_Focus_Direction dir, Evas_Object **next, Elm_Object_Item **next_item)
1610{ 1610{
1611 Eina_Bool int_ret = EINA_FALSE; 1611 Eina_Bool int_ret = EINA_FALSE;
1612 1612
@@ -1651,7 +1651,7 @@ _elm_multibuttonentry_elm_widget_focus_next(Eo *obj, Elm_Multibuttonentry_Data *
1651 1651
1652 if (int_ret) 1652 if (int_ret)
1653 return elm_widget_focus_list_next_get 1653 return elm_widget_focus_list_next_get
1654 (obj, items, eina_list_data_get, dir, next); 1654 (obj, items, eina_list_data_get, dir, next, next_item);
1655 1655
1656 return EINA_FALSE; 1656 return EINA_FALSE;
1657} 1657}
diff --git a/src/lib/elc_naviframe.c b/src/lib/elc_naviframe.c
index b11eda3e9..f1830ab41 100644
--- a/src/lib/elc_naviframe.c
+++ b/src/lib/elc_naviframe.c
@@ -1306,7 +1306,7 @@ _on_obj_size_hints_changed(void *data EINA_UNUSED, Evas *e EINA_UNUSED,
1306} 1306}
1307 1307
1308EOLIAN static Eina_Bool 1308EOLIAN static Eina_Bool
1309_elm_naviframe_elm_widget_focus_next(Eo *obj, Elm_Naviframe_Data *sd EINA_UNUSED, Elm_Focus_Direction dir, Evas_Object **next) 1309_elm_naviframe_elm_widget_focus_next(Eo *obj, Elm_Naviframe_Data *sd EINA_UNUSED, Elm_Focus_Direction dir, Evas_Object **next, Elm_Object_Item **next_item)
1310{ 1310{
1311 Evas_Object *ao; 1311 Evas_Object *ao;
1312 1312
@@ -1331,7 +1331,7 @@ _elm_naviframe_elm_widget_focus_next(Eo *obj, Elm_Naviframe_Data *sd EINA_UNUSED
1331 if (ao) l = eina_list_append(l, ao); 1331 if (ao) l = eina_list_append(l, ao);
1332 } 1332 }
1333 1333
1334 int_ret = elm_widget_focus_list_next_get(obj, l, list_data_get, dir, next); 1334 int_ret = elm_widget_focus_list_next_get(obj, l, list_data_get, dir, next, next_item);
1335 eina_list_free(l); 1335 eina_list_free(l);
1336 1336
1337end: 1337end:
diff --git a/src/lib/elc_popup.c b/src/lib/elc_popup.c
index 7e5694688..73a130287 100644
--- a/src/lib/elc_popup.c
+++ b/src/lib/elc_popup.c
@@ -1347,7 +1347,7 @@ _elm_popup_elm_widget_focus_next_manager_is(Eo *obj EINA_UNUSED, Elm_Popup_Data
1347} 1347}
1348 1348
1349EOLIAN static Eina_Bool 1349EOLIAN static Eina_Bool
1350_elm_popup_elm_widget_focus_next(Eo *obj EINA_UNUSED, Elm_Popup_Data *sd, Elm_Focus_Direction dir, Evas_Object **next) 1350_elm_popup_elm_widget_focus_next(Eo *obj EINA_UNUSED, Elm_Popup_Data *sd, Elm_Focus_Direction dir, Evas_Object **next, Elm_Object_Item **next_item)
1351{ 1351{
1352 Evas_Object *ao; 1352 Evas_Object *ao;
1353 Eina_List *items = NULL; 1353 Eina_List *items = NULL;
@@ -1370,7 +1370,7 @@ _elm_popup_elm_widget_focus_next(Eo *obj EINA_UNUSED, Elm_Popup_Data *sd, Elm_Fo
1370 1370
1371 items = eina_list_merge(items, base_items); 1371 items = eina_list_merge(items, base_items);
1372 1372
1373 if (!elm_widget_focus_list_next_get(sd->main_layout, items, eina_list_data_get, dir, next)) 1373 if (!elm_widget_focus_list_next_get(sd->main_layout, items, eina_list_data_get, dir, next, next_item))
1374 *next = sd->main_layout; 1374 *next = sd->main_layout;
1375 eina_list_free(items); 1375 eina_list_free(items);
1376 1376
diff --git a/src/lib/elm_access.c b/src/lib/elm_access.c
index f8df21fe7..47f87b6fd 100644
--- a/src/lib/elm_access.c
+++ b/src/lib/elm_access.c
@@ -135,7 +135,7 @@ _elm_access_elm_widget_activate(Eo *obj, void *_pd EINA_UNUSED, Elm_Activate act
135} 135}
136 136
137EOLIAN static Eina_Bool 137EOLIAN static Eina_Bool
138_elm_access_elm_widget_on_focus(Eo *obj, void *_pd EINA_UNUSED) 138_elm_access_elm_widget_on_focus(Eo *obj, void *_pd EINA_UNUSED, Elm_Object_Item *item EINA_UNUSED)
139{ 139{
140 evas_object_focus_set(obj, elm_widget_focus_get(obj)); 140 evas_object_focus_set(obj, elm_widget_focus_get(obj));
141 141
@@ -522,7 +522,7 @@ _access_highlight_next_get(Evas_Object *obj, Elm_Focus_Direction dir)
522 } 522 }
523 else 523 else
524 { 524 {
525 ret = elm_widget_focus_next_get(obj, dir, &target); 525 ret = elm_widget_focus_next_get(obj, dir, &target, NULL);
526 if (ret && target) 526 if (ret && target)
527 _elm_access_highlight_set(target); 527 _elm_access_highlight_set(target);
528 } 528 }
diff --git a/src/lib/elm_box.c b/src/lib/elm_box.c
index f89989fb2..2adc12120 100644
--- a/src/lib/elm_box.c
+++ b/src/lib/elm_box.c
@@ -57,7 +57,7 @@ _elm_box_elm_widget_focus_next_manager_is(Eo *obj EINA_UNUSED, Elm_Box_Data *_pd
57} 57}
58 58
59EOLIAN static Eina_Bool 59EOLIAN static Eina_Bool
60_elm_box_elm_widget_focus_next(Eo *obj, Elm_Box_Data *_pd EINA_UNUSED, Elm_Focus_Direction dir, Evas_Object **next) 60_elm_box_elm_widget_focus_next(Eo *obj, Elm_Box_Data *_pd EINA_UNUSED, Elm_Focus_Direction dir, Evas_Object **next, Elm_Object_Item **next_item)
61{ 61{
62 const Eina_List *items; 62 const Eina_List *items;
63 void *(*list_data_get)(const Eina_List *list); 63 void *(*list_data_get)(const Eina_List *list);
@@ -78,7 +78,7 @@ _elm_box_elm_widget_focus_next(Eo *obj, Elm_Box_Data *_pd EINA_UNUSED, Elm_Focus
78 if (!items) return EINA_FALSE; 78 if (!items) return EINA_FALSE;
79 } 79 }
80 80
81 return elm_widget_focus_list_next_get(obj, items, list_data_get, dir, next); 81 return elm_widget_focus_list_next_get(obj, items, list_data_get, dir, next, next_item);
82} 82}
83 83
84EOLIAN static Eina_Bool 84EOLIAN static Eina_Bool
diff --git a/src/lib/elm_bubble.c b/src/lib/elm_bubble.c
index cec3cc7bf..9fdc9f852 100644
--- a/src/lib/elm_bubble.c
+++ b/src/lib/elm_bubble.c
@@ -76,7 +76,7 @@ _on_mouse_up(void *data,
76/* overriding layout's focus_next() in order to just cycle through the 76/* overriding layout's focus_next() in order to just cycle through the
77 * content's tree */ 77 * content's tree */
78EOLIAN static Eina_Bool 78EOLIAN static Eina_Bool
79_elm_bubble_elm_widget_focus_next(Eo *obj, Elm_Bubble_Data *_pd EINA_UNUSED, Elm_Focus_Direction dir, Evas_Object **next) 79_elm_bubble_elm_widget_focus_next(Eo *obj, Elm_Bubble_Data *_pd EINA_UNUSED, Elm_Focus_Direction dir, Evas_Object **next, Elm_Object_Item **next_item)
80{ 80{
81 Evas_Object *content; 81 Evas_Object *content;
82 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE); 82 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE);
@@ -93,7 +93,7 @@ _elm_bubble_elm_widget_focus_next(Eo *obj, Elm_Bubble_Data *_pd EINA_UNUSED, Elm
93 if (!content) return EINA_FALSE; 93 if (!content) return EINA_FALSE;
94 94
95 /* attempt to follow focus cycle into sub-object */ 95 /* attempt to follow focus cycle into sub-object */
96 return elm_widget_focus_next_get(content, dir, next); 96 return elm_widget_focus_next_get(content, dir, next, next_item);
97 } 97 }
98} 98}
99 99
diff --git a/src/lib/elm_calendar.c b/src/lib/elm_calendar.c
index 4ecfb4986..174915230 100644
--- a/src/lib/elm_calendar.c
+++ b/src/lib/elm_calendar.c
@@ -1156,7 +1156,7 @@ _elm_calendar_elm_widget_focus_direction_manager_is(Eo *obj EINA_UNUSED, Elm_Cal
1156} 1156}
1157 1157
1158EOLIAN static Eina_Bool 1158EOLIAN static Eina_Bool
1159_elm_calendar_elm_widget_focus_next(Eo *obj, Elm_Calendar_Data *sd, Elm_Focus_Direction dir, Evas_Object **next) 1159_elm_calendar_elm_widget_focus_next(Eo *obj, Elm_Calendar_Data *sd, Elm_Focus_Direction dir, Evas_Object **next, Elm_Object_Item **next_item)
1160{ 1160{
1161 int maxdays, day, i; 1161 int maxdays, day, i;
1162 Eina_List *items = NULL; 1162 Eina_List *items = NULL;
@@ -1189,7 +1189,7 @@ _elm_calendar_elm_widget_focus_next(Eo *obj, Elm_Calendar_Data *sd, Elm_Focus_Di
1189 } 1189 }
1190 1190
1191 return elm_widget_focus_list_next_get 1191 return elm_widget_focus_list_next_get
1192 (obj, items, eina_list_data_get, dir, next); 1192 (obj, items, eina_list_data_get, dir, next, next_item);
1193} 1193}
1194 1194
1195static void 1195static void
diff --git a/src/lib/elm_clock.c b/src/lib/elm_clock.c
index b7a7139a3..31f84f9b9 100644
--- a/src/lib/elm_clock.c
+++ b/src/lib/elm_clock.c
@@ -708,7 +708,7 @@ _elm_clock_elm_widget_focus_next_manager_is(Eo *obj EINA_UNUSED, Elm_Clock_Data
708} 708}
709 709
710EOLIAN static Eina_Bool 710EOLIAN static Eina_Bool
711_elm_clock_elm_widget_focus_next(Eo *obj, Elm_Clock_Data *sd, Elm_Focus_Direction dir, Evas_Object **next) 711_elm_clock_elm_widget_focus_next(Eo *obj, Elm_Clock_Data *sd, Elm_Focus_Direction dir, Evas_Object **next, Elm_Object_Item **next_item)
712{ 712{
713 Evas_Object *ao, *po; 713 Evas_Object *ao, *po;
714 Eina_List *items = NULL; 714 Eina_List *items = NULL;
@@ -757,7 +757,7 @@ _elm_clock_elm_widget_focus_next(Eo *obj, Elm_Clock_Data *sd, Elm_Focus_Directio
757 } 757 }
758 758
759 return elm_widget_focus_list_next_get 759 return elm_widget_focus_list_next_get
760 (obj, items, eina_list_data_get, dir, next); 760 (obj, items, eina_list_data_get, dir, next, next_item);
761} 761}
762 762
763static void 763static void
diff --git a/src/lib/elm_colorselector.c b/src/lib/elm_colorselector.c
index ee9a96f1c..f0d230bfa 100644
--- a/src/lib/elm_colorselector.c
+++ b/src/lib/elm_colorselector.c
@@ -1952,7 +1952,7 @@ _elm_colorselector_elm_widget_focus_next_manager_is(Eo *obj EINA_UNUSED, Elm_Col
1952} 1952}
1953 1953
1954EOLIAN static Eina_Bool 1954EOLIAN static Eina_Bool
1955_elm_colorselector_elm_widget_focus_next(Eo *obj, Elm_Colorselector_Data *sd, Elm_Focus_Direction dir, Evas_Object **next) 1955_elm_colorselector_elm_widget_focus_next(Eo *obj, Elm_Colorselector_Data *sd, Elm_Focus_Direction dir, Evas_Object **next, Elm_Object_Item **next_item)
1956{ 1956{
1957 Eina_List *items = NULL; 1957 Eina_List *items = NULL;
1958 Eina_List *l; 1958 Eina_List *l;
@@ -1985,7 +1985,7 @@ _elm_colorselector_elm_widget_focus_next(Eo *obj, Elm_Colorselector_Data *sd, El
1985 } 1985 }
1986 1986
1987 return elm_widget_focus_list_next_get 1987 return elm_widget_focus_list_next_get
1988 (obj, items, eina_list_data_get, dir, next); 1988 (obj, items, eina_list_data_get, dir, next, next_item);
1989} 1989}
1990 1990
1991static void 1991static void
diff --git a/src/lib/elm_datetime.c b/src/lib/elm_datetime.c
index ed313a8a7..ccd14f325 100644
--- a/src/lib/elm_datetime.c
+++ b/src/lib/elm_datetime.c
@@ -429,7 +429,7 @@ _elm_datetime_elm_widget_focus_next_manager_is(Eo *obj EINA_UNUSED, Elm_Datetime
429} 429}
430 430
431EOLIAN static Eina_Bool 431EOLIAN static Eina_Bool
432_elm_datetime_elm_widget_focus_next(Eo *obj, Elm_Datetime_Data *_pd EINA_UNUSED, Elm_Focus_Direction dir, Evas_Object **next) 432_elm_datetime_elm_widget_focus_next(Eo *obj, Elm_Datetime_Data *_pd EINA_UNUSED, Elm_Focus_Direction dir, Evas_Object **next, Elm_Object_Item **next_item)
433{ 433{
434 const Eina_List *items; 434 const Eina_List *items;
435 Eina_List *(*list_free)(Eina_List *list); 435 Eina_List *(*list_free)(Eina_List *list);
@@ -450,18 +450,18 @@ _elm_datetime_elm_widget_focus_next(Eo *obj, Elm_Datetime_Data *_pd EINA_UNUSED,
450 if (!items) return EINA_FALSE; 450 if (!items) return EINA_FALSE;
451 } 451 }
452 452
453 int_ret = elm_widget_focus_list_next_get(obj, items, list_data_get, dir, next); 453 int_ret = elm_widget_focus_list_next_get(obj, items, list_data_get, dir, next, next_item);
454 if (list_free) list_free((Eina_List *)items); 454 if (list_free) list_free((Eina_List *)items);
455 455
456 return int_ret; 456 return int_ret;
457} 457}
458 458
459EOLIAN static Eina_Bool 459EOLIAN static Eina_Bool
460_elm_datetime_elm_widget_on_focus(Eo *obj, Elm_Datetime_Data *sd) 460_elm_datetime_elm_widget_on_focus(Eo *obj, Elm_Datetime_Data *sd, Elm_Object_Item *item EINA_UNUSED)
461{ 461{
462 Eina_Bool int_ret = EINA_FALSE; 462 Eina_Bool int_ret = EINA_FALSE;
463 463
464 eo_do_super(obj, MY_CLASS, int_ret = elm_obj_widget_on_focus()); 464 eo_do_super(obj, MY_CLASS, int_ret = elm_obj_widget_on_focus(NULL));
465 if (!int_ret) return EINA_FALSE; 465 if (!int_ret) return EINA_FALSE;
466 466
467 if (!elm_widget_focus_get(obj)) 467 if (!elm_widget_focus_get(obj))
diff --git a/src/lib/elm_diskselector.c b/src/lib/elm_diskselector.c
index 54fe8c5ff..34cc99bb7 100644
--- a/src/lib/elm_diskselector.c
+++ b/src/lib/elm_diskselector.c
@@ -896,12 +896,12 @@ _elm_diskselector_elm_widget_sub_object_del(Eo *obj, Elm_Diskselector_Data *sd,
896} 896}
897 897
898EOLIAN static Eina_Bool 898EOLIAN static Eina_Bool
899_elm_diskselector_elm_widget_on_focus(Eo *obj, Elm_Diskselector_Data *_pd EINA_UNUSED) 899_elm_diskselector_elm_widget_on_focus(Eo *obj, Elm_Diskselector_Data *_pd EINA_UNUSED, Elm_Object_Item *item EINA_UNUSED)
900{ 900{
901 Eina_Bool int_ret = EINA_FALSE; 901 Eina_Bool int_ret = EINA_FALSE;
902 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE); 902 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE);
903 903
904 eo_do_super(obj, MY_CLASS, int_ret = elm_obj_widget_on_focus()); 904 eo_do_super(obj, MY_CLASS, int_ret = elm_obj_widget_on_focus(NULL));
905 if (!int_ret) return EINA_FALSE; 905 if (!int_ret) return EINA_FALSE;
906 906
907 if (elm_widget_focus_get(obj)) 907 if (elm_widget_focus_get(obj))
@@ -929,7 +929,7 @@ _elm_diskselector_elm_widget_focus_next_manager_is(Eo *obj EINA_UNUSED, Elm_Disk
929} 929}
930 930
931EOLIAN static Eina_Bool 931EOLIAN static Eina_Bool
932_elm_diskselector_elm_widget_focus_next(Eo *obj, Elm_Diskselector_Data *sd, Elm_Focus_Direction dir, Evas_Object **next) 932_elm_diskselector_elm_widget_focus_next(Eo *obj, Elm_Diskselector_Data *sd, Elm_Focus_Direction dir, Evas_Object **next, Elm_Object_Item **next_item)
933{ 933{
934 Eina_List *items = NULL; 934 Eina_List *items = NULL;
935 Eina_List *elist = NULL; 935 Eina_List *elist = NULL;
@@ -941,15 +941,15 @@ _elm_diskselector_elm_widget_focus_next(Eo *obj, Elm_Diskselector_Data *sd, Elm_
941 if (!sd->round) 941 if (!sd->round)
942 { 942 {
943 return elm_widget_focus_list_next_get 943 return elm_widget_focus_list_next_get
944 (obj, items, eina_list_data_get, dir, next); 944 (obj, items, eina_list_data_get, dir, next, next_item);
945 } 945 }
946 946
947 if (!elm_widget_focus_list_next_get 947 if (!elm_widget_focus_list_next_get
948 (obj, items, eina_list_data_get, dir, next)) 948 (obj, items, eina_list_data_get, dir, next, next_item))
949 { 949 {
950 elm_widget_focused_object_clear((Evas_Object *)obj); 950 elm_widget_focused_object_clear((Evas_Object *)obj);
951 elm_widget_focus_list_next_get 951 elm_widget_focus_list_next_get
952 (obj, items, eina_list_data_get, dir, next); 952 (obj, items, eina_list_data_get, dir, next, next_item);
953 } 953 }
954 return EINA_TRUE; 954 return EINA_TRUE;
955} 955}
diff --git a/src/lib/elm_entry.c b/src/lib/elm_entry.c
index 0ba453bde..6243501eb 100644
--- a/src/lib/elm_entry.c
+++ b/src/lib/elm_entry.c
@@ -1134,7 +1134,7 @@ _return_key_enabled_check(Evas_Object *obj)
1134} 1134}
1135 1135
1136EOLIAN static Eina_Bool 1136EOLIAN static Eina_Bool
1137_elm_entry_elm_widget_on_focus(Eo *obj, Elm_Entry_Data *sd) 1137_elm_entry_elm_widget_on_focus(Eo *obj, Elm_Entry_Data *sd, Elm_Object_Item *item EINA_UNUSED)
1138{ 1138{
1139 Evas_Object *top; 1139 Evas_Object *top;
1140 Eina_Bool top_is_win = EINA_FALSE; 1140 Eina_Bool top_is_win = EINA_FALSE;
diff --git a/src/lib/elm_flip.c b/src/lib/elm_flip.c
index 86088170f..eab8b1e24 100644
--- a/src/lib/elm_flip.c
+++ b/src/lib/elm_flip.c
@@ -112,14 +112,14 @@ _elm_flip_elm_widget_focus_next_manager_is(Eo *obj EINA_UNUSED, Elm_Flip_Data *_
112} 112}
113 113
114EOLIAN static Eina_Bool 114EOLIAN static Eina_Bool
115_elm_flip_elm_widget_focus_next(Eo *obj EINA_UNUSED, Elm_Flip_Data *sd, Elm_Focus_Direction dir, Evas_Object **next) 115_elm_flip_elm_widget_focus_next(Eo *obj EINA_UNUSED, Elm_Flip_Data *sd, Elm_Focus_Direction dir, Evas_Object **next, Elm_Object_Item **next_item)
116{ 116{
117 117
118 /* attempt to cycle focus on in sub-items */ 118 /* attempt to cycle focus on in sub-items */
119 if (sd->state) 119 if (sd->state)
120 return elm_widget_focus_next_get(sd->front.content, dir, next); 120 return elm_widget_focus_next_get(sd->front.content, dir, next, next_item);
121 else 121 else
122 return elm_widget_focus_next_get(sd->back.content, dir, next); 122 return elm_widget_focus_next_get(sd->back.content, dir, next, next_item);
123} 123}
124 124
125EOLIAN static Eina_Bool 125EOLIAN static Eina_Bool
diff --git a/src/lib/elm_focus.h b/src/lib/elm_focus.h
index 5bb4f896e..6f076bacc 100644
--- a/src/lib/elm_focus.h
+++ b/src/lib/elm_focus.h
@@ -38,7 +38,7 @@
38 * 38 *
39 * @ingroup Focus 39 * @ingroup Focus
40 */ 40 */
41typedef enum 41typedef enum _Elm_Focus_Direction
42{ 42{
43 ELM_FOCUS_PREVIOUS, /**< previous direction */ 43 ELM_FOCUS_PREVIOUS, /**< previous direction */
44 ELM_FOCUS_NEXT, /**< next direction */ 44 ELM_FOCUS_NEXT, /**< next direction */
@@ -48,7 +48,7 @@ typedef enum
48 ELM_FOCUS_LEFT, /**< left direction */ 48 ELM_FOCUS_LEFT, /**< left direction */
49 ELM_FOCUS_MOUSE, /**< direction is from mouse */ 49 ELM_FOCUS_MOUSE, /**< direction is from mouse */
50 ELM_FOCUS_REVERT /**< direction is from focus revert */ 50 ELM_FOCUS_REVERT /**< direction is from focus revert */
51} Elm_Focus_Direction; 51} Elm_Focus_Dicretion;
52 52
53/** 53/**
54 * Focus region show mode. 54 * Focus region show mode.
@@ -249,6 +249,47 @@ EAPI Evas_Object * elm_object_focus_next_object_get(const Evas_Object *ob
249EAPI void elm_object_focus_next_object_set(Evas_Object *obj, Evas_Object *next, Elm_Focus_Direction dir); 249EAPI void elm_object_focus_next_object_set(Evas_Object *obj, Evas_Object *next, Elm_Focus_Direction dir);
250 250
251/** 251/**
252 * Get next object item which was set with specific focus direction.
253 *
254 * Get next object item which was set by elm_object_focus_next_item_set
255 * with specific focus direction.
256 *
257 * @param obj The Elementary object
258 * @param dir Focus direction
259 * @return Focus next object item or @c NULL, if there is no focus next
260 * object item.
261 *
262 * @see elm_object_focus_next_item_set(), elm_object_focus_next()
263 *
264 * @since 1.16
265 *
266 * @ingroup Focus
267 */
268EAPI Elm_Object_Item * elm_object_focus_next_item_get(const Evas_Object *obj, Elm_Focus_Direction dir);
269
270/**
271 * Set next object item with specific focus direction.
272 *
273 * When focus next object item is set with specific focus direction,
274 * this object item will be the first candidate when finding
275 * next focusable object or item.
276 * If the focus next object item is set, it is preference to focus next object.
277 * Focus next object item can be registered with six directions that are
278 * previous, next, up, down, right, and left.
279 *
280 * @param obj The Elementary object
281 * @param next_item Focus next object item
282 * @param dir Focus direction
283 *
284 * @see elm_object_focus_next_item_get(), elm_object_focus_next()
285 *
286 * @since 1.16
287 *
288 * @ingroup Focus
289 */
290EAPI void elm_object_focus_next_item_set(Evas_Object *obj, Elm_Object_Item *next_item, Elm_Focus_Direction dir);
291
292/**
252 * Get focused object in object tree. 293 * Get focused object in object tree.
253 * 294 *
254 * This function returns current focused object in one object sub-tree. 295 * This function returns current focused object in one object sub-tree.
diff --git a/src/lib/elm_frame.c b/src/lib/elm_frame.c
index d5ebc1fde..674653b15 100644
--- a/src/lib/elm_frame.c
+++ b/src/lib/elm_frame.c
@@ -58,7 +58,7 @@ _elm_frame_elm_widget_focus_next_manager_is(Eo *obj EINA_UNUSED, Elm_Frame_Data
58} 58}
59 59
60EOLIAN static Eina_Bool 60EOLIAN static Eina_Bool
61_elm_frame_elm_widget_focus_next(Eo *obj EINA_UNUSED, Elm_Frame_Data *_pd EINA_UNUSED, Elm_Focus_Direction dir, Evas_Object **next) 61_elm_frame_elm_widget_focus_next(Eo *obj EINA_UNUSED, Elm_Frame_Data *_pd EINA_UNUSED, Elm_Focus_Direction dir, Evas_Object **next, Elm_Object_Item **next_item)
62{ 62{
63 Evas_Object *content; 63 Evas_Object *content;
64 64
@@ -69,7 +69,7 @@ _elm_frame_elm_widget_focus_next(Eo *obj EINA_UNUSED, Elm_Frame_Data *_pd EINA_U
69 else 69 else
70 { 70 {
71 /* attempt to follow focus cycle into sub-object */ 71 /* attempt to follow focus cycle into sub-object */
72 return elm_widget_focus_next_get(content, dir, next); 72 return elm_widget_focus_next_get(content, dir, next, next_item);
73 } 73 }
74} 74}
75 75
diff --git a/src/lib/elm_gengrid.c b/src/lib/elm_gengrid.c
index d351b53d8..d6786f1c1 100644
--- a/src/lib/elm_gengrid.c
+++ b/src/lib/elm_gengrid.c
@@ -3078,6 +3078,25 @@ _key_action_move(Evas_Object *obj, const char *params)
3078 3078
3079 return EINA_TRUE; 3079 return EINA_TRUE;
3080 } 3080 }
3081 else
3082 {
3083 Evas_Object *next = NULL;
3084 Elm_Object_Item *next_item = NULL;
3085 next_item = elm_object_item_focus_next_item_get(sd->focused_item,
3086 ELM_FOCUS_LEFT);
3087 if (next_item)
3088 {
3089 elm_object_item_focus_set(next_item, EINA_TRUE);
3090 return EINA_TRUE;
3091 }
3092 next = elm_object_item_focus_next_object_get(sd->focused_item,
3093 ELM_FOCUS_LEFT);
3094 if (next)
3095 {
3096 elm_object_focus_set(next, EINA_TRUE);
3097 return EINA_TRUE;
3098 }
3099 }
3081 if (sd->horizontal) 3100 if (sd->horizontal)
3082 { 3101 {
3083 if (_elm_gengrid_item_edge_check(sd->focused_item, ELM_FOCUS_LEFT)) 3102 if (_elm_gengrid_item_edge_check(sd->focused_item, ELM_FOCUS_LEFT))
@@ -3157,6 +3176,25 @@ _key_action_move(Evas_Object *obj, const char *params)
3157 3176
3158 return EINA_TRUE; 3177 return EINA_TRUE;
3159 } 3178 }
3179 else
3180 {
3181 Evas_Object *next = NULL;
3182 Elm_Object_Item *next_item = NULL;
3183 next_item = elm_object_item_focus_next_item_get(sd->focused_item,
3184 ELM_FOCUS_RIGHT);
3185 if (next_item)
3186 {
3187 elm_object_item_focus_set(next_item, EINA_TRUE);
3188 return EINA_TRUE;
3189 }
3190 next = elm_object_item_focus_next_object_get(sd->focused_item,
3191 ELM_FOCUS_RIGHT);
3192 if (next)
3193 {
3194 elm_object_focus_set(next, EINA_TRUE);
3195 return EINA_TRUE;
3196 }
3197 }
3160 if (sd->horizontal) 3198 if (sd->horizontal)
3161 { 3199 {
3162 if (sd->focused_item && _elm_gengrid_item_edge_check(sd->focused_item, ELM_FOCUS_RIGHT)) 3200 if (sd->focused_item && _elm_gengrid_item_edge_check(sd->focused_item, ELM_FOCUS_RIGHT))
@@ -3230,6 +3268,25 @@ _key_action_move(Evas_Object *obj, const char *params)
3230 3268
3231 return EINA_TRUE; 3269 return EINA_TRUE;
3232 } 3270 }
3271 else
3272 {
3273 Evas_Object *next = NULL;
3274 Elm_Object_Item *next_item = NULL;
3275 next_item = elm_object_item_focus_next_item_get(sd->focused_item,
3276 ELM_FOCUS_UP);
3277 if (next_item)
3278 {
3279 elm_object_item_focus_set(next_item, EINA_TRUE);
3280 return EINA_TRUE;
3281 }
3282 next = elm_object_item_focus_next_object_get(sd->focused_item,
3283 ELM_FOCUS_UP);
3284 if (next)
3285 {
3286 elm_object_focus_set(next, EINA_TRUE);
3287 return EINA_TRUE;
3288 }
3289 }
3233 if (sd->horizontal) 3290 if (sd->horizontal)
3234 { 3291 {
3235 if (sd->focused_item && _elm_gengrid_item_edge_check(sd->focused_item, ELM_FOCUS_UP)) 3292 if (sd->focused_item && _elm_gengrid_item_edge_check(sd->focused_item, ELM_FOCUS_UP))
@@ -3287,6 +3344,25 @@ _key_action_move(Evas_Object *obj, const char *params)
3287 3344
3288 return EINA_TRUE; 3345 return EINA_TRUE;
3289 } 3346 }
3347 else
3348 {
3349 Evas_Object *next = NULL;
3350 Elm_Object_Item *next_item = NULL;
3351 next_item = elm_object_item_focus_next_item_get(sd->focused_item,
3352 ELM_FOCUS_DOWN);
3353 if (next_item)
3354 {
3355 elm_object_item_focus_set(next_item, EINA_TRUE);
3356 return EINA_TRUE;
3357 }
3358 next = elm_object_item_focus_next_object_get(sd->focused_item,
3359 ELM_FOCUS_DOWN);
3360 if (next)
3361 {
3362 elm_object_focus_set(next, EINA_TRUE);
3363 return EINA_TRUE;
3364 }
3365 }
3290 if (sd->horizontal) 3366 if (sd->horizontal)
3291 { 3367 {
3292 if (sd->focused_item && _elm_gengrid_item_edge_check(sd->focused_item, ELM_FOCUS_DOWN)) 3368 if (sd->focused_item && _elm_gengrid_item_edge_check(sd->focused_item, ELM_FOCUS_DOWN))
@@ -3561,14 +3637,14 @@ _elm_gengrid_direction_item_get(Evas_Object *obj, Elm_Focus_Direction dir)
3561} 3637}
3562 3638
3563EOLIAN static Eina_Bool 3639EOLIAN static Eina_Bool
3564_elm_gengrid_elm_widget_on_focus(Eo *obj, Elm_Gengrid_Data *sd) 3640_elm_gengrid_elm_widget_on_focus(Eo *obj, Elm_Gengrid_Data *sd, Elm_Object_Item *item EINA_UNUSED)
3565{ 3641{
3566 Eina_Bool int_ret = EINA_FALSE; 3642 Eina_Bool int_ret = EINA_FALSE;
3567 Elm_Object_Item *eo_it = NULL; 3643 Elm_Object_Item *eo_it = NULL;
3568 Eina_Bool is_sel = EINA_FALSE; 3644 Eina_Bool is_sel = EINA_FALSE;
3569 Elm_Focus_Direction focus_origin; 3645 Elm_Focus_Direction focus_origin;
3570 3646
3571 eo_do_super(obj, MY_CLASS, int_ret = elm_obj_widget_on_focus()); 3647 eo_do_super(obj, MY_CLASS, int_ret = elm_obj_widget_on_focus(NULL));
3572 if (!int_ret) return EINA_FALSE; 3648 if (!int_ret) return EINA_FALSE;
3573 3649
3574 if (elm_widget_focus_get(obj) && (sd->selected) && 3650 if (elm_widget_focus_get(obj) && (sd->selected) &&
@@ -3580,17 +3656,21 @@ _elm_gengrid_elm_widget_on_focus(Eo *obj, Elm_Gengrid_Data *sd)
3580 3656
3581 if (elm_widget_focus_get(obj) && !sd->mouse_down) 3657 if (elm_widget_focus_get(obj) && !sd->mouse_down)
3582 { 3658 {
3583 focus_origin = elm_widget_focus_origin_get(obj); 3659 if (item) eo_it = item;
3584 if (focus_origin >= ELM_FOCUS_UP && focus_origin <= ELM_FOCUS_LEFT) 3660 else
3585 eo_it = _elm_gengrid_direction_item_get(obj, focus_origin);
3586 else if (sd->last_focused_item)
3587 eo_it = sd->last_focused_item;
3588 else if (sd->last_selected_item)
3589 eo_it = sd->last_selected_item;
3590 else if (_elm_config->first_item_focus_on_first_focus_in)
3591 { 3661 {
3592 eo_it = elm_gengrid_first_item_get(obj); 3662 focus_origin = elm_widget_focus_origin_get(obj);
3593 is_sel = EINA_TRUE; 3663 if (focus_origin >= ELM_FOCUS_UP && focus_origin <= ELM_FOCUS_LEFT)
3664 eo_it = _elm_gengrid_direction_item_get(obj, focus_origin);
3665 else if (sd->last_focused_item)
3666 eo_it = sd->last_focused_item;
3667 else if (sd->last_selected_item)
3668 eo_it = sd->last_selected_item;
3669 else if (_elm_config->first_item_focus_on_first_focus_in)
3670 {
3671 eo_it = elm_gengrid_first_item_get(obj);
3672 is_sel = EINA_TRUE;
3673 }
3594 } 3674 }
3595 if (eo_it) 3675 if (eo_it)
3596 { 3676 {
@@ -3651,7 +3731,7 @@ _elm_gengrid_elm_widget_focus_direction_manager_is(Eo *obj EINA_UNUSED, Elm_Geng
3651} 3731}
3652 3732
3653EOLIAN static Eina_Bool 3733EOLIAN static Eina_Bool
3654_elm_gengrid_elm_widget_focus_next(Eo *obj, Elm_Gengrid_Data *sd, Elm_Focus_Direction dir, Evas_Object **next) 3734_elm_gengrid_elm_widget_focus_next(Eo *obj, Elm_Gengrid_Data *sd, Elm_Focus_Direction dir, Evas_Object **next, Elm_Object_Item **next_item)
3655{ 3735{
3656 Eina_List *items = NULL; 3736 Eina_List *items = NULL;
3657 Elm_Gen_Item *it; 3737 Elm_Gen_Item *it;
@@ -3663,7 +3743,7 @@ _elm_gengrid_elm_widget_focus_next(Eo *obj, Elm_Gengrid_Data *sd, Elm_Focus_Dire
3663 } 3743 }
3664 3744
3665 return elm_widget_focus_list_next_get 3745 return elm_widget_focus_list_next_get
3666 (obj, items, eina_list_data_get, dir, next); 3746 (obj, items, eina_list_data_get, dir, next, next_item);
3667} 3747}
3668 3748
3669static void 3749static void
diff --git a/src/lib/elm_genlist.c b/src/lib/elm_genlist.c
index a839fc108..6ebba7f68 100644
--- a/src/lib/elm_genlist.c
+++ b/src/lib/elm_genlist.c
@@ -2770,9 +2770,13 @@ _elm_genlist_item_content_focus_set(Elm_Gen_Item *it, Elm_Focus_Direction dir)
2770 if (focused_obj && (dir != ELM_FOCUS_PREVIOUS)) 2770 if (focused_obj && (dir != ELM_FOCUS_PREVIOUS))
2771 { 2771 {
2772 Evas_Object *nextfocus; 2772 Evas_Object *nextfocus;
2773 if (elm_widget_focus_next_get(focused_obj, dir, &nextfocus)) 2773 Elm_Object_Item *nextfocus_item;
2774 if (elm_widget_focus_next_get(focused_obj, dir, &nextfocus, &nextfocus_item))
2774 { 2775 {
2775 elm_object_focus_set(nextfocus, EINA_TRUE); 2776 if (nextfocus_item)
2777 elm_object_item_focus_set(nextfocus_item, EINA_TRUE);
2778 else
2779 elm_object_focus_set(nextfocus, EINA_TRUE);
2776 return; 2780 return;
2777 } 2781 }
2778 } 2782 }
@@ -3179,13 +3183,13 @@ _elm_genlist_nearest_visible_item_get(Evas_Object *obj, Elm_Object_Item *eo_it)
3179} 3183}
3180 3184
3181EOLIAN static Eina_Bool 3185EOLIAN static Eina_Bool
3182_elm_genlist_elm_widget_on_focus(Eo *obj, Elm_Genlist_Data *sd) 3186_elm_genlist_elm_widget_on_focus(Eo *obj, Elm_Genlist_Data *sd, Elm_Object_Item *item EINA_UNUSED)
3183{ 3187{
3184 Eina_Bool int_ret = EINA_FALSE; 3188 Eina_Bool int_ret = EINA_FALSE;
3185 Elm_Object_Item *eo_it = NULL; 3189 Elm_Object_Item *eo_it = NULL;
3186 Eina_Bool is_sel = EINA_FALSE; 3190 Eina_Bool is_sel = EINA_FALSE;
3187 3191
3188 eo_do_super(obj, MY_CLASS, int_ret = elm_obj_widget_on_focus()); 3192 eo_do_super(obj, MY_CLASS, int_ret = elm_obj_widget_on_focus(NULL));
3189 if (!int_ret) return EINA_FALSE; 3193 if (!int_ret) return EINA_FALSE;
3190 3194
3191 if (elm_widget_focus_get(obj) && (sd->items) && (sd->selected) && 3195 if (elm_widget_focus_get(obj) && (sd->items) && (sd->selected) &&
@@ -3254,7 +3258,7 @@ _elm_genlist_elm_widget_focus_direction_manager_is(Eo *obj EINA_UNUSED, Elm_Genl
3254} 3258}
3255 3259
3256EOLIAN static Eina_Bool 3260EOLIAN static Eina_Bool
3257_elm_genlist_elm_widget_focus_next(Eo *obj, Elm_Genlist_Data *sd, Elm_Focus_Direction dir, Evas_Object **next) 3261_elm_genlist_elm_widget_focus_next(Eo *obj, Elm_Genlist_Data *sd, Elm_Focus_Direction dir, Evas_Object **next, Elm_Object_Item **next_item)
3258{ 3262{
3259 Evas_Coord x, y, w, h; 3263 Evas_Coord x, y, w, h;
3260 Evas_Coord sx, sy, sw, sh; 3264 Evas_Coord sx, sy, sw, sh;
@@ -3297,7 +3301,7 @@ _elm_genlist_elm_widget_focus_next(Eo *obj, Elm_Genlist_Data *sd, Elm_Focus_Dire
3297 } 3301 }
3298 3302
3299 return elm_widget_focus_list_next_get 3303 return elm_widget_focus_list_next_get
3300 (obj, items, eina_list_data_get, dir, next); 3304 (obj, items, eina_list_data_get, dir, next, next_item);
3301} 3305}
3302 3306
3303static void 3307static void
diff --git a/src/lib/elm_glview.c b/src/lib/elm_glview.c
index 2bc87f1fb..51af23bed 100644
--- a/src/lib/elm_glview.c
+++ b/src/lib/elm_glview.c
@@ -28,12 +28,12 @@ static const Evas_Smart_Cb_Description _smart_callbacks[] = {
28}; 28};
29 29
30EOLIAN static Eina_Bool 30EOLIAN static Eina_Bool
31_elm_glview_elm_widget_on_focus(Eo *obj, Elm_Glview_Data *_pd EINA_UNUSED) 31_elm_glview_elm_widget_on_focus(Eo *obj, Elm_Glview_Data *_pd EINA_UNUSED, Elm_Object_Item *item EINA_UNUSED)
32{ 32{
33 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE); 33 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE);
34 Eina_Bool int_ret = EINA_FALSE; 34 Eina_Bool int_ret = EINA_FALSE;
35 35
36 eo_do_super(obj, MY_CLASS, int_ret = elm_obj_widget_on_focus()); 36 eo_do_super(obj, MY_CLASS, int_ret = elm_obj_widget_on_focus(NULL));
37 if (!int_ret) return EINA_FALSE; 37 if (!int_ret) return EINA_FALSE;
38 38
39 if (elm_widget_focus_get(obj)) 39 if (elm_widget_focus_get(obj))
diff --git a/src/lib/elm_grid.c b/src/lib/elm_grid.c
index ba712f63e..95edb6088 100644
--- a/src/lib/elm_grid.c
+++ b/src/lib/elm_grid.c
@@ -20,7 +20,7 @@ _elm_grid_elm_widget_focus_next_manager_is(Eo *obj EINA_UNUSED, void *_pd EINA_U
20} 20}
21 21
22EOLIAN static Eina_Bool 22EOLIAN static Eina_Bool
23_elm_grid_elm_widget_focus_next(Eo *obj, void *_pd EINA_UNUSED, Elm_Focus_Direction dir, Evas_Object **next) 23_elm_grid_elm_widget_focus_next(Eo *obj, void *_pd EINA_UNUSED, Elm_Focus_Direction dir, Evas_Object **next, Elm_Object_Item **next_item)
24{ 24{
25 const Eina_List *items; 25 const Eina_List *items;
26 Eina_List *(*list_free)(Eina_List *list); 26 Eina_List *(*list_free)(Eina_List *list);
@@ -46,7 +46,7 @@ _elm_grid_elm_widget_focus_next(Eo *obj, void *_pd EINA_UNUSED, Elm_Focus_Direct
46 if (!items) return EINA_FALSE; 46 if (!items) return EINA_FALSE;
47 } 47 }
48 48
49 int_ret = elm_widget_focus_list_next_get(obj, items, list_data_get, dir, next); 49 int_ret = elm_widget_focus_list_next_get(obj, items, list_data_get, dir, next, next_item);
50 50
51 if (list_free) list_free((Eina_List *)items); 51 if (list_free) list_free((Eina_List *)items);
52 52
diff --git a/src/lib/elm_index.c b/src/lib/elm_index.c
index ed736bdcf..0b574a617 100644
--- a/src/lib/elm_index.c
+++ b/src/lib/elm_index.c
@@ -1126,7 +1126,7 @@ _elm_index_elm_widget_focus_direction_manager_is(Eo *obj EINA_UNUSED, Elm_Index_
1126} 1126}
1127 1127
1128EOLIAN static Eina_Bool 1128EOLIAN static Eina_Bool
1129_elm_index_elm_widget_focus_next(Eo *obj, Elm_Index_Data *sd, Elm_Focus_Direction dir, Evas_Object **next) 1129_elm_index_elm_widget_focus_next(Eo *obj, Elm_Index_Data *sd, Elm_Focus_Direction dir, Evas_Object **next, Elm_Object_Item **next_item)
1130{ 1130{
1131 Eina_Bool int_ret = EINA_FALSE; 1131 Eina_Bool int_ret = EINA_FALSE;
1132 1132
@@ -1152,7 +1152,7 @@ _elm_index_elm_widget_focus_next(Eo *obj, Elm_Index_Data *sd, Elm_Focus_Directio
1152 } 1152 }
1153 1153
1154 int_ret = elm_widget_focus_list_next_get 1154 int_ret = elm_widget_focus_list_next_get
1155 (obj, items, eina_list_data_get, dir, next); 1155 (obj, items, eina_list_data_get, dir, next, next_item);
1156 1156
1157 // to hide index item, if there is nothing to focus on autohide disable mode 1157 // to hide index item, if there is nothing to focus on autohide disable mode
1158 if ((!sd->autohide_disabled) && (!int_ret)) 1158 if ((!sd->autohide_disabled) && (!int_ret))
diff --git a/src/lib/elm_inwin.c b/src/lib/elm_inwin.c
index 69c0f0516..febe1a66e 100644
--- a/src/lib/elm_inwin.c
+++ b/src/lib/elm_inwin.c
@@ -46,7 +46,7 @@ _elm_inwin_elm_widget_focus_next_manager_is(Eo *obj EINA_UNUSED, void *_pd EINA_
46} 46}
47 47
48EOLIAN static Eina_Bool 48EOLIAN static Eina_Bool
49_elm_inwin_elm_widget_focus_next(Eo *obj EINA_UNUSED, void *_pd EINA_UNUSED, Elm_Focus_Direction dir, Evas_Object **next) 49_elm_inwin_elm_widget_focus_next(Eo *obj EINA_UNUSED, void *_pd EINA_UNUSED, Elm_Focus_Direction dir, Evas_Object **next, Elm_Object_Item **next_item)
50{ 50{
51 Evas_Object *content; 51 Evas_Object *content;
52 52
@@ -55,7 +55,7 @@ _elm_inwin_elm_widget_focus_next(Eo *obj EINA_UNUSED, void *_pd EINA_UNUSED, Elm
55 /* attempt to follow focus cycle into sub-object */ 55 /* attempt to follow focus cycle into sub-object */
56 if (content) 56 if (content)
57 { 57 {
58 elm_widget_focus_next_get(content, dir, next); 58 elm_widget_focus_next_get(content, dir, next, next_item);
59 if (*next) return EINA_TRUE; 59 if (*next) return EINA_TRUE;
60 } 60 }
61 61
diff --git a/src/lib/elm_layout.c b/src/lib/elm_layout.c
index 250ef4ec3..657696484 100644
--- a/src/lib/elm_layout.c
+++ b/src/lib/elm_layout.c
@@ -399,7 +399,7 @@ _elm_layout_list_data_get(const Eina_List *list)
399} 399}
400 400
401EOLIAN static Eina_Bool 401EOLIAN static Eina_Bool
402_elm_layout_elm_widget_on_focus(Eo *obj, Elm_Layout_Smart_Data *_pd EINA_UNUSED) 402_elm_layout_elm_widget_on_focus(Eo *obj, Elm_Layout_Smart_Data *_pd EINA_UNUSED, Elm_Object_Item *item EINA_UNUSED)
403{ 403{
404 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE); 404 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE);
405 405
@@ -472,7 +472,7 @@ _access_focus_list_sort(Eina_List *origin)
472 * child objects, but still inheriting from elm_layout, just set its 472 * child objects, but still inheriting from elm_layout, just set its
473 * focus_next smart function back to NULL */ 473 * focus_next smart function back to NULL */
474EOLIAN static Eina_Bool 474EOLIAN static Eina_Bool
475_elm_layout_elm_widget_focus_next(Eo *obj, Elm_Layout_Smart_Data *sd, Elm_Focus_Direction dir, Evas_Object **next) 475_elm_layout_elm_widget_focus_next(Eo *obj, Elm_Layout_Smart_Data *sd, Elm_Focus_Direction dir, Evas_Object **next, Elm_Object_Item **next_item)
476{ 476{
477 const Eina_List *items; 477 const Eina_List *items;
478 void *(*list_data_get)(const Eina_List *list); 478 void *(*list_data_get)(const Eina_List *list);
@@ -491,7 +491,7 @@ _elm_layout_elm_widget_focus_next(Eo *obj, Elm_Layout_Smart_Data *sd, Elm_Focus_
491 } 491 }
492 492
493 return elm_widget_focus_list_next_get 493 return elm_widget_focus_list_next_get
494 (obj, items, list_data_get, dir, next); 494 (obj, items, list_data_get, dir, next, next_item);
495} 495}
496 496
497EOLIAN static Eina_Bool 497EOLIAN static Eina_Bool
diff --git a/src/lib/elm_list.c b/src/lib/elm_list.c
index 498a79e49..708648676 100644
--- a/src/lib/elm_list.c
+++ b/src/lib/elm_list.c
@@ -289,9 +289,13 @@ _elm_list_item_content_focus_set(Elm_List_Item_Data *it, Elm_Focus_Direction dir
289 if (dir != ELM_FOCUS_PREVIOUS) 289 if (dir != ELM_FOCUS_PREVIOUS)
290 { 290 {
291 Evas_Object *nextfocus; 291 Evas_Object *nextfocus;
292 if (elm_widget_focus_next_get(focused, dir, &nextfocus)) 292 Elm_Object_Item *nextfocus_item;
293 if (elm_widget_focus_next_get(focused, dir, &nextfocus, &nextfocus_item))
293 { 294 {
294 elm_object_focus_set(nextfocus, EINA_TRUE); 295 if (nextfocus_item)
296 elm_object_item_focus_set(nextfocus_item, EINA_TRUE);
297 else
298 elm_object_focus_set(nextfocus, EINA_TRUE);
295 return EINA_TRUE; 299 return EINA_TRUE;
296 } 300 }
297 301
@@ -1257,13 +1261,13 @@ _elm_list_nearest_visible_item_get(Evas_Object *obj, Elm_List_Item_Data *it)
1257} 1261}
1258 1262
1259EOLIAN static Eina_Bool 1263EOLIAN static Eina_Bool
1260_elm_list_elm_widget_on_focus(Eo *obj, Elm_List_Data *sd) 1264_elm_list_elm_widget_on_focus(Eo *obj, Elm_List_Data *sd, Elm_Object_Item *item EINA_UNUSED)
1261{ 1265{
1262 Eina_Bool int_ret = EINA_FALSE; 1266 Eina_Bool int_ret = EINA_FALSE;
1263 Elm_Object_Item *eo_it = NULL; 1267 Elm_Object_Item *eo_it = NULL;
1264 Eina_Bool is_sel = EINA_FALSE; 1268 Eina_Bool is_sel = EINA_FALSE;
1265 1269
1266 eo_do_super(obj, MY_CLASS, int_ret = elm_obj_widget_on_focus()); 1270 eo_do_super(obj, MY_CLASS, int_ret = elm_obj_widget_on_focus(NULL));
1267 if (!int_ret) return EINA_FALSE; 1271 if (!int_ret) return EINA_FALSE;
1268 1272
1269 if (elm_widget_focus_get(obj) && sd->selected && !sd->last_selected_item) 1273 if (elm_widget_focus_get(obj) && sd->selected && !sd->last_selected_item)
@@ -2369,7 +2373,7 @@ _elm_list_elm_widget_focus_direction_manager_is(Eo *obj EINA_UNUSED, Elm_List_Da
2369} 2373}
2370 2374
2371EOLIAN static Eina_Bool 2375EOLIAN static Eina_Bool
2372_elm_list_elm_widget_focus_next(Eo *obj, Elm_List_Data *sd, Elm_Focus_Direction dir, Evas_Object **next) 2376_elm_list_elm_widget_focus_next(Eo *obj, Elm_List_Data *sd, Elm_Focus_Direction dir, Evas_Object **next, Elm_Object_Item **next_item)
2373{ 2377{
2374 Eina_List *items = NULL; 2378 Eina_List *items = NULL;
2375 Eina_List *elist = NULL; 2379 Eina_List *elist = NULL;
@@ -2386,7 +2390,7 @@ _elm_list_elm_widget_focus_next(Eo *obj, Elm_List_Data *sd, Elm_Focus_Direction
2386 } 2390 }
2387 2391
2388 return elm_widget_focus_list_next_get 2392 return elm_widget_focus_list_next_get
2389 (obj, items, eina_list_data_get, dir, next); 2393 (obj, items, eina_list_data_get, dir, next, next_item);
2390} 2394}
2391 2395
2392EOLIAN static void 2396EOLIAN static void
diff --git a/src/lib/elm_main.c b/src/lib/elm_main.c
index dcd22b4bb..d43627457 100644
--- a/src/lib/elm_main.c
+++ b/src/lib/elm_main.c
@@ -1463,6 +1463,23 @@ elm_object_focus_next_object_set(Evas_Object *obj,
1463 elm_widget_focus_next_object_set(obj, next, dir); 1463 elm_widget_focus_next_object_set(obj, next, dir);
1464} 1464}
1465 1465
1466EAPI Elm_Object_Item *
1467elm_object_focus_next_item_get(const Evas_Object *obj,
1468 Elm_Focus_Direction dir)
1469{
1470 EINA_SAFETY_ON_NULL_RETURN_VAL(obj, NULL);
1471 return elm_widget_focus_next_item_get(obj, dir);
1472}
1473
1474EAPI void
1475elm_object_focus_next_item_set(Evas_Object *obj,
1476 Elm_Object_Item *next_item,
1477 Elm_Focus_Direction dir)
1478{
1479 EINA_SAFETY_ON_NULL_RETURN(obj);
1480 elm_widget_focus_next_item_set(obj, next_item, dir);
1481}
1482
1466EAPI Evas_Object * 1483EAPI Evas_Object *
1467elm_object_focused_object_get(const Evas_Object *obj) 1484elm_object_focused_object_get(const Evas_Object *obj)
1468{ 1485{
diff --git a/src/lib/elm_map.c b/src/lib/elm_map.c
index 10172703d..064652a98 100644
--- a/src/lib/elm_map.c
+++ b/src/lib/elm_map.c
@@ -3865,12 +3865,12 @@ _elm_map_pan_evas_object_smart_move(Eo *obj, Elm_Map_Pan_Data *_pd EINA_UNUSED,
3865} 3865}
3866 3866
3867EOLIAN static Eina_Bool 3867EOLIAN static Eina_Bool
3868_elm_map_elm_widget_on_focus(Eo *obj, Elm_Map_Data *_pd EINA_UNUSED) 3868_elm_map_elm_widget_on_focus(Eo *obj, Elm_Map_Data *_pd EINA_UNUSED, Elm_Object_Item *item EINA_UNUSED)
3869{ 3869{
3870 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE); 3870 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE);
3871 Eina_Bool int_ret = EINA_FALSE; 3871 Eina_Bool int_ret = EINA_FALSE;
3872 3872
3873 eo_do_super(obj, MY_CLASS, int_ret = elm_obj_widget_on_focus()); 3873 eo_do_super(obj, MY_CLASS, int_ret = elm_obj_widget_on_focus(NULL));
3874 if (!int_ret) return EINA_FALSE; 3874 if (!int_ret) return EINA_FALSE;
3875 3875
3876 if (elm_widget_focus_get(obj)) 3876 if (elm_widget_focus_get(obj))
diff --git a/src/lib/elm_notify.c b/src/lib/elm_notify.c
index 6fd416633..19f06de48 100644
--- a/src/lib/elm_notify.c
+++ b/src/lib/elm_notify.c
@@ -352,7 +352,7 @@ _elm_notify_elm_widget_focus_next_manager_is(Eo *obj EINA_UNUSED, Elm_Notify_Dat
352} 352}
353 353
354EOLIAN static Eina_Bool 354EOLIAN static Eina_Bool
355_elm_notify_elm_widget_focus_next(Eo *obj EINA_UNUSED, Elm_Notify_Data *sd, Elm_Focus_Direction dir, Evas_Object **next) 355_elm_notify_elm_widget_focus_next(Eo *obj EINA_UNUSED, Elm_Notify_Data *sd, Elm_Focus_Direction dir, Evas_Object **next, Elm_Object_Item **next_item)
356{ 356{
357 Evas_Object *cur; 357 Evas_Object *cur;
358 358
@@ -361,7 +361,7 @@ _elm_notify_elm_widget_focus_next(Eo *obj EINA_UNUSED, Elm_Notify_Data *sd, Elm_
361 cur = sd->content; 361 cur = sd->content;
362 362
363 /* Try to cycle focus on content */ 363 /* Try to cycle focus on content */
364 return elm_widget_focus_next_get(cur, dir, next); 364 return elm_widget_focus_next_get(cur, dir, next, next_item);
365} 365}
366 366
367EOLIAN static Eina_Bool 367EOLIAN static Eina_Bool
diff --git a/src/lib/elm_object_item.h b/src/lib/elm_object_item.h
index db1986222..db788f67c 100644
--- a/src/lib/elm_object_item.h
+++ b/src/lib/elm_object_item.h
@@ -5,6 +5,8 @@
5 */ 5 */
6typedef Eo Elm_Object_Item; 6typedef Eo Elm_Object_Item;
7 7
8typedef enum _Elm_Focus_Direction Elm_Focus_Direction;
9
8/** 10/**
9 * @typedef Elm_Object_Item_Signal_Cb 11 * @typedef Elm_Object_Item_Signal_Cb
10 * 12 *
diff --git a/src/lib/elm_panel.c b/src/lib/elm_panel.c
index 67ef1f0a9..bea0c3f2e 100644
--- a/src/lib/elm_panel.c
+++ b/src/lib/elm_panel.c
@@ -262,7 +262,7 @@ _elm_panel_elm_widget_focus_next_manager_is(Eo *obj EINA_UNUSED, Elm_Panel_Data
262} 262}
263 263
264EOLIAN static Eina_Bool 264EOLIAN static Eina_Bool
265_elm_panel_elm_widget_focus_next(Eo *obj, Elm_Panel_Data *sd, Elm_Focus_Direction dir, Evas_Object **next) 265_elm_panel_elm_widget_focus_next(Eo *obj, Elm_Panel_Data *sd, Elm_Focus_Direction dir, Evas_Object **next, Elm_Object_Item **next_item)
266{ 266{
267 Evas_Object *cur; 267 Evas_Object *cur;
268 Eina_List *items = NULL; 268 Eina_List *items = NULL;
@@ -283,19 +283,19 @@ _elm_panel_elm_widget_focus_next(Eo *obj, Elm_Panel_Data *sd, Elm_Focus_Directio
283 items = eina_list_append(items, sd->content); 283 items = eina_list_append(items, sd->content);
284 284
285 ret = elm_widget_focus_list_next_get 285 ret = elm_widget_focus_list_next_get
286 (obj, items, eina_list_data_get, dir, next); 286 (obj, items, eina_list_data_get, dir, next, next_item);
287 eina_list_free(items); 287 eina_list_free(items);
288 288
289 return ret; 289 return ret;
290 } 290 }
291 291
292 return elm_widget_focus_next_get(sd->content, dir, next); 292 return elm_widget_focus_next_get(sd->content, dir, next, next_item);
293 } 293 }
294 294
295 cur = sd->content; 295 cur = sd->content;
296 296
297 /* Try to Focus cycle in subitem */ 297 /* Try to Focus cycle in subitem */
298 if (!sd->hidden) return elm_widget_focus_next_get(cur, dir, next); 298 if (!sd->hidden) return elm_widget_focus_next_get(cur, dir, next, next_item);
299 299
300 /* access */ 300 /* access */
301 if (_elm_config->access_mode != ELM_ACCESS_MODE_OFF) 301 if (_elm_config->access_mode != ELM_ACCESS_MODE_OFF)
@@ -488,7 +488,7 @@ _panel_toggle(void *data EINA_UNUSED,
488 if (sd->content && elm_widget_focus_get(sd->content)) 488 if (sd->content && elm_widget_focus_get(sd->content))
489 { 489 {
490 elm_widget_focused_object_clear(obj); 490 elm_widget_focused_object_clear(obj);
491 elm_widget_focus_steal(obj); 491 elm_widget_focus_steal(obj, NULL);
492 } 492 }
493 } 493 }
494 494
diff --git a/src/lib/elm_panes.c b/src/lib/elm_panes.c
index 335fe95b4..87dd4a7ab 100644
--- a/src/lib/elm_panes.c
+++ b/src/lib/elm_panes.c
@@ -82,13 +82,14 @@ _elm_panes_elm_widget_theme_apply(Eo *obj, Elm_Panes_Data *sd)
82} 82}
83 83
84EOLIAN static Eina_Bool 84EOLIAN static Eina_Bool
85_elm_panes_elm_widget_focus_next(Eo *obj, Elm_Panes_Data *sd, Elm_Focus_Direction dir, Evas_Object **next) 85_elm_panes_elm_widget_focus_next(Eo *obj, Elm_Panes_Data *sd, Elm_Focus_Direction dir, Evas_Object **next, Elm_Object_Item **next_item)
86{ 86{
87 double w, h; 87 double w, h;
88 unsigned char i; 88 unsigned char i;
89 Evas_Object *to_focus; 89 Evas_Object *to_focus;
90 Evas_Object *chain[2]; 90 Evas_Object *chain[2];
91 Evas_Object *left, *right; 91 Evas_Object *left, *right;
92 Elm_Object_Item *to_focus_item;
92 93
93 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE); 94 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE);
94 95
@@ -100,7 +101,7 @@ _elm_panes_elm_widget_focus_next(Eo *obj, Elm_Panes_Data *sd, Elm_Focus_Directio
100 101
101 if (((sd->horizontal) && (h == 0.0)) || ((!sd->horizontal) && (w == 0.0))) 102 if (((sd->horizontal) && (h == 0.0)) || ((!sd->horizontal) && (w == 0.0)))
102 { 103 {
103 return elm_widget_focus_next_get(right, dir, next); 104 return elm_widget_focus_next_get(right, dir, next, next_item);
104 } 105 }
105 106
106 /* Direction */ 107 /* Direction */
@@ -118,13 +119,14 @@ _elm_panes_elm_widget_focus_next(Eo *obj, Elm_Panes_Data *sd, Elm_Focus_Directio
118 119
119 i = elm_widget_focus_get(chain[1]); 120 i = elm_widget_focus_get(chain[1]);
120 121
121 if (elm_widget_focus_next_get(chain[i], dir, next)) return EINA_TRUE; 122 if (elm_widget_focus_next_get(chain[i], dir, next, next_item)) return EINA_TRUE;
122 123
123 i = !i; 124 i = !i;
124 125
125 if (elm_widget_focus_next_get(chain[i], dir, &to_focus)) 126 if (elm_widget_focus_next_get(chain[i], dir, &to_focus, &to_focus_item))
126 { 127 {
127 *next = to_focus; 128 *next = to_focus;
129 *next_item = to_focus_item;
128 return !!i; 130 return !!i;
129 } 131 }
130 132
diff --git a/src/lib/elm_photocam.c b/src/lib/elm_photocam.c
index 2456425a6..d5a27c226 100644
--- a/src/lib/elm_photocam.c
+++ b/src/lib/elm_photocam.c
@@ -853,12 +853,12 @@ _mouse_up_cb(void *data,
853} 853}
854 854
855EOLIAN static Eina_Bool 855EOLIAN static Eina_Bool
856_elm_photocam_elm_widget_on_focus(Eo *obj, Elm_Photocam_Data *_pd EINA_UNUSED) 856_elm_photocam_elm_widget_on_focus(Eo *obj, Elm_Photocam_Data *_pd EINA_UNUSED, Elm_Object_Item *item EINA_UNUSED)
857{ 857{
858 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE); 858 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE);
859 Eina_Bool int_ret = EINA_FALSE; 859 Eina_Bool int_ret = EINA_FALSE;
860 860
861 eo_do_super(obj, MY_CLASS, int_ret = elm_obj_widget_on_focus()); 861 eo_do_super(obj, MY_CLASS, int_ret = elm_obj_widget_on_focus(NULL));
862 if (!int_ret) return EINA_FALSE; 862 if (!int_ret) return EINA_FALSE;
863 863
864 if (elm_widget_focus_get(obj)) 864 if (elm_widget_focus_get(obj))
diff --git a/src/lib/elm_plug.c b/src/lib/elm_plug.c
index c3c31aa81..3b132f239 100644
--- a/src/lib/elm_plug.c
+++ b/src/lib/elm_plug.c
@@ -59,13 +59,13 @@ _elm_plug_resized(Ecore_Evas *ee)
59} 59}
60 60
61EOLIAN static Eina_Bool 61EOLIAN static Eina_Bool
62_elm_plug_elm_widget_on_focus(Eo *obj, void *sd EINA_UNUSED) 62_elm_plug_elm_widget_on_focus(Eo *obj, void *sd EINA_UNUSED, Elm_Object_Item *item EINA_UNUSED)
63{ 63{
64 Eina_Bool int_ret = EINA_FALSE; 64 Eina_Bool int_ret = EINA_FALSE;
65 65
66 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE); 66 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE);
67 67
68 eo_do_super(obj, MY_CLASS, int_ret = elm_obj_widget_on_focus()); 68 eo_do_super(obj, MY_CLASS, int_ret = elm_obj_widget_on_focus(NULL));
69 if (!int_ret) return EINA_FALSE; 69 if (!int_ret) return EINA_FALSE;
70 70
71 if (elm_widget_focus_get(obj)) 71 if (elm_widget_focus_get(obj))
diff --git a/src/lib/elm_prefs.c b/src/lib/elm_prefs.c
index 5b22fd416..068678ad5 100644
--- a/src/lib/elm_prefs.c
+++ b/src/lib/elm_prefs.c
@@ -473,7 +473,7 @@ _elm_prefs_evas_object_smart_del(Eo *obj, Elm_Prefs_Data *sd)
473} 473}
474 474
475EOLIAN static Eina_Bool 475EOLIAN static Eina_Bool
476_elm_prefs_elm_widget_focus_next(Eo *obj, Elm_Prefs_Data *sd, Elm_Focus_Direction dir, Evas_Object **next) 476_elm_prefs_elm_widget_focus_next(Eo *obj, Elm_Prefs_Data *sd, Elm_Focus_Direction dir, Evas_Object **next, Elm_Object_Item **next_item)
477{ 477{
478 const Eina_List *items; 478 const Eina_List *items;
479 479
@@ -483,12 +483,12 @@ _elm_prefs_elm_widget_focus_next(Eo *obj, Elm_Prefs_Data *sd, Elm_Focus_Directio
483 if (items) 483 if (items)
484 { 484 {
485 return elm_widget_focus_list_next_get 485 return elm_widget_focus_list_next_get
486 (obj, items, eina_list_data_get, dir, next); 486 (obj, items, eina_list_data_get, dir, next, next_item);
487 } 487 }
488 488
489 if (sd->root && sd->root->w_obj) 489 if (sd->root && sd->root->w_obj)
490 { 490 {
491 return elm_widget_focus_next_get(sd->root->w_obj, dir, next); 491 return elm_widget_focus_next_get(sd->root->w_obj, dir, next, next_item);
492 } 492 }
493 493
494 if (next) *next = NULL; 494 if (next) *next = NULL;
diff --git a/src/lib/elm_scroller.c b/src/lib/elm_scroller.c
index 22e0684f9..59c9a4a36 100644
--- a/src/lib/elm_scroller.c
+++ b/src/lib/elm_scroller.c
@@ -100,6 +100,7 @@ _key_action_move(Evas_Object *obj, const char *params)
100 Evas_Object *current_focus = NULL; 100 Evas_Object *current_focus = NULL;
101 Eina_List *can_focus_list = NULL; 101 Eina_List *can_focus_list = NULL;
102 Evas_Object *new_focus = NULL; 102 Evas_Object *new_focus = NULL;
103 Elm_Object_Item *new_focus_item = NULL;
103 Evas_Coord f_x = 0; 104 Evas_Coord f_x = 0;
104 Evas_Coord f_y = 0; 105 Evas_Coord f_y = 0;
105 Evas_Coord f_w = 0; 106 Evas_Coord f_w = 0;
@@ -145,7 +146,7 @@ _key_action_move(Evas_Object *obj, const char *params)
145 cur_weight += ((f_y - c_y) - y) * ((f_y - c_y) - y); 146 cur_weight += ((f_y - c_y) - y) * ((f_y - c_y) - y);
146 if (cur_weight == 0.0) 147 if (cur_weight == 0.0)
147 { 148 {
148 elm_widget_focus_steal(cur); 149 elm_widget_focus_steal(cur, NULL);
149 eina_list_free(can_focus_list); 150 eina_list_free(can_focus_list);
150 return EINA_TRUE; 151 return EINA_TRUE;
151 } 152 }
@@ -159,7 +160,7 @@ _key_action_move(Evas_Object *obj, const char *params)
159 } 160 }
160 if (new_focus) 161 if (new_focus)
161 { 162 {
162 elm_widget_focus_steal(new_focus); 163 elm_widget_focus_steal(new_focus, NULL);
163 eina_list_free(can_focus_list); 164 eina_list_free(can_focus_list);
164 return EINA_TRUE; 165 return EINA_TRUE;
165 } 166 }
@@ -169,13 +170,13 @@ _key_action_move(Evas_Object *obj, const char *params)
169 Eina_Bool r = EINA_FALSE; 170 Eina_Bool r = EINA_FALSE;
170 171
171 if (!strcmp(dir, "left")) 172 if (!strcmp(dir, "left"))
172 r = elm_widget_focus_next_get(obj, ELM_FOCUS_LEFT, &new_focus); 173 r = elm_widget_focus_next_get(obj, ELM_FOCUS_LEFT, &new_focus, &new_focus_item);
173 else if (!strcmp(dir, "right")) 174 else if (!strcmp(dir, "right"))
174 r = elm_widget_focus_next_get(obj, ELM_FOCUS_RIGHT, &new_focus); 175 r = elm_widget_focus_next_get(obj, ELM_FOCUS_RIGHT, &new_focus, &new_focus_item);
175 else if (!strcmp(dir, "up")) 176 else if (!strcmp(dir, "up"))
176 r = elm_widget_focus_next_get(obj, ELM_FOCUS_UP, &new_focus); 177 r = elm_widget_focus_next_get(obj, ELM_FOCUS_UP, &new_focus, &new_focus_item);
177 else if (!strcmp(dir, "down")) 178 else if (!strcmp(dir, "down"))
178 r = elm_widget_focus_next_get(obj, ELM_FOCUS_DOWN, &new_focus); 179 r = elm_widget_focus_next_get(obj, ELM_FOCUS_DOWN, &new_focus, &new_focus_item);
179 180
180 if (r && new_focus) 181 if (r && new_focus)
181 { 182 {
@@ -192,7 +193,7 @@ _key_action_move(Evas_Object *obj, const char *params)
192 193
193 if (ELM_RECTS_INTERSECT(x, y, v_w, v_h, l_x, l_y, l_w, l_h)) 194 if (ELM_RECTS_INTERSECT(x, y, v_w, v_h, l_x, l_y, l_w, l_h))
194 { 195 {
195 elm_widget_focus_steal(new_focus); 196 elm_widget_focus_steal(new_focus, new_focus_item);
196 eina_list_free(can_focus_list); 197 eina_list_free(can_focus_list);
197 return EINA_TRUE; 198 return EINA_TRUE;
198 } 199 }
@@ -413,7 +414,7 @@ _elm_scroller_elm_widget_focus_next_manager_is(Eo *obj EINA_UNUSED, Elm_Scroller
413} 414}
414 415
415EOLIAN static Eina_Bool 416EOLIAN static Eina_Bool
416_elm_scroller_elm_widget_focus_next(Eo *obj EINA_UNUSED, Elm_Scroller_Data *sd, Elm_Focus_Direction dir, Evas_Object **next) 417_elm_scroller_elm_widget_focus_next(Eo *obj EINA_UNUSED, Elm_Scroller_Data *sd, Elm_Focus_Direction dir, Evas_Object **next, Elm_Object_Item **next_item)
417{ 418{
418 Evas_Object *cur; 419 Evas_Object *cur;
419 420
@@ -427,7 +428,7 @@ _elm_scroller_elm_widget_focus_next(Eo *obj EINA_UNUSED, Elm_Scroller_Data *sd,
427 if ((elm_widget_can_focus_get(cur)) || 428 if ((elm_widget_can_focus_get(cur)) ||
428 (elm_widget_child_can_focus_get(cur))) 429 (elm_widget_child_can_focus_get(cur)))
429 { 430 {
430 return elm_widget_focus_next_get(cur, dir, next); 431 return elm_widget_focus_next_get(cur, dir, next, next_item);
431 } 432 }
432 433
433 return EINA_FALSE; 434 return EINA_FALSE;
@@ -439,7 +440,7 @@ _elm_scroller_elm_widget_focus_next(Eo *obj EINA_UNUSED, Elm_Scroller_Data *sd,
439 if ((elm_widget_can_focus_get(cur)) || 440 if ((elm_widget_can_focus_get(cur)) ||
440 (elm_widget_child_can_focus_get(cur))) 441 (elm_widget_child_can_focus_get(cur)))
441 { 442 {
442 return elm_widget_focus_next_get(cur, dir, next); 443 return elm_widget_focus_next_get(cur, dir, next, next_item);
443 } 444 }
444 } 445 }
445 446
diff --git a/src/lib/elm_segment_control.c b/src/lib/elm_segment_control.c
index a01193649..53319e454 100644
--- a/src/lib/elm_segment_control.c
+++ b/src/lib/elm_segment_control.c
@@ -644,7 +644,7 @@ _elm_segment_control_elm_widget_focus_next_manager_is(Eo *obj EINA_UNUSED, Elm_S
644} 644}
645 645
646EOLIAN static Eina_Bool 646EOLIAN static Eina_Bool
647_elm_segment_control_elm_widget_focus_next(Eo *obj, Elm_Segment_Control_Data *sd, Elm_Focus_Direction dir, Evas_Object **next) 647_elm_segment_control_elm_widget_focus_next(Eo *obj, Elm_Segment_Control_Data *sd, Elm_Focus_Direction dir, Evas_Object **next, Elm_Object_Item **next_item)
648{ 648{
649 Eina_List *items = NULL; 649 Eina_List *items = NULL;
650 Eina_List *l; 650 Eina_List *l;
@@ -659,7 +659,7 @@ _elm_segment_control_elm_widget_focus_next(Eo *obj, Elm_Segment_Control_Data *sd
659 } 659 }
660 660
661 return elm_widget_focus_list_next_get 661 return elm_widget_focus_list_next_get
662 (obj, items, eina_list_data_get, dir, next); 662 (obj, items, eina_list_data_get, dir, next, next_item);
663} 663}
664 664
665EOLIAN static Eina_Bool 665EOLIAN static Eina_Bool
diff --git a/src/lib/elm_slider.c b/src/lib/elm_slider.c
index d81ed572f..bffab0a3d 100644
--- a/src/lib/elm_slider.c
+++ b/src/lib/elm_slider.c
@@ -1196,11 +1196,11 @@ _elm_slider_elm_widget_focus_direction_manager_is(Eo *obj EINA_UNUSED, Elm_Slide
1196} 1196}
1197 1197
1198EOLIAN static Eina_Bool 1198EOLIAN static Eina_Bool
1199_elm_slider_elm_widget_on_focus(Eo *obj, Elm_Slider_Data *sd EINA_UNUSED) 1199_elm_slider_elm_widget_on_focus(Eo *obj, Elm_Slider_Data *sd EINA_UNUSED, Elm_Object_Item *item EINA_UNUSED)
1200{ 1200{
1201 Eina_Bool int_ret = EINA_FALSE; 1201 Eina_Bool int_ret = EINA_FALSE;
1202 1202
1203 eo_do_super(obj, MY_CLASS, int_ret = elm_obj_widget_on_focus()); 1203 eo_do_super(obj, MY_CLASS, int_ret = elm_obj_widget_on_focus(NULL));
1204 1204
1205 if ((sd->indicator_visible_mode == ELM_SLIDER_INDICATOR_VISIBLE_MODE_ON_FOCUS) && elm_widget_focus_get(obj)) 1205 if ((sd->indicator_visible_mode == ELM_SLIDER_INDICATOR_VISIBLE_MODE_ON_FOCUS) && elm_widget_focus_get(obj))
1206 _popup_show(obj, NULL, NULL, NULL); 1206 _popup_show(obj, NULL, NULL, NULL);
diff --git a/src/lib/elm_spinner.c b/src/lib/elm_spinner.c
index f0a8d2ffd..46533c39d 100644
--- a/src/lib/elm_spinner.c
+++ b/src/lib/elm_spinner.c
@@ -760,10 +760,10 @@ _elm_spinner_elm_layout_sizing_eval(Eo *obj, Elm_Spinner_Data *_pd EINA_UNUSED)
760} 760}
761 761
762EOLIAN static Eina_Bool 762EOLIAN static Eina_Bool
763_elm_spinner_elm_widget_on_focus(Eo *obj, Elm_Spinner_Data *sd) 763_elm_spinner_elm_widget_on_focus(Eo *obj, Elm_Spinner_Data *sd, Elm_Object_Item *item EINA_UNUSED)
764{ 764{
765 Eina_Bool int_ret = EINA_FALSE; 765 Eina_Bool int_ret = EINA_FALSE;
766 eo_do_super(obj, MY_CLASS, int_ret = elm_obj_widget_on_focus()); 766 eo_do_super(obj, MY_CLASS, int_ret = elm_obj_widget_on_focus(NULL));
767 if (!int_ret) return EINA_FALSE; 767 if (!int_ret) return EINA_FALSE;
768 768
769 if (!elm_widget_focus_get(obj)) 769 if (!elm_widget_focus_get(obj))
@@ -1213,7 +1213,7 @@ _access_object_get(const Evas_Object *obj, const char* part)
1213} 1213}
1214 1214
1215EOLIAN static Eina_Bool 1215EOLIAN static Eina_Bool
1216_elm_spinner_elm_widget_focus_next(Eo *obj, Elm_Spinner_Data *_pd, Elm_Focus_Direction dir, Evas_Object **next) 1216_elm_spinner_elm_widget_focus_next(Eo *obj, Elm_Spinner_Data *_pd, Elm_Focus_Direction dir, Evas_Object **next, Elm_Object_Item **next_item)
1217{ 1217{
1218 Evas_Object *ao; 1218 Evas_Object *ao;
1219 Eina_List *items = NULL; 1219 Eina_List *items = NULL;
@@ -1236,7 +1236,7 @@ _elm_spinner_elm_widget_focus_next(Eo *obj, Elm_Spinner_Data *_pd, Elm_Focus_Dir
1236 1236
1237 } 1237 }
1238 return elm_widget_focus_list_next_get 1238 return elm_widget_focus_list_next_get
1239 (obj, items, eina_list_data_get, dir, next); 1239 (obj, items, eina_list_data_get, dir, next, next_item);
1240} 1240}
1241 1241
1242EOLIAN static void 1242EOLIAN static void
diff --git a/src/lib/elm_table.c b/src/lib/elm_table.c
index 78a38a21d..51815188e 100644
--- a/src/lib/elm_table.c
+++ b/src/lib/elm_table.c
@@ -21,7 +21,7 @@ _elm_table_elm_widget_focus_next_manager_is(Eo *obj EINA_UNUSED, void *_pd EINA_
21} 21}
22 22
23EOLIAN static Eina_Bool 23EOLIAN static Eina_Bool
24_elm_table_elm_widget_focus_next(Eo *obj, void *_pd EINA_UNUSED, Elm_Focus_Direction dir, Evas_Object **next) 24_elm_table_elm_widget_focus_next(Eo *obj, void *_pd EINA_UNUSED, Elm_Focus_Direction dir, Evas_Object **next, Elm_Object_Item **next_item)
25{ 25{
26 Eina_Bool int_ret; 26 Eina_Bool int_ret;
27 27
@@ -48,7 +48,7 @@ _elm_table_elm_widget_focus_next(Eo *obj, void *_pd EINA_UNUSED, Elm_Focus_Direc
48 if (!items) return EINA_FALSE; 48 if (!items) return EINA_FALSE;
49 } 49 }
50 50
51 int_ret = elm_widget_focus_list_next_get(obj, items, list_data_get, dir, next); 51 int_ret = elm_widget_focus_list_next_get(obj, items, list_data_get, dir, next, next_item);
52 52
53 if (list_free) list_free((Eina_List *)items); 53 if (list_free) list_free((Eina_List *)items);
54 54
diff --git a/src/lib/elm_toolbar.c b/src/lib/elm_toolbar.c
index 163bd314e..708f32f1d 100644
--- a/src/lib/elm_toolbar.c
+++ b/src/lib/elm_toolbar.c
@@ -742,13 +742,13 @@ _elm_toolbar_nearest_visible_item_get(Evas_Object *obj, Elm_Object_Item *eo_it)
742} 742}
743 743
744EOLIAN static Eina_Bool 744EOLIAN static Eina_Bool
745_elm_toolbar_elm_widget_on_focus(Eo *obj, Elm_Toolbar_Data *sd) 745_elm_toolbar_elm_widget_on_focus(Eo *obj, Elm_Toolbar_Data *sd, Elm_Object_Item *item EINA_UNUSED)
746{ 746{
747 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE); 747 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE);
748 Eina_Bool int_ret = EINA_FALSE; 748 Eina_Bool int_ret = EINA_FALSE;
749 Elm_Object_Item *eo_it = NULL; 749 Elm_Object_Item *eo_it = NULL;
750 750
751 eo_do_super(obj, MY_CLASS, int_ret = elm_obj_widget_on_focus()); 751 eo_do_super(obj, MY_CLASS, int_ret = elm_obj_widget_on_focus(NULL));
752 if (!int_ret) return EINA_FALSE; 752 if (!int_ret) return EINA_FALSE;
753 if (!sd->items) return EINA_FALSE; 753 if (!sd->items) return EINA_FALSE;
754 754
@@ -2854,7 +2854,7 @@ _elm_toolbar_elm_widget_focus_next_manager_is(Eo *obj EINA_UNUSED, Elm_Toolbar_D
2854} 2854}
2855 2855
2856EOLIAN static Eina_Bool 2856EOLIAN static Eina_Bool
2857_elm_toolbar_elm_widget_focus_next(Eo *obj, Elm_Toolbar_Data *sd, Elm_Focus_Direction dir, Evas_Object **next) 2857_elm_toolbar_elm_widget_focus_next(Eo *obj, Elm_Toolbar_Data *sd, Elm_Focus_Direction dir, Evas_Object **next, Elm_Object_Item **next_item)
2858{ 2858{
2859 Eina_List *items = NULL; 2859 Eina_List *items = NULL;
2860 Eina_List *list; 2860 Eina_List *list;
@@ -2875,7 +2875,7 @@ _elm_toolbar_elm_widget_focus_next(Eo *obj, Elm_Toolbar_Data *sd, Elm_Focus_Dire
2875 } 2875 }
2876 2876
2877 return elm_widget_focus_list_next_get 2877 return elm_widget_focus_list_next_get
2878 (obj, items, eina_list_data_get, dir, next); 2878 (obj, items, eina_list_data_get, dir, next, next_item);
2879} 2879}
2880 2880
2881static void 2881static void
diff --git a/src/lib/elm_web2.c b/src/lib/elm_web2.c
index bfd116c70..e3e9bfb94 100644
--- a/src/lib/elm_web2.c
+++ b/src/lib/elm_web2.c
@@ -633,7 +633,7 @@ _elm_web_elm_widget_theme_apply(Eo *obj, Elm_Web_Data *sd EINA_UNUSED)
633} 633}
634 634
635EOLIAN static Eina_Bool 635EOLIAN static Eina_Bool
636_elm_web_elm_widget_on_focus(Eo *obj, Elm_Web_Data *sd) 636_elm_web_elm_widget_on_focus(Eo *obj, Elm_Web_Data *sd, Elm_Object_Item *item EINA_UNUSED)
637{ 637{
638#ifdef HAVE_ELEMENTARY_WEB 638#ifdef HAVE_ELEMENTARY_WEB
639 Evas_Object *top; 639 Evas_Object *top;
@@ -641,7 +641,7 @@ _elm_web_elm_widget_on_focus(Eo *obj, Elm_Web_Data *sd)
641 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_TRUE); 641 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_TRUE);
642 Eina_Bool int_ret = EINA_FALSE; 642 Eina_Bool int_ret = EINA_FALSE;
643 643
644 eo_do_super(obj, MY_CLASS, int_ret = elm_obj_widget_on_focus()); 644 eo_do_super(obj, MY_CLASS, int_ret = elm_obj_widget_on_focus(NULL));
645 if (!int_ret) return EINA_TRUE; 645 if (!int_ret) return EINA_TRUE;
646 646
647 top = elm_widget_top_get(obj); 647 top = elm_widget_top_get(obj);
diff --git a/src/lib/elm_widget.c b/src/lib/elm_widget.c
index 49fe1ac5f..3b93522bb 100644
--- a/src/lib/elm_widget.c
+++ b/src/lib/elm_widget.c
@@ -410,7 +410,7 @@ _if_focused_revert(Evas_Object *obj,
410 if (!sd2) return; 410 if (!sd2) return;
411 411
412 if (!elm_widget_focus_get(newest)) 412 if (!elm_widget_focus_get(newest))
413 elm_widget_focus_steal(newest); 413 elm_widget_focus_steal(newest, NULL);
414 else 414 else
415 { 415 {
416 if (sd2->resize_obj && elm_widget_focus_get(sd2->resize_obj)) 416 if (sd2->resize_obj && elm_widget_focus_get(sd2->resize_obj))
@@ -814,7 +814,7 @@ _elm_widget_focus_highlight_style_get(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data
814} 814}
815 815
816static void 816static void
817_parent_focus(Evas_Object *obj) 817_parent_focus(Evas_Object *obj, Elm_Object_Item *item)
818{ 818{
819 API_ENTRY return; 819 API_ENTRY return;
820 820
@@ -823,7 +823,7 @@ _parent_focus(Evas_Object *obj)
823 Evas_Object *o = elm_widget_parent_get(obj); 823 Evas_Object *o = elm_widget_parent_get(obj);
824 sd->focus_order_on_calc = EINA_TRUE; 824 sd->focus_order_on_calc = EINA_TRUE;
825 825
826 if (o) _parent_focus(o); 826 if (o) _parent_focus(o, item);
827 827
828 if (!sd->focus_order_on_calc) 828 if (!sd->focus_order_on_calc)
829 return; /* we don't want to override it if by means of any of the 829 return; /* we don't want to override it if by means of any of the
@@ -836,7 +836,7 @@ _parent_focus(Evas_Object *obj)
836 if (sd->top_win_focused) 836 if (sd->top_win_focused)
837 { 837 {
838 sd->focused = EINA_TRUE; 838 sd->focused = EINA_TRUE;
839 eo_do(obj, elm_obj_widget_on_focus()); 839 eo_do(obj, elm_obj_widget_on_focus(item));
840 } 840 }
841 sd->focus_order_on_calc = EINA_FALSE; 841 sd->focus_order_on_calc = EINA_FALSE;
842 842
@@ -1845,11 +1845,11 @@ EOLIAN static void
1845_elm_widget_focus_cycle(Eo *obj, Elm_Widget_Smart_Data *_pd EINA_UNUSED, Elm_Focus_Direction dir) 1845_elm_widget_focus_cycle(Eo *obj, Elm_Widget_Smart_Data *_pd EINA_UNUSED, Elm_Focus_Direction dir)
1846{ 1846{
1847 Evas_Object *target = NULL; 1847 Evas_Object *target = NULL;
1848 1848 Elm_Object_Item *target_item = NULL;
1849 if (!_elm_widget_is(obj)) 1849 if (!_elm_widget_is(obj))
1850 return; 1850 return;
1851 focus_origin = dir; 1851 focus_origin = dir;
1852 elm_widget_focus_next_get(obj, dir, &target); 1852 elm_widget_focus_next_get(obj, dir, &target, &target_item);
1853 if (target) 1853 if (target)
1854 { 1854 {
1855 /* access */ 1855 /* access */
@@ -1859,12 +1859,12 @@ _elm_widget_focus_cycle(Eo *obj, Elm_Widget_Smart_Data *_pd EINA_UNUSED, Elm_Foc
1859 the ECORE_X_ATOM_E_ILLUME_ACCESS_ACTION_ACTIVATE message, 1859 the ECORE_X_ATOM_E_ILLUME_ACCESS_ACTION_ACTIVATE message,
1860 target will steal focus, or focus its own job. */ 1860 target will steal focus, or focus its own job. */
1861 if (!_elm_access_auto_highlight_get()) 1861 if (!_elm_access_auto_highlight_get())
1862 elm_widget_focus_steal(target); 1862 elm_widget_focus_steal(target, target_item);
1863 1863
1864 _elm_access_highlight_set(target); 1864 _elm_access_highlight_set(target);
1865 elm_widget_focus_region_show(target); 1865 elm_widget_focus_region_show(target);
1866 } 1866 }
1867 else elm_widget_focus_steal(target); 1867 else elm_widget_focus_steal(target, target_item);
1868 } 1868 }
1869} 1869}
1870 1870
@@ -1899,7 +1899,7 @@ _elm_widget_focus_direction_go(Eo *obj, Elm_Widget_Smart_Data *_pd EINA_UNUSED,
1899 if (elm_widget_focus_direction_get 1899 if (elm_widget_focus_direction_get
1900 (obj, current_focused, degree, &target, &weight)) 1900 (obj, current_focused, degree, &target, &weight))
1901 { 1901 {
1902 elm_widget_focus_steal(target); 1902 elm_widget_focus_steal(target, NULL);
1903 return EINA_TRUE; 1903 return EINA_TRUE;
1904 } 1904 }
1905 1905
@@ -2359,7 +2359,7 @@ _elm_widget_focus_list_direction_get(const Eo *obj EINA_UNUSED, Elm_Widget_Smart
2359 * @ingroup Widget 2359 * @ingroup Widget
2360 */ 2360 */
2361EOLIAN static Eina_Bool 2361EOLIAN static Eina_Bool
2362_elm_widget_focus_next_get(const Eo *obj, Elm_Widget_Smart_Data *sd, Elm_Focus_Direction dir, Evas_Object **next) 2362_elm_widget_focus_next_get(const Eo *obj, Elm_Widget_Smart_Data *sd, Elm_Focus_Direction dir, Evas_Object **next, Elm_Object_Item **next_item)
2363{ 2363{
2364 Elm_Access_Info *ac; 2364 Elm_Access_Info *ac;
2365 2365
@@ -2387,22 +2387,39 @@ _elm_widget_focus_next_get(const Eo *obj, Elm_Widget_Smart_Data *sd, Elm_Focus_D
2387 if (_elm_widget_focus_chain_manager_is(obj)) 2387 if (_elm_widget_focus_chain_manager_is(obj))
2388 { 2388 {
2389 Eina_Bool int_ret = EINA_FALSE; 2389 Eina_Bool int_ret = EINA_FALSE;
2390 eo_do((Eo *)obj, int_ret = elm_obj_widget_focus_next(dir, next)); 2390 eo_do((Eo *)obj, int_ret = elm_obj_widget_focus_next(dir, next, next_item));
2391 if (!int_ret && elm_widget_focus_get(obj)) 2391 if (!int_ret && elm_widget_focus_get(obj))
2392 { 2392 {
2393 Evas_Object *o = NULL; 2393 Evas_Object *o = NULL;
2394 if (dir == ELM_FOCUS_PREVIOUS) 2394 if (dir == ELM_FOCUS_PREVIOUS)
2395 o = sd->focus_previous; 2395 *next_item = sd->item_focus_previous;
2396 else if (dir == ELM_FOCUS_NEXT) 2396 else if (dir == ELM_FOCUS_NEXT)
2397 o = sd->focus_next; 2397 *next_item = sd->item_focus_next;
2398 else if (dir == ELM_FOCUS_UP) 2398 else if (dir == ELM_FOCUS_UP)
2399 o = sd->focus_up; 2399 *next_item = sd->item_focus_up;
2400 else if (dir == ELM_FOCUS_DOWN) 2400 else if (dir == ELM_FOCUS_DOWN)
2401 o = sd->focus_down; 2401 *next_item = sd->item_focus_down;
2402 else if (dir == ELM_FOCUS_RIGHT) 2402 else if (dir == ELM_FOCUS_RIGHT)
2403 o = sd->focus_right; 2403 *next_item = sd->item_focus_right;
2404 else if (dir == ELM_FOCUS_LEFT) 2404 else if (dir == ELM_FOCUS_LEFT)
2405 o = sd->focus_left; 2405 *next_item = sd->item_focus_left;
2406 o = elm_object_item_widget_get(*next_item);
2407
2408 if (!o)
2409 {
2410 if (dir == ELM_FOCUS_PREVIOUS)
2411 o = sd->focus_previous;
2412 else if (dir == ELM_FOCUS_NEXT)
2413 o = sd->focus_next;
2414 else if (dir == ELM_FOCUS_UP)
2415 o = sd->focus_up;
2416 else if (dir == ELM_FOCUS_DOWN)
2417 o = sd->focus_down;
2418 else if (dir == ELM_FOCUS_RIGHT)
2419 o = sd->focus_right;
2420 else if (dir == ELM_FOCUS_LEFT)
2421 o = sd->focus_left;
2422 }
2406 2423
2407 if (o) 2424 if (o)
2408 { 2425 {
@@ -2430,17 +2447,34 @@ _elm_widget_focus_next_get(const Eo *obj, Elm_Widget_Smart_Data *sd, Elm_Focus_D
2430 if (elm_widget_focus_get(obj)) 2447 if (elm_widget_focus_get(obj))
2431 { 2448 {
2432 if (dir == ELM_FOCUS_PREVIOUS) 2449 if (dir == ELM_FOCUS_PREVIOUS)
2433 *next = sd->focus_previous; 2450 *next_item = sd->item_focus_previous;
2434 else if (dir == ELM_FOCUS_NEXT) 2451 else if (dir == ELM_FOCUS_NEXT)
2435 *next = sd->focus_next; 2452 *next_item = sd->item_focus_next;
2436 else if (dir == ELM_FOCUS_UP) 2453 else if (dir == ELM_FOCUS_UP)
2437 *next = sd->focus_up; 2454 *next_item = sd->item_focus_up;
2438 else if (dir == ELM_FOCUS_DOWN) 2455 else if (dir == ELM_FOCUS_DOWN)
2439 *next = sd->focus_down; 2456 *next_item = sd->item_focus_down;
2440 else if (dir == ELM_FOCUS_RIGHT) 2457 else if (dir == ELM_FOCUS_RIGHT)
2441 *next = sd->focus_right; 2458 *next_item = sd->item_focus_right;
2442 else if (dir == ELM_FOCUS_LEFT) 2459 else if (dir == ELM_FOCUS_LEFT)
2443 *next = sd->focus_left; 2460 *next_item = sd->item_focus_left;
2461 *next = elm_object_item_widget_get(*next_item);
2462
2463 if (!(*next))
2464 {
2465 if (dir == ELM_FOCUS_PREVIOUS)
2466 *next = sd->focus_previous;
2467 else if (dir == ELM_FOCUS_NEXT)
2468 *next = sd->focus_next;
2469 else if (dir == ELM_FOCUS_UP)
2470 *next = sd->focus_up;
2471 else if (dir == ELM_FOCUS_DOWN)
2472 *next = sd->focus_down;
2473 else if (dir == ELM_FOCUS_RIGHT)
2474 *next = sd->focus_right;
2475 else if (dir == ELM_FOCUS_LEFT)
2476 *next = sd->focus_left;
2477 }
2444 2478
2445 if (*next) return EINA_TRUE; 2479 if (*next) return EINA_TRUE;
2446 } 2480 }
@@ -2470,7 +2504,7 @@ _elm_widget_focus_next_get(const Eo *obj, Elm_Widget_Smart_Data *sd, Elm_Focus_D
2470 * @ingroup Widget 2504 * @ingroup Widget
2471 */ 2505 */
2472EOLIAN static Eina_Bool 2506EOLIAN static Eina_Bool
2473_elm_widget_focus_list_next_get(const Eo *obj, Elm_Widget_Smart_Data *_pd EINA_UNUSED, const Eina_List *items, list_data_get_func_type list_data_get, Elm_Focus_Direction dir, Evas_Object **next) 2507_elm_widget_focus_list_next_get(const Eo *obj, Elm_Widget_Smart_Data *_pd EINA_UNUSED, const Eina_List *items, list_data_get_func_type list_data_get, Elm_Focus_Direction dir, Evas_Object **next, Elm_Object_Item **next_item)
2474{ 2508{
2475 Eina_List *(*list_next)(const Eina_List *list) = NULL; 2509 Eina_List *(*list_next)(const Eina_List *list) = NULL;
2476 Evas_Object *focused_object = NULL; 2510 Evas_Object *focused_object = NULL;
@@ -2494,7 +2528,11 @@ _elm_widget_focus_list_next_get(const Eo *obj, Elm_Widget_Smart_Data *_pd EINA_U
2494 || (dir == ELM_FOCUS_RIGHT) 2528 || (dir == ELM_FOCUS_RIGHT)
2495 || (dir == ELM_FOCUS_LEFT)) 2529 || (dir == ELM_FOCUS_LEFT))
2496 { 2530 {
2497 *next = elm_widget_focus_next_object_get(focused_object, dir); 2531 *next_item = elm_widget_focus_next_item_get(focused_object, dir);
2532 if (*next_item)
2533 *next = elm_object_item_widget_get(*next_item);
2534 else
2535 *next = elm_widget_focus_next_object_get(focused_object, dir);
2498 if (*next) return EINA_TRUE; 2536 if (*next) return EINA_TRUE;
2499 else 2537 else
2500 { 2538 {
@@ -2550,12 +2588,14 @@ _elm_widget_focus_list_next_get(const Eo *obj, Elm_Widget_Smart_Data *_pd EINA_U
2550 2588
2551 const Eina_List *start = l; 2589 const Eina_List *start = l;
2552 Evas_Object *to_focus = NULL; 2590 Evas_Object *to_focus = NULL;
2591 Elm_Object_Item *to_focus_item = NULL;
2553 2592
2554 /* Iterate sub items */ 2593 /* Iterate sub items */
2555 /* Go to the end of list */ 2594 /* Go to the end of list */
2556 for (; l; l = list_next(l)) 2595 for (; l; l = list_next(l))
2557 { 2596 {
2558 Evas_Object *tmp = NULL; 2597 Evas_Object *tmp = NULL;
2598 Elm_Object_Item *tmp_item = NULL;
2559 Evas_Object *cur = list_data_get(l); 2599 Evas_Object *cur = list_data_get(l);
2560 2600
2561 if (!cur) continue; 2601 if (!cur) continue;
@@ -2564,9 +2604,10 @@ _elm_widget_focus_list_next_get(const Eo *obj, Elm_Widget_Smart_Data *_pd EINA_U
2564 continue; 2604 continue;
2565 2605
2566 /* Try Focus cycle in subitem */ 2606 /* Try Focus cycle in subitem */
2567 if (elm_widget_focus_next_get(cur, dir, &tmp)) 2607 if (elm_widget_focus_next_get(cur, dir, &tmp, &tmp_item))
2568 { 2608 {
2569 *next = tmp; 2609 *next = tmp;
2610 *next_item = tmp_item;
2570 return EINA_TRUE; 2611 return EINA_TRUE;
2571 } 2612 }
2572 else if ((dir == ELM_FOCUS_UP) 2613 else if ((dir == ELM_FOCUS_UP)
@@ -2577,11 +2618,15 @@ _elm_widget_focus_list_next_get(const Eo *obj, Elm_Widget_Smart_Data *_pd EINA_U
2577 if (tmp && elm_widget_focus_get(cur)) 2618 if (tmp && elm_widget_focus_get(cur))
2578 { 2619 {
2579 *next = tmp; 2620 *next = tmp;
2621 *next_item = tmp_item;
2580 return EINA_FALSE; 2622 return EINA_FALSE;
2581 } 2623 }
2582 } 2624 }
2583 else if ((tmp) && (!to_focus)) 2625 else if ((tmp) && (!to_focus))
2584 to_focus = tmp; 2626 {
2627 to_focus = tmp;
2628 to_focus_item = tmp_item;
2629 }
2585 } 2630 }
2586 2631
2587 l = items; 2632 l = items;
@@ -2590,21 +2635,24 @@ _elm_widget_focus_list_next_get(const Eo *obj, Elm_Widget_Smart_Data *_pd EINA_U
2590 for (; l != start; l = list_next(l)) 2635 for (; l != start; l = list_next(l))
2591 { 2636 {
2592 Evas_Object *tmp = NULL; 2637 Evas_Object *tmp = NULL;
2638 Elm_Object_Item *tmp_item = NULL;
2593 Evas_Object *cur = list_data_get(l); 2639 Evas_Object *cur = list_data_get(l);
2594 2640
2595 if (elm_widget_parent_get(cur) != obj) 2641 if (elm_widget_parent_get(cur) != obj)
2596 continue; 2642 continue;
2597 2643
2598 /* Try Focus cycle in subitem */ 2644 /* Try Focus cycle in subitem */
2599 elm_widget_focus_next_get(cur, dir, &tmp); 2645 elm_widget_focus_next_get(cur, dir, &tmp, &tmp_item);
2600 if (tmp) 2646 if (tmp)
2601 { 2647 {
2602 *next = tmp; 2648 *next = tmp;
2649 *next_item = tmp_item;
2603 return EINA_FALSE; 2650 return EINA_FALSE;
2604 } 2651 }
2605 } 2652 }
2606 2653
2607 *next = to_focus; 2654 *next = to_focus;
2655 *next_item = to_focus_item;
2608 return EINA_FALSE; 2656 return EINA_FALSE;
2609} 2657}
2610 2658
@@ -2677,6 +2725,44 @@ _elm_widget_focus_next_object_set(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *sd
2677 sd->focus_left = next; 2725 sd->focus_left = next;
2678} 2726}
2679 2727
2728EOLIAN static Elm_Object_Item*
2729_elm_widget_focus_next_item_get(const Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *sd, Elm_Focus_Direction dir)
2730{
2731 Elm_Object_Item *ret = NULL;
2732
2733 if (dir == ELM_FOCUS_PREVIOUS)
2734 ret = sd->item_focus_previous;
2735 else if (dir == ELM_FOCUS_NEXT)
2736 ret = sd->item_focus_next;
2737 else if (dir == ELM_FOCUS_UP)
2738 ret = sd->item_focus_up;
2739 else if (dir == ELM_FOCUS_DOWN)
2740 ret = sd->item_focus_down;
2741 else if (dir == ELM_FOCUS_RIGHT)
2742 ret = sd->item_focus_right;
2743 else if (dir == ELM_FOCUS_LEFT)
2744 ret = sd->item_focus_left;
2745
2746 return ret;
2747}
2748
2749EOLIAN static void
2750_elm_widget_focus_next_item_set(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *sd, Elm_Object_Item *next_item, Elm_Focus_Direction dir)
2751{
2752 if (dir == ELM_FOCUS_PREVIOUS)
2753 sd->item_focus_previous = next_item;
2754 else if (dir == ELM_FOCUS_NEXT)
2755 sd->item_focus_next = next_item;
2756 else if (dir == ELM_FOCUS_UP)
2757 sd->item_focus_up = next_item;
2758 else if (dir == ELM_FOCUS_DOWN)
2759 sd->item_focus_down = next_item;
2760 else if (dir == ELM_FOCUS_RIGHT)
2761 sd->item_focus_right = next_item;
2762 else if (dir == ELM_FOCUS_LEFT)
2763 sd->item_focus_left = next_item;
2764}
2765
2680EOLIAN static void 2766EOLIAN static void
2681_elm_widget_parent_highlight_set(Eo *obj, Elm_Widget_Smart_Data *sd, Eina_Bool highlighted) 2767_elm_widget_parent_highlight_set(Eo *obj, Elm_Widget_Smart_Data *sd, Eina_Bool highlighted)
2682{ 2768{
@@ -2744,7 +2830,7 @@ _elm_widget_focus_set(Eo *obj, Elm_Widget_Smart_Data *sd, Eina_Bool focus)
2744 focus_order++; 2830 focus_order++;
2745 sd->focus_order = focus_order; 2831 sd->focus_order = focus_order;
2746 sd->focused = EINA_TRUE; 2832 sd->focused = EINA_TRUE;
2747 eo_do(obj, elm_obj_widget_on_focus()); 2833 eo_do(obj, elm_obj_widget_on_focus(NULL));
2748 } 2834 }
2749 2835
2750 if (focus) 2836 if (focus)
@@ -2818,11 +2904,11 @@ _elm_widget_focused_object_clear(Eo *obj, Elm_Widget_Smart_Data *sd)
2818 } 2904 }
2819 } 2905 }
2820 sd->focused = EINA_FALSE; 2906 sd->focused = EINA_FALSE;
2821 eo_do(obj, elm_obj_widget_on_focus()); 2907 eo_do(obj, elm_obj_widget_on_focus(NULL));
2822} 2908}
2823 2909
2824EOLIAN static void 2910EOLIAN static void
2825_elm_widget_focus_steal(Eo *obj, Elm_Widget_Smart_Data *sd) 2911_elm_widget_focus_steal(Eo *obj, Elm_Widget_Smart_Data *sd, Elm_Object_Item *item)
2826{ 2912{
2827 Evas_Object *parent, *parent2, *o; 2913 Evas_Object *parent, *parent2, *o;
2828 2914
@@ -2871,7 +2957,7 @@ _elm_widget_focus_steal(Eo *obj, Elm_Widget_Smart_Data *sd)
2871 } 2957 }
2872 } 2958 }
2873 } 2959 }
2874 _parent_focus(obj); 2960 _parent_focus(obj, item);
2875 elm_widget_focus_region_show(obj); 2961 elm_widget_focus_region_show(obj);
2876 return; 2962 return;
2877} 2963}
@@ -3847,7 +3933,7 @@ _elm_widget_focus_mouse_up_handle(Eo *obj, Elm_Widget_Smart_Data *_pd EINA_UNUSE
3847 if (!_is_focusable(obj)) return; 3933 if (!_is_focusable(obj)) return;
3848 top = elm_widget_top_get(obj); 3934 top = elm_widget_top_get(obj);
3849 if (top && eo_isa(top, ELM_WIN_CLASS)) _elm_win_focus_auto_hide(top); 3935 if (top && eo_isa(top, ELM_WIN_CLASS)) _elm_win_focus_auto_hide(top);
3850 elm_widget_focus_steal(obj); 3936 elm_widget_focus_steal(obj, NULL);
3851} 3937}
3852 3938
3853EOLIAN static void 3939EOLIAN static void
@@ -5444,6 +5530,82 @@ _elm_widget_item_access_object_get(const Eo *eo_item EINA_UNUSED, Elm_Widget_Ite
5444 return item->access_obj; 5530 return item->access_obj;
5445} 5531}
5446 5532
5533EOLIAN static Evas_Object *
5534_elm_widget_item_focus_next_object_get(const Eo *eo_item EINA_UNUSED, Elm_Widget_Item_Data *item, Elm_Focus_Direction dir)
5535{
5536 Evas_Object *ret = NULL;
5537
5538 if (dir == ELM_FOCUS_PREVIOUS)
5539 ret = item->focus_previous;
5540 else if (dir == ELM_FOCUS_NEXT)
5541 ret = item->focus_next;
5542 else if (dir == ELM_FOCUS_UP)
5543 ret = item->focus_up;
5544 else if (dir == ELM_FOCUS_DOWN)
5545 ret = item->focus_down;
5546 else if (dir == ELM_FOCUS_RIGHT)
5547 ret = item->focus_right;
5548 else if (dir == ELM_FOCUS_LEFT)
5549 ret = item->focus_left;
5550
5551 return ret;
5552}
5553
5554EOLIAN static void
5555_elm_widget_item_focus_next_object_set(Eo *eo_item EINA_UNUSED, Elm_Widget_Item_Data *item, Evas_Object *next, Elm_Focus_Direction dir)
5556{
5557 if (dir == ELM_FOCUS_PREVIOUS)
5558 item->focus_previous = next;
5559 else if (dir == ELM_FOCUS_NEXT)
5560 item->focus_next = next;
5561 else if (dir == ELM_FOCUS_UP)
5562 item->focus_up = next;
5563 else if (dir == ELM_FOCUS_DOWN)
5564 item->focus_down = next;
5565 else if (dir == ELM_FOCUS_RIGHT)
5566 item->focus_right = next;
5567 else if (dir == ELM_FOCUS_LEFT)
5568 item->focus_left = next;
5569}
5570
5571EOLIAN static Elm_Object_Item*
5572_elm_widget_item_focus_next_item_get(const Eo *eo_item EINA_UNUSED, Elm_Widget_Item_Data *item, Elm_Focus_Direction dir)
5573{
5574 Elm_Object_Item *ret = NULL;
5575
5576 if (dir == ELM_FOCUS_PREVIOUS)
5577 ret = item->item_focus_previous;
5578 else if (dir == ELM_FOCUS_NEXT)
5579 ret = item->item_focus_next;
5580 else if (dir == ELM_FOCUS_UP)
5581 ret = item->item_focus_up;
5582 else if (dir == ELM_FOCUS_DOWN)
5583 ret = item->item_focus_down;
5584 else if (dir == ELM_FOCUS_RIGHT)
5585 ret = item->item_focus_right;
5586 else if (dir == ELM_FOCUS_LEFT)
5587 ret = item->item_focus_left;
5588
5589 return ret;
5590}
5591
5592EOLIAN static void
5593_elm_widget_item_focus_next_item_set(Eo *eo_item EINA_UNUSED, Elm_Widget_Item_Data *item, Elm_Object_Item *next_item, Elm_Focus_Direction dir)
5594{
5595 if (dir == ELM_FOCUS_PREVIOUS)
5596 item->item_focus_previous = next_item;
5597 else if (dir == ELM_FOCUS_NEXT)
5598 item->item_focus_next = next_item;
5599 else if (dir == ELM_FOCUS_UP)
5600 item->item_focus_up = next_item;
5601 else if (dir == ELM_FOCUS_DOWN)
5602 item->item_focus_down = next_item;
5603 else if (dir == ELM_FOCUS_RIGHT)
5604 item->item_focus_right = next_item;
5605 else if (dir == ELM_FOCUS_LEFT)
5606 item->item_focus_left = next_item;
5607}
5608
5447/* happy debug functions */ 5609/* happy debug functions */
5448#ifdef ELM_DEBUG 5610#ifdef ELM_DEBUG
5449static void 5611static void
@@ -5583,7 +5745,7 @@ _elm_widget_eo_base_destructor(Eo *obj, Elm_Widget_Smart_Data *sd)
5583} 5745}
5584 5746
5585EOLIAN static Eina_Bool 5747EOLIAN static Eina_Bool
5586_elm_widget_on_focus(Eo *obj, Elm_Widget_Smart_Data *sd) 5748_elm_widget_on_focus(Eo *obj, Elm_Widget_Smart_Data *sd, Elm_Object_Item *item EINA_UNUSED)
5587{ 5749{
5588 if (elm_widget_can_focus_get(obj)) 5750 if (elm_widget_can_focus_get(obj))
5589 { 5751 {
diff --git a/src/lib/elm_widget.eo b/src/lib/elm_widget.eo
index 808a348cb..94633e107 100644
--- a/src/lib/elm_widget.eo
+++ b/src/lib/elm_widget.eo
@@ -406,15 +406,39 @@ abstract Elm.Widget (Evas.Object_Smart, Elm_Interface_Atspi_Accessible, Elm_Inte
406 } 406 }
407 } 407 }
408 focus_next_object_set { 408 focus_next_object_set {
409 [[Set the next object with specific focus direction.
410
411 @since 1.8]]
409 params { 412 params {
410 @in next: Evas.Object * @nullable; 413 @in next: Evas.Object * @nullable; [[Focus next object]]
411 @in dir: Elm_Focus_Direction; 414 @in dir: Elm_Focus_Direction; [[Focus direction]]
412 } 415 }
413 } 416 }
414 focus_next_object_get @const { 417 focus_next_object_get @const {
415 return: Evas.Object *; 418 [[Get the next object with specific focus direction.
419
420 @since 1.8]]
421 return: Evas.Object *; [[Focus next object]]
416 params { 422 params {
417 @in dir: Elm_Focus_Direction; 423 @in dir: Elm_Focus_Direction; [[Focus direction]]
424 }
425 }
426 focus_next_item_set {
427 [[Set the next object item with specific focus direction.
428
429 @since 1.16]]
430 params {
431 @in next_item: Elm_Object_Item * @nullable; [[Focus next object item]]
432 @in dir: Elm_Focus_Direction; [[Focus direction]]
433 }
434 }
435 focus_next_item_get @const {
436 [[Get the next object item with specific focus direction.
437
438 @since 1.16]]
439 return: Elm_Object_Item *; [[Focus next object item]]
440 params {
441 @in dir: Elm_Focus_Direction; [[Focus direction]]
418 } 442 }
419 } 443 }
420 focus_tree_unfocusable_handle { 444 focus_tree_unfocusable_handle {
@@ -497,6 +521,9 @@ abstract Elm.Widget (Evas.Object_Smart, Elm_Interface_Atspi_Accessible, Elm_Inte
497 } 521 }
498 on_focus { 522 on_focus {
499 [['Virtual' function handling focus in/out events on the widget. return true if this widget can handle focus, false otherwise]] 523 [['Virtual' function handling focus in/out events on the widget. return true if this widget can handle focus, false otherwise]]
524 params {
525 @in item: Elm_Object_Item * @nullable;
526 }
500 return: bool; 527 return: bool;
501 } 528 }
502 on_focus_region { 529 on_focus_region {
@@ -599,6 +626,7 @@ abstract Elm.Widget (Evas.Object_Smart, Elm_Interface_Atspi_Accessible, Elm_Inte
599 params { 626 params {
600 @in dir: Elm_Focus_Direction; 627 @in dir: Elm_Focus_Direction;
601 @out next: Evas.Object *; 628 @out next: Evas.Object *;
629 @out next_item: Elm_Object_Item *;
602 } 630 }
603 } 631 }
604 translatable_part_text_get @const { 632 translatable_part_text_get @const {
@@ -626,6 +654,9 @@ abstract Elm.Widget (Evas.Object_Smart, Elm_Interface_Atspi_Accessible, Elm_Inte
626 focus_custom_chain_unset { 654 focus_custom_chain_unset {
627 } 655 }
628 focus_steal { 656 focus_steal {
657 params {
658 @in item: Elm_Object_Item * @nullable;
659 }
629 } 660 }
630 focus_hide_handle { 661 focus_hide_handle {
631 } 662 }
@@ -634,6 +665,7 @@ abstract Elm.Widget (Evas.Object_Smart, Elm_Interface_Atspi_Accessible, Elm_Inte
634 params { 665 params {
635 @in dir: Elm_Focus_Direction; 666 @in dir: Elm_Focus_Direction;
636 @out next: Evas.Object *; 667 @out next: Evas.Object *;
668 @out next_item: Elm_Object_Item *;
637 } 669 }
638 return: bool; 670 return: bool;
639 } 671 }
@@ -644,6 +676,7 @@ abstract Elm.Widget (Evas.Object_Smart, Elm_Interface_Atspi_Accessible, Elm_Inte
644 @in list_data_get: list_data_get_func_type; 676 @in list_data_get: list_data_get_func_type;
645 @in dir: Elm_Focus_Direction; 677 @in dir: Elm_Focus_Direction;
646 @out next: Evas.Object *; 678 @out next: Evas.Object *;
679 @out next_item: Elm_Object_Item *;
647 } 680 }
648 } 681 }
649 focus_mouse_up_handle { 682 focus_mouse_up_handle {
diff --git a/src/lib/elm_widget.h b/src/lib/elm_widget.h
index 112f93525..1e1ce9bfb 100644
--- a/src/lib/elm_widget.h
+++ b/src/lib/elm_widget.h
@@ -380,6 +380,8 @@ typedef struct _Elm_Widget_Smart_Data
380 Eina_List *tooltips, *cursors; 380 Eina_List *tooltips, *cursors;
381 Evas_Object *focus_previous, *focus_next; 381 Evas_Object *focus_previous, *focus_next;
382 Evas_Object *focus_up, *focus_down, *focus_right, *focus_left; 382 Evas_Object *focus_up, *focus_down, *focus_right, *focus_left;
383 Elm_Object_Item *item_focus_previous, *item_focus_next;
384 Elm_Object_Item *item_focus_up, *item_focus_down, *item_focus_right, *item_focus_left;
383 385
384 /* "show region" coordinates. all widgets got those because this 386 /* "show region" coordinates. all widgets got those because this
385 * info may be set and queried recursively through the widget 387 * info may be set and queried recursively through the widget
@@ -608,6 +610,11 @@ struct _Elm_Widget_Item_Data
608 /**< widget delete callback function. don't expose this callback call */ 610 /**< widget delete callback function. don't expose this callback call */
609 Elm_Widget_Del_Pre_Cb del_pre_func; 611 Elm_Widget_Del_Pre_Cb del_pre_func;
610 612
613 Evas_Object *focus_previous, *focus_next;
614 Evas_Object *focus_up, *focus_down, *focus_right, *focus_left;
615 Elm_Object_Item *item_focus_previous, *item_focus_next;
616 Elm_Object_Item *item_focus_up, *item_focus_down, *item_focus_right, *item_focus_left;
617
611 Evas_Object *access_obj; 618 Evas_Object *access_obj;
612 const char *access_info; 619 const char *access_info;
613 Eina_List *access_order; 620 Eina_List *access_order;
@@ -673,11 +680,13 @@ EAPI void elm_widget_focus_custom_chain_prepend(Evas_Object *obj, Ev
673EAPI void elm_widget_focus_cycle(Evas_Object *obj, Elm_Focus_Direction dir); 680EAPI void elm_widget_focus_cycle(Evas_Object *obj, Elm_Focus_Direction dir);
674EAPI Eina_Bool elm_widget_focus_direction_go(Evas_Object *obj, double degree); 681EAPI Eina_Bool elm_widget_focus_direction_go(Evas_Object *obj, double degree);
675EAPI Eina_Bool elm_widget_focus_direction_get(const Evas_Object *obj, const Evas_Object *base, double degree, Evas_Object **direction, double *weight); 682EAPI Eina_Bool elm_widget_focus_direction_get(const Evas_Object *obj, const Evas_Object *base, double degree, Evas_Object **direction, double *weight);
676EAPI Eina_Bool elm_widget_focus_next_get(const Evas_Object *obj, Elm_Focus_Direction dir, Evas_Object **next); 683EAPI Eina_Bool elm_widget_focus_next_get(const Evas_Object *obj, Elm_Focus_Direction dir, Evas_Object **next, Elm_Object_Item **next_item);
677EAPI Eina_Bool elm_widget_focus_list_direction_get(const Evas_Object *obj, const Evas_Object *base, const Eina_List *items, void *(*list_data_get)(const Eina_List *list), double degree, Evas_Object **direction, double *weight); 684EAPI Eina_Bool elm_widget_focus_list_direction_get(const Evas_Object *obj, const Evas_Object *base, const Eina_List *items, void *(*list_data_get)(const Eina_List *list), double degree, Evas_Object **direction, double *weight);
678EAPI Eina_Bool elm_widget_focus_list_next_get(const Evas_Object *obj, const Eina_List *items, void *(*list_data_get)(const Eina_List *list), Elm_Focus_Direction dir, Evas_Object **next); 685EAPI Eina_Bool elm_widget_focus_list_next_get(const Evas_Object *obj, const Eina_List *items, void *(*list_data_get)(const Eina_List *list), Elm_Focus_Direction dir, Evas_Object **next, Elm_Object_Item **next_item);
679EAPI Evas_Object *elm_widget_focus_next_object_get(const Evas_Object *obj, Elm_Focus_Direction dir); 686EAPI Evas_Object *elm_widget_focus_next_object_get(const Evas_Object *obj, Elm_Focus_Direction dir);
680EAPI void elm_widget_focus_next_object_set(Evas_Object *obj, Evas_Object *next, Elm_Focus_Direction dir); 687EAPI void elm_widget_focus_next_object_set(Evas_Object *obj, Evas_Object *next, Elm_Focus_Direction dir);
688EAPI Elm_Object_Item *elm_widget_focus_next_item_get(const Evas_Object *obj, Elm_Focus_Direction dir);
689EAPI void elm_widget_focus_next_item_set(Evas_Object *obj, Elm_Object_Item *next_item, Elm_Focus_Direction dir);
681EAPI Eina_Bool elm_widget_focus_highlight_style_set(Evas_Object *obj, const char *style); 690EAPI Eina_Bool elm_widget_focus_highlight_style_set(Evas_Object *obj, const char *style);
682EAPI const char *elm_widget_focus_highlight_style_get(const Evas_Object *obj); 691EAPI const char *elm_widget_focus_highlight_style_get(const Evas_Object *obj);
683EAPI void elm_widget_parent_highlight_set(Evas_Object *obj, Eina_Bool highlighted); 692EAPI void elm_widget_parent_highlight_set(Evas_Object *obj, Eina_Bool highlighted);
@@ -686,7 +695,7 @@ EAPI void elm_widget_focused_object_clear(Evas_Object *obj);
686EAPI Evas_Object *elm_widget_parent_get(const Evas_Object *obj); 695EAPI Evas_Object *elm_widget_parent_get(const Evas_Object *obj);
687EAPI Evas_Object *elm_widget_parent2_get(const Evas_Object *obj); 696EAPI Evas_Object *elm_widget_parent2_get(const Evas_Object *obj);
688EAPI void elm_widget_parent2_set(Evas_Object *obj, Evas_Object *parent); 697EAPI void elm_widget_parent2_set(Evas_Object *obj, Evas_Object *parent);
689EAPI void elm_widget_focus_steal(Evas_Object *obj); 698EAPI void elm_widget_focus_steal(Evas_Object *obj, Elm_Object_Item *next_item);
690EAPI Evas_Object *elm_widget_newest_focus_order_get(const Evas_Object *obj, unsigned int *newest_focus_order, Eina_Bool can_focus_only); 699EAPI Evas_Object *elm_widget_newest_focus_order_get(const Evas_Object *obj, unsigned int *newest_focus_order, Eina_Bool can_focus_only);
691EAPI void elm_widget_display_mode_set(Evas_Object *obj, Evas_Display_Mode dispmode); 700EAPI void elm_widget_display_mode_set(Evas_Object *obj, Evas_Display_Mode dispmode);
692EAPI Eina_Bool elm_widget_focus_highlight_enabled_get(const Evas_Object *obj); 701EAPI Eina_Bool elm_widget_focus_highlight_enabled_get(const Evas_Object *obj);
diff --git a/src/lib/elm_widget_item.eo b/src/lib/elm_widget_item.eo
index 021b4c001..d4fd187d9 100644
--- a/src/lib/elm_widget_item.eo
+++ b/src/lib/elm_widget_item.eo
@@ -489,6 +489,42 @@ class Elm.Widget_Item(Eo.Base, Elm_Interface_Atspi_Accessible,
489 legacy: null; 489 legacy: null;
490 return: bool; 490 return: bool;
491 } 491 }
492 focus_next_object_get @const {
493 [[Get the next object with specific focus direction.
494
495 @since 1.16]]
496 params {
497 dir: Elm_Focus_Direction; [[Focus direction]]
498 }
499 return: Evas.Object *; [[Focus next object]]
500 }
501 focus_next_object_set {
502 [[Set the next object with specific focus direction.
503
504 @since 1.16]]
505 params {
506 next: Evas.Object * @nullable; [[Focus next object]]
507 dir: Elm_Focus_Direction; [[Focus direction]]
508 }
509 }
510 focus_next_item_get @const {
511 [[Get the next object item with specific focus direction.
512
513 @since 1.16]]
514 params {
515 dir: Elm_Focus_Direction; [[Focus direction]]
516 }
517 return: Elm_Object_Item *; [[Focus next object item]]
518 }
519 focus_next_item_set {
520 [[Set the next object item with specific focus direction.
521
522 @since 1.16]]
523 params {
524 next_item: Elm_Object_Item * @nullable; [[Focus next object item]]
525 dir: Elm_Focus_Direction; [[Focus direction]]
526 }
527 }
492 } 528 }
493 implements { 529 implements {
494 Eo.Base.constructor; 530 Eo.Base.constructor;
diff --git a/src/lib/elm_win.c b/src/lib/elm_win.c
index 0ced87af5..9d4fecc47 100644
--- a/src/lib/elm_win.c
+++ b/src/lib/elm_win.c
@@ -1081,7 +1081,7 @@ _elm_win_focus_in(Ecore_Evas *ee)
1081 if (!elm_widget_focus_order_get(obj) 1081 if (!elm_widget_focus_order_get(obj)
1082 || (obj == elm_widget_newest_focus_order_get(obj, &order, EINA_TRUE))) 1082 || (obj == elm_widget_newest_focus_order_get(obj, &order, EINA_TRUE)))
1083 { 1083 {
1084 elm_widget_focus_steal(obj); 1084 elm_widget_focus_steal(obj, NULL);
1085 } 1085 }
1086 else 1086 else
1087 { 1087 {
@@ -1439,7 +1439,7 @@ _elm_win_elm_widget_focus_next_manager_is(Eo *obj EINA_UNUSED, Elm_Win_Data *_pd
1439} 1439}
1440 1440
1441EOLIAN static Eina_Bool 1441EOLIAN static Eina_Bool
1442_elm_win_elm_widget_focus_next(Eo *obj, Elm_Win_Data *_pd EINA_UNUSED, Elm_Focus_Direction dir, Evas_Object **next) 1442_elm_win_elm_widget_focus_next(Eo *obj, Elm_Win_Data *_pd EINA_UNUSED, Elm_Focus_Direction dir, Evas_Object **next, Elm_Object_Item **next_item)
1443{ 1443{
1444 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE); 1444 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE);
1445 1445
@@ -1457,7 +1457,7 @@ _elm_win_elm_widget_focus_next(Eo *obj, Elm_Win_Data *_pd EINA_UNUSED, Elm_Focus
1457 } 1457 }
1458 list_data_get = eina_list_data_get; 1458 list_data_get = eina_list_data_get;
1459 1459
1460 elm_widget_focus_list_next_get(obj, items, list_data_get, dir, next); 1460 elm_widget_focus_list_next_get(obj, items, list_data_get, dir, next, next_item);
1461 1461
1462 if (*next) return EINA_TRUE; 1462 if (*next) return EINA_TRUE;
1463 } 1463 }
@@ -1495,10 +1495,10 @@ _elm_win_elm_widget_focus_direction(Eo *obj, Elm_Win_Data *_pd EINA_UNUSED, cons
1495} 1495}
1496 1496
1497EOLIAN static Eina_Bool 1497EOLIAN static Eina_Bool
1498_elm_win_elm_widget_on_focus(Eo *obj, Elm_Win_Data *sd) 1498_elm_win_elm_widget_on_focus(Eo *obj, Elm_Win_Data *sd, Elm_Object_Item *item EINA_UNUSED)
1499{ 1499{
1500 Eina_Bool int_ret = EINA_FALSE; 1500 Eina_Bool int_ret = EINA_FALSE;
1501 eo_do_super(obj, MY_CLASS, int_ret = elm_obj_widget_on_focus()); 1501 eo_do_super(obj, MY_CLASS, int_ret = elm_obj_widget_on_focus(NULL));
1502 if (!int_ret) return EINA_TRUE; 1502 if (!int_ret) return EINA_TRUE;
1503 1503
1504 if (sd->img_obj) 1504 if (sd->img_obj)
@@ -1819,7 +1819,7 @@ _win_img_focus_in(void *data,
1819 Evas_Object *obj EINA_UNUSED, 1819 Evas_Object *obj EINA_UNUSED,
1820 void *event_info EINA_UNUSED) 1820 void *event_info EINA_UNUSED)
1821{ 1821{
1822 elm_widget_focus_steal(data); 1822 elm_widget_focus_steal(data, NULL);
1823} 1823}
1824 1824
1825static void 1825static void