]> ncurses.scripts.mit.edu Git - ncurses.git/blob - man/curs_bkgrnd.3x
ncurses 6.3 - patch 20220625
[ncurses.git] / man / curs_bkgrnd.3x
1 .\"***************************************************************************
2 .\" Copyright 2018-2021,2022 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.16 2022/06/25 21:57:59 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(\fB const cchar_t *\fIwch\fB);\fR
48 .br
49 \fBint wbkgrnd(\fB WINDOW *\fIwin\fB, const cchar_t *\fIwch\fB);\fR
50 .sp
51 \fBvoid bkgrndset(const cchar_t *\fIwch\fR \fB);\fR
52 .br
53 \fBvoid wbkgrndset(WINDOW *\fIwin\fB, const cchar_t *\fIwch\fB);\fR
54 .sp
55 \fBint getbkgrnd(cchar_t *\fIwch\fB);\fR
56 .br
57 \fBint wgetbkgrnd(WINDOW *\fIwin\fB, cchar_t *\fIwch\fB);\fR
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 .bP
67 The attribute part of the background is combined (OR'ed) with all non-blank
68 characters that are written into the window with \fBwaddch\fP.
69 .bP
70 Both
71 the character and attribute parts of the background are combined with
72 the blank characters.
73 .PP
74 The background becomes a property of the
75 character and moves with the character through any scrolling and
76 insert/delete line/character operations.
77 .PP
78 To the extent possible on a
79 particular terminal, the attribute part of the background is displayed
80 as the graphic rendition of the character put on the screen.
81 .SS bkgrnd
82 .PP
83 The \fBbkgrnd\fP and \fBwbkgrnd\fP functions
84 set the background property of the current or specified window
85 and then apply this setting to every character position in that window:
86 .bP
87 The rendition of every character on the screen is changed to
88 the new background rendition.
89 .bP
90 Wherever the former background character
91 appears, it is changed to the new background character.
92 .SS getbkgrnd
93 .PP
94 The \fBgetbkgrnd\fP function returns the given window's current background
95 character/attribute pair via the \fBwch\fP pointer.
96 If the given window pointer is null,
97 the character is not updated (but no error returned).
98 .SH NOTES
99 Note that
100 \fBbkgrnd\fP,
101 \fBbkgrndset\fP, and
102 \fBgetbkgrnd\fP
103 may be macros.
104 .PP
105 X/Open Curses does not provide details on how the rendition is changed.
106 This implementation follows the approach used in SVr4 curses,
107 which is explained in the manual page for \fBwbkgd\fP.
108 .SH RETURN VALUE
109 .PP
110 The \fBbkgrndset\fP and \fBwbkgrndset\fP routines do not return a value.
111 .PP
112 Upon successful completion, the other functions return \fBOK\fP.
113 Otherwise, they return \fBERR\fP:
114 .bP
115 A null window pointer is treated as an error.
116 .bP
117 A null character pointer is treated as an error.
118 .SH PORTABILITY
119 .PP
120 These functions are described in the XSI Curses standard, Issue 4
121 (X/Open Curses).
122 .SH SEE ALSO
123 \fBcurses\fP(3X),
124 \fBcurs_bkgd\fP(3X)