From 8649f37a56bc31928d69077545f1e323a794c61a Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Thu, 6 Apr 2023 19:48:24 -0500 Subject: andlabs: use callback channel for window close Signed-off-by: Jeff Carr --- toolkit/andlabs/main.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'toolkit/andlabs/main.go') diff --git a/toolkit/andlabs/main.go b/toolkit/andlabs/main.go index 1ad7a60..9ca71ca 100644 --- a/toolkit/andlabs/main.go +++ b/toolkit/andlabs/main.go @@ -2,7 +2,7 @@ package main import ( "embed" - // "git.wit.org/wit/gui/toolkit" + "git.wit.org/wit/gui/toolkit" "github.com/andlabs/ui" // the _ means we only need this for the init() @@ -22,6 +22,11 @@ func Main(f func()) { }) } +// this sets the channel to send user events back from the plugin +func Callback(guiCallback chan toolkit.Action) { + callback = guiCallback +} + // Other goroutines must use this to access the GUI // // You can not acess / process the GUI thread directly from -- cgit v1.2.3