summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmitesh Singh <amitesh.sh@samsung.com>2014-07-21 19:04:27 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2014-07-21 19:04:27 +0900
commit3f98d71830163a154762f2d16301d720c781b7c5 (patch)
treec07f493f5345c7f66d5fb011b77b3cbe15099354
parent20b61442a71309e5feed9038bf802ed016bd0b3a (diff)
focus: Added internal widget APIs of focus highlight object of elm window.
Summary: This is required to support the animation of focus highlight object in case of item looping (genlist/gengrid/list). Reviewers: seoz, woohyun, raster Reviewed By: raster Subscribers: anand.km, seoz Differential Revision: https://phab.enlightenment.org/D1136
-rw-r--r--src/lib/elm_widget.c31
-rw-r--r--src/lib/elm_widget.h7
-rw-r--r--src/lib/elm_win.c27
3 files changed, 65 insertions, 0 deletions
diff --git a/src/lib/elm_widget.c b/src/lib/elm_widget.c
index 1c5b71e3e..d6af6ffbe 100644
--- a/src/lib/elm_widget.c
+++ b/src/lib/elm_widget.c
@@ -161,6 +161,37 @@ _elm_widget_focus_highlight_start(const Evas_Object *obj)
161 _elm_win_focus_highlight_start(top); 161 _elm_win_focus_highlight_start(top);
162} 162}
163 163
164void
165_elm_widget_focus_highlight_signal_emit(Evas_Object *obj, const char *emission, const char *source)
166{
167 Evas_Object *top = elm_widget_top_get(obj);
168
169 if (top && eo_isa(top, ELM_WIN_CLASS))
170 _elm_win_focus_highlight_signal_emit(top, emission, source);
171}
172
173void
174_elm_widget_focus_highlight_signal_callback_add(Evas_Object *obj, const char *emission,
175 const char *source, Edje_Signal_Cb _focus_highlight_signal_cb,
176 void *data)
177{
178 Evas_Object *top = elm_widget_top_get(obj);
179
180 if (top && eo_isa(top, ELM_WIN_CLASS))
181 _elm_win_focus_highlight_signal_callback_add(top, emission, source, _focus_highlight_signal_cb, data);
182}
183
184void
185_elm_widget_focus_highlight_signal_callback_del(Evas_Object *obj, const char *emission,
186 const char *source,
187 Edje_Signal_Cb _focus_highlight_signal_cb)
188{
189 Evas_Object *top = elm_widget_top_get(obj);
190
191 if (top && eo_isa(top, ELM_WIN_CLASS))
192 _elm_win_focus_highlight_signal_callback_del(obj, emission, source, _focus_highlight_signal_cb);
193}
194
164EAPI Eina_Bool 195EAPI Eina_Bool
165elm_widget_focus_highlight_enabled_get(const Evas_Object *obj) 196elm_widget_focus_highlight_enabled_get(const Evas_Object *obj)
166{ 197{
diff --git a/src/lib/elm_widget.h b/src/lib/elm_widget.h
index 1fe5ab4bf..3f6db3515 100644
--- a/src/lib/elm_widget.h
+++ b/src/lib/elm_widget.h
@@ -524,6 +524,13 @@ void _elm_widget_focus_highlight_start(const Evas_Object *obj);
524void _elm_widget_highlight_in_theme_update(Eo *obj); 524void _elm_widget_highlight_in_theme_update(Eo *obj);
525void _elm_win_focus_highlight_start(Evas_Object *obj); 525void _elm_win_focus_highlight_start(Evas_Object *obj);
526void _elm_win_focus_highlight_in_theme_update(Evas_Object *obj, Eina_Bool in_theme); 526void _elm_win_focus_highlight_in_theme_update(Evas_Object *obj, Eina_Bool in_theme);
527void _elm_widget_focus_highlight_signal_emit(Evas_Object *obj, const char *emission, const char *source);
528void _elm_win_focus_highlight_signal_emit(Evas_Object *obj, const char *emission, const char *source);
529void _elm_widget_focus_highlight_signal_callback_add(Evas_Object *obj, const char *emission, const char *source, Edje_Signal_Cb _focus_highlight_signal_cb, void *data);
530void _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);
531void _elm_widget_focus_highlight_signal_callback_del(Evas_Object *obj, const char *emission, const char *source, Edje_Signal_Cb _focus_highlight_signal_cb);
532void _elm_widget_focus_highlight_signal_callback_del(Evas_Object *obj, const char *emission, const char *source, Edje_Signal_Cb _focus_highlight_signal_cb);
533void _elm_win_focus_highlight_signal_callback_del(Evas_Object *obj, const char *emission, const char *source, Edje_Signal_Cb _focus_highlight_signal_cb);
527 534
528EAPI void _elm_access_clear(Elm_Access_Info *ac); 535EAPI void _elm_access_clear(Elm_Access_Info *ac);
529EAPI void _elm_access_text_set(Elm_Access_Info *ac, int type, const char *text); 536EAPI 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 59dfc0e16..696412721 100644
--- a/src/lib/elm_win.c
+++ b/src/lib/elm_win.c
@@ -4832,6 +4832,33 @@ _elm_win_focus_highlight_in_theme_update(Evas_Object *obj, Eina_Bool in_theme)
4832} 4832}
4833 4833
4834void 4834void
4835_elm_win_focus_highlight_signal_emit(Evas_Object *obj, const char *emission, const char *source)
4836{
4837 ELM_WIN_DATA_GET(obj, sd);
4838 if (sd->focus_highlight.enabled)
4839 edje_object_signal_emit(sd->focus_highlight.fobj, emission, source);
4840}
4841
4842void
4843_elm_win_focus_highlight_signal_callback_add(Evas_Object *obj, const char *emission,
4844 const char *source, Edje_Signal_Cb _focus_highlight_signal_cb,
4845 void *data)
4846{
4847 ELM_WIN_DATA_GET(obj, sd);
4848 if (sd->focus_highlight.enabled && sd->focus_highlight.fobj)
4849 edje_object_signal_callback_add(sd->focus_highlight.fobj, emission, source, _focus_highlight_signal_cb, data);
4850}
4851
4852void
4853_elm_win_focus_highlight_signal_callback_del(Evas_Object *obj, const char *emission,
4854 const char *source, Edje_Signal_Cb _focus_highlight_signal_cb)
4855{
4856 ELM_WIN_DATA_GET(obj, sd);
4857 if (sd->focus_highlight.enabled && sd->focus_highlight.fobj)
4858 edje_object_signal_callback_del(sd->focus_highlight.fobj, emission, source, _focus_highlight_signal_cb);
4859}
4860
4861void
4835_elm_win_focus_highlight_start(Evas_Object *obj) 4862_elm_win_focus_highlight_start(Evas_Object *obj)
4836{ 4863{
4837 ELM_WIN_DATA_GET(obj, sd); 4864 ELM_WIN_DATA_GET(obj, sd);