From 77a0f68758905faa74407499ff92c90929e27989 Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Wed, 10 Jan 2018 22:41:15 -0500 Subject: Make termbox event loop async --- ui/types.go | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'ui/types.go') diff --git a/ui/types.go b/ui/types.go index a7918b5..588c3b3 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 } -- cgit v1.2.3