diff options
author | Drew DeVault <sir@cmpwn.com> | 2018-01-10 22:41:15 -0500 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2018-01-10 22:41:15 -0500 |
commit | 77a0f68758905faa74407499ff92c90929e27989 (patch) | |
tree | 44edc8d2de572deff60330f609aecab56aa4dea7 /ui/types.go | |
parent | db1b2cd53f5dc7bfbfb6ee54ad0bb0882ea2cc03 (diff) | |
download | aerc-77a0f68758905faa74407499ff92c90929e27989.tar.gz |
Make termbox event loop async
Diffstat (limited to 'ui/types.go')
-rw-r--r-- | ui/types.go | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/ui/types.go b/ui/types.go index a7918b5b..588c3b35 100644 --- a/ui/types.go +++ b/ui/types.go @@ -1,5 +1,11 @@ package ui +import ( + tb "github.com/nsf/termbox-go" + + "git.sr.ht/~sircmpwn/aerc2/config" +) + const ( Valid = 0 InvalidateTabs = 1 << iota @@ -12,19 +18,21 @@ const ( ) type Geometry struct { - row int - col int - width int - height int + Row int + Col int + Width int + Height int } type AercTab interface { Name() string Invalid() bool Render(at Geometry) + SetParent(parent *UIState) } type UIState struct { + Config *config.AercConfig Exit bool InvalidPanes uint @@ -44,4 +52,6 @@ type UIState struct { Index int Scroll int } + + tbEvents chan tb.Event } |