window-body-size
window-body-size is a compiled Lisp function in `window.el
'.
(window-body-size &optional WINDOW HORIZONTAL PIXELWISE)
Return the height or width of WINDOW's text area.
WINDOW must be a live window and defaults to the selected one.
If HORIZONTAL is omitted or nil, return the height of the text
area, like `window-body-height'. Otherwise, return the width of
the text area, like `window-body-width'. In either case, the
optional argument PIXELWISE is passed to the functions.