getbegyx(3X) getbegyx(3X)
NAME
getbegyx, getmaxyx, getparyx, getyx - get cursor and window coordi-
nates
SYNOPSIS
cc [flag ...] file ... -lcurses [library ...]
#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);
DESCRIPTION
The getyx() macro stores the cursor position of the specified window
in y and 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, - is stored in y and 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 stores the window's number of columns in x.
RETURN VALUE
No return values are defined.
ERRORS
No errors are defined.
NOTES
These interfaces are macros and "&" cannot be used before the y and x
arguments.
Traditional implementations have often defined the following macros:
void getbegx(WINDOW *win, int x);
void getbegy(WINDOW *win, int y);
void getmaxx(WINDOW *win, int x);
void getmaxy(WINDOW *win, int y);
void getparx(WINDOW *win, int x);
void getpary(WINDOW *win, int y);
Page 1 Reliant UNIX 5.44 Printed 11/98
getbegyx(3X) getbegyx(3X)
Although getbegyx(), getmaxyx() and getparyx() provide the required
functionality, this does not preclude applications from defining these
macros for their own use. For example, to implement
void getbegx(WINDOW *win, int x);
the macro would be
#define getbegx(win,x) \
{ \
int y; \
\
getbegyx(win,y,x); \
}
SEE ALSO
curses(3X), curses(5).
Page 2 Reliant UNIX 5.44 Printed 11/98