[cairo] DrawingArea events - cross posted

Bill Spitzak spitzak at thefoundry.co.uk
Fri Nov 9 04:53:00 PST 2007


Dirk Schönberger wrote:

>> I want to be able to bring "life" to each shape (rep by an object
>> internally)
>> such that they:
>> * detect mouse enter/leave
>> * detect mouse clicks
>> * detect key press

What would be really nice is yet another (!) type of cairo surface, a 
"hit detect" surface. This would have a surface-specific api to set the 
point of interest, and an api to set the "name" of what is being drawn 
(this has to be done so it is harmless if a non-hit-detect surface is 
passed). After drawing, there would be apis to return the name of 
whatever changed the (infinitely small) point at the interest. There 
probably would also be api's to return the nearest path (including 
whether we are inside it or not and the vertex number and 't' value of 
the intepolation function), the nearest glyph, etc.

Not suggesting that this be done now but it would be a good idea to make 
sure such a thing could be implemented.

-- 
Bill Spitzak, Senior Software Engineer
The Foundry, 1 Wardour Street, London, W1D 6PA, UK
Tel: +44 (0)20 7434 0449 * Fax: +44 (0)20 7434 1550 * Web: 
www.thefoundry.co.uk
The Foundry Visionmongers Ltd * Registered in England and Wales No: 4642027



More information about the cairo mailing list