Method: Curses::Window#attrset
- Defined in:
- ext/curses/curses.c
#attrset(attrs) ⇒ Object
Sets the current attributes of the given window to attrs.
The following video attributes, defined in <curses.h>, can be passed to the routines Curses::Window.attron, Curses::Window.attroff, and Curses::Window.attrset, or OR’d with the characters passed to addch.
A_NORMAL Normal display (no highlight)
A_STANDOUT Best highlighting mode of the terminal.
A_UNDERLINE Underlining
A_REVERSE Reverse video
A_BLINK Blinking
A_DIM Half bright
A_BOLD Extra bright or bold
A_PROTECT Protected mode
A_INVIS Invisible or blank mode
A_ALTCHARSET Alternate character set
A_CHARTEXT Bit-mask to extract a character
COLOR_PAIR(n) Color-pair number n
TODO: provide some examples here.
see also system manual curs_attr(3)
2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 |
# File 'ext/curses/curses.c', line 2860 static VALUE window_attrset(VALUE obj, VALUE attrs) { #ifdef HAVE_WATTRSET struct windata *winp; GetWINDOW(obj,winp); return INT2FIX(wattrset(winp->window,NUM2CHTYPE(attrs))); #else return Qtrue; #endif } |