diff options
| author | Pietro Gagliardi <[email protected]> | 2014-02-16 17:30:58 -0500 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-02-16 17:30:58 -0500 |
| commit | 7c365b39205310d042d17fcb0825e84ee19477a5 (patch) | |
| tree | f58c8c42b1126e0bf16125f737d7f74c133afcd1 /callbacks_unix.go | |
| parent | 1bcbce414287a9eecfd291522f4a8e2dd0c28102 (diff) | |
[GTK+] Added buttons. Things aren't quite being positioned properly yet though...
Diffstat (limited to 'callbacks_unix.go')
| -rw-r--r-- | callbacks_unix.go | 7 |
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), } |
