]> ncurses.scripts.mit.edu Git - ncurses.git/blob - man/curs_attr.3x
ncurses 6.0 - patch 20171104
[ncurses.git] / man / curs_attr.3x
1 '\" t
2 .\"***************************************************************************
3 .\" Copyright (c) 1998-2016,2017 Free Software Foundation, Inc.              *
4 .\"                                                                          *
5 .\" Permission is hereby granted, free of charge, to any person obtaining a  *
6 .\" copy of this software and associated documentation files (the            *
7 .\" "Software"), to deal in the Software without restriction, including      *
8 .\" without limitation the rights to use, copy, modify, merge, publish,      *
9 .\" distribute, distribute with modifications, sublicense, and/or sell       *
10 .\" copies of the Software, and to permit persons to whom the Software is    *
11 .\" furnished to do so, subject to the following conditions:                 *
12 .\"                                                                          *
13 .\" The above copyright notice and this permission notice shall be included  *
14 .\" in all copies or substantial portions of the Software.                   *
15 .\"                                                                          *
16 .\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  *
17 .\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               *
18 .\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   *
19 .\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   *
20 .\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    *
21 .\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    *
22 .\" THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               *
23 .\"                                                                          *
24 .\" Except as contained in this notice, the name(s) of the above copyright   *
25 .\" holders shall not be used in advertising or otherwise to promote the     *
26 .\" sale, use or other dealings in this Software without prior written       *
27 .\" authorization.                                                           *
28 .\"***************************************************************************
29 .\"
30 .\" $Id: curs_attr.3x,v 1.60 2017/10/14 20:01:13 tom Exp $
31 .TH curs_attr 3X ""
32 .ie \n(.g .ds `` \(lq
33 .el       .ds `` ``
34 .ie \n(.g .ds '' \(rq
35 .el       .ds '' ''
36 .de bP
37 .IP \(bu 4
38 ..
39 .na
40 .hy 0
41 .\" ---------------------------------------------------------------------------
42 .SH NAME
43 .\" attr_get
44 \fBattr_get\fR,
45 \fBwattr_get\fR,
46 \fBattr_set\fR,
47 \fBwattr_set\fR,
48 .\" .br
49 \fBattr_off\fR,
50 \fBwattr_off\fR,
51 \fBattr_on\fR,
52 \fBwattr_on\fR,
53 .\" .br
54 \fBattroff\fR,
55 \fBwattroff\fR,
56 \fBattron\fR,
57 \fBwattron\fR,
58 \fBattrset\fR,
59 \fBwattrset\fR,
60 .\" .br
61 \fBchgat\fR,
62 \fBwchgat\fR,
63 \fBmvchgat\fR,
64 \fBmvwchgat\fR,
65 .\" .br
66 \fBcolor_set\fR,
67 \fBwcolor_set\fR,
68 .\" .br
69 \fBstandend\fR,
70 \fBwstandend\fR,
71 \fBstandout\fR,
72 \fBwstandout\fR \- \fBcurses\fR character and window attribute control routines
73 .ad
74 .hy
75 .\" ---------------------------------------------------------------------------
76 .SH SYNOPSIS
77 \fB#include <curses.h>\fR
78 .sp
79 \fBint attr_get(attr_t *\fP\fIattrs\fP\fB, short *\fP\fIpair\fP\fB, void *\fP\fIopts\fP\fB);\fR
80 .br
81 \fBint wattr_get(WINDOW *\fP\fIwin\fP\fB, attr_t *\fP\fIattrs\fP\fB, short *\fP\fIpair\fP\fB,\fR \fBvoid *\fP\fIopts\fP\fB);\fR
82 .br
83 \fBint attr_set(attr_t \fP\fIattrs\fP\fB, short \fP\fIpair\fP\fB, void *\fP\fIopts\fP\fB);\fR
84 .br
85 \fBint wattr_set(WINDOW *\fP\fIwin\fP\fB, attr_t \fP\fIattrs\fP\fB, short \fP\fIpair\fP\fB, void *\fP\fIopts\fP\fB);\fR
86 .sp
87 \fBint attr_off(attr_t \fP\fIattrs\fP\fB, void *\fP\fIopts\fP\fB);\fR
88 .br
89 \fBint wattr_off(WINDOW *\fP\fIwin\fP\fB, attr_t \fP\fIattrs\fP\fB, void *\fP\fIopts\fP\fB);\fR
90 .br
91 \fBint attr_on(attr_t \fP\fIattrs\fP\fB, void *\fP\fIopts\fP\fB);\fR
92 .br
93 \fBint wattr_on(WINDOW *\fP\fIwin\fP\fB, attr_t \fP\fIattrs\fP\fB, void *\fP\fIopts\fP\fB);\fR
94 .sp
95 \fBint attroff(int \fP\fIattrs);\fR
96 .br
97 \fBint wattroff(WINDOW *\fP\fIwin\fP\fB, int \fP\fIattrs\fP\fB);\fR
98 .br
99 \fBint attron(int \fP\fIattrs\fP\fB);\fR
100 .br
101 \fBint wattron(WINDOW *\fP\fIwin\fP\fB, int \fP\fIattrs\fP\fB);\fR
102 .br
103 \fBint attrset(int \fP\fIattrs\fP\fB);\fR
104 .br
105 \fBint wattrset(WINDOW *\fP\fIwin\fP\fB, int \fP\fIattrs\fP\fB);\fR
106 .sp
107 \fBint chgat(int \fP\fIn\fP\fB, attr_t \fP\fIattr\fP\fB, short \fP\fIpair\fP\fB,\fR \fBconst void *\fP\fIopts\fP\fB);\fR
108 .br
109 \fBint wchgat(WINDOW *\fP\fIwin\fP\fB,\fP
110       \fBint \fP\fIn\fP\fB, attr_t \fP\fIattr\fP\fB,\fR \fBshort \fP\fIpair\fP\fB, const void *\fP\fIopts\fP\fB);\fR
111 .br
112 \fBint mvchgat(int \fP\fIy\fP\fB, int \fP\fIx\fP\fB,\fP
113       \fBint \fP\fIn\fP\fB, attr_t \fP\fIattr\fP\fB,\fR \fBshort \fP\fIpair\fP\fB, const void *\fP\fIopts\fP\fB);\fR
114 .br
115 \fBint mvwchgat(WINDOW *\fP\fIwin, int \fP\fIy, int \fP\fIx\fP\fB,\fP
116       \fBint \fP\fIn,\fR \fBattr_t \fP\fIattr\fP\fB, short \fP\fIpair\fP\fB, const void *\fP\fIopts\fP\fB);\fR
117 .sp
118 \fBint color_set(short \fP\fIpair\fP\fB, void* \fP\fIopts\fP\fB);\fR
119 .br
120 \fBint wcolor_set(WINDOW *\fP\fIwin\fP\fB, short \fP\fIpair\fP\fB,\fR \fBvoid* \fP\fIopts);\fR
121 .sp
122 \fBint standend(void);\fR
123 .br
124 \fBint wstandend(WINDOW *\fP\fIwin\fP\fB);\fR
125 .br
126 \fBint standout(void);\fR
127 .br
128 \fBint wstandout(WINDOW *\fP\fIwin\fP\fB);\fR
129 .\" ---------------------------------------------------------------------------
130 .SH DESCRIPTION
131 .PP
132 These routines manipulate the current attributes of the named window,
133 which then apply to all characters that are written into
134 the window with \fBwaddch\fR, \fBwaddstr\fR and \fBwprintw\fR.
135 Attributes are
136 a property of the character, and move with the character through any scrolling
137 and insert/delete line/character operations.
138 To the extent possible, they are
139 displayed as appropriate modifications to the graphic rendition of characters
140 put on the screen.
141 .PP
142 These routines do not affect the attributes used
143 when erasing portions of the window.
144 See \fBcurs_bkgd\fR(3X) for functions which modify the attributes used for
145 erasing and clearing.
146 .PP
147 Routines which do not have a \fBWINDOW*\fP parameter apply to \fBstdscr\fP.
148 For example,
149 \fBattr_set\fP is the \fBstdscr\fP variant of \fBwattr_set\fP.
150 .\" ---------------------------------------------------------------------------
151 .SS Window attributes
152 .PP
153 There are two sets of functions:
154 .bP
155 functions for manipulating the window attributes and color:
156 \fBwattr_set\fP and \fBwattr_get\fP.
157 .bP
158 functions for manipulating only the window attributes (not color):
159 \fBwattr_on\fP and \fBwattr_off\fP.
160 .PP
161 The \fBwattr_set\fP function sets the current attributes
162 of the given window to \fIattrs\fP, with color specified by \fIpair\fP.
163 .PP
164 Use \fBwattr_get\fP to retrieve attributes for the given window.
165 .PP
166 Use \fBattr_on\fP and \fBwattr_on\fP to turn on window attributes, i.e.,
167 values OR'd together in \fIattr\fP,
168 without affecting other attributes.
169 Use \fBattr_off\fP and \fBwattr_off\fP to turn off window attributes,
170 again values OR'd together in \fIattr\fP,
171 without affecting other attributes.
172 .\" ---------------------------------------------------------------------------
173 .SS Legacy window attributes
174 Most of the window attribute routines are extensions of older routines
175 which assume that color pairs are OR'd into the attribute parameter.
176 These older routines use the same name, omitting an underscore (\fB_\fP).
177
178 The \fBattrset\fP routine is a legacy feature predating SVr4 curses
179 but kept in X/Open Curses for the same reason that SVr4 curses kept it:
180 compatibility.
181 .PP
182 The remaining \fBattr\fR* functions operate exactly like the corresponding
183 \fBattr_\fR* functions, except that they take arguments of type \fBint\fR
184 rather than \fBattr_t\fR.
185 .PP
186 There is no corresponding \fBattrget\fP function as such in X/Open Curses,
187 although ncurses provides \fBgetattrs\fP (see curs_legacy(3X)).
188 .\" ---------------------------------------------------------------------------
189 .SS Change character rendition
190 .PP
191 The routine \fBchgat\fR changes the attributes of a given number of characters
192 starting at the current cursor location of \fBstdscr\fR.
193 It does not update
194 the cursor and does not perform wrapping.
195 A character count of \-1 or greater
196 than the remaining window width means to change attributes all the way to the
197 end of the current line.
198 The \fBwchgat\fR function generalizes this to any window;
199 the \fBmvwchgat\fR function does a cursor move before acting.
200 .PP
201 In these functions,
202 the color \fIpair\fP argument is a color-pair index
203 (as in the first argument of \fBinit_pair\fR, see \fBcurs_color\fR(3X)).
204 .\" ---------------------------------------------------------------------------
205 .SS Change window color
206 The routine \fBcolor_set\fR sets the current color of the given window to the
207 foreground/background combination described by the color \fIpair\fP parameter.
208 .\" ---------------------------------------------------------------------------
209 .SS Standout
210 .PP
211 The routine \fBstandout\fR is
212 the same as \fBattron(A_STANDOUT)\fR.
213 The routine \fBstandend\fR is the same
214 as \fBattrset(A_NORMAL)\fR or \fBattrset(0)\fR, that is, it turns off all
215 attributes.
216 .PP
217 X/Open does not mark these "restricted", because
218 .bP
219 they have well established legacy use, and
220 .bP
221 there is no ambiguity about the way the attributes
222 might be combined with a color pair.
223 .\" ---------------------------------------------------------------------------
224 .SH VIDEO ATTRIBUTES
225 The following video attributes, defined in \fB<curses.h>\fR, can be passed to
226 the routines \fBattron\fR, \fBattroff\fR, and \fBattrset\fR, or OR'd with the
227 characters passed to \fBaddch\fR (see \fBcurs_addch\fR(3X)).
228 .PP
229 .RS
230 .TS
231 l l
232 _ _ _
233 l l .
234 \fIName\fR      \fIDescription\fR
235 \fBA_NORMAL\fR  Normal display (no highlight)
236 \fBA_STANDOUT\fR        Best highlighting mode of the terminal.
237 \fBA_UNDERLINE\fR       Underlining
238 \fBA_REVERSE\fR Reverse video
239 \fBA_BLINK\fR   Blinking
240 \fBA_DIM\fR     Half bright
241 \fBA_BOLD\fR    Extra bright or bold
242 \fBA_PROTECT\fR Protected mode
243 \fBA_INVIS\fR   Invisible or blank mode
244 \fBA_ALTCHARSET\fR      Alternate character set
245 \fBA_ITALIC\fR  Italics (non-X/Open extension)
246 \fBA_CHARTEXT\fR        Bit-mask to extract a character
247 .TE
248 .RE
249 .PP
250 These video attributes are supported by \fBattr_on\fP and related functions
251 (which also support the attributes recognized by \fBattron\fP, etc.):
252 .RS
253 .TS
254 l l
255 _ _ _
256 l l .
257 \fIName\fR      \fIDescription\fR
258 \fBWA_HORIZONTAL\fR     Horizontal highlight
259 \fBWA_LEFT\fR   Left highlight
260 \fBWA_LOW\fR    Low highlight
261 \fBWA_RIGHT\fR  Right highlight
262 \fBWA_TOP\fR    Top highlight
263 \fBWA_VERTICAL\fR       Vertical highlight
264 .TE
265 .RE
266 .PP
267 The return values of many of these routines are not meaningful (they are
268 implemented as macro-expanded assignments and simply return their argument).
269 The SVr4 manual page claims (falsely) that these routines always return \fB1\fR.
270 .\" ---------------------------------------------------------------------------
271 .SH NOTES
272 These functions may be macros:
273 .sp
274 .RS
275 \fBattroff\fR, \fBwattroff\fR, \fBattron\fR, \fBwattron\fR,
276 \fBattrset\fR, \fBwattrset\fR, \fBstandend\fR and \fBstandout\fR.
277 .RE
278 .PP
279 Color pair values can only be OR'd with attributes if the pair
280 number is less than 256.
281 The alternate functions such as \fBcolor_set\fP can pass a color pair
282 value directly.
283 However, ncurses ABI 4 and 5 simply OR this value within the alternate functions.
284 You must use ncurses ABI 6 to support more than 256 color pairs.
285 .\" ---------------------------------------------------------------------------
286 .SH HISTORY
287 X/Open Curses is largely based on SVr4 curses,
288 adding support for \*(``wide-characters\*('' (not specific to Unicode).
289 Some of the X/Open differences from SVr4 curses address the way
290 video attributes can be applied to wide-characters.
291 But aside from that, \fBattrset\fP and \fBattr_set\fP are similar.
292 SVr4 curses provided the basic features for manipulating video attributes.
293 However, earlier versions of curses provided a part of these features.
294 .PP
295 As seen in 2.8BSD, curses assumed 7-bit characters,
296 using the eighth bit of a byte to represent the \fIstandout\fP
297 feature (often implemented as bold and/or reverse video).
298 The BSD curses library provided functions \fBstandout\fP and \fBstandend\fP
299 which were carried along into X/Open Curses due to their pervasive use
300 in legacy applications.
301 .PP
302 Some terminals in the 1980s could support a variety of video attributes,
303 although the BSD curses library could do nothing with those.
304 System V (1983) provided an improved curses library.
305 It defined the \fBA_\fP symbols for use by applications to manipulate the
306 other attributes.
307 There are few useful references for the chronology.
308 .PP
309 Goodheart's book
310 \fIUNIX Curses Explained\fP (1991) describes SVr3 (1987),
311 commenting on several functions:
312 .bP
313 the \fBattron\fP, \fBattroff\fP, \fBattrset\fP functions
314 (and most of the functions found in SVr4 but not in BSD curses) were
315 introduced by System V,
316 .bP
317 the alternate character set feature with \fBA_ALTCHARSET\fP was
318 added in SVr2 and improved in SVr3 (by adding \fBacs_map[]\fP),
319 .bP
320 \fBstart_color\fP and related color-functions were introduced by System V.3.2,
321 .bP
322 pads, soft-keys were added in SVr3, and
323 .PP
324 Goodheart did not mention the background character or the \fBcchar_t\fP type.
325 Those are respectively SVr4 and X/Open features.
326 He did mention the \fBA_\fP constants, but did not indicate their values.
327 Those were not the same in different systems,
328 even for those marked as System V.
329 .PP
330 Different Unix systems used different sizes for the bit-fields in \fBchtype\fP
331 for \fIcharacters\fP and \fIcolors\fP, and took into account the different
332 integer sizes (32-bit versus 64-bit).
333 .PP
334 This table showing the number of bits for \fBA_COLOR\fP
335 and \fBA_CHARTEXT\fP
336 was gleaned from the curses header files for
337 various operating systems and architectures.
338 The inferred architecture and notes reflect
339 the format and size of the defined constants
340 as well as clues such as the alternate character set implementation.
341 A 32-bit library can be used on a 64-bit system,
342 but not necessarily the reverse.
343 .RS
344 .TS
345 l l l l l l
346 _ _ _ _ _ _
347 l l l l l l .
348 \fIYear\fR      \fISystem\fR    \fIArch\fP      \fIColor\fR     \fIChar\fR      \fINotes\fR
349 1992    Solaris 5.2     32      6       17      SVr4 curses
350 1992    HPUX 9  32      no      8       SVr2 curses
351 1992    AIX 3.2 32      no      23      SVr2 curses
352 1994    OSF/1 r3        32      no      23      SVr2 curses
353 1995    HP-UX 10.00     32      6       16      SVr3 \*(``curses_colr\*('' 
354 1995    HP-UX 10.00     32      6       8       SVr4, X/Open curses
355 1995    Solaris 5.4     32/64   7       16      X/Open curses
356 1996    AIX 4.2 32      7       16      X/Open curses
357 1996    OSF/1 r4        32      6       16      X/Open curses
358 1997    HP-UX 11.00     32      6       8       X/Open curses
359 2000    U/Win   32/64   7/31    16      uses \fBchtype\fP
360 .TE
361 .RE
362 .PP
363 Notes:
364 .RS 3
365 .PP
366 Regarding HP-UX,
367 .bP
368 HP-UX 10.20 (1996) added support for 64-bit PA-RISC processors in 1996.
369 .bP
370 HP-UX 10.30 (1997) marked \*(``curses_colr\*('' obsolete.
371 That version of curses was dropped with HP-UX 11.30 in 2006.
372 .PP
373 Regarding OSF/1 (and Tru64),
374 .bP
375 These used 64-bit hardware.
376 Like ncurses, the OSF/1 curses interface is not customized for 32-bit
377 and 64-bit versions.
378 .bP
379 Unlike other systems which evolved from AT&T code,
380 OSF/1 provided a new implementation for X/Open curses.
381 .PP
382 Regarding Solaris,
383 .bP
384 The initial release of Solaris was in 1992.
385 .bP
386 The \fIxpg4\fP (X/Open) curses was developed by MKS from 1990 to 1995.
387 Sun's copyright began in 1996.
388 .bP
389 Sun updated the X/Open curses interface after 64-bit support was introduced in 1997,
390 but did not modify the SVr4 curses interface.
391 .PP
392 Regarding U/Win,
393 .bP
394 Development of the curses library began in 1991, stopped in 2000. 
395 .bP
396 Color support was added in 1998.
397 .bP
398 The library uses only \fBchtype\fP (no \fBcchar_t\fP).
399 .RE
400 .PP
401 Once X/Open curses was adopted in the mid-1990s, the constraint of
402 a 32-bit interface with many colors and wide-characters for \fBchtype\fP
403 became a moot point.  The \fBcchar_t\fP structure (whose size and
404 members are not specified in X/Open Curses) could be extended as needed.
405 .PP
406 Other interfaces are rarely used now:
407 .bP
408 BSD curses was improved slightly in 1993/1994 using Keith Bostic's
409 modification to make the library 8-bit clean for \fBnvi\fP.
410 He moved \fIstandout\fP attribute to a structure member.
411 .IP
412 The resulting 4.4BSD curses was replaced by ncurses over the next ten years.
413 .bP
414 U/Win is rarely used now.
415 .\" ---------------------------------------------------------------------------
416 .SH EXTENSIONS
417 .PP
418 This implementation provides the \fBA_ITALIC\fP attribute for terminals
419 which have the \fBenter_italics_mode\fP (\fBsitm\fP)
420 and \fBexit_italics_mode\fP (\fBritm\fP) capabilities.
421 Italics are not mentioned in X/Open Curses.
422 Unlike the other video attributes, \fBA_ITALIC\fP is unrelated
423 to the \fBset_attributes\fP capabilities.
424 This implementation makes the assumption that
425 \fBexit_attribute_mode\fP may also reset italics.
426 .PP
427 Each of the functions added by XSI Curses has a parameter \fIopts\fP,
428 which X/Open Curses still (after more than twenty years) documents
429 as reserved for future use, saying that it should be \fBNULL\fP.
430 This implementation uses that parameter in ABI 6 for the functions which
431 have a color-pair parameter to support \fIextended color pairs\fP:
432 .bP
433 For functions which modify the color, e.g.,
434 \fBwattr_set\fP,
435 if \fIopts\fP is set it is treated as a pointer to \fBint\fP,
436 and used to set the color pair instead of the \fBshort\fP \fIpair\fP parameter.
437 .bP
438 For functions which retrieve the color, e.g.,
439 \fBwattr_get\fP,
440 if \fIopts\fP is set it is treated as a pointer to \fBint\fP,
441 and used to retrieve the color pair as an \fBint\fP value,
442 in addition
443 retrieving it via the standard pointer to \fBshort\fP parameter.
444 .PP
445 The remaining functions which have \fIopts\fP,
446 but do not manipulate color,
447 e.g., \fBwattr_on\fP and \fBwattr_off\fP
448 are not used by this implementation except to check that they are \fBNULL\fP.
449 .\" ---------------------------------------------------------------------------
450 .SH PORTABILITY
451 These functions are supported in the XSI Curses standard, Issue 4.
452 The standard defined the dedicated type for highlights,
453 \fBattr_t\fR, which was not defined in SVr4 curses.
454 The functions taking \fBattr_t\fR arguments were not supported under SVr4.
455 .PP
456 Very old versions of this library did not force an update of the screen
457 when changing the attributes.
458 Use \fBtouchwin\fR to force the screen to match the updated attributes.
459 .PP
460 The XSI Curses standard states that whether the traditional functions
461 \fBattron\fR/\fBattroff\fR/\fBattrset\fR can manipulate attributes other than
462 \fBA_BLINK\fR, \fBA_BOLD\fR, \fBA_DIM\fR, \fBA_REVERSE\fR, \fBA_STANDOUT\fR, or
463 \fBA_UNDERLINE\fR is "unspecified".
464 Under this implementation as well as
465 SVr4 curses, these functions correctly manipulate all other highlights
466 (specifically, \fBA_ALTCHARSET\fR, \fBA_PROTECT\fR, and \fBA_INVIS\fR).
467 .PP
468 XSI Curses added these entry points:
469 .sp
470 .RS
471 \fBattr_get\fR, \fBattr_on\fR,
472 \fBattr_off\fR, \fBattr_set\fR, \fBwattr_on\fR, \fBwattr_off\fR,
473 \fBwattr_get\fR, \fBwattr_set\fR
474 .RE
475 .PP
476 The new functions are intended to work with
477 a new series of highlight macros prefixed with \fBWA_\fR.
478 The older macros have direct counterparts in the newer set of names:
479 .PP
480 .RS
481 .ne 9
482 .TS
483 l l
484 _ _ _
485 l l .
486 \fIName\fR      \fIDescription\fR
487 \fBWA_NORMAL\fR Normal display (no highlight)
488 \fBWA_STANDOUT\fR       Best highlighting mode of the terminal.
489 \fBWA_UNDERLINE\fR      Underlining
490 \fBWA_REVERSE\fR        Reverse video
491 \fBWA_BLINK\fR  Blinking
492 \fBWA_DIM\fR    Half bright
493 \fBWA_BOLD\fR   Extra bright or bold
494 \fBWA_ALTCHARSET\fR     Alternate character set
495 .TE
496 .RE
497 .PP
498 XSI curses does not assign values to these symbols,
499 nor does it state whether or not they are related to the
500 similarly-named A_NORMAL, etc.:
501 .bP
502 The XSI curses standard specifies that each pair of corresponding \fBA_\fR
503 and \fBWA_\fR-using functions operates on the same current-highlight
504 information.
505 .bP
506 However, in some implementations, those symbols have unrelated values.
507 .IP
508 For example, the Solaris \fIxpg4\fP (X/Open) curses declares
509 \fBattr_t\fP to be an unsigned short integer (16-bits),
510 while \fBchtype\fP is a unsigned integer (32-bits).
511 The \fBWA_\fP symbols in this case are different from the \fBA_\fP symbols
512 because they are used for a smaller datatype which does not
513 represent \fBA_CHARTEXT\fP or \fBA_COLOR\fP.
514 .IP
515 In this implementation (as in many others), the values happen to be
516 the same because it simplifies copying information between
517 \fBchtype\fP and \fBcchar_t\fP variables.
518 .PP
519 The XSI standard extended conformance level adds new highlights
520 \fBA_HORIZONTAL\fR, \fBA_LEFT\fR, \fBA_LOW\fR, \fBA_RIGHT\fR, \fBA_TOP\fR,
521 \fBA_VERTICAL\fR (and corresponding \fBWA_\fR macros for each).
522 As of August 2013,
523 no known terminal provides these highlights
524 (i.e., via the \fBsgr1\fP capability).
525 .\" ---------------------------------------------------------------------------
526 .SH RETURN VALUE
527 All routines return the integer \fBOK\fR on success, or \fBERR\fP on failure.
528 .PP
529 X/Open does not define any error conditions.
530 .PP
531 This implementation
532 .bP
533 returns an error if the window pointer is null.
534 .bP
535 returns an error if the color pair parameter
536 for \fBwcolor_set\fP is outside the range 0..COLOR_PAIRS\-1.
537 .bP
538 does not return an error if either of the parameters of \fBwattr_get\fP
539 used for retrieving attribute or color-pair values is \fBNULL\fP.
540 .PP
541 Functions with a "mv" prefix first perform a cursor movement using
542 \fBwmove\fP, and return an error if the position is outside the window,
543 or if the window pointer is null.
544 .\" ---------------------------------------------------------------------------
545 .SH SEE ALSO
546 .na
547 \fBcurses\fR(3X),
548 \fBcurs_addch\fR(3X),
549 \fBcurs_addstr\fR(3X),
550 \fBcurs_bkgd\fR(3X),
551 \fBcurs_printw\fR(3X),
552 \fBcurs_variables\fR(3X)