PHP » GoLang |
login |
register |
about
|
GoLang ncurses_init_pair
request it (313)
GoLang replacement for PHP's ncurses_init_pair
[edit | history]
ncurses_init_pair(PHP 4 >= 4.0.7, PHP 5 < 5.3.0, PECL ncurses >= 1.0.0) ncurses_init_pair — Define a color pair Description
int ncurses_init_pair
( int
$pair
, int $fg
, int $bg
)Defines or redefines the given color pair to have the given foreground and background colors. If the color pair was previously initialized, the screen is refreshed and all occurrences of it are changed to reflect the new definition. Color capabilities must be initialized using ncurses_start_color() before calling this function. The first color pair (color pair 0) is assumed to be white on black by default, but can be changed using ncurses_assume_default_colors(). Parameters
Return ValuesReturns -1 if the function was successful, and 0 if ncurses or color support were not initialized. NotesNote that color changing capabilities are not required for defining color pairs of pre-existing colors, but only for changing definitions (red, green, and blue components) of colors themselves per ncurses_init_color(). Examples
Example #1 Writing a string with a specified color to the screen
<?php See Also
|
more
Recently updated
more
Most requested
more
Last requests
|