From d57d2aa2de674039938080d78d9addf53dd6f3e0 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Mon, 21 Jul 2014 21:07:14 -0400 Subject: Added Checkbox on the GTK+ backend, added a checkbox to the test program, and fixed a small error in the GTK+ widgetbase.parent() that kept the new widget hidden. --- redo/common_unix.go | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'redo/common_unix.go') diff --git a/redo/common_unix.go b/redo/common_unix.go index aab80bf..d88afbb 100644 --- a/redo/common_unix.go +++ b/redo/common_unix.go @@ -32,6 +32,17 @@ func freegstr(s *C.gchar) { C.free(unsafe.Pointer(s)) } +func fromgbool(b C.gboolean) bool { + return b != C.FALSE +} + +func togbool(b bool) C.gboolean { + if b == true { + return C.TRUE + } + return C.FALSE +} + func g_signal_connect(object C.gpointer, name string, to C.GCallback, data C.gpointer) { cname := togstr(name) defer freegstr(cname) -- cgit v1.2.3