man.bsd.lv manual page server

Manual Page Search Parameters

CURSES_BACKGROUND(3) Library Functions Manual CURSES_BACKGROUND(3)

curses_background, bkgd, bkgdset, getbkgd, wbkgd, wbkgdsetcurses attribute manipulation routines

library “libcurses”

#include <curses.h>

int
bkgd(chtype);

void
bkgdset(chtype);

chtype
getbkgd(WINDOW *);

int
wbkgd(WINDOW *, chtype);

void
wbkgdset(WINDOW *, chtype);

These functions manipulate the background attributes on stdscr or on the specified window.

The function (win, ch) sets the background attributes of the specified window win to ch.

When the background attributes are set on a window, characters are added to the window with the logical of the background attributes and the character's attributes. If both the background attribute and the character attribute contain color, the color of the character attribute is rendered. If the background attribute contains a non-space character, then this character is added where the foreground character is a space character.

Note that subwindows created from win inherit the background attributes of win.

The function (win, ch) sets the background attributes of the specified window win to ch and also sets the rendition of every character position on that window, as if the characters had been newly added to win. The rendition of characters on subwindows of win is also set to ch.

The functions (ch) and (ch) are equivalent to wbkgdset(stdscr, ch) and wbkgd(stdscr, ch), respectively.

The function (win) returns the background attributes for the window win.

The functions wbkgdset() and wbkgd() return OK on success and ERR on failure.

curses_attributes(3), curses_color(3), curses_window(3)

The NetBSD Curses library complies with the X/Open Curses specification, part of the Single Unix Specification.

These functions first appeared in NetBSD 1.6.

September 29, 2018 NetBSD-9.2