X-Git-Url: https://ncurses.scripts.mit.edu/?a=blobdiff_plain;f=man%2Fcurs_legacy.3x;fp=man%2Fcurs_legacy.3x;h=233a2d064e3a9c69266dc65ab0a1589c0b90ec64;hb=0eedaa5673ff8181abe51e3a6fadca3820f90c46;hp=86c0176f66d446744b4f51d7c9f91573ebed054b;hpb=bb55d9e3947102ec2554482d47d21402093f32e8;p=ncurses.git diff --git a/man/curs_legacy.3x b/man/curs_legacy.3x index 86c0176f..233a2d06 100644 --- a/man/curs_legacy.3x +++ b/man/curs_legacy.3x @@ -27,8 +27,8 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_legacy.3x,v 1.22 2023/09/16 23:37:03 tom Exp $ -.TH curs_legacy 3X 2023-09-16 "ncurses 6.4" "Library calls" +.\" $Id: curs_legacy.3x,v 1.27 2023/09/23 22:11:47 tom Exp $ +.TH curs_legacy 3X 2023-09-23 "ncurses 6.4" "Library calls" .de bP .ie n .IP \(bu 4 .el .IP \(bu 2 @@ -45,52 +45,50 @@ \fB\%getpary\fP \- get \fIcurses\fR cursor and window coordinates or attributes (legacy) .SH SYNOPSIS +.nf \fB#include \fP -.sp +.PP \fBint getattrs(const WINDOW *\fIwin\fB);\fR -.sp +.PP \fBint getbegx(const WINDOW *\fIwin\fB);\fR -.br \fBint getbegy(const WINDOW *\fIwin\fB);\fR -.sp +.PP \fBint getcurx(const WINDOW *\fIwin\fB);\fR -.br \fBint getcury(const WINDOW *\fIwin\fB);\fR -.sp +.PP \fBint getmaxx(const WINDOW *\fIwin\fB);\fR -.br \fBint getmaxy(const WINDOW *\fIwin\fB);\fR -.sp +.PP \fBint getparx(const WINDOW *\fIwin\fB);\fR -.br \fBint getpary(const WINDOW *\fIwin\fB);\fR +.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, @@ -98,19 +96,19 @@ 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, +when \fB\%NCURSES_OPAQUE\fP is defined. +The standard forms such as \fB\%getyx\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. +to avoid reliance on internal details of the \fB\%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)