Updated backend interface to use new event interface
This commit is contained in:
parent
b60d7518e0
commit
60269d554c
13
backend.go
13
backend.go
@ -4,17 +4,8 @@ import "time"
|
|||||||
import "errors"
|
import "errors"
|
||||||
|
|
||||||
type Backend interface {
|
type Backend interface {
|
||||||
Run (callback func (application *Application)) ()
|
Run () (chan(Event))
|
||||||
Await (timeout time.Duration) (keepRunning bool)
|
SetTitle (title string)
|
||||||
Poll () (keepRunning bool)
|
|
||||||
SetTitle (title string)
|
|
||||||
JustPressed (button Button) (pressed bool)
|
|
||||||
JustReleased (button Button) (released bool)
|
|
||||||
Pressed (button Button) (pressed bool)
|
|
||||||
Repeated (button Button) (repeated bool)
|
|
||||||
Typed () (text string)
|
|
||||||
Resized () (resized bool)
|
|
||||||
MousePosition () (x, y int)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type BackendFactory func (application *Application) (backend Backend, err error)
|
type BackendFactory func (application *Application) (backend Backend, err error)
|
||||||
|
Loading…
Reference in New Issue
Block a user