Example #1
0
func main(f func(screen.Screen)) error {
	return win32.Main(func() { f(theScreen) })
}
Example #2
0
func main(f func(screen.Screen)) error {
	if err := win32.Main(func() { f(theScreen) }); err != nil {
		f(errscreen.Stub(err))
	}
	return nil
}
Example #3
0
// Main is called by the program's main function to run the graphical
// application.
//
// It calls f on the Screen, possibly in a separate goroutine, as some OS-
// specific libraries require being on 'the main thread'. It returns when f
// returns.
func Main(f func(screen.Screen)) {
	if err := win32.Main(func() { f(theScreen) }); err != nil {
		f(errscreen.Stub(err))
	}
}