summaryrefslogtreecommitdiff
path: root/redo/window_darwin.go
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-08-04 17:28:53 -0400
committerPietro Gagliardi <[email protected]>2014-08-04 17:28:53 -0400
commit6010665415aa8ac80effd5d4caea80ea5628166b (patch)
treee412b46f141605383dcdd360233c64198be4705e /redo/window_darwin.go
parent84297ad7e13d3f10e967358ad10e286e9e193584 (diff)
Converted Window on Mac OS X to use the new container system. Now I can merge container and sizing...
Diffstat (limited to 'redo/window_darwin.go')
-rw-r--r--redo/window_darwin.go17
1 files changed, 4 insertions, 13 deletions
diff --git a/redo/window_darwin.go b/redo/window_darwin.go
index 8393cf7..4fa847b 100644
--- a/redo/window_darwin.go
+++ b/redo/window_darwin.go
@@ -15,7 +15,7 @@ type window struct {
closing *event
- *sizer
+ *container
}
func newWindow(title string, width int, height int, control Control) *window {
@@ -26,11 +26,10 @@ func newWindow(title string, width int, height int, control Control) *window {
w := &window{
id: id,
closing: newEvent(),
- sizer: new(sizer),
+ container: newContainer(control),
}
- C.windowSetDelegate(id, unsafe.Pointer(w))
- w.child = control
- w.child.setParent(&controlParent{C.windowContentView(w.id)})
+ C.windowSetDelegate(w.id, unsafe.Pointer(w))
+ C.windowSetContentView(w.id, w.container.view)
return w
}
@@ -69,11 +68,3 @@ func windowClosing(xw unsafe.Pointer) C.BOOL {
}
return C.NO
}
-
-//export windowResized
-func windowResized(xw unsafe.Pointer, width C.uintptr_t, height C.uintptr_t) {
- w := (*window)(unsafe.Pointer(xw))
- // the origin of the window's content area is always (0, 0)
- w.resize(0, 0, int(width), int(height))
- fmt.Printf("new size %d x %d\n", width, height)
-}