diff options
author | obscuren <geffobscura@gmail.com> | 2015-01-29 03:50:20 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-01-29 03:50:20 +0800 |
commit | adda54ac5537b9f5e93a9b66ea6907a71da45aaf (patch) | |
tree | 0002ff16ef10e48a9f06eb216a573a9db25a3c91 /ui/qt/webengine | |
parent | cebb149f5cfaf008240d7069fd220401950cc7ee (diff) | |
download | dexon-adda54ac5537b9f5e93a9b66ea6907a71da45aaf.tar dexon-adda54ac5537b9f5e93a9b66ea6907a71da45aaf.tar.gz dexon-adda54ac5537b9f5e93a9b66ea6907a71da45aaf.tar.bz2 dexon-adda54ac5537b9f5e93a9b66ea6907a71da45aaf.tar.lz dexon-adda54ac5537b9f5e93a9b66ea6907a71da45aaf.tar.xz dexon-adda54ac5537b9f5e93a9b66ea6907a71da45aaf.tar.zst dexon-adda54ac5537b9f5e93a9b66ea6907a71da45aaf.zip |
Added webengine initializer
Diffstat (limited to 'ui/qt/webengine')
-rw-r--r-- | ui/qt/webengine/all.cpp | 1 | ||||
-rw-r--r-- | ui/qt/webengine/cpp/webengine.cpp | 6 | ||||
-rw-r--r-- | ui/qt/webengine/cpp/webengine.h | 14 | ||||
-rw-r--r-- | ui/qt/webengine/webengine.go | 18 |
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() + }) +} |