summaryrefslogtreecommitdiff
path: root/callbacks_unix.go
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-06-30 22:48:12 -0400
committerPietro Gagliardi <[email protected]>2014-06-30 22:48:12 -0400
commitffa1bbe0b91a8c812ddcea5c5d65e55f60d07f33 (patch)
tree000fadd9af11843d92e7f0eee49fa90cca1379cd /callbacks_unix.go
parent990d50e9a153681a091a23734f8962e728fde1b0 (diff)
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.
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)