summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Hollerbach <mail@marcel-hollerbach.de>2019-02-27 14:00:39 -0500
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2019-02-27 20:19:25 +0100
commitb704db8f0780868c1a6f039c2e09e291f3387308 (patch)
treefa01c29ea711ee2187ab5d229ade70c94a6fb0a4
parent0b152734ba13d46155b2c1dcc98cd13c79fc804c (diff)
efl_ui_widget: move focus_highlight to the window
summary_: the widget implementation just redirected calls from efl_ui_widget to efl_ui_win. Which makes the properties unncessesary on the widget. This commit moves them now to the window. The legacy implementation of the window can now go away, as this is taken care of by eolian directly. ref T7553 Depends on D8017 Reviewers: woohyun Reviewed By: woohyun Subscribers: segfaultxavi, cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T7553 Reviewed-by: WooHyun Jung <woohyun0705@gmail.com> Differential Revision: https://phab.enlightenment.org/D8025
-rw-r--r--src/lib/elementary/efl_ui_widget.c68
-rw-r--r--src/lib/elementary/efl_ui_widget.eo76
-rw-r--r--src/lib/elementary/efl_ui_win.c67
-rw-r--r--src/lib/elementary/efl_ui_win.eo61
-rw-r--r--src/lib/elementary/elm_gengrid.c9
-rw-r--r--src/lib/elementary/elm_genlist.c9
-rw-r--r--src/lib/elementary/elm_list.c6
-rw-r--r--src/lib/elementary/elm_main.c4
-rw-r--r--src/lib/elementary/elm_toolbar.c6
-rw-r--r--src/lib/elementary/elm_win_legacy.h65
10 files changed, 89 insertions, 282 deletions
diff --git a/src/lib/elementary/efl_ui_widget.c b/src/lib/elementary/efl_ui_widget.c
index d390d729a4..8d2310fd20 100644
--- a/src/lib/elementary/efl_ui_widget.c
+++ b/src/lib/elementary/efl_ui_widget.c
@@ -266,74 +266,6 @@ _efl_ui_widget_focus_highlight_object_get(const Evas_Object *obj)
266 return NULL; 266 return NULL;
267} 267}
268 268
269EOLIAN static Eina_Bool
270_efl_ui_widget_focus_highlight_enabled_get(const Eo *obj, Elm_Widget_Smart_Data *sd EINA_UNUSED)
271{
272 // Forward to closest parent Window
273 const Evas_Object *win = elm_widget_top_get(obj);
274
275 if (win && efl_isa(win, EFL_UI_WIN_CLASS))
276 return elm_win_focus_highlight_enabled_get(win);
277
278 return EINA_FALSE;
279}
280
281EOLIAN static void
282_efl_ui_widget_focus_highlight_enabled_set(Eo *obj, Elm_Widget_Smart_Data *sd EINA_UNUSED, Eina_Bool enable)
283{
284 // Forward to closest parent Window
285 Evas_Object *win = elm_widget_top_get(obj);
286
287 if (win && efl_isa(win, EFL_UI_WIN_CLASS))
288 elm_win_focus_highlight_enabled_set(win, enable);
289}
290
291EOLIAN static Eina_Bool
292_efl_ui_widget_focus_highlight_animate_get(const Eo *obj, Elm_Widget_Smart_Data *sd EINA_UNUSED)
293{
294 // Forward to closest parent Window
295 const Evas_Object *win = elm_widget_top_get(obj);
296
297 if (win && efl_isa(win, EFL_UI_WIN_CLASS))
298 return elm_win_focus_highlight_animate_get(win);
299
300 return EINA_FALSE;
301}
302
303EOLIAN static void
304_efl_ui_widget_focus_highlight_animate_set(Eo *obj, Elm_Widget_Smart_Data *sd EINA_UNUSED, Eina_Bool enable)
305{
306 // Forward to closest parent Window
307 Evas_Object *win = elm_widget_top_get(obj);
308
309 if (win && efl_isa(win, EFL_UI_WIN_CLASS))
310 elm_win_focus_highlight_animate_set(win, enable);
311}
312
313EOLIAN static Eina_Bool
314_efl_ui_widget_focus_highlight_style_set(Eo *obj, Elm_Widget_Smart_Data *sd EINA_UNUSED, const char *style)
315{
316 // Forward to closest parent Window
317 Evas_Object *win = elm_widget_top_get(obj);
318
319 if (win && efl_isa(win, EFL_UI_WIN_CLASS))
320 return efl_ui_widget_focus_highlight_style_set(win, style);
321
322 return EINA_FALSE;
323}
324
325EOLIAN static const char *
326_efl_ui_widget_focus_highlight_style_get(const Eo *obj, Elm_Widget_Smart_Data *sd EINA_UNUSED)
327{
328 // Forward to closest parent Window
329 Evas_Object *win = elm_widget_top_get(obj);
330
331 if (win && efl_isa(win, EFL_UI_WIN_CLASS))
332 return elm_win_focus_highlight_style_get(win);
333
334 return NULL;
335}
336
337static Eina_Bool 269static Eina_Bool
338_candidacy_exam(Eo *obj) 270_candidacy_exam(Eo *obj)
339{ 271{
diff --git a/src/lib/elementary/efl_ui_widget.eo b/src/lib/elementary/efl_ui_widget.eo
index 63a5ea765e..815cb7761e 100644
--- a/src/lib/elementary/efl_ui_widget.eo
+++ b/src/lib/elementary/efl_ui_widget.eo
@@ -441,82 +441,6 @@ abstract @beta Efl.Ui.Widget extends Efl.Canvas.Group implements Efl.Access.Obje
441 region: Eina.Rect; [[The rectangle area.]] 441 region: Eina.Rect; [[The rectangle area.]]
442 } 442 }
443 } 443 }
444 @property focus_highlight_enabled {
445 [[Whether focus highlight is enabled or not.
446
447 As of EFL 1.21 focus highlight properties apply to a single window,
448 not a single widget. As a consequence, calls to this function may
449 be forwarded to the parent window. Future versions of EFL may
450 implement widget-specific focus highlight properties.
451
452 See also @.widget_top.
453 See also @.focus_highlight_style.
454 See also @.focus_highlight_animate.
455 ]]
456 set {
457 [[Set the enabled status for the focus highlight in a window.
458
459 This function will enable or disable the focus highlight,
460 regardless of the global setting for it.
461 ]]
462 }
463 get {
464 [[Get the enabled value of the focus highlight for this window.]]
465 }
466 values {
467 enabled: bool; [[The enabled value for the highlight.]]
468 }
469 }
470 @property focus_highlight_style {
471 [[Control the widget focus highlight style.
472
473 If $style is $null, the default will be used.
474
475 As of EFL 1.21 focus highlight properties apply to a single window,
476 not a single widget. As a consequence, calls to this function may
477 be forwarded to the parent window. Future versions of EFL may
478 implement widget-specific focus highlight properties.
479
480 See also @.widget_top.
481 See also @.focus_highlight_enabled.
482 See also @.focus_highlight_animate.
483 ]]
484 set {
485 /* FIXME: This is async... success here means nothing. */
486 return: bool; [[$true on success, $false otherwise.]]
487 }
488 get {
489 }
490 values {
491 style: string @nullable; [[The name of the focus highlight style.]]
492 }
493 }
494 @property focus_highlight_animate {
495 [[Whether focus highlight should animate or not.
496
497 As of EFL 1.21 focus highlight properties apply to a single window,
498 not a single widget. As a consequence, calls to this function may
499 be forwarded to the parent window. Future versions of EFL may
500 implement widget-specific focus highlight properties.
501
502 See also @.widget_top.
503 See also @.focus_highlight_style.
504 See also @.focus_highlight_enabled.
505 ]]
506 set {
507 [[Set the animate status for the focus highlight for this window.
508
509 This function will enable or disable the animation of focus
510 highlight.
511 ]]
512 }
513 get {
514 [[Get the animate value of the focus highlight for this window.]]
515 }
516 values {
517 animate: bool; [[The enabled value for the highlight animation.]]
518 }
519 }
520 @property focus_move_policy @beta { 444 @property focus_move_policy @beta {
521 [[The widget's focus move policy.]] 445 [[The widget's focus move policy.]]
522 values { 446 values {
diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c
index 99ccf86705..ffba88329b 100644
--- a/src/lib/elementary/efl_ui_win.c
+++ b/src/lib/elementary/efl_ui_win.c
@@ -1187,8 +1187,6 @@ _elm_win_focus_highlight_reconfigure_job(void *data)
1187 Eina_Bool visible_changed; 1187 Eina_Bool visible_changed;
1188 Eina_Bool common_visible; 1188 Eina_Bool common_visible;
1189 const char *sig = NULL; 1189 const char *sig = NULL;
1190 const char *focus_style_target = NULL;
1191 const char *focus_style_previous = NULL;
1192 1190
1193 _elm_win_focus_highlight_reconfigure_job_stop(sd); 1191 _elm_win_focus_highlight_reconfigure_job_stop(sd);
1194 1192
@@ -1254,18 +1252,11 @@ _elm_win_focus_highlight_reconfigure_job(void *data)
1254 goto the_end; 1252 goto the_end;
1255 } 1253 }
1256 1254
1257 if (previous) 1255 if (sd->focus_highlight.theme_changed)
1258 focus_style_previous = elm_widget_focus_highlight_style_get(previous);
1259 focus_style_target = elm_widget_focus_highlight_style_get(target);
1260
1261 if (sd->focus_highlight.theme_changed ||
1262 (focus_style_target != focus_style_previous))
1263 { 1256 {
1264 const char *str; 1257 const char *str;
1265 1258
1266 if (focus_style_target) 1259 if (sd->focus_highlight.style)
1267 str = focus_style_target;
1268 else if (sd->focus_highlight.style)
1269 str = sd->focus_highlight.style; 1260 str = sd->focus_highlight.style;
1270 else 1261 else
1271 str = "default"; 1262 str = "default";
@@ -6947,9 +6938,8 @@ _efl_ui_win_keygrab_unset(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd, const char *
6947} 6938}
6948 6939
6949EOLIAN static void 6940EOLIAN static void
6950_efl_ui_win_efl_ui_widget_focus_highlight_enabled_set(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd, Eina_Bool enabled) 6941_efl_ui_win_focus_highlight_enabled_set(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd, Eina_Bool enabled)
6951{ 6942{
6952 // Do not call efl_super() here. Only Win handles this property.
6953 enabled = !!enabled; 6943 enabled = !!enabled;
6954 if (sd->focus_highlight.enabled == enabled) 6944 if (sd->focus_highlight.enabled == enabled)
6955 return; 6945 return;
@@ -6963,9 +6953,8 @@ _efl_ui_win_efl_ui_widget_focus_highlight_enabled_set(Eo *obj EINA_UNUSED, Efl_U
6963} 6953}
6964 6954
6965EOLIAN static Eina_Bool 6955EOLIAN static Eina_Bool
6966_efl_ui_win_efl_ui_widget_focus_highlight_enabled_get(const Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd) 6956_efl_ui_win_focus_highlight_enabled_get(const Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd)
6967{ 6957{
6968 // Do not call efl_super() here. Only Win handles this property.
6969 return sd->focus_highlight.enabled; 6958 return sd->focus_highlight.enabled;
6970} 6959}
6971 6960
@@ -7012,9 +7001,8 @@ _efl_ui_win_efl_ui_widget_theme_apply(Eo *obj, Efl_Ui_Win_Data *sd)
7012} 7001}
7013 7002
7014EOLIAN static Eina_Bool 7003EOLIAN static Eina_Bool
7015_efl_ui_win_efl_ui_widget_focus_highlight_style_set(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd, const char *style) 7004_efl_ui_win_focus_highlight_style_set(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd, const char *style)
7016{ 7005{
7017 // Do not call efl_super() here. Only Win handles this property.
7018 if (!eina_stringshare_replace(&sd->focus_highlight.style, style)) 7006 if (!eina_stringshare_replace(&sd->focus_highlight.style, style))
7019 return EINA_TRUE; 7007 return EINA_TRUE;
7020 7008
@@ -7024,16 +7012,14 @@ _efl_ui_win_efl_ui_widget_focus_highlight_style_set(Eo *obj EINA_UNUSED, Efl_Ui_
7024} 7012}
7025 7013
7026EOLIAN static const char* 7014EOLIAN static const char*
7027_efl_ui_win_efl_ui_widget_focus_highlight_style_get(const Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd) 7015_efl_ui_win_focus_highlight_style_get(const Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd)
7028{ 7016{
7029 // Do not call efl_super() here. Only Win handles this property.
7030 return sd->focus_highlight.style; 7017 return sd->focus_highlight.style;
7031} 7018}
7032 7019
7033EOLIAN static void 7020EOLIAN static void
7034_efl_ui_win_efl_ui_widget_focus_highlight_animate_set(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd, Eina_Bool animate) 7021_efl_ui_win_focus_highlight_animate_set(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd, Eina_Bool animate)
7035{ 7022{
7036 // Do not call efl_super() here. Only Win handles this property.
7037 animate = !!animate; 7023 animate = !!animate;
7038 if (sd->focus_highlight.animate == animate) 7024 if (sd->focus_highlight.animate == animate)
7039 return; 7025 return;
@@ -7044,9 +7030,8 @@ _efl_ui_win_efl_ui_widget_focus_highlight_animate_set(Eo *obj EINA_UNUSED, Efl_U
7044} 7030}
7045 7031
7046EOLIAN static Eina_Bool 7032EOLIAN static Eina_Bool
7047_efl_ui_win_efl_ui_widget_focus_highlight_animate_get(const Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd) 7033_efl_ui_win_focus_highlight_animate_get(const Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd)
7048{ 7034{
7049 // Do not call efl_super() here. Only Win handles this property.
7050 return sd->focus_highlight.animate; 7035 return sd->focus_highlight.animate;
7051} 7036}
7052 7037
@@ -8888,42 +8873,6 @@ elm_win_focus_get(const Efl_Ui_Win *obj)
8888 return efl_ui_focus_object_focus_get(obj); 8873 return efl_ui_focus_object_focus_get(obj);
8889} 8874}
8890 8875
8891EAPI void
8892elm_win_focus_highlight_style_set(Elm_Win *obj, const char *style)
8893{
8894 elm_widget_focus_highlight_style_set(obj, style);
8895}
8896
8897EAPI const char *
8898elm_win_focus_highlight_style_get(const Elm_Win *obj)
8899{
8900 return elm_widget_focus_highlight_style_get(obj);
8901}
8902
8903EAPI Eina_Bool
8904elm_win_focus_highlight_enabled_get(const Efl_Ui_Win *obj)
8905{
8906 return elm_widget_focus_highlight_enabled_get(obj);
8907}
8908
8909EAPI void
8910elm_win_focus_highlight_enabled_set(Efl_Ui_Win *obj, Eina_Bool enabled)
8911{
8912 efl_ui_widget_focus_highlight_enabled_set(obj, enabled);
8913}
8914
8915EAPI void
8916elm_win_focus_highlight_animate_set(Elm_Win *obj, Eina_Bool animate)
8917{
8918 efl_ui_widget_focus_highlight_animate_set(obj, animate);
8919}
8920
8921EAPI Eina_Bool
8922elm_win_focus_highlight_animate_get(const Elm_Win *obj)
8923{
8924 return efl_ui_widget_focus_highlight_animate_get(obj);
8925}
8926
8927EAPI Eina_Bool 8876EAPI Eina_Bool
8928elm_win_available_profiles_get(const Elm_Win *obj, char ***profiles, unsigned int *count) 8877elm_win_available_profiles_get(const Elm_Win *obj, char ***profiles, unsigned int *count)
8929{ 8878{
diff --git a/src/lib/elementary/efl_ui_win.eo b/src/lib/elementary/efl_ui_win.eo
index 6c43af09b2..0917e9ae50 100644
--- a/src/lib/elementary/efl_ui_win.eo
+++ b/src/lib/elementary/efl_ui_win.eo
@@ -862,6 +862,64 @@ class @beta Efl.Ui.Win extends Efl.Ui.Widget implements Efl.Canvas.Scene, Efl.Ac
862 rotation : Efl.Orient; [[The rotation of the window]] 862 rotation : Efl.Orient; [[The rotation of the window]]
863 } 863 }
864 } 864 }
865 @property focus_highlight_enabled {
866 [[Whether focus highlight is enabled or not.
867
868 See also @.focus_highlight_style.
869 See also @.focus_highlight_animate.
870 ]]
871 set {
872 [[Set the enabled status for the focus highlight in a window.
873
874 This function will enable or disable the focus highlight,
875 regardless of the global setting for it.
876 ]]
877 }
878 get {
879 [[Get the enabled value of the focus highlight for this window.]]
880 }
881 values {
882 enabled: bool; [[The enabled value for the highlight.]]
883 }
884 }
885 @property focus_highlight_style {
886 [[Control the widget focus highlight style.
887
888 If $style is $null, the default will be used.
889
890 See also @.focus_highlight_enabled.
891 See also @.focus_highlight_animate.
892 ]]
893 set {
894 /* FIXME: This is async... success here means nothing. */
895 return: bool; [[$true on success, $false otherwise.]]
896 }
897 get {
898 }
899 values {
900 style: string @nullable; [[The name of the focus highlight style.]]
901 }
902 }
903 @property focus_highlight_animate {
904 [[Whether focus highlight should animate or not.
905
906 See also @.focus_highlight_style.
907 See also @.focus_highlight_enabled.
908 ]]
909 set {
910 [[Set the animate status for the focus highlight for this window.
911
912 This function will enable or disable the animation of focus
913 highlight.
914 ]]
915 }
916 get {
917 [[Get the animate value of the focus highlight for this window.]]
918 }
919 values {
920 animate: bool; [[The enabled value for the highlight animation.]]
921 }
922 }
865 } 923 }
866 implements { 924 implements {
867 class.constructor; 925 class.constructor;
@@ -878,9 +936,6 @@ class @beta Efl.Ui.Win extends Efl.Ui.Widget implements Efl.Canvas.Scene, Efl.Ac
878 Efl.Gfx.Stack.lower_to_bottom; [[This action is ignored by the Window.]] 936 Efl.Gfx.Stack.lower_to_bottom; [[This action is ignored by the Window.]]
879 Efl.Ui.Widget.theme_apply; 937 Efl.Ui.Widget.theme_apply;
880 Efl.Ui.Focus.Object.focus { get; } 938 Efl.Ui.Focus.Object.focus { get; }
881 Efl.Ui.Widget.focus_highlight_style { get; set; }
882 Efl.Ui.Widget.focus_highlight_enabled { get; set; }
883 Efl.Ui.Widget.focus_highlight_animate { get; set; }
884 Efl.Ui.Focus.Object.on_focus_update; 939 Efl.Ui.Focus.Object.on_focus_update;
885 Efl.Ui.Widget.widget_event; 940 Efl.Ui.Widget.widget_event;
886 Efl.Ui.Widget_Focus_Manager.focus_manager_create; 941 Efl.Ui.Widget_Focus_Manager.focus_manager_create;
diff --git a/src/lib/elementary/elm_gengrid.c b/src/lib/elementary/elm_gengrid.c
index d4e0cf3449..6047ad8704 100644
--- a/src/lib/elementary/elm_gengrid.c
+++ b/src/lib/elementary/elm_gengrid.c
@@ -205,6 +205,7 @@ _item_cache_add(Elm_Gen_Item *it, Eina_List *contents)
205 Item_Cache *itc = NULL; 205 Item_Cache *itc = NULL;
206 ELM_GENGRID_DATA_GET_FROM_ITEM(it, sd); 206 ELM_GENGRID_DATA_GET_FROM_ITEM(it, sd);
207 Evas_Object *obj = sd->obj; 207 Evas_Object *obj = sd->obj;
208 Evas_Object *win = elm_widget_top_get(obj);
208 209
209 evas_event_freeze(evas_object_evas_get(obj)); 210 evas_event_freeze(evas_object_evas_get(obj));
210 if (sd->item_cache_max > 0) 211 if (sd->item_cache_max > 0)
@@ -230,7 +231,7 @@ _item_cache_add(Elm_Gen_Item *it, Eina_List *contents)
230 if (elm_wdg_item_disabled_get(EO_OBJ(it))) 231 if (elm_wdg_item_disabled_get(EO_OBJ(it)))
231 edje_object_signal_emit(itc->base_view, "elm,state,enabled", "elm"); 232 edje_object_signal_emit(itc->base_view, "elm,state,enabled", "elm");
232 if ((EO_OBJ(it) == sd->focused_item) && 233 if ((EO_OBJ(it) == sd->focused_item) &&
233 (elm_widget_focus_highlight_enabled_get(obj) || _elm_config->win_auto_focus_enable)) 234 (elm_win_focus_highlight_enabled_get(win) || _elm_config->win_auto_focus_enable))
234 edje_object_signal_emit(itc->base_view, "elm,state,unfocused", "elm"); 235 edje_object_signal_emit(itc->base_view, "elm,state,unfocused", "elm");
235 236
236 ELM_SAFE_FREE(it->long_timer, ecore_timer_del); 237 ELM_SAFE_FREE(it->long_timer, ecore_timer_del);
@@ -1560,9 +1561,10 @@ _elm_gengrid_item_focus_update(Elm_Gen_Item *it)
1560{ 1561{
1561 const char *focus_raise; 1562 const char *focus_raise;
1562 Evas_Object *obj = WIDGET(it); 1563 Evas_Object *obj = WIDGET(it);
1564 Evas_Object *win = elm_widget_top_get(obj);
1563 ELM_GENGRID_DATA_GET(obj, sd); 1565 ELM_GENGRID_DATA_GET(obj, sd);
1564 1566
1565 if (elm_widget_focus_highlight_enabled_get(obj) || _elm_config->win_auto_focus_enable) 1567 if (elm_win_focus_highlight_enabled_get(win) || _elm_config->win_auto_focus_enable)
1566 { 1568 {
1567 edje_object_signal_emit 1569 edje_object_signal_emit
1568 (VIEW(it), "elm,state,focused", "elm"); 1570 (VIEW(it), "elm,state,focused", "elm");
@@ -2357,6 +2359,7 @@ _elm_gengrid_item_unfocused(Elm_Object_Item *eo_it)
2357{ 2359{
2358 ELM_GENGRID_ITEM_DATA_GET(eo_it, it); 2360 ELM_GENGRID_ITEM_DATA_GET(eo_it, it);
2359 Evas_Object *obj = WIDGET(it); 2361 Evas_Object *obj = WIDGET(it);
2362 Evas_Object *win = elm_widget_top_get(obj);
2360 ELM_GENGRID_DATA_GET(obj, sd); 2363 ELM_GENGRID_DATA_GET(obj, sd);
2361 2364
2362 if (it->generation < sd->generation) 2365 if (it->generation < sd->generation)
@@ -2369,7 +2372,7 @@ _elm_gengrid_item_unfocused(Elm_Object_Item *eo_it)
2369 (eo_it != sd->focused_item)) 2372 (eo_it != sd->focused_item))
2370 return; 2373 return;
2371 2374
2372 if (elm_widget_focus_highlight_enabled_get(obj) || _elm_config->win_auto_focus_enable) 2375 if (elm_win_focus_highlight_enabled_get(win) || _elm_config->win_auto_focus_enable)
2373 { 2376 {
2374 ELM_GENGRID_ITEM_DATA_GET(sd->focused_item, focus_it); 2377 ELM_GENGRID_ITEM_DATA_GET(sd->focused_item, focus_it);
2375 edje_object_signal_emit 2378 edje_object_signal_emit
diff --git a/src/lib/elementary/elm_genlist.c b/src/lib/elementary/elm_genlist.c
index 86c3ab22eb..f224c0f14c 100644
--- a/src/lib/elementary/elm_genlist.c
+++ b/src/lib/elementary/elm_genlist.c
@@ -1598,6 +1598,7 @@ _item_cache_add(Elm_Gen_Item *it, Eina_List *contents)
1598 Item_Cache *itc = NULL; 1598 Item_Cache *itc = NULL;
1599 ELM_GENLIST_DATA_GET_FROM_ITEM(it, sd); 1599 ELM_GENLIST_DATA_GET_FROM_ITEM(it, sd);
1600 Evas_Object *obj = sd->obj; 1600 Evas_Object *obj = sd->obj;
1601 Evas_Object *win = elm_widget_top_get(obj);
1601 Evas *e = evas_object_evas_get(obj); 1602 Evas *e = evas_object_evas_get(obj);
1602 1603
1603 evas_event_freeze(e); 1604 evas_event_freeze(e);
@@ -1629,7 +1630,7 @@ _item_cache_add(Elm_Gen_Item *it, Eina_List *contents)
1629 if (elm_wdg_item_disabled_get(EO_OBJ(it))) 1630 if (elm_wdg_item_disabled_get(EO_OBJ(it)))
1630 edje_object_signal_emit(itc->base_view, SIGNAL_ENABLED, "elm"); 1631 edje_object_signal_emit(itc->base_view, SIGNAL_ENABLED, "elm");
1631 if ((EO_OBJ(it) == sd->focused_item) && 1632 if ((EO_OBJ(it) == sd->focused_item) &&
1632 (elm_widget_focus_highlight_enabled_get(obj) || _elm_config->win_auto_focus_enable)) 1633 (elm_win_focus_highlight_enabled_get(win) || _elm_config->win_auto_focus_enable))
1633 edje_object_signal_emit(itc->base_view, SIGNAL_UNFOCUSED, "elm"); 1634 edje_object_signal_emit(itc->base_view, SIGNAL_UNFOCUSED, "elm");
1634 1635
1635 ELM_SAFE_FREE(it->long_timer, ecore_timer_del); 1636 ELM_SAFE_FREE(it->long_timer, ecore_timer_del);
@@ -1807,9 +1808,10 @@ _elm_genlist_item_focus_update(Elm_Gen_Item *it)
1807{ 1808{
1808 const char *focus_raise; 1809 const char *focus_raise;
1809 Evas_Object *obj = WIDGET(it); 1810 Evas_Object *obj = WIDGET(it);
1811 Evas_Object *win = elm_widget_top_get(obj);
1810 ELM_GENLIST_DATA_GET(obj, sd); 1812 ELM_GENLIST_DATA_GET(obj, sd);
1811 1813
1812 if (elm_widget_focus_highlight_enabled_get(obj) 1814 if (elm_win_focus_highlight_enabled_get(win)
1813 || _elm_config->win_auto_focus_enable) 1815 || _elm_config->win_auto_focus_enable)
1814 edje_object_signal_emit(VIEW(it), SIGNAL_FOCUSED, "elm"); 1816 edje_object_signal_emit(VIEW(it), SIGNAL_FOCUSED, "elm");
1815 1817
@@ -2904,6 +2906,7 @@ _elm_genlist_item_unfocused(Elm_Object_Item *eo_it)
2904 2906
2905 ELM_GENLIST_ITEM_DATA_GET(eo_it, it); 2907 ELM_GENLIST_ITEM_DATA_GET(eo_it, it);
2906 Evas_Object *obj = WIDGET(it); 2908 Evas_Object *obj = WIDGET(it);
2909 Evas_Object *win = elm_widget_top_get(obj);
2907 ELM_GENLIST_DATA_GET(obj, sd); 2910 ELM_GENLIST_DATA_GET(obj, sd);
2908 2911
2909 if (_is_no_select(it)) 2912 if (_is_no_select(it))
@@ -2913,7 +2916,7 @@ _elm_genlist_item_unfocused(Elm_Object_Item *eo_it)
2913 (eo_it != sd->focused_item)) 2916 (eo_it != sd->focused_item))
2914 return; 2917 return;
2915 2918
2916 if (elm_widget_focus_highlight_enabled_get(obj)) 2919 if (elm_win_focus_highlight_enabled_get(win))
2917 { 2920 {
2918 ELM_GENLIST_ITEM_DATA_GET(sd->focused_item, focus_it); 2921 ELM_GENLIST_ITEM_DATA_GET(sd->focused_item, focus_it);
2919 edje_object_signal_emit(VIEW(focus_it), SIGNAL_UNFOCUSED, "elm"); 2922 edje_object_signal_emit(VIEW(focus_it), SIGNAL_UNFOCUSED, "elm");
diff --git a/src/lib/elementary/elm_list.c b/src/lib/elementary/elm_list.c
index ff72abd991..b678bc1a34 100644
--- a/src/lib/elementary/elm_list.c
+++ b/src/lib/elementary/elm_list.c
@@ -1147,6 +1147,7 @@ _elm_list_item_focused(Elm_Object_Item *eo_it)
1147{ 1147{
1148 ELM_LIST_ITEM_DATA_GET(eo_it, it); 1148 ELM_LIST_ITEM_DATA_GET(eo_it, it);
1149 ELM_LIST_DATA_GET_FROM_ITEM(it, sd); 1149 ELM_LIST_DATA_GET_FROM_ITEM(it, sd);
1150 Evas_Object *win = elm_widget_top_get(WIDGET(it));
1150 Evas_Coord x, y, w, h, sx, sy, sw, sh; 1151 Evas_Coord x, y, w, h, sx, sy, sw, sh;
1151 const char *focus_raise; 1152 const char *focus_raise;
1152 1153
@@ -1170,7 +1171,7 @@ _elm_list_item_focused(Elm_Object_Item *eo_it)
1170 } 1171 }
1171 } 1172 }
1172 sd->focused_item = eo_it; 1173 sd->focused_item = eo_it;
1173 if (elm_widget_focus_highlight_enabled_get(WIDGET(it)) || _elm_config->win_auto_focus_enable) 1174 if (elm_win_focus_highlight_enabled_get(win) || _elm_config->win_auto_focus_enable)
1174 { 1175 {
1175 edje_object_signal_emit 1176 edje_object_signal_emit
1176 (VIEW(it), "elm,state,focused", "elm"); 1177 (VIEW(it), "elm,state,focused", "elm");
@@ -1189,6 +1190,7 @@ _elm_list_item_unfocused(Elm_Object_Item *eo_it)
1189{ 1190{
1190 ELM_LIST_ITEM_DATA_GET(eo_it, it); 1191 ELM_LIST_ITEM_DATA_GET(eo_it, it);
1191 Evas_Object *obj = WIDGET(it); 1192 Evas_Object *obj = WIDGET(it);
1193 Evas_Object *win = elm_widget_top_get(obj);
1192 ELM_LIST_DATA_GET(obj, sd); 1194 ELM_LIST_DATA_GET(obj, sd);
1193 1195
1194 if ((!sd) || (!sd->focused_item) || 1196 if ((!sd) || (!sd->focused_item) ||
@@ -1198,7 +1200,7 @@ _elm_list_item_unfocused(Elm_Object_Item *eo_it)
1198 if (_is_no_select(it)) 1200 if (_is_no_select(it))
1199 return; 1201 return;
1200 1202
1201 if (elm_widget_focus_highlight_enabled_get(obj) || _elm_config->win_auto_focus_enable) 1203 if (elm_win_focus_highlight_enabled_get(win) || _elm_config->win_auto_focus_enable)
1202 { 1204 {
1203 ELM_LIST_ITEM_DATA_GET(sd->focused_item, focus_it); 1205 ELM_LIST_ITEM_DATA_GET(sd->focused_item, focus_it);
1204 edje_object_signal_emit 1206 edje_object_signal_emit
diff --git a/src/lib/elementary/elm_main.c b/src/lib/elementary/elm_main.c
index 661901511c..c9e48ff8fb 100644
--- a/src/lib/elementary/elm_main.c
+++ b/src/lib/elementary/elm_main.c
@@ -1568,14 +1568,14 @@ elm_object_focus_highlight_style_set(Evas_Object *obj,
1568 const char *style) 1568 const char *style)
1569{ 1569{
1570 EINA_SAFETY_ON_NULL_RETURN_VAL(obj, EINA_FALSE); 1570 EINA_SAFETY_ON_NULL_RETURN_VAL(obj, EINA_FALSE);
1571 return elm_widget_focus_highlight_style_set(obj, style); 1571 return elm_win_focus_highlight_style_set(elm_widget_top_get(obj), style);
1572} 1572}
1573 1573
1574EAPI const char * 1574EAPI const char *
1575elm_object_focus_highlight_style_get(const Evas_Object *obj) 1575elm_object_focus_highlight_style_get(const Evas_Object *obj)
1576{ 1576{
1577 EINA_SAFETY_ON_NULL_RETURN_VAL(obj, NULL); 1577 EINA_SAFETY_ON_NULL_RETURN_VAL(obj, NULL);
1578 return elm_widget_focus_highlight_style_get(obj); 1578 return elm_win_focus_highlight_style_get(elm_widget_top_get(obj));
1579} 1579}
1580 1580
1581EAPI const char * 1581EAPI const char *
diff --git a/src/lib/elementary/elm_toolbar.c b/src/lib/elementary/elm_toolbar.c
index d79ae57b1e..c17f1c4cd9 100644
--- a/src/lib/elementary/elm_toolbar.c
+++ b/src/lib/elementary/elm_toolbar.c
@@ -621,6 +621,7 @@ _elm_toolbar_item_focused(Elm_Object_Item *eo_it)
621{ 621{
622 ELM_TOOLBAR_ITEM_DATA_GET(eo_it, it); 622 ELM_TOOLBAR_ITEM_DATA_GET(eo_it, it);
623 Evas_Object *obj = WIDGET(it); 623 Evas_Object *obj = WIDGET(it);
624 Evas_Object *win = elm_widget_top_get(obj);
624 ELM_TOOLBAR_DATA_GET(obj, sd); 625 ELM_TOOLBAR_DATA_GET(obj, sd);
625 const char *focus_raise; 626 const char *focus_raise;
626 627
@@ -643,7 +644,7 @@ _elm_toolbar_item_focused(Elm_Object_Item *eo_it)
643 break; 644 break;
644 } 645 }
645 646
646 if (elm_widget_focus_highlight_enabled_get(obj)) 647 if (elm_win_focus_highlight_enabled_get(win))
647 { 648 {
648 elm_layout_signal_emit 649 elm_layout_signal_emit
649 (VIEW(it), "elm,state,focused", "elm"); 650 (VIEW(it), "elm,state,focused", "elm");
@@ -664,6 +665,7 @@ _elm_toolbar_item_unfocused(Elm_Object_Item *eo_it)
664{ 665{
665 ELM_TOOLBAR_ITEM_DATA_GET(eo_it, it); 666 ELM_TOOLBAR_ITEM_DATA_GET(eo_it, it);
666 Evas_Object *obj = WIDGET(it); 667 Evas_Object *obj = WIDGET(it);
668 Evas_Object *win = elm_widget_top_get(obj);
667 ELM_TOOLBAR_DATA_GET(obj, sd); 669 ELM_TOOLBAR_DATA_GET(obj, sd);
668 670
669 if ((!sd) || !sd->focused_item || 671 if ((!sd) || !sd->focused_item ||
@@ -671,7 +673,7 @@ _elm_toolbar_item_unfocused(Elm_Object_Item *eo_it)
671 return; 673 return;
672 if (sd->select_mode == ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY) 674 if (sd->select_mode == ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY)
673 return; 675 return;
674 if (elm_widget_focus_highlight_enabled_get(obj)) 676 if (elm_win_focus_highlight_enabled_get(win))
675 { 677 {
676 ELM_TOOLBAR_ITEM_DATA_GET(sd->focused_item, focus_it); 678 ELM_TOOLBAR_ITEM_DATA_GET(sd->focused_item, focus_it);
677 elm_layout_signal_emit 679 elm_layout_signal_emit
diff --git a/src/lib/elementary/elm_win_legacy.h b/src/lib/elementary/elm_win_legacy.h
index 89e5e150a0..ef4f74fa14 100644
--- a/src/lib/elementary/elm_win_legacy.h
+++ b/src/lib/elementary/elm_win_legacy.h
@@ -1164,7 +1164,7 @@ EAPI Eina_Bool elm_win_keygrab_unset(Elm_Win *obj, const char *key, Evas_Modifie
1164 1164
1165/** 1165/**
1166 * @brief Get the elm_win object from any child object 1166 * @brief Get the elm_win object from any child object
1167 * 1167 *
1168 * @return The elm_win, or @c NULL on failure 1168 * @return The elm_win, or @c NULL on failure
1169 * @since 1.20 1169 * @since 1.20
1170 */ 1170 */
@@ -1197,69 +1197,6 @@ EAPI Eina_Bool elm_win_socket_listen(Elm_Win *obj, const char *svcname, int svcn
1197EAPI Eina_Bool elm_win_focus_get(const Elm_Win *obj); 1197EAPI Eina_Bool elm_win_focus_get(const Elm_Win *obj);
1198 1198
1199/** 1199/**
1200 * @brief Set the style for the focus highlight on this window.
1201 *
1202 * Sets the style to use for theming the highlight of focused objects on the
1203 * given window. If @c style is NULL, the default will be used.
1204 *
1205 * @param[in] style The style or @c null if none.
1206 *
1207 * @ingroup Efl_Ui_Win
1208 */
1209EAPI void elm_win_focus_highlight_style_set(Elm_Win *obj, const char *style);
1210
1211/**
1212 * @brief Get the style set for the focus highlight object.
1213 *
1214 * @return The style or @c null if none.
1215 *
1216 * @ingroup Efl_Ui_Win
1217 */
1218EAPI const char *elm_win_focus_highlight_style_get(const Elm_Win *obj);
1219
1220/**
1221 * @brief Set the enabled status for the focus highlight in a window.
1222 *
1223 * This function will enable or disable the focus highlight only for the given
1224 * window, regardless of the global setting for it.
1225 *
1226 * @param[in] enabled The enabled value for the highlight.
1227 *
1228 * @ingroup Efl_Ui_Win
1229 */
1230EAPI void elm_win_focus_highlight_enabled_set(Elm_Win *obj, Eina_Bool enabled);
1231
1232/**
1233 * @brief Get the enabled value of the focus highlight for this window.
1234 *
1235 * @return The enabled value for the highlight.
1236 *
1237 * @ingroup Efl_Ui_Win
1238 */
1239EAPI Eina_Bool elm_win_focus_highlight_enabled_get(const Elm_Win *obj);
1240
1241/**
1242 * @brief Set the animate status for the focus highlight for this window.
1243 *
1244 * This function will enable or disable the animation of focus highlight only
1245 * for the given window, rof the global setting for it.
1246 *
1247 * @param[in] animate The enabled value for the highlight animation.
1248 *
1249 * @ingroup Efl_Ui_Win
1250 */
1251EAPI void elm_win_focus_highlight_animate_set(Elm_Win *obj, Eina_Bool animate);
1252
1253/**
1254 * @brief Get the animate value of the focus highlight for this window.
1255 *
1256 * @return The enabled value for the highlight animation.
1257 *
1258 * @ingroup Efl_Ui_Win
1259 */
1260EAPI Eina_Bool elm_win_focus_highlight_animate_get(const Elm_Win *obj);
1261
1262/**
1263 * @brief Raise a window object. 1200 * @brief Raise a window object.
1264 * 1201 *
1265 * Places the window pointed by @c obj at the top of the stack, so that it's 1202 * Places the window pointed by @c obj at the top of the stack, so that it's