diff options
Diffstat (limited to 'vendor/github.com/gotk3/gotk3/cairo/util.go')
-rw-r--r-- | vendor/github.com/gotk3/gotk3/cairo/util.go | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/vendor/github.com/gotk3/gotk3/cairo/util.go b/vendor/github.com/gotk3/gotk3/cairo/util.go new file mode 100644 index 0000000..39adda7 --- /dev/null +++ b/vendor/github.com/gotk3/gotk3/cairo/util.go @@ -0,0 +1,20 @@ +package cairo + +// #include <stdlib.h> +// #include <cairo.h> +// #include <cairo-gobject.h> +import "C" + +func cairobool(b bool) C.cairo_bool_t { + if b { + return C.cairo_bool_t(1) + } + return C.cairo_bool_t(0) +} + +func gobool(b C.cairo_bool_t) bool { + if b != 0 { + return true + } + return false +} |