window-size

window-size is a compiled Lisp function in `window.el'.

(window-size &optional WINDOW HORIZONTAL PIXELWISE ROUND)

Return the height or width of WINDOW.
WINDOW must be a valid window and defaults to the selected one.

If HORIZONTAL is omitted or nil, return the total height of
WINDOW, in lines, like `window-total-height'. Otherwise return
the total width, in columns, like `window-total-width'.

Optional argument PIXELWISE means return the pixel size of WINDOW
like `window-pixel-height' and `window-pixel-width'.

Optional argument ROUND is ignored if PIXELWISE is non-nil and
handled as for `window-total-height' and `window-total-width'
otherwise.