Treating an image like a button (kinda)



The goal I have is to have an image in a window (and nothing but the
image) and to be able to click on a location in the image and get
information about what you clicked on.  Perhaps someone has done
something like this, but in my searches through the gtk.org site, I've
been unable to find anything.

Sofar, I can display an image in a window.  I can also properly get
mouse input about whether a user has clicked a button, and if I
understand the event handling well enough in gtk, I believe I could
even tell whether or not the user has clicked on the image.  What I
need to do, however, is know where a user has clicked on an image, i.e.
mouse coordinates.  If it's possible to get the coordinates of a user's
mouse when they click on an image (and even possible to find out if a
user clicked an image, since I haven't tested it), could someone fill
me in?

Thanks,
Joe






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]