func Start_color() os.Error { if int(C.has_colors()) == 0 { return CursesError{"terminal does not support color"} } C.start_color() return nil }
/* ==================================================== Color Setup Functions ==================================================== */ func StartColor() error { if C.has_colors() == 0 { return ErrorTerminalColor } C.start_color() return nil }
func StartColor() error { if C.has_colors() == C.ERR { return CursesError{"terminal does not support color"} } C.start_color() return nil }
// Enables colors to be displayed. Will return an error if terminal is not // capable of displaying colors func StartColor() error { if C.has_colors() == C.bool(false) { return errors.New("Terminal does not support colors") } if C.start_color() == C.ERR { return errors.New("Failed to enable color mode") } return nil }
func HasColors() bool { return isOk(C.has_colors()) }
// HasColors returns true if terminal can display colors func HasColors() bool { return bool(C.has_colors()) }
/* Checks whether the current terminal supports colors, and returns true if it does. */ func HasColors() bool { if C.has_colors() > 0 { return true } return false }