aboutsummaryrefslogtreecommitdiff
path: root/man/curs_legacy.3x
diff options
context:
space:
mode:
Diffstat (limited to 'man/curs_legacy.3x')
-rw-r--r--man/curs_legacy.3x132
1 files changed, 81 insertions, 51 deletions
diff --git a/man/curs_legacy.3x b/man/curs_legacy.3x
index c2eb86b8834c..24be01b85269 100644
--- a/man/curs_legacy.3x
+++ b/man/curs_legacy.3x
@@ -1,5 +1,5 @@
.\"***************************************************************************
-.\" Copyright 2019,2020 Thomas E. Dickey *
+.\" Copyright 2019-2023,2024 Thomas E. Dickey *
.\" Copyright 2007-2015,2017 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
@@ -27,82 +27,112 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_legacy.3x,v 1.12 2020/10/18 00:16:04 tom Exp $
+.\" $Id: curs_legacy.3x,v 1.32 2024/03/16 15:35:01 tom Exp $
+.TH curs_legacy 3X 2024-03-16 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls"
+.ie \n(.g \{\
+.ds `` \(lq
+.ds '' \(rq
+.\}
+.el \{\
+.ie t .ds `` ``
+.el .ds `` ""
+.ie t .ds '' ''
+.el .ds '' ""
+.\}
+.
.de bP
.ie n .IP \(bu 4
.el .IP \(bu 2
..
-.TH curs_legacy 3X ""
.SH NAME
-curs_legacy \- get \fBcurses\fP cursor and window coordinates, attributes
+\fB\%getattrs\fP,
+\fB\%getbegx\fP,
+\fB\%getbegy\fP,
+\fB\%getcurx\fP,
+\fB\%getcury\fP,
+\fB\%getmaxx\fP,
+\fB\%getmaxy\fP,
+\fB\%getparx\fP,
+\fB\%getpary\fP \-
+get \fIcurses\fR cursor and window coordinates or attributes (legacy)
.SH SYNOPSIS
-\fB#include <curses.h>\fP
-.sp
-\fBint getattrs(const WINDOW *\fP\fIwin\fP\fB);\fP
-.sp
-\fBint getbegx(const WINDOW *\fP\fIwin\fP\fB);\fP
-.br
-\fBint getbegy(const WINDOW *\fP\fIwin\fP\fB);\fP
-.sp
-\fBint getcurx(const WINDOW *\fP\fIwin\fP\fB);\fP
-.br
-\fBint getcury(const WINDOW *\fP\fIwin\fP\fB);\fP
-.sp
-\fBint getmaxx(const WINDOW *\fP\fIwin\fP\fB);\fP
-.br
-\fBint getmaxy(const WINDOW *\fP\fIwin\fP\fB);\fP
-.sp
-\fBint getparx(const WINDOW *\fP\fIwin\fP\fB);\fP
-.br
-\fBint getpary(const WINDOW *\fP\fIwin\fP\fB);\fP
-.br
+.nf
+\fB#include <curses.h>
+.PP
+\fBint getattrs(const WINDOW *\fIwin\fP);
+.PP
+\fBint getbegx(const WINDOW *\fIwin\fP);
+\fBint getbegy(const WINDOW *\fIwin\fP);
+.PP
+\fBint getcurx(const WINDOW *\fIwin\fP);
+\fBint getcury(const WINDOW *\fIwin\fP);
+.PP
+\fBint getmaxx(const WINDOW *\fIwin\fP);
+\fBint getmaxy(const WINDOW *\fIwin\fP);
+.PP
+\fBint getparx(const WINDOW *\fIwin\fP);
+\fBint getpary(const WINDOW *\fIwin\fP);
+.fi
.SH DESCRIPTION
-These legacy functions are simpler to use than the X/Open Curses functions:
+These legacy functions are simpler to use
+than the X/Open \fIcurses\fP functions:
.bP
-The \fBgetattrs\fP function returns the same attribute data as \fBwattr_get\fP.
+The \fB\%getattrs\fP function returns the same attribute data
+as \fB\%wattr_get\fP.
.IP
-However, \fBgetattrs\fP returns an integer (actually a \fBchtype\fP),
-while \fBwattr_get\fP returns the current color pair in a separate parameter.
+However, \fB\%getattrs\fP returns an integer (actually a \fB\%chtype\fP),
+while \fB\%wattr_get\fP returns the current color pair in a separate parameter.
In the wide-character library configuration,
-color pairs may not fit into a \fBchtype\fP,
-so \fBwattr_get\fP is the only way to obtain the color information.
+color pairs may not fit into a \fB\%chtype\fP,
+so \fB\%wattr_get\fP is the only way to obtain the color information.
.IP
-Because \fBgetattrs\fP returns the attributes in a single parameter,
+Because \fB\%getattrs\fP returns the attributes in a single parameter,
it would not be possible for an application to distinguish that from
\fBERR\fP (a \fI-1\fP).
-If the window parameter is null, \fBgetattrs\fP returns \fBA_NORMAL\fP (zero).
+If the window parameter is null, \fB\%getattrs\fP
+returns \fB\%A_NORMAL\fP (zero).
.bP
-The \fBgetbegy\fP and \fBgetbegx\fP functions return the same
-data as \fBgetbegyx\fP.
+The \fB\%getbegy\fP and \fB\%getbegx\fP functions return the same
+data as \fB\%getbegyx\fP.
.bP
-The \fBgetcury\fP and \fBgetcurx\fP functions return the same
-data as \fBgetyx\fP.
+The \fB\%getcury\fP and \fB\%getcurx\fP functions return the same
+data as \fB\%getyx\fP.
.bP
-The \fBgetmaxy\fP and \fBgetmaxx\fP functions return the same
-data as \fBgetmaxyx\fP.
+The \fB\%getmaxy\fP and \fB\%getmaxx\fP functions return the same
+data as \fB\%getmaxyx\fP.
.bP
-The \fBgetpary\fP and \fBgetparx\fP functions return the same
-data as \fBgetparyx\fP.
+The \fB\%getpary\fP and \fB\%getparx\fP functions return the same
+data as \fB\%getparyx\fP.
.SH RETURN VALUE
Except as noted,
these functions return an integer,
or \fBERR\fP if the window parameter is null.
.SH NOTES
-All of these interfaces are provided as macros and functions.
-The macros are suppressed (and only the functions provided)
-when \fBNCURSES_OPAQUE\fP is defined.
-The standard forms such as \fBgetyx\fP must be implemented as macros,
-and (in this implementation) are defined in terms of the functions
-described here,
-to avoid reliance on internal details of the WINDOW structure.
+All of these interfaces are implemented as macros and functions.
+The macros are suppressed
+(and only the functions provided)
+in an \*(``opaque\*(''
+.I \%ncurses
+build,
+which defines the preprocessor symbol
+.BR \%NCURSES_OPAQUE .
+See section \*(``ALTERNATE CONFIGURATIONS\*('' in \fB\%ncurses\fP(3X).
+.PP
+The standard forms such as \fB\%getyx\fP
+.I must
+be implemented as macros,
+and
+(in this implementation)
+are defined in terms of the functions described here,
+to avoid reliance on internal details of the \fI\%WINDOW\fP structure.
.SH PORTABILITY
These functions were supported on Version 7, BSD or System V implementations.
None of those implementations checked the window parameter.
.PP
-The \fBgetattrs\fP function and macro are defined to return a (signed) integer
+The \fB\%getattrs\fP function and macro are defined to return a (signed) integer
for compatibility with those implementations
although an unsigned type would have been more appropriate.
.SH SEE ALSO
-\fBcurses\fP(3X),
-\fBcurs_getyx\fP(3X),
-\fBcurs_opaque\fP(3X)
+\fB\%curses\fP(3X),
+\fB\%curs_getyx\fP(3X),
+\fB\%curs_opaque\fP(3X)