]> ncurses.scripts.mit.edu Git - ncurses.git/blob - man/curs_getyx.3x
87df1622f54f929384ad25048c4860e6bcde4c24
[ncurses.git] / man / curs_getyx.3x
1 .\"***************************************************************************
2 .\" Copyright (c) 1998,2002 Free Software Foundation, Inc.                   *
3 .\"                                                                          *
4 .\" Permission is hereby granted, free of charge, to any person obtaining a  *
5 .\" copy of this software and associated documentation files (the            *
6 .\" "Software"), to deal in the Software without restriction, including      *
7 .\" without limitation the rights to use, copy, modify, merge, publish,      *
8 .\" distribute, distribute with modifications, sublicense, and/or sell       *
9 .\" copies of the Software, and to permit persons to whom the Software is    *
10 .\" furnished to do so, subject to the following conditions:                 *
11 .\"                                                                          *
12 .\" The above copyright notice and this permission notice shall be included  *
13 .\" in all copies or substantial portions of the Software.                   *
14 .\"                                                                          *
15 .\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  *
16 .\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               *
17 .\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   *
18 .\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   *
19 .\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    *
20 .\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    *
21 .\" THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               *
22 .\"                                                                          *
23 .\" Except as contained in this notice, the name(s) of the above copyright   *
24 .\" holders shall not be used in advertising or otherwise to promote the     *
25 .\" sale, use or other dealings in this Software without prior written       *
26 .\" authorization.                                                           *
27 .\"***************************************************************************
28 .\"
29 .\" $Id: curs_getyx.3x,v 1.8 2002/09/21 19:00:38 tom Exp $
30 .TH curs_getyx 3X ""
31 .SH NAME
32 .IX getbegx
33 .IX getbegy
34 .IX getcurx
35 .IX getcury
36 .IX getmaxx
37 .IX getmaxy
38 .IX getparx
39 .IX getpary
40 \fBgetyx\fR,
41 \fBgetparyx\fR,
42 \fBgetbegyx\fR,
43 \fBgetmaxyx\fR - get \fBcurses\fR cursor and window coordinates
44 .SH SYNOPSIS
45 \fB#include <curses.h>\fR
46
47 \fBvoid getyx(WINDOW *win, int y, int x);\fR
48 .br
49 \fBvoid getparyx(WINDOW *win, int y, int x);\fR
50 .br
51 \fBvoid getbegyx(WINDOW *win, int y, int x);\fR
52 .br
53 \fBvoid getmaxyx(WINDOW *win, int y, int x);\fR
54 .br
55 .SH DESCRIPTION
56 The \fBgetyx\fR macro places the current cursor position of the given window in
57 the two integer variables \fIy\fR and \fIx\fR.
58
59 If \fIwin\fR is a subwindow, the \fBgetparyx\fR macro places the beginning
60 coordinates of the subwindow relative to the parent window into two integer
61 variables \fIy\fR and \fIx\fR.
62 Otherwise, \fB-1\fR is placed into \fIy\fR and \fIx\fR.
63
64 Like \fBgetyx\fR, the \fBgetbegyx\fR and \fBgetmaxyx\fR macros store
65 the current beginning coordinates and size of the specified window.
66 .SH RETURN VALUE
67 The return values of these macros are undefined (\fIi\fR.\fIe\fR.,
68 they should not be used as the right-hand side of assignment statements).
69 .SH NOTES
70 All of these interfaces are macros.
71 A "\fB&\fR" is not necessary before the variables \fIy\fR and \fIx\fR.
72 .SH PORTABILITY
73 The
74 \fBgetyx\fR,
75 \fBgetparyx\fR,
76 \fBgetbegyx\fR and
77 \fBgetmaxyx\fR
78 functions are described in the XSI Curses standard, Issue 4.
79 .PP
80 This implementation also provides
81 \fBgetbegx\fR,
82 \fBgetbegy\fR,
83 \fBgetcurx\fR,
84 \fBgetcury\fR,
85 \fBgetmaxx\fR,
86 \fBgetmaxy\fR,
87 \fBgetparx\fR and
88 \fBgetpary\fR
89 for compatibility with older versions of curses.
90 .SH SEE ALSO
91 \fBcurses\fR(3X)
92 .\"#
93 .\"# The following sets edit modes for GNU EMACS
94 .\"# Local Variables:
95 .\"# mode:nroff
96 .\"# fill-column:79
97 .\"# End: