This commit is contained in:
28
ui/mock.go
28
ui/mock.go
@@ -3,7 +3,7 @@ package ui
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/gdamore/tcell"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
)
|
||||
|
||||
type coord struct {
|
||||
@@ -38,8 +38,18 @@ func (m *MockScreen) SetContent(x int, y int, mainc rune, combc []rune, style tc
|
||||
m.content[coord{x, y}] = mainc
|
||||
}
|
||||
|
||||
func (m *MockScreen) Suspend() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *MockScreen) Resume() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *MockScreen) SetStyle(style tcell.Style) {}
|
||||
|
||||
func (m *MockScreen) SetCursorStyle(style tcell.CursorStyle) {}
|
||||
|
||||
func (m *MockScreen) ShowCursor(x int, y int) {}
|
||||
|
||||
func (m *MockScreen) HideCursor() {}
|
||||
@@ -52,16 +62,26 @@ func (m *MockScreen) PollEvent() tcell.Event {
|
||||
return tcell.NewEventError(fmt.Errorf("mock error"))
|
||||
}
|
||||
|
||||
func (m *MockScreen) ChannelEvents(ch chan<- tcell.Event, quit <-chan struct{}) {}
|
||||
|
||||
func (m *MockScreen) HasPendingEvent() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func (m *MockScreen) PostEvent(ev tcell.Event) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *MockScreen) PostEventWait(ev tcell.Event) {}
|
||||
|
||||
func (m *MockScreen) EnableMouse() {}
|
||||
func (m *MockScreen) EnableMouse(...tcell.MouseFlags) {}
|
||||
|
||||
func (m *MockScreen) DisableMouse() {}
|
||||
|
||||
func (m *MockScreen) EnablePaste() {}
|
||||
|
||||
func (m *MockScreen) DisablePaste() {}
|
||||
|
||||
func (m *MockScreen) HasMouse() bool {
|
||||
return false
|
||||
}
|
||||
@@ -90,6 +110,10 @@ func (m *MockScreen) Resize(x, y, h, w int) {
|
||||
m.x, m.y, m.h, m.w = x, y, h, w
|
||||
}
|
||||
|
||||
func (m *MockScreen) SetSize(h, w int) {
|
||||
m.h, m.w = h, w
|
||||
}
|
||||
|
||||
func (m *MockScreen) HasKey(tcell.Key) bool {
|
||||
return true
|
||||
}
|
||||
|
Reference in New Issue
Block a user