app,os: update documentation to match changed API

Updates gio#61

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2019-11-09 18:25:28 +01:00
parent 8620b43eb3
commit 0dac972b25
2 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -27,7 +27,7 @@ For example:
// Add operations to ops.
...
// Completely replace the window contents and state.
w.Update(ops)
e.Frame(ops)
}
}
+2 -1
View File
@@ -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