diff options
author | Marcel Hollerbach <mail@marcel-hollerbach.de> | 2020-01-26 10:22:55 +0100 |
---|---|---|
committer | Marcel Hollerbach <mail@marcel-hollerbach.de> | 2020-02-03 17:19:27 +0100 |
commit | a423ce581851377977e04c06a2ce086d405ffea0 (patch) | |
tree | 5b5efb3801ceaec52c6d2595b2074ecca4fa63ed | |
parent | 02245a2494ea27e14cd6390f00c0989ed568663f (diff) | |
download | efl-a423ce581851377977e04c06a2ce086d405ffea0.tar.gz |
efl_ui_draggable: move these events back to legacy
they are not used yet in efl.ui. namespace, and they are needed for
different events.
-rw-r--r-- | src/lib/efl/interfaces/efl_ui_draggable.eo | 12 | ||||
-rw-r--r-- | src/lib/elementary/elm_gengrid.c | 28 | ||||
-rw-r--r-- | src/lib/elementary/elm_genlist.c | 32 | ||||
-rw-r--r-- | src/lib/elementary/elm_photo.c | 6 |
4 files changed, 32 insertions, 46 deletions
diff --git a/src/lib/efl/interfaces/efl_ui_draggable.eo b/src/lib/efl/interfaces/efl_ui_draggable.eo index 91c74202ad..0b4139958d 100644 --- a/src/lib/efl/interfaces/efl_ui_draggable.eo +++ b/src/lib/efl/interfaces/efl_ui_draggable.eo @@ -22,16 +22,4 @@ interface @beta Efl.Ui.Draggable } } } - - events { - /* FIXME: Explain what is the object passed through the event_infos */ - drag: Efl.Object; [[Called when drag operation starts]] - drag,start: void; [[Called when drag started]] - drag,stop: Efl.Object; [[Called when drag stopped]] - drag,end: void; [[Called when drag operation ends]] - drag,start,up: Efl.Object; [[Called when drag starts into up direction]] - drag,start,down: Efl.Object; [[Called when drag starts into down direction]] - drag,start,right: Efl.Object; [[Called when drag starts into right direction]] - drag,start,left: Efl.Object; [[Called when drag starts into left direction]] - } } diff --git a/src/lib/elementary/elm_gengrid.c b/src/lib/elementary/elm_gengrid.c index 36206fd375..df46609880 100644 --- a/src/lib/elementary/elm_gengrid.c +++ b/src/lib/elementary/elm_gengrid.c @@ -785,7 +785,7 @@ _item_mouse_move_cb(void *data, if ((it->dragging) && (it->down)) { ELM_SAFE_FREE(it->long_timer, ecore_timer_del); - efl_event_callback_legacy_call(WIDGET(it), EFL_UI_EVENT_DRAG, eo_it); + evas_object_smart_callback_call(WIDGET(it), "drag", eo_it); return; } @@ -834,17 +834,17 @@ _item_mouse_move_cb(void *data, if ((adx > minw) || (ady > minh)) { - const Efl_Event_Description *left_drag, *right_drag; + const char *left_drag, *right_drag; if (!efl_ui_mirrored_get(WIDGET(it))) { - left_drag = EFL_UI_EVENT_DRAG_START_LEFT; - right_drag = EFL_UI_EVENT_DRAG_START_RIGHT; + left_drag = "drag,start,left"; + right_drag = "drag,start,right"; } else { - left_drag = EFL_UI_EVENT_DRAG_START_RIGHT; - right_drag = EFL_UI_EVENT_DRAG_START_LEFT; + right_drag = "drag,start,left"; + left_drag = "drag,start,right"; } it->dragging = 1; @@ -858,25 +858,23 @@ _item_mouse_move_cb(void *data, if (dy < 0) { if (ady > adx) - efl_event_callback_legacy_call - (WIDGET(it), EFL_UI_EVENT_DRAG_START_UP, eo_it); + evas_object_smart_callback_call(WIDGET(it), "drag,start,up", eo_it); else { if (dx < 0) - efl_event_callback_legacy_call(WIDGET(it), left_drag, eo_it); + evas_object_smart_callback_call(WIDGET(it), left_drag, eo_it); } } else { if (ady > adx) - efl_event_callback_legacy_call - (WIDGET(it), EFL_UI_EVENT_DRAG_START_DOWN, eo_it); + evas_object_smart_callback_call(WIDGET(it), "drag,start,down", eo_it); else { if (dx < 0) - efl_event_callback_legacy_call(WIDGET(it), left_drag, eo_it); + evas_object_smart_callback_call(WIDGET(it), left_drag, eo_it); else - efl_event_callback_legacy_call(WIDGET(it), right_drag, eo_it); + evas_object_smart_callback_call(WIDGET(it), right_drag, eo_it); } } } @@ -1320,8 +1318,8 @@ _item_mouse_up_cb(void *data, if (it->dragging) { it->dragging = EINA_FALSE; - efl_event_callback_legacy_call - (WIDGET(it), EFL_UI_EVENT_DRAG_STOP, eo_it); + evas_object_smart_callback_call + (WIDGET(it), "drag,stop", eo_it); dragged = EINA_TRUE; } diff --git a/src/lib/elementary/elm_genlist.c b/src/lib/elementary/elm_genlist.c index b84e830545..bf05359ea8 100644 --- a/src/lib/elementary/elm_genlist.c +++ b/src/lib/elementary/elm_genlist.c @@ -4096,31 +4096,31 @@ _item_mouse_move_cb(void *data, if (dy < 0) { if (ady > adx) - efl_event_callback_legacy_call - (WIDGET(it), EFL_UI_EVENT_DRAG_START_UP, eo_it); + evas_object_smart_callback_call + (WIDGET(it), "drag,start,up", eo_it); else { if (dx < 0) - efl_event_callback_legacy_call - (WIDGET(it), EFL_UI_EVENT_DRAG_START_LEFT, eo_it); + evas_object_smart_callback_call + (WIDGET(it), "drag,start,left", eo_it); else - efl_event_callback_legacy_call - (WIDGET(it), EFL_UI_EVENT_DRAG_START_RIGHT, eo_it); + evas_object_smart_callback_call + (WIDGET(it), "drag,start,right", eo_it); } } else { if (ady > adx) - efl_event_callback_legacy_call - (WIDGET(it), EFL_UI_EVENT_DRAG_START_DOWN, eo_it); + evas_object_smart_callback_call + (WIDGET(it), "drag,start,down", eo_it); else { if (dx < 0) - efl_event_callback_legacy_call - (WIDGET(it), EFL_UI_EVENT_DRAG_START_LEFT, eo_it); + evas_object_smart_callback_call + (WIDGET(it), "drag,start,left", eo_it); else - efl_event_callback_legacy_call - (WIDGET(it), EFL_UI_EVENT_DRAG_START_RIGHT, eo_it); + evas_object_smart_callback_call + (WIDGET(it), "drag,start,right", eo_it); } } } @@ -4316,8 +4316,8 @@ _item_multi_down_cb(void *data, if (it->dragging) { it->dragging = EINA_FALSE; - efl_event_callback_legacy_call - (WIDGET(it), EFL_UI_EVENT_DRAG_STOP, EO_OBJ(it)); + evas_object_smart_callback_call + (WIDGET(it), "drag,stop", EO_OBJ(it)); } ELM_SAFE_FREE(it->item->swipe_timer, ecore_timer_del); if (sd->on_hold) @@ -5112,8 +5112,8 @@ _item_mouse_up_cb(void *data, if (it->dragging) { it->dragging = EINA_FALSE; - efl_event_callback_legacy_call - (WIDGET(it), EFL_UI_EVENT_DRAG_STOP, EO_OBJ(it)); + evas_object_smart_callback_call + (WIDGET(it), "drag,stop", EO_OBJ(it)); dragged = 1; } ELM_SAFE_FREE(it->item->swipe_timer, ecore_timer_del); diff --git a/src/lib/elementary/elm_photo.c b/src/lib/elementary/elm_photo.c index 9fc593392f..5f8660352c 100644 --- a/src/lib/elementary/elm_photo.c +++ b/src/lib/elementary/elm_photo.c @@ -125,7 +125,7 @@ _drag_done_cb(void *unused EINA_UNUSED, ELM_PHOTO_DATA_GET(obj, sd); elm_object_scroll_freeze_pop(obj); - efl_event_callback_legacy_call(obj, EFL_UI_EVENT_DRAG_END, NULL); + evas_object_smart_callback_call(obj, "drag,end", NULL); sd->drag_started = EINA_FALSE; } @@ -189,8 +189,8 @@ _long_press_cb(void *obj) _drag_done_cb, NULL)) { elm_object_scroll_freeze_push(obj); - efl_event_callback_legacy_call - (obj, EFL_UI_EVENT_DRAG_START, NULL); + evas_object_smart_callback_call + (obj, "drag,start", NULL); sd->drag_started = EINA_TRUE; } } |