mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-06 09:55:40 +00:00
ui/app: fix example code in document
Signed-off-by: Kenshi Kamata <kenshi.kamata@gmail.com>
This commit is contained in:
committed by
Elias Naur
parent
41ea609d8e
commit
ea2ee1abcc
+2
-2
@@ -18,7 +18,7 @@ For example:
|
|||||||
|
|
||||||
import "gioui.org/ui"
|
import "gioui.org/ui"
|
||||||
|
|
||||||
w := app.NewWindow(nil)
|
w := app.NewWindow()
|
||||||
for e := range w.Events() {
|
for e := range w.Events() {
|
||||||
if e, ok := e.(app.UpdateEvent); ok {
|
if e, ok := e.(app.UpdateEvent); ok {
|
||||||
ops.Reset()
|
ops.Reset()
|
||||||
@@ -47,7 +47,7 @@ For example, to display a blank but otherwise functional window:
|
|||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
go func() {
|
go func() {
|
||||||
w := app.NewWindow(nil)
|
w := app.NewWindow()
|
||||||
for range w.Events() {
|
for range w.Events() {
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
|||||||
Reference in New Issue
Block a user