evas: add event source evas object

This patch introduces fields to event Evas_Event_Mouse_* structures
to hold the event source evas object in case of evas source events
propagation.


SVN revision: 82138
devs/devilhorns/wayland_egl
Leandro Dorileo 10 years ago
parent 25bb274f1e
commit e2ce20e9a4
  1. 5
      src/lib/evas/Evas.h
  2. 10
      src/lib/evas/canvas/evas_events.c

@ -1030,6 +1030,7 @@ struct _Evas_Event_Mouse_Down /** Mouse button press event */
unsigned int timestamp;
Evas_Event_Flags event_flags;
Evas_Device *dev;
Evas_Object *event_src; /**< The Evas Object which actually triggered the event, used in cases of proxy event propagation */
};
struct _Evas_Event_Mouse_Up /** Mouse button release event */
@ -1047,6 +1048,7 @@ struct _Evas_Event_Mouse_Up /** Mouse button release event */
unsigned int timestamp;
Evas_Event_Flags event_flags;
Evas_Device *dev;
Evas_Object *event_src; /**< The Evas Object which actually triggered the event, used in cases of proxy event propagation */
};
struct _Evas_Event_Mouse_In /** Mouse enter event */
@ -1062,6 +1064,7 @@ struct _Evas_Event_Mouse_In /** Mouse enter event */
unsigned int timestamp;
Evas_Event_Flags event_flags;
Evas_Device *dev;
Evas_Object *event_src; /**< The Evas Object which actually triggered the event, used in cases of proxy event propagation */
};
struct _Evas_Event_Mouse_Out /** Mouse leave event */
@ -1077,6 +1080,7 @@ struct _Evas_Event_Mouse_Out /** Mouse leave event */
unsigned int timestamp;
Evas_Event_Flags event_flags;
Evas_Device *dev;
Evas_Object *event_src; /**< The Evas Object which actually triggered the event, used in cases of proxy event propagation */
};
struct _Evas_Event_Mouse_Move /** Mouse move event */
@ -1092,6 +1096,7 @@ struct _Evas_Event_Mouse_Move /** Mouse move event */
unsigned int timestamp;
Evas_Event_Flags event_flags;
Evas_Device *dev;
Evas_Object *event_src; /**< The Evas Object which actually triggered the event, used in cases of proxy event propagation */
};
struct _Evas_Event_Mouse_Wheel /** Wheel event */

@ -200,6 +200,8 @@ _evas_event_source_mouse_down_events(Evas_Object *eo_obj, Evas *eo_e, Evas_Event
_transform_to_src_space(obj, src, &ev->canvas.x, &ev->canvas.y);
ev->event_src = eo_obj;
if (src->proxy.src_event_in)
src->proxy.src_event_in = eina_list_free(src->proxy.src_event_in);
@ -270,6 +272,8 @@ _evas_event_source_mouse_move_events(Evas_Object *eo_obj, Evas *eo_e, Evas_Event
_transform_to_src_space(obj, src, &ev->cur.canvas.x, &ev->cur.canvas.y);
ev->event_src = eo_obj;
//FIXME: transform previous coords also.
Eina_List *l;
Evas_Object *eo_child;
@ -447,6 +451,8 @@ _evas_event_source_mouse_up_events(Evas_Object *eo_obj, Evas *eo_e, Evas_Event_M
_transform_to_src_space(obj, src, &ev->canvas.x, &ev->canvas.y);
ev->event_src = eo_obj;
Eina_List *l;
Evas_Object *eo_child;
Evas_Object_Protected_Data *child;
@ -771,6 +777,8 @@ _evas_event_source_mouse_in_events(Evas_Object *eo_obj, Evas *eo_e, Evas_Event_
_transform_to_src_space(obj, src, &ev->canvas.x, &ev->canvas.y);
ev->event_src = eo_obj;
Eina_List *ins = NULL;
if (src->is_smart)
{
@ -825,6 +833,8 @@ _evas_event_source_mouse_out_events(Evas_Object *eo_obj, Evas *eo_e, Evas_Event_
_transform_to_src_space(obj, src, &ev->canvas.x, &ev->canvas.y);
ev->event_src = eo_obj;
Eina_List *l;
Evas_Object *eo_child;
Eina_List *copy = evas_event_list_copy(src->proxy.src_event_in);

Loading…
Cancel
Save