Method: Curses.init_pair
- Defined in:
- ext/curses/curses.c
.init_pair(pair, f, b) ⇒ Object
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.
1319 1320 1321 1322 1323 1324 1325 |
# File 'ext/curses/curses.c', line 1319 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; } |