This is taking care by focus manager now.
// 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);
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);
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");
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);
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);
{
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);
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);
{
_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);
}
}
{
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);
}
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);
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
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);
}
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);
_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);
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;
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);
// 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)
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);
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");
}
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;
}
}
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);
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
_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
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;
}
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);
}
else
{
- if (!elm_widget_focus_get(obj))
+ if (!efl_ui_focus_object_focus_get(obj))
return;
sd->focused_item = NULL;
}
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");
// 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)
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);
}
else
{
- if (!elm_widget_focus_get(obj))
+ if (!efl_ui_focus_object_focus_get(obj))
return;
_elm_gengrid_item_unfocused(eo_it);
}
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;
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)
}
else
{
- if (!elm_widget_focus_get(obj))
+ if (!efl_ui_focus_object_focus_get(obj))
return;
_elm_genlist_item_unfocused(eo_it);
}
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);
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);
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;
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)
}
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);
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
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
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");
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);
}
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);
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;
#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";
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)
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)
{
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);
}
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);
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.
* // 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);
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);