random-apps/windowState.go

21 lines
303 B
Go
Raw Normal View History

2025-02-03 07:22:01 +00:00
package main
import (
"gioui.org/io/event"
)
type WindowState interface {
Run(globalState *GlobalState, event event.Event) NewState
}
type NewState struct {
// If null, keep current state
NextState WindowState
Error error
ExitCode *int
}
func EmptyEvent() NewState {
return NewState{}
}