[Top][All Lists]

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

Re: No possibility of determining image position/object from click

From: Richard Stallman
Subject: Re: No possibility of determining image position/object from click
Date: Sun, 9 Jun 2002 09:19:15 -0600 (MDT)

    GNU Emacs is missing an API for finding out where a click occured.  If
    I have a string or an image as part of a display property, or as a
    before-string or after-string, the only way to let Emacs react to
    clicks on different images differently is to generate individual
    keymaps for each of them.

I see.  All it provides is the buffer position, which won't tell
you the position within the before-string.

I think we should replace the buffer position with a list that gives
the full story.

      Even then, you cannot find out the
    relative coordinates of a click on such an image.

It does give the x and y pixel coordinates of the click.  If you can
determine the coordinates of a corner of the image, you can subtract
and get the relative position.  But I am not sure there is any way to
determine the corner's coordinates, if the image comes from a

In principle, these are good features to add.  Do you have an
immediate practical application for them?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]