Hi all,

As this is my first post here, let me introduce myself. I am Andre
Moreira Magalhaes, aka andrunko, and I work for INdT in Brazil.

Now let's go to the point. I am working on a project that requires
that an Evas_Object to have a custom click area. This object is a
non-retangular object (a circle for eg) with a transparent backgroung.
When i click on the background of this object, if the click was in a
transparent area this object shouldn't receive any event. I was
investigating the Evas code and i found 3 ways that this could be
done.

1 - Change evas_object_was_in_output_rect to always return 0 if the
rect is in a transparent area of the object (not desired)
2 - Change evas_object_event_callback_call to return a boolean value
indicating if the object handled the event and if not, keep sending
event to the other objects in the list. If the object handled the
event, stop there. This would require a lot of changes.
3 - Change evas_object_was_in_output_rect to check a for a custom
"in_output_rect" method on the object, and if this method is set, use
it to check if the rect is in output rect. This would require a new
function, evas_object_is_in_output_rect_cb_set (or something similar)
that could be implemented whenever is needed. If this method is not
set, check the clip rectangle as it's done today.

In the current code, i could do repeat_events=1 to make both objects
receive the event, and do nothing on the circle object if the clicked
area is a transparent area. The problem is that this won't work for
the lower widget, as it's always receive the event, even if the circle
handled it.

Any other ideas on how to do it? I am willing to write a patch if you
agree. I would vote for number 3, as it's extensible, does not require
a lot of changes and does not impact on performance in the default
case (no custom is_in_output_rect method).

Any help is appreciate,
BR
Andrunko

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to