1.\" $NetBSD: curses_background.3,v 1.2 2002/10/21 14:17:54 wiz Exp $ 2.\" Copyright (c) 2002 The NetBSD Foundation, Inc. 3.\" All rights reserved. 4.\" 5.\" This code is derived from software contributed to The NetBSD Foundation 6.\" by Julian Coleman. 7.\" 8.\" Redistribution and use in source and binary forms, with or without 9.\" modification, are permitted provided that the following conditions 10.\" are met: 11.\" 1. Redistributions of source code must retain the above copyright 12.\" notice, this list of conditions and the following disclaimer. 13.\" 2. Redistributions in binary form must reproduce the above copyright 14.\" notice, this list of conditions and the following disclaimer in the 15.\" documentation and/or other materials provided with the distribution. 16.\" 3. Neither the name of The NetBSD Foundation nor the names of its 17.\" contributors may be used to endorse or promote products derived 18.\" from this software without specific prior written permission. 19.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 20.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 21.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 22.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 23.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 24.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 25.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 26.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 27.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 28.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 29.\" POSSIBILITY OF SUCH DAMAGE. 30.\" 31.Dd October 13, 2002 32.Dt CURSES_BACKGROUND 3 33.Os 34.Sh NAME 35.Nm curses_background , 36.Nm bkgd , 37.Nm bkgdset , 38.Nm getbkgd , 39.Nm wbkgd , 40.Nm wbkgdset 41.Nd curses attribute manipulation routines 42.Sh LIBRARY 43.Lb libcurses 44.Sh SYNOPSIS 45.Fd #include \*[Lt]curses.h\*[Gt] 46.Ft int 47.Fn bkgd chtype 48.Ft int 49.Fn bkgdset chtype 50.Ft chtype 51.Fn getbkgd "WINDOW *" 52.Ft int 53.Fn wbkgd chtype 54.Ft int 55.Fn wbkgdset chtype 56.Sh DESCRIPTION 57These functions manipulate the background attributes on 58.Dv stdscr 59or on the specified window. 60.Pp 61The function 62.Fn wbkgdset win ch 63sets the background attributes of the specified window 64.Fa win 65to 66.Fa ch . 67.Pp 68The function 69.Fn wbkgd win ch 70sets the background attributes of the specified window 71.Fa win 72to 73.Fa ch 74and also sets the background attribute of every character position on that 75window. 76.Pp 77The functions 78.Fn bkgdset ch 79and 80.Fn bkgd ch 81are equivalent to 82.Fn wbkgdset stdscr ch 83and 84.Fn wbkgd stdscr ch , 85respectively. 86.Pp 87When the background attributes are set on a window, characters are rendered 88with the logical 89.Em OR 90of the background attributes and the character's attributes. 91If both the background attribute and the character attribute contain color, 92the color of the character attribute is displayed. 93If the background attribute contains a non-space character, then this 94character is rendered where the foreground character is a space character. 95.Pp 96The function 97.Fn getbkgd win 98returns the background attributes for the window 99.Fa win . 100.Sh RETURN VALUES 101The functions 102.Fn wbkgdset 103and 104.Fn wbkgd 105return OK on success and ERR on failure. 106.Sh SEE ALSO 107.Xr curses_attributes 3 , 108.Xr curses_color 3 109.Sh STANDARDS 110The 111.Nx 112Curses library complies with the X/Open Curses specification, part of the 113Single Unix Specification. 114.Sh HISTORY 115These functions first appeared in 116.Nx 1.6 . 117