summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2015-03-04 17:47:54 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2015-03-04 17:47:54 +0900
commitc4a1e50c4ff519be95491f1b02700e01866d6db0 (patch)
treec403fdd4c2a526302b7f1f427ef2ed74198831b2
parentadfe7fbcd3f4146d84219de7dbb5a273d89f396e (diff)
elm - focus feature - add config option to automatically show/hide focus
this adds logic in elm widget and elm win to figure out how to automatically show a focus hilight when switching focus, or to hide it. this really should be the default mode, thus in all default profiles (default, standard, mobile) it's turned on. this means if you tab or shif+tab or use arrow keys to switch focus, the focus hilight will magicallly appear. click with a mouse to change focus and it'll disappear assuming you want to use the mouse to do things. If focus is explicitly turned on in config or in the window by api, then this has no effect and focus will remain on all the time. this adds apis to change these config values and options in the default elm config tool to swizzle them as well as config upgrade handling for existing configs. @feature
-rw-r--r--config/default/base.src.in4
-rw-r--r--config/mobile/base.src.in4
-rw-r--r--config/standard/base.src.in4
-rw-r--r--src/bin/config.c34
-rw-r--r--src/lib/elm_config.c32
-rw-r--r--src/lib/elm_config.h48
-rw-r--r--src/lib/elm_priv.h4
-rw-r--r--src/lib/elm_widget.c4
-rw-r--r--src/lib/elm_widget.h2
-rw-r--r--src/lib/elm_win.c45
10 files changed, 172 insertions, 9 deletions
diff --git a/config/default/base.src.in b/config/default/base.src.in
index e29aeb2ed..a0245f3b9 100644
--- a/config/default/base.src.in
+++ b/config/default/base.src.in
@@ -1,5 +1,5 @@
1group "Elm_Config" struct { 1group "Elm_Config" struct {
2 value "config_version" int: 131073; 2 value "config_version" int: 131074;
3 value "engine" string: ""; 3 value "engine" string: "";
4 value "vsync" uchar: 0; 4 value "vsync" uchar: 0;
5 value "thumbscroll_enable" uchar: 1; 5 value "thumbscroll_enable" uchar: 1;
@@ -94,6 +94,8 @@ group "Elm_Config" struct {
94 value "audio_mute_input" uchar: 0; 94 value "audio_mute_input" uchar: 0;
95 value "audio_mute_alert" uchar: 0; 95 value "audio_mute_alert" uchar: 0;
96 value "audio_mute_all" uchar: 0; 96 value "audio_mute_all" uchar: 0;
97 value "win_auto_focus_enable" uchar: 1;
98 value "win_auto_focus_animate" uchar: 1;
97 group "color_palette" list { 99 group "color_palette" list {
98 group "Elm_Custom_Palette" struct { 100 group "Elm_Custom_Palette" struct {
99 value "palette_name" string: "default"; 101 value "palette_name" string: "default";
diff --git a/config/mobile/base.src.in b/config/mobile/base.src.in
index ee0911577..e9db0a20d 100644
--- a/config/mobile/base.src.in
+++ b/config/mobile/base.src.in
@@ -1,5 +1,5 @@
1group "Elm_Config" struct { 1group "Elm_Config" struct {
2 value "config_version" int: 131073; 2 value "config_version" int: 131074;
3 value "engine" string: ""; 3 value "engine" string: "";
4 value "vsync" uchar: 0; 4 value "vsync" uchar: 0;
5 value "thumbscroll_enable" uchar: 1; 5 value "thumbscroll_enable" uchar: 1;
@@ -98,6 +98,8 @@ group "Elm_Config" struct {
98 value "audio_mute_input" uchar: 0; 98 value "audio_mute_input" uchar: 0;
99 value "audio_mute_alert" uchar: 0; 99 value "audio_mute_alert" uchar: 0;
100 value "audio_mute_all" uchar: 0; 100 value "audio_mute_all" uchar: 0;
101 value "win_auto_focus_enable" uchar: 1;
102 value "win_auto_focus_animate" uchar: 1;
101 group "color_palette" list { 103 group "color_palette" list {
102 group "Elm_Custom_Palette" struct { 104 group "Elm_Custom_Palette" struct {
103 value "palette_name" string: "default"; 105 value "palette_name" string: "default";
diff --git a/config/standard/base.src.in b/config/standard/base.src.in
index 2ee0271bc..9cae3a1cd 100644
--- a/config/standard/base.src.in
+++ b/config/standard/base.src.in
@@ -1,5 +1,5 @@
1group "Elm_Config" struct { 1group "Elm_Config" struct {
2 value "config_version" int: 131073; 2 value "config_version" int: 131074;
3 value "engine" string: ""; 3 value "engine" string: "";
4 value "vsync" uchar: 0; 4 value "vsync" uchar: 0;
5 value "thumbscroll_enable" uchar: 0; 5 value "thumbscroll_enable" uchar: 0;
@@ -95,6 +95,8 @@ group "Elm_Config" struct {
95 value "audio_mute_input" uchar: 0; 95 value "audio_mute_input" uchar: 0;
96 value "audio_mute_alert" uchar: 0; 96 value "audio_mute_alert" uchar: 0;
97 value "audio_mute_all" uchar: 0; 97 value "audio_mute_all" uchar: 0;
98 value "win_auto_focus_enable" uchar: 1;
99 value "win_auto_focus_animate" uchar: 1;
98 group "color_palette" list { 100 group "color_palette" list {
99 group "Elm_Custom_Palette" struct { 101 group "Elm_Custom_Palette" struct {
100 value "palette_name" string: "default"; 102 value "palette_name" string: "default";
diff --git a/src/bin/config.c b/src/bin/config.c
index 85f1743a9..1663d4d64 100644
--- a/src/bin/config.c
+++ b/src/bin/config.c
@@ -1585,6 +1585,30 @@ _status_config_focus_autoscroll_changed_cb(void *data EINA_UNUSED,
1585} 1585}
1586 1586
1587static void 1587static void
1588_config_focus_auto_show_cb(void *data EINA_UNUSED, Evas_Object *obj,
1589 void *event_info EINA_UNUSED)
1590{
1591 Eina_Bool cf = elm_config_window_auto_focus_enable_get();
1592 Eina_Bool val = elm_check_state_get(obj);
1593
1594 if (cf == val) return;
1595 elm_config_window_auto_focus_enable_set(val);
1596 elm_config_all_flush();
1597}
1598
1599static void
1600_config_focus_auto_animate_cb(void *data EINA_UNUSED, Evas_Object *obj,
1601 void *event_info EINA_UNUSED)
1602{
1603 Eina_Bool cf = elm_config_window_auto_focus_animate_get();
1604 Eina_Bool val = elm_check_state_get(obj);
1605
1606 if (cf == val) return;
1607 elm_config_window_auto_focus_animate_set(val);
1608 elm_config_all_flush();
1609}
1610
1611static void
1588_status_config_focus(Evas_Object *win, 1612_status_config_focus(Evas_Object *win,
1589 Evas_Object *naviframe) 1613 Evas_Object *naviframe)
1590{ 1614{
@@ -1618,6 +1642,16 @@ _status_config_focus(Evas_Object *win,
1618 _config_focus_item_select_on_focus_cb, NULL); 1642 _config_focus_item_select_on_focus_cb, NULL);
1619 elm_check_state_set(ck, elm_config_item_select_on_focus_disabled_get()); 1643 elm_check_state_set(ck, elm_config_item_select_on_focus_disabled_get());
1620 1644
1645 CHECK_ADD("Enable Automatic focus display",
1646 "Set whether enable/disable focus highlight automatically.",
1647 _config_focus_auto_show_cb, NULL);
1648 elm_check_state_set(ck, elm_config_window_auto_focus_enable_get());
1649 CHECK_ADD("Enable Automatic focus animation",
1650 "Set whether enable/disable focus highlight animation<br/>"
1651 "automatically when automatic focus shows.",
1652 _config_focus_auto_animate_cb, NULL);
1653 elm_check_state_set(ck, elm_config_window_auto_focus_enable_get());
1654
1621 fr = elm_frame_add(bx); 1655 fr = elm_frame_add(bx);
1622 elm_object_text_set(fr, "Focus Autoscroll Mode"); 1656 elm_object_text_set(fr, "Focus Autoscroll Mode");
1623 evas_object_size_hint_weight_set(fr, EVAS_HINT_EXPAND, 0.0); 1657 evas_object_size_hint_weight_set(fr, EVAS_HINT_EXPAND, 0.0);
diff --git a/src/lib/elm_config.c b/src/lib/elm_config.c
index 1d6aa7549..b11bb0b5b 100644
--- a/src/lib/elm_config.c
+++ b/src/lib/elm_config.c
@@ -589,6 +589,8 @@ _desc_init(void)
589 ELM_CONFIG_VAL(D, T, audio_mute_all, T_UCHAR); 589 ELM_CONFIG_VAL(D, T, audio_mute_all, T_UCHAR);
590 ELM_CONFIG_LIST(D, T, bindings, _config_bindings_widget_edd); 590 ELM_CONFIG_LIST(D, T, bindings, _config_bindings_widget_edd);
591 ELM_CONFIG_VAL(D, T, atspi_mode, T_UCHAR); 591 ELM_CONFIG_VAL(D, T, atspi_mode, T_UCHAR);
592 ELM_CONFIG_VAL(D, T, win_auto_focus_enable, T_UCHAR);
593 ELM_CONFIG_VAL(D, T, win_auto_focus_animate, T_UCHAR);
592#undef T 594#undef T
593#undef D 595#undef D
594#undef T_INT 596#undef T_INT
@@ -1610,6 +1612,8 @@ _config_load(void)
1610 _elm_config->audio_mute_input = 0; 1612 _elm_config->audio_mute_input = 0;
1611 _elm_config->audio_mute_alert = 0; 1613 _elm_config->audio_mute_alert = 0;
1612 _elm_config->audio_mute_all = 0; 1614 _elm_config->audio_mute_all = 0;
1615 _elm_config->win_auto_focus_enable = 1;
1616 _elm_config->win_auto_focus_animate = 1;
1613 _elm_config->atspi_mode = ELM_ATSPI_MODE_OFF; 1617 _elm_config->atspi_mode = ELM_ATSPI_MODE_OFF;
1614} 1618}
1615 1619
@@ -1830,6 +1834,10 @@ _config_update(void)
1830 /* we also need to update for property changes in the root window 1834 /* we also need to update for property changes in the root window
1831 * if needed, but that will be dependent on new properties added 1835 * if needed, but that will be dependent on new properties added
1832 * with each version */ 1836 * with each version */
1837 IFCFG(0x0002)
1838 _elm_config->win_auto_focus_enable = tcfg->win_auto_focus_enable;;
1839 _elm_config->win_auto_focus_animate = tcfg->win_auto_focus_animate;
1840 IFCFGEND
1833 1841
1834 /** 1842 /**
1835 * Fix user config for current ELM_CONFIG_EPOCH here. 1843 * Fix user config for current ELM_CONFIG_EPOCH here.
@@ -3155,6 +3163,30 @@ elm_config_audio_mute_set(Edje_Channel channel, Eina_Bool mute)
3155 edje_audio_channel_mute_set(channel, mute); 3163 edje_audio_channel_mute_set(channel, mute);
3156} 3164}
3157 3165
3166EAPI Eina_Bool
3167elm_config_window_auto_focus_enable_get(void)
3168{
3169 return _elm_config->win_auto_focus_enable;
3170}
3171
3172EAPI void
3173elm_config_window_auto_focus_enable_set(Eina_Bool enable)
3174{
3175 _elm_config->win_auto_focus_enable = enable;
3176}
3177
3178EAPI Eina_Bool
3179elm_config_window_auto_focus_animate_get(void)
3180{
3181 return _elm_config->win_auto_focus_animate;
3182}
3183
3184EAPI void
3185elm_config_window_auto_focus_animate_set(Eina_Bool enable)
3186{
3187 _elm_config->win_auto_focus_animate = enable;
3188}
3189
3158EAPI void 3190EAPI void
3159elm_config_all_flush(void) 3191elm_config_all_flush(void)
3160{ 3192{
diff --git a/src/lib/elm_config.h b/src/lib/elm_config.h
index aa1e1b0d3..6b625b8df 100644
--- a/src/lib/elm_config.h
+++ b/src/lib/elm_config.h
@@ -1724,6 +1724,54 @@ EAPI Eina_Bool elm_config_audio_mute_get(Edje_Channel channel);
1724EAPI void elm_config_audio_mute_set(Edje_Channel channel, Eina_Bool mute); 1724EAPI void elm_config_audio_mute_set(Edje_Channel channel, Eina_Bool mute);
1725 1725
1726/** 1726/**
1727 * Get the auto focus enable flag
1728 *
1729 * This determines if elementary will show a focus box indicating the focused
1730 * widget automatically if keyboard controls like "Tab" are used to switch
1731 * focus between widgets. Mouse or touch control will hide this auto shown
1732 * focus, unless focus display has been expliccitly forced on for the window.
1733 *
1734 * @return The enabled state for auto focus display
1735 * @since 1.14
1736 */
1737EAPI Eina_Bool elm_config_window_auto_focus_enable_get(void);
1738
1739/**
1740 * Set the auto focus enabled state
1741 *
1742 * This determines if elementary will show a focus box indicating the focused
1743 * widget automatically if keyboard controls like "Tab" are used to switch
1744 * focus between widgets. Mouse or touch control will hide this auto shown
1745 * focus, unless focus display has been expliccitly forced on for the window.
1746 *
1747 * @param enable the auto focus display enabled state
1748 * @since 1.14
1749 */
1750EAPI void elm_config_window_auto_focus_enable_set(Eina_Bool enable);
1751
1752/**
1753 * Get the auto focus animate flag
1754 *
1755 * If auto focus - see elm_config_window_auto_focus_enable_set() , is enabled
1756 * then this will determine if the focus display will be animated or not.
1757 *
1758 * @return The enabled state for auto focus animation
1759 * @since 1.14
1760 */
1761EAPI Eina_Bool elm_config_window_auto_focus_animate_get(void);
1762
1763/**
1764 * Set the auto focus animation flag
1765 *
1766 * If auto focus - see elm_config_window_auto_focus_enable_set() , is enabled
1767 * then this will determine if the focus display will be animated or not.
1768 *
1769 * @param enable the auto focus animation state
1770 * @since 1.14
1771 */
1772EAPI void elm_config_window_auto_focus_animate_set(Eina_Bool enable);
1773
1774/**
1727 * @defgroup ATSPI AT-SPI2 Accessibility 1775 * @defgroup ATSPI AT-SPI2 Accessibility
1728 * @ingroup Elementary 1776 * @ingroup Elementary
1729 * 1777 *
diff --git a/src/lib/elm_priv.h b/src/lib/elm_priv.h
index dbfb8cbda..1ddf9aa6c 100644
--- a/src/lib/elm_priv.h
+++ b/src/lib/elm_priv.h
@@ -123,7 +123,7 @@ struct _Elm_Theme
123 * the users config doesn't need to be wiped - simply new values need 123 * the users config doesn't need to be wiped - simply new values need
124 * to be put in 124 * to be put in
125 */ 125 */
126#define ELM_CONFIG_FILE_GENERATION 0x0001 126#define ELM_CONFIG_FILE_GENERATION 0x0002
127#define ELM_CONFIG_VERSION_EPOCH_OFFSET 16 127#define ELM_CONFIG_VERSION_EPOCH_OFFSET 16
128#define ELM_CONFIG_VERSION ((ELM_CONFIG_EPOCH << ELM_CONFIG_VERSION_EPOCH_OFFSET) | \ 128#define ELM_CONFIG_VERSION ((ELM_CONFIG_EPOCH << ELM_CONFIG_VERSION_EPOCH_OFFSET) | \
129 ELM_CONFIG_FILE_GENERATION) 129 ELM_CONFIG_FILE_GENERATION)
@@ -286,6 +286,8 @@ struct _Elm_Config
286 unsigned char audio_mute_input; 286 unsigned char audio_mute_input;
287 unsigned char audio_mute_alert; 287 unsigned char audio_mute_alert;
288 unsigned char audio_mute_all; 288 unsigned char audio_mute_all;
289 unsigned char win_auto_focus_enable;
290 unsigned char win_auto_focus_animate;
289 Eina_List *bindings; 291 Eina_List *bindings;
290 Eina_Bool atspi_mode; 292 Eina_Bool atspi_mode;
291 293
diff --git a/src/lib/elm_widget.c b/src/lib/elm_widget.c
index c4d2d69f4..39e3c3240 100644
--- a/src/lib/elm_widget.c
+++ b/src/lib/elm_widget.c
@@ -3822,8 +3822,12 @@ elm_widget_focus_mouse_up_handle(Evas_Object *obj)
3822EOLIAN static void 3822EOLIAN static void
3823_elm_widget_focus_mouse_up_handle(Eo *obj, Elm_Widget_Smart_Data *_pd EINA_UNUSED) 3823_elm_widget_focus_mouse_up_handle(Eo *obj, Elm_Widget_Smart_Data *_pd EINA_UNUSED)
3824{ 3824{
3825 Evas_Object *top;
3826
3825 if (!obj) return; 3827 if (!obj) return;
3826 if (!_is_focusable(obj)) return; 3828 if (!_is_focusable(obj)) return;
3829 top = elm_widget_top_get(obj);
3830 if (top && eo_isa(top, ELM_WIN_CLASS)) _elm_win_focus_auto_hide(top);
3827 elm_widget_focus_steal(obj); 3831 elm_widget_focus_steal(obj);
3828} 3832}
3829 3833
diff --git a/src/lib/elm_widget.h b/src/lib/elm_widget.h
index 67cddb09f..96a9444e9 100644
--- a/src/lib/elm_widget.h
+++ b/src/lib/elm_widget.h
@@ -534,6 +534,8 @@ void _elm_win_focus_highlight_in_theme_update(Evas_Object *obj,
534void _elm_win_focus_highlight_signal_emit(Evas_Object *obj, const char *emission, const char *source); 534void _elm_win_focus_highlight_signal_emit(Evas_Object *obj, const char *emission, const char *source);
535void _elm_win_focus_highlight_signal_callback_add(Evas_Object *obj, const char *emission, const char *source, Edje_Signal_Cb _focus_highlight_signal_cb, void *data); 535void _elm_win_focus_highlight_signal_callback_add(Evas_Object *obj, const char *emission, const char *source, Edje_Signal_Cb _focus_highlight_signal_cb, void *data);
536void _elm_win_focus_highlight_signal_callback_del(Evas_Object *obj, const char *emission, const char *source, Edje_Signal_Cb _focus_highlight_signal_cb); 536void _elm_win_focus_highlight_signal_callback_del(Evas_Object *obj, const char *emission, const char *source, Edje_Signal_Cb _focus_highlight_signal_cb);
537void _elm_win_focus_auto_show(Evas_Object *obj);
538void _elm_win_focus_auto_hide(Evas_Object *obj);
537 539
538EAPI void _elm_access_clear(Elm_Access_Info *ac); 540EAPI void _elm_access_clear(Elm_Access_Info *ac);
539EAPI void _elm_access_text_set(Elm_Access_Info *ac, int type, const char *text); 541EAPI void _elm_access_text_set(Elm_Access_Info *ac, int type, const char *text);
diff --git a/src/lib/elm_win.c b/src/lib/elm_win.c
index 0056bd747..1bfdd9370 100644
--- a/src/lib/elm_win.c
+++ b/src/lib/elm_win.c
@@ -166,6 +166,8 @@ struct _Elm_Win_Data
166 Eina_Bool animate : 1; /* set true when the focus highlight animate is enabled */ 166 Eina_Bool animate : 1; /* set true when the focus highlight animate is enabled */
167 Eina_Bool animate_supported : 1; /* set true when the focus highlight animate is supported by theme */ 167 Eina_Bool animate_supported : 1; /* set true when the focus highlight animate is supported by theme */
168 Eina_Bool geometry_changed : 1; 168 Eina_Bool geometry_changed : 1;
169 Eina_Bool auto_enabled : 1;
170 Eina_Bool auto_animate : 1;
169 } focus_highlight; 171 } focus_highlight;
170 172
171 Evas_Object *icon; 173 Evas_Object *icon;
@@ -967,7 +969,7 @@ _elm_win_focus_highlight_reconfigure_job(void *data)
967 (sd->obj, fobj, "focus_highlight", "top", str); 969 (sd->obj, fobj, "focus_highlight", "top", str);
968 sd->focus_highlight.theme_changed = EINA_FALSE; 970 sd->focus_highlight.theme_changed = EINA_FALSE;
969 971
970 if (sd->focus_highlight.animate) 972 if ((sd->focus_highlight.animate) || (sd->focus_highlight.auto_animate))
971 { 973 {
972 str = edje_object_data_get(sd->focus_highlight.fobj, "animate"); 974 str = edje_object_data_get(sd->focus_highlight.fobj, "animate");
973 sd->focus_highlight.animate_supported = ((str) && (!strcmp(str, "on"))); 975 sd->focus_highlight.animate_supported = ((str) && (!strcmp(str, "on")));
@@ -1386,7 +1388,10 @@ static Eina_Bool
1386_key_action_move(Evas_Object *obj, const char *params) 1388_key_action_move(Evas_Object *obj, const char *params)
1387{ 1389{
1388 const char *dir = params; 1390 const char *dir = params;
1391 Evas_Object *top;
1389 1392
1393 top = elm_widget_top_get(obj);
1394 if (top && eo_isa(top, ELM_WIN_CLASS)) _elm_win_focus_auto_show(top);
1390 if (!strcmp(dir, "previous")) 1395 if (!strcmp(dir, "previous"))
1391 elm_widget_focus_cycle(obj, ELM_FOCUS_PREVIOUS); 1396 elm_widget_focus_cycle(obj, ELM_FOCUS_PREVIOUS);
1392 else if (!strcmp(dir, "next")) 1397 else if (!strcmp(dir, "next"))
@@ -4864,7 +4869,7 @@ _elm_win_focus_highlight_enabled_set(Eo *obj EINA_UNUSED, Elm_Win_Data *sd, Eina
4864 4869
4865 sd->focus_highlight.enabled = enabled; 4870 sd->focus_highlight.enabled = enabled;
4866 4871
4867 if (sd->focus_highlight.enabled) 4872 if ((sd->focus_highlight.enabled) || (sd->focus_highlight.auto_enabled))
4868 _elm_win_focus_highlight_init(sd); 4873 _elm_win_focus_highlight_init(sd);
4869 else 4874 else
4870 _elm_win_focus_highlight_shutdown(sd); 4875 _elm_win_focus_highlight_shutdown(sd);
@@ -5109,7 +5114,7 @@ void
5109_elm_win_focus_highlight_signal_emit(Evas_Object *obj, const char *emission, const char *source) 5114_elm_win_focus_highlight_signal_emit(Evas_Object *obj, const char *emission, const char *source)
5110{ 5115{
5111 ELM_WIN_DATA_GET(obj, sd); 5116 ELM_WIN_DATA_GET(obj, sd);
5112 if (sd->focus_highlight.enabled) 5117 if ((sd->focus_highlight.enabled) || (sd->focus_highlight.auto_enabled))
5113 edje_object_signal_emit(sd->focus_highlight.fobj, emission, source); 5118 edje_object_signal_emit(sd->focus_highlight.fobj, emission, source);
5114} 5119}
5115 5120
@@ -5119,7 +5124,8 @@ _elm_win_focus_highlight_signal_callback_add(Evas_Object *obj, const char *emiss
5119 void *data) 5124 void *data)
5120{ 5125{
5121 ELM_WIN_DATA_GET(obj, sd); 5126 ELM_WIN_DATA_GET(obj, sd);
5122 if (sd->focus_highlight.enabled && sd->focus_highlight.fobj) 5127 if (((sd->focus_highlight.enabled) || (sd->focus_highlight.auto_enabled))
5128 && (sd->focus_highlight.fobj))
5123 edje_object_signal_callback_add(sd->focus_highlight.fobj, emission, source, _focus_highlight_signal_cb, data); 5129 edje_object_signal_callback_add(sd->focus_highlight.fobj, emission, source, _focus_highlight_signal_cb, data);
5124} 5130}
5125 5131
@@ -5128,7 +5134,8 @@ _elm_win_focus_highlight_signal_callback_del(Evas_Object *obj, const char *emiss
5128 const char *source, Edje_Signal_Cb _focus_highlight_signal_cb) 5134 const char *source, Edje_Signal_Cb _focus_highlight_signal_cb)
5129{ 5135{
5130 ELM_WIN_DATA_GET(obj, sd); 5136 ELM_WIN_DATA_GET(obj, sd);
5131 if (sd->focus_highlight.enabled && sd->focus_highlight.fobj) 5137 if (((sd->focus_highlight.enabled) || (sd->focus_highlight.auto_enabled))
5138 && (sd->focus_highlight.fobj))
5132 edje_object_signal_callback_del(sd->focus_highlight.fobj, emission, source, _focus_highlight_signal_cb); 5139 edje_object_signal_callback_del(sd->focus_highlight.fobj, emission, source, _focus_highlight_signal_cb);
5133} 5140}
5134 5141
@@ -5143,6 +5150,34 @@ _elm_win_focus_highlight_start(Evas_Object *obj)
5143 _elm_win_focus_highlight_reconfigure_job(obj); 5150 _elm_win_focus_highlight_reconfigure_job(obj);
5144} 5151}
5145 5152
5153void
5154_elm_win_focus_auto_show(Evas_Object *obj)
5155{
5156 ELM_WIN_DATA_GET(obj, sd);
5157 Eina_Bool pfocus = (sd->focus_highlight.enabled) || (sd->focus_highlight.auto_enabled);
5158 sd->focus_highlight.auto_enabled = _elm_config->win_auto_focus_enable;
5159 sd->focus_highlight.auto_animate = _elm_config->win_auto_focus_animate;
5160 if (pfocus != ((sd->focus_highlight.enabled) || (sd->focus_highlight.auto_enabled)))
5161 {
5162 if ((sd->focus_highlight.enabled) || (sd->focus_highlight.auto_enabled))
5163 _elm_win_focus_highlight_init(sd);
5164 }
5165}
5166
5167void
5168_elm_win_focus_auto_hide(Evas_Object *obj)
5169{
5170 ELM_WIN_DATA_GET(obj, sd);
5171 Eina_Bool pfocus = (sd->focus_highlight.enabled) || (sd->focus_highlight.auto_enabled);
5172 sd->focus_highlight.auto_enabled = EINA_FALSE;
5173 sd->focus_highlight.auto_animate = EINA_FALSE;
5174 if (pfocus != ((sd->focus_highlight.enabled) || (sd->focus_highlight.auto_enabled)))
5175 {
5176 if (!((sd->focus_highlight.enabled) || (sd->focus_highlight.auto_enabled)))
5177 _elm_win_focus_highlight_shutdown(sd);
5178 }
5179}
5180
5146EAPI Ecore_Window 5181EAPI Ecore_Window
5147elm_win_window_id_get(const Evas_Object *obj) 5182elm_win_window_id_get(const Evas_Object *obj)
5148{ 5183{