app: update documentation

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2023-11-28 14:14:10 -06:00
parent e59f91dfd0
commit eae39d8556
3 changed files with 17 additions and 24 deletions
+4 -10
View File
@@ -8,12 +8,12 @@ See https://gioui.org for instructions to set up and run Gio programs.
# Windows
Create a new Window by calling NewWindow. On mobile platforms or when Gio
Create a new [Window] by calling [NewWindow]. On mobile platforms or when Gio
is embedded in another project, NewWindow merely connects with a previously
created window.
A Window is run by calling NextEvent in a loop. The most important event is
FrameEvent that prompts an update of the window contents.
A Window is run by calling its NextEvent method in a loop. The most important event is
[FrameEvent] that prompts an update of the window contents.
For example:
@@ -30,7 +30,7 @@ For example:
}
A program must keep receiving events from the event channel until
DestroyEvent is received.
[DestroyEvent] is received.
# Main
@@ -55,12 +55,6 @@ For example, to display a blank but otherwise functional window:
app.Main()
}
# Event queue
A FrameEvent's Queue method returns an event.Queue implementation that distributes
incoming events to the event handlers declared in the last frame.
See the gioui.org/io/event package for more information about event handlers.
# Permissions
The packages under gioui.org/app/permission should be imported