core/terminal
terminal
Types
1Color_Depth
Color_Depth :: enum int {
None = 0, // No color support
Three_Bit = 1, // 8 colors
Four_Bit = 2, // 16 colors
Eight_Bit = 3, // 256 colors
True_Color = 4, // 24-bit true color
}SourceThis describes the range of colors that a terminal is capable of supporting.
Variables
2color_depth
color_depth :: Color_DepthSourceThis value reports the color depth support as reported by the terminal at the start of the program.
color_enabled
color_enabled :: boolSourceThis is true if the terminal is accepting any form of colored text output.
Procedures
8_fini_terminal
_fini_terminal :: proc()Source_init_terminal
_init_terminal :: proc()Source_is_terminal
_is_terminal :: proc(f: ^os.File) -> (bool)Sourcefini_terminal
fini_terminal :: proc()Sourceget_environment_color
get_environment_color :: proc() -> (Color_Depth)Sourceget_no_color
get_no_color :: proc() -> (bool)SourceReference documentation:
init_terminal
init_terminal :: proc()Sourceis_terminal
is_terminal :: proc(f: T) -> (bool)SourceReturns true if the File is attached to a terminal.
This is normally true for os.stdout and os.stderr unless they are redirected to a file.