]> ncurses.scripts.mit.edu Git - ncurses.git/blob - man/curs_bkgrnd.3x
d5933cb5bb8d158512f06fc6e54cf9ad5d6e39d3
[ncurses.git] / man / curs_bkgrnd.3x
1 .\"***************************************************************************
2 .\" Copyright 2018-2020,2021 Thomas E. Dickey                                *
3 .\" Copyright 2002-2015,2017 Free Software Foundation, Inc.                  *
4 .\"                                                                          *
5 .\" Permission is hereby granted, free of charge, to any person obtaining a  *
6 .\" copy of this software and associated documentation files (the            *
7 .\" "Software"), to deal in the Software without restriction, including      *
8 .\" without limitation the rights to use, copy, modify, merge, publish,      *
9 .\" distribute, distribute with modifications, sublicense, and/or sell       *
10 .\" copies of the Software, and to permit persons to whom the Software is    *
11 .\" furnished to do so, subject to the following conditions:                 *
12 .\"                                                                          *
13 .\" The above copyright notice and this permission notice shall be included  *
14 .\" in all copies or substantial portions of the Software.                   *
15 .\"                                                                          *
16 .\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  *
17 .\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               *
18 .\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   *
19 .\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   *
20 .\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    *
21 .\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    *
22 .\" THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               *
23 .\"                                                                          *
24 .\" Except as contained in this notice, the name(s) of the above copyright   *
25 .\" holders shall not be used in advertising or otherwise to promote the     *
26 .\" sale, use or other dealings in this Software without prior written       *
27 .\" authorization.                                                           *
28 .\"***************************************************************************
29 .\"
30 .\" $Id: curs_bkgrnd.3x,v 1.14 2021/12/25 21:41:58 tom Exp $
31 .de bP
32 .ie n  .IP \(bu 4
33 .el    .IP \(bu 2
34 ..
35 .TH curs_bkgrnd 3X ""
36 .SH NAME
37 \fBbkgrnd\fP,
38 \fBwbkgrnd\fP,
39 \fBbkgrndset\fP,
40 \fBwbkgrndset\fP,
41 \fBgetbkgrnd\fP,
42 \fBwgetbkgrnd\fP \- \fBcurses\fP window complex background manipulation routines
43 .SH SYNOPSIS
44 .PP
45 .B #include <curses.h>
46 .sp
47 \fBint bkgrnd(\fP\fB const cchar_t *\fP\fIwch\fP\fB);\fP
48 .br
49 \fBint wbkgrnd(\fP\fB WINDOW *\fP\fIwin\fP\fB, const cchar_t *\fP\fIwch\fP\fB);\fP
50 .sp
51 \fBvoid bkgrndset(const cchar_t *\fP\fIwch\fP \fB);\fP
52 .br
53 \fBvoid wbkgrndset(WINDOW *\fP\fIwin\fP\fB, const cchar_t *\fP\fIwch\fP\fB);\fP
54 .sp
55 \fBint getbkgrnd(cchar_t *\fP\fIwch\fP\fB);\fP
56 .br
57 \fBint wgetbkgrnd(WINDOW *\fP\fIwin\fP\fB, cchar_t *\fP\fIwch\fP\fB);\fP
58 .br
59 .SH DESCRIPTION
60 .SS bkgrndset
61 .PP
62 The \fBbkgrndset\fP and \fBwbkgrndset\fP routines manipulate the
63 background of the named window.
64 The window background is a \fBcchar_t\fP consisting of
65 any combination of attributes (i.e., rendition) and a complex character.
66 The attribute part of the background is combined (OR'ed) with all non-blank
67 characters that are written into the window with \fBwaddch\fP.
68 Both
69 the character and attribute parts of the background are combined with
70 the blank characters.
71 The background becomes a property of the
72 character and moves with the character through any scrolling and
73 insert/delete line/character operations.
74 .PP
75 To the extent possible on a
76 particular terminal, the attribute part of the background is displayed
77 as the graphic rendition of the character put on the screen.
78 .SS bkgrnd
79 .PP
80 The \fBbkgrnd\fP and \fBwbkgrnd\fP functions
81 set the background property of the current or specified window
82 and then apply this setting to every character position in that window:
83 .bP
84 The rendition of every character on the screen is changed to
85 the new background rendition.
86 .bP
87 Wherever the former background character
88 appears, it is changed to the new background character.
89 .SS getbkgrnd
90 .PP
91 The \fBgetbkgrnd\fP function returns the given window's current background
92 character/attribute pair via the \fBwch\fP pointer.
93 If the given window pointer is null,
94 the character is not updated (but no error returned).
95 .SH NOTES
96 Note that
97 \fBbkgrnd\fP,
98 \fBbkgrndset\fP, and
99 \fBgetbkgrnd\fP
100 may be macros.
101 .PP
102 X/Open Curses does not provide details on how the rendition is changed.
103 This implementation follows the approach used in SVr4 curses,
104 which is explained in the manual page for \fBwbkgd\fP.
105 .SH RETURN VALUE
106 .PP
107 The \fBbkgrndset\fP and \fBwbkgrndset\fP routines do not return a value.
108 .PP
109 Upon successful completion, the other functions return \fBOK\fP.
110 Otherwise, they return \fBERR\fP:
111 .bP
112 A null window pointer is treated as an error.
113 .bP
114 A null character pointer is treated as an error.
115 .SH PORTABILITY
116 .PP
117 These functions are described in the XSI Curses standard, Issue 4
118 (X/Open Curses).
119 .SH SEE ALSO
120 \fBcurses\fP(3X),
121 \fBcurs_bkgd\fP(3X)