From 622d7b15696d50767737e5d5621c647a818b91b9 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Sun, 16 Feb 2014 18:04:57 -0500 Subject: Added window (and thus control) resizing. Other bugs have been fixed along the way. --- callbacks_unix.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'callbacks_unix.go') diff --git a/callbacks_unix.go b/callbacks_unix.go index 466beed..cb3b2f6 100644 --- a/callbacks_unix.go +++ b/callbacks_unix.go @@ -16,7 +16,7 @@ while we're at it the callback for our idle function will be handled here too fo // #cgo pkg-config: gtk+-3.0 // #include // extern gboolean our_callback(gpointer); -// extern gboolean our_delete_event_callback(GtkWidget *, GdkEvent *, gpointer); +// extern gboolean our_window_callback(GtkWidget *, GdkEvent *, gpointer); // extern void our_clicked_callback(GtkButton *, gpointer); import "C" @@ -26,8 +26,8 @@ func our_callback(what C.gpointer) C.gboolean { return togbool(f()) } -//export our_delete_event_callback -func our_delete_event_callback(widget *C.GtkWidget, event *C.GdkEvent, what C.gpointer) C.gboolean { +//export our_window_callback +func our_window_callback(widget *C.GtkWidget, event *C.GdkEvent, what C.gpointer) C.gboolean { return our_callback(what) } @@ -38,6 +38,7 @@ func our_clicked_callback(button *C.GtkButton, what C.gpointer) { var callbacks = map[string]C.GCallback{ "idle": C.GCallback(C.our_callback), - "delete-event": C.GCallback(C.our_delete_event_callback), + "delete-event": C.GCallback(C.our_window_callback), + "configure-event": C.GCallback(C.our_window_callback), "clicked": C.GCallback(C.our_clicked_callback), } -- cgit v1.2.3