More actions and window organization

This commit is contained in:
Zachary Yedidia
2018-08-28 18:44:52 -04:00
parent ec53d5deeb
commit de6ee879f4
11 changed files with 539 additions and 177 deletions

View File

@@ -31,8 +31,13 @@ type MouseEvent struct {
mod tcell.ModMask
}
type KeyAction func(Handler) bool
type MouseAction func(Handler, tcell.EventMouse) bool
// A Handler will take a tcell event and execute it
// appropriately
type Handler interface {
// DoKeyEvent(KeyEvent) bool
// DoMouseEvent(MouseEvent, *tcell.EventMouse) (MouseAction, bool)
HandleEvent(tcell.Event)
}