[cairo] help for mouse interaction

angelo angelo70 at gmail.com
Fri Jan 27 14:32:37 PST 2012

Hi all,

i need some help for the following case:

i am drawing on a gtk drawing area "expose" event using cairo.
I draw several layers (images, from png files) with transparency (alpha) 
and at the end, over them, i draw some circular buttons.
All these layers + buttons are "cairo_surface_t".
I am actually "drawing" the buttons since i can't create them as real 
gtk buttons over the drawing area.

I am looking for a way to know, after the left mouse "button click" 
event happen, what is the surface(button) i am over, to simulate a 
button-click event.
I could keep track of buttons images coordinates/size, but these images 
have a rectangular shape, so click will work also in the corners, 
outside of the round button shape, and this is not desired.

Any help/suggestion is really appreciated.

many thanks


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cairographics.org/archives/cairo/attachments/20120127/7b19b66d/attachment.html>

More information about the cairo mailing list