2009-07-13 03:14:06 +04:00
|
|
|
.\" $NetBSD: curses_chgat.3,v 1.4 2009/07/12 23:14:06 wiz Exp $
|
2009-07-06 19:19:49 +04:00
|
|
|
.\"
|
|
|
|
.\" Copyright (c) 2009 The NetBSD Foundation, Inc.
|
|
|
|
.\" All rights reserved.
|
|
|
|
.\"
|
|
|
|
.\" This code is derived from software contributed to The NetBSD Foundation
|
2009-07-13 03:14:06 +04:00
|
|
|
.\" by Joerg Sonnenberger.
|
2009-07-06 19:19:49 +04:00
|
|
|
.\"
|
|
|
|
.\" 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 reminder 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
|
2009-07-07 17:10:02 +04:00
|
|
|
functions, respectively, excepting that they operate from the position
|
|
|
|
specified by
|
2009-07-06 19:19:49 +04:00
|
|
|
.Fa y ,
|
2009-07-07 17:10:02 +04:00
|
|
|
.Fa x .
|
|
|
|
.Pp
|
2009-07-13 03:14:06 +04:00
|
|
|
These functions do not perform wrapping.
|
|
|
|
They do not update the cursor position.
|
2009-07-06 19:19:49 +04:00
|
|
|
.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
|
2009-07-07 15:53:43 +04:00
|
|
|
.Fn chgat ,
|
|
|
|
.Fn wchgat ,
|
2009-07-13 03:14:06 +04:00
|
|
|
.Fn mvchgat ,
|
2009-07-07 15:53:43 +04:00
|
|
|
and
|
|
|
|
.Fn mvwchgat
|
|
|
|
functions conform to
|
|
|
|
.St -xcurses4.2 .
|
2009-07-06 19:19:49 +04:00
|
|
|
.Sh HISTORY
|
|
|
|
The Curses package appeared in
|
|
|
|
.Bx 4.0 .
|
|
|
|
Support for the
|
|
|
|
.Fn chgat
|
|
|
|
family was added in
|
|
|
|
.Nx 6.0 .
|