Next: Event Text Position Info, Previous: Frame-Level Event Position Info, Up: Accessing Mouse Event Positions [Contents][Index]
The following functions return window-level information about where a mouse event occurred.
Given a mouse motion, button press, button release, or misc-user event,
compute and return the window on which that event occurred. This may be
nil
if the event occurred in the border or over a toolbar. The
modeline is considered to be within the window it describes.
Given a mouse motion, button press, button release, or misc-user event,
compute and return the buffer of the window on which that event
occurred. This may be nil
if the event occurred in the border or
over a toolbar. The modeline is considered to be within the window it
describes. This is equivalent to calling event-window
and then
calling window-buffer
on the result if it is a window.
This function returns the X position in pixels of the given mouse event. The value returned is relative to the window the event occurred in. This will signal an error if the event is not a mouse-motion, button-press, button-release, or misc-user event.
This function returns the Y position in pixels of the given mouse event. The value returned is relative to the window the event occurred in. This will signal an error if the event is not a mouse-motion, button-press, button-release, or misc-user event.