diff options
| author | Sam Anthony <sam@samanthony.xyz> | 2024-08-21 19:25:17 -0400 |
|---|---|---|
| committer | Sam Anthony <sam@samanthony.xyz> | 2024-08-21 19:25:55 -0400 |
| commit | 96df27214d149cc60dc08baae9d32f767fd032be (patch) | |
| tree | bdea4f92ffab720625ecbc77cd0f9d434a5dd271 /env.go | |
| parent | 5e81e13d2bd9de0827d1575a582224ce3b54819f (diff) | |
| download | gui-96df27214d149cc60dc08baae9d32f767fd032be.zip | |
explicit and graceful Env shutdown with attach/kill
Diffstat (limited to 'env.go')
| -rw-r--r-- | env.go | 9 |
1 files changed, 3 insertions, 6 deletions
@@ -8,8 +8,6 @@ import ( // Env is the most important thing in this package. It is an interactive graphical // environment, such as a window. // -// It has two channels: Events() and Draw(). -// // The Events() channel produces events, like mouse and keyboard presses, while the // Draw() channel receives drawing functions. A drawing function draws onto the // supplied draw.Image, which is the drawing area of the Env and returns a rectangle @@ -23,11 +21,10 @@ import ( // The Draw() channel may be synchronous. // // Drawing functions sent to the Draw() channel are not guaranteed to be executed. -// -// Closing the Draw() channel results in closing the Env. The Env will subsequently -// close the Events() channel. On the other hand, when the Events() channel gets closed -// the user of the Env should subsequently close the Draw() channel. type Env interface { Events() <-chan Event Draw() chan<- func(draw.Image) image.Rectangle + Killable + + killer } |