stone/event.go
2022-11-15 00:22:01 -05:00

28 lines
822 B
Go

package stone
// Event can be any event.
type Event interface { }
// EventQuit is sent when the backend shuts down due to a window close, error,
// or something else.
type EventQuit struct { }
// EventPress is sent when a button is pressed, or a key repeat event is
// triggered.
type EventPress struct { Button }
// Release is sent when a button is released.
type EventRelease struct { Button }
// Resize is sent when the application window is resized by the user. This event
// must be handled, as it implies that the buffer has been resized and therefore
// cleared. Application.Draw() must be called after this event is recieved.
type EventResize struct { }
// EventMouseMove is sent when the mouse changes position. It contains the X and
// Y position of the mouse.
type EventMouseMove struct {
X int
Y int
}