]> ncurses.scripts.mit.edu Git - ncurses.git/blob - man/curs_bkgrnd.3x
ncurses 6.4 - patch 20231125
[ncurses.git] / man / curs_bkgrnd.3x
1 .\"***************************************************************************
2 .\" Copyright 2018-2022,2023 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.32 2023/11/25 14:01:49 tom Exp $
31 .TH curs_bkgrnd 3X 2023-11-25 "ncurses 6.4" "Library calls"
32 .de bP
33 .ie n  .IP \(bu 4
34 .el    .IP \(bu 2
35 ..
36 .SH NAME
37 \fB\%bkgrnd\fP,
38 \fB\%wbkgrnd\fP,
39 \fB\%bkgrndset\fP,
40 \fB\%wbkgrndset\fP,
41 \fB\%getbkgrnd\fP,
42 \fB\%wgetbkgrnd\fP \-
43 manipulate background of a \fIcurses\fP window of wide characters
44 .SH SYNOPSIS
45 .nf
46 \fB#include <curses.h>
47 .PP
48 \fBint bkgrnd(const cchar_t *\fIwch\fP);
49 \fBint wbkgrnd(WINDOW *\fIwin\fP, const cchar_t *\fIwch\fP);
50 .PP
51 \fBvoid bkgrndset(const cchar_t *\fIwch\fP);
52 \fBvoid wbkgrndset(WINDOW *\fIwin\fP, const cchar_t *\fIwch\fP);
53 .PP
54 \fBint getbkgrnd(cchar_t *\fIwch\fP);
55 \fBint wgetbkgrnd(WINDOW *\fIwin\fP, cchar_t *\fIwch\fP);
56 .fi
57 .SH DESCRIPTION
58 .SS bkgrndset
59 The \fBbkgrndset\fP and \fBwbkgrndset\fP routines manipulate the
60 background of the named window.
61 The window background is a \fBcchar_t\fP consisting of
62 any combination of attributes (i.e., rendition) and a complex character.
63 .bP
64 The attribute part of the background is combined (OR'ed) with all non-blank
65 characters that are written into the window with \fBwaddch\fP.
66 .bP
67 Both
68 the character and attribute parts of the background are combined with
69 the blank characters.
70 .PP
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 The \fBbkgrnd\fP and \fBwbkgrnd\fP 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 The \fBgetbkgrnd\fP function returns the given window's current background
90 character/attribute pair via the
91 .I wch
92 pointer.
93 If the given window pointer is null,
94 the character is not updated (but no error is returned).
95 .SH RETURN VALUE
96 The \fBbkgrndset\fP and \fBwbkgrndset\fP routines do not return a value.
97 .PP
98 Upon successful completion, the other functions return \fBOK\fP.
99 Otherwise, they return \fBERR\fP:
100 .bP
101 A null window pointer is treated as an error.
102 .bP
103 A null character pointer is treated as an error.
104 .SH NOTES
105 \fB\%bkgrnd\fP,
106 \fB\%bkgrndset\fP, and
107 \fB\%getbkgrnd\fP
108 may be available as macros.
109 .PP
110 X/Open Curses does not provide details on how the rendition is changed.
111 This implementation follows the approach used in SVr4 curses,
112 which is explained in the manual page for \fBwbkgd\fP.
113 .SH PORTABILITY
114 These functions are described in the XSI Curses standard, Issue 4.
115 .SH SEE ALSO
116 \fB\%curses\fP(3X),
117 \fB\%curs_bkgd\fP(3X)