Function: window-inside-edges

Return a list of the edge coordinates of WINDOW.
WINDOW must be a live window and defaults to the selected one.

The returned list has the form (LEFT TOP RIGHT BOTTOM). TOP and BOTTOM
count by lines, and LEFT and RIGHT count by columns, all relative to 0,
0 at top left corner of frame.

RIGHT is one more than the rightmost column of WINDOW's text area.
BOTTOM is one more than the bottommost row of WINDOW's text area. The
inside edges do not include the space used by the WINDOW's scroll bar,
display margins, fringes, header line, and/or mode line. (fn &optional WINDOW)