MCPcopy
hub / github.com/mum4k/termdash / Terminal

Interface Terminal

terminal/terminalapi/terminalapi.go:27–56  ·  view source on GitHub ↗

Terminal abstracts an implementation of a 2-D terminal. A terminal consists of a number of cells.

Source from the content-addressed store, hash-verified

25// Terminal abstracts an implementation of a 2-D terminal.
26// A terminal consists of a number of cells.
27type Terminal interface {
28 // Size returns the terminal width and height in cells.
29 Size() image.Point
30
31 // Clear clears the content of the internal back buffer, resetting all
32 // cells to their default content and attributes. Sets the provided options
33 // on all the cell.
34 Clear(opts ...cell.Option) error
35 // Flush flushes the internal back buffer to the terminal.
36 Flush() error
37
38 // SetCursor sets the position of the cursor.
39 SetCursor(p image.Point)
40 // HideCursos hides the cursor.
41 HideCursor()
42
43 // SetCell sets the value of the specified cell to the provided rune.
44 // Use the options to specify which attributes to modify, if an attribute
45 // option isn't specified, the attribute retains its previous value.
46 SetCell(p image.Point, r rune, opts ...cell.Option) error
47
48 // Event waits for the next event and returns it.
49 // This call blocks until the next event or cancellation of the context.
50 // Returns nil when the context gets canceled.
51 Event(ctx context.Context) Event
52
53 // Close closes the underlying terminal implementation and should be called when
54 // the terminal isn't required anymore to return the screen to a sane state.
55 Close()
56}

Callers 41

TestRunFunction · 0.65
TestControllerFunction · 0.65
drawTreeFunction · 0.65
drawBorderFunction · 0.65
TestDrawWidgetFunction · 0.65
DrawMethod · 0.65
newSegmentDisplayFunction · 0.65
redrawMethod · 0.65
DrawMethod · 0.65
ClearMethod · 0.65
TestDrawFunction · 0.65

Implementers 4

Terminalterminal/termbox/termbox.go
Terminalterminal/tcell/tcell.go
Terminalprivate/faketerm/faketerm.go
mockTerminalwidgets/tab/tab_test.go

Calls

no outgoing calls

Tested by

no test coverage detected