21 lines
303 B
Go
21 lines
303 B
Go
|
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{}
|
||
|
}
|