forked from dennwc/inkview
-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.go
27 lines (23 loc) · 842 Bytes
/
app.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package ink
type App interface {
// Init is called when application is started.
Init() error
// Close is called before exiting an application.
Close() error
// Draw is called each time an application view should be updated.
// Can be queued by Repaint.
Draw()
//// Show is called when application becomes active.
//// Delivered on application start and when switching from another app.
//Show() bool
//// Hide is called when application becomes inactive (switching to another app).
//Hide() bool
// Key is called on each key-related event.
Key(e KeyEvent) bool
// Pointer is called on each pointer-related event.
Pointer(e PointerEvent) bool
// Touch is called on each touch-related event.
Touch(e TouchEvent) bool
// Orientation is called each time an orientation of device changes.
Orientation(o Orientation) bool
}