You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
286 B
Go

package app
4 years ago
import (
"github.com/gdamore/tcell/v2"
)
type view interface {
handleEvent(tcell.Event) change
draw(canvas, *state)
}
type focusable interface {
setFocus(bool)
}
type change interface {
exec(*UI)
}
type changeFn func(*UI)
func (f changeFn) exec(ui *UI) { f(ui) }