evas: add new event_grabber smart-ish object
authorMike Blumenkrantz <zmike@osg.samsung.com>
Sat, 10 Jun 2017 00:16:08 +0000 (20:16 -0400)
committerMike Blumenkrantz <zmike@osg.samsung.com>
Sat, 10 Jun 2017 00:06:19 +0000 (20:06 -0400)
commit7fafbdee28e2255b67b84995f10383073018bb43
tree38a2218de25d8ebbee25d868d018d187a42022e3
parentdd42f8f29199d87a3f825b36d5f7e0f50fc01179
evas: add new event_grabber smart-ish object

adding an "event rect" is a common use case for rectangles, but I needed
a smarter event rect so I sent one off to school and it came back like this.

an event_grabber is a smart object which functions like a normal event rect
which has color(0,0,0,0), but with an important difference: it can have smart
members. event propagation works differently for an event_grabber:

normal:
event -> layer -> smart(obj1,obj2,obj3) ->(?) other objects
in this case, obj1,obj2,obj3 are all "inside" the smart object and their stacking
will always be considered as being inside the smart object. rendering is also
tied to the smart object in this case, as is clipping.
an event which reaches a smart object will be sent to the objects inside,
and then may continue through the smart object if there are no objects which
block repeating.

event_grabber:
event -> layer -> event_grabber -> obj1,obj2,obj3 -> STOP
in this case, obj1,obj2,obj3 are unmodified after being added to the event_grabber
and can be stacked, rendered, and clipped completely independently of the
event_grabber.
the event_grabber is considered an "event_parent" for this case. member objects
are not "inside" the event_grabber, and they are unable to receive events on
their own. instead, the event_grabber, which must be stacked above all its
members, receives events and propagates them top->down through its member objects.
if none of the member objects block the repeat of an event then the event will
still be blocked from further propagation past the event_grabber.

object lifetimes are independent of the event_grabber; deleting the event_grabber
has no effect on its members.

@feature
src/Makefile_Evas.am
src/lib/evas/Evas_Eo.h
src/lib/evas/Evas_Legacy.h
src/lib/evas/canvas/efl_canvas_object_event_grabber.c [new file with mode: 0644]
src/lib/evas/canvas/efl_canvas_object_event_grabber.eo [new file with mode: 0644]
src/lib/evas/canvas/evas_callbacks.c
src/lib/evas/canvas/evas_events.c
src/lib/evas/include/evas_private.h