1 .\"***************************************************************************
2 .\" Copyright 2020-2023,2024 Thomas E. Dickey *
3 .\" Copyright 1998-2007,2010 Free Software Foundation, Inc. *
5 .\" Permission is hereby granted, free of charge, to any person obtaining a *
6 .\" copy of this software and associated documentation files (the *
7 .\" "Software"), to deal in the Software without restriction, including *
8 .\" without limitation the rights to use, copy, modify, merge, publish, *
9 .\" distribute, distribute with modifications, sublicense, and/or sell *
10 .\" copies of the Software, and to permit persons to whom the Software is *
11 .\" furnished to do so, subject to the following conditions: *
13 .\" The above copyright notice and this permission notice shall be included *
14 .\" in all copies or substantial portions of the Software. *
16 .\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
17 .\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
18 .\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
19 .\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
20 .\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
21 .\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
22 .\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
24 .\" Except as contained in this notice, the name(s) of the above copyright *
25 .\" holders shall not be used in advertising or otherwise to promote the *
26 .\" sale, use or other dealings in this Software without prior written *
28 .\"***************************************************************************
30 .\" $Id: curs_getyx.3x,v 1.45 2024/05/11 20:39:53 tom Exp $
31 .TH curs_getyx 3X 2024-05-11 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls"
48 get \fIcurses\fR cursor and window coordinates
51 \fB#include <curses.h>
53 \fBvoid getyx(WINDOW *\fIwin\fP, int \fIy\fP, int \fIx\fP);
54 \fBvoid getbegyx(WINDOW *\fIwin\fP, int \fIy\fP, int \fIx\fP);
55 \fBvoid getmaxyx(WINDOW *\fIwin\fP, int \fIy\fP, int \fIx\fP);
57 \fBvoid getparyx(WINDOW *\fIwin\fP, int \fIy\fP, int \fIx\fP);
60 These macros obtain the cursor position and bounds information of a
67 cursor position in the variables
74 maximum valid row and column numbers in
80 similarly stores the position of
82 origin relative to that of the screen
85 these coordinates are always
91 (see \fB\%subwin\fP(3X)),
94 macro places the coordinates of its origin relative to its parent window
101 into both if it is not.
103 No return values are defined for macros.
104 Do not use them as the right-hand side of assignment statements.
106 All of these interfaces are implemented as macros.
107 An \*(``&\*('' operator is not necessary before the variables
112 These macros are described in X/Open Curses,
116 also provides functions
126 for compatibility with older versions of
128 see \fB\%curs_legacy\fP(3X).
130 Although X/Open Curses does not address the issue,
131 many implementations expose members of the
133 structure containing values corresponding to these macros.
134 Do not rely on their availability;
135 some implementations make
139 they do not allow direct access to its members).
141 Besides the problem of opaque structures,
142 the data stored in like-named members may not have values of the same
143 meaning different implementations.
152 .\" (at least since its initial release, 1.8.1)
153 differed by one from some other implementations.
156 macro hides this difference.
159 \fB\%curs_legacy\fP(3X),
160 \fB\%curs_opaque\fP(3X)