'\"macro stdmacro
.if n .pH g3x.curs_getyx @(#)curs_getyx	40.3 of 12/15/89
.\" Copyright 1989 AT&T
.\" ident	"@(#)svid_ti:ti_lib/curs_getyx	1.2"
.nr X
.if \nX=0 .ds x} curs_getyx 3X "" "\&"
.if \nX=1 .ds x} curs_getyx 3X ""
.if \nX=2 .ds x} curs_getyx 3X "" "\&"
.if \nX=3 .ds x} curs_getyx "" "" "\&"
.TH \*(x}
.SH NAME
\f4curs_getyx\f2: \f4 getyx\f1, \f4getparyx\f1, \f4getbegyx\f1, \f4getmaxyx\f1 \- get \f4curses\fP cursor and window coordinates
.SH SYNOPSIS
.nf
.ft 4
#include <curses.h>
.sp
void getyx(WINDOW *win, int y, int x);
.sp .5
void getparyx(WINDOW *win, int y, int x);
.sp .5
void getbegyx(WINDOW *win, int y, int x);
.sp .5
void getmaxyx(WINDOW *win, int y, int x);
.ft 1
.fi
.SH DESCRIPTION
With the \f4getyx\f1 macro, the cursor position of the window is placed
in the two integer variables \f2y\f1 and \f2x\f1.
.P
With the \f4getparyx\f1 macro, if \f2win\f1 is a subwindow,
the beginning coordinates of the subwindow relative to the
parent window are placed into two integer variables,
\f2y\f1 and \f2x\f1.
Otherwise, \f4\-1\f1 is placed into \f2y\f1 and \f2x\f1.
.P
Like \f4getyx\f1, the \f4getbegyx\f1 and \f4getmaxyx\f1
macros store the current beginning coordinates and size of the
specified window.
.SH RETURN VALUE
The return values of these macros are undefined
(\f2i.e.\f1, they should not be used as the
right-hand side of assignment statements).
.SH NOTES
.P
The header file \f4<curses.h>\f1 automatically includes the header files
\f4<stdio.h>\f1 and \f4<unctrl.h>\f1.
.PP
Note that all of these interfaces are macros and that
"\f4&\fP" is not necessary before the variables \f2y\f1 and \f2x\f1.
.SH SEE ALSO
.na
\f4curses\fP(3X).
.ad
