Coordinates and Windows
=======================
This section describes how to relate screen coordinates to windows.
- Function: window-at x y &optional frame
This function returns the window containing the specified cursor
position in the frame FRAME. The coordinates X and Y are measured
in characters and count from the top left corner of the frame. If
they are out of range, `window-at' returns `nil'.
If you omit FRAME, the selected frame is used.
- Function: coordinates-in-window-p coordinates window
This function checks whether a particular frame position falls
within the window WINDOW.
The argument COORDINATES is a cons cell of the form `(X . Y)'.
The coordinates X and Y are measured in characters, and count from
the top left corner of the screen or frame.
The value returned by `coordinates-in-window-p' is non-`nil' if
the coordinates are inside WINDOW. The value also indicates what
part of the window the position is in, as follows:
`(RELX . RELY)'
The coordinates are inside WINDOW. The numbers RELX and RELY
are the equivalent window-relative coordinates for the
specified position, counting from 0 at the top left corner of
the window.
`mode-line'
The coordinates are in the mode line of WINDOW.
`header-line'
The coordinates are in the header line of WINDOW.
`vertical-line'
The coordinates are in the vertical line between WINDOW and
its neighbor to the right. This value occurs only if the
window doesn't have a scroll bar; positions in a scroll bar
are considered outside the window for these purposes.
`nil'
The coordinates are not in any part of WINDOW.
The function `coordinates-in-window-p' does not require a frame as
argument because it always uses the frame that WINDOW is on.