Commit Graph

14 Commits

Author SHA1 Message Date
Elias Naur b15ec53a03 ui/app: fix display link on iOS 10
For some reason, the CADisplayLink.paused property didn't work on
iOS 10 but does on iOS 12. Use addToRunLoop and removeFromRunLoop
instead.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-04-03 13:13:53 +02:00
Elias Naur 1096ac1938 apps/gophers: update commits page config every frame
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-04-02 21:46:41 +02:00
Elias Naur fc55c6ee5c ui/app: implement Command for system events
And add CommandBack for the Android back button.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-04-02 21:04:48 +02:00
Elias Naur ed2590e30e ui/app,apps/gophers,apps/hello: revert NewWindow to CreateWindow
It turns out we already support multiple windows on Android: when
the activity is recreated.

This reverts commit f21b5eb1df.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-04-02 19:54:37 +02:00
Elias Naur e7725a4fa1 apps,ui/app: delete ui/app.Window.Ack
Replace it with a dummy event send on the synchronous event channel;
a bit of cleverness for a simpler API.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-04-02 18:51:43 +02:00
Elias Naur abb9d291e9 ui/app: don't buffer the app event channel
We used to buffer input events to allow for batch processing
multiple events before redrawing. Now that redraws are scheduled to
run after the native event queue is empty, buffering is no longer
necessary.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-04-02 17:22:58 +02:00
Elias Naur 48b6a73753 all: run goimports
gioui.org/ui was renamed from gioui.org/ui/ui before the release,
but the import order wasn't changed accordingly.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-04-02 17:09:06 +02:00
Elias Naur 0c6f874379 ui/app: request unbuffered touch events on Android
Flutter and Chromium wants it, so I assume its good for us.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-04-01 17:35:12 +02:00
Egon Elbre f863260514 app: replace COREVIDEO_TRUE with kCVReturnSuccess
Signed-off-by: Egon Elbre <egonelbre@gmail.com>
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-04-01 12:03:32 +02:00
Elias Naur 8b2f6dbf13 ui: add doc.go
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-03-31 14:45:26 +02:00
Elias Naur 1d67fad0c3 ui/app,apps/gophers,apps/hello: accept nil WindowOptions in NewWindow
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-03-31 13:59:06 +02:00
Elias Naur f21b5eb1df ui/app,apps/gophers,apps/hello: replace CreateWindow with NewWindow
Gio doesn't support multiple windows anyway, so get rid of the
app.Windows channel and use NewWindow call for the mobile platforms
as well.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-03-31 13:52:14 +02:00
Elias Naur ca5204fcb8 ui: fix macOS build
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-03-31 11:00:26 +02:00
Elias Naur 0f05231c35 all: initial import
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-03-31 10:47:22 +02:00