Gets the cursor and window coordinates.
include <curses.h>
void getbegyx(WINDOW *win,
int y,
int x);
void getmaxyx(WINDOW *win, int y, int x);
void getparyx(WINDOW *win, int y, int x);
void getyx(WINDOW *win, int y, int x);
The getbegyx macro stores the absolute screen coordinates of the specified window's origin in y and x.
The getmaxyx macro stores the number of rows of the specified window in y and x and stores the window's number of columns in x.
The getparyx macro, if the specified window is a subwindow, stores in y and x the coordinates of the window's origin relative to its parent window. Otherwise, -1 is stored in y and x.
The getyx macro stores the cursor position of the specified window in y and x.
*win | Identifies the window to get the coordinates from. |
Y | Returns the row coordinate. |
X | Returns the column coordinate. |
To obtain the beginning coordinates for the my_win window and store in integers y and x, use:
WINDOW *my_win; int y, x; getbegyx(my_win, y, x);
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.
This subroutine is part of Base Operating System (BOS) Runtime.
Controlling the Cursor with Curses in AIX 5L Version 5.1 General Programming Concepts: Writing and Debugging Programs.
Curses Overview for Programming in AIX 5L Version 5.1 General Programming Concepts: Writing and Debugging Programs.
List of Curses Subroutines in AIX 5L Version 5.1 General Programming Concepts: Writing and Debugging Programs.