NetBSD/lib/libcurses/curses_chgat.3

120 lines
3.3 KiB
Groff

.\" $NetBSD: curses_chgat.3,v 1.5 2011/02/10 08:54:12 blymn Exp $
.\"
.\" Copyright (c) 2009 The NetBSD Foundation, Inc.
.\" All rights reserved.
.\"
.\" This code is derived from software contributed to The NetBSD Foundation
.\" by Joerg Sonnenberger.
.\"
.\" 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
.In 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.
.Pp
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 remainder of the line, it gets truncated.
.Pp
The
.Fn wchgat
is the same as the
.Fn chgat
function, excepting that the attributes are changed in the window specified by
.Fa win .
.Pp
The
.Fn mvchgat
and
.Fn mvwchgat
functions are the same as the
.Fn chgat
and
.Fn wchgat
functions, respectively, excepting that they operate from the position
specified by
.Fa y ,
.Fa x .
.Pp
These functions do not perform wrapping.
They do not update the cursor position.
.Sh RETURN VALUES
The functions that return an int will return one of the following
values:
.Pp
.Bl -tag -width ERR -compact
.It Er OK
The function completed successfully.
.It Er ERR
An error occurred in the function.
.El
.Sh SEE ALSO
.Xr curses_attributes 3
.Sh STANDARDS
The
.Fn chgat ,
.Fn wchgat ,
.Fn mvchgat ,
and
.Fn mvwchgat
functions conform to
.St -xcurses4.2 .
.Sh HISTORY
The Curses package appeared in
.Bx 4.0 .
Support for the
.Fn chgat
family was added in
.Nx 6.0 .