edje_callbacks: Add mouse,pressed,in/out signal.

Summary:
The mouse,in/out signal has missing parts to use.

When user send down event on specific object, then move cursor to outside of object.
the mouse,in signal must be called in case. but it's not in traditional implement.

So i added this signal for support above use case.
In order to satisfy above use case, user can add both of the signals(mouse,in mouse,pressed,in).
(Adding new name of signals to do not break compatibility with before implements.)

@feature

Test Plan:
Add mouse,pressed,in/out program to object.
Press object which added signals before.
Move mouse cursor to out of object, then check the program works.

Reviewers: Hermet, cedric, raster

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2992
This commit is contained in:
woochan lee 2015-12-23 18:58:43 +09:00 committed by Carsten Haitzler (Rasterman)
parent 8981f08555
commit 9ac9b26436
1 changed files with 12 additions and 2 deletions

View File

@ -273,7 +273,12 @@ _edje_mouse_move_signal_cb(void *data, Eo *obj, const Eo_Event_Description *desc
evas_object_geometry_get(obj, &x, &y, &w, &h);
if ((ev->cur.canvas.x < x) || (ev->cur.canvas.y < y) ||
(ev->cur.canvas.x >= (x + w)) || (ev->cur.canvas.y >= (y + h)))
rp->still_in = EINA_FALSE;
{
if ((ev->buttons) && ((!ev->event_flags) || (!ignored)))
_edje_emit(ed, "mouse,pressed,out", rp->part->name);
rp->still_in = EINA_FALSE;
}
}
}
else
@ -285,7 +290,12 @@ _edje_mouse_move_signal_cb(void *data, Eo *obj, const Eo_Event_Description *desc
evas_object_geometry_get(obj, &x, &y, &w, &h);
if ((ev->cur.canvas.x >= x) && (ev->cur.canvas.y >= y) &&
(ev->cur.canvas.x < (x + w)) && (ev->cur.canvas.y < (y + h)))
rp->still_in = EINA_TRUE;
{
if ((ev->buttons) && ((!ev->event_flags) || (!ignored)))
_edje_emit(ed, "mouse,pressed,in", rp->part->name);
rp->still_in = EINA_TRUE;
}
}
}
_edje_util_freeze(ed);