From 7c365b39205310d042d17fcb0825e84ee19477a5 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Sun, 16 Feb 2014 17:30:58 -0500 Subject: [GTK+] Added buttons. Things aren't quite being positioned properly yet though... --- callbacks_unix.go | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'callbacks_unix.go') 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 // 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), } -- cgit v1.2.3