From 0dac972b257e83960db6b095db7323873f7a5ba9 Mon Sep 17 00:00:00 2001 From: Elias Naur Date: Sat, 9 Nov 2019 18:25:28 +0100 Subject: [PATCH] app,os: update documentation to match changed API Updates gio#61 Signed-off-by: Elias Naur --- app/doc.go | 2 +- op/op.go | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/doc.go b/app/doc.go index 836a6f71..fc034b86 100644 --- a/app/doc.go +++ b/app/doc.go @@ -27,7 +27,7 @@ For example: // Add operations to ops. ... // Completely replace the window contents and state. - w.Update(ops) + e.Frame(ops) } } diff --git a/op/op.go b/op/op.go index 901aa4f1..9cc67e39 100644 --- a/op/op.go +++ b/op/op.go @@ -20,12 +20,13 @@ Drawing a colored square: import "gioui.org/op/paint" var w app.Window + var e system.FrameEvent ops := new(op.Ops) ... ops.Reset() paint.ColorOp{Color: ...}.Add(ops) paint.PaintOp{Rect: ...}.Add(ops) - w.Update(ops) + e.Frame(ops) State