app: [API] make ViewEvent an interface on all platforms

A uniform type allows convenient nil checks and for future window
backends on platforms other than Linux (which already had ViewEvent
as an interface).

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2023-12-15 16:52:38 -06:00
parent 5e5d164929
commit f3fc0d62b8
7 changed files with 34 additions and 29 deletions
+7
View File
@@ -56,6 +56,13 @@ type FrameEvent struct {
Source input.Source
}
// ViewEvent provides handles to the underlying window objects for the
// current display protocol.
type ViewEvent interface {
implementsViewEvent()
ImplementsEvent()
}
// Insets is the space taken up by
// system decoration such as translucent
// system bars and software keyboards.