summaryrefslogtreecommitdiff
path: root/toolkit/andlabs/main.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2023-04-06 19:48:24 -0500
committerJeff Carr <[email protected]>2023-04-06 19:48:24 -0500
commit8649f37a56bc31928d69077545f1e323a794c61a (patch)
treea3567c8f8a6b3caa8402a0640baa56630dcf972e /toolkit/andlabs/main.go
parent6fb44679a28b29b60018b037c6f328cf3e98f934 (diff)
andlabs: use callback channel for window close
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'toolkit/andlabs/main.go')
-rw-r--r--toolkit/andlabs/main.go7
1 files changed, 6 insertions, 1 deletions
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