X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=man%2Fcurs_attr.3x;h=e884fa888bb0f3586d3b4ee984d8ad3a786b71f7;hp=d9568a5fc7d1e5f960c2283620d51f8b63fac01c;hb=b1f61d9f3aa244512045a6b02e759825d7049d34;hpb=3a9b6a3bf0269231bef7de74757a910dedd04e0c diff --git a/man/curs_attr.3x b/man/curs_attr.3x index d9568a5f..e884fa88 100644 --- a/man/curs_attr.3x +++ b/man/curs_attr.3x @@ -1,9 +1,45 @@ -.\" $Id: curs_attr.3x,v 1.12 1997/01/05 01:14:33 tom Exp $ +'\" t +.\"*************************************************************************** +.\" Copyright (c) 1998,2000 Free Software Foundation, Inc. * +.\" * +.\" Permission is hereby granted, free of charge, to any person obtaining a * +.\" copy of this software and associated documentation files (the * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_attr.3x,v 1.22 2000/07/08 11:59:58 tom Exp $ .TH curs_attr 3X "" .SH NAME \fBattroff\fR, \fBwattroff\fR, \fBattron\fR, \fBwattron\fR, -\fBattrset\fR, \fBwattrset\fR, \fBstandend\fR, \fBwstandend\fR, \fBstandout\fR, -\fBwstandout\fR - \fBcurses\fR character and window attribute control routines +\fBattrset\fR, \fBwattrset\fR, \fBcolor_set\fR, \fBwcolor_set\fR, +\fBstandend\fR, \fBwstandend\fR, \fBstandout\fR, \fBwstandout\fR, +\fBattr_get\fR, \fBwattr_get\fR, +\fBattr_off\fR, \fBwattr_off\fR, +\fBattr_on\fR, \fBwattr_on\fR, +\fBattr_set\fR, \fBwattr_set\fR, +\fBchgat\fR, \fBwchgat\fR, +\fBmvchgat\fR, \fBmvwchgat\fR, +\fBPAIR_NUMBER\fR - \fBcurses\fR character and window attribute control routines .SH SYNOPSIS \fB#include \fR .br @@ -19,6 +55,11 @@ .br \fBint wattrset(WINDOW *win, int attrs);\fR .br +\fBint color_set(short color_pair_number, void* opts);\fR +.br +\fBint wcolor_set(WINDOW *win, short color_pair_number,\fR + \fBvoid* opts);\fR +.br \fBint standend(void);\fR .br \fBint wstandend(WINDOW *win);\fR @@ -27,32 +68,34 @@ .br \fBint wstandout(WINDOW *win);\fR .br -\fBattr_t attr_get(void);\fR +\fBint attr_get(attr_t *attrs, short *pair, void *opts);\fR .br -\fBattr_t wattr_get(WINDOW *);\fR +\fBint wattr_get(WINDOW *win, attr_t *attrs, short *pair,\fR + \fBvoid *opts);\fR .br -\fBint attr_off(attr_t attrs);\fR +\fBint attr_off(attr_t attrs, void *opts);\fR .br -\fBint wattr_off(WINDOW *, attr_t attrs);\fR +\fBint wattr_off(WINDOW *win, attr_t attrs, void *opts);\fR .br -\fBint attr_on(attr_t attrs);\fR +\fBint attr_on(attr_t attrs, void *opts);\fR .br -\fBint wattr_on(WINDOW *, attr_t attrs);\fR +\fBint wattr_on(WINDOW *win, attr_t attrs, void *opts);\fR .br -\fBint attr_set(attr_t attrs);\fR +\fBint attr_set(attr_t attrs, short pair, void *opts);\fR .br -\fBint wattr_set(WINDOW *, attr_t attrs);\fR +\fBint wattr_set(WINDOW *win, attr_t attrs, short pair, void *opts);\fR .br -\fBint chgat(int n, attr_t attr, short color, const void *opts)\fR +\fBint chgat(int n, attr_t attr, short color,\fR + \fBconst void *opts)\fR .br -\fBint wchgat(WINDOW *, int n, attr_t attr, - short color, const void *opts)\fR +\fBint wchgat(WINDOW *win, int n, attr_t attr,\fR + \fBshort color, const void *opts)\fR .br -\fBint mvchgat(int y, int x, int n, attr_t attr, - short color, const void *opts)\fR +\fBint mvchgat(int y, int x, int n, attr_t attr,\fR + \fBshort color, const void *opts)\fR .br -\fBint mvwchgat(WINDOW *, int y, int x, int n, attr_t attr, - short color, const void *opts)\fR +\fBint mvwchgat(WINDOW *win, int y, int x, int n,\fR + \fBattr_t attr, short color, const void *opts)\fR .br .SH DESCRIPTION These routines manipulate the current attributes of the named window. The @@ -71,8 +114,14 @@ the same as \fBattron(A_STANDOUT)\fR. The routine \fBstandend\fR is the same as \fBattrset(A_NORMAL)\fR or \fBattrset(0)\fR, that is, it turns off all attributes. -The routine \fBwattr_get\fR returns the current attribute for the given -window; \fBattr_get\fR returns the current attribute for \fBstdscr\fR. +The routine \fBcolor_set\fR sets the current color of the given window to the +foreground/background combination described by the color_pair_number. The +parameter opts is reserved for future use, applications must supply a null +pointer. + +The routine \fBwattr_get\fR returns the current attribute and color pair for +the given window; \fBattr_get\fR returns the current attribute and color pair +for \fBstdscr\fR. The remaining \fBattr_\fR* functions operate exactly like the corresponding \fBattr\fR* functions, except that they take arguments of type \fBattr_t\fR rather than \fBint\fR. @@ -84,7 +133,7 @@ than the remaining window width means to change attributes all the way to the end of the current line. The \fBwchgat\fR function generalizes this to any window; the \fBmvwchgat\fR function does a cursor move before acting. In these functions, the color argument is a color-pair index (as in the first argument -of \fIinit_pair\fR, see \fBcurs_color\fR(3x)). The \fBopts\fR argument is not +of \fIinit_pair\fR, see \fBcurs_color\fR(3X)). The \fBopts\fR argument is not presently used, but is reserved for the future (leave it \fBNULL\fR). .SS Attributes The following video attributes, defined in \fB\fR, can be passed to @@ -111,7 +160,7 @@ l l . The following macro is the reverse of \fBCOLOR_PAIR(\fR\fIn\fR\fB)\fR: .DS C -\fBPAIR_NUMBER(\fIattrs\fR) Returns the pair number associated +\fBPAIR_NUMBER(\fR\fIattrs\fR) Returns the pair number associated with the \fBCOLOR_PAIR(\fR\fIn\fR\fB)\fR attribute. .DE