summaryrefslogtreecommitdiff
path: root/toolkit/nocui/main.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-01-01 15:43:50 -0600
committerJeff Carr <[email protected]>2024-01-01 15:43:50 -0600
commit4e7bbd89900a733593f0848778103c1cf1a7145d (patch)
tree22cd22124dd3ecba7c2a866b882d39aaf790d670 /toolkit/nocui/main.go
parent53ce3a8252090d5fb75d7fc1e3cd75a72c1415c6 (diff)
reorg to final resting place at go.wit.com/gui/guiv0.9.5
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'toolkit/nocui/main.go')
-rw-r--r--toolkit/nocui/main.go55
1 files changed, 0 insertions, 55 deletions
diff --git a/toolkit/nocui/main.go b/toolkit/nocui/main.go
deleted file mode 100644
index 22cf7da..0000000
--- a/toolkit/nocui/main.go
+++ /dev/null
@@ -1,55 +0,0 @@
-package main
-
-import (
- "sync"
- "go.wit.com/gui/toolkit"
-)
-
-var muAction sync.Mutex
-
-func catchActionChannel() {
- log(logNow, "catchActionChannel() START")
- for {
- log(logNow, "catchActionChannel() for loop")
- select {
- case a := <-pluginChan:
- log(logNow, "catchActionChannel() SELECT widget id =", a.WidgetId, a.Name)
- log(logNow, "catchActionChannel() STUFF", a.WidgetId, a.ActionType, a.WidgetType)
- muAction.Lock()
- doAction(&a)
- muAction.Unlock()
- log(logNow, "catchActionChannel() STUFF END", a.WidgetId, a.ActionType, a.WidgetType)
- }
- }
-}
-
-/*
-// Other goroutines must use this to access the GUI
-//
-// You can not acess / process the GUI thread directly from
-// other goroutines. This is due to the nature of how
-// Linux, MacOS and Windows work (they all work differently. suprise. surprise.)
-//
-// this sets the channel to send user events back from the plugin
-func Callback(guiCallback chan toolkit.Action) {
- callback = guiCallback
-}
-
-func PluginChannel() chan toolkit.Action {
- return pluginChan
-}
-*/
-
-// This is important. This sets the defaults for the gui. Without this, there isn't correct padding, etc
-func init() {
- log(logNow, "Init() START")
- log(logInfo, "Init()")
-
- // andlabs = make(map[int]*andlabsT)
- pluginChan = make(chan toolkit.Action, 1)
-
- log(logNow, "Init() start channel reciever")
- go catchActionChannel()
- go simpleStdin()
- log(logNow, "Init() END")
-}