PHP
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

ncurses_init> <ncurses_init_color
Last updated: Fri, 05 Sep 2008

view this page in

ncurses_init_pair

(PHP 4 >= 4.0.7, PHP 5, PECL ncurses:1.0.0)

ncurses_init_pairAlloue une paire de couleur

Description

int ncurses_init_pair ( int $pair , int $fg , int $bg )
Avertissement

Cette fonction est EXPERIMENTALE. Cela signifie que le comportement de cette fonction, son nom et, concrètement, TOUT ce qui est documenté ici peut changer dans un futur proche, SANS PREAVIS ! Soyez-en conscient, et utilisez cette fonction à vos risques et périls.

Avertissement

Cette fonction n'est pas documentée et seule la liste des arguments est disponible.

Liste de paramètres

pair

fg

bg



add a note add a note User Contributed Notes
ncurses_init_pair
keith dot nunn at xe dot com
10-Mar-2006 03:34
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> <ncurses_init_color
Last updated: Fri, 05 Sep 2008
 
 
show source | credits | stats | sitemap | contact | advertising | mirror sites