This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
Doric/doric-Qt/example/doric/utils/DoricConstant.cpp

40 lines
2.1 KiB
C++
Raw Permalink Normal View History

2021-02-04 16:59:58 +08:00
#include "DoricConstant.h"
2021-04-02 20:47:15 +08:00
const QString DoricConstant::DORIC_BUNDLE_SANDBOX = "doric-sandbox.js";
const QString DoricConstant::DORIC_BUNDLE_LIB = "doric-lib.js";
2021-02-04 16:59:58 +08:00
const QString DoricConstant::DORIC_MODULE_LIB = "doric";
const QString DoricConstant::INJECT_ENVIRONMENT = "Environment";
const QString DoricConstant::INJECT_LOG = "nativeLog";
const QString DoricConstant::INJECT_REQUIRE = "nativeRequire";
const QString DoricConstant::INJECT_TIMER_SET = "nativeSetTimer";
const QString DoricConstant::INJECT_TIMER_CLEAR = "nativeClearTimer";
const QString DoricConstant::INJECT_BRIDGE = "nativeBridge";
const QString DoricConstant::TEMPLATE_CONTEXT_CREATE =
QString("Reflect.apply(") +
"function(doric,context,Entry,require,exports){" + "\n" + "%s1" + "\n" +
"},undefined,[" + "undefined," + "doric.jsObtainContext(\"%s2\")," +
"doric.jsObtainEntry(\"%s3\")," + "doric.__require__" + ",{}" + "])";
const QString DoricConstant::TEMPLATE_MODULE =
QString("Reflect.apply(doric.jsRegisterModule,this,[") + "\"%s1\"," +
"Reflect.apply(function(__module){" + "(function(module,exports,require){" +
"\n" + "%s2" + "\n" + "})(__module,__module.exports,doric.__require__);" +
"\nreturn __module.exports;" + "},this,[{exports:{}}])" + "])";
const QString DoricConstant::TEMPLATE_CONTEXT_DESTROY =
QString("doric.jsReleaseContext(\"%s\")");
const QString DoricConstant::GLOBAL_DORIC = "doric";
const QString DoricConstant::DORIC_CONTEXT_INVOKE = "jsCallEntityMethod";
const QString DoricConstant::DORIC_CONTEXT_INVOKE_PURE = "pureCallEntityMethod";
2021-02-04 16:59:58 +08:00
const QString DoricConstant::DORIC_TIMER_CALLBACK = "jsCallbackTimer";
2021-04-22 11:43:48 +08:00
const QString DoricConstant::DORIC_BRIDGE_RESOLVE = "jsCallResolve";
const QString DoricConstant::DORIC_BRIDGE_REJECT = "jsCallReject";
2021-09-16 13:22:47 +08:00
const QString DoricConstant::DORIC_HOOK_NATIVE_CALL = "jsHookAfterNativeCall";
2021-02-04 16:59:58 +08:00
const QString DoricConstant::DORIC_ENTITY_RESPONSE = "__response__";
2021-02-04 16:59:58 +08:00
const QString DoricConstant::DORIC_ENTITY_INIT = "__init__";
const QString DoricConstant::DORIC_ENTITY_CREATE = "__onCreate__";
const QString DoricConstant::DORIC_ENTITY_BUILD = "__build__";
2021-04-09 16:39:43 +08:00
const QString DoricConstant::DORIC_ENTITY_DESTROY = "__onDestroy__";