summaryrefslogtreecommitdiff
path: root/redo/window_windows.go
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-07-25 19:28:34 -0400
committerPietro Gagliardi <[email protected]>2014-07-25 19:28:34 -0400
commit010c97d686f8e10f940c98b62ffb5a6735f73490 (patch)
tree2665df4bae7762fd2932f5449f124f29f5a804ec /redo/window_windows.go
parent4680e35300544a90d5426cbf44b4c533fa025105 (diff)
Adjusted sizing data to act as the base container type; this is needed for proper resizing on both GTK+ and Mac OS X.
Diffstat (limited to 'redo/window_windows.go')
-rw-r--r--redo/window_windows.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/redo/window_windows.go b/redo/window_windows.go
index 1ac294a..34e8f93 100644
--- a/redo/window_windows.go
+++ b/redo/window_windows.go
@@ -12,14 +12,12 @@ import (
import "C"
type window struct {
+ *container
+
hwnd C.HWND
shownbefore bool
- child Control
-
closing *event
-
- spaced bool
}
const windowclassname = ""
@@ -42,8 +40,10 @@ type controlParent interface {
func newWindow(title string, width int, height int, control Control) *window {
w := &window{
// hwnd set in WM_CREATE handler
- closing: newEvent(),
+ closing: newEvent(),
+ container: new(container),
}
+ w.container.beginResize = w.beginResize
hwnd := C.newWindow(toUTF16(title), C.int(width), C.int(height), unsafe.Pointer(w))
if hwnd != w.hwnd {
panic(fmt.Errorf("inconsistency: hwnd returned by CreateWindowEx() (%p) and hwnd stored in window (%p) differ", hwnd, w.hwnd))
@@ -97,7 +97,7 @@ func storeWindowHWND(data unsafe.Pointer, hwnd C.HWND) {
//export windowResize
func windowResize(data unsafe.Pointer, r *C.RECT) {
w := (*window)(data)
- w.doresize(int(r.right - r.left), int(r.bottom - r.top))
+ w.resize(int(r.right - r.left), int(r.bottom - r.top))
}
//export windowClosing