1 .\"***************************************************************************
2 .\" Copyright (c) 1998,2000,2001 Free Software Foundation, Inc. *
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: *
12 .\" The above copyright notice and this permission notice shall be included *
13 .\" in all copies or substantial portions of the Software. *
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. *
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 *
27 .\"***************************************************************************
29 .\" $Id: curs_color.3x,v 1.17 2001/09/01 21:04:33 tom Exp $
36 \fBcan_change_color\fR,
39 .\"O \fBCOLOR_PAIR\fR - \fBcurses\fR color manipulation routines
40 \fBCOLOR_PAIR\fR - \fBcurses\fR ¥«¥é¡¼Áàºî´Ø¿ô·²
42 \fB# include <curses.h>\fR
44 \fBint start_color(void);\fR
46 \fBint init_pair(short pair, short f, short b);\fR
48 \fBint init_color(short color, short r, short g, short b);\fR
50 \fBbool has_colors(void);\fR
52 \fBbool can_change_color(void);\fR
54 \fBint color_content(short color, short *r, short *g, short *b);\fR
56 \fBint pair_content(short pair, short *f, short *b);\fR
59 .\"O \fBcurses\fR support color attributes on terminals with that capability.
60 .\"O To use these routines \fBstart_color\fR must be called,
61 .\"O usually right after \fBinitscr\fR.
62 .\"O Colors are always used in pairs (referred to as color-pairs).
63 .\"O A color-pair consists of a foreground color (for characters)
64 .\"O and a background color (for the blank field on which the characters
66 .\"O A programmer initializes a color-pair with the routine \fBinit_pair\fR.
67 .\"O After it has been initialized,
68 .\"O \fBCOLOR_PAIR\fR(\fIn\fR), a macro defined in \fB<curses.h>\fR,
69 .\"O can be used as a new video attribute.
72 \fBcurses\fR¤ÏüËö¤Î¥«¥é¡¼Â°À¤ò¥µ¥Ý¡¼¥È¤¹¤ë¡£
73 ¤³¤ì¤é¤Î´Ø¿ô¤ò»ÈÍѤ¹¤ë¤Ë¤Ï¡¢¡ÀfBstart_color\fR¤¬¸Æ¤Ð¤ì¤Ê¤±¤ì¤Ð¤Ê¤é¤º¡¢
74 ¤¿¤¤¤Æ¤¤ \fBinitscr\fR¤Îľ¸å¤Ç¤¢¤ë¡£
75 ¿§¤Ï¾ï¤Ë°ìÁȤߤΤâ¤Î(¥«¥é¡¼¥Ú¥¢)¤È¤·¤Æ»È¤ï¤ì¤ë¡£
76 ¥«¥é¡¼¥Ú¥¢¤ÏÁ°·Ê¿§(ʸ»úÍÑ)¤ÈÇØ·Ê¿§(ʸ»ú¤¬ÉÁ²è¤µ¤ì¤Æ¤¤¤Ê¤¤ÎΰèÍÑ)
78 ¥×¥í¥°¥é¥Þ¤Ï \fBinit_pair\fR´Ø¿ô¤Ë¤è¤ê¥«¥é¡¼¥Ú¥¢¤ò½é´ü²½¤¹¤ë¡£
79 ½é´ü²½¤Î¸å¤Ë¤Ï \fB<curses.h>\fR¤ÇÄêµÁ¤µ¤ì¤Æ¤¤¤ë
80 \fBCOLOR_PAIR\fR(\fIn\fR)¥Þ¥¯¥í¤ò¿·Â°À¤ÎÀßÄê¤Ë»ÈÍѲÄǽ¤Ç¤¢¤ë¡£
82 .\"O If a terminal is capable of redefining colors, the programmer can use
83 .\"O the routine \fBinit_color\fR to change the definition of a color.
84 .\"O The routines \fBhas_colors\fR and \fBcan_change_color\fR return
85 .\"O \fBTRUE\fR or \fBFALSE\fR,
86 .\"O depending on whether the terminal has color capabilities and whether the
87 .\"O programmer can change the colors. The routine \fBcolor_content\fR
88 .\"O allows a programmer to extract the amounts of red, green, and blue
89 .\"O components in an initialized color.
90 .\"O The routine \fBpair_content\fR allows a programmer to find out
91 .\"O how a given color-pair is currently defined.
92 ¤â¤·Ã¼Ëö¤Î¥«¥é¡¼Â°À¤òºÆÄêµÁ²Äǽ¤Ê¤é¤Ð¡¢¥×¥í¥°¥é¥Þ¤Ï
93 \fBinit_color\fR´Ø¿ô¤ò¿§¤ÎÄêµÁ¤òÊѹ¹¤¹¤ë¤¿¤á¤Ë»ÈÍѤ¹¤ë»ö¤¬½ÐÍè¤ë¡£
94 \fBhas_colors\fR¤ª¤è¤Ó \fBcan_change_color\fR´Ø¿ô¤Ï \fBTRUE\fR ¤Þ¤¿¤Ï
95 \fBFALSE\fR¤òÊÖ¤·¡¢¤³¤ÎÃͤÏüËö¤¬¥«¥é¡¼ÉÁ²è²Äǽ¤«¡¢
96 ¥×¥í¥°¥é¥Þ¤¬¿§¤òÊѹ¹²Äǽ¤«¤Ë°Í¸¤¹¤ë¡£
97 \fBcolor_content\fR´Ø¿ô¤Ï¥×¥í¥°¥é¥Þ¤Ë½é´ü²½¤µ¤ì¤¿RGBÃͤμèÆÀ¤òµöÍƤ¹¤ë¡£
98 ¥×¥í¥°¥é¥Þ¤Ï \fBpair_content\fR´Ø¿ô¤ò
99 Í¿¤¨¤é¤ì¤¿¥«¥é¡¼¥Ú¥¢¤¬¸½ºßÄêµÁ¤µ¤ì¤Æ¤¤¤ë¤«¤òÃΤ뤿¤á¤Ë»È¤¦¡£
102 .\"O The \fBstart_color\fR routine requires no arguments. It must be
103 .\"O called if the programmer wants to use colors, and before any other
104 .\"O color manipulation routine is called. It is good practice to call
105 .\"O this routine right after \fBinitscr\fR. \fBstart_color\fR initializes
106 .\"O eight basic colors (black, red, green, yellow, blue, magenta, cyan,
107 .\"O and white), and two global variables, \fBCOLORS\fR and
108 .\"O \fBCOLOR_PAIRS\fR (respectively defining the maximum number of colors
109 .\"O and color-pairs the terminal can support). It also restores the
110 .\"O colors on the terminal to the values they had when the terminal was
113 \fBstart_color\fR´Ø¿ô¤Ï°ú¿ô¤òÍ׵ᤷ¤Ê¤¤¡£
114 ¿§¤ò»ÈÍѤ·¤¿¤¤¤Ê¤é¡¢¤³¤Î´Ø¿ô¤¬¸Æ¤Ð¤ì¤Ê¤±¤ì¤Ð¤Ê¤é¤º¡¢
115 (¤½¤Î½ç½ø¤Ï)¾¤Î¤É¤ó¤Ê¥«¥é¡¼Áàºî´Ø¿ô¤è¤ê¤âÀè¤Ç¤¢¤ë¡£
116 ¤è¤Ã¤Æ \fBinitscr\fR¤Îľ¸å¤Ë¤³¤Î´Ø¿ô¤ò¸Æ¤Ó½Ð¤¹¤Î¤ÏÎɤ¤½¬´·¤Ç¤¢¤ë¡£
117 \fBstart_color\fR¤Ï¼ê»Ï¤á¤Ë8¤Ä¤Î´ðËÜ¿§¤ò½é´ü²½¤¹¤ë¡£
118 (´ðËÜ¿§¤È¤Ï black, red, green, yellow, blue, magenta, cyan,
119 ¤½¤·¤Æ white¤Ç¤¢¤ë¡£)
120 ¤½¤ì¤Ë²Ã¤¨¡¢¡ÀfBCOLORS\fR ¤È \fBCOLOR_PAIRS\fR ¤È¤¤¤¦2¤Ä¤Î¥°¥í¡¼¥Ð¥ëÊÑ¿ô¤ò
122 (¤½¤ì¤¾¤ì¡¢Ã¼Ëö¤¬¥µ¥Ý¡¼¥È¤¹¤ë»ÈÍÑ¿§¤Î¾å¸Â¡¢¥«¥é¡¼¥Ú¥¢¤Î¾å¸Â¤ò°ÕÌ£¤¹¤ë¡£)
123 ¤³¤ì¤Ï¡¢Ã¼Ëö¾å¤Î¿§¿ô¤òµ¯Æ°»þ¤ÎÃͤؤÈÌ᤹¡£
125 .\"O The \fBinit_pair\fR routine changes the definition of a color-pair.
126 .\"O It takes three arguments:
127 .\"O the number of the color-pair to be changed, the foreground
128 .\"O color number, and the background color number.
129 .\"O For portable applications:
130 \fBinit_pair\fR´Ø¿ô¤Ï¥«¥é¡¼¥Ú¥¢¤ÎÄêµÁ¤òÊѹ¹¤¹¤ë¡£
131 ¤³¤Î´Ø¿ô¤Ï3¤Ä¤Î°ú¿ô¤ò¤È¤ë:
132 Êѹ¹¤¹¤ë¥«¥é¡¼¥Ú¥¢¤Î¿ô¡¢Á°·Ê¿§¡¢ÇØ·Ê¿§¤Ç¤¢¤ë¡£
133 °Ü¿¢À¤Î¹â¤¤¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤Î¤¿¤á¤Ë¤Ï:
137 .\"O The value of the first argument
138 .\"O must be between \fB1\fR and \fBCOLOR_PAIRS-1\fR.
139 ºÇ½é¤Î°ú¿ô¤ÎÃÍ¤Ï \fB1\fR ¤«¤é \fBCOLOR_PAIRS-1\fR¤Î´Ö¤Ç¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£
142 .\"O The value of the second and
143 .\"O third arguments must be between 0 and \fBCOLORS\fR (the 0 color pair is
144 .\"O wired to white on black and cannot be changed).
145 ÂèÆó°ú¿ô¤ÎÃÍ¡¢¤ª¤è¤ÓÂè»°°ú¿ô¤ÎÃͤϡ¢0¤«¤é \fBCOLORS\fR¤Ç¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£
146 (¥«¥é¡¼¥Ú¥¢ 0¤ÏÁ°·Ê¿§¤¬Çò¡¢ÇØ·Ê¿§¤¬¹õ¤È¤Ê¤Ã¤Æ¤ª¤êÊѹ¹¤Ç¤¤Ê¤¤¡£)
149 .\"O If the color-pair was previously
150 .\"O initialized, the screen is refreshed and all occurrences of that
151 .\"O color-pair are changed to the new definition.
152 ¥«¥é¡¼¥Ú¥¢¤¬Á°¤â¤Ã¤Æ½é´ü²½¤µ¤ì¤Æ¤¤¤¿¾ì¹ç¡¢
153 ¥¹¥¯¥ê¡¼¥ó¤Ï¹¹¿·¤µ¤ì¤¹¤Ù¤Æ¤Î³ºÅö¤¹¤ë¥«¥é¡¼¥Ù¥¢¤Ï¿·¤¿¤ÊÄêµÁ¤Ø¤ÈÊѹ¹¤µ¤ì¤ë¡£
155 .\"O As an extension, ncurses allows you to set color pair 0 via
156 .\"O the \fBassume_default_colors\fR routine, or to specify the use of
157 .\"O default colors (color number \fB-1\fR) if you first invoke the
158 .\"O \fBuse_default_colors\fR routine.
160 ³ÈÄ¥¤È¤·¤Æ¡¢ncurses¤Ï \fBassume_default_colors\fR´Ø¿ô·Ðͳ¤Ç¥«¥é¡¼¥Ú¥¢
161 0 ¤òÊѹ¹¤¹¤ë¤«¡¢(\fBuse_default_colors\fR ´Ø¿ô¤òºÇ½é¤Ë¼Â¹Ô¤·¤Æ¤¤¤ì¤Ð)
162 ¥Ç¥Õ¥©¥ë¥È(\fB-1\fR)¤ò»ØÄꤹ¤ë¤³¤È¤¬µö¤µ¤ì¤ë¡£
164 .\"O The \fBinit_color\fR routine changes the definition of a color.
165 .\"O It takes four arguments:
166 .\"O the number of the color to be changed followed by three RGB values
167 .\"O (for the amounts of red, green, and blue components).
168 .\"O The value of the first argument must be between \fB0\fR and
170 .\"O (See the section \fBColors\fR for the default color index.)
171 .\"O Each of the last three arguments must be a value between 0 and 1000.
172 .\"O When \fBinit_color\fR is used, all occurrences of that color
173 .\"O on the screen immediately change to the new definition.
175 \fBinit_color\fR ´Ø¿ô¤Ï¿§¤ÎÄêµÁ¤òÊѹ¹¤¹¤ë¡£
176 ¤³¤Î´Ø¿ô¤Ï4¤Ä¤Î°ú¿ô¤ò¤È¤ë:
177 °Ê²¼¤Î3¤Ä¤ÎRGBÃÍ(red, green, blue)¤Ë¤è¤Ã¤ÆÊѹ¹¤µ¤ì¤ë¿§Èֹ档
178 Âè°ì°ú¿ô¤ÎÃÍ¤Ï \fB0\fR ¤«¤é \fBCOLORS\fR ¤Ç¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£
179 (¥Ç¥Õ¥©¥ë¥È¥«¥é¡¼¥¤¥ó¥Ç¥Ã¥¯¥¹¤Î¤¿¤á¤Î \fBColors\fR ¥»¥¯¥·¥ç¥ó¤ò»²¾È¤¹¤ë¤³¤È¡£)
180 3¤Ä¤Î°ú¿ô¤Î¤½¤ì¤¾¤ì¤Ï 0 ¤«¤é 1000¤Î´Ö¤Ç¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£
181 \fBinit_color\fR ¤¬»ÈÍѤµ¤ì¤ëºÝ¡¢
182 ¤¹¤Ù¤Æ¤Î¥¹¥¯¥ê¡¼¥ó¾å¤Î¿§Â°À¤Ï¤¹¤°¤µ¤Þ¿·µ¬¤ÎÄêµÁ¤Ø¤ÈÊѹ¹¤µ¤ì¤ë¡£
184 .\"O The \fBhas_colors\fR routine requires no arguments.
185 .\"O It returns \fBTRUE\fR if the terminal can manipulate colors;
186 .\"O otherwise, it returns \fBFALSE\fR. This routine facilitates
187 .\"O writing terminal-independent programs. For example, a programmer
188 .\"O can use it to decide whether to use color or some other video
191 \fBhas_colors\fR ´Ø¿ô¤Ï°ú¿ô¤òÍ׵ᤷ¤Ê¤¤¡£
192 ¤³¤Î´Ø¿ô¤ÏüËö¤¬¿§¤ò°·¤¨¤ëºÝ¤Ë¤Ï \fBTRUE\fR ¤òÊÖ¤¹¡£
193 ¤½¤¦¤Ç¤Ê¤¤¤Ê¤é¡¢¡ÀfBFALSE\fR ¤òÊÖ¤¹¡£
194 ¤³¤Î´Ø¿ô¤ÏüËö¤Ë°Í¸¤·¤Ê¤¤¥×¥í¥°¥é¥à¤ò½ñ¤¯¤³¤È¤òÍưפˤ¹¤ë¡£
195 Î㤨¤Ð¡¢¥×¥í¥°¥é¥Þ¤Ï¿§¤ò»ÈÍѤ¹¤ë¤«¤É¤¦¤«¡¢Â¾¤Î°À¤ò»ÈÍѤ¹¤ë¤«¤Î·èÄê¤Ë
198 .\"O The \fBcan_change_color\fR routine requires no arguments.
199 .\"O \fBTRUE\fR if the terminal supports colors and can change
200 .\"O their definitions;
201 .\"O other, it returns \fBFALSE\fR. This routine facilitates writing
202 .\"O terminal-independent programs.
204 \fBcan_change_color\fR ´Ø¿ô¤Ï°ú¿ô¤òÍ׵ᤷ¤Ê¤¤¡£
205 ¤â¤·Ã¼Ëö¤¬¿§¤ò¥µ¥Ý¡¼¥È¤¹¤ë¤Ê¤é¤Ð¡¢¡ÀfBTRUE\fR ¤òÊÖ¤·ÄêµÁ¤òÊѹ¹¤¹¤ë¡£
206 °ìÊý¤Ç \fBFALSE\fR ¤òÊÖ¤¹¡£
207 ¤³¤Î´Ø¿ô¤ÏüËö¤Ë°Í¸¤·¤Ê¤¤¥×¥í¥°¥é¥à¤ò½ñ¤¯¤³¤È¤òÍưפˤ¹¤ë¡£
209 .\"O The \fBcolor_content\fR routine gives programmers a way
210 .\"O to find the intensity
211 .\"O of the red, green, and blue (RGB) components in a color.
212 .\"O It requires four arguments:
213 .\"O the color number, and three addresses of \fBshort\fRs for storing
214 .\"O the information about the amounts of red, green,
215 .\"O and blue components in the given color.
216 .\"O The value of the first argument must be between 0 and \fBCOLORS\fR.
217 .\"O The values that are stored at the addresses pointed to by the
218 .\"O last three arguments are between 0 (no component) and 1000
219 .\"O (maximum amount of component).
221 \fBcolor_content\fR ´Ø¿ô¤Ï¥×¥í¥°¥é¥Þ¤ËRGBÃͤˤè¤ë¿§¤òÃΤëÊýË¡¤òÍ¿¤¨¤ë¡£
222 4¤Ä¤Î°ú¿ô¤¬Í׵ᤵ¤ì¤ë¡£
223 ¿§Èֹ桢Ϳ¤¨¤é¤ì¤¿¿§¤ÎRGBÃͤò³ÊǼ¤¹¤ë¤¿¤á¤Î3¤Ä¤Î \fBshort\fRs
225 Âè°ì°ú¿ô¤Ï 0 ¤«¤é \fBCOLORS\fR ¤Ç¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£
226 »Ä¤ê¤Î3¤Ä¤Î°ú¿ô¤Ë¤è¤Ã¤Æ»Ø¤·¼¨¤µ¤ì¤Æ¤¤¤ë¥¢¥É¥ì¥¹¤Ë³ÊǼ¤µ¤ì¤¿Ãͤϡ¢
227 0 (ºÇ¾®ÃÍ) ¤«¤é 1000 (ºÇÂçÃÍ)¤Î´Ö¤Ç¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£
229 .\"O The \fBpair_content\fR routine allows programmers to find out
230 .\"O what colors a given color-pair consists of.
231 .\"O It requires three arguments: the color-pair number,
232 .\"O and two addresses of \fBshort\fRs for storing the foreground and
233 .\"O the background color numbers.
234 .\"O The value of the first argument must be between 1 and
235 .\"O \fBCOLOR_PAIRS-1\fR. The values that are stored at the addresses
236 .\"O pointed to by the second and third arguments are between 0
237 .\"O and \fBCOLORS\fR.
239 .\"O In \fB<curses.h>\fR the following macros are defined.
240 .\"O These are the default colors.
241 .\"O \fBcurses\fR also assumes that \fBCOLOR_BLACK\fR is the default
242 .\"O background color for all terminals.
244 \fBpair_content\fR ´Ø¿ô¤Ç¥×¥í¥°¥é¥Þ¤ÏÍ¿¤¨¤é¤ì¤¿¥«¥é¡¼¥Ú¥¢¤¬²¿¿§¤Ç
245 ¹½À®¤µ¤ì¤Æ¤¤¤ë¤«¤¬¤ï¤«¤ë¡£
246 ¤³¤Î´Ø¿ô¤Ï°ú¿ô¤ò3¤ÄɬÍפȤ¹¤ë:
247 ¥«¥é¡¼¥Ú¥¢Èֹ桢Á°·Ê¿§¤ÈÇØ·Ê¿§ÈÖ¹æ¤òÊÝ»ý¤¹¤ë \fBshort\fRs ¤Î¥¢¥É¥ì¥¹¤Ç¤¢¤ë¡£
248 ºÇ½é¤Î°ú¿ô¤ÎÃÍ¤Ï 1¤«¤é \fBCOLOR_PAIRS-1\fR ¤Ç¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£
249 ÂèÆó¡¢Âè»°°ú¿ô¤Ë¤è¤Ã¤Æ»Ø¤·¼¨¤µ¤ì¤¿¥¢¥É¥ì¥¹¤ËÊÝ»ý¤µ¤ì¤¿ÃÍ¤Ï 0 ¤«¤é \fBCOLORS\fR
252 \fB<curses.h>\fR ¥Õ¥¡¥¤¥ë¤Ç°Ê²¼¤Î¥Þ¥¯¥í¤¬ÄêµÁ¤µ¤ì¤Æ¤¤¤ë¡£
253 ¤³¤ì¤é¤Ï¥Ç¥Õ¥©¥ë¥È¿§¤Ç¤¢¤ë¡£
254 \fBcurses\fR ¤Ï \fBCOLOR_BLACK\fR ¤ò¤¹¤Ù¤Æ¤ÎüËö¤Î¥Ç¥Õ¥©¥ë¥ÈÇØ·Ê¿§¤È¤ß¤Ê¤¹¡£
267 .\"O The routines \fBcan_change_color()\fR and \fBhas_colors()\fR
268 .\"O return \fBTRUE\fR or \fBFALSE\fR.
269 \fBcan_change_color()\fRµÚ¤Ó \fBhas_colors()\fR´Ø¿ô¤Ï \fBTRUE\fR
270 ¤¢¤ë¤¤¤Ï \fBFALSE\fR¤òÊÖ¤¹¡£
272 .\"O All other routines return the integer \fBERR\fR upon failure
273 .\"O and an \fBOK\fR (SVr4 specifies only "an integer value other than
274 .\"O \fBERR\fR") upon successful completion.
275 ¾¤Î¤¹¤Ù¤Æ¤Î´Ø¿ô¤Ï¼ºÇÔ»þ¤Ë¤Ï \fBERR\fR¤ò¡¢À®¸ù»þ¤Ë¤Ï \fBOK\fR
276 (SVr4 ¤Ç¤Ï "\fBERR\fR°Ê³°¤ÎÀ°¿ôÃÍ") ¤òÊÖ¤¹¡£
279 .\"O In the \fIncurses\fR implementation, there is a separate color activation
281 .\"O color palette, color pairs table, and associated COLORS and COLOR_PAIRS
282 .\"O counts for each screen;
283 .\"O the \fBstart_color\fR function only affects the current screen.
284 .\"O The SVr4/XSI interface is not really designed with this in mind, and
285 .\"O historical implementations may use a single shared color palette.
287 \fIncurses\fR ¤Î¼ÂÁõ¤Ë¤ª¤¤¤Æ¤Ï¡¢¸Ä¡¹¤Ë¥Õ¥é¥°¡¢¥Ñ¥ì¥Ã¥È¡¢¥«¥é¡¼¥Ú¥¢¥Æ¡¼¥Ö¥ë¤¬Â¸ºß¤·¡¢
288 ¤½¤ì¤¾¤ì¤Î¥¹¥¯¥ê¡¼¥ó¤Ø¤È COLORS ¤È COLOR_PAIRS ¥«¥¦¥ó¥ÈÃͤ¬´ØÏ¢¤Å¤±¤é¤ì¤Æ¤¤¤ë¡£
289 \fBstart_color\fR ´Ø¿ô¤Ï¥«¥ì¥ó¥È¥¹¥¯¥ê¡¼¥ó¤Ø¤È±Æ¶Á¤òÍ¿¤¨¤ë¤Î¤ß¤Ç¤¢¤ë¡£
290 SVr4/XSI ¥¤¥ó¥¿¥Õ¥§¡¼¥¹¤Ï¼ÂºÝ¤Ë¤³¤Î¤è¤¦¤ÊÀ߷פµ¤ì¤Æ¤Ï¤¤¤Ê¤¤¡£
291 ²áµî¤Î¼ÂÁõ¤Ç¤Ïñ°ì¤Î¥«¥é¡¼¥Ñ¥ì¥Ã¥È¤ò¶¦Í¤·¤Æ¤¤¤ë¤«¤â¤·¤ì¤Ê¤¤¡£
293 .\"O Note that setting an implicit background color via a color pair
294 .\"O affects only character cells that a character write operation
295 .\"O explicitly touches.
296 .\"O To change the background color used when parts of a window are blanked
297 .\"O by erasing or scrolling operations, see \fBcurs_bkgd\fR(3X).
299 ¥«¥é¡¼¥Ú¥¢·Ðͳ¤Ç°Û¤Ê¤ëÇØ·Ê¿§¤òÀßÄꤹ¤ë¤³¤È¤Ï¡¢Ê¸»úÎΰè¤Î¤ß¤Ë±Æ¶Á¤¹¤ë¤³¤È¤Ë
301 ¥¹¥¯¥í¡¼¥ëÁàºî¤¢¤ë¤¤¤Ï¾Ãµî¤Ë¤è¤ê¡¢¥¦¥£¥ó¥É¥¦¤Î°ìÉô¤¬·ç¤±¤¿»þ¤ËÇØ·Ê¿§¤òÊѤ¨¤ë
302 ¤Ë¤Ï¡¢¡ÀfBcurs_bkgd\fR(3X)¤ò»²¾È¤¹¤ë¤³¤È¡£
304 .\"O Several caveats apply on 386 and 486 machines with VGA-compatible
306 ¤¤¤¯¤Ä¤«¤Î·Ù¹ð¤¬¡¢VGA¸ß´¹¤Î¥°¥é¥Õ¥£¥Ã¥¯¥¹¤òÈ÷¤¨¤¿386¤ª¤è¤Ó486¥Þ¥·¥ó¤Ë
311 .\"O COLOR_YELLOW is actually brown. To get yellow, use COLOR_YELLOW
313 .\"O the \fBA_BOLD\fR attribute.
314 COLOR_YELLOW ¤Ï¼ÂºÝ¤Ë¤ÏÃ㿧¤Ç¤¢¤ë¡£
315 ²«¿§¤ò¼èÆÀ¤¹¤ë¤Ë¤Ï¡¢COLOR_YELLOW¤ò \fBA_BOLD\fR °À¤È¶¦¤Ë»ÈÍѤ¹¤ë¤³¤È¡£
318 .\"O The A_BLINK attribute should in theory cause the background to go bright.
319 .\"O This often fails to work, and even some cards for which
320 .\"O it mostly works (such as the Paradise and compatibles)
321 .\"O do the wrong thing when you try to set a bright "yellow" background
322 .\"O (you get a blinking yellow foreground instead).
323 A_BLINK °À¤ÏÍý¶þ¤«¤é¤¹¤ì¤ÐÇØ·Ê¿§¤òÌÀ¤ë¤¯¤¹¤Ù¤¤Ç¤¢¤ë¡£
324 ¤³¤ì¤Ï¤·¤Ð¤·¤ÐÀµ¤·¤¯Æ°ºî¤»¤º¡¢ÂçÄñ¤¦¤Þ¤¯Æ°¤¯¥«¡¼¥É(Paradise¤È¤½¤Î¸ß´¹¥«¡¼¥É)
325 ¤Ç¤µ¤¨¤âÌÀ¤ë¤¤²«¿§¤òÇØ·Ê¿§¤È¤·¤ÆÀßÄꤷ¤è¤¦¤È»î¤ß¤¿»þ¤Ë¤Ï¸íÆ°ºî¤¹¤ë¡£
326 (¤«¤ï¤ê¤ËÁ°·Ê¿§¤¬µ±¤¯¤³¤È¤À¤í¤¦¡£)
329 .\"O Color RGB values are not settable.
333 .\"O This implementation satisfies XSI Curses's minimum maximums
334 .\"O for \fBCOLORS\fR and \fBCOLOR_PAIRS\fR.
335 ¤³¤Î¼ÂÁõ¤Ï XSI Curses¤ÎºÇÄã¸Â \fBCOLORS\fR ¤È \fBCOLOR_PAIRS\fR¤òËþ¤¿¤¹¡£
338 .\"O The \fBinit_pair\fP routine accepts negative values of foreground
339 .\"O and background color to support the \fBuse_default_colors\fP extension,
340 .\"O but only if that routine has been first invoked.
341 \fBinit_pair\fP´Ø¿ô¤Ï¡ÀfBuse_default_colors\fP ³ÈÄ¥¤ò¥µ¥Ý¡¼¥È¤¹¤ë¤¿¤á¤Ë¡¢
342 Á°·Ê¿§¡¢ÇØ·Ê¿§¤Ë¤Ä¤¤¤ÆÉé¿ô¤ò¼õ¤±¤È¤ë¤¬¡¢¤³¤Î´Ø¿ô¤¬ºÇ½é¤Ë¼Â¹Ô¤µ¤ì¤¿¤È¤¤Î¤ß¤Ç¤¢¤ë¡£
345 .\"O The assumption that \fBCOLOR_BLACK\fR is the default
346 .\"O background color for all terminals can be modified using the
347 .\"O \fBassume_default_colors\fP extension,
349 ¤¹¤Ù¤Æ¤ÎüËö¤Ë¤ª¤¤¤Æ \fBCOLOR_BLACK\fR¤¬¥Ç¥Õ¥©¥ë¥È¤ÎÇØ·Ê¿§¤Ç¤¢¤ë¤È¤¤¤¦²¾Äê¤Ï
350 \fBassume_default_colors\fP ³ÈÄ¥¤ò»È¤¦¤³¤È¤ÇÊѤï¤ë¡£
354 \fBcurs_initscr\fR(3X),
356 \fBdefault_colors\fR(3X)
358 .\"# The following sets edit modes for GNU EMACS
359 .\"# Local Variables: