Home
last modified time | relevance | path

Searched refs:nativeEngine (Results 1 – 25 of 51) sorted by relevance

123

/foundation/arkui/ace_engine/frameworks/bridge/declarative_frontend/jsview/
Djs_utils.cpp50 auto* nativeEngine = engine->GetNativeEngine(); in CreatePixelMapFromNapiValue() local
51 if (nativeEngine == nullptr) { in CreatePixelMapFromNapiValue()
60 ScopeRAII scope(nativeEngine->GetScopeManager()); in CreatePixelMapFromNapiValue()
61 NativeValue* nativeValue = nativeEngine->ValueToNativeValue(valueWrapper); in CreatePixelMapFromNapiValue()
70 …pixelMapNapiEntry(reinterpret_cast<napi_env>(nativeEngine), reinterpret_cast<napi_value>(nativeVal… in CreatePixelMapFromNapiValue()
88 auto nativeEngine = engine->GetNativeEngine(); in UnwrapNapiValue() local
89 CHECK_NULL_RETURN(nativeEngine, nullptr); in UnwrapNapiValue()
95 ScopeRAII scope(nativeEngine->GetScopeManager()); in UnwrapNapiValue()
96 NativeValue* nativeValue = nativeEngine->ValueToNativeValue(valueWrapper); in UnwrapNapiValue()
131 NativeEngine* nativeEngine = engine->GetNativeEngine(); in CreateWantWrapFromNapiValue() local
[all …]
Djs_ui_extension.cpp84 NativeEngine* nativeEngine = engine->GetNativeEngine(); in Send() local
87 ScopeRAII scopeRAII(nativeEngine->GetScopeManager()); in Send()
88 NativeValue* nativeValue = nativeEngine->ValueToNativeValue(valueWrapper); in Send()
89 auto wantParams = WantParamsWrap::CreateWantWrap(nativeEngine, nativeValue); in Send()
162 NativeEngine* nativeEngine = engine->GetNativeEngine(); in OnReceive() local
163 CHECK_NULL_VOID(nativeEngine); in OnReceive()
164 auto nativeWantParams = WantWrap::ConvertParamsToNativeValue(wantParams, nativeEngine); in OnReceive()
202 NativeEngine* nativeEngine = engine->GetNativeEngine(); in OnResult() local
203 CHECK_NULL_VOID(nativeEngine); in OnResult()
204 auto nativeWant = WantWrap::ConvertToNativeValue(want, nativeEngine); in OnResult()
/foundation/resourceschedule/work_scheduler/frameworks/extension/src/
Djs_work_scheduler_extension.cpp199 NativeEngine& nativeEngine = jsRuntime_.GetNativeEngine(); in OnWorkStart() local
201 NativeValue* jworkInfoData = nativeEngine.CreateObject(); in OnWorkStart()
203 workInfoData->SetProperty("workId", nativeEngine.CreateNumber(workId)); in OnWorkStart()
205 …workInfoData->SetProperty("bundleName", nativeEngine.CreateString(bundleName.c_str(), bundleName.s… in OnWorkStart()
207 …workInfoData->SetProperty("abilityName", nativeEngine.CreateString(abilityName.c_str(), abilityNam… in OnWorkStart()
210 …workInfoData->SetProperty("parameters", nativeEngine.CreateString(extrasStr.c_str(), extrasStr.siz… in OnWorkStart()
213 workInfoData->SetProperty("isPersisted", nativeEngine.CreateBoolean(isPersisted)); in OnWorkStart()
215 workInfoData->SetProperty("networkType", nativeEngine.CreateNumber(networkType)); in OnWorkStart()
219 workInfoData->SetProperty("isCharging", nativeEngine.CreateBoolean(false)); in OnWorkStart()
221 workInfoData->SetProperty("isCharging", nativeEngine.CreateBoolean(true)); in OnWorkStart()
[all …]
/foundation/ability/ability_runtime/frameworks/native/ability/native/form_runtime/
Djs_form_extension.cpp158 NativeEngine* nativeEngine = &jsRuntime_.GetNativeEngine(); in OnCreate() local
159 … napi_value napiWant = OHOS::AppExecFwk::WrapWant(reinterpret_cast<napi_env>(nativeEngine), want); in OnCreate()
177 if (!ConvertFromJsValue(*nativeEngine, nativeDataValue, formDataStr)) { in OnCreate()
186 …if (nativeProxies != nullptr && !ConvertFromDataProxies(*nativeEngine, nativeProxies, formDataProx… in OnCreate()
201 NativeEngine* nativeEngine = &jsRuntime_.GetNativeEngine(); in OnDestroy() local
204 …napi_create_string_utf8(reinterpret_cast<napi_env>(nativeEngine), std::to_string(formId).c_str(), … in OnDestroy()
227 NativeEngine* nativeEngine = &jsRuntime_.GetNativeEngine(); in OnEvent() local
230 … napi_create_string_utf8(reinterpret_cast<napi_env>(nativeEngine), std::to_string(formId).c_str(), in OnEvent()
235 …napi_create_string_utf8(reinterpret_cast<napi_env>(nativeEngine), message.c_str(), NAPI_AUTO_LENGT… in OnEvent()
247 NativeEngine* nativeEngine = &jsRuntime_.GetNativeEngine(); in OnUpdate() local
[all …]
/foundation/ability/ability_runtime/frameworks/native/runtime/
Djs_runtime.cpp466 auto nativeEngine = GetNativeEnginePointer(); in Initialize() local
467 CHECK_POINTER_AND_RETURN(nativeEngine, false); in Initialize()
482 nativeEngine->ReinitUVLoop(); in Initialize()
483 panda::JSNApi::SetLoop(vm, nativeEngine->GetUVLoop()); in Initialize()
486 NativeObject* globalObj = ConvertNativeValueTo<NativeObject>(nativeEngine->GetGlobal()); in Initialize()
490 InitSyscapModule(*nativeEngine, *globalObj); in Initialize()
494 BindNativeFunction(*nativeEngine, *globalObj, "isSystemplugin", moduleName, in Initialize()
499 …methodRequireNapiRef_.reset(nativeEngine->CreateReference(globalObj->GetProperty("requireNapi"), 1… in Initialize()
506 nativeEngine->RegisterPermissionCheck(PermissionCheckFunc); in Initialize()
605 auto nativeEngine = GetNativeEnginePointer(); in PreloadAce() local
[all …]
Djs_worker.cpp63 void InitWorkerFunc(NativeEngine* nativeEngine) in InitWorkerFunc() argument
66 if (nativeEngine == nullptr) { in InitWorkerFunc()
71 NativeObject* globalObj = ConvertNativeValueTo<NativeObject>(nativeEngine->GetGlobal()); in InitWorkerFunc()
77 OHOS::JsSysModule::Console::InitConsoleModule(reinterpret_cast<napi_env>(nativeEngine)); in InitWorkerFunc()
79 auto arkNativeEngine = static_cast<ArkNativeEngine*>(nativeEngine); in InitWorkerFunc()
90 auto workerPostTask = [nativeEngine](std::function<void()>&& callback) { in InitWorkerFunc()
91 nativeEngine->CallDebuggerPostTaskFunc(std::move(callback)); in InitWorkerFunc()
98 void OffWorkerFunc(NativeEngine* nativeEngine) in OffWorkerFunc() argument
101 if (nativeEngine == nullptr) { in OffWorkerFunc()
109 auto arkNativeEngine = static_cast<ArkNativeEngine*>(nativeEngine); in OffWorkerFunc()
Djs_worker.h27 void InitWorkerFunc(NativeEngine* nativeEngine);
28 void OffWorkerFunc(NativeEngine* nativeEngine);
/foundation/ability/ability_runtime/frameworks/native/ability/native/
Djs_extension_common.cpp59 auto& nativeEngine = jsRuntime_.GetNativeEngine(); in OnConfigurationUpdated() local
60 JsExtensionContext::ConfigurationUpdated(&nativeEngine, shellContextRef_, fullConfig); in OnConfigurationUpdated()
63 reinterpret_cast<napi_env>(&nativeEngine), *fullConfig); in OnConfigurationUpdated()
73 auto &nativeEngine = jsRuntime_.GetNativeEngine(); in OnMemoryLevel() local
82 NativeValue *jslevel = CreateJsValue(nativeEngine, level); in OnMemoryLevel()
94 auto& nativeEngine = jsRuntime_.GetNativeEngine(); in CallObjectMethod() local
108 return nativeEngine.CallFunction(value, method, argv, argc); in CallObjectMethod()
Djs_service_extension.cpp254 NativeEngine* nativeEngine = &jsRuntime_.GetNativeEngine(); in OnStart() local
257 …JsExtensionContext::ConfigurationUpdated(nativeEngine, shellContextRef_, context->GetConfiguration… in OnStart()
259 … napi_value napiWant = OHOS::AppExecFwk::WrapWant(reinterpret_cast<napi_env>(nativeEngine), want); in OnStart()
284 NativeEngine* nativeEngine = &jsRuntime_.GetNativeEngine(); in OnConnect() local
286 reinterpret_cast<napi_env>(nativeEngine), reinterpret_cast<napi_value>(result)); in OnConnect()
297 NativeEngine *nativeEngine = &jsRuntime_.GetNativeEngine(); in OnConnect() local
302 …teObject> remoteObj = NAPI_ohos_rpc_getNativeRemoteObject(reinterpret_cast<napi_env>(nativeEngine), in OnConnect()
326 … auto promiseCallback = nativeEngine->CreateFunction("promiseCallback", strlen("promiseCallback"), in OnConnect()
329 nativeEngine->CallFunction(result, then, argv, 1); in OnConnect()
382 NativeEngine* nativeEngine = &jsRuntime_.GetNativeEngine(); in OnCommand() local
[all …]
/foundation/multimedia/av_session/mediaControlExtension/ModuleLoader/
Djs_media_control_extension.cpp175 NativeEngine* nativeEngine = &jsRuntime_.GetNativeEngine(); in OnStart() local
176 … napi_value napiWant = OHOS::AppExecFwk::WrapWant(reinterpret_cast<napi_env>(nativeEngine), want); in OnStart()
196 NativeEngine* nativeEngine = &jsRuntime_.GetNativeEngine(); in OnConnect() local
198 reinterpret_cast<napi_env>(nativeEngine), reinterpret_cast<napi_value>(result)); in OnConnect()
262 NativeEngine* nativeEngine = &jsRuntime_.GetNativeEngine(); in OnCommand() local
263 … napi_value napiWant = OHOS::AppExecFwk::WrapWant(reinterpret_cast<napi_env>(nativeEngine), want); in OnCommand()
267 napi_create_int32(reinterpret_cast<napi_env>(nativeEngine), startId, &napiStartId); in OnCommand()
319 NativeEngine* nativeEngine = &jsRuntime_.GetNativeEngine(); in ForegroundWindow() local
322 if (!ConvertFromJsValue(*nativeEngine, pathNative, contextPath)) { in ForegroundWindow()
327 uiWindow->SetUIContent(contextPath, nativeEngine, nullptr); in ForegroundWindow()
[all …]
/foundation/ability/ability_runtime/frameworks/native/ability/native/ui_extension_ability/
Djs_ui_extension.cpp214 NativeEngine* nativeEngine = &jsRuntime_.GetNativeEngine(); in OnStart() local
215 … napi_value napiWant = OHOS::AppExecFwk::WrapWant(reinterpret_cast<napi_env>(nativeEngine), want); in OnStart()
325 auto &nativeEngine = jsRuntime_.GetNativeEngine(); in CallPromise() local
326 …auto promiseCallback = nativeEngine.CreateFunction("promiseCallback", strlen("promiseCallback"), P… in CallPromise()
329 nativeEngine.CallFunction(result, then, argv, 1); in CallPromise()
337 NativeEngine* nativeEngine = &jsRuntime_.GetNativeEngine(); in OnConnect() local
339 reinterpret_cast<napi_env>(nativeEngine), reinterpret_cast<napi_value>(result)); in OnConnect()
403 NativeEngine* nativeEngine = &jsRuntime_.GetNativeEngine(); in OnCommand() local
404 … napi_value napiWant = OHOS::AppExecFwk::WrapWant(reinterpret_cast<napi_env>(nativeEngine), want); in OnCommand()
408 napi_create_int32(reinterpret_cast<napi_env>(nativeEngine), startId, &napiStartId); in OnCommand()
[all …]
Djs_ui_extension_base.cpp246 NativeEngine *nativeEngine = &jsRuntime_.GetNativeEngine(); in OnCommand() local
247 if (nativeEngine == nullptr) { in OnCommand()
251 … napi_value napiWant = OHOS::AppExecFwk::WrapWant(reinterpret_cast<napi_env>(nativeEngine), want); in OnCommand()
258 napi_create_int32(reinterpret_cast<napi_env>(nativeEngine), startId, &napiStartId); in OnCommand()
286 NativeEngine *nativeEngine = &jsRuntime_.GetNativeEngine(); in CallJsOnSessionCreate() local
287 if (nativeEngine == nullptr) { in CallJsOnSessionCreate()
291 … napi_value napiWant = OHOS::AppExecFwk::WrapWant(reinterpret_cast<napi_env>(nativeEngine), want); in CallJsOnSessionCreate()
298 …JsUIExtensionContentSession::CreateJsUIExtensionContentSession(*nativeEngine, sessionInfo, uiWindo… in CallJsOnSessionCreate()
304 …sessionToken, std::shared_ptr<NativeReference>(nativeEngine->CreateReference(nativeContentSession,… in CallJsOnSessionCreate()
397 auto &nativeEngine = jsRuntime_.GetNativeEngine(); in CallObjectMethod() local
[all …]
/foundation/ability/ability_runtime/frameworks/native/ability/native/ability_runtime/
Djs_ability.cpp218 auto &nativeEngine = jsRuntime_.GetNativeEngine(); in OnStart() local
227 … napi_value napiWant = OHOS::AppExecFwk::WrapWant(reinterpret_cast<napi_env>(&nativeEngine), want); in OnStart()
239 CreateJsLaunchParam(nativeEngine, GetLaunchParam()), in OnStart()
255 auto &nativeEngine = jsRuntime_.GetNativeEngine(); in OnShare() local
267 …antParams = OHOS::AppExecFwk::WrapWantParams(reinterpret_cast<napi_env>(&nativeEngine), wantParam); in OnShare()
274 …OHOS::AppExecFwk::UnwrapWantParams(reinterpret_cast<napi_env>(&nativeEngine), new_napiWantParams, … in OnShare()
453 auto &nativeEngine = jsRuntime_.GetNativeEngine(); in OnForeground() local
465 … napi_value napiWant = OHOS::AppExecFwk::WrapWant(reinterpret_cast<napi_env>(&nativeEngine), want); in OnForeground()
721 auto &nativeEngine = jsRuntime_.GetNativeEngine(); in OnContinue() local
739 …ntParams = OHOS::AppExecFwk::WrapWantParams(reinterpret_cast<napi_env>(&nativeEngine), wantParams); in OnContinue()
[all …]
/foundation/arkui/ace_engine/adapter/ohos/entrance/pa_engine/engine/jsi/
Djsi_pa_engine.cpp111 auto nativeEngine = engineInstance->GetNativeEngine(); in JsRunLoopOnce() local
112 if (nativeEngine == nullptr) { in JsRunLoopOnce()
117 nativeEngine->Loop(LOOP_ONCE); in JsRunLoopOnce()
422 auto nativeEngine = GetNativeEngine(); in InitializeInner() local
423 CHECK_NULL_RETURN(nativeEngine, false); in InitializeInner()
425 InitTimerModule(*nativeEngine); in InitializeInner()
432 auto arkNativeEngine = static_cast<ArkNativeEngine*>(nativeEngine); in InitializeInner()
616 auto nativeEngine = GetNativeEngine(); in CallFunc() local
617 CHECK_NULL_RETURN(nativeEngine, runtime->NewUndefined()); in CallFunc()
635 …o nativeValue = ArkNativeEngine::ArkValueToNativeValue(static_cast<ArkNativeEngine*>(nativeEngine), in CallFunc()
[all …]
/foundation/ability/ability_runtime/frameworks/native/appkit/ability_runtime/app/
Djs_ability_stage.cpp193 auto& nativeEngine = jsRuntime_.GetNativeEngine(); in OnCreate() local
207 nativeEngine.CallFunction(value, methodOnCreate, nullptr, 0); in OnCreate()
227 auto& nativeEngine = jsRuntime_.GetNativeEngine(); in OnAcceptWant() local
236 … napi_value napiWant = OHOS::AppExecFwk::WrapWant(reinterpret_cast<napi_env>(&nativeEngine), want); in OnAcceptWant()
246 NativeValue* flagNative = nativeEngine.CallFunction(value, methodOnAcceptWant, argv, 1); in OnAcceptWant()
248 reinterpret_cast<napi_env>(&nativeEngine), reinterpret_cast<napi_value>(flagNative)); in OnAcceptWant()
257 auto& nativeEngine = jsRuntime_.GetNativeEngine(); in OnConfigurationUpdated() local
265 JsAbilityStageContext::ConfigurationUpdated(&nativeEngine, shellContextRef_, fullConfig); in OnConfigurationUpdated()
268 reinterpret_cast<napi_env>(&nativeEngine), *fullConfig); in OnConfigurationUpdated()
285 auto& nativeEngine = jsRuntime_.GetNativeEngine(); in OnMemoryLevel() local
[all …]
/foundation/arkui/ace_engine/frameworks/bridge/js_frontend/engine/jsi/
Djsi_base_utils.h30 NativeValue* AppDebugLogPrint(NativeEngine* nativeEngine, NativeCallbackInfo* info);
31 NativeValue* AppInfoLogPrint(NativeEngine* nativeEngine, NativeCallbackInfo* info);
32 NativeValue* AppWarnLogPrint(NativeEngine* nativeEngine, NativeCallbackInfo* info);
33 NativeValue* AppErrorLogPrint(NativeEngine* nativeEngine, NativeCallbackInfo* info);
Djsi_xcomponent_bridge.cpp107 auto nativeEngine = static_cast<ArkNativeEngine*>(engineInstance->GetNativeEngine()); in HandleContext() local
108 if (!nativeEngine) { in HandleContext()
113 auto arkObjectRef = nativeEngine->LoadModuleByName(xcomponent->GetLibraryName(), true, in HandleContext()
Djsi_base_utils.cpp808 std::string GetLogContent(NativeEngine* nativeEngine, NativeCallbackInfo* info) in GetLogContent() argument
827 NativeValue* AppLogPrint(NativeEngine* nativeEngine, NativeCallbackInfo* info, JsLogLevel level) in AppLogPrint() argument
832 return nativeEngine->CreateUndefined(); in AppLogPrint()
834 std::string content = GetLogContent(nativeEngine, info); in AppLogPrint()
850 return nativeEngine->CreateUndefined(); in AppLogPrint()
853 NativeValue* AppDebugLogPrint(NativeEngine* nativeEngine, NativeCallbackInfo* info) in AppDebugLogPrint() argument
855 return AppLogPrint(nativeEngine, info, JsLogLevel::DEBUG); in AppDebugLogPrint()
858 NativeValue* AppInfoLogPrint(NativeEngine* nativeEngine, NativeCallbackInfo* info) in AppInfoLogPrint() argument
860 return AppLogPrint(nativeEngine, info, JsLogLevel::INFO); in AppInfoLogPrint()
863 NativeValue* AppWarnLogPrint(NativeEngine* nativeEngine, NativeCallbackInfo* info) in AppWarnLogPrint() argument
[all …]
Djsi_engine.h71 void SetArkNativeEngine(ArkNativeEngine* nativeEngine) in SetArkNativeEngine() argument
73 nativeEngine_ = nativeEngine; in SetArkNativeEngine()
170 void SetPostTask(NativeEngine* nativeEngine);
/foundation/ability/ability_runtime/frameworks/simulator/ability_simulator/src/
Djs_timer.cpp40 …JsTimer(NativeEngine &nativeEngine, const std::shared_ptr<NativeReference> &jsFunction, uint32_t i… in JsTimer() argument
41 : nativeEngine_(nativeEngine), jsFunction_(jsFunction), id_(id) in JsTimer()
43 uv_timer_init(nativeEngine.GetUVLoop(), &timerReq_); in JsTimer()
/foundation/arkui/ace_engine/adapter/ohos/osal/
Dwant_wrap_ohos.cpp44 RefPtr<WantWrap> WantWrap::CreateWantWrap(void* nativeEngine, void* nativeValue) in CreateWantWrap() argument
46 NativeEngine* engine = reinterpret_cast<NativeEngine*>(nativeEngine); in CreateWantWrap()
/foundation/arkui/ace_engine/adapter/ohos/capability/udmf/
Dudmf_impl.cpp58 NativeEngine* nativeEngine = engine->GetNativeEngine(); in TransformUnifiedData() local
59 napi_env env = reinterpret_cast<napi_env>(nativeEngine); in TransformUnifiedData()
74 NativeEngine* nativeEngine = engine->GetNativeEngine(); in TransformUdmfUnifiedData() local
75 napi_env env = reinterpret_cast<napi_env>(nativeEngine); in TransformUdmfUnifiedData()
88 NativeEngine* nativeEngine = engine->GetNativeEngine(); in TransformSummary() local
89 napi_env env = reinterpret_cast<napi_env>(nativeEngine); in TransformSummary()
/foundation/window/window_manager/extension/window_extension/src/
Djs_window_extension.cpp221 NativeEngine* nativeEngine = &jsRuntime_.GetNativeEngine(); in OnConnect() local
222 … napi_value napiWant = OHOS::AppExecFwk::WrapWant(reinterpret_cast<napi_env>(nativeEngine), want); in OnConnect()
247 NativeEngine* nativeEngine = &jsRuntime_.GetNativeEngine(); in OnDisconnect() local
248 … napi_value napiWant = OHOS::AppExecFwk::WrapWant(reinterpret_cast<napi_env>(nativeEngine), want); in OnDisconnect()
338 auto& nativeEngine = jsRuntime_.GetNativeEngine(); in CallJsMethod() local
353 return nativeEngine.CallFunction(value, method, argv, argc); in CallJsMethod()
/foundation/arkui/ace_engine/frameworks/bridge/declarative_frontend/engine/functions/
Djs_drag_function.cpp39 NativeEngine* nativeEngine = engine->GetNativeEngine(); in NapiThrow() local
40 napi_env env = reinterpret_cast<napi_env>(nativeEngine); in NapiThrow()
196 NativeEngine* nativeEngine = engine->GetNativeEngine(); in SetData() local
199 ScopeRAII scope(nativeEngine->GetScopeManager()); in SetData()
200 NativeValue* nativeValue = nativeEngine->ValueToNativeValue(valueWrapper); in SetData()
294 NativeEngine* nativeEngine = engine->GetNativeEngine(); in SetDragInfo() local
297 ScopeRAII scope(nativeEngine->GetScopeManager()); in SetDragInfo()
298 NativeValue* nativeValue = nativeEngine->ValueToNativeValue(valueWrapper); in SetDragInfo()
/foundation/filemanagement/app_file_service/frameworks/native/backup_ext/src/
Dext_backup_js.cpp186 auto &nativeEngine = jsRuntime->GetNativeEngine(); in DoCallJsMethod() local
189 if (!param->argParser(nativeEngine, argv)) { in DoCallJsMethod()
213 if (!param->retParser(nativeEngine, in DoCallJsMethod()
214 … handleEscape.Escape(nativeEngine.CallFunction(value, method, argv.data(), argv.size())))) { in DoCallJsMethod()

123