summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2019-02-22 08:50:07 -0500
committerMike Blumenkrantz <zmike@samsung.com>2019-02-22 08:50:07 -0500
commit11e80c73275a46277a527d3dd9106637fc51cfb4 (patch)
tree2b9a8f42d54a576e6db533d61df8b0f53948110c /src
parent421bf2d0a3f8783d60be952abade6aeef7224c55 (diff)
evas_callbacks: redo legacy smart object events for recently changed event names
Summary: this makes it more obvious which events are legacy and makes them easier to remove in the future Reviewers: bu5hm4n Reviewed By: bu5hm4n Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8002
Diffstat (limited to 'src')
-rw-r--r--src/lib/evas/canvas/evas_callbacks.c13
-rw-r--r--src/lib/evas/canvas/evas_object_inform.c6
2 files changed, 15 insertions, 4 deletions
diff --git a/src/lib/evas/canvas/evas_callbacks.c b/src/lib/evas/canvas/evas_callbacks.c
index 10c116a832..ad8e753d7a 100644
--- a/src/lib/evas/canvas/evas_callbacks.c
+++ b/src/lib/evas/canvas/evas_callbacks.c
@@ -347,6 +347,18 @@ evas_event_callback_call(Evas *eo_e, Evas_Callback_Type type, void *event_info)
347 efl_event_callback_legacy_call(eo_e, _legacy_evas_callback_table(type), event_info); 347 efl_event_callback_legacy_call(eo_e, _legacy_evas_callback_table(type), event_info);
348} 348}
349 349
350static void
351_evas_callback_legacy_smart_compatibility_do_it(Evas_Object *eo_obj, const Efl_Event_Description *efl_event_desc)
352{
353 if (efl_event_desc == EFL_GFX_ENTITY_EVENT_POSITION_CHANGED)
354 evas_object_smart_callback_call(eo_obj, "move", NULL);
355 else if (efl_event_desc == EFL_GFX_ENTITY_EVENT_SIZE_CHANGED)
356 evas_object_smart_callback_call(eo_obj, "resize", NULL);
357 else if (efl_event_desc == EFL_GFX_ENTITY_EVENT_STACKING_CHANGED)
358 evas_object_smart_callback_call(eo_obj, "restack", NULL);
359}
360
361
350void 362void
351evas_object_event_callback_call(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj, 363evas_object_event_callback_call(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj,
352 Evas_Callback_Type type, void *event_info, int event_id, 364 Evas_Callback_Type type, void *event_info, int event_id,
@@ -410,6 +422,7 @@ evas_object_event_callback_call(Evas_Object *eo_obj, Evas_Object_Protected_Data
410 e->current_event = type; 422 e->current_event = type;
411 423
412 efl_event_callback_legacy_call(eo_obj, efl_event_desc, event_info); 424 efl_event_callback_legacy_call(eo_obj, efl_event_desc, event_info);
425 _evas_callback_legacy_smart_compatibility_do_it(eo_obj, efl_event_desc);
413 426
414 /* multi events with finger 0 - only for eo callbacks */ 427 /* multi events with finger 0 - only for eo callbacks */
415 if (type == EVAS_CALLBACK_MOUSE_DOWN) 428 if (type == EVAS_CALLBACK_MOUSE_DOWN)
diff --git a/src/lib/evas/canvas/evas_object_inform.c b/src/lib/evas/canvas/evas_object_inform.c
index 0b8581e32d..ad369ba38a 100644
--- a/src/lib/evas/canvas/evas_object_inform.c
+++ b/src/lib/evas/canvas/evas_object_inform.c
@@ -41,8 +41,7 @@ evas_object_inform_call_move(Evas_Object *eo_obj, Evas_Object_Protected_Data *ob
41 41
42 pos = ((Eina_Rect) obj->cur->geometry).pos; 42 pos = ((Eina_Rect) obj->cur->geometry).pos;
43 43
44 evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_MOVE, NULL, event_id, EFL_GFX_ENTITY_EVENT_MOVE); 44 evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_MOVE, &pos, event_id, EFL_GFX_ENTITY_EVENT_POSITION_CHANGED);
45 efl_event_callback_call(eo_obj, EFL_GFX_ENTITY_EVENT_POSITION_CHANGED, &pos);
46 _evas_post_event_callback_call(obj->layer->evas->evas, obj->layer->evas, event_id); 45 _evas_post_event_callback_call(obj->layer->evas->evas, obj->layer->evas, event_id);
47} 46}
48 47
@@ -54,8 +53,7 @@ evas_object_inform_call_resize(Evas_Object *eo_obj, Evas_Object_Protected_Data *
54 53
55 size = ((Eina_Rect) obj->cur->geometry).size; 54 size = ((Eina_Rect) obj->cur->geometry).size;
56 55
57 evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_RESIZE, NULL, event_id, EFL_GFX_ENTITY_EVENT_RESIZE); 56 evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_RESIZE, &size, event_id, EFL_GFX_ENTITY_EVENT_SIZE_CHANGED);
58 efl_event_callback_call(eo_obj, EFL_GFX_ENTITY_EVENT_SIZE_CHANGED, &size);
59 _evas_post_event_callback_call(obj->layer->evas->evas, obj->layer->evas, event_id); 57 _evas_post_event_callback_call(obj->layer->evas->evas, obj->layer->evas, event_id);
60} 58}
61 59