diff options
| author | Jeff Carr <[email protected]> | 2022-10-20 06:55:42 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2022-10-20 06:55:42 -0500 |
| commit | b8ef0bb05dc14bc4291f3d156b199fa125cdb9d7 (patch) | |
| tree | 71280d7f01805dfbd430f71df16858079686b8fc /toolkit/andlabs/main.go | |
| parent | f3af1f5b7ff78b3f73d7510622fc9633dec36d35 (diff) | |
Squashed commit of the following:
all non binary tree structs are gone (almost all)
Use names from https://en.wikipedia.org/wiki/Graphical_widget
toolkit andlabs/ui is isolated from being accessable
all direct references to andlabs are removed
working dropdown widgets
add debugging more buttons and windows
Diffstat (limited to 'toolkit/andlabs/main.go')
| -rw-r--r-- | toolkit/andlabs/main.go | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/toolkit/andlabs/main.go b/toolkit/andlabs/main.go new file mode 100644 index 0000000..cea0486 --- /dev/null +++ b/toolkit/andlabs/main.go @@ -0,0 +1,26 @@ +package toolkit + +import ( + "log" + + "github.com/andlabs/ui" + _ "github.com/andlabs/ui/winmanifest" +) + +func Main(f func()) { + log.Println("Starting gui.Main() (using gtk via andlabs/ui)") + ui.Main(f) +} + +// 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.) +// +// For example: Queue(NewWindow()) +// +func Queue(f func()) { + log.Println("Sending function to gui.Main() (using gtk via andlabs/ui)") + ui.QueueMain(f) +} |
