forked from enlightenment/efl
elementary: do not emit new events in legacy
Summary: This commits prepares the tree in order to mess with the events in the Efl.Ui.Clickable event. Events which have been emitted in a none legacy widget, are now emitted either with evas, when the widget is legacy due to inheritance. Or via the normal event and normal event functions. In case the widget is a legacy only widget (not used at all in the new api), then the events are for now emitted with evas_object_smart_callback_call. Cases where event handlers have been added to legacy widgets, smart events are now used, and not the eo one anymore. ref T7844 Depends on D8813 Reviewers: cedric, zmike, segfaultxavi Reviewed By: zmike Subscribers: #reviewers, #committers Tags: #efl Maniphest Tasks: T7844 Differential Revision: https://phab.enlightenment.org/D8816
This commit is contained in:
parent
d29edceade
commit
41e1dadbf1
|
@ -71,8 +71,12 @@ _activate(Evas_Object *obj)
|
|||
_elm_access_say(E_("Clicked"));
|
||||
if (!elm_widget_disabled_get(obj) &&
|
||||
!evas_object_freeze_events_get(obj))
|
||||
efl_event_callback_legacy_call
|
||||
(obj, EFL_UI_EVENT_CLICKED, NULL);
|
||||
{
|
||||
if (elm_widget_is_legacy(obj))
|
||||
evas_object_smart_callback_call(obj, "clicked", NULL);
|
||||
else
|
||||
efl_event_callback_call(obj, EFL_UI_EVENT_CLICKED, NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -95,8 +99,10 @@ _efl_ui_button_efl_ui_widget_on_access_activate(Eo *obj, Efl_Ui_Button_Data *_pd
|
|||
if (act != EFL_UI_ACTIVATE_DEFAULT) return EINA_FALSE;
|
||||
if (evas_object_freeze_events_get(obj)) return EINA_FALSE;
|
||||
|
||||
efl_event_callback_legacy_call
|
||||
(obj, EFL_UI_EVENT_CLICKED, NULL);
|
||||
if (elm_widget_is_legacy(obj))
|
||||
evas_object_smart_callback_call(obj, "clicked", NULL);
|
||||
else
|
||||
efl_event_callback_call(obj, EFL_UI_EVENT_CLICKED, NULL);
|
||||
|
||||
if (elm_widget_is_legacy(obj))
|
||||
elm_layout_signal_emit(obj, "elm,anim,activate", "elm");
|
||||
|
@ -175,8 +181,13 @@ _on_pressed_signal(void *data,
|
|||
(sd->ar_initial_timeout, _autorepeat_initial_send, data);
|
||||
}
|
||||
|
||||
efl_event_callback_legacy_call
|
||||
(data, EFL_UI_EVENT_PRESSED, NULL);
|
||||
if (elm_widget_is_legacy(data))
|
||||
evas_object_smart_callback_call
|
||||
(data, "pressed", NULL);
|
||||
else
|
||||
efl_event_callback_call
|
||||
(data, EFL_UI_EVENT_PRESSED, NULL);
|
||||
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -189,8 +200,13 @@ _on_unpressed_signal(void *data,
|
|||
|
||||
ELM_SAFE_FREE(sd->timer, ecore_timer_del);
|
||||
sd->repeating = EINA_FALSE;
|
||||
efl_event_callback_legacy_call
|
||||
(data, EFL_UI_EVENT_UNPRESSED, NULL);
|
||||
|
||||
if (elm_widget_is_legacy(data))
|
||||
evas_object_smart_callback_call
|
||||
(data, "unpressed", NULL);
|
||||
else
|
||||
efl_event_callback_call
|
||||
(data, EFL_UI_EVENT_UNPRESSED, NULL);
|
||||
}
|
||||
|
||||
static char *
|
||||
|
|
|
@ -87,8 +87,10 @@ _on_frame_clicked(void *data,
|
|||
sd->anim = EINA_TRUE;
|
||||
elm_widget_tree_unfocusable_set(data, sd->collapsed);
|
||||
}
|
||||
efl_event_callback_legacy_call
|
||||
(data, EFL_UI_EVENT_CLICKED, NULL);
|
||||
if (elm_widget_is_legacy(data))
|
||||
evas_object_smart_callback_call(data, "clicked", NULL);
|
||||
else
|
||||
efl_event_callback_call(data, EFL_UI_EVENT_CLICKED, NULL);
|
||||
}
|
||||
|
||||
/* using deferred sizing evaluation, just like the parent */
|
||||
|
|
|
@ -120,7 +120,10 @@ _on_mouse_up(void *data,
|
|||
if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return;
|
||||
if (!wd->still_in) return;
|
||||
|
||||
efl_event_callback_legacy_call(data, EFL_UI_EVENT_CLICKED, NULL);
|
||||
if (elm_widget_is_legacy(obj))
|
||||
evas_object_smart_callback_call(data, "clicked", NULL);
|
||||
else
|
||||
efl_event_callback_call(data, EFL_UI_EVENT_CLICKED, NULL);
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
|
@ -735,7 +738,10 @@ _efl_ui_image_efl_ui_widget_theme_apply(Eo *obj, Efl_Ui_Image_Data *sd EINA_UNUS
|
|||
static Eina_Bool
|
||||
_key_action_activate(Evas_Object *obj, const char *params EINA_UNUSED)
|
||||
{
|
||||
efl_event_callback_legacy_call(obj, EFL_UI_EVENT_CLICKED, NULL);
|
||||
if (elm_widget_is_legacy(obj))
|
||||
evas_object_smart_callback_call(obj, "clicked", NULL);
|
||||
else
|
||||
efl_event_callback_call(obj, EFL_UI_EVENT_CLICKED, NULL);
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
|
|
|
@ -857,8 +857,12 @@ _mouse_down_cb(void *data,
|
|||
if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) sd->on_hold = EINA_TRUE;
|
||||
else sd->on_hold = EINA_FALSE;
|
||||
if (ev->flags & EVAS_BUTTON_DOUBLE_CLICK)
|
||||
efl_event_callback_legacy_call
|
||||
(data, EFL_UI_EVENT_CLICKED_DOUBLE, NULL);
|
||||
{
|
||||
if (elm_widget_is_legacy(data))
|
||||
evas_object_smart_callback_call(data, "clicked,double", NULL);
|
||||
else
|
||||
efl_event_callback_call(data, EFL_UI_EVENT_CLICKED_DOUBLE, NULL);
|
||||
}
|
||||
else
|
||||
efl_event_callback_legacy_call(data, EFL_UI_IMAGE_ZOOMABLE_EVENT_PRESS, NULL);
|
||||
sd->longpressed = EINA_FALSE;
|
||||
|
@ -882,8 +886,12 @@ _mouse_up_cb(void *data,
|
|||
else sd->on_hold = EINA_FALSE;
|
||||
ELM_SAFE_FREE(sd->long_timer, ecore_timer_del);
|
||||
if (!sd->on_hold)
|
||||
efl_event_callback_legacy_call
|
||||
(data, EFL_UI_EVENT_CLICKED, NULL);
|
||||
{
|
||||
if (elm_widget_is_legacy(data))
|
||||
evas_object_smart_callback_call(data, "clicked", NULL);
|
||||
else
|
||||
efl_event_callback_call(data, EFL_UI_EVENT_CLICKED, NULL);
|
||||
}
|
||||
sd->on_hold = EINA_FALSE;
|
||||
}
|
||||
|
||||
|
|
|
@ -162,7 +162,7 @@ _on_clicked(void *data,
|
|||
const char *emission EINA_UNUSED,
|
||||
const char *source EINA_UNUSED)
|
||||
{
|
||||
efl_event_callback_legacy_call(data, EFL_UI_EVENT_CLICKED, NULL);
|
||||
evas_object_smart_callback_call(data, "clicked", NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -196,7 +196,7 @@ _on_unpressed(void *data,
|
|||
|
||||
if (sd->double_clicked)
|
||||
{
|
||||
efl_event_callback_legacy_call(data, EFL_UI_EVENT_CLICKED_DOUBLE, NULL);
|
||||
evas_object_smart_callback_call(data, "clicked,double", NULL);
|
||||
sd->double_clicked = EINA_FALSE;
|
||||
}
|
||||
}
|
||||
|
@ -620,7 +620,7 @@ _part_is_efl_ui_panes_part(const Eo *obj, const char *part)
|
|||
if ((eina_streq(part, "elm.swallow.left")) || (eina_streq(part, "elm.swallow.right")))
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
|
||||
return (eina_streq(part, "first")) || (eina_streq(part, "second"));
|
||||
}
|
||||
|
||||
|
|
|
@ -121,11 +121,11 @@ _elm_combobox_efl_ui_widget_theme_apply(Eo *obj, Elm_Combobox_Data *sd)
|
|||
}
|
||||
|
||||
static void
|
||||
_on_hover_clicked(void *data, const Efl_Event *event)
|
||||
_on_hover_clicked(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
|
||||
{
|
||||
const char *dismissstr;
|
||||
|
||||
dismissstr = elm_layout_data_get(event->object, "dismiss");
|
||||
dismissstr = elm_layout_data_get(obj, "dismiss");
|
||||
|
||||
if (!dismissstr || strcmp(dismissstr, "on"))
|
||||
elm_combobox_hover_end(data); // for backward compatibility
|
||||
|
@ -303,7 +303,7 @@ _on_changed(void *data, const Efl_Event *event EINA_UNUSED)
|
|||
}
|
||||
|
||||
static void
|
||||
_on_clicked(void *data, const Efl_Event *event EINA_UNUSED)
|
||||
_on_clicked(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
||||
{
|
||||
elm_combobox_hover_begin(data);
|
||||
}
|
||||
|
@ -334,7 +334,7 @@ _elm_combobox_efl_canvas_group_group_add(Eo *obj, Elm_Combobox_Data *sd EINA_UNU
|
|||
|
||||
efl_ui_mirrored_automatic_set(obj, EINA_FALSE);
|
||||
|
||||
efl_event_callback_add(obj, EFL_UI_EVENT_CLICKED, _on_clicked, obj);
|
||||
evas_object_smart_callback_add(obj, "clicked", _on_clicked, obj);
|
||||
|
||||
//What are you doing here?
|
||||
efl_ui_widget_theme_apply(obj);
|
||||
|
@ -410,8 +410,7 @@ _elm_combobox_efl_object_constructor(Eo *obj, Elm_Combobox_Data *sd)
|
|||
elm_hover_target_set(sd->hover, obj);
|
||||
elm_widget_sub_object_add(obj, sd->hover);
|
||||
|
||||
efl_event_callback_add
|
||||
(sd->hover, EFL_UI_EVENT_CLICKED, _on_hover_clicked, obj);
|
||||
evas_object_smart_callback_add(sd->hover, "clicked", _on_hover_clicked, obj);
|
||||
elm_layout_signal_callback_add
|
||||
(sd->hover, "elm,action,hide,finished", "elm", _hover_end_finished, obj);
|
||||
|
||||
|
@ -530,7 +529,7 @@ _key_action_activate(Evas_Object *obj, const char *params EINA_UNUSED)
|
|||
elm_combobox_hover_begin(obj);
|
||||
else
|
||||
{
|
||||
efl_event_callback_legacy_call(sd->genlist, EFL_UI_EVENT_PRESSED, sd->item);
|
||||
evas_object_smart_callback_call(sd->genlist, "pressed", sd->item);
|
||||
elm_entry_cursor_end_set(sd->entry);
|
||||
}
|
||||
return EINA_TRUE;
|
||||
|
|
|
@ -81,9 +81,9 @@ static const Elm_Action key_actions[] = {
|
|||
{NULL, NULL}
|
||||
};
|
||||
|
||||
static void _ok(void *data, const Efl_Event *event);
|
||||
static void _canc(void *data, const Efl_Event *event);
|
||||
static void _on_dir_up(void *data, const Efl_Event *event);
|
||||
static void _ok(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED);
|
||||
static void _canc(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED);
|
||||
static void _on_dir_up(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED);
|
||||
static void _populate(Evas_Object *obj, Efl_Model *model, Elm_Object_Item *parent_it, Efl_Model *selected);
|
||||
static Elm_Fileselector_Item_Data *_selected_item_data_get(Elm_Fileselector_Data *sd);
|
||||
|
||||
|
@ -376,16 +376,14 @@ _elm_fileselector_efl_ui_widget_theme_apply(Eo *obj, Elm_Fileselector_Data *sd)
|
|||
static Eina_Bool
|
||||
_key_action_select(Evas_Object *obj, const char *params EINA_UNUSED)
|
||||
{
|
||||
Efl_Event event = {};
|
||||
_ok(obj, &event);
|
||||
_ok(obj, NULL, NULL);
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
_key_action_escape(Evas_Object *obj, const char *params EINA_UNUSED)
|
||||
{
|
||||
Efl_Event event = {};
|
||||
_canc(obj, &event);
|
||||
_canc(obj, NULL, NULL);
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
|
@ -403,7 +401,7 @@ _key_action_backspace(Evas_Object *obj, const char *params EINA_UNUSED)
|
|||
efl_unref(tmp);
|
||||
}
|
||||
else
|
||||
_on_dir_up(obj, NULL);
|
||||
_on_dir_up(obj, NULL, NULL);
|
||||
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
@ -1311,7 +1309,7 @@ _on_item_unselected(void *data, Evas_Object *obj EINA_UNUSED, void *event_info)
|
|||
}
|
||||
|
||||
static void
|
||||
_on_dir_up(void *data, const Efl_Event *event EINA_UNUSED)
|
||||
_on_dir_up(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
||||
{
|
||||
Evas_Object *fs = data;
|
||||
Efl_Model *parent = NULL;
|
||||
|
@ -1342,7 +1340,7 @@ _on_dir_up(void *data, const Efl_Event *event EINA_UNUSED)
|
|||
}
|
||||
|
||||
static void
|
||||
_home(void *data, const Efl_Event *event EINA_UNUSED)
|
||||
_home(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
||||
{
|
||||
Evas_Object *fs = data;
|
||||
|
||||
|
@ -1366,7 +1364,7 @@ _current_filter_changed(void *data,
|
|||
}
|
||||
|
||||
static void
|
||||
_ok(void *data, const Efl_Event *event EINA_UNUSED)
|
||||
_ok(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
||||
{
|
||||
const char *name;
|
||||
const char *selection = NULL;
|
||||
|
@ -1413,7 +1411,7 @@ _ok(void *data, const Efl_Event *event EINA_UNUSED)
|
|||
}
|
||||
|
||||
static void
|
||||
_canc(void *data, const Efl_Event *event EINA_UNUSED)
|
||||
_canc(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
||||
{
|
||||
Evas_Object *fs = data;
|
||||
|
||||
|
@ -1754,8 +1752,8 @@ _elm_fileselector_efl_canvas_group_group_add(Eo *obj, Elm_Fileselector_Data *pri
|
|||
efl_ui_mirrored_automatic_set(bt, EINA_FALSE);
|
||||
elm_object_part_content_set(bt, "icon", ic);
|
||||
elm_object_domain_translatable_text_set(bt, PACKAGE, N_("Up"));
|
||||
efl_event_callback_add
|
||||
(bt, EFL_UI_EVENT_CLICKED, _on_dir_up, obj);
|
||||
|
||||
evas_object_smart_callback_add(bt, "clicked", _on_dir_up, obj);
|
||||
|
||||
priv->up_button = bt;
|
||||
elm_object_style_set(priv->up_button, buf);
|
||||
|
@ -1768,8 +1766,7 @@ _elm_fileselector_efl_canvas_group_group_add(Eo *obj, Elm_Fileselector_Data *pri
|
|||
efl_ui_mirrored_automatic_set(bt, EINA_FALSE);
|
||||
elm_object_part_content_set(bt, "icon", ic);
|
||||
elm_object_domain_translatable_text_set(bt, PACKAGE, N_("Home"));
|
||||
efl_event_callback_add
|
||||
(bt, EFL_UI_EVENT_CLICKED, _home, obj);
|
||||
evas_object_smart_callback_add(bt, "clicked", _home, obj);
|
||||
|
||||
priv->home_button = bt;
|
||||
elm_object_style_set(priv->home_button, buf);
|
||||
|
@ -2061,8 +2058,7 @@ _elm_fileselector_buttons_ok_cancel_set(Eo *obj, Elm_Fileselector_Data *sd, Eina
|
|||
bt = elm_button_add(obj);
|
||||
efl_ui_mirrored_automatic_set(bt, EINA_FALSE);
|
||||
elm_object_domain_translatable_text_set(bt, PACKAGE, N_("OK"));
|
||||
|
||||
efl_event_callback_add(bt, EFL_UI_EVENT_CLICKED, _ok, obj);
|
||||
evas_object_smart_callback_add(bt, "clicked", _ok, obj);
|
||||
|
||||
sd->ok_button = bt;
|
||||
elm_object_part_content_set(obj, "elm.swallow.ok", sd->ok_button);
|
||||
|
@ -2071,9 +2067,7 @@ _elm_fileselector_buttons_ok_cancel_set(Eo *obj, Elm_Fileselector_Data *sd, Eina
|
|||
bt = elm_button_add(obj);
|
||||
efl_ui_mirrored_automatic_set(bt, EINA_FALSE);
|
||||
elm_object_domain_translatable_text_set(bt, PACKAGE, N_("Cancel"));
|
||||
|
||||
efl_event_callback_add(bt, EFL_UI_EVENT_CLICKED, _canc, obj);
|
||||
|
||||
evas_object_smart_callback_add(bt, "clicked", _canc, obj);
|
||||
sd->cancel_button = bt;
|
||||
elm_object_part_content_set(obj, "elm.swallow.cancel", sd->cancel_button);
|
||||
}
|
||||
|
|
|
@ -184,7 +184,7 @@ _activate(Elm_Fileselector_Button_Data *sd)
|
|||
}
|
||||
|
||||
static void
|
||||
_button_clicked(void *data, const Efl_Event *event EINA_UNUSED)
|
||||
_button_clicked(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
||||
{
|
||||
_activate(data);
|
||||
}
|
||||
|
@ -233,7 +233,8 @@ _elm_fileselector_button_efl_canvas_group_group_add(Eo *obj, Elm_Fileselector_Bu
|
|||
|
||||
efl_ui_mirrored_automatic_set(obj, EINA_FALSE);
|
||||
|
||||
efl_event_callback_add(obj, EFL_UI_EVENT_CLICKED, _button_clicked, priv);
|
||||
evas_object_smart_callback_add(obj, "clicked", _button_clicked, priv);
|
||||
|
||||
|
||||
efl_ui_widget_theme_apply(obj);
|
||||
elm_widget_can_focus_set(obj, EINA_TRUE);
|
||||
|
|
|
@ -114,11 +114,11 @@ _elm_hoversel_efl_ui_widget_theme_apply(Eo *obj, Elm_Hoversel_Data *sd)
|
|||
}
|
||||
|
||||
static void
|
||||
_on_hover_clicked(void *data, const Efl_Event *event)
|
||||
_on_hover_clicked(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
|
||||
{
|
||||
const char *dismissstr;
|
||||
|
||||
dismissstr = elm_layout_data_get(event->object, "dismiss");
|
||||
dismissstr = elm_layout_data_get(obj, "dismiss");
|
||||
|
||||
if (!dismissstr || strcmp(dismissstr, "on"))
|
||||
elm_hoversel_hover_end(data); // for backward compatibility
|
||||
|
@ -167,7 +167,7 @@ _auto_update(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void
|
|||
}
|
||||
|
||||
static void
|
||||
_on_item_clicked(void *data EINA_UNUSED, const Efl_Event *event EINA_UNUSED)
|
||||
_on_item_clicked(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
||||
{
|
||||
Elm_Hoversel_Item_Data *item = data;
|
||||
Evas_Object *obj2 = WIDGET(item);
|
||||
|
@ -485,8 +485,7 @@ _activate(Evas_Object *obj)
|
|||
|
||||
elm_object_style_set(sd->hover, buf);
|
||||
|
||||
efl_event_callback_add
|
||||
(sd->hover, EFL_UI_EVENT_CLICKED, _on_hover_clicked, obj);
|
||||
evas_object_smart_callback_add(sd->hover, "clicked", _on_hover_clicked, obj);
|
||||
elm_layout_signal_callback_add
|
||||
(sd->hover, "elm,action,hide,finished", "elm", _hover_end_finished, obj);
|
||||
elm_hover_target_set(sd->hover, obj);
|
||||
|
@ -520,7 +519,7 @@ _activate(Evas_Object *obj)
|
|||
}
|
||||
|
||||
static void
|
||||
_on_clicked(void *data, const Efl_Event *event EINA_UNUSED)
|
||||
_on_clicked(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
||||
{
|
||||
_activate(data);
|
||||
}
|
||||
|
@ -639,8 +638,7 @@ _elm_hoversel_efl_canvas_group_group_add(Eo *obj, Elm_Hoversel_Data *pd)
|
|||
{
|
||||
efl_canvas_group_add(efl_super(obj, MY_CLASS));
|
||||
|
||||
efl_event_callback_add(obj, EFL_UI_EVENT_CLICKED, _on_clicked, obj);
|
||||
|
||||
evas_object_smart_callback_add(obj, "clicked", _on_clicked, obj);
|
||||
//What are you doing here?
|
||||
efl_ui_widget_theme_apply(obj);
|
||||
|
||||
|
@ -876,7 +874,8 @@ _elm_hoversel_item_add(Eo *obj, Elm_Hoversel_Data *sd, const char *label, const
|
|||
|
||||
evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0.0);
|
||||
evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||
efl_event_callback_add(bt, EFL_UI_EVENT_CLICKED, _on_item_clicked, item);
|
||||
evas_object_smart_callback_add(bt, "clicked", _on_item_clicked, item);
|
||||
|
||||
efl_event_callback_add(bt, EFL_UI_FOCUS_OBJECT_EVENT_FOCUS_CHANGED, _item_focus_changed, item);
|
||||
|
||||
sd->items = eina_list_append(sd->items, eo_item);
|
||||
|
|
|
@ -972,7 +972,7 @@ _mouse_clicked_signal_cb(void *data EINA_UNUSED,
|
|||
|
||||
if (sd->editable) elm_entry_input_panel_show(sd->entry);
|
||||
|
||||
efl_event_callback_legacy_call(obj, EFL_UI_EVENT_CLICKED, NULL);
|
||||
evas_object_smart_callback_call(obj, "clicked", NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -49,7 +49,7 @@ static const Evas_Smart_Cb_Description _smart_callbacks[] = {
|
|||
{NULL, NULL}
|
||||
};
|
||||
|
||||
static void _on_item_back_btn_clicked(void *data, const Efl_Event *event);
|
||||
static void _on_item_back_btn_clicked(void *data, Evas_Object *obj, void *event_info EINA_UNUSED);
|
||||
|
||||
static Eina_Bool _key_action_top_item_get(Evas_Object *obj, const char *params);
|
||||
static Eina_Bool _key_action_item_pop(Evas_Object *obj, const char *params);
|
||||
|
@ -680,8 +680,7 @@ _item_title_prev_btn_unset(Elm_Naviframe_Item_Data *it)
|
|||
|
||||
evas_object_event_callback_del
|
||||
(content, EVAS_CALLBACK_DEL, _item_title_prev_btn_del_cb);
|
||||
Eo* parent = efl_parent_get(content);
|
||||
efl_event_callback_del(content, EFL_UI_EVENT_CLICKED, _on_item_back_btn_clicked, parent);
|
||||
evas_object_smart_callback_del(content, "clicked", _on_item_back_btn_clicked);
|
||||
it->title_prev_btn = NULL;
|
||||
if (it->auto_pushed_btn) it->auto_pushed_btn = NULL;
|
||||
return content;
|
||||
|
@ -938,13 +937,13 @@ _elm_naviframe_elm_layout_sizing_eval(Eo *obj, Elm_Naviframe_Data *sd)
|
|||
}
|
||||
|
||||
static void
|
||||
_on_item_back_btn_clicked(void *data, const Efl_Event *event)
|
||||
_on_item_back_btn_clicked(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
|
||||
{
|
||||
/* Since edje has the event queue, clicked event could be happened
|
||||
multiple times on some heavy environment. This callback del will
|
||||
prevent those scenario and guarantee only one clicked for it's own
|
||||
page. */
|
||||
efl_event_callback_del(event->object, EFL_UI_EVENT_CLICKED, _on_item_back_btn_clicked, data);
|
||||
evas_object_smart_callback_del(obj, "clicked", _on_item_back_btn_clicked);
|
||||
elm_naviframe_item_pop(data);
|
||||
}
|
||||
|
||||
|
@ -957,8 +956,7 @@ _back_btn_new(Evas_Object *obj, const char *title_label)
|
|||
btn = elm_button_add(obj);
|
||||
|
||||
if (!btn) return NULL;
|
||||
efl_event_callback_add
|
||||
(btn, EFL_UI_EVENT_CLICKED, _on_item_back_btn_clicked, obj);
|
||||
evas_object_smart_callback_add(btn, "clicked", _on_item_back_btn_clicked, obj);
|
||||
snprintf
|
||||
(buf, sizeof(buf), "naviframe/back_btn/%s", elm_widget_style_get(obj));
|
||||
elm_object_style_set(btn, buf);
|
||||
|
@ -1744,8 +1742,7 @@ _elm_naviframe_item_pop(Eo *obj, Elm_Naviframe_Data *sd)
|
|||
Since the item is not popped or deleted here, the deleted
|
||||
callback of the auto pushed button should be restored. */
|
||||
if (it->auto_pushed_btn)
|
||||
efl_event_callback_add
|
||||
(it->auto_pushed_btn, EFL_UI_EVENT_CLICKED, _on_item_back_btn_clicked, obj);
|
||||
evas_object_smart_callback_add(it->auto_pushed_btn, "clicked", _on_item_back_btn_clicked, obj);
|
||||
it->popping = EINA_FALSE;
|
||||
}
|
||||
evas_object_unref(obj);
|
||||
|
|
|
@ -289,7 +289,7 @@ _update_volume(void *data, const Efl_Event *event EINA_UNUSED)
|
|||
}
|
||||
|
||||
static void
|
||||
_forward(void *data, const Efl_Event *event EINA_UNUSED)
|
||||
_forward(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
||||
{
|
||||
double pos, length;
|
||||
ELM_PLAYER_DATA_GET(data, sd);
|
||||
|
@ -305,21 +305,21 @@ _forward(void *data, const Efl_Event *event EINA_UNUSED)
|
|||
}
|
||||
|
||||
static void
|
||||
_info(void *data, const Efl_Event *event EINA_UNUSED)
|
||||
_info(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
||||
{
|
||||
elm_layout_signal_emit(data, "elm,button,info", "elm");
|
||||
efl_event_callback_legacy_call(data, ELM_PLAYER_EVENT_INFO_CLICKED, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
_next(void *data, const Efl_Event *event EINA_UNUSED)
|
||||
_next(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
||||
{
|
||||
elm_layout_signal_emit(data, "elm,button,next", "elm");
|
||||
efl_event_callback_legacy_call(data, ELM_PLAYER_EVENT_NEXT_CLICKED, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
_pause(void *data, const Efl_Event *event EINA_UNUSED)
|
||||
_pause(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
||||
{
|
||||
ELM_PLAYER_DATA_GET(data, sd);
|
||||
|
||||
|
@ -329,7 +329,7 @@ _pause(void *data, const Efl_Event *event EINA_UNUSED)
|
|||
}
|
||||
|
||||
static void
|
||||
_play(void *data, const Efl_Event *event EINA_UNUSED)
|
||||
_play(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
||||
{
|
||||
ELM_PLAYER_DATA_GET(data, sd);
|
||||
|
||||
|
@ -339,14 +339,14 @@ _play(void *data, const Efl_Event *event EINA_UNUSED)
|
|||
}
|
||||
|
||||
static void
|
||||
_prev(void *data, const Efl_Event *event EINA_UNUSED)
|
||||
_prev(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
||||
{
|
||||
efl_event_callback_legacy_call(data, ELM_PLAYER_EVENT_PREV_CLICKED, NULL);
|
||||
elm_layout_signal_emit(data, "elm,button,prev", "elm");
|
||||
}
|
||||
|
||||
static void
|
||||
_rewind(void *data, const Efl_Event *event EINA_UNUSED)
|
||||
_rewind(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
||||
{
|
||||
double pos;
|
||||
ELM_PLAYER_DATA_GET(data, sd);
|
||||
|
@ -361,14 +361,14 @@ _rewind(void *data, const Efl_Event *event EINA_UNUSED)
|
|||
}
|
||||
|
||||
static void
|
||||
_stop(void *data, const Efl_Event *event EINA_UNUSED)
|
||||
_stop(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
||||
{
|
||||
elm_layout_signal_emit(data, "elm,button,stop", "elm");
|
||||
efl_event_callback_legacy_call(data, ELM_PLAYER_EVENT_QUALITY_CLICKED, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
_eject(void *data, const Efl_Event *event EINA_UNUSED)
|
||||
_eject(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
||||
{
|
||||
ELM_PLAYER_DATA_GET(data, sd);
|
||||
|
||||
|
@ -395,7 +395,7 @@ _mute_toggle(Evas_Object *obj)
|
|||
}
|
||||
|
||||
static void
|
||||
_volume(void *data, const Efl_Event *event EINA_UNUSED)
|
||||
_volume(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
||||
{
|
||||
elm_layout_signal_emit(data, "elm,button,volume", "elm");
|
||||
_mute_toggle(data);
|
||||
|
@ -403,7 +403,7 @@ _volume(void *data, const Efl_Event *event EINA_UNUSED)
|
|||
}
|
||||
|
||||
static void
|
||||
_mute(void *data, const Efl_Event *event EINA_UNUSED)
|
||||
_mute(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
||||
{
|
||||
elm_layout_signal_emit(data, "elm,button,mute", "elm");
|
||||
_mute_toggle(data);
|
||||
|
@ -455,7 +455,7 @@ _video_del(void *data,
|
|||
static Evas_Object *
|
||||
_player_button_add(Evas_Object *obj,
|
||||
const char *name,
|
||||
Efl_Event_Cb func)
|
||||
Evas_Smart_Cb func)
|
||||
{
|
||||
Evas_Object *ic;
|
||||
Evas_Object *bt;
|
||||
|
@ -475,8 +475,8 @@ _player_button_add(Evas_Object *obj,
|
|||
snprintf(buf, sizeof(buf), "media_player/%s/%s", name,
|
||||
elm_widget_style_get(obj));
|
||||
elm_object_style_set(bt, buf);
|
||||
efl_event_callback_add
|
||||
(bt, EFL_UI_EVENT_CLICKED, func, obj);
|
||||
evas_object_smart_callback_add(bt, "clicked", func, obj);
|
||||
|
||||
snprintf(buf, sizeof(buf), "elm.swallow.media_player.%s", name);
|
||||
if (!elm_layout_content_set(obj, buf, bt))
|
||||
{
|
||||
|
|
|
@ -77,7 +77,7 @@ _on_mouse_up(void *data,
|
|||
if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD)
|
||||
return;
|
||||
|
||||
efl_event_callback_legacy_call(data, EFL_UI_EVENT_CLICKED, NULL);
|
||||
evas_object_smart_callback_call(data, "clicked", NULL);
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
|
|
|
@ -152,14 +152,14 @@ _colorclass_changed(void *data, const Efl_Event *event EINA_UNUSED)
|
|||
}
|
||||
|
||||
static void
|
||||
_colorclass_reset(void *data, const Efl_Event *event EINA_UNUSED)
|
||||
_colorclass_reset(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
|
||||
{
|
||||
Colorclass_UI *cc = data;
|
||||
Colorclass color;
|
||||
|
||||
if (!cc->current)
|
||||
{
|
||||
efl_event_callback_stop(event->object);
|
||||
efl_event_callback_stop(obj);
|
||||
return;
|
||||
}
|
||||
//if (cc->winid && remote_iface)
|
||||
|
@ -750,8 +750,7 @@ elm_color_class_editor_add(Evas_Object *obj)
|
|||
/* FIXME: translate */
|
||||
elm_object_text_set(bt, "Reset");
|
||||
elm_object_part_content_set(ly, "elm.swallow.reset", bt);
|
||||
efl_event_callback_add
|
||||
(bt, EFL_UI_EVENT_CLICKED, _colorclass_reset, cc);
|
||||
evas_object_smart_callback_add(bt, "clicked", _colorclass_reset, cc);
|
||||
|
||||
cc->cs = cs = elm_colorselector_add(ly);
|
||||
elm_colorselector_mode_set(cs, ELM_COLORSELECTOR_COMPONENTS);
|
||||
|
|
|
@ -737,13 +737,13 @@ _x11_elm_widget_xwin_get(const Evas_Object *obj)
|
|||
}
|
||||
|
||||
static void
|
||||
_start_grab_pick_cb(void *data, const Efl_Event *event)
|
||||
_start_grab_pick_cb(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
|
||||
{
|
||||
Evas_Object *o = data;
|
||||
|
||||
ELM_COLORSELECTOR_DATA_GET(o, sd);
|
||||
|
||||
elm_object_disabled_set(event->object, EINA_TRUE);
|
||||
elm_object_disabled_set(obj, EINA_TRUE);
|
||||
|
||||
sd->grab.mouse_motion = ecore_event_handler_add(ECORE_EVENT_MOUSE_MOVE, _mouse_grab_pixels, o);
|
||||
sd->grab.key_up = ecore_event_handler_add(ECORE_EVENT_KEY_UP, _key_up_cb, o);
|
||||
|
@ -937,8 +937,7 @@ _create_colorpicker(Evas_Object *obj)
|
|||
sd->button = elm_button_add(sd->picker);
|
||||
elm_object_style_set(sd->button, style);
|
||||
elm_object_text_set(sd->button, E_("Pick a color"));
|
||||
efl_event_callback_add
|
||||
(sd->button, EFL_UI_EVENT_CLICKED, _start_grab_pick_cb, obj);
|
||||
evas_object_smart_callback_add(sd->button, "clicked", _start_grab_pick_cb, obj);
|
||||
elm_box_pack_end(bx, sd->button);
|
||||
evas_object_show(sd->button);
|
||||
}
|
||||
|
|
|
@ -612,8 +612,8 @@ _item_click_cb(void *data,
|
|||
}
|
||||
|
||||
if (it->func) it->func((void *)WIDGET_ITEM_DATA_GET(eo_it), WIDGET(it), eo_it);
|
||||
efl_event_callback_legacy_call
|
||||
(WIDGET(it), EFL_UI_EVENT_CLICKED, eo_it);
|
||||
evas_object_smart_callback_call
|
||||
( WIDGET(it), "clicked", eo_it);
|
||||
}
|
||||
|
||||
static char *
|
||||
|
|
|
@ -1987,8 +1987,8 @@ _long_press_cb(void *data)
|
|||
sd->long_pressed = EINA_TRUE;
|
||||
|
||||
sd->longpress_timer = NULL;
|
||||
efl_event_callback_legacy_call
|
||||
(data, EFL_UI_EVENT_LONGPRESSED, NULL);
|
||||
evas_object_smart_callback_call
|
||||
(data, "longpressed", NULL);
|
||||
|
||||
return ECORE_CALLBACK_CANCEL;
|
||||
}
|
||||
|
@ -2791,8 +2791,8 @@ _entry_mouse_clicked_signal_cb(void *data,
|
|||
const char *emission EINA_UNUSED,
|
||||
const char *source EINA_UNUSED)
|
||||
{
|
||||
efl_event_callback_legacy_call
|
||||
(data, EFL_UI_EVENT_CLICKED, NULL);
|
||||
evas_object_smart_callback_call
|
||||
( data, "clicked", NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -2801,8 +2801,8 @@ _entry_mouse_double_signal_cb(void *data,
|
|||
const char *emission EINA_UNUSED,
|
||||
const char *source EINA_UNUSED)
|
||||
{
|
||||
efl_event_callback_legacy_call
|
||||
(data, EFL_UI_EVENT_CLICKED_DOUBLE, NULL);
|
||||
evas_object_smart_callback_call
|
||||
( data, "clicked,double", NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -2811,8 +2811,8 @@ _entry_mouse_triple_signal_cb(void *data,
|
|||
const char *emission EINA_UNUSED,
|
||||
const char *source EINA_UNUSED)
|
||||
{
|
||||
efl_event_callback_legacy_call
|
||||
(data, EFL_UI_EVENT_CLICKED_TRIPLE, NULL);
|
||||
evas_object_smart_callback_call
|
||||
( data, "clicked,triple", NULL);
|
||||
}
|
||||
|
||||
static Evas_Object *
|
||||
|
@ -5586,8 +5586,8 @@ _activate(Evas_Object *obj)
|
|||
if (!elm_widget_disabled_get(obj) &&
|
||||
!evas_object_freeze_events_get(obj))
|
||||
{
|
||||
efl_event_callback_legacy_call
|
||||
(obj, EFL_UI_EVENT_CLICKED, NULL);
|
||||
evas_object_smart_callback_call
|
||||
( obj, "clicked", NULL);
|
||||
if (sd->editable && sd->input_panel_enable)
|
||||
edje_object_part_text_input_panel_show(sd->entry_edje, "elm.text");
|
||||
}
|
||||
|
|
|
@ -888,8 +888,8 @@ _long_press_cb(void *data)
|
|||
if (elm_wdg_item_disabled_get(EO_OBJ(it)) || (it->dragging))
|
||||
return ECORE_CALLBACK_CANCEL;
|
||||
sd->longpressed = EINA_TRUE;
|
||||
efl_event_callback_legacy_call
|
||||
(WIDGET(it), EFL_UI_EVENT_LONGPRESSED, EO_OBJ(it));
|
||||
evas_object_smart_callback_call
|
||||
(WIDGET(it), "longpressed", EO_OBJ(it));
|
||||
|
||||
if (sd->reorder_mode)
|
||||
{
|
||||
|
@ -986,11 +986,11 @@ _item_mouse_down_cb(void *data,
|
|||
it->highlight_cb(it);
|
||||
if (ev->flags & EVAS_BUTTON_DOUBLE_CLICK)
|
||||
{
|
||||
efl_event_callback_legacy_call(WIDGET(it), EFL_UI_EVENT_CLICKED_DOUBLE, EO_OBJ(it));
|
||||
evas_object_smart_callback_call(WIDGET(it), "clicked,double", EO_OBJ(it));
|
||||
efl_event_callback_legacy_call(WIDGET(it), ELM_GENGRID_EVENT_ACTIVATED, EO_OBJ(it));
|
||||
}
|
||||
|
||||
efl_event_callback_legacy_call(WIDGET(it), EFL_UI_EVENT_PRESSED, EO_OBJ(it));
|
||||
evas_object_smart_callback_call(WIDGET(it), "pressed", EO_OBJ(it));
|
||||
ELM_SAFE_FREE(it->long_timer, ecore_timer_del);
|
||||
if (it->realized)
|
||||
it->long_timer = ecore_timer_add
|
||||
|
@ -1296,8 +1296,8 @@ _item_mouse_up_cb(void *data,
|
|||
if (dx < 0) dx = -dx;
|
||||
if (dy < 0) dy = -dy;
|
||||
if ((dx < 5) && (dy < 5))
|
||||
efl_event_callback_legacy_call
|
||||
(WIDGET(it), EFL_UI_EVENT_CLICKED_RIGHT, EO_OBJ(it));
|
||||
evas_object_smart_callback_call
|
||||
( WIDGET(it), "clicked,right", EO_OBJ(it));
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -4122,8 +4122,8 @@ _long_press_cb(void *data)
|
|||
goto end;
|
||||
|
||||
sd->longpressed = EINA_TRUE;
|
||||
efl_event_callback_legacy_call
|
||||
(WIDGET(it), EFL_UI_EVENT_LONGPRESSED, EO_OBJ(it));
|
||||
evas_object_smart_callback_call
|
||||
(WIDGET(it), "longpressed", EO_OBJ(it));
|
||||
if ((sd->reorder_mode) && !(it->item->type & ELM_GENLIST_ITEM_GROUP))
|
||||
{
|
||||
sd->reorder_it = it;
|
||||
|
@ -4410,13 +4410,13 @@ _item_mouse_down_cb(void *data,
|
|||
_item_highlight(it);
|
||||
if (ev->flags & EVAS_BUTTON_DOUBLE_CLICK)
|
||||
{
|
||||
efl_event_callback_legacy_call
|
||||
(WIDGET(it), EFL_UI_EVENT_CLICKED_DOUBLE, eo_it);
|
||||
evas_object_smart_callback_call
|
||||
( WIDGET(it), "clicked,double", eo_it);
|
||||
efl_event_callback_legacy_call
|
||||
(WIDGET(it), ELM_GENLIST_EVENT_ACTIVATED, eo_it);
|
||||
}
|
||||
efl_event_callback_legacy_call
|
||||
(WIDGET(it), EFL_UI_EVENT_PRESSED, eo_it);
|
||||
evas_object_smart_callback_call
|
||||
(WIDGET(it), "pressed", eo_it);
|
||||
}
|
||||
|
||||
static Item_Block *
|
||||
|
@ -5065,8 +5065,8 @@ _item_mouse_up_cb(void *data,
|
|||
if (dx < 0) dx = -dx;
|
||||
if (dy < 0) dy = -dy;
|
||||
if ((dx < 5) && (dy < 5))
|
||||
efl_event_callback_legacy_call
|
||||
(WIDGET(it), EFL_UI_EVENT_CLICKED_RIGHT, EO_OBJ(it));
|
||||
evas_object_smart_callback_call
|
||||
( WIDGET(it), "clicked,right", EO_OBJ(it));
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -566,14 +566,14 @@ _hov_dismiss_cb(void *data,
|
|||
if (dismissstr && !strcmp(dismissstr, "on"))
|
||||
{
|
||||
_hide_signals_emit(data);
|
||||
efl_event_callback_legacy_call
|
||||
(data, EFL_UI_EVENT_CLICKED, NULL);
|
||||
evas_object_smart_callback_call
|
||||
( data, "clicked", NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
evas_object_hide(data);
|
||||
efl_event_callback_legacy_call
|
||||
(data, EFL_UI_EVENT_CLICKED, NULL);
|
||||
evas_object_smart_callback_call
|
||||
( data, "clicked", NULL);
|
||||
efl_event_callback_legacy_call(data, ELM_HOVER_EVENT_DISMISSED, NULL);
|
||||
} // for backward compatibility
|
||||
}
|
||||
|
@ -616,8 +616,8 @@ _elm_hover_efl_canvas_group_group_del(Eo *obj, Elm_Hover_Data *sd)
|
|||
|
||||
if (evas_object_visible_get(obj))
|
||||
{
|
||||
efl_event_callback_legacy_call
|
||||
(obj, EFL_UI_EVENT_CLICKED, NULL);
|
||||
evas_object_smart_callback_call
|
||||
( obj, "clicked", NULL);
|
||||
efl_event_callback_legacy_call(obj, ELM_HOVER_EVENT_DISMISSED, NULL);
|
||||
}
|
||||
|
||||
|
|
|
@ -762,7 +762,7 @@ _sel_eval(Evas_Object *obj,
|
|||
_elm_access_say(ret);
|
||||
}
|
||||
|
||||
if (om_closest)
|
||||
if (om_closest)
|
||||
efl_event_callback_legacy_call
|
||||
(obj, ELM_INDEX_EVENT_CHANGED, EO_OBJ(om_closest));
|
||||
else
|
||||
|
@ -861,8 +861,8 @@ _on_mouse_up(void *data,
|
|||
eo_item = elm_index_selected_item_get(data, sd->level);
|
||||
if (eo_item)
|
||||
{
|
||||
efl_event_callback_legacy_call
|
||||
(data, EFL_UI_EVENT_CLICKED, eo_item);
|
||||
evas_object_smart_callback_call
|
||||
( data, "clicked", eo_item);
|
||||
evas_object_smart_callback_call(data, "selected", eo_item);
|
||||
eo_id_item = eo_item;
|
||||
ELM_INDEX_ITEM_DATA_GET(eo_id_item, id_item);
|
||||
|
|
|
@ -1597,8 +1597,8 @@ _long_press_cb(void *data)
|
|||
if (it->base->disabled) goto end;
|
||||
|
||||
sd->longpressed = EINA_TRUE;
|
||||
efl_event_callback_legacy_call
|
||||
(WIDGET(it), EFL_UI_EVENT_LONGPRESSED, EO_OBJ(it));
|
||||
evas_object_smart_callback_call
|
||||
(WIDGET(it), "longpressed", EO_OBJ(it));
|
||||
|
||||
end:
|
||||
return ECORE_CALLBACK_CANCEL;
|
||||
|
@ -1748,8 +1748,8 @@ _mouse_down_cb(void *data,
|
|||
/* Always call the callbacks last - the user may delete our context! */
|
||||
if (ev->flags & EVAS_BUTTON_DOUBLE_CLICK)
|
||||
{
|
||||
efl_event_callback_legacy_call
|
||||
(WIDGET(it), EFL_UI_EVENT_CLICKED_DOUBLE, EO_OBJ(it));
|
||||
evas_object_smart_callback_call
|
||||
( WIDGET(it), "clicked,double", EO_OBJ(it));
|
||||
efl_event_callback_legacy_call
|
||||
(WIDGET(it), ELM_LIST_EVENT_ACTIVATED, EO_OBJ(it));
|
||||
}
|
||||
|
@ -1784,8 +1784,8 @@ _mouse_up_cb(void *data,
|
|||
if (dx < 0) dx = -dx;
|
||||
if (dy < 0) dy = -dy;
|
||||
if ((dx < 5) && (dy < 5))
|
||||
efl_event_callback_legacy_call
|
||||
(obj, EFL_UI_EVENT_CLICKED_RIGHT, EO_OBJ(it));
|
||||
evas_object_smart_callback_call
|
||||
( obj, "clicked,right", EO_OBJ(it));
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -1356,8 +1356,8 @@ _long_press_cb(void *data)
|
|||
ELM_MAP_DATA_GET(data, sd);
|
||||
|
||||
sd->long_timer = NULL;
|
||||
efl_event_callback_legacy_call
|
||||
(sd->obj, EFL_UI_EVENT_LONGPRESSED, &sd->ev);
|
||||
|
||||
evas_object_smart_callback_call(sd->obj, "longpressed", &sd->ev);
|
||||
|
||||
return ECORE_CALLBACK_CANCEL;
|
||||
}
|
||||
|
@ -1376,8 +1376,8 @@ _mouse_down_cb(void *data,
|
|||
else sd->on_hold = EINA_FALSE;
|
||||
|
||||
if (ev->flags & EVAS_BUTTON_DOUBLE_CLICK)
|
||||
efl_event_callback_legacy_call
|
||||
(sd->obj, EFL_UI_EVENT_CLICKED_DOUBLE, ev);
|
||||
evas_object_smart_callback_call
|
||||
(sd->obj, "clicked,double", ev);
|
||||
else
|
||||
efl_event_callback_legacy_call
|
||||
(sd->obj, ELM_MAP_EVENT_PRESS, ev);
|
||||
|
@ -1407,8 +1407,9 @@ _mouse_up_cb(void *data,
|
|||
ELM_SAFE_FREE(sd->long_timer, ecore_timer_del);
|
||||
|
||||
if (!sd->on_hold)
|
||||
efl_event_callback_legacy_call
|
||||
(sd->obj, EFL_UI_EVENT_CLICKED, ev);
|
||||
|
||||
evas_object_smart_callback_call
|
||||
(sd->obj, "clicked", ev);
|
||||
sd->on_hold = EINA_FALSE;
|
||||
}
|
||||
|
||||
|
|
|
@ -437,8 +437,8 @@ static void
|
|||
_hover_dismissed_cb(void *data, const Efl_Event *event)
|
||||
{
|
||||
_menu_hide(data, event->object, event->info);
|
||||
efl_event_callback_legacy_call
|
||||
(data, EFL_UI_EVENT_CLICKED, NULL);
|
||||
evas_object_smart_callback_call
|
||||
( data, "clicked", NULL);
|
||||
efl_event_callback_legacy_call(data, ELM_MENU_EVENT_DISMISSED, NULL);
|
||||
}
|
||||
|
||||
|
|
|
@ -232,7 +232,7 @@ _mouse_up(void *data,
|
|||
ELM_SAFE_FREE(sd->long_press_timer, ecore_timer_del);
|
||||
|
||||
if (!sd->drag_started)
|
||||
efl_event_callback_legacy_call(data, EFL_UI_EVENT_CLICKED, NULL);
|
||||
evas_object_smart_callback_call(data, "clicked", NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -103,7 +103,7 @@ _on_mouse_up(void *data,
|
|||
if (ev->button != 1) return;
|
||||
if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return;
|
||||
|
||||
efl_event_callback_legacy_call(data, EFL_UI_EVENT_CLICKED, NULL);
|
||||
evas_object_smart_callback_call(data, "clicked", NULL);
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
|
|
|
@ -63,7 +63,7 @@ _mouse_down_cb(void *data,
|
|||
else sd->on_hold = EINA_FALSE;
|
||||
|
||||
if (ev->flags & EVAS_BUTTON_DOUBLE_CLICK)
|
||||
efl_event_callback_legacy_call(obj, EFL_UI_EVENT_CLICKED_DOUBLE, NULL);
|
||||
evas_object_smart_callback_call(obj, "clicked", NULL);
|
||||
else
|
||||
efl_event_callback_legacy_call(obj, ELM_THUMB_EVENT_PRESS, NULL);
|
||||
}
|
||||
|
@ -82,7 +82,7 @@ _mouse_up_cb(void *data,
|
|||
else sd->on_hold = EINA_FALSE;
|
||||
|
||||
if (!sd->on_hold)
|
||||
efl_event_callback_legacy_call(obj, EFL_UI_EVENT_CLICKED, NULL);
|
||||
evas_object_smart_callback_call(obj, "clicked", NULL);
|
||||
|
||||
sd->on_hold = EINA_FALSE;
|
||||
}
|
||||
|
|
|
@ -1731,7 +1731,7 @@ _mouse_clicked_cb(Elm_Toolbar_Item_Data *it,
|
|||
if (button == 1)
|
||||
{
|
||||
/* regular left click event */
|
||||
efl_event_callback_legacy_call(WIDGET(it), EFL_UI_EVENT_CLICKED, EO_OBJ(it));
|
||||
evas_object_smart_callback_call(WIDGET(it), "clicked", EO_OBJ(it));
|
||||
return;
|
||||
}
|
||||
snprintf(buf, sizeof(buf), "elm,action,click,%d", button);
|
||||
|
@ -2121,7 +2121,7 @@ _long_press_cb(void *data)
|
|||
if (sd->reorder_mode)
|
||||
_item_reorder_start(it);
|
||||
|
||||
efl_event_callback_legacy_call(WIDGET(it), EFL_UI_EVENT_LONGPRESSED, EO_OBJ(it));
|
||||
evas_object_smart_callback_call(WIDGET(it), "longpressed", EO_OBJ(it));
|
||||
|
||||
return ECORE_CALLBACK_CANCEL;
|
||||
}
|
||||
|
@ -2154,7 +2154,7 @@ _mouse_down_cb(Elm_Toolbar_Item_Data *it,
|
|||
|
||||
if (ev->button != 1) return;
|
||||
if (ev->flags & EVAS_BUTTON_DOUBLE_CLICK)
|
||||
efl_event_callback_legacy_call(WIDGET(it), EFL_UI_EVENT_CLICKED_DOUBLE, EO_OBJ(it));
|
||||
evas_object_smart_callback_call(WIDGET(it), "clicked,double", EO_OBJ(it));
|
||||
sd->mouse_down = EINA_TRUE;
|
||||
sd->long_press = EINA_FALSE;
|
||||
if (sd->long_timer)
|
||||
|
|
|
@ -96,13 +96,13 @@ _field_value_get(struct tm *tim, Efl_Ui_Clock_Type field_type)
|
|||
}
|
||||
|
||||
static void
|
||||
_diskselector_cb(void *data EINA_UNUSED, const Efl_Event *event)
|
||||
_diskselector_cb(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info)
|
||||
{
|
||||
DiskItem_Data *disk_data;
|
||||
struct tm curr_time;
|
||||
const char *fmt;
|
||||
|
||||
disk_data = (DiskItem_Data *)elm_object_item_data_get(event->info);
|
||||
disk_data = (DiskItem_Data *)elm_object_item_data_get(event_info);
|
||||
if (!disk_data || !(disk_data->ctx_mod)) return;
|
||||
|
||||
curr_time = efl_ui_clock_time_get(disk_data->ctx_mod->mod_data.base);
|
||||
|
@ -167,8 +167,7 @@ _field_clicked_cb(void *data, const Efl_Event *event)
|
|||
elm_ctxpopup_hover_parent_set(ctx_mod->ctxpopup, elm_widget_top_get(event->object));
|
||||
|
||||
diskselector = elm_diskselector_add(elm_widget_top_get(ctx_mod->mod_data.base));
|
||||
efl_event_callback_add
|
||||
(diskselector, EFL_UI_EVENT_CLICKED, _diskselector_cb, NULL);
|
||||
evas_object_smart_callback_add(diskselector, "clicked", _diskselector_cb, NULL);
|
||||
elm_object_style_set(diskselector, buf);
|
||||
elm_object_content_set(ctx_mod->ctxpopup, diskselector);
|
||||
|
||||
|
|
|
@ -9,11 +9,11 @@ static Elm_Prefs_Item_Type supported_types[] =
|
|||
};
|
||||
|
||||
static void
|
||||
_item_changed_cb(void *data, const Efl_Event *event)
|
||||
_item_changed_cb(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
|
||||
{
|
||||
Elm_Prefs_Item_Changed_Cb prefs_it_changed_cb = data;
|
||||
|
||||
prefs_it_changed_cb(event->object);
|
||||
prefs_it_changed_cb(obj);
|
||||
}
|
||||
|
||||
static Evas_Object *
|
||||
|
@ -25,8 +25,7 @@ elm_prefs_button_add(const Elm_Prefs_Item_Iface *iface EINA_UNUSED,
|
|||
{
|
||||
Evas_Object *obj = elm_button_add(prefs);
|
||||
|
||||
efl_event_callback_add
|
||||
(obj, EFL_UI_EVENT_CLICKED, _item_changed_cb, cb);
|
||||
evas_object_smart_callback_add(obj, "clicked", _item_changed_cb, cb);
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue