30 lines
684 B
C++
30 lines
684 B
C++
#ifndef NATIVE_JSE_H
|
|
#define NATIVE_JSE_H
|
|
|
|
#include "DoricInterfaceJSE.h"
|
|
#include <QJSEngine>
|
|
#include <excpt.h>
|
|
|
|
#include "libplatform/libplatform.h"
|
|
#include "v8.h"
|
|
|
|
class DoricNativeJSE : public DoricInterfaceJSE {
|
|
private:
|
|
QJSEngine mJSEngine;
|
|
|
|
public:
|
|
DoricNativeJSE();
|
|
|
|
QString loadJS(QString script, QString source) override;
|
|
|
|
void injectGlobalJSObject(QString name, QObject *object) override;
|
|
|
|
void injectGlobalJSFunction(QString name, QObject *function,
|
|
QString property) override;
|
|
|
|
QJSValue invokeObject(QString objectName, QString functionName,
|
|
QVariantList arguments) override;
|
|
};
|
|
|
|
#endif // NATIVE_JSE_H
|