From 069747b9def73436fc253729f1203038754e7fbd Mon Sep 17 00:00:00 2001 From: Jean-Philippe Andre Date: Thu, 10 Aug 2017 15:41:25 +0900 Subject: [PATCH] widget: Add eo event info inside widget_event This is an internal function that should probably become an overridable protected method, as it's required for proper event handling in widgets. Next step: use eo_event_info in the widgets implementations. Then remove legacy event struct. Ref T5363 --- src/lib/elementary/efl_ui_button.c | 2 +- src/lib/elementary/efl_ui_check.c | 2 +- src/lib/elementary/efl_ui_image.c | 2 +- src/lib/elementary/efl_ui_image_zoomable.c | 2 +- src/lib/elementary/efl_ui_nstate.c | 2 +- src/lib/elementary/efl_ui_radio.c | 2 +- src/lib/elementary/efl_ui_slider.c | 2 +- src/lib/elementary/efl_ui_video.c | 2 +- src/lib/elementary/efl_ui_win.c | 2 +- src/lib/elementary/elc_combobox.c | 5 +++-- src/lib/elementary/elc_ctxpopup.c | 2 +- src/lib/elementary/elc_fileselector.c | 2 +- src/lib/elementary/elc_hoversel.c | 4 ++-- src/lib/elementary/elc_multibuttonentry.c | 2 +- src/lib/elementary/elc_naviframe.c | 2 +- src/lib/elementary/elc_player.c | 2 +- src/lib/elementary/elc_popup.c | 2 +- src/lib/elementary/elm_calendar.c | 2 +- src/lib/elementary/elm_code_widget.c | 4 ++-- src/lib/elementary/elm_colorselector.c | 2 +- src/lib/elementary/elm_diskselector.c | 2 +- src/lib/elementary/elm_flipselector.c | 2 +- src/lib/elementary/elm_gengrid.c | 2 +- src/lib/elementary/elm_genlist.c | 2 +- src/lib/elementary/elm_list.c | 2 +- src/lib/elementary/elm_map.c | 2 +- src/lib/elementary/elm_panel.c | 2 +- src/lib/elementary/elm_scroller.c | 2 +- src/lib/elementary/elm_slideshow.c | 2 +- src/lib/elementary/elm_spinner.c | 2 +- src/lib/elementary/elm_toolbar.c | 2 +- src/lib/elementary/elm_widget.c | 12 +++++++----- src/lib/elementary/elm_widget.eo | 3 ++- src/lib/elementary/elm_widget.h | 1 - 34 files changed, 44 insertions(+), 41 deletions(-) diff --git a/src/lib/elementary/efl_ui_button.c b/src/lib/elementary/efl_ui_button.c index 01b978e..1610abb 100644 --- a/src/lib/elementary/efl_ui_button.c +++ b/src/lib/elementary/efl_ui_button.c @@ -173,7 +173,7 @@ _key_action_activate(Evas_Object *obj, const char *params EINA_UNUSED) } EOLIAN static Eina_Bool -_efl_ui_button_elm_widget_widget_event(Eo *obj, Efl_Ui_Button_Data *_pd EINA_UNUSED, Evas_Object *src, Evas_Callback_Type type, void *event_info) +_efl_ui_button_elm_widget_widget_event(Eo *obj, Efl_Ui_Button_Data *_pd EINA_UNUSED, const Efl_Event *eo_event EINA_UNUSED, Evas_Object *src EINA_UNUSED, Evas_Callback_Type type, void *event_info) { (void) src; Evas_Event_Key_Down *ev = event_info; diff --git a/src/lib/elementary/efl_ui_check.c b/src/lib/elementary/efl_ui_check.c index 15d0252..3efd3fd 100644 --- a/src/lib/elementary/efl_ui_check.c +++ b/src/lib/elementary/efl_ui_check.c @@ -150,7 +150,7 @@ _key_action_activate(Evas_Object *obj, const char *params EINA_UNUSED) } EOLIAN static Eina_Bool -_efl_ui_check_elm_widget_widget_event(Eo *obj, Efl_Ui_Check_Data *_pd EINA_UNUSED, Evas_Object *src, Evas_Callback_Type type, void *event_info) +_efl_ui_check_elm_widget_widget_event(Eo *obj, Efl_Ui_Check_Data *_pd EINA_UNUSED, const Efl_Event *eo_event EINA_UNUSED, Evas_Object *src, Evas_Callback_Type type, void *event_info) { (void) src; Evas_Event_Key_Down *ev = event_info; diff --git a/src/lib/elementary/efl_ui_image.c b/src/lib/elementary/efl_ui_image.c index 8f971fb..16d58eb 100644 --- a/src/lib/elementary/efl_ui_image.c +++ b/src/lib/elementary/efl_ui_image.c @@ -729,7 +729,7 @@ _key_action_activate(Evas_Object *obj, const char *params EINA_UNUSED) } EOLIAN static Eina_Bool -_efl_ui_image_elm_widget_widget_event(Eo *obj, Efl_Ui_Image_Data *_pd EINA_UNUSED, Evas_Object *src, Evas_Callback_Type type, void *event_info) +_efl_ui_image_elm_widget_widget_event(Eo *obj, Efl_Ui_Image_Data *_pd EINA_UNUSED, const Efl_Event *eo_event EINA_UNUSED, Evas_Object *src, Evas_Callback_Type type, void *event_info) { (void) src; Evas_Event_Key_Down *ev = event_info; diff --git a/src/lib/elementary/efl_ui_image_zoomable.c b/src/lib/elementary/efl_ui_image_zoomable.c index e01fbd2..25dc146 100644 --- a/src/lib/elementary/efl_ui_image_zoomable.c +++ b/src/lib/elementary/efl_ui_image_zoomable.c @@ -1034,7 +1034,7 @@ _key_action_zoom(Evas_Object *obj, const char *params) } EOLIAN static Eina_Bool -_efl_ui_image_zoomable_elm_widget_widget_event(Eo *obj, Efl_Ui_Image_Zoomable_Data *_pd EINA_UNUSED, Evas_Object *src, Evas_Callback_Type type, void *event_info) +_efl_ui_image_zoomable_elm_widget_widget_event(Eo *obj, Efl_Ui_Image_Zoomable_Data *_pd EINA_UNUSED, const Efl_Event *eo_event EINA_UNUSED, Evas_Object *src, Evas_Callback_Type type, void *event_info) { (void) src; Evas_Event_Key_Down *ev = event_info; diff --git a/src/lib/elementary/efl_ui_nstate.c b/src/lib/elementary/efl_ui_nstate.c index 8fe122e..404d237 100644 --- a/src/lib/elementary/efl_ui_nstate.c +++ b/src/lib/elementary/efl_ui_nstate.c @@ -159,7 +159,7 @@ _key_action_activate(Evas_Object *obj, const char *params EINA_UNUSED) } EOLIAN static Eina_Bool -_efl_ui_nstate_elm_widget_widget_event(Eo *obj, Efl_Ui_Nstate_Data *_pd EINA_UNUSED, Evas_Object *src EINA_UNUSED, Evas_Callback_Type type, void *event_info) +_efl_ui_nstate_elm_widget_widget_event(Eo *obj, Efl_Ui_Nstate_Data *_pd EINA_UNUSED, const Efl_Event *eo_event EINA_UNUSED, Evas_Object *src EINA_UNUSED, Evas_Callback_Type type, void *event_info) { Evas_Event_Key_Down *ev = event_info; diff --git a/src/lib/elementary/efl_ui_radio.c b/src/lib/elementary/efl_ui_radio.c index ef5d4af..9206374 100644 --- a/src/lib/elementary/efl_ui_radio.c +++ b/src/lib/elementary/efl_ui_radio.c @@ -131,7 +131,7 @@ _key_action_activate(Evas_Object *obj, const char *params EINA_UNUSED) } EOLIAN static Eina_Bool -_efl_ui_radio_elm_widget_widget_event(Eo *obj, Efl_Ui_Radio_Data *_pd EINA_UNUSED, Evas_Object *src, Evas_Callback_Type type, void *event_info) +_efl_ui_radio_elm_widget_widget_event(Eo *obj, Efl_Ui_Radio_Data *_pd EINA_UNUSED, const Efl_Event *eo_event EINA_UNUSED, Evas_Object *src, Evas_Callback_Type type, void *event_info) { (void) src; Evas_Event_Key_Down *ev = event_info; diff --git a/src/lib/elementary/efl_ui_slider.c b/src/lib/elementary/efl_ui_slider.c index 95ddded..d6e7814 100644 --- a/src/lib/elementary/efl_ui_slider.c +++ b/src/lib/elementary/efl_ui_slider.c @@ -564,7 +564,7 @@ _wheel_indicator_timer_cb(void *data) } EOLIAN static Eina_Bool -_efl_ui_slider_elm_widget_widget_event(Eo *obj, Efl_Ui_Slider_Data *sd EINA_UNUSED, Evas_Object *src, Evas_Callback_Type type, void *event_info) +_efl_ui_slider_elm_widget_widget_event(Eo *obj, Efl_Ui_Slider_Data *sd EINA_UNUSED, const Efl_Event *eo_event EINA_UNUSED, Evas_Object *src, Evas_Callback_Type type, void *event_info) { (void) src; diff --git a/src/lib/elementary/efl_ui_video.c b/src/lib/elementary/efl_ui_video.c index fc71e24..0e5144b 100644 --- a/src/lib/elementary/efl_ui_video.c +++ b/src/lib/elementary/efl_ui_video.c @@ -108,7 +108,7 @@ _key_action_play(Evas_Object *obj, const char *params EINA_UNUSED) } EOLIAN static Eina_Bool -_efl_ui_video_elm_widget_widget_event(Eo *obj, Efl_Ui_Video_Data *_pd EINA_UNUSED, Evas_Object *src, Evas_Callback_Type type, void *event_info) +_efl_ui_video_elm_widget_widget_event(Eo *obj, Efl_Ui_Video_Data *_pd EINA_UNUSED, const Efl_Event *eo_event EINA_UNUSED, Evas_Object *src, Evas_Callback_Type type, void *event_info) { (void) src; Evas_Event_Key_Down *ev = event_info; diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c index aaa762e..7b5c4d1 100644 --- a/src/lib/elementary/efl_ui_win.c +++ b/src/lib/elementary/efl_ui_win.c @@ -1767,7 +1767,7 @@ _key_action_move(Evas_Object *obj, const char *params) } EOLIAN static Eina_Bool -_efl_ui_win_elm_widget_widget_event(Eo *obj, Efl_Ui_Win_Data *_pd EINA_UNUSED, Evas_Object *src EINA_UNUSED, Evas_Callback_Type type, void *event_info) +_efl_ui_win_elm_widget_widget_event(Eo *obj, Efl_Ui_Win_Data *_pd EINA_UNUSED, const Efl_Event *eo_event EINA_UNUSED, Evas_Object *src EINA_UNUSED, Evas_Callback_Type type, void *event_info) { Evas_Event_Key_Down *ev = event_info; diff --git a/src/lib/elementary/elc_combobox.c b/src/lib/elementary/elc_combobox.c index c8c0d87..4480877 100644 --- a/src/lib/elementary/elc_combobox.c +++ b/src/lib/elementary/elc_combobox.c @@ -494,8 +494,9 @@ _key_action_activate(Evas_Object *obj, const char *params EINA_UNUSED) EOLIAN static Eina_Bool _elm_combobox_elm_widget_widget_event(Eo *obj, Elm_Combobox_Data *sd, - Evas_Object *src EINA_UNUSED, - Evas_Callback_Type type, void *event_info) + const Efl_Event *eo_event EINA_UNUSED, + Evas_Object *src EINA_UNUSED, + Evas_Callback_Type type, void *event_info) { Evas_Event_Key_Down *ev = event_info; if (!sd || !sd->hover) return EINA_FALSE; diff --git a/src/lib/elementary/elc_ctxpopup.c b/src/lib/elementary/elc_ctxpopup.c index 234a9be..1de6d08 100644 --- a/src/lib/elementary/elc_ctxpopup.c +++ b/src/lib/elementary/elc_ctxpopup.c @@ -146,7 +146,7 @@ _key_action_escape(Evas_Object *obj, const char *params EINA_UNUSED) } EOLIAN static Eina_Bool -_elm_ctxpopup_elm_widget_widget_event(Eo *obj, Elm_Ctxpopup_Data *sd EINA_UNUSED, Evas_Object *src, Evas_Callback_Type type, void *event_info) +_elm_ctxpopup_elm_widget_widget_event(Eo *obj, Elm_Ctxpopup_Data *sd EINA_UNUSED, const Efl_Event *eo_event EINA_UNUSED, Evas_Object *src, Evas_Callback_Type type, void *event_info) { Evas_Event_Key_Down *ev = event_info; (void)src; diff --git a/src/lib/elementary/elc_fileselector.c b/src/lib/elementary/elc_fileselector.c index efa644b..007c1b4 100644 --- a/src/lib/elementary/elc_fileselector.c +++ b/src/lib/elementary/elc_fileselector.c @@ -307,7 +307,7 @@ _key_action_backspace(Evas_Object *obj, const char *params EINA_UNUSED) } EOLIAN static Eina_Bool -_elm_fileselector_elm_widget_widget_event(Eo *obj, Elm_Fileselector_Data *sd EINA_UNUSED, Evas_Object *src, Evas_Callback_Type type, void *event_info) +_elm_fileselector_elm_widget_widget_event(Eo *obj, Elm_Fileselector_Data *sd EINA_UNUSED, const Efl_Event *eo_event EINA_UNUSED, Evas_Object *src, Evas_Callback_Type type, void *event_info) { Evas_Event_Key_Down *ev = event_info; (void) src; diff --git a/src/lib/elementary/elc_hoversel.c b/src/lib/elementary/elc_hoversel.c index 4ea9679..4b68eb5 100644 --- a/src/lib/elementary/elc_hoversel.c +++ b/src/lib/elementary/elc_hoversel.c @@ -995,13 +995,13 @@ _key_action_escape(Evas_Object *obj, const char *params EINA_UNUSED) } EOLIAN static Eina_Bool -_elm_hoversel_elm_widget_widget_event(Eo *obj, Elm_Hoversel_Data *sd, Evas_Object *src, Evas_Callback_Type type, void *event_info) +_elm_hoversel_elm_widget_widget_event(Eo *obj, Elm_Hoversel_Data *sd, const Efl_Event *eo_event, Evas_Object *src, Evas_Callback_Type type, void *event_info) { (void) src; Eina_Bool int_ret = EINA_FALSE; Evas_Event_Key_Down *ev = event_info; - int_ret = elm_obj_widget_event(efl_super(obj, MY_CLASS), src, type, event_info); + int_ret = elm_obj_widget_event(efl_super(obj, MY_CLASS), eo_event, src, type, event_info); if (int_ret) return EINA_FALSE; if (!sd || !sd->hover) return EINA_FALSE; diff --git a/src/lib/elementary/elc_multibuttonentry.c b/src/lib/elementary/elc_multibuttonentry.c index edcb604..34d37ca 100644 --- a/src/lib/elementary/elc_multibuttonentry.c +++ b/src/lib/elementary/elc_multibuttonentry.c @@ -971,7 +971,7 @@ _item_new(Elm_Multibuttonentry_Data *sd, //FIXME: having an empty event handling function and reacting on Evas //events on specific objects is crazy, someone should fix that. EOLIAN static Eina_Bool -_elm_multibuttonentry_elm_widget_widget_event(Eo *obj EINA_UNUSED, Elm_Multibuttonentry_Data *sd EINA_UNUSED, Evas_Object *src, Evas_Callback_Type type, void *ev) +_elm_multibuttonentry_elm_widget_widget_event(Eo *obj EINA_UNUSED, Elm_Multibuttonentry_Data *sd EINA_UNUSED, const Efl_Event *eo_event EINA_UNUSED, Evas_Object *src, Evas_Callback_Type type, void *ev) { (void)src; (void)type; diff --git a/src/lib/elementary/elc_naviframe.c b/src/lib/elementary/elc_naviframe.c index f057bb5..e633627 100644 --- a/src/lib/elementary/elc_naviframe.c +++ b/src/lib/elementary/elc_naviframe.c @@ -1570,7 +1570,7 @@ _key_action_item_pop(Evas_Object *obj, const char *params EINA_UNUSED) } EOLIAN static Eina_Bool -_elm_naviframe_elm_widget_widget_event(Eo *obj, Elm_Naviframe_Data *sd EINA_UNUSED, Evas_Object *src, Evas_Callback_Type type, void *event_info) +_elm_naviframe_elm_widget_widget_event(Eo *obj, Elm_Naviframe_Data *sd EINA_UNUSED, const Efl_Event *eo_event EINA_UNUSED, Evas_Object *src, Evas_Callback_Type type, void *event_info) { (void)src; Evas_Event_Key_Down *ev = event_info; diff --git a/src/lib/elementary/elc_player.c b/src/lib/elementary/elc_player.c index d5f621c..d29e6b6 100644 --- a/src/lib/elementary/elc_player.c +++ b/src/lib/elementary/elc_player.c @@ -145,7 +145,7 @@ _key_action_play(Evas_Object *obj, const char *params EINA_UNUSED) } EOLIAN static Eina_Bool -_elm_player_elm_widget_widget_event(Eo *obj, Elm_Player_Data *sd, Evas_Object *src, Evas_Callback_Type type, void *event_info) +_elm_player_elm_widget_widget_event(Eo *obj, Elm_Player_Data *sd, const Efl_Event *eo_event EINA_UNUSED, Evas_Object *src, Evas_Callback_Type type, void *event_info) { Evas_Event_Key_Down *ev = event_info; (void) src; diff --git a/src/lib/elementary/elc_popup.c b/src/lib/elementary/elc_popup.c index fd86b93..f386c6c 100644 --- a/src/lib/elementary/elc_popup.c +++ b/src/lib/elementary/elc_popup.c @@ -1505,7 +1505,7 @@ _key_action_escape(Evas_Object *obj, const char *params EINA_UNUSED) } EOLIAN static Eina_Bool -_elm_popup_elm_widget_widget_event(Eo *obj, Elm_Popup_Data *_pd EINA_UNUSED, Evas_Object *src, Evas_Callback_Type type, void *event_info) +_elm_popup_elm_widget_widget_event(Eo *obj, Elm_Popup_Data *_pd EINA_UNUSED, const Efl_Event *eo_event EINA_UNUSED, Evas_Object *src, Evas_Callback_Type type, void *event_info) { (void)src; Evas_Event_Key_Down *ev = event_info; diff --git a/src/lib/elementary/elm_calendar.c b/src/lib/elementary/elm_calendar.c index f75e182..9650dfa 100644 --- a/src/lib/elementary/elm_calendar.c +++ b/src/lib/elementary/elm_calendar.c @@ -1656,7 +1656,7 @@ _elm_calendar_elm_widget_on_focus(Eo *obj, Elm_Calendar_Data *sd, Elm_Object_Ite } EOLIAN static Eina_Bool -_elm_calendar_elm_widget_widget_event(Eo *obj, Elm_Calendar_Data *sd EINA_UNUSED, Evas_Object *src, Evas_Callback_Type type, void *event_info) +_elm_calendar_elm_widget_widget_event(Eo *obj, Elm_Calendar_Data *sd EINA_UNUSED, const Efl_Event *eo_event EINA_UNUSED, Evas_Object *src, Evas_Callback_Type type, void *event_info) { (void) src; Evas_Event_Key_Down *ev = event_info; diff --git a/src/lib/elementary/elm_code_widget.c b/src/lib/elementary/elm_code_widget.c index 2529321..a2b4b4c 100644 --- a/src/lib/elementary/elm_code_widget.c +++ b/src/lib/elementary/elm_code_widget.c @@ -1734,8 +1734,8 @@ _elm_code_widget_scroll_event_cb(void *data, Evas_Object *obj EINA_UNUSED, } EOLIAN static Eina_Bool -_elm_code_widget_elm_widget_widget_event(Eo *obj EINA_UNUSED, Elm_Code_Widget_Data *pd EINA_UNUSED, - Evas_Object *src EINA_UNUSED, Evas_Callback_Type type, void *event_info) +_elm_code_widget_elm_widget_widget_event(Eo *obj EINA_UNUSED, Elm_Code_Widget_Data *pd EINA_UNUSED, const Efl_Event *eo_event EINA_UNUSED, + Evas_Object *src EINA_UNUSED, Evas_Callback_Type type, void *event_info) { Evas_Event_Key_Down *ev = event_info; diff --git a/src/lib/elementary/elm_colorselector.c b/src/lib/elementary/elm_colorselector.c index 1cce002..f228b18 100644 --- a/src/lib/elementary/elm_colorselector.c +++ b/src/lib/elementary/elm_colorselector.c @@ -2164,7 +2164,7 @@ _key_action_activate(Evas_Object *obj, const char *params EINA_UNUSED) } EOLIAN static Eina_Bool -_elm_colorselector_elm_widget_widget_event(Eo *obj, Elm_Colorselector_Data *sd, Evas_Object *src, Evas_Callback_Type type, void *event_info) +_elm_colorselector_elm_widget_widget_event(Eo *obj, Elm_Colorselector_Data *sd, const Efl_Event *eo_event EINA_UNUSED, Evas_Object *src, Evas_Callback_Type type, void *event_info) { Evas_Event_Key_Down *ev = event_info; (void) src; diff --git a/src/lib/elementary/elm_diskselector.c b/src/lib/elementary/elm_diskselector.c index e243196..630791b 100644 --- a/src/lib/elementary/elm_diskselector.c +++ b/src/lib/elementary/elm_diskselector.c @@ -997,7 +997,7 @@ _key_action_move(Evas_Object *obj, const char *params) } EOLIAN static Eina_Bool -_elm_diskselector_elm_widget_widget_event(Eo *obj, Elm_Diskselector_Data *sd, Evas_Object *src, Evas_Callback_Type type, void *event_info) +_elm_diskselector_elm_widget_widget_event(Eo *obj, Elm_Diskselector_Data *sd, const Efl_Event *eo_event EINA_UNUSED, Evas_Object *src, Evas_Callback_Type type, void *event_info) { Evas_Event_Key_Down *ev = event_info; diff --git a/src/lib/elementary/elm_flipselector.c b/src/lib/elementary/elm_flipselector.c index 4176ce9..c7c578b 100644 --- a/src/lib/elementary/elm_flipselector.c +++ b/src/lib/elementary/elm_flipselector.c @@ -530,7 +530,7 @@ _elm_flipselector_efl_ui_spin_value_set(Eo *obj EINA_UNUSED, Elm_Flipselector_Da } EOLIAN static Eina_Bool -_elm_flipselector_elm_widget_widget_event(Eo *obj EINA_UNUSED, Elm_Flipselector_Data *sd EINA_UNUSED, Evas_Object *src, Evas_Callback_Type type, void *event_info) +_elm_flipselector_elm_widget_widget_event(Eo *obj EINA_UNUSED, Elm_Flipselector_Data *sd EINA_UNUSED, const Efl_Event *eo_event EINA_UNUSED, Evas_Object *src, Evas_Callback_Type type, void *event_info) { Evas_Event_Key_Down *ev = event_info; (void) src; diff --git a/src/lib/elementary/elm_gengrid.c b/src/lib/elementary/elm_gengrid.c index 15ff805..bd91470 100644 --- a/src/lib/elementary/elm_gengrid.c +++ b/src/lib/elementary/elm_gengrid.c @@ -3415,7 +3415,7 @@ _key_action_escape(Evas_Object *obj, const char *params EINA_UNUSED) } EOLIAN static Eina_Bool -_elm_gengrid_elm_widget_widget_event(Eo *obj, Elm_Gengrid_Data *sd, Evas_Object *src, Evas_Callback_Type type, void *event_info) +_elm_gengrid_elm_widget_widget_event(Eo *obj, Elm_Gengrid_Data *sd, const Efl_Event *eo_event EINA_UNUSED, Evas_Object *src, Evas_Callback_Type type, void *event_info) { Evas_Event_Key_Down *ev = event_info; (void) src; diff --git a/src/lib/elementary/elm_genlist.c b/src/lib/elementary/elm_genlist.c index 140ff61..04976ca 100644 --- a/src/lib/elementary/elm_genlist.c +++ b/src/lib/elementary/elm_genlist.c @@ -3194,7 +3194,7 @@ _key_action_escape(Evas_Object *obj, const char *params EINA_UNUSED) } EOLIAN static Eina_Bool -_elm_genlist_elm_widget_widget_event(Eo *obj, Elm_Genlist_Data *sd, Evas_Object *src, Evas_Callback_Type type, void *event_info) +_elm_genlist_elm_widget_widget_event(Eo *obj, Elm_Genlist_Data *sd, const Efl_Event *eo_event EINA_UNUSED, Evas_Object *src, Evas_Callback_Type type, void *event_info) { (void) src; Evas_Event_Key_Down *ev = event_info; diff --git a/src/lib/elementary/elm_list.c b/src/lib/elementary/elm_list.c index d71ac4f..ce816d2 100644 --- a/src/lib/elementary/elm_list.c +++ b/src/lib/elementary/elm_list.c @@ -629,7 +629,7 @@ static Eina_Bool _key_action_escape(Evas_Object *obj, const char *params EINA_UN } EOLIAN static Eina_Bool -_elm_list_elm_widget_widget_event(Eo *obj, Elm_List_Data *sd, Evas_Object *src, Evas_Callback_Type type, void *event_info) +_elm_list_elm_widget_widget_event(Eo *obj, Elm_List_Data *sd, const Efl_Event *eo_event EINA_UNUSED, Evas_Object *src, Evas_Callback_Type type, void *event_info) { (void) src; Evas_Event_Key_Down *ev = event_info; diff --git a/src/lib/elementary/elm_map.c b/src/lib/elementary/elm_map.c index 03dd0e0..6ce05ac 100644 --- a/src/lib/elementary/elm_map.c +++ b/src/lib/elementary/elm_map.c @@ -4069,7 +4069,7 @@ _key_action_zoom(Evas_Object *obj, const char *params) } EOLIAN static Eina_Bool -_elm_map_elm_widget_widget_event(Eo *obj, Elm_Map_Data *sd EINA_UNUSED, Evas_Object *src, Evas_Callback_Type type, void *event_info) +_elm_map_elm_widget_widget_event(Eo *obj, Elm_Map_Data *sd EINA_UNUSED, const Efl_Event *eo_event EINA_UNUSED, Evas_Object *src, Evas_Callback_Type type, void *event_info) { (void) src; Evas_Event_Key_Down *ev = event_info; diff --git a/src/lib/elementary/elm_panel.c b/src/lib/elementary/elm_panel.c index 5c6ee59..c1a4915 100644 --- a/src/lib/elementary/elm_panel.c +++ b/src/lib/elementary/elm_panel.c @@ -758,7 +758,7 @@ _key_action_toggle(Evas_Object *obj, const char *params EINA_UNUSED) } EOLIAN static Eina_Bool -_elm_panel_elm_widget_widget_event(Eo *obj, Elm_Panel_Data *_pd EINA_UNUSED, Evas_Object *src, Evas_Callback_Type type, void *event_info) +_elm_panel_elm_widget_widget_event(Eo *obj, Elm_Panel_Data *_pd EINA_UNUSED, const Efl_Event *eo_event EINA_UNUSED, Evas_Object *src, Evas_Callback_Type type, void *event_info) { Evas_Event_Key_Down *ev = event_info; if (type != EVAS_CALLBACK_KEY_DOWN) return EINA_FALSE; diff --git a/src/lib/elementary/elm_scroller.c b/src/lib/elementary/elm_scroller.c index 417d84e..752fa36 100644 --- a/src/lib/elementary/elm_scroller.c +++ b/src/lib/elementary/elm_scroller.c @@ -262,7 +262,7 @@ _key_action_move(Evas_Object *obj, const char *params) } EOLIAN static Eina_Bool -_elm_scroller_elm_widget_widget_event(Eo *obj, Elm_Scroller_Data *sd EINA_UNUSED, Evas_Object *src, Evas_Callback_Type type, void *event_info) +_elm_scroller_elm_widget_widget_event(Eo *obj, Elm_Scroller_Data *sd EINA_UNUSED, const Efl_Event *eo_event EINA_UNUSED, Evas_Object *src, Evas_Callback_Type type, void *event_info) { (void) src; Evas_Event_Key_Down *ev = event_info; diff --git a/src/lib/elementary/elm_slideshow.c b/src/lib/elementary/elm_slideshow.c index dd1bb75..e135a9f 100644 --- a/src/lib/elementary/elm_slideshow.c +++ b/src/lib/elementary/elm_slideshow.c @@ -75,7 +75,7 @@ _key_action_pause(Evas_Object *obj, const char *params EINA_UNUSED) } EOLIAN static Eina_Bool -_elm_slideshow_elm_widget_widget_event(Eo *obj, Elm_Slideshow_Data *sd EINA_UNUSED, Evas_Object *src, Evas_Callback_Type type, void *event_info) +_elm_slideshow_elm_widget_widget_event(Eo *obj, Elm_Slideshow_Data *sd EINA_UNUSED, const Efl_Event *eo_event EINA_UNUSED, Evas_Object *src, Evas_Callback_Type type, void *event_info) { Evas_Event_Key_Down *ev = event_info; (void) src; diff --git a/src/lib/elementary/elm_spinner.c b/src/lib/elementary/elm_spinner.c index fa19961..6b817e3 100644 --- a/src/lib/elementary/elm_spinner.c +++ b/src/lib/elementary/elm_spinner.c @@ -727,7 +727,7 @@ _key_action_toggle(Evas_Object *obj, const char *params EINA_UNUSED) } EOLIAN static Eina_Bool -_elm_spinner_elm_widget_widget_event(Eo *obj, Elm_Spinner_Data *sd EINA_UNUSED, Evas_Object *src EINA_UNUSED, Evas_Callback_Type type, void *event_info) +_elm_spinner_elm_widget_widget_event(Eo *obj, Elm_Spinner_Data *sd EINA_UNUSED, const Efl_Event *eo_event EINA_UNUSED, Evas_Object *src EINA_UNUSED, Evas_Callback_Type type, void *event_info) { Evas_Event_Key_Down *ev = event_info; Evas_Event_Mouse_Wheel *mev = event_info; diff --git a/src/lib/elementary/elm_toolbar.c b/src/lib/elementary/elm_toolbar.c index ef75fc1..64094d9 100644 --- a/src/lib/elementary/elm_toolbar.c +++ b/src/lib/elementary/elm_toolbar.c @@ -905,7 +905,7 @@ _key_action_select(Evas_Object *obj, const char *params EINA_UNUSED) } EOLIAN static Eina_Bool -_elm_toolbar_elm_widget_widget_event(Eo *obj, Elm_Toolbar_Data *sd, Evas_Object *src, Evas_Callback_Type type, void *event_info) +_elm_toolbar_elm_widget_widget_event(Eo *obj, Elm_Toolbar_Data *sd, const Efl_Event *eo_event EINA_UNUSED, Evas_Object *src, Evas_Callback_Type type, void *event_info) { (void) src; (void) type; diff --git a/src/lib/elementary/elm_widget.c b/src/lib/elementary/elm_widget.c index 0eead3f..511ef8c 100644 --- a/src/lib/elementary/elm_widget.c +++ b/src/lib/elementary/elm_widget.c @@ -111,6 +111,7 @@ static void _on_sub_obj_hide(void *data, const Efl_Event *event); static void _propagate_event(void *data, const Efl_Event *event); +static Eina_Bool elm_widget_event_propagate(Evas_Object *obj, const Efl_Event *eo_event, Evas_Callback_Type type, void *event_info, Evas_Event_Flags *event_flags); EFL_CALLBACKS_ARRAY_DEFINE(elm_widget_subitems_callbacks, { EFL_EVENT_DEL, _on_sub_obj_del }, @@ -1026,7 +1027,7 @@ _propagate_event(void *data EINA_UNUSED, const Efl_Event *event) return; prev_flags = *event_flags; - elm_widget_event_propagate(obj, type, event_info.any, event_flags); + elm_widget_event_propagate(obj, event, type, event_info.any, event_flags); if (prev_flags != *event_flags) efl_input_event_flags_set(event->info, *event_flags); } @@ -2001,8 +2002,9 @@ elm_widget_event_callback_del(Eo *obj, Elm_Event_Cb func, const void *data) return NULL; } -EAPI Eina_Bool -elm_widget_event_propagate(Eo *obj, Evas_Callback_Type type, void *event_info, +static Eina_Bool +elm_widget_event_propagate(Eo *obj, const Efl_Event *eo_event, + Evas_Callback_Type type, void *event_info, Evas_Event_Flags *event_flags) { Evas_Object *parent = obj; @@ -2023,7 +2025,7 @@ elm_widget_event_propagate(Eo *obj, Evas_Callback_Type type, void *event_info, continue; } - int_ret = elm_obj_widget_event(parent, obj, type, event_info); + int_ret = elm_obj_widget_event(parent, eo_event, obj, type, event_info); if (int_ret) return EINA_TRUE; EINA_LIST_FOREACH_SAFE(sd->event_cb, l, l_prev, ecd) @@ -6208,7 +6210,7 @@ _elm_widget_disable(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *_pd EINA_UNUSED) } EOLIAN static Eina_Bool -_elm_widget_widget_event(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *_pd EINA_UNUSED, Evas_Object *source EINA_UNUSED, Evas_Callback_Type type EINA_UNUSED, void *event_info EINA_UNUSED) +_elm_widget_widget_event(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *_pd EINA_UNUSED, const Efl_Event *eo_event EINA_UNUSED, Evas_Object *source EINA_UNUSED, Evas_Callback_Type type EINA_UNUSED, void *event_info EINA_UNUSED) { return EINA_FALSE; } diff --git a/src/lib/elementary/elm_widget.eo b/src/lib/elementary/elm_widget.eo index e1dee74..f2428c4 100644 --- a/src/lib/elementary/elm_widget.eo +++ b/src/lib/elementary/elm_widget.eo @@ -497,13 +497,14 @@ abstract Elm.Widget (Efl.Canvas.Group, Elm.Interface.Atspi_Accessible, } widget_event { [['Virtual' function handling input events on the widget.]] - legacy: elm_widget_event; params { + @in eo_event: const(ptr(Efl.Event)); [[EO event info with an Efl.Input.Event]] @in source: Efl.Canvas.Object; [[Source object]] @in type: Evas.Callback_Type; [[Callback type]] @in event_info: void_ptr; [[Event info]] } return: bool; [[$true on success, $false otherwise]] + legacy: null; } access { [['Virtual' function on the widget being set access.]] diff --git a/src/lib/elementary/elm_widget.h b/src/lib/elementary/elm_widget.h index 9fc2cbe..f29f505 100644 --- a/src/lib/elementary/elm_widget.h +++ b/src/lib/elementary/elm_widget.h @@ -671,7 +671,6 @@ EAPI Eina_Bool elm_widget_is(const Evas_Object *obj); EAPI Evas_Object *elm_widget_parent_widget_get(const Evas_Object *obj); EAPI void elm_widget_event_callback_add(Evas_Object *obj, Elm_Event_Cb func, const void *data); EAPI void *elm_widget_event_callback_del(Evas_Object *obj, Elm_Event_Cb func, const void *data); -EAPI Eina_Bool elm_widget_event_propagate(Evas_Object *obj, Evas_Callback_Type type, void *event_info, Evas_Event_Flags *event_flags); EAPI void elm_widget_focus_custom_chain_set(Evas_Object *obj, Eina_List *objs); EAPI void elm_widget_focus_custom_chain_unset(Evas_Object *obj); EAPI const Eina_List *elm_widget_focus_custom_chain_get(const Evas_Object *obj); -- 2.7.4