Implement CLOCK_MONOTONIC using getnanouptime(), which in DragonFly is
[dragonfly.git] / contrib / ncurses / man / dft_fgbg.3x
1 .\"***************************************************************************
2 .\" Copyright (c) 1998,1999,2000 Free Software Foundation, Inc.              *
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 .\"
29 .\" Author: Thomas E. Dickey <dickey@clark.net> 1997,1999
30 .\"
31 .\" $Id: dft_fgbg.3x,v 1.10 2000/07/01 16:33:31 tom Exp $
32 .TH use_default_colors 3X ""
33 .SH NAME
34 \fBdft_fgbg\fR:
35 \fBuse_default_colors\fR,
36 \fBassume_default_colors\fR \- use terminal's default colors
37 ..
38 .SH SYNOPSIS
39 \fB#include <curses.h>\fP
40
41 \fBint use_default_colors(void);\fP
42 .br
43 \fBint assume_default_colors(int fg, int bg);\fP
44 ..
45 .SH DESCRIPTION
46 The
47 .I use_default_colors()
48 and
49 .I assume_default_colors()
50 functions are extensions to the curses library.
51 They are used with terminals that support ISO 6429 color, or equivalent.
52 These terminals allow the application to reset color to an unspecified
53 default value (e.g., with SGR 39 or SGR 49).
54 .PP
55 Applications that paint a colored background over the whole screen
56 do not take advantage of SGR 39 and SGR 49.
57 Some applications are designed to work with the default background.
58 .PP
59 The first function,
60 .I use_default_colors()
61 tells the curses library to assign terminal default
62 foreground/background colors to color number -1. So init_pair(x,COLOR_RED,-1)
63 will initialize pair x as red on default background and init_pair(x,-1,COLOR_BLUE) will
64 initialize pair x as default foreground on blue.
65 .PP
66 The other,
67 .I assume_default_colors()
68 is a refinement which tells which colors to paint for color pair 0, and -1 means default terminal color.
69 The following are equivalent:
70 .RS
71 .br
72 .I use_default_colors();
73 .br
74 .I assume_default_colors(-1,-1);
75 .RE
76 .PP
77 This is a ncurses extension and for other curses implementations color
78 number -1 does not mean anything, just as for ncurses before a
79 successful call of use_default_colors or assume_default_colors.
80 ..
81 .SH RETURN VALUE
82 These functions return the integer \fBERR\fP upon failure and \fBOK\fP on success.
83 They will fail if either the terminal does not support
84 the \fIorig_pair\fP or \fIorig_colors\fP capability.
85 If the \fIinitialize_pair\fP capability is found, this causes an
86 error as well.
87 ..
88 .SH NOTES
89 Associated with this extension, the \fBinit_pair\fR(3X) function accepts
90 negative arguments to specify default foreground or background
91 colors.
92 ..
93 .SH PORTABILITY
94 These routines are specific to ncurses.  They were not supported on
95 Version 7, BSD or System V implementations.  It is recommended that
96 any code depending on them be conditioned using NCURSES_VERSION.
97 ..
98 .SH SEE ALSO
99 \fBcurs_color\fR(3X),
100 \fBded\fP(1).
101 ..
102 .SH AUTHOR
103 Thomas Dickey (from an analysis of the requirements for color xterm
104 for XFree86 3.1.2C, February 1996).
105 .\"#
106 .\"# The following sets edit modes for GNU EMACS
107 .\"# Local Variables:
108 .\"# mode:nroff
109 .\"# fill-column:79
110 .\"# End: