mouse events on pixel drawing

Tomas By <[email protected]> Sat, 06 Feb 2016 11:47:20 +0100
Newsgroups gmane.lisp.guile.gtk
Message-ID <[email protected]>
Hello everybody,

What is the best way to connect mouse events to lines and dots on a 
drawing?

Right now I am thinking I will do my own separate calculation of the 
pixels when I draw (on a drawing area), and store a mapping from those 
pixels to the elements (ie lines and dots) which I can then use in the 
mouse event.

However, this feels extremely primitive.

Is there a better way to do this in Gnome/GTK?

/Tomas