-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.go
More file actions
33 lines (23 loc) · 665 Bytes
/
Copy pathmain.go
File metadata and controls
33 lines (23 loc) · 665 Bytes
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
package main
import (
"gioui.org/app"
"github.com/leojimenezg/scapmi/gui/pages"
)
var Scapmi pages.Scapmi
func main() {
// Create all variables and objects needed.
Scapmi = *pages.NewWindow()
// Initialize clipboard to know if is usable.
Scapmi.Manager.Watcher.Init()
// Configure window and GUI pages.
Scapmi.Init()
// Set the clipboard watcher in a different goroutine.
Scapmi.Manager.SetWatcher()
// Set the event listener in a different goroutine.
Scapmi.Manager.SetListener()
// Set the manager to detect any changes from watcher or listener.
go Scapmi.Manager.ListenForEvents()
// Initialize GUI loop.
go Scapmi.Draw()
app.Main()
}