summaryrefslogtreecommitdiff
path: root/redo/window_unix.go
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-08-04 21:08:18 -0400
committerPietro Gagliardi <[email protected]>2014-08-04 21:08:18 -0400
commit23baffe55ed5964a24f41e719b8f538f1bb04168 (patch)
tree26cf4690421ea913772bf7ba8befa4e45e5d2db1 /redo/window_unix.go
parent91f1a34003d56a5778d1ae48f7d18c3f27eea1ed (diff)
Applied the container change to the GTK+ backend. Woo!
Diffstat (limited to 'redo/window_unix.go')
-rw-r--r--redo/window_unix.go15
1 files changed, 4 insertions, 11 deletions
diff --git a/redo/window_unix.go b/redo/window_unix.go
index 3274d77..7dcd60f 100644
--- a/redo/window_unix.go
+++ b/redo/window_unix.go
@@ -10,7 +10,6 @@ import (
// #include "gtk_unix.h"
// extern gboolean windowClosing(GtkWidget *, GdkEvent *, gpointer);
-// extern void windowResizing(GtkWidget *, GdkRectangle *, gpointer);
import "C"
type window struct {
@@ -21,7 +20,7 @@ type window struct {
closing *event
- *layout
+ *container
}
func newWindow(title string, width int, height int, control Control) *window {
@@ -42,8 +41,9 @@ func newWindow(title string, width int, height int, control Control) *window {
C.GCallback(C.windowClosing),
C.gpointer(unsafe.Pointer(w)))
C.gtk_window_resize(w.window, C.gint(width), C.gint(height))
- w.layout = newLayout(control)
- C.gtk_container_add(w.wc, w.layout.layoutwidget)
+ w.container = newContainer(control)
+ // TODO make a method of container
+ C.gtk_container_add(w.wc, w.container.layoutwidget)
return w
}
@@ -82,10 +82,3 @@ func windowClosing(wid *C.GtkWidget, e *C.GdkEvent, data C.gpointer) C.gboolean
}
return C.GDK_EVENT_STOP // keeps window alive
}
-
-//export windowResizing
-func windowResizing(wid *C.GtkWidget, r *C.GdkRectangle, data C.gpointer) {
- w := (*window)(unsafe.Pointer(data))
- // the origin of the window's content area is always (0, 0)
- w.resize(0, 0, int(r.width), int(r.height))
-}