Creates a reference to a pair of colors that can then be called to change the appearance of an element of the ncurses display.
The guaranteed available colors are defined as constants. See the beginning of the Ncurses section.
This is only of use if your terminal is color-enabled. See ncurses_has_colors() and ncurses_start_color().
the new display color for a character is set using ncurses_color_set();
E.g.
ncurses_start_color();
ncurses_init_pair(1,NCURSES_COLOR_RED,NCURSES_COLOR_BLACK);
ncurses_color_set(1); // turn the new color pair on.
// display what you want colored with this pair
ncurses_color_set(0); // return to the default color pair.
The default color pair (0) cannot be redefined.
ncurses_init_pair
(PHP 4 >= 4.0.7, PHP 5, PECL ncurses:1.0.0)
ncurses_init_pair — 色の組を確保する
説明
int ncurses_init_pair
( int $pair
, int $fg
, int $bg
)
警告
この関数は、 実験的 なものです。この関数の動作・ 名前・その他ドキュメントに書かれている事項は、予告なく、将来的な PHP のリリースにおいて変更される可能性があります。 この関数は自己責任で使用してください。
警告
この関数は、 現在のところ詳細な情報はありません。引数のリストのみが 記述されています。
パラメータ
- pair
-
- fg
-
- bg
-
ncurses_init_pair
keith dot nunn at xe dot com
10-Mar-2006 11:34
10-Mar-2006 11:34
