MCPcopy Create free account
hub / github.com/SolarLune/masterplan / init

Function init

main.go:52–81  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

50var cpuProfileStart = time.Time{}
51
52func init() {
53
54 runtime.LockOSThread()
55
56 globals.Version = semver.MustParse("0.9.3")
57 globals.Keyboard = NewKeyboard()
58 globals.Mouse = NewMouse()
59 nm := NewMouse()
60 nm.screenPosition.X = -99999999999
61 nm.screenPosition.Y = -99999999999
62 nm.prevPosition.X = -99999999999
63 nm.prevPosition.Y = -99999999999
64 globals.Mouse.Dummy = &nm
65 globals.Resources = NewResourceBank()
66 globals.GridSize = 32
67 globals.InputText = []rune{}
68 globals.CopyBuffer = NewCopyBuffer()
69 globals.State = StateNeutral
70 globals.GrabClient = grab.NewClient()
71 globals.MenuSystem = NewMenuSystem()
72 globals.Keybindings = NewKeybindings()
73 globals.RecentFiles = []string{}
74 globals.Settings = NewProgramSettings(true)
75 globals.HTTPClient = &http.Client{
76 Timeout: time.Second * 10,
77 }
78 globals.textEditingWrap = NewProperty("text editing wrap mode", nil)
79 globals.textEditingWrap.Set(TextWrappingModeWrap)
80
81}
82
83func main() {
84

Callers

nothing calls this directly

Calls 9

NewKeyboardFunction · 0.85
NewMouseFunction · 0.85
NewResourceBankFunction · 0.85
NewCopyBufferFunction · 0.85
NewMenuSystemFunction · 0.85
NewKeybindingsFunction · 0.85
NewProgramSettingsFunction · 0.85
NewPropertyFunction · 0.85
SetMethod · 0.45

Tested by

no test coverage detected