From 666b38a34863926ea38c241a1a5a6e7b5c0fad10 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Andre Date: Fri, 19 Jan 2018 17:13:07 +0900 Subject: [PATCH] widget: Remove item from on_focus_update It's legacy stuff, and always NULL. --- src/lib/elementary/efl_ui_calendar.c | 4 ++-- src/lib/elementary/efl_ui_clock.c | 4 ++-- src/lib/elementary/efl_ui_image_zoomable.c | 4 ++-- src/lib/elementary/efl_ui_layout.c | 4 ++-- src/lib/elementary/efl_ui_slider.c | 4 ++-- src/lib/elementary/efl_ui_spin_button.c | 4 ++-- src/lib/elementary/efl_ui_text.c | 2 +- src/lib/elementary/efl_ui_widget.c | 6 +++--- src/lib/elementary/efl_ui_widget.eo | 4 ---- src/lib/elementary/efl_ui_win.c | 4 ++-- src/lib/elementary/elm_access.c | 2 +- src/lib/elementary/elm_calendar.c | 4 ++-- src/lib/elementary/elm_diskselector.c | 4 ++-- src/lib/elementary/elm_entry.c | 2 +- src/lib/elementary/elm_genlist.c | 4 ++-- src/lib/elementary/elm_glview.c | 4 ++-- src/lib/elementary/elm_list.c | 4 ++-- src/lib/elementary/elm_map.c | 4 ++-- src/lib/elementary/elm_plug.c | 4 ++-- src/lib/elementary/elm_spinner.c | 4 ++-- src/lib/elementary/elm_toolbar.c | 4 ++-- 21 files changed, 38 insertions(+), 42 deletions(-) diff --git a/src/lib/elementary/efl_ui_calendar.c b/src/lib/elementary/efl_ui_calendar.c index 2810eeb..cc2149f 100644 --- a/src/lib/elementary/efl_ui_calendar.c +++ b/src/lib/elementary/efl_ui_calendar.c @@ -863,11 +863,11 @@ _key_action_activate(Evas_Object *obj, const char *params EINA_UNUSED) } EOLIAN static Eina_Bool -_efl_ui_calendar_efl_ui_widget_on_focus_update(Eo *obj, Efl_Ui_Calendar_Data *sd, Elm_Object_Item *item EINA_UNUSED) +_efl_ui_calendar_efl_ui_widget_on_focus_update(Eo *obj, Efl_Ui_Calendar_Data *sd) { Eina_Bool int_ret = EINA_FALSE; - int_ret = efl_ui_widget_on_focus_update(efl_super(obj, MY_CLASS), NULL); + int_ret = efl_ui_widget_on_focus_update(efl_super(obj, MY_CLASS)); if (!int_ret) return EINA_FALSE; // FIXME : Currently, focused item is same with selected item. diff --git a/src/lib/elementary/efl_ui_clock.c b/src/lib/elementary/efl_ui_clock.c index 6e4bfaa..83de3a1 100644 --- a/src/lib/elementary/efl_ui_clock.c +++ b/src/lib/elementary/efl_ui_clock.c @@ -535,11 +535,11 @@ _efl_ui_clock_edit_mode_get(Eo *obj EINA_UNUSED, Efl_Ui_Clock_Data *sd) } EOLIAN static Eina_Bool -_efl_ui_clock_efl_ui_widget_on_focus_update(Eo *obj, Efl_Ui_Clock_Data *sd, Elm_Object_Item *item EINA_UNUSED) +_efl_ui_clock_efl_ui_widget_on_focus_update(Eo *obj, Efl_Ui_Clock_Data *sd) { Eina_Bool int_ret = EINA_FALSE; - int_ret = efl_ui_widget_on_focus_update(efl_super(obj, MY_CLASS), NULL); + int_ret = efl_ui_widget_on_focus_update(efl_super(obj, MY_CLASS)); if (!int_ret) return EINA_FALSE; if (!efl_ui_focus_object_focus_get(obj)) diff --git a/src/lib/elementary/efl_ui_image_zoomable.c b/src/lib/elementary/efl_ui_image_zoomable.c index 1250f87..740c00a 100644 --- a/src/lib/elementary/efl_ui_image_zoomable.c +++ b/src/lib/elementary/efl_ui_image_zoomable.c @@ -876,12 +876,12 @@ _mouse_up_cb(void *data, } EOLIAN static Eina_Bool -_efl_ui_image_zoomable_efl_ui_widget_on_focus_update(Eo *obj, Efl_Ui_Image_Zoomable_Data *_pd EINA_UNUSED, Elm_Object_Item *item EINA_UNUSED) +_efl_ui_image_zoomable_efl_ui_widget_on_focus_update(Eo *obj, Efl_Ui_Image_Zoomable_Data *_pd EINA_UNUSED) { ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE); Eina_Bool int_ret = EINA_FALSE; - int_ret = efl_ui_widget_on_focus_update(efl_super(obj, MY_CLASS), NULL); + int_ret = efl_ui_widget_on_focus_update(efl_super(obj, MY_CLASS)); if (!int_ret) return EINA_FALSE; if (efl_ui_focus_object_focus_get(obj)) diff --git a/src/lib/elementary/efl_ui_layout.c b/src/lib/elementary/efl_ui_layout.c index 8765eda..d58a21a 100644 --- a/src/lib/elementary/efl_ui_layout.c +++ b/src/lib/elementary/efl_ui_layout.c @@ -398,7 +398,7 @@ _efl_ui_layout_efl_ui_widget_theme_apply(Eo *obj, Efl_Ui_Layout_Data *sd) } EOLIAN static Eina_Bool -_efl_ui_layout_efl_ui_widget_on_focus_update(Eo *obj, Efl_Ui_Layout_Data *_pd EINA_UNUSED, Elm_Object_Item *item EINA_UNUSED) +_efl_ui_layout_efl_ui_widget_on_focus_update(Eo *obj, Efl_Ui_Layout_Data *_pd EINA_UNUSED) { ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE); @@ -419,7 +419,7 @@ _efl_ui_layout_efl_ui_widget_on_focus_update(Eo *obj, Efl_Ui_Layout_Data *_pd EI efl_access_state_changed_signal_emit(obj, EFL_ACCESS_STATE_FOCUSED, EINA_FALSE); } - efl_ui_widget_on_focus_update(efl_super(obj, MY_CLASS), item); + efl_ui_widget_on_focus_update(efl_super(obj, MY_CLASS)); if (efl_isa(wd->resize_obj, EFL_CANVAS_LAYOUT_CLASS)) edje_object_message_signal_process(wd->resize_obj); diff --git a/src/lib/elementary/efl_ui_slider.c b/src/lib/elementary/efl_ui_slider.c index 6e3543d..bf561a7 100644 --- a/src/lib/elementary/efl_ui_slider.c +++ b/src/lib/elementary/efl_ui_slider.c @@ -1323,11 +1323,11 @@ _efl_ui_slider_step_get(Eo *obj EINA_UNUSED, Efl_Ui_Slider_Data *sd) } EOLIAN static Eina_Bool -_efl_ui_slider_efl_ui_widget_on_focus_update(Eo *obj, Efl_Ui_Slider_Data *sd EINA_UNUSED, Elm_Object_Item *item EINA_UNUSED) +_efl_ui_slider_efl_ui_widget_on_focus_update(Eo *obj, Efl_Ui_Slider_Data *sd EINA_UNUSED) { Eina_Bool int_ret = EINA_FALSE; - int_ret = efl_ui_widget_on_focus_update(efl_super(obj, MY_CLASS), NULL); + int_ret = efl_ui_widget_on_focus_update(efl_super(obj, MY_CLASS)); 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); diff --git a/src/lib/elementary/efl_ui_spin_button.c b/src/lib/elementary/efl_ui_spin_button.c index 6fa35c6..1c97c84 100644 --- a/src/lib/elementary/efl_ui_spin_button.c +++ b/src/lib/elementary/efl_ui_spin_button.c @@ -568,11 +568,11 @@ _efl_ui_spin_button_efl_ui_widget_widget_event(Eo *obj, Efl_Ui_Spin_Button_Data } EOLIAN static Eina_Bool -_efl_ui_spin_button_efl_ui_widget_on_focus_update(Eo *obj, Efl_Ui_Spin_Button_Data *sd, Elm_Object_Item *item EINA_UNUSED) +_efl_ui_spin_button_efl_ui_widget_on_focus_update(Eo *obj, Efl_Ui_Spin_Button_Data *sd) { Eina_Bool int_ret = EINA_FALSE; - int_ret = efl_ui_widget_on_focus_update(efl_super(obj, MY_CLASS), NULL); + int_ret = efl_ui_widget_on_focus_update(efl_super(obj, MY_CLASS)); if (!int_ret) return EINA_FALSE; if (!efl_ui_focus_object_focus_get(obj)) diff --git a/src/lib/elementary/efl_ui_text.c b/src/lib/elementary/efl_ui_text.c index 1f5988d..c2b6c3e 100644 --- a/src/lib/elementary/efl_ui_text.c +++ b/src/lib/elementary/efl_ui_text.c @@ -1128,7 +1128,7 @@ _return_key_enabled_check(Evas_Object *obj) } EOLIAN static Eina_Bool -_efl_ui_text_efl_ui_widget_on_focus_update(Eo *obj, Efl_Ui_Text_Data *sd, Elm_Object_Item *item EINA_UNUSED) +_efl_ui_text_efl_ui_widget_on_focus_update(Eo *obj, Efl_Ui_Text_Data *sd) { Evas_Object *top; Eina_Bool top_is_win = EINA_FALSE; diff --git a/src/lib/elementary/efl_ui_widget.c b/src/lib/elementary/efl_ui_widget.c index 96100b2..1f78fac 100644 --- a/src/lib/elementary/efl_ui_widget.c +++ b/src/lib/elementary/efl_ui_widget.c @@ -2456,7 +2456,7 @@ _elm_widget_top_win_focused_set(Evas_Object *obj, sd->top_win_focused = top_win_focused; if (sd->focused && !sd->top_win_focused) - efl_ui_widget_on_focus_update(obj, NULL); + efl_ui_widget_on_focus_update(obj); } Eina_Bool @@ -5623,7 +5623,7 @@ _efl_ui_widget_efl_object_debug_name_override(Eo *obj, Elm_Widget_Smart_Data *sd } EOLIAN static Eina_Bool -_efl_ui_widget_on_focus_update(Eo *obj, Elm_Widget_Smart_Data *sd, Elm_Object_Item *item EINA_UNUSED) +_efl_ui_widget_on_focus_update(Eo *obj, Elm_Widget_Smart_Data *sd) { Eina_Bool focused; @@ -6428,7 +6428,7 @@ _efl_ui_widget_efl_ui_focus_object_focus_set(Eo *obj, Elm_Widget_Smart_Data *pd, efl_ui_focus_object_focus_set(efl_super(obj, MY_CLASS), focus); - efl_ui_widget_on_focus_update(obj, NULL); + efl_ui_widget_on_focus_update(obj); } EOLIAN static Efl_Ui_Focus_Manager* diff --git a/src/lib/elementary/efl_ui_widget.eo b/src/lib/elementary/efl_ui_widget.eo index 76b62bd..ef714d9 100644 --- a/src/lib/elementary/efl_ui_widget.eo +++ b/src/lib/elementary/efl_ui_widget.eo @@ -336,10 +336,6 @@ abstract Efl.Ui.Widget (Efl.Canvas.Group, Efl.Access, } on_focus_update @protected { [[Virtual function handling focus in/out events on the widget]] - params { - /* FIXME: EO API is not supposed to have any widget item!!! */ - @in item: Elm.Widget.Item @nullable; [[Widget]] - } return: bool; [[$true if this widget can handle focus, $false otherwise]] } diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c index 8f8a2f9..9957600 100644 --- a/src/lib/elementary/efl_ui_win.c +++ b/src/lib/elementary/efl_ui_win.c @@ -2001,9 +2001,9 @@ _elm_win_focus_skip_set(Efl_Ui_Win_Data *sd, Eina_Bool skip) // EOLIAN static Eina_Bool -_efl_ui_win_efl_ui_widget_on_focus_update(Eo *obj, Efl_Ui_Win_Data *sd, Elm_Object_Item *item EINA_UNUSED) +_efl_ui_win_efl_ui_widget_on_focus_update(Eo *obj, Efl_Ui_Win_Data *sd) { - if (!efl_ui_widget_on_focus_update(efl_super(obj, MY_CLASS), NULL)) + if (!efl_ui_widget_on_focus_update(efl_super(obj, MY_CLASS))) return EINA_TRUE; if (sd->img_obj) diff --git a/src/lib/elementary/elm_access.c b/src/lib/elementary/elm_access.c index 697b52d..14a1f41 100644 --- a/src/lib/elementary/elm_access.c +++ b/src/lib/elementary/elm_access.c @@ -149,7 +149,7 @@ _elm_access_efl_ui_widget_on_access_activate(Eo *obj, void *_pd EINA_UNUSED, Efl } EOLIAN static Eina_Bool -_elm_access_efl_ui_widget_on_focus_update(Eo *obj, void *_pd EINA_UNUSED, Elm_Object_Item *item EINA_UNUSED) +_elm_access_efl_ui_widget_on_focus_update(Eo *obj, void *_pd EINA_UNUSED) { evas_object_focus_set(obj, efl_ui_focus_object_focus_get(obj)); diff --git a/src/lib/elementary/elm_calendar.c b/src/lib/elementary/elm_calendar.c index 1a953a5..8491a7c 100644 --- a/src/lib/elementary/elm_calendar.c +++ b/src/lib/elementary/elm_calendar.c @@ -1883,11 +1883,11 @@ _key_action_move(Evas_Object *obj, const char *params) // EOLIAN static Eina_Bool -_elm_calendar_efl_ui_widget_on_focus_update(Eo *obj, Elm_Calendar_Data *sd, Elm_Object_Item *item EINA_UNUSED) +_elm_calendar_efl_ui_widget_on_focus_update(Eo *obj, Elm_Calendar_Data *sd) { Eina_Bool int_ret = EINA_FALSE; - int_ret = efl_ui_widget_on_focus_update(efl_super(obj, MY_CLASS), NULL); + int_ret = efl_ui_widget_on_focus_update(efl_super(obj, MY_CLASS)); if (!int_ret) return EINA_FALSE; if (efl_ui_focus_object_focus_get(obj)) diff --git a/src/lib/elementary/elm_diskselector.c b/src/lib/elementary/elm_diskselector.c index 29a553b..4fea694 100644 --- a/src/lib/elementary/elm_diskselector.c +++ b/src/lib/elementary/elm_diskselector.c @@ -897,12 +897,12 @@ _elm_diskselector_efl_ui_widget_widget_sub_object_del(Eo *obj, Elm_Diskselector_ } EOLIAN static Eina_Bool -_elm_diskselector_efl_ui_widget_on_focus_update(Eo *obj, Elm_Diskselector_Data *_pd EINA_UNUSED, Elm_Object_Item *item EINA_UNUSED) +_elm_diskselector_efl_ui_widget_on_focus_update(Eo *obj, Elm_Diskselector_Data *_pd EINA_UNUSED) { Eina_Bool int_ret = EINA_FALSE; ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE); - int_ret = efl_ui_widget_on_focus_update(efl_super(obj, MY_CLASS), NULL); + int_ret = efl_ui_widget_on_focus_update(efl_super(obj, MY_CLASS)); if (!int_ret) return EINA_FALSE; if (efl_ui_focus_object_focus_get(obj)) diff --git a/src/lib/elementary/elm_entry.c b/src/lib/elementary/elm_entry.c index 0d77bc5..a8a91cf 100644 --- a/src/lib/elementary/elm_entry.c +++ b/src/lib/elementary/elm_entry.c @@ -1826,7 +1826,7 @@ _elm_entry_focus_update(Eo *obj, Elm_Entry_Data *sd) } EOLIAN static Eina_Bool -_elm_entry_efl_ui_widget_on_focus_update(Eo *obj, Elm_Entry_Data *sd, Elm_Object_Item *item EINA_UNUSED) +_elm_entry_efl_ui_widget_on_focus_update(Eo *obj, Elm_Entry_Data *sd) { _elm_entry_focus_update(obj, sd); diff --git a/src/lib/elementary/elm_genlist.c b/src/lib/elementary/elm_genlist.c index a4ee189..092698d 100644 --- a/src/lib/elementary/elm_genlist.c +++ b/src/lib/elementary/elm_genlist.c @@ -3497,13 +3497,13 @@ _elm_genlist_nearest_visible_item_get(Evas_Object *obj, Elm_Object_Item *eo_it) } EOLIAN static Eina_Bool -_elm_genlist_efl_ui_widget_on_focus_update(Eo *obj, Elm_Genlist_Data *sd, Elm_Object_Item *item EINA_UNUSED) +_elm_genlist_efl_ui_widget_on_focus_update(Eo *obj, Elm_Genlist_Data *sd) { Eina_Bool int_ret = EINA_FALSE; Elm_Object_Item *eo_it = NULL; Eina_Bool is_sel = EINA_FALSE; - int_ret = efl_ui_widget_on_focus_update(efl_super(obj, MY_CLASS), NULL); + int_ret = efl_ui_widget_on_focus_update(efl_super(obj, MY_CLASS)); if (!int_ret) return EINA_FALSE; if (efl_ui_focus_object_focus_get(obj) && (sd->items) && (sd->selected) && diff --git a/src/lib/elementary/elm_glview.c b/src/lib/elementary/elm_glview.c index 96488ac..14318e8 100644 --- a/src/lib/elementary/elm_glview.c +++ b/src/lib/elementary/elm_glview.c @@ -27,12 +27,12 @@ static const Evas_Smart_Cb_Description _smart_callbacks[] = { }; EOLIAN static Eina_Bool -_elm_glview_efl_ui_widget_on_focus_update(Eo *obj, Elm_Glview_Data *_pd EINA_UNUSED, Elm_Object_Item *item EINA_UNUSED) +_elm_glview_efl_ui_widget_on_focus_update(Eo *obj, Elm_Glview_Data *_pd EINA_UNUSED) { ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE); Eina_Bool int_ret = EINA_FALSE; - int_ret = efl_ui_widget_on_focus_update(efl_super(obj, MY_CLASS), NULL); + int_ret = efl_ui_widget_on_focus_update(efl_super(obj, MY_CLASS)); if (!int_ret) return EINA_FALSE; if (efl_ui_focus_object_focus_get(obj)) diff --git a/src/lib/elementary/elm_list.c b/src/lib/elementary/elm_list.c index 8ca4326..8a006ae 100644 --- a/src/lib/elementary/elm_list.c +++ b/src/lib/elementary/elm_list.c @@ -1248,13 +1248,13 @@ _elm_list_nearest_visible_item_get(Evas_Object *obj, Elm_List_Item_Data *it) } EOLIAN static Eina_Bool -_elm_list_efl_ui_widget_on_focus_update(Eo *obj, Elm_List_Data *sd, Elm_Object_Item *item EINA_UNUSED) +_elm_list_efl_ui_widget_on_focus_update(Eo *obj, Elm_List_Data *sd) { Eina_Bool int_ret = EINA_FALSE; Elm_Object_Item *eo_it = NULL; Eina_Bool is_sel = EINA_FALSE; - int_ret = efl_ui_widget_on_focus_update(efl_super(obj, MY_CLASS), NULL); + int_ret = efl_ui_widget_on_focus_update(efl_super(obj, MY_CLASS)); if (!int_ret) return EINA_FALSE; if (elm_object_focus_get(obj) && sd->selected && !sd->last_selected_item) diff --git a/src/lib/elementary/elm_map.c b/src/lib/elementary/elm_map.c index cf16ed6..019a8dd 100644 --- a/src/lib/elementary/elm_map.c +++ b/src/lib/elementary/elm_map.c @@ -3945,12 +3945,12 @@ _elm_map_pan_efl_gfx_position_set(Eo *obj, Elm_Map_Pan_Data *_pd EINA_UNUSED, Ei } EOLIAN static Eina_Bool -_elm_map_efl_ui_widget_on_focus_update(Eo *obj, Elm_Map_Data *_pd EINA_UNUSED, Elm_Object_Item *item EINA_UNUSED) +_elm_map_efl_ui_widget_on_focus_update(Eo *obj, Elm_Map_Data *_pd EINA_UNUSED) { ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE); Eina_Bool int_ret = EINA_FALSE; - int_ret = efl_ui_widget_on_focus_update(efl_super(obj, MY_CLASS), NULL); + int_ret = efl_ui_widget_on_focus_update(efl_super(obj, MY_CLASS)); if (!int_ret) return EINA_FALSE; if (efl_ui_focus_object_focus_get(obj)) diff --git a/src/lib/elementary/elm_plug.c b/src/lib/elementary/elm_plug.c index abf7f5c..4e38b52 100644 --- a/src/lib/elementary/elm_plug.c +++ b/src/lib/elementary/elm_plug.c @@ -59,13 +59,13 @@ _elm_plug_resized(Ecore_Evas *ee) } EOLIAN static Eina_Bool -_elm_plug_efl_ui_widget_on_focus_update(Eo *obj, void *sd EINA_UNUSED, Elm_Object_Item *item EINA_UNUSED) +_elm_plug_efl_ui_widget_on_focus_update(Eo *obj, void *sd EINA_UNUSED) { Eina_Bool int_ret = EINA_FALSE; ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE); - int_ret = efl_ui_widget_on_focus_update(efl_super(obj, MY_CLASS), NULL); + int_ret = efl_ui_widget_on_focus_update(efl_super(obj, MY_CLASS)); if (!int_ret) return EINA_FALSE; if (efl_ui_focus_object_focus_get(obj)) diff --git a/src/lib/elementary/elm_spinner.c b/src/lib/elementary/elm_spinner.c index a883af0..8739e38 100644 --- a/src/lib/elementary/elm_spinner.c +++ b/src/lib/elementary/elm_spinner.c @@ -1037,11 +1037,11 @@ _elm_spinner_elm_layout_sizing_eval(Eo *obj, Elm_Spinner_Data *_pd EINA_UNUSED) } EOLIAN static Eina_Bool -_elm_spinner_efl_ui_widget_on_focus_update(Eo *obj, Elm_Spinner_Data *sd, Elm_Object_Item *item EINA_UNUSED) +_elm_spinner_efl_ui_widget_on_focus_update(Eo *obj, Elm_Spinner_Data *sd) { Eina_Bool int_ret = EINA_FALSE; - int_ret = efl_ui_widget_on_focus_update(efl_super(obj, MY_CLASS), NULL); + int_ret = efl_ui_widget_on_focus_update(efl_super(obj, MY_CLASS)); if (!int_ret) return EINA_FALSE; if (!efl_ui_focus_object_focus_get(obj)) diff --git a/src/lib/elementary/elm_toolbar.c b/src/lib/elementary/elm_toolbar.c index 8019b08..b7fe096 100644 --- a/src/lib/elementary/elm_toolbar.c +++ b/src/lib/elementary/elm_toolbar.c @@ -788,13 +788,13 @@ _elm_toolbar_nearest_visible_item_get(Evas_Object *obj, Elm_Object_Item *eo_it) } EOLIAN static Eina_Bool -_elm_toolbar_efl_ui_widget_on_focus_update(Eo *obj, Elm_Toolbar_Data *sd, Elm_Object_Item *item EINA_UNUSED) +_elm_toolbar_efl_ui_widget_on_focus_update(Eo *obj, Elm_Toolbar_Data *sd) { ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE); Eina_Bool int_ret = EINA_FALSE; Elm_Object_Item *eo_it = NULL; - int_ret = efl_ui_widget_on_focus_update(efl_super(obj, MY_CLASS), NULL); + int_ret = efl_ui_widget_on_focus_update(efl_super(obj, MY_CLASS)); if (!int_ret) return EINA_FALSE; if (!sd->items) return EINA_FALSE; -- 2.7.4