MCPcopy
hub / github.com/peco/peco / Screen

Interface Screen

screen.go:22–34  ·  view source on GitHub ↗

Screen hides the terminal library from the consuming code so that it can be swapped out for testing

Source from the content-addressed store, hash-verified

20// Screen hides the terminal library from the consuming code so that
21// it can be swapped out for testing
22type Screen interface {
23 Init(*config.Config) error
24 Close() error
25 Flush() error
26 PollEvent(context.Context, *config.Config) chan Event
27 Print(PrintArgs) int
28 Resume(context.Context) error
29 SetCell(int, int, rune, config.Attribute, config.Attribute)
30 SetCursor(int, int)
31 Size() (int, int)
32 SendEvent(Event)
33 Suspend()
34}
35
36// TcellScreen implements the Screen interface using tcell/v2.
37type TcellScreen struct {

Callers 50

InitMethod · 0.95
InitMethod · 0.95
NewDummyScreenFunction · 0.65
newTestInlineScreenFunction · 0.65
TestIssue345Function · 0.65
SetupMethod · 0.65
startComponentsMethod · 0.65
newConfigFunction · 0.65
TestIssue212_SanityCheckFunction · 0.65
SetupMethod · 0.65
RunMethod · 0.65

Implementers 4

TcellScreenscreen.go
SimScreenpeco_test.go
InlineScreenscreen_inline.go
recordingScreenscreen_test.go

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…