summaryrefslogtreecommitdiff
path: root/callbacks_unix.go
diff options
context:
space:
mode:
Diffstat (limited to 'callbacks_unix.go')
-rw-r--r--callbacks_unix.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/callbacks_unix.go b/callbacks_unix.go
index dd29399..466beed 100644
--- a/callbacks_unix.go
+++ b/callbacks_unix.go
@@ -17,6 +17,7 @@ while we're at it the callback for our idle function will be handled here too fo
// #include <gtk/gtk.h>
// extern gboolean our_callback(gpointer);
// extern gboolean our_delete_event_callback(GtkWidget *, GdkEvent *, gpointer);
+// extern void our_clicked_callback(GtkButton *, gpointer);
import "C"
//export our_callback
@@ -30,7 +31,13 @@ func our_delete_event_callback(widget *C.GtkWidget, event *C.GdkEvent, what C.gp
return our_callback(what)
}
+//export our_clicked_callback
+func our_clicked_callback(button *C.GtkButton, what C.gpointer) {
+ our_callback(what)
+}
+
var callbacks = map[string]C.GCallback{
"idle": C.GCallback(C.our_callback),
"delete-event": C.GCallback(C.our_delete_event_callback),
+ "clicked": C.GCallback(C.our_clicked_callback),
}