Retrieves the current coordinates of the virtual screen cursor.
#include <curses.h>
getsyx(Y, X) int *Y, *X;
The getsyx subroutine retrieves the current coordinates of the virtual screen cursor and stores them in the location specified by Y and X. The current coordinates are those where the cursor was placed after the last call to the wnoutrefresh, pnoutrefresh, or wrefresh, subroutine. If the leaveok subroutine was TRUE for the last window refreshed, then the getsyx subroutine returns -1 for both X and Y.
If lines have been removed from the top of the screen using the ripoffline subroutine, Y and X include these lines. Y and X should only be used as arguments for the setsyx subroutine.
The getsyx subroutine, along with the setsyx subroutine, is meant to be used by a user-defined function that manipulates curses windows but wants the position of the cursor to remain the same. Such a function would do the following:
This routine is part of Base Operating System (BOS) Runtime.
Curses Overview for Programming in AIX Version 4.3 General Programming Concepts: Writing and Debugging Programs.
Controlling the Cursor with Curses in AIX Version 4.3 General Programming Concepts: Writing and Debugging Programs.
List of Curses Subroutines in AIX Version 4.3 General Programming Concepts: Writing and Debugging Programs.