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