From ffa1bbe0b91a8c812ddcea5c5d65e55f60d07f33 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Mon, 30 Jun 2014 22:48:12 -0400 Subject: Restored the previous new API. I'm going to change it so that events are callbacks rather than using a window handler, but other than that... yeah. --- callbacks_unix.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'callbacks_unix.go') diff --git a/callbacks_unix.go b/callbacks_unix.go index ff3e3b9..717150c 100644 --- a/callbacks_unix.go +++ b/callbacks_unix.go @@ -27,8 +27,9 @@ import "C" func our_window_delete_event_callback(widget *C.GtkWidget, event *C.GdkEvent, what C.gpointer) C.gboolean { // called when the user tries to close the window s := (*sysData)(unsafe.Pointer(what)) - s.signal() - return C.TRUE // do not close the window + b := false // TODO + s.close(&b) + return togbool(!b) // ! because TRUE means don't close } var window_delete_event_callback = C.GCallback(C.our_window_delete_event_callback) @@ -52,7 +53,7 @@ var window_configure_event_callback = C.GCallback(C.our_window_configure_event_c func our_button_clicked_callback(button *C.GtkButton, what C.gpointer) { // called when the user clicks a button s := (*sysData)(unsafe.Pointer(what)) - s.signal() + s.event() } var button_clicked_callback = C.GCallback(C.our_button_clicked_callback) -- cgit v1.2.3