Returns the coordinates of the logical cursor in the specified window.
Curses Library (libcurses.a)
The getyx macro returns the coordinates of the logical cursor in the specified window.
Item | Description |
---|---|
Window | Identifies the window to get the cursor location from. |
Column | Holds the column coordinate of the logical cursor. |
Line | Holds the line or row coordinate of the logical cursor. |
To get the location of the logical cursor in the user-defined window my_window and then put these coordinates in the user-defined integer variables Line and Column, enter:
WINDOW *my_window;
int line, column;
getyx(my_window, line, column);