'\" te .\" Copyright 1989 AT&T .\" Portions Copyright (c) 1996, Sun Microsystems, Inc. All Rights Reserved. .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] .TH CURS_GETYX 3CURSES "Dec 31, 1996" .SH NAME curs_getyx, getyx, getparyx, getbegyx, getmaxyx \- get curses cursor and window coordinates .SH SYNOPSIS .LP .nf \fBcc\fR [ \fIflag\fR ... ] \fIfile\fR ... \fB-lcurses\fR [ \fIlibrary\fR ... ] #include \fBvoid\fR \fBgetyx\fR(\fBWINDOW *\fR\fIwin\fR, \fBint\fR \fIy\fR, \fBint\fR \fIx\fR); .fi .LP .nf \fBvoid\fR \fBgetparyx\fR(\fBWINDOW *\fR\fIwin\fR, \fBint\fR \fIy\fR, \fBint\fR \fIx\fR); .fi .LP .nf \fBvoid\fR \fBgetbegyx\fR(\fBWINDOW *\fR\fIwin\fR, \fBint\fR \fIy\fR, \fBint\fR \fIx\fR); .fi .LP .nf \fBvoid\fR \fBgetmaxyx\fR(\fBWINDOW *\fR\fIwin\fR, \fBint\fR \fIy\fR, \fBint\fR \fIx\fR); .fi .SH DESCRIPTION .sp .LP With the \fBgetyx()\fR macro, the cursor position of the window is placed in the two integer variables \fIy\fR and \fIx\fR. .sp .LP With the \fBgetparyx()\fR macro, if \fIwin\fR is a subwindow, the beginning coordinates of the subwindow relative to the parent window are placed into two integer variables, \fIy\fR and \fIx\fR. Otherwise, \fB\(mi1\fR is placed into \fIy\fR and \fIx\fR. .sp .LP Like \fBgetyx()\fR \fB,\fR the \fBgetbegyx()\fR and \fBgetmaxyx()\fR macros store the current beginning coordinates and size of the specified window. .SH RETURN VALUES .sp .LP The return values of these macros are undefined (that is, they should not be used as the right-hand side of assignment statements). .SH ATTRIBUTES .sp .LP See \fBattributes\fR(7) for descriptions of the following attributes: .sp .sp .TS box; c | c l | l . ATTRIBUTE TYPE ATTRIBUTE VALUE _ MT-Level Unsafe .TE .SH SEE ALSO .sp .LP .BR curses (3CURSES), .BR attributes (7) .SH NOTES .sp .LP The header <\fBcurses.h\fR> automatically includes the headers <\fBstdio.h\fR> and <\fBunctrl.h\fR>. .sp .LP Note that all of these interfaces are macros and that ``\fB&\fR\&'' is not necessary before the variables \fIy\fR and \fIx\fR.