summaryrefslogtreecommitdiff
path: root/redo/common_unix.go
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-07-21 21:07:14 -0400
committerPietro Gagliardi <[email protected]>2014-07-21 21:07:14 -0400
commitd57d2aa2de674039938080d78d9addf53dd6f3e0 (patch)
tree24f387ba6af2e0655806f632d1af7fa4265cdf22 /redo/common_unix.go
parent54c999bc42acccc5d0ef69a6a6d9d607369debf9 (diff)
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.
Diffstat (limited to 'redo/common_unix.go')
-rw-r--r--redo/common_unix.go11
1 files changed, 11 insertions, 0 deletions
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)