From 63b9706441719b53b3504733c51c2387fce9019d Mon Sep 17 00:00:00 2001 From: Tim Culverhouse Date: Mon, 12 Feb 2024 06:26:15 -0600 Subject: aerc: change event interfaces to vaxis events Modify the function signature of Event and MouseEvent interfaces to accept vaxis events. Note that because a vaxis event is an empty interface, the implementations are not affected and the events are delivered as they were before Signed-off-by: Tim Culverhouse Acked-by: Robin Jarry --- app/selector.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'app/selector.go') diff --git a/app/selector.go b/app/selector.go index 7f4730d0..fe8c4d96 100644 --- a/app/selector.go +++ b/app/selector.go @@ -9,6 +9,7 @@ import ( "git.sr.ht/~rjarry/aerc/config" "git.sr.ht/~rjarry/aerc/lib/ui" + "git.sr.ht/~rockorager/vaxis" ) type Selector struct { @@ -143,7 +144,7 @@ func (sel *Selector) Focus(focus bool) { sel.Invalidate() } -func (sel *Selector) Event(event tcell.Event) bool { +func (sel *Selector) Event(event vaxis.Event) bool { if event, ok := event.(*tcell.EventKey); ok { switch event.Key() { case tcell.KeyCtrlH: @@ -239,7 +240,7 @@ func (gp *SelectorDialog) Invalidate() { ui.Invalidate() } -func (gp *SelectorDialog) Event(event tcell.Event) bool { +func (gp *SelectorDialog) Event(event vaxis.Event) bool { switch event := event.(type) { case *tcell.EventKey: switch event.Key() { -- cgit