summaryrefslogtreecommitdiff
path: root/plugin.go
diff options
context:
space:
mode:
Diffstat (limited to 'plugin.go')
-rw-r--r--plugin.go42
1 files changed, 0 insertions, 42 deletions
diff --git a/plugin.go b/plugin.go
index 6623fd4..ff4d512 100644
--- a/plugin.go
+++ b/plugin.go
@@ -214,48 +214,6 @@ func initToolkit(name string, filename string) *aplug {
return newPlug
}
-// 2024/01/11 finally moving to type any. simplify to just 'value'
-// 2023/05/09 pretty clean
-// 2023/04/06 Queue() is also being used and channels are being used.
-func newAction(n *Node, atype widget.ActionType) *widget.Action {
- var a widget.Action
- a.ActionType = atype
- if (n == nil) {
- return &a
- }
- a.WidgetId = n.id
- a.ProgName = n.progname
- a.Value = n.value
-
- a.X = n.X
- a.Y = n.Y
-
- a.AtW = n.AtW
- a.AtH = n.AtH
-
- if (n.parent != nil) {
- a.ParentId = n.parent.id
- }
- a.WidgetType = n.WidgetType
- return &a
-}
-
-// sends the action/event to each toolkit via a golang plugin channel
-func sendAction(a *widget.Action) {
- for _, aplug := range allPlugins {
- log.Log(PLUG, "Action() aplug =", aplug.name, "Action type=", a.ActionType)
- if (aplug.pluginChan == nil) {
- log.Info("Action() retrieving the aplug.PluginChannel()", aplug.name)
- aplug.pluginChan = aplug.PluginChannel()
- log.Info("Action() retrieved", aplug.pluginChan)
- }
- log.Info("Action() SEND to pluginChan", aplug.name)
- aplug.pluginChan <- *a
- // added during debugging. might be a good idea in general for a tactile experience
- log.Sleep(.02) // this delay makes it so SetText() works on initial widget creation
- }
-}
-
func (n *Node) InitEmbed(resFS embed.FS) *Node {
me.resFS = resFS
return n