]> ncurses.scripts.mit.edu Git - ncurses.git/blob - man/curs_getyx.3x
ncurses 4.1
[ncurses.git] / man / curs_getyx.3x
1 .TH curs_getyx 3X ""
2 .SH NAME
3 \fBgetyx\fR, \fBgetparyx\fR, \fBgetbegyx\fR,
4 \fBgetmaxyx\fR - get \fBcurses\fR cursor and window coordinates
5 .SH SYNOPSIS
6 \fB#include <curses.h>\fR
7
8 \fBvoid getyx(WINDOW *win, int y, int x);\fR
9 .br
10 \fBvoid getparyx(WINDOW *win, int y, int x);\fR
11 .br
12 \fBvoid getbegyx(WINDOW *win, int y, int x);\fR
13 .br
14 \fBvoid getmaxyx(WINDOW *win, int y, int x);\fR
15 .br
16 .SH DESCRIPTION
17 The \fBgetyx\fR macro places the current cursor position of the given window in
18 the two integer variables \fIy\fR and \fIx\fR.
19
20 If \fIwin\fR is a subwindow, the \fBgetparyx\fR macro places the beginning
21 coordinates of the subwindow relative to the parent window into two integer
22 variables \fIy\fR and \fIx\fR.  Otherwise, \fB-1\fR is placed into \fIy\fR and
23 \fIx\fR.
24
25 Like \fBgetyx\fR, the \fBgetbegyx\fR and \fBgetmaxyx\fR macros store
26 the current beginning coordinates and size of the specified window.
27 .SH RETURN VALUE
28 The return values of these macros are undefined (\fIi\fR.\fIe\fR.,
29 they should not be used as the right-hand side of assignment
30 statements).
31 .SH NOTES
32 All of these interfaces are macros and that "\fB&\fR" is not
33 necessary before the variables \fIy\fR and \fIx\fR.
34 .SH PORTABILITY
35 These functions are described in the XSI Curses standard, Issue 4.
36 .SH SEE ALSO
37 \fBcurses\fR(3X)
38 .\"#
39 .\"# The following sets edit modes for GNU EMACS
40 .\"# Local Variables:
41 .\"# mode:nroff
42 .\"# fill-column:79
43 .\"# End: