mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-06 09:55:40 +00:00
app: update documentation
Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
+4
-10
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user