summaryrefslogtreecommitdiff
path: root/lib/libcurses/curs_getyx.3
blob: e5ec044250d7d29dd86c31e0ea2dc6b9e3e5998d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
.\" $OpenBSD: curs_getyx.3,v 1.3 1997/12/03 05:44:57 millert Exp $
.TH curs_getyx 3 ""
.SH NAME
\fBgetyx\fR, \fBgetparyx\fR, \fBgetbegyx\fR,
\fBgetmaxyx\fR - get \fBcurses\fR cursor and window coordinates
.SH SYNOPSIS
\fB#include <curses.h>\fR

\fBvoid getyx(WINDOW *win, int y, int x);\fR
.br
\fBvoid getparyx(WINDOW *win, int y, int x);\fR
.br
\fBvoid getbegyx(WINDOW *win, int y, int x);\fR
.br
\fBvoid getmaxyx(WINDOW *win, int y, int x);\fR
.br
.SH DESCRIPTION
The \fBgetyx\fR macro places the current cursor position of the given window in
the two integer variables \fIy\fR and \fIx\fR.

If \fIwin\fR is a subwindow, the \fBgetparyx\fR macro places the beginning
coordinates of the subwindow relative to the parent window into two integer
variables \fIy\fR and \fIx\fR.  Otherwise, \fB-1\fR is placed into \fIy\fR and
\fIx\fR.

Like \fBgetyx\fR, the \fBgetbegyx\fR and \fBgetmaxyx\fR macros store
the current beginning coordinates and size of the specified window.
.SH RETURN VALUE
The return values of these macros are undefined (\fIi\fR.\fIe\fR.,
they should not be used as the right-hand side of assignment
statements).
.SH NOTES
All of these interfaces are macros and that "\fB&\fR" is not
necessary before the variables \fIy\fR and \fIx\fR.
.SH PORTABILITY
These functions are described in the XSI Curses standard, Issue 4.
.SH SEE ALSO
\fBcurses\fR(3)
.\"#
.\"# The following sets edit modes for GNU EMACS
.\"# Local Variables:
.\"# mode:nroff
.\"# fill-column:79
.\"# End: