Documentation ¶
Index ¶
- type TermTypeID
- type Terminal
- func (t *Terminal) BlinkOff() string
- func (t *Terminal) Bold() string
- func (t *Terminal) BoldOff() string
- func (t *Terminal) ClearTerminal() string
- func (t *Terminal) Conceal() string
- func (t *Terminal) CrossedOut() string
- func (t *Terminal) DisableProportionalSpacing() string
- func (t *Terminal) Encircled() string
- func (t *Terminal) Faint() string
- func (t *Terminal) Fraktur() string
- func (t *Terminal) Framed() string
- func (t *Terminal) GetType() TermTypeID
- func (t *Terminal) HideCursor() string
- func (t *Terminal) Init()
- func (t *Terminal) Italic() string
- func (t *Terminal) MoveCursor(x, y int) string
- func (t *Terminal) NeitherFrameNorEncircled() string
- func (t *Terminal) NeitherItalicOrBlackLetter() string
- func (t *Terminal) NormalIntensity() string
- func (t *Terminal) NotCrossedOut() string
- func (t *Terminal) NotOverlined() string
- func (t *Terminal) Overlined() string
- func (t *Terminal) PrimaryFont() string
- func (t *Terminal) ProportionalSpacingOff() string
- func (t *Terminal) RapidBlink() string
- func (t *Terminal) RepeatChar(n int) string
- func (t *Terminal) Reset() string
- func (t *Terminal) Reveal() string
- func (t *Terminal) Reverse() string
- func (t *Terminal) ReverseOff() string
- func (t *Terminal) SlowBlink() string
- func (t *Terminal) Underline() string
- func (t *Terminal) UnderlineOff() string
- type TerminalType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TermTypeID ¶
type TermTypeID int
const ( TermTypeUnknown TermTypeID = iota TermTypeXTerm256Color )
type Terminal ¶
type Terminal struct {
Type TermTypeID
}
func NewTerminal ¶
func NewTerminal(TypeID TermTypeID) *Terminal
func (*Terminal) Bold ¶
Bold or increased intensity int 1 As with faint, the color change is a PC (SCO / CGA) invention.
func (*Terminal) BoldOff ¶
BoldOff Doubly underlined; or: not bold int 21 Double-underline per ECMA-48 but instead disables bold intensity on several terminals, including in the Linux kernel's console before version 4.17.[33]
func (*Terminal) ClearTerminal ¶
ClearTerminal clears the terminal screen, this is platform independent So it is not implemented here.
func (*Terminal) CrossedOut ¶
CrossedOut or strike-through int 9 Characters legible, but marked for deletion.
func (*Terminal) DisableProportionalSpacing ¶
DisableProportionalSpacing int 50 Turn off proportional spacing (T.61 and T.416)
func (*Terminal) Encircled ¶
Encircled int 52 Implemented as "emoji variation selector" in mintty.[34]
func (*Terminal) Faint ¶
Faint or decreased intensity or dim int 2 May be implemented as a light font weight like bold.
func (*Terminal) GetType ¶
func (t *Terminal) GetType() TermTypeID
GetType returns the terminal type as a TermTypeID
func (*Terminal) HideCursor ¶
HideCursor should hide the cursor on the screen, this is platform independent So it is not implemented here.
func (*Terminal) Init ¶
func (t *Terminal) Init()
Init runs any terminal initialization code needed Generally, this is just a no-op
func (*Terminal) Italic ¶
Italic or slanted int 3 Not widely supported. Sometimes treated as inverse or blink
func (*Terminal) MoveCursor ¶
MoveCursor moves the cursor to the given position, this is platform independent So it is not implemented here.
func (*Terminal) NeitherFrameNorEncircled ¶
NeitherFrameNorEncircled Neither framed nor encircled int 54
func (*Terminal) NeitherItalicOrBlackLetter ¶
NeitherItalicOrBlackLetter off int 23 Neither italic, nor blackletter
func (*Terminal) NormalIntensity ¶
NormalIntensity int 22 Neither bold nor faint; color changes where intensity is implemented as such.
func (*Terminal) NotCrossedOut ¶
NotCrossedOut Not crossed out int 29 Turn strike-through mode off
func (*Terminal) NotOverlined ¶
NotOverlined Not overlined int 55
func (*Terminal) PrimaryFont ¶
PrimaryFont or default font int 10 Select default font
func (*Terminal) ProportionalSpacingOff ¶
ProportionalSpacingOff Proportional spacing off int 26 ITU T.61 and T.416, not known to be used on terminals
func (*Terminal) RapidBlink ¶
RapidBlink int 6 MS-DOS ANSI.SYS, 150+ per minute; not widely supported
func (*Terminal) RepeatChar ¶
RepeatChar repeats the given character n times, this is platform independent So it is not implemented here.
func (*Terminal) Reverse ¶
Reverse video or swap foreground and background (invert) int 7 Swap foreground and background colors; inconsistent emulation
func (*Terminal) ReverseOff ¶
ReverseOff Normal video int 27 Turn reverse video off
func (*Terminal) Underline ¶
Underline int 4 Style extensions exist for Kitty, VTE, mintty and iTerm2.
func (*Terminal) UnderlineOff ¶
UnderlineOff Not underlined int 24 Neither singly nor doubly underlined
type TerminalType ¶
type TerminalType interface { Init() GetType() TermTypeID // Reset or normal // int 0 // All attributes off Reset() string // Bold or increased intensity // int 1 // As with faint, the color change is a PC (SCO / CGA) invention. Bold() string // Faint or decreased intensity or dim // int 2 // May be implemented as a light font weight like bold. Faint() string // Italic or slanted // int 3 // Not widely supported. Sometimes treated as inverse or blink Italic() string // Underline // int 4 // Style extensions exist for Kitty, VTE, mintty and iTerm2. Underline() string // SlowBlink // int 5 // Sets blinking to less than 150 times per minute SlowBlink() string // RapidBlink // int 6 // MS-DOS ANSI.SYS, 150+ per minute; not widely supported RapidBlink() string // Reverse video or swap foreground and background (invert) // int 7 // Swap foreground and background colors; inconsistent emulation Reverse() string // Conceal or hide // int 8 // Not widely supported. Conceal() string // CrossedOut or strike-through // int 9 // Characters legible, but marked for deletion. CrossedOut() string // PrimaryFont or default font // int 10 // Select default font PrimaryFont() string // Fraktur select fraktur font // int 20 // Rarely supported Fraktur() string // BoldOff Doubly underlined; or: not bold // int 21 // Double-underline per ECMA-48 but instead disables bold // intensity on several terminals, including in the Linux kernel's console before version 4.17.[33] BoldOff() string // NormalIntensity // int 22 // Neither bold nor faint; color changes where intensity is implemented as such. NormalIntensity() string // NeitherItalicOrBlackLetter off // int 23 // Neither italic, nor blackletter NeitherItalicOrBlackLetter() string // UnderlineOff Not underlined // int 24 // Neither singly nor doubly underlined UnderlineOff() string // BlinkOff not blinking // int 25 // Turn blinking off BlinkOff() string // ProportionalSpacingOff Proportional spacing off // int 26 // ITU T.61 and T.416, not known to be used on terminals ProportionalSpacingOff() string // ReverseOff Normal video // int 27 // Turn reverse video off ReverseOff() string // Reveal Not concealed // int 28 // Turn concealed mode off Reveal() string // NotCrossedOut Not crossed out // int 29 // Turn strike-through mode off NotCrossedOut() string // DisableProportionalSpacing // int 50 // Turn off proportional spacing (T.61 and T.416) DisableProportionalSpacing() string // Framed // int 51 // Implemented as "emoji variation selector" in mintty.[34] Framed() string // Encircled // int 52 // Implemented as "emoji variation selector" in mintty.[34] Encircled() string // Overlined // int 53 Overlined() string // NeitherFrameNorEncircled Neither framed nor encircled // int 54 NeitherFrameNorEncircled() string // NotOverlined Not overlined // int 55 NotOverlined() string // HideCursor hides the cursor HideCursor() string MoveCursor(int, int) string RepeatChar(int) string ClearTerminal() string }