summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmitesh Singh <amitesh.sh@samsung.com>2017-11-29 17:39:42 +0900
committerAmitesh Singh <amitesh.sh@samsung.com>2017-11-29 19:25:14 +0900
commit29b47e0a0776e9cc74ad8b9fc00fa3271c4d5486 (patch)
tree2f32ef07ddb49a6bf0db2f58225c3cd0fcb2fd4f
parent8faa65d90b5e148b30ffa7c589f7ff7bc14026f7 (diff)
downloadefl-29b47e0a0776e9cc74ad8b9fc00fa3271c4d5486.tar.gz
focus: remove focus.get{} from widget.eo
This is taking care by focus manager now.
-rw-r--r--src/lib/elementary/efl_ui_calendar.c2
-rw-r--r--src/lib/elementary/efl_ui_clock.c2
-rw-r--r--src/lib/elementary/efl_ui_image_zoomable.c2
-rw-r--r--src/lib/elementary/efl_ui_layout.c2
-rw-r--r--src/lib/elementary/efl_ui_multibuttonentry.c12
-rw-r--r--src/lib/elementary/efl_ui_slider.c14
-rw-r--r--src/lib/elementary/efl_ui_spin_button.c2
-rw-r--r--src/lib/elementary/efl_ui_text.c6
-rw-r--r--src/lib/elementary/efl_ui_win.c8
-rw-r--r--src/lib/elementary/elc_hoversel.c2
-rw-r--r--src/lib/elementary/elm_access.c2
-rw-r--r--src/lib/elementary/elm_calendar.c2
-rw-r--r--src/lib/elementary/elm_colorselector.c2
-rw-r--r--src/lib/elementary/elm_diskselector.c2
-rw-r--r--src/lib/elementary/elm_entry.c4
-rw-r--r--src/lib/elementary/elm_gengrid.c2
-rw-r--r--src/lib/elementary/elm_genlist.c8
-rw-r--r--src/lib/elementary/elm_glview.c2
-rw-r--r--src/lib/elementary/elm_list.c8
-rw-r--r--src/lib/elementary/elm_main.c4
-rw-r--r--src/lib/elementary/elm_map.c2
-rw-r--r--src/lib/elementary/elm_plug.c2
-rw-r--r--src/lib/elementary/elm_spinner.c2
-rw-r--r--src/lib/elementary/elm_toolbar.c2
-rw-r--r--src/lib/elementary/elm_widget.c14
-rw-r--r--src/lib/elementary/elm_widget.eo16
-rw-r--r--src/lib/elementary/elm_widget.h3
27 files changed, 53 insertions, 76 deletions
diff --git a/src/lib/elementary/efl_ui_calendar.c b/src/lib/elementary/efl_ui_calendar.c
index df5e9d6a38..8b8a82da9a 100644
--- a/src/lib/elementary/efl_ui_calendar.c
+++ b/src/lib/elementary/efl_ui_calendar.c
@@ -876,7 +876,7 @@ _efl_ui_calendar_elm_widget_on_focus_update(Eo *obj, Efl_Ui_Calendar_Data *sd, E
// After arranging focus logic in this widget, we need to make
// focused item which is for indicating direction key input movement
// on the calendar widget.
- if (elm_widget_focus_get(obj))
+ if (efl_ui_focus_object_focus_get(obj))
_update_focused_it(obj, sd->selected_it);
else
_update_unfocused_it(obj, sd->focused_it);
diff --git a/src/lib/elementary/efl_ui_clock.c b/src/lib/elementary/efl_ui_clock.c
index bd11bc8d60..969cfd9e41 100644
--- a/src/lib/elementary/efl_ui_clock.c
+++ b/src/lib/elementary/efl_ui_clock.c
@@ -454,7 +454,7 @@ _efl_ui_clock_elm_widget_on_focus_update(Eo *obj, Efl_Ui_Clock_Data *sd, Elm_Obj
int_ret = efl_ui_widget_on_focus_update(efl_super(obj, MY_CLASS), NULL);
if (!int_ret) return EINA_FALSE;
- if (!elm_widget_focus_get(obj))
+ if (!efl_ui_focus_object_focus_get(obj))
{
if ((dt_mod) && (dt_mod->obj_hide))
dt_mod->obj_hide(sd->mod_data);
diff --git a/src/lib/elementary/efl_ui_image_zoomable.c b/src/lib/elementary/efl_ui_image_zoomable.c
index 5ad22f723a..388235f416 100644
--- a/src/lib/elementary/efl_ui_image_zoomable.c
+++ b/src/lib/elementary/efl_ui_image_zoomable.c
@@ -869,7 +869,7 @@ _efl_ui_image_zoomable_elm_widget_on_focus_update(Eo *obj, Efl_Ui_Image_Zoomable
int_ret = efl_ui_widget_on_focus_update(efl_super(obj, MY_CLASS), NULL);
if (!int_ret) return EINA_FALSE;
- if (elm_widget_focus_get(obj))
+ if (efl_ui_focus_object_focus_get(obj))
{
edje_object_signal_emit
(wd->resize_obj, "elm,action,focus", "elm");
diff --git a/src/lib/elementary/efl_ui_layout.c b/src/lib/elementary/efl_ui_layout.c
index 15534c7b7d..65343c1194 100644
--- a/src/lib/elementary/efl_ui_layout.c
+++ b/src/lib/elementary/efl_ui_layout.c
@@ -394,7 +394,7 @@ _efl_ui_layout_elm_widget_on_focus_update(Eo *obj, Efl_Ui_Layout_Data *_pd EINA_
if (!elm_widget_can_focus_get(obj)) return EINA_FALSE;
- if (elm_widget_focus_get(obj))
+ if (efl_ui_focus_object_focus_get(obj))
{
elm_layout_signal_emit(obj, "elm,action,focus", "elm");
evas_object_focus_set(wd->resize_obj, EINA_TRUE);
diff --git a/src/lib/elementary/efl_ui_multibuttonentry.c b/src/lib/elementary/efl_ui_multibuttonentry.c
index 0ff7c5e555..d39d68c470 100644
--- a/src/lib/elementary/efl_ui_multibuttonentry.c
+++ b/src/lib/elementary/efl_ui_multibuttonentry.c
@@ -146,11 +146,11 @@ _visual_guide_text_set(Evas_Object *obj)
elm_box_unpack(sd->box, sd->entry);
if (sd->view_state == MULTIBUTTONENTRY_VIEW_SHRINK) return;
- if (!elm_widget_focus_get(obj))
+ if (!efl_ui_focus_object_focus_get(obj))
elm_object_focus_set(sd->entry, EINA_FALSE);
if ((!eina_list_count(sd->items)) && sd->guide_text
- && (!elm_widget_focus_get(obj)) && (!sd->n_str))
+ && (!efl_ui_focus_object_focus_get(obj)) && (!sd->n_str))
{
evas_object_hide(sd->entry);
elm_box_pack_end(sd->box, sd->guide_text);
@@ -165,7 +165,7 @@ _visual_guide_text_set(Evas_Object *obj)
{
elm_box_pack_end(sd->box, sd->entry);
evas_object_show(sd->entry);
- if (elm_widget_focus_get(obj))
+ if (efl_ui_focus_object_focus_get(obj))
{
if (!sd->selected_it)
elm_object_focus_set(sd->entry, EINA_TRUE);
@@ -448,7 +448,7 @@ _item_select(Evas_Object *obj,
if (it->func) it->func((void *)(WIDGET_ITEM_DATA_GET(EO_OBJ(it))), WIDGET(it), EO_OBJ(it));
- if (elm_widget_focus_get(obj))
+ if (efl_ui_focus_object_focus_get(obj))
{
elm_object_focus_set(sd->entry, EINA_FALSE);
elm_object_focus_set(VIEW(it), EINA_TRUE);
@@ -479,7 +479,7 @@ _item_select(Evas_Object *obj,
{
_current_item_state_change
(obj, MULTIBUTTONENTRY_BUTTON_STATE_DEFAULT);
- if (elm_widget_focus_get(obj) && sd->editable)
+ if (efl_ui_focus_object_focus_get(obj) && sd->editable)
elm_object_focus_set(sd->entry, EINA_TRUE);
}
}
@@ -1039,7 +1039,7 @@ _entry_resize_cb(void *data,
{
EFL_UI_MULTIBUTTONENTRY_DATA_GET_OR_RETURN(data, sd);
- if (elm_widget_focus_get(sd->parent))
+ if (efl_ui_focus_object_focus_get(sd->parent))
elm_widget_show_region_set(sd->entry, efl_gfx_geometry_get(sd->entry), EINA_TRUE);
}
diff --git a/src/lib/elementary/efl_ui_slider.c b/src/lib/elementary/efl_ui_slider.c
index 0af9a787f2..1474664df7 100644
--- a/src/lib/elementary/efl_ui_slider.c
+++ b/src/lib/elementary/efl_ui_slider.c
@@ -313,7 +313,7 @@ _drag_start(void *data,
const char *emission EINA_UNUSED,
const char *source EINA_UNUSED)
{
- if (!elm_widget_focus_get(data))
+ if (!efl_ui_focus_object_focus_get(data))
elm_object_focus_set(data, EINA_TRUE);
_slider_update(data, EINA_TRUE);
efl_event_callback_legacy_call(data, EFL_UI_SLIDER_EVENT_SLIDER_DRAG_START, NULL);
@@ -415,7 +415,7 @@ _popup_hide(void *data,
if (sd->indicator_visible_mode == ELM_SLIDER_INDICATOR_VISIBLE_MODE_ALWAYS) return;
if ((sd->indicator_visible_mode == ELM_SLIDER_INDICATOR_VISIBLE_MODE_ON_FOCUS) &&
- elm_widget_focus_get(data))
+ efl_ui_focus_object_focus_get(data))
return;
edje_object_signal_emit(sd->popup, "popup,hide", "elm"); // XXX: for compat
@@ -437,7 +437,7 @@ _popup_hide_done(void *data,
EFL_UI_SLIDER_DATA_GET(data, sd);
if (sd->popup)
{
- if (!((elm_widget_focus_get(data)) &&
+ if (!((efl_ui_focus_object_focus_get(data)) &&
(sd->indicator_visible_mode == ELM_SLIDER_INDICATOR_VISIBLE_MODE_ON_FOCUS)))
{
evas_object_hide(sd->popup);
@@ -446,7 +446,7 @@ _popup_hide_done(void *data,
}
if (sd->popup2)
{
- if (!((elm_widget_focus_get(data)) &&
+ if (!((efl_ui_focus_object_focus_get(data)) &&
(sd->indicator_visible_mode == ELM_SLIDER_INDICATOR_VISIBLE_MODE_ON_FOCUS)))
{
evas_object_hide(sd->popup2);
@@ -901,7 +901,7 @@ _spacer_down_cb(void *data,
_move_knob_on_mouse(data, button_x, button_y);
- if (!elm_widget_focus_get(data))
+ if (!efl_ui_focus_object_focus_get(data))
elm_object_focus_set(data, EINA_TRUE);
_slider_update(data, EINA_TRUE);
efl_event_callback_legacy_call(data, EFL_UI_SLIDER_EVENT_SLIDER_DRAG_START, NULL);
@@ -1255,9 +1255,9 @@ _efl_ui_slider_elm_widget_on_focus_update(Eo *obj, Efl_Ui_Slider_Data *sd EINA_U
int_ret = efl_ui_widget_on_focus_update(efl_super(obj, MY_CLASS), NULL);
- if ((sd->indicator_visible_mode == ELM_SLIDER_INDICATOR_VISIBLE_MODE_ON_FOCUS) && elm_widget_focus_get(obj))
+ if ((sd->indicator_visible_mode == ELM_SLIDER_INDICATOR_VISIBLE_MODE_ON_FOCUS) && efl_ui_focus_object_focus_get(obj))
_popup_show(obj, NULL, NULL, NULL);
- else if (!elm_widget_focus_get(obj))
+ else if (!efl_ui_focus_object_focus_get(obj))
_popup_hide(obj, NULL, NULL, NULL);
return int_ret;
diff --git a/src/lib/elementary/efl_ui_spin_button.c b/src/lib/elementary/efl_ui_spin_button.c
index 21b0e28072..23e149af32 100644
--- a/src/lib/elementary/efl_ui_spin_button.c
+++ b/src/lib/elementary/efl_ui_spin_button.c
@@ -571,7 +571,7 @@ _efl_ui_spin_button_elm_widget_on_focus_update(Eo *obj, Efl_Ui_Spin_Button_Data
int_ret = efl_ui_widget_on_focus_update(efl_super(obj, MY_CLASS), NULL);
if (!int_ret) return EINA_FALSE;
- if (!elm_widget_focus_get(obj))
+ if (!efl_ui_focus_object_focus_get(obj))
{
ELM_SAFE_FREE(sd->delay_change_timer, ecore_timer_del);
ELM_SAFE_FREE(sd->spin_timer, ecore_timer_del);
diff --git a/src/lib/elementary/efl_ui_text.c b/src/lib/elementary/efl_ui_text.c
index 05619dccc9..c44ccb391f 100644
--- a/src/lib/elementary/efl_ui_text.c
+++ b/src/lib/elementary/efl_ui_text.c
@@ -963,7 +963,7 @@ _efl_ui_text_elm_widget_theme_apply(Eo *obj, Efl_Ui_Text_Data *sd)
// and one of them can delete elm_entry.
evas_object_ref(obj);
- if (elm_widget_focus_get(obj))
+ if (efl_ui_focus_object_focus_get(obj))
{
edje_object_signal_emit(sd->entry_edje, "elm,action,focus", "elm");
if (sd->scroll)
@@ -1200,7 +1200,7 @@ _efl_ui_text_elm_widget_on_focus_update(Eo *obj, Efl_Ui_Text_Data *sd, Elm_Objec
if (top && efl_isa(top, EFL_UI_WIN_CLASS))
top_is_win = EINA_TRUE;
- if (elm_widget_focus_get(obj))
+ if (efl_ui_focus_object_focus_get(obj))
{
Eo *sw = edje_object_part_swallow_get(sd->entry_edje, "elm.text");
evas_object_focus_set(sw, EINA_TRUE);
@@ -2243,7 +2243,7 @@ _entry_cursor_changed_signal_cb(void *data,
sd->cursor_pos = edje_object_part_text_cursor_pos_get
(sd->entry_edje, "elm.text", EDJE_CURSOR_MAIN);
sd->cur_changed = EINA_TRUE;
- if (elm_widget_focus_get(data))
+ if (efl_ui_focus_object_focus_get(data))
{
edje_object_signal_emit(sd->entry_edje, "elm,action,show,cursor", "elm");
}
diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c
index ba35fee7ec..2c89a4e77a 100644
--- a/src/lib/elementary/efl_ui_win.c
+++ b/src/lib/elementary/efl_ui_win.c
@@ -1666,9 +1666,9 @@ _efl_ui_win_elm_widget_on_focus_update(Eo *obj, Efl_Ui_Win_Data *sd, Elm_Object_
return EINA_TRUE;
if (sd->img_obj)
- evas_object_focus_set(sd->img_obj, elm_widget_focus_get(obj));
+ evas_object_focus_set(sd->img_obj, efl_ui_focus_object_focus_get(obj));
else
- evas_object_focus_set(obj, elm_widget_focus_get(obj));
+ evas_object_focus_set(obj, efl_ui_focus_object_focus_get(obj));
return EINA_TRUE;
}
@@ -6379,7 +6379,7 @@ _efl_ui_win_indicator_type_get(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd EINA_UNU
}
EOLIAN static Eina_Bool
-_efl_ui_win_elm_widget_focus_get(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd)
+_efl_ui_win_efl_ui_focus_object_focus_get(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd)
{
// Bypass widget implementation here.
return ecore_evas_focus_get(sd->ee);
@@ -8390,7 +8390,7 @@ elm_win_socket_listen(Efl_Ui_Win *obj, const char *svcname, int svcnum, Eina_Boo
EAPI Eina_Bool
elm_win_focus_get(const Efl_Ui_Win *obj)
{
- return efl_ui_widget_focus_get(obj);
+ return efl_ui_focus_object_focus_get(obj);
}
EAPI void
diff --git a/src/lib/elementary/elc_hoversel.c b/src/lib/elementary/elc_hoversel.c
index 01181a53e8..64f13b5797 100644
--- a/src/lib/elementary/elc_hoversel.c
+++ b/src/lib/elementary/elc_hoversel.c
@@ -583,7 +583,7 @@ EOLIAN static Eina_Bool
_elm_hoversel_item_elm_widget_item_focus_get(Eo *eo_it EINA_UNUSED,
Elm_Hoversel_Item_Data *it)
{
- return elm_widget_focus_get(VIEW(it));
+ return efl_ui_focus_object_focus_get(VIEW(it));
}
EOLIAN static void
diff --git a/src/lib/elementary/elm_access.c b/src/lib/elementary/elm_access.c
index abe81e34f2..99b9ad0c58 100644
--- a/src/lib/elementary/elm_access.c
+++ b/src/lib/elementary/elm_access.c
@@ -147,7 +147,7 @@ _elm_access_elm_widget_on_access_activate(Eo *obj, void *_pd EINA_UNUSED, Efl_Ui
EOLIAN static Eina_Bool
_elm_access_elm_widget_on_focus_update(Eo *obj, void *_pd EINA_UNUSED, Elm_Object_Item *item EINA_UNUSED)
{
- evas_object_focus_set(obj, elm_widget_focus_get(obj));
+ evas_object_focus_set(obj, efl_ui_focus_object_focus_get(obj));
return EINA_TRUE;
}
diff --git a/src/lib/elementary/elm_calendar.c b/src/lib/elementary/elm_calendar.c
index 11acf528ca..2aff58223b 100644
--- a/src/lib/elementary/elm_calendar.c
+++ b/src/lib/elementary/elm_calendar.c
@@ -1393,7 +1393,7 @@ _elm_calendar_elm_widget_on_focus_update(Eo *obj, Elm_Calendar_Data *sd, Elm_Obj
int_ret = efl_ui_widget_on_focus_update(efl_super(obj, MY_CLASS), NULL);
if (!int_ret) return EINA_FALSE;
- if (elm_widget_focus_get(obj))
+ if (efl_ui_focus_object_focus_get(obj))
_update_focused_it(obj, sd->selected_it);
else
_update_unfocused_it(obj, sd->focused_it);
diff --git a/src/lib/elementary/elm_colorselector.c b/src/lib/elementary/elm_colorselector.c
index 97a0ad14d4..c51641e416 100644
--- a/src/lib/elementary/elm_colorselector.c
+++ b/src/lib/elementary/elm_colorselector.c
@@ -2648,7 +2648,7 @@ _elm_color_item_elm_widget_item_focus_set(Eo *eo_it, Elm_Color_Item_Data *it, Ei
}
else
{
- if (!elm_widget_focus_get(obj))
+ if (!efl_ui_focus_object_focus_get(obj))
return;
sd->focused_item = NULL;
}
diff --git a/src/lib/elementary/elm_diskselector.c b/src/lib/elementary/elm_diskselector.c
index e26451327e..1a96a8ce61 100644
--- a/src/lib/elementary/elm_diskselector.c
+++ b/src/lib/elementary/elm_diskselector.c
@@ -905,7 +905,7 @@ _elm_diskselector_elm_widget_on_focus_update(Eo *obj, Elm_Diskselector_Data *_pd
int_ret = efl_ui_widget_on_focus_update(efl_super(obj, MY_CLASS), NULL);
if (!int_ret) return EINA_FALSE;
- if (elm_widget_focus_get(obj))
+ if (efl_ui_focus_object_focus_get(obj))
{
edje_object_signal_emit
(wd->resize_obj, "elm,action,focus", "elm");
diff --git a/src/lib/elementary/elm_entry.c b/src/lib/elementary/elm_entry.c
index 56c8c305db..ad70e9b039 100644
--- a/src/lib/elementary/elm_entry.c
+++ b/src/lib/elementary/elm_entry.c
@@ -932,7 +932,7 @@ _elm_entry_elm_widget_theme_apply(Eo *obj, Elm_Entry_Data *sd)
// and one of them can delete elm_entry.
evas_object_ref(obj);
- if (elm_widget_focus_get(obj))
+ if (efl_ui_focus_object_focus_get(obj))
{
edje_object_signal_emit(sd->entry_edje, "elm,action,focus", "elm");
if (sd->scroll)
@@ -2413,7 +2413,7 @@ _entry_cursor_changed_signal_cb(void *data,
sd->cursor_pos = edje_object_part_text_cursor_pos_get
(sd->entry_edje, "elm.text", EDJE_CURSOR_MAIN);
sd->cur_changed = EINA_TRUE;
- if (elm_widget_focus_get(data))
+ if (efl_ui_focus_object_focus_get(data))
edje_object_signal_emit(sd->entry_edje, "elm,action,show,cursor", "elm");
_cursor_geometry_recalc(data);
diff --git a/src/lib/elementary/elm_gengrid.c b/src/lib/elementary/elm_gengrid.c
index 0aaabfdd11..8f5615fbd7 100644
--- a/src/lib/elementary/elm_gengrid.c
+++ b/src/lib/elementary/elm_gengrid.c
@@ -3805,7 +3805,7 @@ _elm_gengrid_item_elm_widget_item_focus_set(Eo *eo_it, Elm_Gen_Item *it, Eina_Bo
}
else
{
- if (!elm_widget_focus_get(obj))
+ if (!efl_ui_focus_object_focus_get(obj))
return;
_elm_gengrid_item_unfocused(eo_it);
}
diff --git a/src/lib/elementary/elm_genlist.c b/src/lib/elementary/elm_genlist.c
index f21da6d66c..9ae57c1ef5 100644
--- a/src/lib/elementary/elm_genlist.c
+++ b/src/lib/elementary/elm_genlist.c
@@ -3375,13 +3375,13 @@ _elm_genlist_elm_widget_on_focus_update(Eo *obj, Elm_Genlist_Data *sd, Elm_Objec
int_ret = efl_ui_widget_on_focus_update(efl_super(obj, MY_CLASS), NULL);
if (!int_ret) return EINA_FALSE;
- if (elm_widget_focus_get(obj) && (sd->items) && (sd->selected) &&
+ if (efl_ui_focus_object_focus_get(obj) && (sd->items) && (sd->selected) &&
(!sd->last_selected_item))
{
sd->last_selected_item = eina_list_data_get(sd->selected);
}
- if (elm_widget_focus_get(obj) && !sd->mouse_down)
+ if (efl_ui_focus_object_focus_get(obj) && !sd->mouse_down)
{
if (sd->last_focused_item)
eo_it = sd->last_focused_item;
@@ -6132,7 +6132,7 @@ _elm_genlist_item_elm_widget_item_focus_set(Eo *eo_it, Elm_Gen_Item *it, Eina_Bo
if (!elm_object_focus_get(obj))
elm_object_focus_set(obj, EINA_TRUE);
- if (!elm_widget_focus_get(obj))
+ if (!efl_ui_focus_object_focus_get(obj))
return;
if (eo_it != sd->focused_item)
@@ -6152,7 +6152,7 @@ _elm_genlist_item_elm_widget_item_focus_set(Eo *eo_it, Elm_Gen_Item *it, Eina_Bo
}
else
{
- if (!elm_widget_focus_get(obj))
+ if (!efl_ui_focus_object_focus_get(obj))
return;
_elm_genlist_item_unfocused(eo_it);
}
diff --git a/src/lib/elementary/elm_glview.c b/src/lib/elementary/elm_glview.c
index d1a96f5269..0201b61858 100644
--- a/src/lib/elementary/elm_glview.c
+++ b/src/lib/elementary/elm_glview.c
@@ -35,7 +35,7 @@ _elm_glview_elm_widget_on_focus_update(Eo *obj, Elm_Glview_Data *_pd EINA_UNUSED
int_ret = efl_ui_widget_on_focus_update(efl_super(obj, MY_CLASS), NULL);
if (!int_ret) return EINA_FALSE;
- if (elm_widget_focus_get(obj))
+ if (efl_ui_focus_object_focus_get(obj))
evas_object_focus_set(wd->resize_obj, EINA_TRUE);
else
evas_object_focus_set(wd->resize_obj, EINA_FALSE);
diff --git a/src/lib/elementary/elm_list.c b/src/lib/elementary/elm_list.c
index 35219faabc..1b7f239abf 100644
--- a/src/lib/elementary/elm_list.c
+++ b/src/lib/elementary/elm_list.c
@@ -1245,7 +1245,7 @@ _elm_list_elm_widget_on_focus_update(Eo *obj, Elm_List_Data *sd, Elm_Object_Item
int_ret = efl_ui_widget_on_focus_update(efl_super(obj, MY_CLASS), NULL);
if (!int_ret) return EINA_FALSE;
- if (elm_widget_focus_get(obj) && sd->selected && !sd->last_selected_item)
+ if (efl_ui_focus_object_focus_get(obj) && sd->selected && !sd->last_selected_item)
{
Elm_Object_Item *sel = eina_list_data_get(sd->selected);
sd->last_selected_item = efl_data_scope_get(sel, ELM_LIST_ITEM_CLASS);
@@ -1253,7 +1253,7 @@ _elm_list_elm_widget_on_focus_update(Eo *obj, Elm_List_Data *sd, Elm_Object_Item
if (!sd->items) return EINA_FALSE;
- if (elm_widget_focus_get(obj) && !sd->mouse_down)
+ if (efl_ui_focus_object_focus_get(obj) && !sd->mouse_down)
{
if (sd->last_focused_item)
eo_it = sd->last_focused_item;
@@ -2070,7 +2070,7 @@ _elm_list_item_elm_widget_item_focus_set(Eo *eo_it, Elm_List_Item_Data *it, Eina
if (!elm_object_focus_get(obj))
elm_object_focus_set(obj, EINA_TRUE);
- if (!elm_widget_focus_get(obj))
+ if (!efl_ui_focus_object_focus_get(obj))
return;
if (eo_it != sd->focused_item)
@@ -2082,7 +2082,7 @@ _elm_list_item_elm_widget_item_focus_set(Eo *eo_it, Elm_List_Item_Data *it, Eina
}
else
{
- if (!elm_widget_focus_get(obj))
+ if (!efl_ui_focus_object_focus_get(obj))
return;
if (eo_it)
_elm_list_item_unfocused(eo_it);
diff --git a/src/lib/elementary/elm_main.c b/src/lib/elementary/elm_main.c
index de924766d8..7789b8b348 100644
--- a/src/lib/elementary/elm_main.c
+++ b/src/lib/elementary/elm_main.c
@@ -1613,7 +1613,7 @@ elm_object_focus_get(const Evas_Object *obj)
focused_child = efl_ui_focus_user_parent_get(focused_child);
}
- return elm_widget_focus_get(obj);
+ return efl_ui_focus_object_focus_get(obj);
}
EAPI void
@@ -2080,4 +2080,4 @@ EAPI Elm_Focus_Region_Show_Mode
elm_object_focus_region_show_mode_get(const Evas_Object *obj)
{
return elm_widget_focus_region_show_mode_get(obj);
-}
+} \ No newline at end of file
diff --git a/src/lib/elementary/elm_map.c b/src/lib/elementary/elm_map.c
index 1b14288a04..13b5521b96 100644
--- a/src/lib/elementary/elm_map.c
+++ b/src/lib/elementary/elm_map.c
@@ -3953,7 +3953,7 @@ _elm_map_elm_widget_on_focus_update(Eo *obj, Elm_Map_Data *_pd EINA_UNUSED, Elm_
int_ret = efl_ui_widget_on_focus_update(efl_super(obj, MY_CLASS), NULL);
if (!int_ret) return EINA_FALSE;
- if (elm_widget_focus_get(obj))
+ if (efl_ui_focus_object_focus_get(obj))
{
edje_object_signal_emit
(wd->resize_obj, "elm,action,focus", "elm");
diff --git a/src/lib/elementary/elm_plug.c b/src/lib/elementary/elm_plug.c
index 9fe640654e..62bb83b90c 100644
--- a/src/lib/elementary/elm_plug.c
+++ b/src/lib/elementary/elm_plug.c
@@ -68,7 +68,7 @@ _elm_plug_elm_widget_on_focus_update(Eo *obj, void *sd EINA_UNUSED, Elm_Object_I
int_ret = efl_ui_widget_on_focus_update(efl_super(obj, MY_CLASS), NULL);
if (!int_ret) return EINA_FALSE;
- if (elm_widget_focus_get(obj))
+ if (efl_ui_focus_object_focus_get(obj))
{
evas_object_focus_set(wd->resize_obj, EINA_TRUE);
}
diff --git a/src/lib/elementary/elm_spinner.c b/src/lib/elementary/elm_spinner.c
index b1de7efde1..ab7bab3de6 100644
--- a/src/lib/elementary/elm_spinner.c
+++ b/src/lib/elementary/elm_spinner.c
@@ -937,7 +937,7 @@ _elm_spinner_elm_widget_on_focus_update(Eo *obj, Elm_Spinner_Data *sd, Elm_Objec
int_ret = efl_ui_widget_on_focus_update(efl_super(obj, MY_CLASS), NULL);
if (!int_ret) return EINA_FALSE;
- if (!elm_widget_focus_get(obj))
+ if (!efl_ui_focus_object_focus_get(obj))
{
ELM_SAFE_FREE(sd->delay_change_timer, ecore_timer_del);
ELM_SAFE_FREE(sd->spin_timer, ecore_timer_del);
diff --git a/src/lib/elementary/elm_toolbar.c b/src/lib/elementary/elm_toolbar.c
index a9a0835a16..e7df14afad 100644
--- a/src/lib/elementary/elm_toolbar.c
+++ b/src/lib/elementary/elm_toolbar.c
@@ -756,7 +756,7 @@ _elm_toolbar_elm_widget_on_focus_update(Eo *obj, Elm_Toolbar_Data *sd, Elm_Objec
if (!int_ret) return EINA_FALSE;
if (!sd->items) return EINA_FALSE;
- if (elm_widget_focus_get(obj))
+ if (efl_ui_focus_object_focus_get(obj))
{
evas_object_focus_set(wd->resize_obj, EINA_TRUE);
if (sd->mouse_down) return EINA_TRUE;
diff --git a/src/lib/elementary/elm_widget.c b/src/lib/elementary/elm_widget.c
index 2633f2e53e..d174bf7dca 100644
--- a/src/lib/elementary/elm_widget.c
+++ b/src/lib/elementary/elm_widget.c
@@ -44,7 +44,7 @@
#define ELM_WIDGET_FOCUS_GET(obj) \
(efl_isa(obj, ELM_WIDGET_CLASS) && \
((_elm_access_auto_highlight_get()) ? (elm_widget_highlight_get(obj)) : \
- (elm_widget_focus_get(obj))))
+ (efl_ui_focus_object_focus_get(obj))))
const char SIG_WIDGET_FOCUSED[] = "focused";
const char SIG_WIDGET_UNFOCUSED[] = "unfocused";
@@ -1918,12 +1918,6 @@ elm_widget_access_highlight_in_theme_get(const Eo *obj)
return sd->access_highlight_in_theme;
}
-EOLIAN static Eina_Bool
-_elm_widget_focus_get(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *sd)
-{
- return (sd->focused && sd->top_win_focused);
-}
-
/** @internal */
EAPI Eina_Bool
elm_widget_highlight_get(const Eo *obj)
@@ -4970,7 +4964,7 @@ _sub_obj_tree_dot_dump(const Evas_Object *obj,
Eina_Bool visible = evas_object_visible_get(obj);
Eina_Bool disabled = elm_widget_disabled_get(obj);
- Eina_Bool focused = elm_widget_focus_get(obj);
+ Eina_Bool focused = efl_ui_focus_object_focus_get(obj);
Eina_Bool can_focus = elm_widget_can_focus_get(obj);
if (sd->parent_obj)
@@ -5124,7 +5118,7 @@ _elm_widget_efl_object_debug_name_override(Eo *obj, Elm_Widget_Smart_Data *sd EI
{
const char *focus = "";
- if (efl_ui_widget_focus_get(obj)) focus = ":focused";
+ if (efl_ui_focus_object_focus_get(obj)) focus = ":focused";
efl_debug_name_override(efl_super(obj, MY_CLASS), sb);
eina_strbuf_append_printf(sb, "%s", focus);
}
@@ -5137,7 +5131,7 @@ _elm_widget_on_focus_update(Eo *obj, Elm_Widget_Smart_Data *sd, Elm_Object_Item
if (!elm_widget_can_focus_get(obj))
return EINA_FALSE;
- focused = elm_widget_focus_get(obj);
+ focused = efl_ui_focus_object_focus_get(obj);
if (!sd->resize_obj)
evas_object_focus_set(obj, focused);
diff --git a/src/lib/elementary/elm_widget.eo b/src/lib/elementary/elm_widget.eo
index 6a03f4be8c..6752380ce1 100644
--- a/src/lib/elementary/elm_widget.eo
+++ b/src/lib/elementary/elm_widget.eo
@@ -134,22 +134,6 @@ abstract Elm.Widget (Efl.Canvas.Group, Efl.Access,
disabled: bool(false); [[$true if the orientation mode is disabled.]]
}
}
- // FIXME: This property may be simply removed from EO (replaced by focus manager stuff)
- @property focus {
- [[Whether the object is focused for inputs.
-
- If an object is focused it will be the first to receive keyboard
- inputs. Only visible, non-disabled objects can be focused.
-
- Focus can be disabled by setting @.focus_allow to $false.
- ]]
- get {
- [[Gets whether this object is currently focused.]]
- }
- values {
- focus: bool(false); [[Whether the object is focused.]]
- }
- }
// FIXME: focus_allow? can_focus? focusable?
@property focus_allow {
[[The ability for a widget to be focused.
diff --git a/src/lib/elementary/elm_widget.h b/src/lib/elementary/elm_widget.h
index abc92795a8..6f28a6997f 100644
--- a/src/lib/elementary/elm_widget.h
+++ b/src/lib/elementary/elm_widget.h
@@ -56,7 +56,7 @@
* // define this virtual function to handle it (e.g. to emit a
* // signal to an edje object)
*
- * if (elm_widget_focus_get(obj))
+ * if (efl_ui_focus_object_focus_get(obj))
* {
* edje_object_signal_emit(sd->sub, "elm,action,focus", "elm");
* evas_object_focus_set(sd->sub, EINA_TRUE);
@@ -660,7 +660,6 @@ EAPI void elm_widget_highlight_in_theme_set(Evas_Object *obj, Eina_B
EAPI Eina_Bool elm_widget_highlight_in_theme_get(const Evas_Object *obj);
EAPI void elm_widget_access_highlight_in_theme_set(Evas_Object *obj, Eina_Bool highlight);
EAPI Eina_Bool elm_widget_access_highlight_in_theme_get(const Evas_Object *obj);
-EAPI Eina_Bool elm_widget_focus_get(const Evas_Object *obj);
EAPI Eina_Bool elm_widget_highlight_get(const Evas_Object *obj);
EAPI Evas_Object *elm_widget_top_get(const Evas_Object *obj);
EAPI Eina_Bool elm_widget_is(const Evas_Object *obj);