summaryrefslogtreecommitdiff
path: root/window.go
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-03-12 21:47:39 -0400
committerPietro Gagliardi <[email protected]>2014-03-12 21:47:39 -0400
commit26c6b97ce1198c879ebc499661e1ba65239ede7d (patch)
tree548c817b01add07d0c0fa49bf7c1b87deec131ff /window.go
parenteb48ed09c3621cd3ac94c1d9cdbe310cf0f44eaf (diff)
Removed ui.Event(); all event channels are initialized with their objects now.
Diffstat (limited to 'window.go')
-rw-r--r--window.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/window.go b/window.go
index 946138e..f09116d 100644
--- a/window.go
+++ b/window.go
@@ -8,8 +8,8 @@ import (
// Window represents an on-screen window.
type Window struct {
- // If this channel is non-nil, the event loop will receive on this when the user clicks the window's close button.
- // This channel can only be set before initially opening the window.
+ // Closing gets a message when the user clicks the window's close button.
+ // You cannot change it once the Window has been opened.
Closing chan struct{}
lock sync.Mutex
@@ -27,6 +27,7 @@ func NewWindow(title string, width int, height int) *Window {
initTitle: title,
initWidth: width,
initHeight: height,
+ Closing: newEvent(),
}
}