MCPcopy Create free account
hub / github.com/cogentcore/core / init

Function init

core/init.go:14–27  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

12)
13
14func init() {
15 system.HandleRecover = handleRecover
16 system.InitScreenLogicalDPIFunc = AppearanceSettings.applyDPI // called when screens are initialized
17 TheApp.CogentCoreDataDir() // ensure it exists
18 theWindowGeometrySaver.needToReload() // gets time stamp associated with open, so it doesn't re-open
19 theWindowGeometrySaver.open()
20 styles.SettingsFont = (*string)(&AppearanceSettings.Font)
21 styles.SettingsMonoFont = (*string)(&AppearanceSettings.MonoFont)
22
23 if testing.Testing() {
24 // needed to prevent app from quitting prematurely
25 NewBody().RunWindow()
26 }
27}

Callers

nothing calls this directly

Calls 5

NewBodyFunction · 0.85
needToReloadMethod · 0.80
RunWindowMethod · 0.80
CogentCoreDataDirMethod · 0.65
openMethod · 0.45

Tested by

no test coverage detected