diff options
| author | Jeff Carr <[email protected]> | 2022-10-11 11:59:42 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2022-10-11 11:59:42 -0500 |
| commit | 3c899365154e48aefbc0b5ee48cd089f49339cb2 (patch) | |
| tree | 13f3c0aa281d17c55306ed2e0323aa5188087e04 /main.go | |
| parent | 2294e22484be61a934ca8b523f4aeb40d20d6196 (diff) | |
| parent | 770fa06a18652b30db0cd4ee64e8e89d06d7de2e (diff) | |
Merge branch 'master' into develv0.3.1
Diffstat (limited to 'main.go')
| -rw-r--r-- | main.go | 34 |
1 files changed, 34 insertions, 0 deletions
@@ -0,0 +1,34 @@ +package gui + +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: gui.Queue(addNewTabForColorSelection()) +func Queue(f func()) { + log.Println("Sending function to gui.Main() (using gtk via andlabs/ui)") + ui.QueueMain(f) +} + +/* +func ExampleWindow() { + log.Println("START gui.ExampleWindow()") + + Config.Title = "ExampleWindow" + node := NewWindow() + node.AddDebugTab("jcarr Debug") +} +*/ |
