xref: /minix3/lib/libcurses/curses_chgat.3 (revision 0c3ae37f525eceade8dc047e551f5c9cb33faeb1)
1.\" $NetBSD: curses_chgat.3,v 1.5 2011/02/10 08:54:12 blymn Exp $
2.\"
3.\" Copyright (c) 2009 The NetBSD Foundation, Inc.
4.\" All rights reserved.
5.\"
6.\" This code is derived from software contributed to The NetBSD Foundation
7.\" by Joerg Sonnenberger.
8.\"
9.\" Redistribution and use in source and binary forms, with or without
10.\" modification, are permitted provided that the following conditions
11.\" are met:
12.\" 1. Redistributions of source code must retain the above copyright
13.\"    notice, this list of conditions and the following disclaimer.
14.\" 2. Redistributions in binary form must reproduce the above copyright
15.\"    notice, this list of conditions and the following disclaimer in the
16.\"    documentation and/or other materials provided with the distribution.
17.\"
18.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
19.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
20.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
22.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28.\" POSSIBILITY OF SUCH DAMAGE.
29.\"
30.Dd July 6, 2009
31.Dt CURSES_CHGAT 3
32.Os
33.Sh NAME
34.Nm chgat ,
35.Nm wchgat ,
36.Nm mvchgat ,
37.Nm mvwchgat
38.Nd curses on-screen attribute manipulation routines
39.Sh LIBRARY
40.Lb libcurses
41.Sh SYNOPSIS
42.In curses.h
43.Ft int
44.Fn chgat "int n" "attr_t attr" "short color" "const void *opts"
45.Ft int
46.Fn wchgat "WINDOW *win" "int n" "attr_t attr" "short color" \
47"const void *opts"
48.Ft int
49.Fn mvchgat "int y" "int x" "int n" "attr_t attr" "short color" \
50"const void *opts"
51.Ft int
52.Fn mvwchgat "WINDOW *win" "int y" "int x" "int n" "attr_t attr" \
53"short color" "const void *opts"
54.Sh DESCRIPTION
55These functions modify the attributes of the drawn content on stdscr or
56on the specified window.
57.Pp
58The
59.Fn chgat
60function sets the attributes of the next
61.Fa n
62characters to
63.Fa attr
64and the color pair to
65.Fa color .
66If
67.Fa n
68is negative or larger than the remainder of the line, it gets truncated.
69.Pp
70The
71.Fn wchgat
72is the same as the
73.Fn chgat
74function, excepting that the attributes are changed in the window specified by
75.Fa win .
76.Pp
77The
78.Fn mvchgat
79and
80.Fn mvwchgat
81functions are the same as the
82.Fn chgat
83and
84.Fn wchgat
85functions, respectively, excepting that they operate from the position
86specified by
87.Fa y ,
88.Fa x .
89.Pp
90These functions do not perform wrapping.
91They do not update the cursor position.
92.Sh RETURN VALUES
93The functions that return an int will return one of the following
94values:
95.Pp
96.Bl -tag -width ERR -compact
97.It Er OK
98The function completed successfully.
99.It Er ERR
100An error occurred in the function.
101.El
102.Sh SEE ALSO
103.Xr curses_attributes 3
104.Sh STANDARDS
105The
106.Fn chgat ,
107.Fn wchgat ,
108.Fn mvchgat ,
109and
110.Fn mvwchgat
111functions conform to
112.St -xcurses4.2 .
113.Sh HISTORY
114The Curses package appeared in
115.Bx 4.0 .
116Support for the
117.Fn chgat
118family was added in
119.Nx 6.0 .
120