summaryrefslogtreecommitdiff
path: root/redo/common_unix.go
diff options
context:
space:
mode:
Diffstat (limited to 'redo/common_unix.go')
-rw-r--r--redo/common_unix.go22
1 files changed, 22 insertions, 0 deletions
diff --git a/redo/common_unix.go b/redo/common_unix.go
new file mode 100644
index 0000000..e495063
--- /dev/null
+++ b/redo/common_unix.go
@@ -0,0 +1,22 @@
+// 7 july 2014
+
+package ui
+
+import (
+ "unsafe"
+)
+
+// #include "gtk_unix.h"
+import "C"
+
+func fromgstr(s *C.gchar) string {
+ return C.GoString((*C.char)(unsafe.Pointer(s)))
+}
+
+func togstr(s string) *C.gchar {
+ return (*C.gchar)(unsafe.Pointer(C.CString(s)))
+}
+
+func freegstr(s *C.gchar) {
+ C.free(unsafe.Pointer(s))
+}