blob: 50c3b303adb9f589596c67ec62011a5f23c42b09 [file] [log] [blame]
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301.\"***************************************************************************
Steve Kondikae271bc2015-11-15 02:50:53 +01002.\" Copyright (c) 1998-2010,2015 Free Software Foundation, Inc. *
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05303.\" *
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.\"
Steve Kondikae271bc2015-11-15 02:50:53 +010029.\" $Id: curs_bkgd.3x,v 1.23 2015/07/21 00:11:05 tom Exp $
30.de bP
31.IP \(bu 4
32..
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053033.TH curs_bkgd 3X ""
34.SH NAME
35\fBbkgdset\fR, \fBwbkgdset\fR,
36\fBbkgd\fR, \fBwbkgd\fR,
Steve Kondikae271bc2015-11-15 02:50:53 +010037\fBgetbkgd\fR \- \fBcurses\fR window background manipulation routines
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053038.SH SYNOPSIS
39\fB#include <curses.h>\fR
40.PP
Steve Kondikae271bc2015-11-15 02:50:53 +010041\fBvoid bkgdset(chtype \fP\fIch\fP\fB);\fR
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053042.br
Steve Kondikae271bc2015-11-15 02:50:53 +010043\fBvoid wbkgdset(WINDOW *\fP\fIwin, chtype \fP\fIch\fP\fB);\fR
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053044.br
Steve Kondikae271bc2015-11-15 02:50:53 +010045\fBint bkgd(chtype \fP\fIch\fP\fB);\fR
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053046.br
Steve Kondikae271bc2015-11-15 02:50:53 +010047\fBint wbkgd(WINDOW *\fP\fIwin\fP\fB, chtype \fP\fIch\fP\fB);\fR
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053048.br
Steve Kondikae271bc2015-11-15 02:50:53 +010049\fBchtype getbkgd(WINDOW *\fP\fIwin\fP\fB);\fR
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053050.br
51.SH DESCRIPTION
Steve Kondikae271bc2015-11-15 02:50:53 +010052.SS bkgdset
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053053The \fBbkgdset\fR and \fBwbkgdset\fR routines manipulate the
54background of the named window.
55The window background is a \fBchtype\fR consisting of
56any combination of attributes (i.e., rendition) and a character.
57The attribute part of the background is combined (OR'ed) with all non-blank
58characters that are written into the window with \fBwaddch\fR. Both
59the character and attribute parts of the background are combined with
60the blank characters. The background becomes a property of the
61character and moves with the character through any scrolling and
62insert/delete line/character operations.
63.PP
64To the extent possible on a particular terminal,
65the attribute part of the background is displayed
66as the graphic rendition of the character put on the screen.
Steve Kondikae271bc2015-11-15 02:50:53 +010067.SS bkgd
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053068.PP
69The \fBbkgd\fR and \fBwbkgd\fR functions
70set the background property of the current or specified window
71and then apply this setting to every character position in that window:
72.PP
Steve Kondikae271bc2015-11-15 02:50:53 +010073.bP
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053074The rendition of every character on the screen is changed to
75the new background rendition.
Steve Kondikae271bc2015-11-15 02:50:53 +010076.bP
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053077Wherever the former background character
78appears, it is changed to the new background character.
79.RE
Steve Kondikae271bc2015-11-15 02:50:53 +010080.SS getbkgd
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053081.PP
82The \fBgetbkgd\fR function returns the given window's current background
83character/attribute pair.
84.SH RETURN VALUE
Steve Kondikae271bc2015-11-15 02:50:53 +010085.PP
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053086The routines \fBbkgd\fR and \fBwbkgd\fR return the integer \fBOK\fR.
87The SVr4.0 manual says "or a non-negative integer if \fBimmedok\fR is set",
88but this appears to be an error.
89.SH NOTES
Steve Kondikae271bc2015-11-15 02:50:53 +010090.PP
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053091Note that \fBbkgdset\fR and \fBbkgd\fR may be macros.
92.SH PORTABILITY
Steve Kondikae271bc2015-11-15 02:50:53 +010093.PP
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053094These functions are described in the XSI Curses standard, Issue 4.
Steve Kondikae271bc2015-11-15 02:50:53 +010095It specifies that \fBbkgd\fR and \fBwbkgd\fR return \fBERR\fR on failure,
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053096but gives no failure conditions.
97.SH SEE ALSO
Steve Kondikae271bc2015-11-15 02:50:53 +010098.na
99.PP
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530100\fBcurses\fR(3X),
101\fBcurs_addch\fR(3X),
102\fBcurs_attr\fR(3X),
103\fBcurs_outopts\fR(3X)