aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-01-29 03:50:20 +0800
committerobscuren <geffobscura@gmail.com>2015-01-29 03:50:20 +0800
commitadda54ac5537b9f5e93a9b66ea6907a71da45aaf (patch)
tree0002ff16ef10e48a9f06eb216a573a9db25a3c91 /ui
parentcebb149f5cfaf008240d7069fd220401950cc7ee (diff)
downloadgo-tangerine-adda54ac5537b9f5e93a9b66ea6907a71da45aaf.tar
go-tangerine-adda54ac5537b9f5e93a9b66ea6907a71da45aaf.tar.gz
go-tangerine-adda54ac5537b9f5e93a9b66ea6907a71da45aaf.tar.bz2
go-tangerine-adda54ac5537b9f5e93a9b66ea6907a71da45aaf.tar.lz
go-tangerine-adda54ac5537b9f5e93a9b66ea6907a71da45aaf.tar.xz
go-tangerine-adda54ac5537b9f5e93a9b66ea6907a71da45aaf.tar.zst
go-tangerine-adda54ac5537b9f5e93a9b66ea6907a71da45aaf.zip
Added webengine initializer
Diffstat (limited to 'ui')
-rw-r--r--ui/qt/webengine/all.cpp1
-rw-r--r--ui/qt/webengine/cpp/webengine.cpp6
-rw-r--r--ui/qt/webengine/cpp/webengine.h14
-rw-r--r--ui/qt/webengine/webengine.go18
4 files changed, 39 insertions, 0 deletions
diff --git a/ui/qt/webengine/all.cpp b/ui/qt/webengine/all.cpp
new file mode 100644
index 000000000..3b7c2f7b8
--- /dev/null
+++ b/ui/qt/webengine/all.cpp
@@ -0,0 +1 @@
+#include "cpp/webengine.cpp"
diff --git a/ui/qt/webengine/cpp/webengine.cpp b/ui/qt/webengine/cpp/webengine.cpp
new file mode 100644
index 000000000..118b451ef
--- /dev/null
+++ b/ui/qt/webengine/cpp/webengine.cpp
@@ -0,0 +1,6 @@
+#include <QtWebEngine>
+#include "webengine.h"
+
+void webengineInitialize() {
+ QtWebEngine::initialize();
+}
diff --git a/ui/qt/webengine/cpp/webengine.h b/ui/qt/webengine/cpp/webengine.h
new file mode 100644
index 000000000..9c3b13bfa
--- /dev/null
+++ b/ui/qt/webengine/cpp/webengine.h
@@ -0,0 +1,14 @@
+#ifndef WEBENGINE_H
+#define WEBENGINE_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void webengineInitialize();
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // WEBENGINE_H
diff --git a/ui/qt/webengine/webengine.go b/ui/qt/webengine/webengine.go
new file mode 100644
index 000000000..600dbb6cb
--- /dev/null
+++ b/ui/qt/webengine/webengine.go
@@ -0,0 +1,18 @@
+package webengine
+
+// #cgo CPPFLAGS: -I./
+// #cgo CXXFLAGS: -std=c++0x -pedantic-errors -Wall -fno-strict-aliasing
+// #cgo LDFLAGS: -lstdc++
+// #cgo pkg-config: Qt5WebEngine
+//
+// #include "cpp/webengine.h"
+import "C"
+
+import "github.com/obscuren/qml"
+
+// Initializes the WebEngine extension.
+func Initialize() {
+ qml.RunMain(func() {
+ C.webengineInitialize()
+ })
+}