Added webengine initializer

This commit is contained in:
obscuren
2015-01-28 20:50:20 +01:00
parent cebb149f5c
commit adda54ac55
6 changed files with 733 additions and 0 deletions

1
ui/qt/webengine/all.cpp Normal file
View File

@ -0,0 +1 @@
#include "cpp/webengine.cpp"

View File

@ -0,0 +1,6 @@
#include <QtWebEngine>
#include "webengine.h"
void webengineInitialize() {
QtWebEngine::initialize();
}

View File

@ -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

View File

@ -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()
})
}