示例#1
0
// Turn off character attribute.
func (w *Window) AttrOff(attr Char) (err error) {
	if C.ncurses_wattroff(w.win, C.int(attr)) == C.ERR {
		err = errors.New(fmt.Sprintf("Failed to unset attribute: %s",
			attrList[C.int(attr)]))
	}
	return
}
示例#2
0
// ColorOff turns the specified color pair off
func (w *Window) ColorOff(pair int16) error {
	if C.ncurses_wattroff(w.win, C.int(ColorPair(pair))) == C.ERR {
		return errors.New("Failed to enable color pair")
	}
	return nil
}