summary refs log tree commit diff stats
path: root/lib/ui
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2019-03-17 14:02:33 -0400
committerDrew DeVault <sir@cmpwn.com>2019-03-17 14:02:33 -0400
commit1170893e395ff5e3e7bee7ff51224b4a572f01cf (patch)
treef15e996bb529293c772159dbcf7a8b3fcd1a312f /lib/ui
parent13ba53c9d03c375877395a6580d6f694bd19020f (diff)
downloadaerc-1170893e395ff5e3e7bee7ff51224b4a572f01cf.tar.gz
Add basic terminal widget
Diffstat (limited to 'lib/ui')
-rw-r--r--lib/ui/interfaces.go2
-rw-r--r--lib/ui/ui.go1
2 files changed, 3 insertions, 0 deletions
diff --git a/lib/ui/interfaces.go b/lib/ui/interfaces.go
index c38fcff..d27afe2 100644
--- a/lib/ui/interfaces.go
+++ b/lib/ui/interfaces.go
@@ -16,6 +16,8 @@ type Drawable interface {
 type Interactive interface {
 	// Returns true if the event was handled by this component
 	Event(event tcell.Event) bool
+	// Indicates whether or not this control will receive input events
+	Focus(focus bool)
 }
 
 type Simulator interface {
diff --git a/lib/ui/ui.go b/lib/ui/ui.go
index eb86e70..ced039f 100644
--- a/lib/ui/ui.go
+++ b/lib/ui/ui.go
@@ -54,6 +54,7 @@ func Initialize(conf *config.AercConfig,
 			state.invalidations <- nil
 		})()
 	})
+	content.Focus(true)
 	return &state, nil
 }