]> ncurses.scripts.mit.edu Git - ncurses.git/blob - man/curs_bkgd.3x
ncurses 6.1 - patch 20181201
[ncurses.git] / man / curs_bkgd.3x
1 .\"***************************************************************************
2 .\" Copyright (c) 1998-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_bkgd.3x,v 1.26 2018/07/28 21:34:06 tom Exp $
30 .de bP
31 .ie n  .IP \(bu 4
32 .el    .IP \(bu 2
33 ..
34 .TH curs_bkgd 3X ""
35 .SH NAME
36 \fBbkgdset\fR, \fBwbkgdset\fR,
37 \fBbkgd\fR, \fBwbkgd\fR,
38 \fBgetbkgd\fR \- \fBcurses\fR window background manipulation routines
39 .SH SYNOPSIS
40 \fB#include <curses.h>\fR
41 .PP
42 \fBvoid bkgdset(chtype \fP\fIch\fP\fB);\fR
43 .br
44 \fBvoid wbkgdset(WINDOW *\fP\fIwin, chtype \fP\fIch\fP\fB);\fR
45 .br
46 \fBint bkgd(chtype \fP\fIch\fP\fB);\fR
47 .br
48 \fBint wbkgd(WINDOW *\fP\fIwin\fP\fB, chtype \fP\fIch\fP\fB);\fR
49 .br
50 \fBchtype getbkgd(WINDOW *\fP\fIwin\fP\fB);\fR
51 .br
52 .SH DESCRIPTION
53 .SS bkgdset
54 The \fBbkgdset\fR and \fBwbkgdset\fR routines manipulate the
55 background of the named window.
56 The window background is a \fBchtype\fR consisting of
57 any combination of attributes (i.e., rendition) and a character.
58 The attribute part of the background is combined (OR'ed) with all non-blank
59 characters that are written into the window with \fBwaddch\fR.
60 Both
61 the character and attribute parts of the background are combined with
62 the blank characters.
63 The background becomes a property of the
64 character and moves with the character through any scrolling and
65 insert/delete line/character operations.
66 .PP
67 To the extent possible on a particular terminal,
68 the attribute part of the background is displayed
69 as the graphic rendition of the character put on the screen.
70 .SS bkgd
71 .PP
72 The \fBbkgd\fR and \fBwbkgd\fR functions
73 set the background property of the current or specified window
74 and then apply this setting to every character position in that window:
75 .PP
76 .bP
77 The rendition of every character on the screen is changed to
78 the new background rendition.
79 .bP
80 Wherever the former background character
81 appears, it is changed to the new background character.
82 .SS getbkgd
83 .PP
84 The \fBgetbkgd\fR function returns the given window's current background
85 character/attribute pair.
86 .SH RETURN VALUE
87 .PP
88 The routines \fBbkgd\fR and \fBwbkgd\fR return the integer \fBOK\fR.
89 The SVr4.0 manual says "or a non-negative integer if \fBimmedok\fR is set",
90 but this appears to be an error.
91 .SH NOTES
92 .PP
93 Note that \fBbkgdset\fR and \fBbkgd\fR may be macros.
94 .SH PORTABILITY
95 .PP
96 These functions are described in the XSI Curses standard, Issue 4.
97 It specifies that \fBbkgd\fR and \fBwbkgd\fR return \fBERR\fR on failure,
98 but gives no failure conditions.
99 .SH SEE ALSO
100 .na
101 .PP
102 \fBcurses\fR(3X),
103 \fBcurs_addch\fR(3X),
104 \fBcurs_attr\fR(3X),
105 \fBcurs_outopts\fR(3X)