terminals

package
v0.0.0-...-d6864b1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 13, 2022 License: GPL-3.0 Imports: 0 Imported by: 0

README

Term

Contains different terminal support implementations.

Additions/Feedback/Reports welcome!

Documentation

Index

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) BlinkOff

func (t *Terminal) BlinkOff() string

BlinkOff not blinking int 25 Turn blinking off

func (*Terminal) Bold

func (t *Terminal) Bold() string

Bold or increased intensity int 1 As with faint, the color change is a PC (SCO / CGA) invention.

func (*Terminal) BoldOff

func (t *Terminal) BoldOff() 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]

func (*Terminal) ClearTerminal

func (t *Terminal) ClearTerminal() string

ClearTerminal clears the terminal screen, this is platform independent So it is not implemented here.

func (*Terminal) Conceal

func (t *Terminal) Conceal() string

Conceal or hide int 8 Not widely supported.

func (*Terminal) CrossedOut

func (t *Terminal) CrossedOut() string

CrossedOut or strike-through int 9 Characters legible, but marked for deletion.

func (*Terminal) DisableProportionalSpacing

func (t *Terminal) DisableProportionalSpacing() string

DisableProportionalSpacing int 50 Turn off proportional spacing (T.61 and T.416)

func (*Terminal) Encircled

func (t *Terminal) Encircled() string

Encircled int 52 Implemented as "emoji variation selector" in mintty.[34]

func (*Terminal) Faint

func (t *Terminal) Faint() string

Faint or decreased intensity or dim int 2 May be implemented as a light font weight like bold.

func (*Terminal) Fraktur

func (t *Terminal) Fraktur() string

Fraktur select fraktur font int 20 Rarely supported

func (*Terminal) Framed

func (t *Terminal) Framed() string

Framed int 51 Implemented as "emoji variation selector" in mintty.[34]

func (*Terminal) GetType

func (t *Terminal) GetType() TermTypeID

GetType returns the terminal type as a TermTypeID

func (*Terminal) HideCursor

func (t *Terminal) HideCursor() string

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

func (t *Terminal) Italic() string

Italic or slanted int 3 Not widely supported. Sometimes treated as inverse or blink

func (*Terminal) MoveCursor

func (t *Terminal) MoveCursor(x, y int) string

MoveCursor moves the cursor to the given position, this is platform independent So it is not implemented here.

func (*Terminal) NeitherFrameNorEncircled

func (t *Terminal) NeitherFrameNorEncircled() string

NeitherFrameNorEncircled Neither framed nor encircled int 54

func (*Terminal) NeitherItalicOrBlackLetter

func (t *Terminal) NeitherItalicOrBlackLetter() string

NeitherItalicOrBlackLetter off int 23 Neither italic, nor blackletter

func (*Terminal) NormalIntensity

func (t *Terminal) NormalIntensity() string

NormalIntensity int 22 Neither bold nor faint; color changes where intensity is implemented as such.

func (*Terminal) NotCrossedOut

func (t *Terminal) NotCrossedOut() string

NotCrossedOut Not crossed out int 29 Turn strike-through mode off

func (*Terminal) NotOverlined

func (t *Terminal) NotOverlined() string

NotOverlined Not overlined int 55

func (*Terminal) Overlined

func (t *Terminal) Overlined() string

Overlined int 53

func (*Terminal) PrimaryFont

func (t *Terminal) PrimaryFont() string

PrimaryFont or default font int 10 Select default font

func (*Terminal) ProportionalSpacingOff

func (t *Terminal) ProportionalSpacingOff() string

ProportionalSpacingOff Proportional spacing off int 26 ITU T.61 and T.416, not known to be used on terminals

func (t *Terminal) RapidBlink() string

RapidBlink int 6 MS-DOS ANSI.SYS, 150+ per minute; not widely supported

func (*Terminal) RepeatChar

func (t *Terminal) RepeatChar(n int) string

RepeatChar repeats the given character n times, this is platform independent So it is not implemented here.

func (*Terminal) Reset

func (t *Terminal) Reset() string

Reset or normal int 0 All attributes off

func (*Terminal) Reveal

func (t *Terminal) Reveal() string

Reveal Not concealed int 28 Turn concealed mode off

func (*Terminal) Reverse

func (t *Terminal) Reverse() string

Reverse video or swap foreground and background (invert) int 7 Swap foreground and background colors; inconsistent emulation

func (*Terminal) ReverseOff

func (t *Terminal) ReverseOff() string

ReverseOff Normal video int 27 Turn reverse video off

func (t *Terminal) SlowBlink() string

SlowBlink int 5 Sets blinking to less than 150 times per minute

func (*Terminal) Underline

func (t *Terminal) Underline() string

Underline int 4 Style extensions exist for Kitty, VTE, mintty and iTerm2.

func (*Terminal) UnderlineOff

func (t *Terminal) UnderlineOff() string

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
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL