Returns the size of a window.
Curses Library (libcurses.a)
The getmaxyx subroutine returns the size of a window. The size is returned as the number of rows and columns in the window. The values are stored in integers Y and X.
Item | Description |
---|---|
Window | Identifies the window whose size to get. |
Y | Contains the number of rows in the window. |
X | Contains the number of columns in the window. |
To obtain the size of the my_win window, use:
WINDOW *my_win;
int y,x;
getmaxyx(my_win, y, x);
Integers y and x will contain the size of the window.