Commit Graph

26 Commits

Author SHA1 Message Date
Elias Naur 29993af408 apps/gophers: add per-frame mallocs to profiling status line
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-05-31 14:41:05 +02:00
Elias Naur bb0f80902f apps/gophers: update event method names
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-05-30 21:57:43 +02:00
Elias Naur 67bfa38e02 apps/gophers: switch to explicit layout methods
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-05-30 21:52:19 +02:00
Elias Naur c3ea85801c ui/app: (wasm) replace TypedArrayOf with the CopyBytes* API
syscall/js.TypedArrayOf is going away in Go 1.13 and is replaced by
the CopyBytesToGo, CopyBytesToJS.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-05-24 12:30:34 +02:00
Elias Naur 51d1c32c07 apps/gopers: update to new Config convenience methods
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-05-16 19:34:06 +02:00
Elias Naur acf345a0f8 apps/gophers: use shorter layout method names
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-05-16 15:43:41 +02:00
Elias Naur 3e5e9b2df2 apps/gophers: convert to new explicit layout API
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-05-16 12:58:02 +02:00
Elias Naur 84f80711dc apps/gophers: correct inverted logic
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-05-12 17:43:23 +02:00
Elias Naur 1d91555ace apps/gophers: add context cancellation on StagePaused
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-05-12 15:11:44 +02:00
Elias Naur 4441a3e13e Revert "ui/app,apps: unexport ChangeStage and Stage"
I found a convincing use case: stopping asynchronous activities
while paused. A follow up change will rename the stages and add
an example.

This reverts commit f9840b0963.
2019-05-12 14:47:38 +02:00
Elias Naur f9840b0963 ui/app,apps: unexport ChangeStage and Stage
I'm not convinced the API is right. For exmaple, an event that
notifies a program when to save its state is both smaller and
might be sufficient.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-05-11 13:50:18 +02:00
Elias Naur 801ce944f2 apps/gophers/web: add driver files for WebAssembly builds
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-05-11 13:17:57 +02:00
Elias Naur 252e058766 all: serialize ops
Pros:
- Much less per-frame garbage
- Allow future preprocessing of ops while building it
- Much fewer interface calls and pointer chasing
- Allow future serialization of ops for remote rendering

Cons:
- Slightly clumsier API

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-04-27 22:19:34 +02:00
Elias Naur a8bb3c2f14 all: make pointer.Area an interface
With an interface instead of anonymous functions, amending an
area's parameters can be done even after adding it to an OpHandler.

This will be useful when we switch to serialized op lists.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-04-25 10:02:14 +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 962736cbbf apps/gophers: go back on CommandBack
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-04-02 21:06:30 +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 c26e3b1191 apps/gophers,apps/hello: add references to gioui.org
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-03-31 14:54:58 +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 b65820c9b0 gophers: change title
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-03-31 12:46:08 +02:00
Elias Naur 6d1715d239 apps/gophers: don't crash if fetching commits fail 2019-03-31 12:18:07 +02:00
Elias Naur 7c8fdf69f5 README.md: add iOS/tvOS setup instructions
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-03-31 12:12:01 +02:00
Elias Naur 9a9b69eea4 apps/gophers/ios/gophers.xcodeproject: clean up
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-03-31 11:34:46 +02:00
Elias Naur 0f05231c35 all: initial import
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-03-31 10:47:22 +02:00