window-body-height
window-body-height is a built-in function in `C source code
'.
(window-body-height &optional WINDOW PIXELWISE)
Return the height of WINDOW's text area.
WINDOW must be a live window and defaults to the selected one. Optional
argument PIXELWISE non-nil means return the height of WINDOW's text area
in pixels. The return value does not include the mode line or header
line or any horizontal divider.
If PIXELWISE is nil, return the largest integer smaller than WINDOW's
pixel height divided by the character height of WINDOW's frame. This
means that if a line at the bottom of the text area is only partially
visible, that line is not counted.