APIdock / Ruby
/
method

init_pair

ruby latest stable - Class: Curses

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v1_9_3_392) is shown here.

init_pair(p1, p2, p3)
public

Changes the definition of a color-pair.

It takes three arguments: the number of the color-pair to be changed pair, the foreground color number f, and the background color number b.

If the color-pair was previously initialized, the screen is refreshed and all occurrences of that color-pair are changed to the new definition.

static VALUE
curses_init_pair(VALUE obj, VALUE pair, VALUE f, VALUE b)
{
 /* may have to raise exception on ERR */
 curses_stdscr();
 return (init_pair(NUM2INT(pair),NUM2INT(f),NUM2INT(b)) == OK) ? Qtrue : Qfalse;
}

AltStyle によって変換されたページ (->オリジナル) /