From 1418e1b9dc41d8f69bccb8de0fe0f1fb6835ce11 Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Mon, 26 Feb 2018 22:54:39 -0500 Subject: Split UI library and widgets --- lib/ui/interactive.go | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 lib/ui/interactive.go (limited to 'lib/ui/interactive.go') diff --git a/lib/ui/interactive.go b/lib/ui/interactive.go new file mode 100644 index 0000000..8bdf592 --- /dev/null +++ b/lib/ui/interactive.go @@ -0,0 +1,15 @@ +package ui + +import ( + tb "github.com/nsf/termbox-go" +) + +type Interactive interface { + // Returns true if the event was handled by this component + Event(event tb.Event) bool +} + +type Simulator interface { + // Queues up the given input events for simulation + Simulate(events []tb.Event) +} -- cgit v1.2.3