split project with app & doric module
This commit is contained in:
31
doric-Qt/example/doric/engine/DoricNativeJSE.h
Normal file
31
doric-Qt/example/doric/engine/DoricNativeJSE.h
Normal file
@@ -0,0 +1,31 @@
|
||||
#ifndef NATIVE_JSE_H
|
||||
#define NATIVE_JSE_H
|
||||
|
||||
#include "DoricInterfaceJSE.h"
|
||||
#include "native/NativeExecutor.h"
|
||||
#include "v8/V8Executor.h"
|
||||
|
||||
enum class JSEType { V8, Native };
|
||||
|
||||
class DoricNativeJSE : public DoricInterfaceJSE {
|
||||
private:
|
||||
JSEType mType;
|
||||
|
||||
V8Executor *v8Executor;
|
||||
NativeExecutor *nativeExecutor;
|
||||
|
||||
public:
|
||||
DoricNativeJSE(JSEType type);
|
||||
|
||||
QString loadJS(QString script, QString source) override;
|
||||
|
||||
void injectGlobalJSObject(QString name, QObject *object) override;
|
||||
|
||||
void injectGlobalJSFunction(QString name, QObject *function,
|
||||
QString property) override;
|
||||
|
||||
void invokeObject(QString objectName, QString functionName,
|
||||
QVariantList arguments) override;
|
||||
};
|
||||
|
||||
#endif // NATIVE_JSE_H
|
||||
Reference in New Issue
Block a user