Lines Matching refs:args

161 void JsAppImpl::SetJsAppArgs(OHOS::Ace::Platform::AceRunArgs& args)
165 SetAssetPath(args, jsAppPath);
166 SetProjectModel(args);
167 SetPageProfile(args, commandInfo.pages);
168 SetDeviceWidth(args, ConvertFoldStatus(screenInfo.foldStatus) ==
170 SetDeviceHeight(args, ConvertFoldStatus(screenInfo.foldStatus) ==
172 SetWindowTitle(args, "Ace");
173 SetUrl(args, urlPath);
174 SetConfigChanges(args, configChanges);
175 SetColorMode(args, colorMode);
176 SetOrientation(args, orientation);
177 SetAceVersionArgs(args, aceVersion);
179 SetLanguage(args, SharedData<std::string>::GetData(SharedDataType::LAN));
180 SetRegion(args, SharedData<std::string>::GetData(SharedDataType::REGION));
181 SetScript(args, "");
182 SetSystemResourcesPath(args);
183 SetAppResourcesPath(args, commandInfo.appResourcePath);
184 SetFormsEnabled(args, commandInfo.isCardDisplay);
185 SetContainerSdkPath(args, commandInfo.containerSdkPath);
186 AdaptDeviceType(args, commandInfo.deviceType, ConvertFoldStatus(screenInfo.foldStatus) ==
188 SetOnRouterChange(args);
189 SetOnError(args);
190 SetComponentModeEnabled(args, commandInfo.isComponentMode);
193 SetComponentTestConfig(args, componentTestModeConfig);
195 ILOG("start ability: %d %d %f", args.deviceWidth, args.deviceHeight, args.deviceConfig.density);
375 std::shared_ptr<AppExecFwk::Configuration> JsAppImpl::UpdateConfiguration(OHOS::Ace::Platform::AceRunArgs& args)
416 void JsAppImpl::AdaptDeviceType(Platform::AceRunArgs& args, const std::string type,
420 args.deviceConfig.deviceType = DeviceType::WATCH;
423 args.deviceConfig.density = args.deviceWidth / adaptWidthWatch;
427 args.deviceConfig.deviceType = DeviceType::TV;
430 args.deviceConfig.density = args.deviceWidth / adaptWidthTv;
434 args.deviceConfig.deviceType = DeviceType::PHONE;
437 args.deviceConfig.density = args.deviceWidth / adaptWidthPhone;
441 args.deviceConfig.deviceType = DeviceType::TWO_IN_ONE;
444 args.deviceConfig.density = args.deviceWidth / adaptWidthPhone;
448 args.deviceConfig.deviceType = DeviceType::TABLET;
451 args.deviceConfig.density = args.deviceWidth / adaptWidthTablet;
455 args.deviceConfig.deviceType = DeviceType::CAR;
458 args.deviceConfig.density = args.deviceWidth / adaptWidthCar;
465 void JsAppImpl::SetAssetPath(Platform::AceRunArgs& args, const std::string assetPath) const
467 args.assetPath = assetPath;
470 void JsAppImpl::SetProjectModel(Platform::AceRunArgs& args) const
474 args.projectModel = Platform::ProjectModel(idxVal);
477 void JsAppImpl::SetPageProfile(Platform::AceRunArgs& args, const std::string pageProfile) const
479 args.pageProfile = pageProfile;
482 void JsAppImpl::SetDeviceWidth(Platform::AceRunArgs& args, const int32_t deviceWidth) const
484 args.deviceWidth = deviceWidth;
487 void JsAppImpl::SetDeviceHeight(Platform::AceRunArgs& args, const int32_t deviceHeight) const
489 args.deviceHeight = deviceHeight;
492 void JsAppImpl::SetWindowTitle(Platform::AceRunArgs& args, const std::string windowTitle) const
494 args.windowTitle = windowTitle;
497 void JsAppImpl::SetUrl(Platform::AceRunArgs& args, const std::string urlPath) const
499 args.url = urlPath;
502 void JsAppImpl::SetConfigChanges(Platform::AceRunArgs& args, const std::string configChanges) const
504 args.configChanges = configChanges;
507 void JsAppImpl::SetColorMode(Platform::AceRunArgs& args, const std::string colorMode) const
511 args.deviceConfig.colorMode = ColorMode::DARK;
513 args.deviceConfig.colorMode = ColorMode::LIGHT;
517 void JsAppImpl::SetOrientation(Platform::AceRunArgs& args, const std::string orientation) const
521 args.deviceConfig.orientation = DeviceOrientation::LANDSCAPE;
523 args.deviceConfig.orientation = DeviceOrientation::PORTRAIT;
527 void JsAppImpl::SetAceVersionArgs(Platform::AceRunArgs& args, const std::string aceVersion) const
531 args.aceVersion = Platform::AceVersion::ACE_2_0;
533 args.aceVersion = Platform::AceVersion::ACE_1_0;
537 void JsAppImpl::SetLanguage(Platform::AceRunArgs& args, const std::string language) const
539 args.language = language;
542 void JsAppImpl::SetRegion(Platform::AceRunArgs& args, const std::string region) const
544 args.region = region;
547 void JsAppImpl::SetScript(Platform::AceRunArgs& args, const std::string script) const
549 args.script = script;
552 void JsAppImpl::SetSystemResourcesPath(Platform::AceRunArgs& args) const
559 args.systemResourcesPath = rPath;
562 void JsAppImpl::SetAppResourcesPath(Platform::AceRunArgs& args, const std::string appResourcesPath) const
564 args.appResourcesPath = appResourcesPath;
567 void JsAppImpl::SetFormsEnabled(Platform::AceRunArgs& args, bool formsEnabled) const
569 args.formsEnabled = formsEnabled;
572 void JsAppImpl::SetContainerSdkPath(Platform::AceRunArgs& args, const std::string containerSdkPath) const
574 args.containerSdkPath = containerSdkPath;
577 void JsAppImpl::SetOnRouterChange(Platform::AceRunArgs& args) const
579 args.onRouterChange = std::move(VirtualScreenImpl::PageCallback);
582 void JsAppImpl::SetOnError(Platform::AceRunArgs& args) const
584 args.onError = std::move(VirtualScreenImpl::FastPreviewCallback);
587 void JsAppImpl::SetComponentModeEnabled(Platform::AceRunArgs& args, bool isComponentMode) const
589 args.isComponentMode = isComponentMode;
755 void JsAppImpl::ParseSystemParams(OHOS::Ace::Platform::AceRunArgs& args, const Json2::Value& paramObj)
758 SetDeviceWidth(args, VirtualScreenImpl::GetInstance().GetCompressionWidth());
759 SetDeviceHeight(args, VirtualScreenImpl::GetInstance().GetCompressionHeight());
760 AssignValueForWidthAndHeight(args.deviceWidth, args.deviceHeight,
761 args.deviceWidth, args.deviceHeight);
762 SetColorMode(args, colorMode);
763 SetOrientation(args, orientation);
765 AdaptDeviceType(args, commandInfo.deviceType, aceRunArgs.deviceWidth);
766 SetLanguage(args, SharedData<std::string>::GetData(SharedDataType::LAN));
767 SetRegion(args, SharedData<std::string>::GetData(SharedDataType::REGION));
769 SetDeviceWidth(args, paramObj["width"].AsInt());
770 SetDeviceHeight(args, paramObj["height"].AsInt());
771 AssignValueForWidthAndHeight(args.deviceWidth, args.deviceHeight,
772 args.deviceWidth, args.deviceHeight);
773 SetColorMode(args, paramObj["colorMode"].AsString());
774 SetOrientation(args, paramObj["orientation"].AsString());
777 AdaptDeviceType(args, deviceType, args.deviceWidth, paramObj["dpi"].AsDouble());
779 SetLanguage(args, lanInfo.substr(0, lanInfo.find("_")));
780 SetRegion(args, lanInfo.substr(lanInfo.find("_") + 1, lanInfo.length() - 1));
1072 void JsAppImpl::SetComponentTestConfig(Platform::AceRunArgs& args, const std::string componentTest) const
1074 args.componentTestConfig = componentTest;
1075 args.isComponentTestMode = true;