blob: a22e99d51a09f62ffe8411e6f9dd2901dd4b8442 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
package main
/*
This is reference code for toolkit developers
The 'nocui' is a bare minimum toolkit. It's all you need
to interact with the GUI
*/
import (
"runtime"
"fyne.io/fyne/v2/app"
"go.wit.com/log"
)
var PLUGIN string = "fyne"
func blah() {
fynetest()
a.Run()
}
func initPlugin() {
log.Log(INFO, "Init()")
me.myTree = initTree()
me.exit = false
showOptions()
go simpleStdin()
log.Log(INFO, "Init() FYNE END")
// blah()
me.myTree.InitOK()
}
func init() {
// fynetest()
// a.Run()
}
// this must be defined for plugin's, but is never run
// if you build this as a non-plugin, this will run
func main() {
fynetest()
a.Run()
}
// this is called at the very initial connection
// between the app and this gocui plugin
// this is a good place to initialize gocui's default behavior
func toolkitInit() {
log.Log(INFO, "TOOLKIT Init()")
me.exit = false
showOptions()
log.Log(INFO, "TOOLKIT Init() END")
fynetest()
go a.Run()
}
func testmain() {
runtime.LockOSThread() // Ensure main stays on one OS thread
a := app.New()
w := a.NewWindow("Fyne Plugin Fix")
w.ShowAndRun()
// use w.QueueUpdate() to talk to fyne (?)
}
|