summaryrefslogtreecommitdiff
path: root/debug.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2019-06-01 21:15:55 -0700
committerJeff Carr <[email protected]>2019-06-01 21:15:55 -0700
commitfd4af0e0dbdd4d8875e2d9dfb4cda84261cacaea (patch)
treedfccecaafc51ad1eba8650f4e9791ce0d0d3b912 /debug.go
parent273a9eccf74f4aaaeccffa0c7eaebd534581a9cb (diff)
spash screen works again
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'debug.go')
-rw-r--r--debug.go35
1 files changed, 35 insertions, 0 deletions
diff --git a/debug.go b/debug.go
index 7ea50b8..dfaca26 100644
--- a/debug.go
+++ b/debug.go
@@ -6,6 +6,7 @@ import "fmt"
import "strings"
import "os/exec"
import "runtime"
+import "reflect"
import "github.com/andlabs/ui"
import _ "github.com/andlabs/ui/winmanifest"
@@ -148,3 +149,37 @@ func runCommand(cmdArgs []string) {
log.Println("runCommand() OTHERWISE INFORM THE USER")
log.Println("runCommand() END")
}
+
+//
+// this watches the GUI primarily to process protobuf's
+// this is pointless or wrong but I use it for debugging
+//
+func WatchGUI() {
+ count := 0
+
+ for {
+ if (count > 20) {
+ log.Println("Sleep() in watchGUI() Data.State =", Data.State)
+ for i, window := range Data.Windows {
+ log.Println("watchGUI() Data.Windows i =", i, "Action =", window.Action)
+ for name, abox := range window.BoxMap {
+ log.Println("\twatchGUI() BOX name =", name)
+ if (name == "SplashArea3") {
+ log.Println("\t\twatchGUI() BOX abox =", reflect.TypeOf(abox))
+ win := abox.Window
+ log.Println("\t\twatchGUI() BOX win =", reflect.TypeOf(win))
+ area := win.Area
+ log.Println("\t\twatchGUI() BOX area =", reflect.TypeOf(area), area.UiArea)
+ // spew.Dump(area.UiArea)
+ // area.UiArea.Show()
+ // time.Sleep(2000 * time.Millisecond)
+ // os.Exit(0)
+ }
+ }
+ }
+ count = 0
+ }
+ count += 1
+ time.Sleep(200 * time.Millisecond)
+ }
+}