mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-07 02:15:34 +00:00
io/system: improve FrameEvent documentation
Phrase stolen from Egon's architecture document. Replace tabs with spaces in the example while here. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
+10
-9
@@ -14,7 +14,8 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
// A FrameEvent requests a new frame in the form of a list of
|
// A FrameEvent requests a new frame in the form of a list of
|
||||||
// operations.
|
// operations that describes what to display and how to handle
|
||||||
|
// input.
|
||||||
type FrameEvent struct {
|
type FrameEvent struct {
|
||||||
Config Config
|
Config Config
|
||||||
// Size is the dimensions of the window.
|
// Size is the dimensions of the window.
|
||||||
@@ -33,14 +34,14 @@ type FrameEvent struct {
|
|||||||
//
|
//
|
||||||
// Example:
|
// Example:
|
||||||
//
|
//
|
||||||
// var w *app.Window
|
// var w *app.Window
|
||||||
// var frame *op.Ops
|
// var frame *op.Ops
|
||||||
// for e := range w.Events() {
|
// for e := range w.Events() {
|
||||||
// if e, ok := e.(system.FrameEvent); ok {
|
// if e, ok := e.(system.FrameEvent); ok {
|
||||||
// // Call frame.Reset and manipulate images for ImageOps
|
// // Call frame.Reset and manipulate images for ImageOps
|
||||||
// // here.
|
// // here.
|
||||||
// e.Frame(frame)
|
// e.Frame(frame)
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
Frame func(frame *op.Ops)
|
Frame func(frame *op.Ops)
|
||||||
// Queue supplies the events for event handlers.
|
// Queue supplies the events for event handlers.
|
||||||
|
|||||||
Reference in New Issue
Block a user