aboutsummaryrefslogtreecommitdiffstats
path: root/ui/qt/clipboard/clipboard.go
diff options
context:
space:
mode:
Diffstat (limited to 'ui/qt/clipboard/clipboard.go')
-rw-r--r--ui/qt/clipboard/clipboard.go15
1 files changed, 15 insertions, 0 deletions
diff --git a/ui/qt/clipboard/clipboard.go b/ui/qt/clipboard/clipboard.go
new file mode 100644
index 000000000..064ee954d
--- /dev/null
+++ b/ui/qt/clipboard/clipboard.go
@@ -0,0 +1,15 @@
+package clipboard
+
+// #cgo CPPFLAGS: -I./
+// #cgo CXXFLAGS: -std=c++0x -pedantic-errors -Wall -fno-strict-aliasing
+// #cgo LDFLAGS: -lstdc++
+// #cgo pkg-config: Qt5Quick
+//
+// #include "capi.hpp"
+import "C"
+
+import "github.com/obscuren/qml"
+
+func SetQMLClipboard(context *qml.Context) {
+ context.SetVar("clipboard", (unsafe.Pointer)(C.initClipboard()))
+}