1.\" $NetBSD: curses_background.3,v 1.5 2006/01/15 11:45: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 January 15, 2006 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.In curses.h 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 68When the background attributes are set on a window, characters are added to 69the window with the logical 70.Em OR 71of the background attributes and the character's attributes. 72If both the background attribute and the character attribute contain color, 73the color of the character attribute is rendered. 74If the background attribute contains a non-space character, then this 75character is added where the foreground character is a space character. 76.Pp 77Note that subwindows created from 78.Fa win 79inherit the background attributes of 80.Fa win . 81.Pp 82The function 83.Fn wbkgd win ch 84sets the background attributes of the specified window 85.Fa win 86to 87.Fa ch 88and also sets the rendition of every character position on that window, 89as if the characters had been newly added to 90.Fa win . 91The rendition of characters on subwindows of 92.Fa win 93is also set to 94.Fa ch . 95.Pp 96The functions 97.Fn bkgdset ch 98and 99.Fn bkgd ch 100are equivalent to 101.Fn wbkgdset stdscr ch 102and 103.Fn wbkgd stdscr ch , 104respectively. 105.Pp 106The function 107.Fn getbkgd win 108returns the background attributes for the window 109.Fa win . 110.Sh RETURN VALUES 111The functions 112.Fn wbkgdset 113and 114.Fn wbkgd 115return OK on success and ERR on failure. 116.Sh SEE ALSO 117.Xr curses_attributes 3 , 118.Xr curses_color 3 , 119.Xr curses_window 3 120.Sh STANDARDS 121The 122.Nx 123Curses library complies with the X/Open Curses specification, part of the 124Single Unix Specification. 125.Sh HISTORY 126These functions first appeared in 127.Nx 1.6 . 128