Focus: concentrate focused events in widget
The focused/unfocused events should be only defined in a common widget, which is Elm.Widget.
This commit is contained in:
parent
616b41f89a
commit
95910aed72
|
@ -1564,9 +1564,9 @@ _elm_fileselector_evas_object_smart_add(Eo *obj, Elm_Fileselector_Data *priv)
|
|||
eo_do(en, eo_event_callback_add
|
||||
(ELM_ENTRY_EVENT_ANCHOR_CLICKED, _anchor_clicked, obj));
|
||||
eo_do(en, eo_event_callback_add
|
||||
(ELM_LAYOUT_EVENT_FOCUSED, _on_text_focused, obj));
|
||||
(ELM_WIDGET_EVENT_FOCUSED, _on_text_focused, obj));
|
||||
eo_do(en, eo_event_callback_add
|
||||
(ELM_LAYOUT_EVENT_UNFOCUSED, _on_text_unfocused, obj));
|
||||
(ELM_WIDGET_EVENT_UNFOCUSED, _on_text_unfocused, obj));
|
||||
eo_do(en, eo_event_callback_add
|
||||
(ELM_ENTRY_EVENT_ACTIVATED, _on_text_activated, obj));
|
||||
|
||||
|
|
|
@ -57,8 +57,8 @@ SIG_FWD(PRESS, ELM_FILESELECTOR_ENTRY_EVENT_PRESS)
|
|||
SIG_FWD(LONGPRESSED, EVAS_CLICKABLE_INTERFACE_EVENT_LONGPRESSED)
|
||||
SIG_FWD(CLICKED, EVAS_CLICKABLE_INTERFACE_EVENT_CLICKED)
|
||||
SIG_FWD(CLICKED_DOUBLE, EVAS_CLICKABLE_INTERFACE_EVENT_CLICKED_DOUBLE)
|
||||
SIG_FWD(FOCUSED, ELM_LAYOUT_EVENT_FOCUSED)
|
||||
SIG_FWD(UNFOCUSED, ELM_LAYOUT_EVENT_UNFOCUSED)
|
||||
SIG_FWD(FOCUSED, ELM_WIDGET_EVENT_FOCUSED)
|
||||
SIG_FWD(UNFOCUSED, ELM_WIDGET_EVENT_UNFOCUSED)
|
||||
SIG_FWD(SELECTION_PASTE, EVAS_SELECTABLE_INTERFACE_EVENT_SELECTION_PASTE)
|
||||
SIG_FWD(SELECTION_COPY, EVAS_SELECTABLE_INTERFACE_EVENT_SELECTION_COPY)
|
||||
SIG_FWD(SELECTION_CUT, EVAS_SELECTABLE_INTERFACE_EVENT_SELECTION_CUT)
|
||||
|
@ -315,8 +315,8 @@ _elm_fileselector_entry_evas_object_smart_add(Eo *obj, Elm_Fileselector_Entry_Da
|
|||
SIG_FWD(LONGPRESSED, EVAS_CLICKABLE_INTERFACE_EVENT_LONGPRESSED);
|
||||
SIG_FWD(CLICKED, EVAS_CLICKABLE_INTERFACE_EVENT_CLICKED);
|
||||
SIG_FWD(CLICKED_DOUBLE, EVAS_CLICKABLE_INTERFACE_EVENT_CLICKED_DOUBLE);
|
||||
SIG_FWD(FOCUSED, ELM_LAYOUT_EVENT_FOCUSED);
|
||||
SIG_FWD(UNFOCUSED, ELM_LAYOUT_EVENT_UNFOCUSED);
|
||||
SIG_FWD(FOCUSED, ELM_WIDGET_EVENT_FOCUSED);
|
||||
SIG_FWD(UNFOCUSED, ELM_WIDGET_EVENT_UNFOCUSED);
|
||||
SIG_FWD(SELECTION_PASTE, EVAS_SELECTABLE_INTERFACE_EVENT_SELECTION_PASTE);
|
||||
SIG_FWD(SELECTION_COPY, EVAS_SELECTABLE_INTERFACE_EVENT_SELECTION_COPY);
|
||||
SIG_FWD(SELECTION_CUT, EVAS_SELECTABLE_INTERFACE_EVENT_SELECTION_CUT);
|
||||
|
|
|
@ -212,8 +212,8 @@ _activate(Evas_Object *obj)
|
|||
(EVAS_CLICKABLE_INTERFACE_EVENT_CLICKED, _on_item_clicked, item));
|
||||
evas_object_show(bt);
|
||||
eo_do(bt,
|
||||
eo_event_callback_add(ELM_LAYOUT_EVENT_FOCUSED, _item_focused_cb, item),
|
||||
eo_event_callback_add(ELM_LAYOUT_EVENT_UNFOCUSED, _item_unfocused_cb, item));
|
||||
eo_event_callback_add(ELM_WIDGET_EVENT_FOCUSED, _item_focused_cb, item),
|
||||
eo_event_callback_add(ELM_WIDGET_EVENT_UNFOCUSED, _item_unfocused_cb, item));
|
||||
}
|
||||
|
||||
if (sd->horizontal)
|
||||
|
|
|
@ -331,7 +331,7 @@ _elm_multibuttonentry_elm_widget_on_focus(Eo *obj, Elm_Multibuttonentry_Data *sd
|
|||
}
|
||||
}
|
||||
eo_do(obj, eo_event_callback_call
|
||||
(ELM_MULTIBUTTONENTRY_EVENT_FOCUSED, NULL));
|
||||
(ELM_WIDGET_EVENT_FOCUSED, NULL));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -339,7 +339,7 @@ _elm_multibuttonentry_elm_widget_on_focus(Eo *obj, Elm_Multibuttonentry_Data *sd
|
|||
|
||||
elm_entry_input_panel_hide(sd->entry);
|
||||
eo_do(obj, eo_event_callback_call
|
||||
(ELM_MULTIBUTTONENTRY_EVENT_UNFOCUSED, NULL));
|
||||
(ELM_WIDGET_EVENT_UNFOCUSED, NULL));
|
||||
}
|
||||
|
||||
end:
|
||||
|
@ -1136,9 +1136,9 @@ _callbacks_register(Evas_Object *obj)
|
|||
eo_do(sd->entry, eo_event_callback_add
|
||||
(ELM_MULTIBUTTONENTRY_EVENT_CHANGED, _entry_changed_cb, obj));
|
||||
eo_do(sd->entry, eo_event_callback_add
|
||||
(ELM_MULTIBUTTONENTRY_EVENT_FOCUSED, _entry_focus_in_cb, obj));
|
||||
(ELM_WIDGET_EVENT_FOCUSED, _entry_focus_in_cb, obj));
|
||||
eo_do(sd->entry, eo_event_callback_add
|
||||
(ELM_MULTIBUTTONENTRY_EVENT_UNFOCUSED, _entry_focus_out_cb, obj));
|
||||
(ELM_WIDGET_EVENT_UNFOCUSED, _entry_focus_out_cb, obj));
|
||||
eo_do(sd->entry, eo_event_callback_add
|
||||
(EVAS_CLICKABLE_INTERFACE_EVENT_CLICKED, _entry_clicked_cb, obj));
|
||||
}
|
||||
|
|
|
@ -816,9 +816,9 @@ _item_new(Elm_Popup_Item_Data *it)
|
|||
_item_select_cb, it);
|
||||
evas_object_size_hint_align_set(VIEW(it), EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||
eo_do(VIEW(it), eo_event_callback_add
|
||||
(ELM_LAYOUT_EVENT_FOCUSED, _item_focused_cb, it));
|
||||
(ELM_WIDGET_EVENT_FOCUSED, _item_focused_cb, it));
|
||||
eo_do(VIEW(it), eo_event_callback_add
|
||||
(ELM_LAYOUT_EVENT_UNFOCUSED, _item_unfocused_cb, it));
|
||||
(ELM_WIDGET_EVENT_UNFOCUSED, _item_unfocused_cb, it));
|
||||
evas_object_show(VIEW(it));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -43,9 +43,4 @@ class Elm.Bubble (Elm.Layout, Evas.Clickable_Interface)
|
|||
Elm.Layout.content_aliases.get;
|
||||
Elm.Layout.sizing_eval;
|
||||
}
|
||||
events {
|
||||
focused;
|
||||
unfocused;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -407,8 +407,6 @@ class Elm.Calendar (Elm.Layout, Elm_Interface_Atspi_Widget_Action)
|
|||
display,changed;
|
||||
language,changed;
|
||||
access,changed;
|
||||
focused;
|
||||
unfocused;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -57,8 +57,6 @@ class Elm.Check (Elm.Layout, Elm_Interface_Atspi_Widget_Action)
|
|||
changed;
|
||||
language,changed;
|
||||
access,changed;
|
||||
focused;
|
||||
unfocused;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -255,8 +255,6 @@ class Elm.Clock (Elm.Layout)
|
|||
changed;
|
||||
language,changed;
|
||||
access,changed;
|
||||
focused;
|
||||
unfocused;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -143,8 +143,6 @@ class Elm.Colorselector (Elm.Layout, Elm_Interface_Atspi_Widget_Action,
|
|||
changed,user;
|
||||
language,changed;
|
||||
access,changed;
|
||||
focused;
|
||||
unfocused;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -322,8 +322,6 @@ class Elm.Datetime (Elm.Layout)
|
|||
changed;
|
||||
language,changed;
|
||||
access,changed;
|
||||
focused;
|
||||
unfocused;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -255,8 +255,6 @@ class Elm.Diskselector (Elm.Widget, Elm_Interface_Scrollable,
|
|||
events {
|
||||
language,changed;
|
||||
access,changed;
|
||||
focused;
|
||||
unfocused;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1151,7 +1151,7 @@ _elm_entry_elm_widget_on_focus(Eo *obj, Elm_Entry_Data *sd)
|
|||
if (top && top_is_win && sd->input_panel_enable && !sd->input_panel_show_on_demand &&
|
||||
!edje_object_part_text_imf_context_get(sd->entry_edje, "elm.text"))
|
||||
elm_win_keyboard_mode_set(top, ELM_WIN_KEYBOARD_ON);
|
||||
eo_do(obj, eo_event_callback_call(ELM_LAYOUT_EVENT_FOCUSED, NULL));
|
||||
eo_do(obj, eo_event_callback_call(ELM_WIDGET_EVENT_FOCUSED, NULL));
|
||||
if (_elm_config->atspi_mode)
|
||||
elm_interface_atspi_accessible_state_changed_signal_emit(obj, ELM_ATSPI_STATE_FOCUSED, EINA_TRUE);
|
||||
_return_key_enabled_check(obj);
|
||||
|
@ -1164,7 +1164,7 @@ _elm_entry_elm_widget_on_focus(Eo *obj, Elm_Entry_Data *sd)
|
|||
if (top && top_is_win && sd->input_panel_enable &&
|
||||
!edje_object_part_text_imf_context_get(sd->entry_edje, "elm.text"))
|
||||
elm_win_keyboard_mode_set(top, ELM_WIN_KEYBOARD_OFF);
|
||||
eo_do(obj, eo_event_callback_call(ELM_LAYOUT_EVENT_UNFOCUSED, NULL));
|
||||
eo_do(obj, eo_event_callback_call(ELM_WIDGET_EVENT_UNFOCUSED, NULL));
|
||||
if (_elm_config->atspi_mode)
|
||||
elm_interface_atspi_accessible_state_changed_signal_emit(obj, ELM_ATSPI_STATE_FOCUSED, EINA_FALSE);
|
||||
|
||||
|
|
|
@ -208,8 +208,6 @@ class Elm.Flipselector (Elm.Layout, Elm_Interface_Atspi_Widget_Action,
|
|||
overflowed;
|
||||
language,changed;
|
||||
access,changed;
|
||||
focused;
|
||||
unfocused;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -720,8 +720,6 @@ class Elm.Gengrid (Elm.Layout, Elm_Interface_Scrollable,
|
|||
events {
|
||||
language,changed;
|
||||
access,changed;
|
||||
focused;
|
||||
unfocused;
|
||||
realized;
|
||||
unrealized;
|
||||
index,update;
|
||||
|
|
|
@ -15,8 +15,6 @@ class Elm.Gengrid_Pan (Elm_Pan)
|
|||
events {
|
||||
language,changed;
|
||||
access,changed;
|
||||
focused;
|
||||
unfocused;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -744,8 +744,6 @@ class Elm.Genlist (Elm.Layout, Elm_Interface_Scrollable, Evas.Clickable_Interfac
|
|||
events {
|
||||
language,changed;
|
||||
access,changed;
|
||||
focused;
|
||||
unfocused;
|
||||
item,focused;
|
||||
item,unfocused;
|
||||
vbar,drag;
|
||||
|
|
|
@ -16,8 +16,6 @@ class Elm.Genlist_Pan (Elm_Pan)
|
|||
events {
|
||||
language,changed;
|
||||
access,changed;
|
||||
focused;
|
||||
unfocused;
|
||||
item,focused;
|
||||
item,unfocused;
|
||||
}
|
||||
|
|
|
@ -216,8 +216,6 @@ class Elm.Glview (Elm.Widget)
|
|||
Elm.Widget.on_focus;
|
||||
}
|
||||
events {
|
||||
focused;
|
||||
unfocused;
|
||||
language,changed;
|
||||
access,changed;
|
||||
}
|
||||
|
|
|
@ -86,8 +86,6 @@ class Elm.Hover (Elm.Layout, Evas.Clickable_Interface)
|
|||
Elm.Layout.content_aliases.get;
|
||||
}
|
||||
events {
|
||||
focused;
|
||||
unfocused;
|
||||
smart,changed;
|
||||
dismissed;
|
||||
}
|
||||
|
|
|
@ -361,8 +361,6 @@ class Elm.Index (Elm.Layout, Evas.Clickable_Interface, Evas.Selectable_Interface
|
|||
level,down;
|
||||
language,changed;
|
||||
access,changed;
|
||||
focused;
|
||||
unfocused;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -409,7 +409,7 @@ _elm_layout_elm_widget_on_focus(Eo *obj, Elm_Layout_Smart_Data *_pd EINA_UNUSED)
|
|||
{
|
||||
elm_layout_signal_emit(obj, "elm,action,focus", "elm");
|
||||
evas_object_focus_set(wd->resize_obj, EINA_TRUE);
|
||||
eo_do(obj, eo_event_callback_call(ELM_LAYOUT_EVENT_FOCUSED, NULL));
|
||||
eo_do(obj, eo_event_callback_call(ELM_WIDGET_EVENT_FOCUSED, NULL));
|
||||
if (_elm_config->atspi_mode && !elm_widget_child_can_focus_get(obj))
|
||||
elm_interface_atspi_accessible_state_changed_signal_emit(obj, ELM_ATSPI_STATE_FOCUSED, EINA_TRUE);
|
||||
}
|
||||
|
@ -417,7 +417,7 @@ _elm_layout_elm_widget_on_focus(Eo *obj, Elm_Layout_Smart_Data *_pd EINA_UNUSED)
|
|||
{
|
||||
elm_layout_signal_emit(obj, "elm,action,unfocus", "elm");
|
||||
evas_object_focus_set(wd->resize_obj, EINA_FALSE);
|
||||
eo_do(obj, eo_event_callback_call(ELM_LAYOUT_EVENT_UNFOCUSED, NULL));
|
||||
eo_do(obj, eo_event_callback_call(ELM_WIDGET_EVENT_UNFOCUSED, NULL));
|
||||
if (_elm_config->atspi_mode && !elm_widget_child_can_focus_get(obj))
|
||||
elm_interface_atspi_accessible_state_changed_signal_emit(obj, ELM_ATSPI_STATE_FOCUSED, EINA_FALSE);
|
||||
}
|
||||
|
|
|
@ -646,8 +646,6 @@ class Elm.Layout (Elm.Container, Efl.File)
|
|||
}
|
||||
events {
|
||||
theme,changed;
|
||||
focused;
|
||||
unfocused;
|
||||
language,changed;
|
||||
access,changed;
|
||||
}
|
||||
|
|
|
@ -803,8 +803,6 @@ class Elm.Map (Elm.Widget, Elm_Interface_Scrollable,
|
|||
overlay,del;
|
||||
language,changed;
|
||||
access,changed;
|
||||
focused;
|
||||
unfocused;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -27,8 +27,6 @@ class Elm.Map_Pan (Elm_Pan)
|
|||
overlay,del;
|
||||
language,changed;
|
||||
access,changed;
|
||||
focused;
|
||||
unfocused;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -273,8 +273,6 @@ class Elm.Multibuttonentry (Elm.Layout)
|
|||
item,deleted;
|
||||
item,clicked;
|
||||
item,longpressed;
|
||||
focused;
|
||||
unfocused;
|
||||
expanded;
|
||||
contracted;
|
||||
expand,state,changed;
|
||||
|
|
|
@ -280,8 +280,6 @@ class Elm.Naviframe (Elm.Layout, Elm_Interface_Atspi_Widget_Action)
|
|||
title,clicked;
|
||||
language,changed;
|
||||
access,changed;
|
||||
focused;
|
||||
unfocused;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -116,9 +116,4 @@ class Elm.Panel (Elm.Layout, Elm_Interface_Scrollable,
|
|||
Elm.Layout.sizing_eval;
|
||||
Elm_Interface_Atspi_Widget_Action.elm_actions.get;
|
||||
}
|
||||
events {
|
||||
focused;
|
||||
unfocused;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -248,8 +248,6 @@ class Elm.Photocam (Elm.Widget, Elm_Interface_Scrollable,
|
|||
download,progress;
|
||||
download,done;
|
||||
download,error;
|
||||
focused;
|
||||
unfocused;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -21,8 +21,6 @@ class Elm.Photocam_Pan (Elm_Pan)
|
|||
download,progress;
|
||||
download,done;
|
||||
download,error;
|
||||
focused;
|
||||
unfocused;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -25,8 +25,6 @@ class Elm.Player (Elm.Layout, Elm_Interface_Atspi_Widget_Action)
|
|||
volume,clicked;
|
||||
mute,clicked;
|
||||
language,changed;
|
||||
focused;
|
||||
unfocused;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -184,8 +184,6 @@ class Elm.Popup (Elm.Layout, Elm_Interface_Atspi_Widget_Action)
|
|||
item,unfocused;
|
||||
language,changed;
|
||||
access,changed;
|
||||
focused;
|
||||
unfocused;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -289,8 +289,6 @@ class Elm.Progressbar (Elm.Layout)
|
|||
changed;
|
||||
language,changed;
|
||||
access,changed;
|
||||
focused;
|
||||
unfocused;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -96,8 +96,6 @@ class Elm.Radio (Elm.Layout, Elm_Interface_Atspi_Widget_Action)
|
|||
changed;
|
||||
language,changed;
|
||||
access,changed;
|
||||
focused;
|
||||
unfocused;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -117,8 +117,6 @@ class Elm.Scroller (Elm.Layout, Elm_Interface_Scrollable,
|
|||
Elm_Interface_Atspi_Widget_Action.elm_actions.get;
|
||||
}
|
||||
events {
|
||||
focused;
|
||||
unfocused;
|
||||
scroll,page,changed;
|
||||
hbar,unpress;
|
||||
hbar,press;
|
||||
|
|
|
@ -416,8 +416,6 @@ class Elm.Slider (Elm.Layout, Elm_Interface_Atspi_Value,
|
|||
slider,drag,stop;
|
||||
language,changed;
|
||||
access,changed;
|
||||
focused;
|
||||
unfocused;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -429,8 +429,6 @@ class Elm.Slideshow (Elm.Layout, Elm_Interface_Atspi_Widget_Action)
|
|||
transition,end;
|
||||
language,changed;
|
||||
access,changed;
|
||||
focused;
|
||||
unfocused;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -387,7 +387,5 @@ class Elm.Spinner (Elm.Layout, Elm_Interface_Atspi_Value, Elm_Interface_Atspi_Wi
|
|||
spinner,drag,stop;
|
||||
language,changed;
|
||||
access,changed;
|
||||
focused;
|
||||
unfocused;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -552,8 +552,6 @@ class Elm.Toolbar (Elm.Widget, Elm_Interface_Scrollable,
|
|||
events {
|
||||
language,changed;
|
||||
access,changed;
|
||||
focused;
|
||||
unfocused;
|
||||
item,focused;
|
||||
item,unfocused;
|
||||
}
|
||||
|
|
|
@ -119,9 +119,4 @@ class Elm.Video (Elm.Layout, Efl.File, Elm_Interface_Atspi_Widget_Action)
|
|||
Elm.Layout.sizing_eval;
|
||||
Elm_Interface_Atspi_Widget_Action.elm_actions.get;
|
||||
}
|
||||
events {
|
||||
focused;
|
||||
unfocused;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -673,8 +673,6 @@ class Elm.Web (Elm.Widget)
|
|||
events {
|
||||
uri,changed; [[s]]
|
||||
url,changed; [[s]]
|
||||
focused;
|
||||
unfocused;
|
||||
windows,close,request;
|
||||
}
|
||||
|
||||
|
|
|
@ -1080,7 +1080,7 @@ _elm_win_focus_in(Ecore_Evas *ee)
|
|||
else
|
||||
elm_widget_focus_restore(obj);
|
||||
}
|
||||
eo_do(obj, eo_event_callback_call(ELM_WIN_EVENT_FOCUSED, NULL));
|
||||
eo_do(obj, eo_event_callback_call(ELM_WIDGET_EVENT_FOCUSED, NULL));
|
||||
sd->focus_highlight.cur.visible = EINA_TRUE;
|
||||
_elm_win_focus_highlight_reconfigure_job_start(sd);
|
||||
if (sd->frame_obj)
|
||||
|
@ -1112,7 +1112,7 @@ _elm_win_focus_out(Ecore_Evas *ee)
|
|||
|
||||
elm_object_focus_set(obj, EINA_FALSE);
|
||||
_elm_widget_top_win_focused_set(obj, EINA_FALSE);
|
||||
eo_do(obj, eo_event_callback_call(ELM_WIN_EVENT_UNFOCUSED, NULL));
|
||||
eo_do(obj, eo_event_callback_call(ELM_WIDGET_EVENT_UNFOCUSED, NULL));
|
||||
sd->focus_highlight.cur.visible = EINA_FALSE;
|
||||
_elm_win_focus_highlight_reconfigure_job_start(sd);
|
||||
if (sd->frame_obj)
|
||||
|
|
|
@ -1663,8 +1663,6 @@ class Elm.Win (Elm.Widget, Elm_Interface_Atspi_Window,
|
|||
indicator,prop,changed;
|
||||
rotation,changed;
|
||||
profile,changed;
|
||||
focused;
|
||||
unfocused;
|
||||
wm,rotation,changed;
|
||||
animator,tick;
|
||||
theme,changed;
|
||||
|
|
Loading…
Reference in New Issue