diff options
| author | Pietro Gagliardi <[email protected]> | 2014-02-16 18:04:57 -0500 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-02-16 18:04:57 -0500 |
| commit | 622d7b15696d50767737e5d5621c647a818b91b9 (patch) | |
| tree | b59a63be7215a25e48456b7e025cca9f50784ce8 /callbacks_unix.go | |
| parent | 7c365b39205310d042d17fcb0825e84ee19477a5 (diff) | |
Added window (and thus control) resizing. Other bugs have been fixed along the way.
Diffstat (limited to 'callbacks_unix.go')
| -rw-r--r-- | callbacks_unix.go | 9 |
1 files changed, 5 insertions, 4 deletions
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 <gtk/gtk.h> // 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), } |
