Home | History | Annotate | Line # | Download | only in libcurses
curses_chgat.3 revision 1.1

Copyright (c) 2009 The NetBSD Foundation, Inc.
All rights reserved.

This code is derived from software contributed to The NetBSD Foundation
by

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.

.Dd July 6, 2009 .Dt CURSES_CHGAT 3 .Os .Sh NAME .Nm chgat , .Nm wchgat , .Nm mvchgat , .Nm mvwchgat .Nd curses on-screen attribute manipulation routines .Sh LIBRARY .Lb libcurses .Sh SYNOPSIS n curses.h .Ft int .Fn chgat "int n" "attr_t attr" "short color" "const void *opts" .Ft int .Fn wchgat "WINDOW *win" "int n" "attr_t attr" "short color" \ "const void *opts" .Ft int .Fn mvchgat "int y" "int x" "int n" "attr_t attr" "short color" \ "const void *opts" .Ft int .Fn mvwchgat "WINDOW *win" "int y" "int x" "int n" "attr_t attr" \ "short color" "const void *opts" .Sh DESCRIPTION These functions modify the attributes of the drawn content on stdscr or on the specified window.

p The .Fn chgat function sets the attributes of the next .Fa n characters to .Fa attr and the color pair to .Fa color . If .Fa n is negative or larger than the reminder of the line, it gets truncated.

p The .Fn wchgat is the same as the .Fn chgat function, excepting that the attributes are changed in the window specified by .Fa win .

p The .Fn mvchgat and .Fn mvwchgat functions are the same as the .Fn chgat and .Fn wchgat functions, respectively, excepting that .Fn wmove is called to mvoe the cursor to the position specified by .Fa y , .Fa x before the attributes are changed. .Sh RETURN VALUES The functions that return an int will return one of the following values:

p l -tag -width ERR -compact t Er OK The function completed successfully. t Er ERR An error occurred in the function. .El .Sh SEE ALSO .Xr curses_attributes 3 .Sh STANDARDS The .Nx Curses library complies with the X/Open Curses specification, part of the Single Unix Specification. The .Fn chgat family is an extension and compatible with GNU ncurses. .Sh HISTORY The Curses package appeared in x 4.0 . Support for the .Fn chgat family was added in .Nx 6.0 .