app: add note about the safe use of Window.Queue.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2020-04-29 10:22:02 +02:00
parent 133fa45258
commit 0e70fbc126
+6 -2
View File
@@ -107,8 +107,12 @@ func (w *Window) Events() <-chan event.Event {
return w.out
}
// Queue returns the Window's event queue. The queue contains
// the events received since the last frame.
// Queue returns the Window's event queue. The queue contains the events
// received since the last frame.
//
// Note: the Queue may only be used after receiving a FrameEvent and before the
// next event is received, or the FrameEvent.Frame method is called, whichever
// comes first.
func (w *Window) Queue() *Queue {
return &w.queue
}