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
+8 -9
View File
@@ -27,19 +27,18 @@ var extraArgs string
// On Android ID is the package property of AndroidManifest.xml,
// on iOS ID is the CFBundleIdentifier of the app Info.plist,
// on Wayland it is the toplevel app_id,
// on X11 it is the X11 XClassHint
// on X11 it is the X11 XClassHint.
//
// ID is set by the gogio tool or manually with the -X linker flag. For example,
// ID is set by the [gioui.org/cmd/gogio] tool or manually with the -X linker flag. For example,
//
// go build -ldflags="-X 'gioui.org/app.ID=org.gioui.example.Kitchen'" .
//
// Note that ID is treated as a constant, and that changing it at runtime
// is not supported. Default value of ID is filepath.Base(os.Args[0]).
// is not supported. The default value of ID is filepath.Base(os.Args[0]).
var ID = ""
// A FrameEvent requests a new frame in the form of a list of
// operations that describes what to display and how to handle
// input.
// operations that describes the window content.
type FrameEvent struct {
// Now is the current animation. Use Now instead of time.Now to
// synchronize animation and to avoid the time.Now call overhead.
@@ -53,7 +52,7 @@ type FrameEvent struct {
// Frame completes the FrameEvent by drawing the graphical operations
// from ops into the window.
Frame func(frame *op.Ops)
// Source is the interface between the interface state and widgets.
// Source is the interface between the window and widgets.
Source input.Source
}
@@ -65,13 +64,13 @@ type Insets struct {
Top, Bottom, Left, Right unit.Dp
}
// NewContext is a shorthand for
// NewContext is shorthand for
//
// layout.Context{
// Ops: ops,
// Now: e.Now,
// Queue: e.Queue,
// Config: e.Config,
// Source: e.Source,
// Metric: e.Metric,
// Constraints: layout.Exact(e.Size),
// }
//