summaryrefslogtreecommitdiff
path: root/callbacks_unix.go
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-06-28 21:40:44 -0400
committerPietro Gagliardi <[email protected]>2014-06-28 21:40:44 -0400
commit385993792f62f47c4164466ee1d5248b0921b0a5 (patch)
tree6b97f4541568f6651ea010579dc2f249713be134 /callbacks_unix.go
parentaffc65a5a402534527c4d4fbc5b381b5b1283445 (diff)
Migrated the GTK+ backend to the new API.
Diffstat (limited to 'callbacks_unix.go')
-rw-r--r--callbacks_unix.go7
1 files changed, 4 insertions, 3 deletions
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)