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) 2002-2012,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_bkgrnd.3x,v 1.6 2015/07/21 00:18:42 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_bkgrnd 3X "" |
| 34 | .SH NAME |
| 35 | \fBbkgrnd\fR, |
| 36 | \fBwbkgrnd\fR, |
| 37 | \fBbkgrndset\fR, |
| 38 | \fBwbkgrndset\fR, |
| 39 | \fBgetbkgrnd\fR, |
| 40 | \fBwgetbkgrnd\fR \- \fBcurses\fR window complex background manipulation routines |
| 41 | .SH SYNOPSIS |
| 42 | .PP |
| 43 | .B #include <curses.h> |
| 44 | .sp |
| 45 | \fBint bkgrnd(\fR\fB const cchar_t *\fR\fIwch\fR\fB);\fR |
| 46 | .br |
| 47 | \fBint wbkgrnd(\fR\fB WINDOW *\fR\fIwin\fR\fB, const cchar_t *\fR\fIwch\fR\fB);\fR |
| 48 | .br |
| 49 | \fBvoid bkgrndset(const cchar_t *\fR\fIwch\fR \fB);\fR |
| 50 | .br |
| 51 | \fBvoid wbkgrndset(WINDOW *\fR\fIwin\fR\fB, const cchar_t *\fR\fIwch\fR\fB);\fR |
| 52 | .br |
| 53 | \fBint getbkgrnd(cchar_t *\fR\fIwch\fR\fB);\fR |
| 54 | .br |
| 55 | \fBint wgetbkgrnd(WINDOW *\fR\fIwin\fR\fB, cchar_t *\fR\fIwch\fR\fB);\fR |
| 56 | .br |
| 57 | .SH DESCRIPTION |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 58 | .SS bkgrndset |
| 59 | .PP |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 60 | The \fBbkgrndset\fR and \fBwbkgrndset\fR routines manipulate the |
| 61 | background of the named window. |
| 62 | The window background is a \fBcchar_t\fR consisting of |
| 63 | any combination of attributes (i.e., rendition) and a complex character. |
| 64 | The attribute part of the background is combined (OR'ed) with all non-blank |
| 65 | characters that are written into the window with \fBwaddch\fR. Both |
| 66 | the character and attribute parts of the background are combined with |
| 67 | the blank characters. |
| 68 | The background becomes a property of the |
| 69 | character and moves with the character through any scrolling and |
| 70 | insert/delete line/character operations. |
| 71 | .PP |
| 72 | To the extent possible on a |
| 73 | particular terminal, the attribute part of the background is displayed |
| 74 | as the graphic rendition of the character put on the screen. |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 75 | .SS bkgrnd |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 76 | .PP |
| 77 | The \fBbkgrnd\fR and \fBwbkgrnd\fR functions |
| 78 | set the background property of the current or specified window |
| 79 | and then apply this setting to every character position in that window: |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 80 | .bP |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 81 | The rendition of every character on the screen is changed to |
| 82 | the new background rendition. |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 83 | .bP |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 84 | Wherever the former background character |
| 85 | appears, it is changed to the new background character. |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 86 | .SS getbkgrnd |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 87 | .PP |
| 88 | The \fBgetbkgrnd\fR function returns the given window's current background |
| 89 | character/attribute pair via the \fBwch\fR pointer. |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 90 | .SH NOTES |
| 91 | Note that |
| 92 | \fBbkgrnd\fR, |
| 93 | \fBbkgrndset\fR, and |
| 94 | \fBgetbkgrnd\fR |
| 95 | may be macros. |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 96 | .SH RETURN VALUE |
| 97 | .PP |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 98 | The \fBbkgrndset\fR and \fBwbkgrndset\fR routines do not return a value. |
| 99 | .PP |
| 100 | Upon successful completion, the other functions return \fBOK\fR. |
| 101 | Otherwise, they return \fBERR\fR. |
| 102 | A null window pointer is treated as an error. |
| 103 | .SH SEE ALSO |
| 104 | \fBcurses\fR(3X), |
| 105 | \fBcurs_bkgd\fR(3X) |