2022-11-08 23:18:56 -07:00
|
|
|
package stone
|
2022-11-08 23:12:47 -07:00
|
|
|
|
2022-11-14 22:22:01 -07:00
|
|
|
// Event can be any event.
|
2022-11-08 23:12:47 -07:00
|
|
|
type Event interface { }
|
|
|
|
|
2022-11-14 22:22:01 -07:00
|
|
|
// 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.
|
2022-11-08 23:12:47 -07:00
|
|
|
type EventMouseMove struct {
|
|
|
|
X int
|
|
|
|
Y int
|
|
|
|
}
|