~eliasnaur/gio

67a9d9e9d7a0a15a7af9fbe38f00886bd0090e26 — Elias Naur 9 days ago 0bf6de6
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>
1 files changed, 10 insertions(+), 9 deletions(-)

M io/system/system.go
M io/system/system.go => io/system/system.go +10 -9
@@ 14,7 14,8 @@ import (
)

// 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 {
	Config Config
	// Size is the dimensions of the window.


@@ 33,14 34,14 @@ type FrameEvent struct {
	//
	// Example:
	//
	//	var w *app.Window
	//	var frame *op.Ops
	// 	for e := range w.Events() {
	//  	if e, ok := e.(system.FrameEvent); ok {
	//			// Call frame.Reset and manipulate images for ImageOps
	//			// here.
	//			e.Frame(frame)
	//  	}
	//  var w *app.Window
	//  var frame *op.Ops
	//  for e := range w.Events() {
	//      if e, ok := e.(system.FrameEvent); ok {
	//          // Call frame.Reset and manipulate images for ImageOps
	//          // here.
	//          e.Frame(frame)
	//      }
	//  }
	Frame func(frame *op.Ops)
	// Queue supplies the events for event handlers.