File tree Expand file tree Collapse file tree 1 file changed +36
-0
lines changed
tutorials/basic_frameless_window Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change
1
+ package main
2
+
3
+ import (
4
+ "time"
5
+
6
+ "github.com/miketheprogrammer/go-thrust/thrust"
7
+ "github.com/miketheprogrammer/go-thrust/tutorials/provisioner"
8
+ )
9
+
10
+ func main () {
11
+
12
+ thrust .InitLogger ()
13
+ // Set any Custom Provisioners before Start
14
+ thrust .SetProvisioner (tutorial .NewTutorialProvisioner ())
15
+ // thrust.Start() must always come before any bindings are created.
16
+ thrust .Start ()
17
+
18
+ thrustWindow := thrust .NewWindow (thrust.WindowOptions {
19
+ RootUrl : "http://breach.cc/" ,
20
+ HasFrame : true ,
21
+ })
22
+ thrustWindow .Show ()
23
+ thrustWindow .Focus ()
24
+
25
+ // Lets do a window timeout
26
+ go func () {
27
+ <- time .After (time .Second * 5 )
28
+ thrustWindow .Close ()
29
+ thrust .Exit ()
30
+ }()
31
+
32
+ // In lieu of something like an http server, we need to lock this thread
33
+ // in order to keep it open, and keep the process running.
34
+ // Dont worry we use runtime.Gosched :)
35
+ thrust .LockThread ()
36
+ }
You can’t perform that action at this time.
0 commit comments