Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 1 | .\"*************************************************************************** |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 2 | .\" Copyright (c) 1998-2010,2015 Free Software Foundation, Inc. * |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 3 | .\" * |
| 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 Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 29 | .\" $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 Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 33 | .TH curs_bkgd 3X "" |
| 34 | .SH NAME |
| 35 | \fBbkgdset\fR, \fBwbkgdset\fR, |
| 36 | \fBbkgd\fR, \fBwbkgd\fR, |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 37 | \fBgetbkgd\fR \- \fBcurses\fR window background manipulation routines |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 38 | .SH SYNOPSIS |
| 39 | \fB#include <curses.h>\fR |
| 40 | .PP |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 41 | \fBvoid bkgdset(chtype \fP\fIch\fP\fB);\fR |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 42 | .br |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 43 | \fBvoid wbkgdset(WINDOW *\fP\fIwin, chtype \fP\fIch\fP\fB);\fR |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 44 | .br |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 45 | \fBint bkgd(chtype \fP\fIch\fP\fB);\fR |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 46 | .br |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 47 | \fBint wbkgd(WINDOW *\fP\fIwin\fP\fB, chtype \fP\fIch\fP\fB);\fR |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 48 | .br |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 49 | \fBchtype getbkgd(WINDOW *\fP\fIwin\fP\fB);\fR |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 50 | .br |
| 51 | .SH DESCRIPTION |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 52 | .SS bkgdset |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 53 | The \fBbkgdset\fR and \fBwbkgdset\fR routines manipulate the |
| 54 | background of the named window. |
| 55 | The window background is a \fBchtype\fR consisting of |
| 56 | any combination of attributes (i.e., rendition) and a character. |
| 57 | The attribute part of the background is combined (OR'ed) with all non-blank |
| 58 | characters that are written into the window with \fBwaddch\fR. Both |
| 59 | the character and attribute parts of the background are combined with |
| 60 | the blank characters. The background becomes a property of the |
| 61 | character and moves with the character through any scrolling and |
| 62 | insert/delete line/character operations. |
| 63 | .PP |
| 64 | To the extent possible on a particular terminal, |
| 65 | the attribute part of the background is displayed |
| 66 | as the graphic rendition of the character put on the screen. |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 67 | .SS bkgd |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 68 | .PP |
| 69 | The \fBbkgd\fR and \fBwbkgd\fR functions |
| 70 | set the background property of the current or specified window |
| 71 | and then apply this setting to every character position in that window: |
| 72 | .PP |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 73 | .bP |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 74 | The rendition of every character on the screen is changed to |
| 75 | the new background rendition. |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 76 | .bP |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 77 | Wherever the former background character |
| 78 | appears, it is changed to the new background character. |
| 79 | .RE |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 80 | .SS getbkgd |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 81 | .PP |
| 82 | The \fBgetbkgd\fR function returns the given window's current background |
| 83 | character/attribute pair. |
| 84 | .SH RETURN VALUE |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 85 | .PP |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 86 | The routines \fBbkgd\fR and \fBwbkgd\fR return the integer \fBOK\fR. |
| 87 | The SVr4.0 manual says "or a non-negative integer if \fBimmedok\fR is set", |
| 88 | but this appears to be an error. |
| 89 | .SH NOTES |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 90 | .PP |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 91 | Note that \fBbkgdset\fR and \fBbkgd\fR may be macros. |
| 92 | .SH PORTABILITY |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 93 | .PP |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 94 | These functions are described in the XSI Curses standard, Issue 4. |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 95 | It specifies that \fBbkgd\fR and \fBwbkgd\fR return \fBERR\fR on failure, |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 96 | but gives no failure conditions. |
| 97 | .SH SEE ALSO |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 98 | .na |
| 99 | .PP |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 100 | \fBcurses\fR(3X), |
| 101 | \fBcurs_addch\fR(3X), |
| 102 | \fBcurs_attr\fR(3X), |
| 103 | \fBcurs_outopts\fR(3X) |