diff --git a/.vsts-ci.yml b/.vsts-ci.yml index 8fe1ea227e7f..0050352fc708 100644 --- a/.vsts-ci.yml +++ b/.vsts-ci.yml @@ -64,7 +64,7 @@ jobs: - template: build/ci/.azure-devops-winui-convert.yml parameters: - vmImage: '$(windows2022HostedVMImage)' + poolName: '$(windowsScaledPool)' - template: build/ci/.azure-devops-pipeline-validations.yml parameters: @@ -78,6 +78,18 @@ jobs: parameters: poolName: '$(windowsScaledPool)' +- template: build/ci/.azure-devops-package-wasm.yml + parameters: + vmImage: '$(linuxVMImage)' + +- template: build/ci/.azure-devops-package-reference.yml + parameters: + vmImage: '$(linuxVMImage)' + +- template: build/ci/.azure-devops-package-skia.yml + parameters: + poolName: '$(windowsScaledPool)' + - template: build/ci/.azure-devops-package.yml parameters: poolName: '$(windowsScaledPool)' diff --git a/build/Uno.Foundation.Logging.nuspec b/build/Uno.Foundation.Logging.nuspec index 181f9b7bf5fb..d1b179709afc 100644 --- a/build/Uno.Foundation.Logging.nuspec +++ b/build/Uno.Foundation.Logging.nuspec @@ -25,6 +25,7 @@ + diff --git a/build/Uno.UI.Adapter.Microsoft.Extensions.Logging.nuspec b/build/Uno.UI.Adapter.Microsoft.Extensions.Logging.nuspec index 345da9149486..ce9188a47e8c 100644 --- a/build/Uno.UI.Adapter.Microsoft.Extensions.Logging.nuspec +++ b/build/Uno.UI.Adapter.Microsoft.Extensions.Logging.nuspec @@ -22,5 +22,6 @@ + diff --git a/build/Uno.UI.Build.csproj b/build/Uno.UI.Build.csproj index c45d0f9afa44..8577d3ca0144 100644 --- a/build/Uno.UI.Build.csproj +++ b/build/Uno.UI.Build.csproj @@ -43,29 +43,22 @@ - - + + + + + - - - - - - - - - - - + @@ -222,15 +215,14 @@ - - - + + - + + + + + + + + + + + + + + + + + + - + + @@ -252,7 +278,6 @@ - + + + + + + + + + @@ -98,6 +103,9 @@ + + + @@ -115,7 +123,8 @@ - + + @@ -129,10 +138,16 @@ - + - + + + + + + + diff --git a/build/Uno.WinUI.MSAL.nuspec b/build/Uno.WinUI.MSAL.nuspec index 06b3919e49c3..65230e1fd9cc 100644 --- a/build/Uno.WinUI.MSAL.nuspec +++ b/build/Uno.WinUI.MSAL.nuspec @@ -27,11 +27,15 @@ - - - - - + + + + + + + + + @@ -59,7 +63,8 @@ - + + @@ -75,11 +80,17 @@ - - + + + + + + + + - - + + diff --git a/build/Uno.WinUI.RemoteControl.nuspec b/build/Uno.WinUI.RemoteControl.nuspec index 80884ee6ec61..5073965558f8 100644 --- a/build/Uno.WinUI.RemoteControl.nuspec +++ b/build/Uno.WinUI.RemoteControl.nuspec @@ -80,7 +80,7 @@ - + @@ -88,6 +88,15 @@ + + + + + + + + + @@ -95,6 +104,11 @@ + + + + + @@ -132,8 +146,11 @@ - - + + + + + @@ -164,19 +181,28 @@ + + - - + + + + + + + + - - + + - + + diff --git a/build/Uno.WinUI.XamlHost.Skia.Wpf.nuspec b/build/Uno.WinUI.XamlHost.Skia.Wpf.nuspec index 8f9ac217bf3c..dd2a448ef196 100644 --- a/build/Uno.WinUI.XamlHost.Skia.Wpf.nuspec +++ b/build/Uno.WinUI.XamlHost.Skia.Wpf.nuspec @@ -19,6 +19,10 @@ + + + + @@ -26,8 +30,10 @@ - + + + diff --git a/build/Uno.WinUI.XamlHost.nuspec b/build/Uno.WinUI.XamlHost.nuspec index 378d5e78942d..01705fe65cbe 100644 --- a/build/Uno.WinUI.XamlHost.nuspec +++ b/build/Uno.WinUI.XamlHost.nuspec @@ -72,15 +72,24 @@ - + + - - - + + + - - + + + + + + + + + + diff --git a/build/Uno.WinUI.nuspec b/build/Uno.WinUI.nuspec index 40904e44130e..c5fd3501172c 100644 --- a/build/Uno.WinUI.nuspec +++ b/build/Uno.WinUI.nuspec @@ -92,7 +92,7 @@ - + @@ -102,6 +102,17 @@ + + + + + + + + + + + @@ -133,6 +144,21 @@ + + + + + + + + + + + + + + + @@ -481,57 +507,126 @@ + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -573,6 +668,7 @@ + @@ -583,6 +679,7 @@ + @@ -593,6 +690,7 @@ + @@ -603,6 +701,7 @@ + @@ -613,6 +712,7 @@ + @@ -623,6 +723,7 @@ + diff --git a/build/ci/.azure-devops-android-tests.yml b/build/ci/.azure-devops-android-tests.yml index 095250d4e1c0..75ca2fe3d129 100644 --- a/build/ci/.azure-devops-android-tests.yml +++ b/build/ci/.azure-devops-android-tests.yml @@ -31,7 +31,7 @@ jobs: - bash: | cd $(build.sourcesdirectory)/src/SamplesApp/SamplesApp.net6mobile - dotnet publish -f net6.0-android -c Release -p:UnoSampleAppRuntimeIdentifiers=android-x64 + dotnet publish -f net6.0-android -c Release -p:UnoSampleAppRuntimeIdentifiers=android-x64 -p:UnoUIDisableNet7Build=true displayName: Build Android samples app - task: CopyFiles@2 diff --git a/build/ci/.azure-devops-package-generic.yml b/build/ci/.azure-devops-package-generic.yml index 09bc3af9cf03..1677f12d3992 100644 --- a/build/ci/.azure-devops-package-generic.yml +++ b/build/ci/.azure-devops-package-generic.yml @@ -26,7 +26,7 @@ jobs: # Disable .NET 5 build on CI for package generation # Build validation is performed on other jobs - UnoUIDisableNetCoreBuild: true + UnoUIDisableNet7Build: true # This is required to be able to use hard links as much as possible NUGET_PACKAGES: $(Agent.WorkFolder)\.nuget @@ -72,7 +72,7 @@ jobs: msbuildLocationMethod: version msbuildVersion: latest msbuildArchitecture: x86 - msbuildArguments: /r /m /t:BuildGeneric "/p:CombinedConfiguration=$(CombinedConfiguration)" /detailedsummary /bl:$(build.artifactstagingdirectory)\build-$(GitVersion.FullSemVer)-$(XAML_FLAVOR_BUILD).binlog + msbuildArguments: /r /m /v:m /t:BuildGeneric "/p:CombinedConfiguration=$(CombinedConfiguration)" /detailedsummary /bl:$(build.artifactstagingdirectory)\build-$(GitVersion.FullSemVer)-$(XAML_FLAVOR_BUILD).binlog clean: false restoreNugetPackages: false logProjectEvents: false diff --git a/build/ci/.azure-devops-package-net6-win.yml b/build/ci/.azure-devops-package-net6-win.yml index 55a3e1299e05..caf5487d97a8 100644 --- a/build/ci/.azure-devops-package-net6-win.yml +++ b/build/ci/.azure-devops-package-net6-win.yml @@ -26,7 +26,7 @@ jobs: # Disable .NET 5 build on CI for package generation # Build validation is performed on other jobs - UnoUIDisableNetCoreBuild: true + UnoUIDisableNet7Build: true # Disable trimming for packages creation PublishTrimmed: false @@ -51,19 +51,6 @@ jobs: - template: templates/dotnet6-install-windows.yml - template: templates/install-windows-sdk.yml - # Required to build on net5 because of uwp compatibility (until 16.10 gets published) - - task: MSBuild@1 - inputs: - solution: Build/Uno.UI.Build.csproj - msbuildLocationMethod: version - msbuildVersion: latest - msbuildArchitecture: x86 - msbuildArguments: /r /m /t:BuildNet6 "/p:CombinedConfiguration=$(CombinedConfiguration)" /detailedsummary /bl:$(build.artifactstagingdirectory)\build-$(GitVersion.FullSemVer)-net6-$(UNO_UWP_BUILD).binlog - clean: false - restoreNugetPackages: false - logProjectEvents: false - createLogFile: false - - powershell: | cp $(build.sourcesdirectory)\src\global-net6.json $(build.sourcesdirectory)\src\global.json displayName: Change active .NET SDK diff --git a/build/ci/.azure-devops-package-reference.yml b/build/ci/.azure-devops-package-reference.yml new file mode 100644 index 000000000000..04b5d4dd879a --- /dev/null +++ b/build/ci/.azure-devops-package-reference.yml @@ -0,0 +1,61 @@ +parameters: + poolName: '' + +jobs: +- job: reference_package_build + displayName: 'Build Reference Package Binaries' + + dependsOn: winui_convert_tree + + pool: + vmImage: ${{ parameters.vmImage }} + + strategy: + matrix: + UWP: + UNO_UWP_BUILD: true + XAML_FLAVOR_BUILD: UWP + + WinUI: + UNO_UWP_BUILD: false + XAML_FLAVOR_BUILD: WinUI + + variables: + CombinedConfiguration: Release|Any CPU + CI_Build: true + NUGET_PACKAGES: $(build.sourcesdirectory)/.nuget + + steps: + - checkout: self + clean: true + + - template: templates/download-winui-converted-tree.yml + + - template: templates/nuget-cache.yml + parameters: + nugetPackages: $(NUGET_PACKAGES) + + - template: templates/gitversion.yml + + - template: templates/dotnet-install.yml + + - powershell: | + Set-PSDebug -Trace 1 + dotnet build build/Uno.UI.Build.csproj /m /t:BuildCIReference "/p:CombinedConfiguration=$(CombinedConfiguration)" /detailedsummary /bl:$(build.artifactstagingdirectory)/build-Reference-$(XAML_FLAVOR_BUILD).binlog + displayName: Building Reference Binaries + + - template: templates/copy-package-assets.yml + + - task: ArchiveFiles@2 + inputs: + rootFolderOrFile: $(build.sourcesdirectory)\build-artifacts\bin-$(XAML_FLAVOR_BUILD) + includeRootFolder: false + archiveType: 'zip' + archiveFile: '$(Build.ArtifactStagingDirectory)/Reference-bin-$(XAML_FLAVOR_BUILD).zip' + + - task: PublishBuildArtifacts@1 + condition: always() + inputs: + PathtoPublish: $(build.artifactstagingdirectory) + ArtifactName: NugetPackages-Artifacts + ArtifactType: Container diff --git a/build/ci/.azure-devops-package-skia.yml b/build/ci/.azure-devops-package-skia.yml new file mode 100644 index 000000000000..1946770c7252 --- /dev/null +++ b/build/ci/.azure-devops-package-skia.yml @@ -0,0 +1,65 @@ +parameters: + poolName: '' + +jobs: +- job: skia_package_build + displayName: 'Build Skia Package Binaries' + + dependsOn: winui_convert_tree + + pool: ${{ parameters.poolName }} + + strategy: + matrix: + UWP: + UNO_UWP_BUILD: true + XAML_FLAVOR_BUILD: UWP + + WinUI: + UNO_UWP_BUILD: false + XAML_FLAVOR_BUILD: WinUI + + variables: + CombinedConfiguration: Release|Any CPU + CI_Build: true + + # Disable .NET 5 build on CI for package generation + # Build validation is performed on other jobs + UnoUIDisableNet7Build: true + + NUGET_PACKAGES: $(build.sourcesdirectory)\.nuget + + steps: + - checkout: self + clean: true + + - template: templates/download-winui-converted-tree.yml + + - template: templates/nuget-cache.yml + parameters: + nugetPackages: $(NUGET_PACKAGES) + + - template: templates/gitversion.yml + + - template: templates/dotnet-install.yml + + - powershell: | + Set-PSDebug -Trace 1 + dotnet build build\Uno.UI.Build.csproj /m /t:BuildCISkia "/p:CombinedConfiguration=$(CombinedConfiguration)" /detailedsummary /bl:$(build.artifactstagingdirectory)/build-skia-$(XAML_FLAVOR_BUILD).binlog + displayName: Building Skia Binaries + + - template: templates/copy-package-assets.yml + + - task: ArchiveFiles@2 + inputs: + rootFolderOrFile: $(build.sourcesdirectory)\build-artifacts\bin-$(XAML_FLAVOR_BUILD) + includeRootFolder: false + archiveType: 'zip' + archiveFile: '$(Build.ArtifactStagingDirectory)/skia-bin-$(XAML_FLAVOR_BUILD).zip' + + - task: PublishBuildArtifacts@1 + condition: always() + inputs: + PathtoPublish: $(build.artifactstagingdirectory) + ArtifactName: NugetPackages-Artifacts + ArtifactType: Container diff --git a/build/ci/.azure-devops-package-wasm.yml b/build/ci/.azure-devops-package-wasm.yml new file mode 100644 index 000000000000..4399f71c4d6e --- /dev/null +++ b/build/ci/.azure-devops-package-wasm.yml @@ -0,0 +1,66 @@ +parameters: + poolName: '' + +jobs: +- job: wasm_package_build + displayName: 'Build WebAssembly Package Binaries' + + dependsOn: winui_convert_tree + + pool: + vmImage: ${{ parameters.vmImage }} + + strategy: + matrix: + UWP: + UNO_UWP_BUILD: true + XAML_FLAVOR_BUILD: UWP + + WinUI: + UNO_UWP_BUILD: false + XAML_FLAVOR_BUILD: WinUI + + variables: + CombinedConfiguration: Release|Any CPU + CI_Build: true + + # Disable .NET 5 build on CI for package generation + # Build validation is performed on other jobs + UnoUIDisableNet7Build: true + + NUGET_PACKAGES: $(build.sourcesdirectory)/.nuget + + steps: + - checkout: self + clean: true + + - template: templates/download-winui-converted-tree.yml + + - template: templates/nuget-cache.yml + parameters: + nugetPackages: $(NUGET_PACKAGES) + + - template: templates/gitversion.yml + + - template: templates/dotnet-install.yml + + - powershell: | + Set-PSDebug -Trace 1 + dotnet build build/Uno.UI.Build.csproj /m /t:BuildCIWasm "/p:CombinedConfiguration=$(CombinedConfiguration)" /detailedsummary /bl:$(build.artifactstagingdirectory)/build-wasm-$(XAML_FLAVOR_BUILD).binlog + displayName: Building Wasm Binaries + + - template: templates/copy-package-assets.yml + + - task: ArchiveFiles@2 + inputs: + rootFolderOrFile: $(build.sourcesdirectory)\build-artifacts\bin-$(XAML_FLAVOR_BUILD) + includeRootFolder: false + archiveType: 'zip' + archiveFile: '$(Build.ArtifactStagingDirectory)/wasm-bin-$(XAML_FLAVOR_BUILD).zip' + + - task: PublishBuildArtifacts@1 + condition: always() + inputs: + PathtoPublish: $(build.artifactstagingdirectory) + ArtifactName: NugetPackages-Artifacts + ArtifactType: Container diff --git a/build/ci/.azure-devops-package.yml b/build/ci/.azure-devops-package.yml index 9095eaef1819..f41d74d780df 100644 --- a/build/ci/.azure-devops-package.yml +++ b/build/ci/.azure-devops-package.yml @@ -9,6 +9,9 @@ jobs: dependsOn: - generic_win_build - net6_win_build + - skia_package_build + - wasm_package_build + - reference_package_build pool: ${{ parameters.poolName }} @@ -28,7 +31,7 @@ jobs: # Disable .NET 5 build on CI for package generation # Build validation is performed on other jobs - UnoUIDisableNetCoreBuild: true + UnoUIDisableNet7Build: true # This is required to be able to use hard links as much as possible NUGET_PACKAGES: $(Agent.WorkFolder)\.nuget @@ -44,21 +47,6 @@ jobs: - template: templates/download-winui-converted-tree.yml - template: templates/gitversion.yml - - - task: NuGetToolInstaller@0 - inputs: - versionSpec: 4.9.1 - checkLatest: false - - # Required to run the api comparison tool - - task: UseDotNet@2 - displayName: 'Use .Net Core runtime 2.2.x' - inputs: - packageType: runtime - version: 2.2.x - - # Required for the Wasm uitests project - - task: NodeTool@0 - template: templates/install-windows-sdk.yml @@ -81,7 +69,7 @@ jobs: msbuildLocationMethod: version msbuildVersion: latest msbuildArchitecture: x86 - msbuildArguments: /r /m /t:GeneratePackages "/p:CombinedConfiguration=$(CombinedConfiguration)" /detailedsummary /bl:$(build.artifactstagingdirectory)\build-$(GitVersion.FullSemVer)-generate-packages.binlog + msbuildArguments: /r /m /v:m /t:GeneratePackages "/p:CombinedConfiguration=$(CombinedConfiguration)" /detailedsummary /bl:$(build.artifactstagingdirectory)\build-$(GitVersion.FullSemVer)-generate-packages.binlog clean: false restoreNugetPackages: false logProjectEvents: false @@ -111,6 +99,32 @@ jobs: OverWrite: false flattenFolders: false + - task: CopyFiles@2 + displayName: Copy Skia build packages + condition: always() + inputs: + SourceFolder: $(Agent.WorkFolder)/NugetPackages-Artifacts/vslatest-skia + Contents: | + *.nupkg + *.vsix + TargetFolder: $(build.artifactstagingdirectory)\vslatest + CleanTargetFolder: false + OverWrite: false + flattenFolders: false + + - task: CopyFiles@2 + displayName: Copy Wasm build packages + condition: always() + inputs: + SourceFolder: $(Agent.WorkFolder)/NugetPackages-Artifacts/vslatest-wasm + Contents: | + *.nupkg + *.vsix + TargetFolder: $(build.artifactstagingdirectory)\vslatest + CleanTargetFolder: false + OverWrite: false + flattenFolders: false + - task: PowerShell@2 displayName: Authenticode Sign Packages inputs: diff --git a/build/ci/.azure-devops-project-template-tests.yml b/build/ci/.azure-devops-project-template-tests.yml index 351cb995a968..7b97dac66b33 100644 --- a/build/ci/.azure-devops-project-template-tests.yml +++ b/build/ci/.azure-devops-project-template-tests.yml @@ -65,7 +65,7 @@ jobs: - script: dotnet new -i $(System.ArtifactsDirectory)\NugetPackages\vslatest\Uno.ProjectTemplates.Dotnet*.nupkg displayName: Install Project Templates - - powershell: build\test-scripts\run-net6-template-tests.ps1 + - powershell: build\test-scripts\run-net6-mobile-template-tests.ps1 displayName: Run Project Templates Tests env: NUGET_CI_CONFIG: $(Build.SourcesDirectory)\src\nuget.ci.net6.config @@ -103,3 +103,33 @@ jobs: displayName: Run Project Templates Tests env: NUGET_CI_CONFIG: $(Build.SourcesDirectory)/src/nuget.ci.config + +- job: Dotnet_Template_Tests_net7_Linux + displayName: 'dotnet new Templates Tests - Linux (net7)' + + pool: + vmImage: ${{ parameters.vmImageLinux }} + + container: unoplatform/wasm-build:2.3 + + dependsOn: Generate_Packages + + steps: + - task: DownloadBuildArtifacts@0 + inputs: + artifactName: NugetPackages + + - template: templates/gitversion.yml + + - script: cp $(System.ArtifactsDirectory)/NugetPackages/vslatest/*.nupkg $(Build.SourcesDirectory)/src/PackageCache + displayName: Copy Artifacts to PackageCache + + - template: templates/dotnet-install.yml + + - script: dotnet new -i $(System.ArtifactsDirectory)/NugetPackages/vslatest/Uno.ProjectTemplates.Dotnet*.nupkg + displayName: Install Project Templates + + - pwsh: build/test-scripts/run-net7-template-linux.ps1 + displayName: Run Project Templates Tests + env: + NUGET_CI_CONFIG: $(Build.SourcesDirectory)/src/nuget.ci.config diff --git a/build/ci/.azure-devops-skia-tests.yml b/build/ci/.azure-devops-skia-tests.yml index 8b406f2bcec1..86a15468ce06 100644 --- a/build/ci/.azure-devops-skia-tests.yml +++ b/build/ci/.azure-devops-skia-tests.yml @@ -36,7 +36,7 @@ jobs: - task: PublishBuildArtifacts@1 condition: always() inputs: - PathtoPublish: $(Build.SourcesDirectory)\src\SamplesApp\SamplesApp.Skia.Gtk\bin\Release\netcoreapp3.1 + PathtoPublish: $(Build.SourcesDirectory)\src\SamplesApp\SamplesApp.Skia.Gtk\bin\Release\net7.0 ArtifactName: skia-gtk-samples-app ArtifactType: Container @@ -46,7 +46,7 @@ jobs: - task: PublishBuildArtifacts@1 condition: always() inputs: - PathtoPublish: $(Build.SourcesDirectory)\src\SamplesApp\SamplesApp.Skia.WPF\bin\Release\net5.0-windows + PathtoPublish: $(Build.SourcesDirectory)\src\SamplesApp\SamplesApp.Skia.WPF\bin\Release\net7.0-windows ArtifactName: skia-wpf-samples-app ArtifactType: Container diff --git a/build/ci/.azure-devops-uap.yml b/build/ci/.azure-devops-uap.yml index 07873f3fcf19..42f92b75fb17 100644 --- a/build/ci/.azure-devops-uap.yml +++ b/build/ci/.azure-devops-uap.yml @@ -38,7 +38,7 @@ jobs: msbuildLocationMethod: version msbuildVersion: latest msbuildArchitecture: x86 - msbuildArguments: /r /m /p:Configuration=Release /p:UnoTargetFrameworkOverride=uap10.0.18362 /p:UnoDisableTargetFrameworksCIOverride=true /detailedsummary /bl:$(build.artifactstagingdirectory)/build-uap.binlog + msbuildArguments: /r /m /v:m /p:Configuration=Release /p:UnoTargetFrameworkOverride=uap10.0.18362 /p:UnoDisableTargetFrameworksCIOverride=true /detailedsummary /bl:$(build.artifactstagingdirectory)/build-uap.binlog clean: false restoreNugetPackages: false logProjectEvents: false diff --git a/build/ci/.azure-devops-unit-tests.yml b/build/ci/.azure-devops-unit-tests.yml index f1b95d353c2b..f8070544bb2f 100644 --- a/build/ci/.azure-devops-unit-tests.yml +++ b/build/ci/.azure-devops-unit-tests.yml @@ -47,7 +47,7 @@ jobs: - task: MSBuild@1 inputs: solution: src/Uno.UI-UnitTests-only.slnf - msbuildArguments: /r /p:CheckExclusions=True /p:Configuration=Release /nodeReuse:true /p:TargetFrameworksCI=net461 /detailedsummary /m $(ADDITIONAL_FLAGS) /bl:$(build.artifactstagingdirectory)\unit-tests-build.binlog + msbuildArguments: /r /v:m /p:CheckExclusions=True /p:Configuration=Release /nodeReuse:true /p:TargetFrameworksCI=net461 /detailedsummary /m $(ADDITIONAL_FLAGS) /bl:$(build.artifactstagingdirectory)\unit-tests-build.binlog - task: PublishBuildArtifacts@1 condition: always() diff --git a/build/ci/.azure-devops-wasm-uitests.yml b/build/ci/.azure-devops-wasm-uitests.yml index ec7daf18aa22..91b743c6f597 100644 --- a/build/ci/.azure-devops-wasm-uitests.yml +++ b/build/ci/.azure-devops-wasm-uitests.yml @@ -36,14 +36,14 @@ jobs: - bash: | dotnet msbuild /r /nr:false /p:Configuration=Release src/SamplesApp/SamplesApp.Wasm/SamplesApp.Wasm.csproj /p:UnoSourceGeneratorUseGenerationHost=true /p:UnoSourceGeneratorUseGenerationController=false /bl:$(build.artifactstagingdirectory)/build-wasm-uitest-net6-$(GitVersion.FullSemVer).binlog - displayName: 'Build sample app (net6.0)' + displayName: 'Build sample app (net7.0)' - task: CopyFiles@2 - displayName: 'Publish Wasm Site (net6.0)' + displayName: 'Publish Wasm Site (net7.0)' inputs: - SourceFolder: $(build.sourcesdirectory)/src/SamplesApp/SamplesApp.Wasm/bin/Release/net6.0/dist + SourceFolder: $(build.sourcesdirectory)/src/SamplesApp/SamplesApp.Wasm/bin/Release/net7.0/dist Contents: '**/*.*' - TargetFolder: $(build.artifactstagingdirectory)/site-net6.0 + TargetFolder: $(build.artifactstagingdirectory)/site-net7.0 CleanTargetFolder: false OverWrite: false flattenFolders: false @@ -69,7 +69,7 @@ jobs: variables: NUGET_PACKAGES: $(build.sourcesdirectory)/.nuget - SITE_SUFFIX: 'net6.0' + SITE_SUFFIX: 'net7.0' steps: - checkout: self @@ -97,9 +97,9 @@ jobs: IFS=$'\n\t' dotnet tool uninstall dotnet-serve -g || true dotnet tool uninstall dotnet-serve --tool-path $BUILD_SOURCESDIRECTORY/build/tools || true - dotnet tool install dotnet-serve --version 1.8.15 --tool-path $BUILD_SOURCESDIRECTORY/build/tools || true + dotnet tool install dotnet-serve --version 1.10.140 --tool-path $BUILD_SOURCESDIRECTORY/build/tools || true export PATH="$PATH:$BUILD_SOURCESDIRECTORY/build/tools" - $BUILD_SOURCESDIRECTORY/build/tools/dotnet-serve -p 8000 -d "$BUILD_SOURCESDIRECTORY/build/wasm-uitest-binaries/site-net6.0" & + $BUILD_SOURCESDIRECTORY/build/tools/dotnet-serve -p 8000 -d "$BUILD_SOURCESDIRECTORY/build/wasm-uitest-binaries/site-net7.0" & cd $BUILD_SOURCESDIRECTORY/src/SamplesApp/SamplesApp.Wasm.UITests npm install node app @@ -137,32 +137,32 @@ jobs: strategy: matrix: - net6_default: - SITE_SUFFIX: 'net6.0' + net7_default: + SITE_SUFFIX: 'net7.0' UITEST_AUTOMATED_GROUP: 'Default' UITEST_TEST_TIMEOUT: '120000' - net6_benchmarks: - SITE_SUFFIX: 'net6.0' + net7_benchmarks: + SITE_SUFFIX: 'net7.0' UITEST_AUTOMATED_GROUP: 'Benchmarks' UITEST_TEST_TIMEOUT: '120000' - net6_runtimetests_group_00: - SITE_SUFFIX: 'net6.0' + net7_runtimetests_group_00: + SITE_SUFFIX: 'net7.0' UITEST_AUTOMATED_GROUP: 'RuntimeTests' UITEST_TEST_TIMEOUT: '1800000' UITEST_RUNTIME_TEST_GROUP: 0 UITEST_RUNTIME_TEST_GROUP_COUNT: 3 - net6_runtimetests_group_01: - SITE_SUFFIX: 'net6.0' + net7_runtimetests_group_01: + SITE_SUFFIX: 'net7.0' UITEST_AUTOMATED_GROUP: 'RuntimeTests' UITEST_TEST_TIMEOUT: '1800000' UITEST_RUNTIME_TEST_GROUP: 1 UITEST_RUNTIME_TEST_GROUP_COUNT: 3 - net6_runtimetests_group_02: - SITE_SUFFIX: 'net6.0' + net7_runtimetests_group_02: + SITE_SUFFIX: 'net7.0' UITEST_AUTOMATED_GROUP: 'RuntimeTests' UITEST_TEST_TIMEOUT: '1800000' UITEST_RUNTIME_TEST_GROUP: 2 diff --git a/build/ci/.azure-devops-winui-convert.yml b/build/ci/.azure-devops-winui-convert.yml index 41cd5a29b6d7..b0db87472b49 100644 --- a/build/ci/.azure-devops-winui-convert.yml +++ b/build/ci/.azure-devops-winui-convert.yml @@ -5,8 +5,7 @@ jobs: - job: winui_convert_tree displayName: 'WinUI Converted Tree Generation' - pool: - vmImage: ${{ parameters.vmImage }} + pool: ${{ parameters.poolName }} dependsOn: Pipeline_Validations @@ -29,6 +28,7 @@ jobs: nugetPackages: $(NUGET_PACKAGES) - template: templates/dotnet6-install-windows.yml + - template: templates/dotnet-install.yml - template: templates/install-windows-sdk.yml - powershell: | @@ -45,7 +45,7 @@ jobs: msbuildLocationMethod: version msbuildVersion: latest msbuildArchitecture: x86 - msbuildArguments: /r /m /t:RunAPISyncTool "/p:CombinedConfiguration=$(CombinedConfiguration)" /detailedsummary /bl:$(build.artifactstagingdirectory)\build-winui-convert.binlog + msbuildArguments: /r /m /v:m /t:RunAPISyncTool "/p:CombinedConfiguration=$(CombinedConfiguration)" /detailedsummary /bl:$(build.artifactstagingdirectory)\build-winui-convert.binlog clean: false restoreNugetPackages: false logProjectEvents: false diff --git a/build/ci/templates/dotnet-install.yml b/build/ci/templates/dotnet-install.yml index ab8d06037a38..c1f52dae2dd3 100644 --- a/build/ci/templates/dotnet-install.yml +++ b/build/ci/templates/dotnet-install.yml @@ -1,22 +1,16 @@ steps: - task: UseDotNet@2 - displayName: 'Use .NET Core SDK 6.0.300' + displayName: 'Use .NET Core SDK 6.0.401' retryCountOnTaskFailure: 3 inputs: packageType: sdk - version: 6.0.300 + version: 6.0.401 - task: UseDotNet@2 - displayName: 'Use .NET Core SDK 5.0.400' + displayName: 'Use .NET Core SDK 7.0.100-rc.1.22431.12' retryCountOnTaskFailure: 3 inputs: packageType: sdk - version: 5.0.400 - - - task: UseDotNet@2 - displayName: 'Use .NET Core SDK 3.1.406' - retryCountOnTaskFailure: 3 - inputs: - packageType: sdk - version: 3.1.406 + includePreviewVersions: true + version: 7.0.100-rc.1.22431.12 diff --git a/build/ci/templates/download-winui-converted-tree.yml b/build/ci/templates/download-winui-converted-tree.yml index 1cd3940b1981..301bba00e778 100644 --- a/build/ci/templates/download-winui-converted-tree.yml +++ b/build/ci/templates/download-winui-converted-tree.yml @@ -6,7 +6,7 @@ steps: displayName: Pre-cleanup for Restoring WinUI Converted Source Tree - task: DownloadPipelineArtifact@2 - displayName: Restoring WinUI Converted Source Rree + displayName: Restoring WinUI Converted Source Tree condition: and(succeeded(), eq(variables['UNO_UWP_BUILD'], 'false')) inputs: artifact: winui-converted-tree diff --git a/src/Uno.UI-packages-no-net6.slnf b/build/filters/Uno.UI-packages-no-net6.slnf similarity index 66% rename from src/Uno.UI-packages-no-net6.slnf rename to build/filters/Uno.UI-packages-no-net6.slnf index f56da542eb91..63d0b38c0e52 100644 --- a/src/Uno.UI-packages-no-net6.slnf +++ b/build/filters/Uno.UI-packages-no-net6.slnf @@ -1,13 +1,9 @@ { "solution": { - "path": "Uno.UI.sln", + "path": "..\\..\\src\\Uno.UI.sln", "projects": [ "..\\build\\Uno.UI.Build.csproj", - "AddIns\\Uno.UI.Lottie\\Uno.UI.Lottie.Skia.csproj", - "AddIns\\Uno.UI.Lottie\\Uno.UI.Lottie.Wasm.csproj", "AddIns\\Uno.UI.Lottie\\Uno.UI.Lottie.csproj", - "AddIns\\Uno.UI.MSAL\\Uno.UI.MSAL.Skia.csproj", - "AddIns\\Uno.UI.MSAL\\Uno.UI.MSAL.Wasm.csproj", "AddIns\\Uno.UI.MSAL\\Uno.UI.MSAL.csproj", "ResourceConverter\\ResourceConverter.csproj", "SolutionTemplate\\Uno.ProjectTemplates.Dotnet\\Uno.ProjectTemplates.Dotnet.csproj", @@ -33,65 +29,35 @@ "Uno.Analyzers\\Uno.Analyzers.csproj", "Uno.Foundation.Logging\\Uno.Foundation.Logging.csproj", "Uno.Foundation.Runtime.WebAssembly\\Uno.Foundation.Runtime.WebAssembly.csproj", - "Uno.Foundation\\Uno.Foundation.Skia.csproj", - "Uno.Foundation\\Uno.Foundation.Wasm.csproj", "Uno.Foundation\\Uno.Foundation.csproj", "Uno.NUnitTransformTool\\Uno.NUnitTransformTool.csproj", "Uno.ReferenceImplComparer\\Uno.ReferenceImplComparer.csproj", "Uno.UI.Adapter.Microsoft.Extensions.Logging\\Uno.UI.Adapter.Microsoft.Extensions.Logging.csproj", "Uno.UI.AssemblyComparer\\Uno.UI.AssemblyComparer.csproj", "Uno.UI.BindingHelper.Android\\Uno.UI.BindingHelper.Android.csproj", - "Uno.UI.Composition\\Uno.UI.Composition.Skia.csproj", - "Uno.UI.Composition\\Uno.UI.Composition.Wasm.csproj", "Uno.UI.Composition\\Uno.UI.Composition.csproj", - "Uno.UI.Dispatching\\Uno.UI.Dispatching.Skia.csproj", - "Uno.UI.Dispatching\\Uno.UI.Dispatching.Wasm.csproj", "Uno.UI.Dispatching\\Uno.UI.Dispatching.csproj", - "Uno.UI.FluentTheme.v1\\Uno.UI.FluentTheme.v1.Skia.csproj", - "Uno.UI.FluentTheme.v1\\Uno.UI.FluentTheme.v1.Wasm.csproj", "Uno.UI.FluentTheme.v1\\Uno.UI.FluentTheme.v1.csproj", - "Uno.UI.FluentTheme.v2\\Uno.UI.FluentTheme.v2.Skia.csproj", - "Uno.UI.FluentTheme.v2\\Uno.UI.FluentTheme.v2.Wasm.csproj", "Uno.UI.FluentTheme.v2\\Uno.UI.FluentTheme.v2.csproj", "Uno.UI.Foldable\\Uno.UI.Foldable.csproj", - "Uno.UI.FluentTheme\\Uno.UI.FluentTheme.Skia.csproj", - "Uno.UI.FluentTheme\\Uno.UI.FluentTheme.Wasm.csproj", "Uno.UI.FluentTheme\\Uno.UI.FluentTheme.csproj", - "Uno.UI.XamlHost.Skia.Wpf\\Uno.UI.XamlHost.Skia.Wpf.csproj", "Uno.UI.XamlHost\\Uno.UI.XamlHost.csproj", - "Uno.UI.XamlHost\\Uno.UI.XamlHost.Skia.csproj", - "Uno.UI.XamlHost\\Uno.UI.XamlHost.Wasm.csproj", "Uno.UI.Maps\\Uno.UI.Maps.csproj", "Uno.UI.RemoteControl.Host\\Uno.UI.RemoteControl.Host.csproj", "Uno.UI.RemoteControl.VS\\Uno.UI.RemoteControl.VS.csproj", - "Uno.UI.RemoteControl\\Uno.UI.RemoteControl.Skia.csproj", - "Uno.UI.RemoteControl\\Uno.UI.RemoteControl.Wasm.csproj", "Uno.UI.RemoteControl\\Uno.UI.RemoteControl.csproj", - "Uno.UI.Runtime.Skia.Gtk\\Uno.UI.Runtime.Skia.Gtk.csproj", - "Uno.UI.Runtime.Skia.Linux.FrameBuffer\\Uno.UI.Runtime.Skia.Linux.FrameBuffer.csproj", - "Uno.UI.Runtime.Skia.Tizen\\Uno.UI.Runtime.Skia.Tizen.csproj", - "Uno.UI.Runtime.Skia.Wpf\\Uno.UI.Runtime.Skia.Wpf.csproj", "Uno.UI.Runtime.WebAssembly.Compatibility\\Uno.UI.Runtime.WebAssembly.Compatibility.csproj", "Uno.UI.Runtime.WebAssembly\\Uno.UI.Runtime.WebAssembly.csproj", - "Uno.UI.RuntimeTests\\Uno.UI.RuntimeTests.Skia.csproj", - "Uno.UI.RuntimeTests\\Uno.UI.RuntimeTests.Wasm.csproj", "Uno.UI.RuntimeTests\\Uno.UI.RuntimeTests.csproj", "Uno.UI.TestComparer\\Uno.UI.TestComparer.csproj", "Uno.UI.Tests.Performance\\Uno.UI.Tests.Performance.csproj", "Uno.UI.Tests.ViewLibraryProps\\Uno.UI.Tests.ViewLibraryProps.csproj", "Uno.UI.Tests.ViewLibrary\\Uno.UI.Tests.ViewLibrary.csproj", "Uno.UI.Tests\\Uno.UI.Tests.csproj", - "Uno.UI.Toolkit\\Uno.UI.Toolkit.Skia.csproj", - "Uno.UI.Toolkit\\Uno.UI.Toolkit.Wasm.csproj", "Uno.UI.Toolkit\\Uno.UI.Toolkit.csproj", - "Uno.UI.Wasm.Tests\\Uno.UI.Wasm.Tests.csproj", - "Uno.UI\\Uno.UI.Skia.csproj", - "Uno.UI\\Uno.UI.Wasm.csproj", "Uno.UI\\Uno.UI.csproj", "Uno.UWPSyncGenerator.Reference\\Uno.UWPSyncGenerator.Reference.csproj", "Uno.UWPSyncGenerator\\Uno.UWPSyncGenerator.csproj", - "Uno.UWP\\Uno.Skia.csproj", - "Uno.UWP\\Uno.Wasm.csproj", "Uno.UWP\\Uno.csproj", "Uno.WinUIRevert\\Uno.WinUIRevert.csproj", "UnoItemTemplate\\UnoItemTemplate.csproj" diff --git a/build/filters/Uno.UI-packages-reference.slnf b/build/filters/Uno.UI-packages-reference.slnf new file mode 100644 index 000000000000..aea1eb53180f --- /dev/null +++ b/build/filters/Uno.UI-packages-reference.slnf @@ -0,0 +1,27 @@ +{ + "solution": { + "path": "..\\..\\src\\Uno.UI.sln", + "projects": [ + "AddIns\\Uno.UI.Lottie\\Uno.UI.Lottie.Reference.csproj", + "AddIns\\Uno.UI.MSAL\\Uno.UI.MSAL.Reference.csproj", + "SourceGenerators\\SourceGeneratorHelpers\\SourceGeneratorHelpers.shproj", + "SourceGenerators\\System.Xaml\\Uno.Xaml.Reference.csproj", + "SourceGenerators\\System.Xaml\\Uno.Xaml.csproj", + "SourceGenerators\\Uno.UI.SourceGenerators.Internal\\Uno.UI.SourceGenerators.Internal.csproj", + "SourceGenerators\\Uno.UI.SourceGenerators\\Uno.UI.SourceGenerators.csproj", + "SourceGenerators\\Uno.UI.Tasks\\Uno.UI.Tasks.csproj", + "Uno.Foundation.Logging\\Uno.Foundation.Logging.csproj", + "Uno.Foundation\\Uno.Foundation.Reference.csproj", + "Uno.UI.Composition\\Uno.UI.Composition.Reference.csproj", + "Uno.UI.Dispatching\\Uno.UI.Dispatching.Reference.csproj", + "Uno.UI.FluentTheme.v1\\Uno.UI.FluentTheme.v1.Reference.csproj", + "Uno.UI.FluentTheme.v2\\Uno.UI.FluentTheme.v2.Reference.csproj", + "Uno.UI.FluentTheme\\Uno.UI.FluentTheme.Reference.csproj", + "Uno.UI.RemoteControl\\Uno.UI.RemoteControl.Reference.csproj", + "Uno.UI.Toolkit\\Uno.UI.Toolkit.Reference.csproj", + "Uno.UI.XamlHost\\Uno.UI.XamlHost.Reference.csproj", + "Uno.UI\\Uno.UI.Reference.csproj", + "Uno.UWP\\Uno.Reference.csproj" + ] + } +} diff --git a/build/filters/Uno.UI-packages-skia.slnf b/build/filters/Uno.UI-packages-skia.slnf new file mode 100644 index 000000000000..b5b3d7d4c988 --- /dev/null +++ b/build/filters/Uno.UI-packages-skia.slnf @@ -0,0 +1,50 @@ +{ + "solution": { + "path": "..\\..\\src\\Uno.UI.sln", + "projects": [ + "AddIns\\Uno.UI.Lottie\\Uno.UI.Lottie.Skia.csproj", + "AddIns\\Uno.UI.MSAL\\Uno.UI.MSAL.Skia.csproj", + "SamplesApp\\Benchmarks.Shared\\SamplesApp.Benchmarks.shproj", + "SamplesApp\\SamplesApp.Shared\\SamplesApp.Shared.shproj", + "SamplesApp\\SamplesApp.Skia.Gtk\\SamplesApp.Skia.Gtk.csproj", + "SamplesApp\\SamplesApp.Skia.Linux.FrameBuffer\\SamplesApp.Skia.Linux.FrameBuffer.csproj", + "SamplesApp\\SamplesApp.Skia.Tizen\\SamplesApp.Skia.Tizen.csproj", + "SamplesApp\\SamplesApp.Skia.WPF\\SamplesApp.Skia.WPF.csproj", + "SamplesApp\\SamplesApp.Skia\\SamplesApp.Skia.csproj", + "SamplesApp\\SamplesApp.UITests.Generator\\Uno.Samples.UITest.Generator.csproj", + "SamplesApp\\SamplesApp.UITests\\SamplesApp.UITests.csproj", + "SamplesApp\\SamplesApp.UWP.Design\\SamplesApp.UWP.Design.csproj", + "SamplesApp\\SamplesApp.UnitTests.Shared\\SamplesApp.UnitTests.Shared.shproj", + "SamplesApp\\UITests.Shared\\UITests.Shared.shproj", + "SamplesApp\\UnoIslands.Shared\\UnoIslands.Shared.shproj", + "SamplesApp\\UnoIslands.Skia\\UnoIslands.Skia.csproj", + "SamplesApp\\UnoIslands.WPF\\UnoIslands.Skia.Wpf.csproj", + "SamplesApp\\UnoIslands.WinForms\\UnoIslands.WinForms.csproj", + "SourceGenerators\\System.Xaml\\Uno.Xaml.csproj", + "SourceGenerators\\Uno.UI.SourceGenerators.Internal\\Uno.UI.SourceGenerators.Internal.csproj", + "SourceGenerators\\Uno.UI.SourceGenerators\\Uno.UI.SourceGenerators.csproj", + "SourceGenerators\\Uno.UI.Tasks\\Uno.UI.Tasks.csproj", + "Uno.Foundation.Logging\\Uno.Foundation.Logging.csproj", + "Uno.Foundation\\Uno.Foundation.Skia.csproj", + "Uno.UI.Adapter.Microsoft.Extensions.Logging\\Uno.UI.Adapter.Microsoft.Extensions.Logging.csproj", + "Uno.UI.Composition\\Uno.UI.Composition.Skia.csproj", + "Uno.UI.Dispatching\\Uno.UI.Dispatching.Skia.csproj", + "Uno.UI.FluentTheme.v1\\Uno.UI.FluentTheme.v1.Skia.csproj", + "Uno.UI.FluentTheme.v2\\Uno.UI.FluentTheme.v2.Skia.csproj", + "Uno.UI.FluentTheme\\Uno.UI.FluentTheme.Skia.csproj", + "Uno.UI.RemoteControl\\Uno.UI.RemoteControl.Skia.csproj", + "Uno.UI.RemoteControl.Host\\Uno.UI.RemoteControl.Host.csproj", + "Uno.UI.RemoteControl.VS\\Uno.UI.RemoteControl.VS.csproj", + "Uno.UI.Runtime.Skia.Gtk\\Uno.UI.Runtime.Skia.Gtk.csproj", + "Uno.UI.Runtime.Skia.Linux.FrameBuffer\\Uno.UI.Runtime.Skia.Linux.FrameBuffer.csproj", + "Uno.UI.Runtime.Skia.Tizen\\Uno.UI.Runtime.Skia.Tizen.csproj", + "Uno.UI.Runtime.Skia.Wpf\\Uno.UI.Runtime.Skia.Wpf.csproj", + "Uno.UI.RuntimeTests\\Uno.UI.RuntimeTests.Skia.csproj", + "Uno.UI.Toolkit\\Uno.UI.Toolkit.Skia.csproj", + "Uno.UI.XamlHost.Skia.Wpf\\Uno.UI.XamlHost.Skia.Wpf.csproj", + "Uno.UI.XamlHost\\Uno.UI.XamlHost.Skia.csproj", + "Uno.UI\\Uno.UI.Skia.csproj", + "Uno.UWP\\Uno.Skia.csproj" + ] + } +} diff --git a/build/filters/Uno.UI-packages-wasm.slnf b/build/filters/Uno.UI-packages-wasm.slnf new file mode 100644 index 000000000000..1ecbf808fd36 --- /dev/null +++ b/build/filters/Uno.UI-packages-wasm.slnf @@ -0,0 +1,42 @@ +{ + "solution": { + "path": "..\\..\\src\\Uno.UI.sln", + "projects": [ + "AddIns\\Uno.UI.Lottie\\Uno.UI.Lottie.Wasm.csproj", + "AddIns\\Uno.UI.MSAL\\Uno.UI.MSAL.Wasm.csproj", + "SamplesApp\\Benchmarks.Shared\\SamplesApp.Benchmarks.shproj", + "SamplesApp\\SamplesApp.Shared\\SamplesApp.Shared.shproj", + "SamplesApp\\SamplesApp.UITests.Generator\\Uno.Samples.UITest.Generator.csproj", + "SamplesApp\\SamplesApp.UITests\\SamplesApp.UITests.csproj", + "SamplesApp\\SamplesApp.UnitTests.Shared\\SamplesApp.UnitTests.Shared.shproj", + "SamplesApp\\SamplesApp.Wasm\\SamplesApp.Wasm.csproj", + "SamplesApp\\UITests.Shared\\UITests.Shared.shproj", + "SourceGenerators\\System.Xaml\\Uno.Xaml.csproj", + "SourceGenerators\\Uno.UI.SourceGenerators.Internal\\Uno.UI.SourceGenerators.Internal.csproj", + "SourceGenerators\\Uno.UI.SourceGenerators\\Uno.UI.SourceGenerators.csproj", + "SourceGenerators\\Uno.UI.Tasks\\Uno.UI.Tasks.csproj", + "Uno.Foundation.Logging\\Uno.Foundation.Logging.csproj", + "Uno.Foundation.Runtime.WebAssembly\\Uno.Foundation.Runtime.WebAssembly.csproj", + "Uno.Foundation\\Uno.Foundation.Wasm.csproj", + "Uno.UI.Adapter.Microsoft.Extensions.Logging\\Uno.UI.Adapter.Microsoft.Extensions.Logging.csproj", + "Uno.UI.Composition\\Uno.UI.Composition.Wasm.csproj", + "Uno.UI.Dispatching\\Uno.UI.Dispatching.Wasm.csproj", + "Uno.UI.FluentTheme.v1\\Uno.UI.FluentTheme.v1.Wasm.csproj", + "Uno.UI.FluentTheme.v2\\Uno.UI.FluentTheme.v2.Wasm.csproj", + "Uno.UI.FluentTheme\\Uno.UI.FluentTheme.Wasm.csproj", + "Uno.UI.RemoteControl.Host\\Uno.UI.RemoteControl.Host.csproj", + "Uno.UI.RemoteControl.Server.Processors\\Uno.UI.RemoteControl.Server.Processors.csproj", + "Uno.UI.RemoteControl.Server\\Uno.UI.RemoteControl.Server.csproj", + "Uno.UI.RemoteControl.VS\\Uno.UI.RemoteControl.VS.csproj", + "Uno.UI.RemoteControl\\Uno.UI.RemoteControl.Wasm.csproj", + "Uno.UI.Runtime.WebAssembly.Compatibility\\Uno.UI.Runtime.WebAssembly.Compatibility.csproj", + "Uno.UI.Runtime.WebAssembly\\Uno.UI.Runtime.WebAssembly.csproj", + "Uno.UI.RuntimeTests\\Uno.UI.RuntimeTests.Wasm.csproj", + "Uno.UI.Toolkit\\Uno.UI.Toolkit.Wasm.csproj", + "Uno.UI.Wasm.Tests\\Uno.UI.Wasm.Tests.csproj", + "Uno.UI\\Uno.UI.Wasm.csproj", + "Uno.UWP\\Uno.Wasm.csproj", + "Uno.UI.XamlHost\\Uno.UI.XamlHost.Wasm.csproj" + ] + } +} diff --git a/build/test-scripts/run-net6-template-tests.ps1 b/build/test-scripts/run-net6-mobile-template-tests.ps1 similarity index 100% rename from build/test-scripts/run-net6-template-tests.ps1 rename to build/test-scripts/run-net6-mobile-template-tests.ps1 diff --git a/build/test-scripts/run-net7-template-linux.ps1 b/build/test-scripts/run-net7-template-linux.ps1 new file mode 100644 index 000000000000..bf82cb7faf88 --- /dev/null +++ b/build/test-scripts/run-net7-template-linux.ps1 @@ -0,0 +1,65 @@ +Set-PSDebug -Trace 1 + +$ErrorActionPreference = 'Stop' + +function Assert-ExitCodeIsZero() +{ + if ($LASTEXITCODE -ne 0) + { + throw "Exit code must be zero." + } +} + +function Get-TemplateConfiguration( + [bool]$mobile = $false, + [bool]$wasm = $false, + [bool]$skiaGtk = $false, + [bool]$skiaWpf = $false, + [bool]$skiaLinuxFB = $false, + [bool]$wasmVsCode = $false) +{ + $mobileFlag = '-mobile' + $iOSFlag = '-ios' + $macOSFlag = '-macos' + $wasmFlag = '-wasm' + $wasmVsCodeFlag = '--vscode' + $skiaWpfFlag = '--skia-wpf' + $skiaGtkFlag = '--skia-gtk' + $skiaLinuxFBFlag = '--skia-linux-fb' + + $a = If ($mobile) { $mobileFlag } Else { $mobileFlag + '=false' } + $d = If ($wasm) { $wasmFlag } Else { $wasmFlag + '=false' } + $e = If ($wasmVsCode) { $wasmVsCodeFlag } Else { $wasmVsCodeFlag + '=false' } + $f = If ($skiaWpf) { $skiaWpfFlag } Else { $skiaWpfFlag + '=false' } + $g = If ($skiaGtk) { $skiaGtkFlag } Else { $skiaGtkFlag + '=false' } + $h = If ($skiaLinuxFB) { $skiaLinuxFBFlag} Else { $skiaLinuxFBFlag + '=false' } + + @($a, $b, $c, $d, $e, $f, $g, $h) +} + +$default = @('-v', 'detailed', "-p:RestoreConfigFile=$env:NUGET_CI_CONFIG") + +$debug = $default + '-c' + 'Debug' +$release = $default + '-c' + 'Release' + +# WinUI +$createParams=(Get-TemplateConfiguration -wasm 1 -wasmVsCode 1 -skiaGtk 1 -skiaLinuxFB 1) +dotnet new unoapp -n UnoAppWinUI --framework net7.0 $createParams + +dotnet build $debug UnoAppWinUI/UnoAppWinUI.Wasm/UnoAppWinUI.Wasm.csproj +Assert-ExitCodeIsZero + +dotnet build $release UnoAppWinUI/UnoAppWinUI.Wasm/UnoAppWinUI.Wasm.csproj +Assert-ExitCodeIsZero + +dotnet build $debug UnoAppWinUI/UnoAppWinUI.Skia.Gtk/UnoAppWinUI.Skia.Gtk.csproj +Assert-ExitCodeIsZero + +dotnet build $release UnoAppWinUI/UnoAppWinUI.Skia.Gtk/UnoAppWinUI.Skia.Gtk.csproj +Assert-ExitCodeIsZero + +dotnet build $debug UnoAppWinUI/UnoAppWinUI.Skia.Linux.FrameBuffer/UnoAppWinUI.Skia.Linux.FrameBuffer.csproj +Assert-ExitCodeIsZero + +dotnet build $release UnoAppWinUI/UnoAppWinUI.Skia.Linux.FrameBuffer/UnoAppWinUI.Skia.Linux.FrameBuffer.csproj +Assert-ExitCodeIsZero diff --git a/build/test-scripts/wasm-run-automated-uitests.sh b/build/test-scripts/wasm-run-automated-uitests.sh index e6f24ae5844f..ab101c1df689 100755 --- a/build/test-scripts/wasm-run-automated-uitests.sh +++ b/build/test-scripts/wasm-run-automated-uitests.sh @@ -11,7 +11,7 @@ npm i puppeteer@14.1.0 # install dotnet serve / Remove as needed dotnet tool uninstall dotnet-serve -g || true dotnet tool uninstall dotnet-serve --tool-path $BUILD_SOURCESDIRECTORY/build/tools || true -dotnet tool install dotnet-serve --version 1.8.15 --tool-path $BUILD_SOURCESDIRECTORY/build/tools || true +dotnet tool install dotnet-serve --version 1.10.140 --tool-path $BUILD_SOURCESDIRECTORY/build/tools || true export PATH="$PATH:$BUILD_SOURCESDIRECTORY/build/tools" export UNO_UITEST_TARGETURI=http://localhost:8000 diff --git a/build/uno.winui.runtime-replace.targets b/build/uno.winui.runtime-replace.targets index cab70c6e183c..378130ea292b 100644 --- a/build/uno.winui.runtime-replace.targets +++ b/build/uno.winui.runtime-replace.targets @@ -5,6 +5,11 @@ + + <_UnoRuntimeTargetFramework>netstandard2.0 + <_UnoRuntimeTargetFramework Condition="'$(TargetFrameworkVersion)'!='' and '$(TargetFrameworkVersion.Substring(1))'>='7.0'">net7.0 + + @@ -18,12 +23,15 @@ Include="@(UnoRuntimeEnabledPackage)" Condition="'%(UnoRuntimeEnabledPackage.PackageBasePath)'==''" /> + - + + + + + + + + + + + - + netstandard2.0`, then open either the android or iOS solution filters, then build the `Uno.UI` project (and only this one, the other projects in the solution will fail to build). Doing this will generate the proper assemblies with the new APIs to be used in application or libraries using the cache override. +In order to update those reference assemblies, set `...` to `net7.0` or `netstandard2.0`, then open the `Uno.UI-Reference-Only.slnf` filter. You can now build the `Uno.UI` project. Doing this will generate the proper assemblies with the new APIs to be used in application or libraries using the nuget cache override. ### Using the Package Diff tool diff --git a/doc/articles/uno-development/creating-ui-tests.md b/doc/articles/uno-development/creating-ui-tests.md index 505478cc20e2..c868cff17a2b 100644 --- a/doc/articles/uno-development/creating-ui-tests.md +++ b/doc/articles/uno-development/creating-ui-tests.md @@ -17,7 +17,7 @@ UI tests contribute significantly to the CI build time, and for many purposes a ## Running UI tests locally 1. Ensure [your environment is configured](../get-started-vs.md) for the platform you want to run on. -1. Ensure `UnoTargetFrameworkOverride` is set to `MonoAndroid11.0` or `net6.0-android` for testing on Android, `xamarinios` or `net6.0-ios` for testing on iOS, and `netstandard2.0` for testing on Wasm. +1. Ensure `UnoTargetFrameworkOverride` is set to `MonoAndroid11.0` or `net6.0-android` for testing on Android, `xamarinios` or `net6.0-ios` for testing on iOS, and `net7.0` or `netstandard2.0` for testing on Wasm. 1. Open Uno.UI with the [correct target override and solution filter](building-uno-ui.md) for the platform you want to run on. 1. [Build and run the SamplesApp](working-with-the-samples-apps.md) at least once. 1. Only Android and WASM are supported from Visual Studio for Windows. (Running tests on iOS using a Mac is possible, see additional instructions below.) diff --git a/src/AddIns/Uno.UI.Lottie/Uno.UI.Lottie.Reference.csproj b/src/AddIns/Uno.UI.Lottie/Uno.UI.Lottie.Reference.csproj new file mode 100644 index 000000000000..30c0bd63e30d --- /dev/null +++ b/src/AddIns/Uno.UI.Lottie/Uno.UI.Lottie.Reference.csproj @@ -0,0 +1,91 @@ + + + + netstandard2.0 + + + + $(TargetFrameworks);net7.0 + + + + $(UnoTargetFrameworkOverride) + + + + $(NoWarn);NU1701;Uno0001 + true + true + enable + Uno.UI.Lottie + Uno.UI.Lottie + + $(DefineConstants);HAS_SKOTTIE + + Reference + + + + + + + + + build + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_OverrideTargetFramework>$(TargetFramework) + <_baseNugetPath Condition="'$(USERPROFILE)'!=''">$(USERPROFILE) + <_baseNugetPath Condition="'$(HOME)'!=''">$(HOME) + <_TargetNugetFolder>$(_baseNugetPath)\.nuget\packages\Uno.UI.Lottie\$(UnoNugetOverrideVersion)\lib\$(_OverrideTargetFramework) + + + <_OutputFiles Include="$(TargetDir)**" /> + + + + + + + + + diff --git a/src/AddIns/Uno.UI.Lottie/Uno.UI.Lottie.Skia.csproj b/src/AddIns/Uno.UI.Lottie/Uno.UI.Lottie.Skia.csproj index 648e6862735a..7aff2b95da82 100644 --- a/src/AddIns/Uno.UI.Lottie/Uno.UI.Lottie.Skia.csproj +++ b/src/AddIns/Uno.UI.Lottie/Uno.UI.Lottie.Skia.csproj @@ -3,6 +3,10 @@ netstandard2.0 + + $(TargetFrameworks);net7.0 + + @@ -27,6 +31,10 @@ + + + + diff --git a/src/AddIns/Uno.UI.Lottie/Uno.UI.Lottie.Wasm.csproj b/src/AddIns/Uno.UI.Lottie/Uno.UI.Lottie.Wasm.csproj index 15035a109139..e7aa91502122 100644 --- a/src/AddIns/Uno.UI.Lottie/Uno.UI.Lottie.Wasm.csproj +++ b/src/AddIns/Uno.UI.Lottie/Uno.UI.Lottie.Wasm.csproj @@ -3,6 +3,10 @@ netstandard2.0 + + $(TargetFrameworks);net7.0 + + diff --git a/src/AddIns/Uno.UI.MSAL/Uno.UI.MSAL.Reference.csproj b/src/AddIns/Uno.UI.MSAL/Uno.UI.MSAL.Reference.csproj new file mode 100644 index 000000000000..bd4e4d1a6eb4 --- /dev/null +++ b/src/AddIns/Uno.UI.MSAL/Uno.UI.MSAL.Reference.csproj @@ -0,0 +1,92 @@ + + + + netstandard2.0 + + + + $(TargetFrameworks);net7.0 + + + + $(UnoTargetFrameworkOverride) + + + + $(NoWarn);NU1701;NU5100;NU5118;NU5128 + true + true + Uno.UI.MSAL + Uno.UI.MSAL + + + $(NoWarn);NU1703 + + + + nventive + https://github.com/unoplatform/uno + uno.png + https://github.com/unoplatform/uno + This package provides the extensions to MSAL (Microsoft.Identity.Client) for an Uno Platform application. + Copyright (C) 2015-2020 nventive inc. - all rights reserved + + Uno.UI.MSAL + Uno.WinUI.MSAL + + Reference + + + + + + + + + + + + + true + buildTransitive + + + + + + + + + + + + + + + + + + + <_OverrideTargetFramework>$(TargetFramework) + <_baseNugetPath Condition="'$(USERPROFILE)'!=''">$(USERPROFILE) + <_baseNugetPath Condition="'$(HOME)'!=''">$(HOME) + <_TargetNugetFolder>$(_baseNugetPath)\.nuget\packages\Uno.UI.MSAL\$(UnoNugetOverrideVersion)\lib\$(_OverrideTargetFramework) + + + <_OutputFiles Include="$(TargetDir)**" /> + + + + + + + + + + + + + diff --git a/src/AddIns/Uno.UI.MSAL/Uno.UI.MSAL.Skia.csproj b/src/AddIns/Uno.UI.MSAL/Uno.UI.MSAL.Skia.csproj index 850ec9a5bc34..87b67ebcfdaa 100644 --- a/src/AddIns/Uno.UI.MSAL/Uno.UI.MSAL.Skia.csproj +++ b/src/AddIns/Uno.UI.MSAL/Uno.UI.MSAL.Skia.csproj @@ -3,6 +3,10 @@ netstandard2.0 + + $(TargetFrameworks);net7.0 + + diff --git a/src/AddIns/Uno.UI.MSAL/Uno.UI.MSAL.Wasm.csproj b/src/AddIns/Uno.UI.MSAL/Uno.UI.MSAL.Wasm.csproj index 1c6278b9afe9..e02fbcb88b56 100644 --- a/src/AddIns/Uno.UI.MSAL/Uno.UI.MSAL.Wasm.csproj +++ b/src/AddIns/Uno.UI.MSAL/Uno.UI.MSAL.Wasm.csproj @@ -3,9 +3,17 @@ netstandard2.0 + + $(TargetFrameworks);net7.0 + + + + $(TargetFrameworks);net7.0 + + $(NoWarn);NU1701 true diff --git a/src/AddIns/Uno.UI.MSAL/WasmHttpFactory.wasm.cs b/src/AddIns/Uno.UI.MSAL/WasmHttpFactory.wasm.cs index a564485be8f0..0818232cf0a7 100644 --- a/src/AddIns/Uno.UI.MSAL/WasmHttpFactory.wasm.cs +++ b/src/AddIns/Uno.UI.MSAL/WasmHttpFactory.wasm.cs @@ -8,6 +8,6 @@ internal class WasmHttpFactory : IMsalHttpClientFactory { public static readonly WasmHttpFactory Instance = new WasmHttpFactory(); - public HttpClient GetHttpClient() => new HttpClient(new WasmHttpHandler()); + public HttpClient GetHttpClient() => new HttpClient(); } } diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 3a94091e9704..9e043fe9f4cd 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -64,43 +64,54 @@ <_AdjustedOutputProjects>$(_AdjustedOutputProjects);Uno.Foundation.Skia.csproj <_AdjustedOutputProjects>$(_AdjustedOutputProjects);Uno.Foundation.Wasm.csproj <_AdjustedOutputProjects>$(_AdjustedOutputProjects);Uno.Foundation.net6.csproj + <_AdjustedOutputProjects>$(_AdjustedOutputProjects);Uno.Foundation.Reference.csproj <_AdjustedOutputProjects>$(_AdjustedOutputProjects);Uno.Skia.csproj <_AdjustedOutputProjects>$(_AdjustedOutputProjects);Uno.Wasm.csproj <_AdjustedOutputProjects>$(_AdjustedOutputProjects);Uno.net6.csproj + <_AdjustedOutputProjects>$(_AdjustedOutputProjects);Uno.Reference.csproj <_AdjustedOutputProjects>$(_AdjustedOutputProjects);Uno.UI.Skia.csproj <_AdjustedOutputProjects>$(_AdjustedOutputProjects);Uno.UI.Wasm.csproj <_AdjustedOutputProjects>$(_AdjustedOutputProjects);Uno.UI.net6.csproj + <_AdjustedOutputProjects>$(_AdjustedOutputProjects);Uno.UI.Reference.csproj <_AdjustedOutputProjects>$(_AdjustedOutputProjects);Uno.UI.RuntimeTests.Wasm.csproj <_AdjustedOutputProjects>$(_AdjustedOutputProjects);Uno.UI.RuntimeTests.Skia.csproj <_AdjustedOutputProjects>$(_AdjustedOutputProjects);Uno.UI.RuntimeTests.net6.csproj <_AdjustedOutputProjects>$(_AdjustedOutputProjects);Uno.UI.MSAL.Wasm.csproj <_AdjustedOutputProjects>$(_AdjustedOutputProjects);Uno.UI.MSAL.Skia.csproj <_AdjustedOutputProjects>$(_AdjustedOutputProjects);Uno.UI.MSAL.net6.csproj + <_AdjustedOutputProjects>$(_AdjustedOutputProjects);Uno.UI.MSAL.Reference.csproj <_AdjustedOutputProjects>$(_AdjustedOutputProjects);Uno.UI.Lottie.Wasm.csproj <_AdjustedOutputProjects>$(_AdjustedOutputProjects);Uno.UI.Lottie.Skia.csproj <_AdjustedOutputProjects>$(_AdjustedOutputProjects);Uno.UI.Lottie.net6.csproj + <_AdjustedOutputProjects>$(_AdjustedOutputProjects);Uno.UI.Lottie.Reference.csproj <_AdjustedOutputProjects>$(_AdjustedOutputProjects);Uno.UI.RemoteControl.Wasm.csproj <_AdjustedOutputProjects>$(_AdjustedOutputProjects);Uno.UI.RemoteControl.Skia.csproj <_AdjustedOutputProjects>$(_AdjustedOutputProjects);Uno.UI.RemoteControl.net6.csproj + <_AdjustedOutputProjects>$(_AdjustedOutputProjects);Uno.UI.RemoteControl.Reference.csproj <_AdjustedOutputProjects>$(_AdjustedOutputProjects);Uno.UI.Toolkit.Wasm.csproj <_AdjustedOutputProjects>$(_AdjustedOutputProjects);Uno.UI.Toolkit.Skia.csproj <_AdjustedOutputProjects>$(_AdjustedOutputProjects);Uno.UI.Toolkit.net6.csproj + <_AdjustedOutputProjects>$(_AdjustedOutputProjects);Uno.UI.Toolkit.Reference.csproj <_AdjustedOutputProjects>$(_AdjustedOutputProjects);Uno.UI.Foldable.net6.csproj <_AdjustedOutputProjects>$(_AdjustedOutputProjects);Uno.UI.FluentTheme.Wasm.csproj <_AdjustedOutputProjects>$(_AdjustedOutputProjects);Uno.UI.FluentTheme.Skia.csproj <_AdjustedOutputProjects>$(_AdjustedOutputProjects);Uno.UI.FluentTheme.net6.csproj + <_AdjustedOutputProjects>$(_AdjustedOutputProjects);Uno.UI.FluentTheme.Reference.csproj <_AdjustedOutputProjects>$(_AdjustedOutputProjects);Uno.UI.FluentTheme.v1.Wasm.csproj <_AdjustedOutputProjects>$(_AdjustedOutputProjects);Uno.UI.FluentTheme.v1.Skia.csproj <_AdjustedOutputProjects>$(_AdjustedOutputProjects);Uno.UI.FluentTheme.v1.net6.csproj + <_AdjustedOutputProjects>$(_AdjustedOutputProjects);Uno.UI.FluentTheme.v1.Reference.csproj <_AdjustedOutputProjects>$(_AdjustedOutputProjects);Uno.UI.FluentTheme.v2.Wasm.csproj <_AdjustedOutputProjects>$(_AdjustedOutputProjects);Uno.UI.FluentTheme.v2.Skia.csproj <_AdjustedOutputProjects>$(_AdjustedOutputProjects);Uno.UI.FluentTheme.v2.net6.csproj + <_AdjustedOutputProjects>$(_AdjustedOutputProjects);Uno.UI.FluentTheme.v2.Reference.csproj <_AdjustedOutputProjects>$(_AdjustedOutputProjects);Uno.Xaml.net6.csproj + <_AdjustedOutputProjects>$(_AdjustedOutputProjects);Uno.Xaml.Reference.csproj <_AdjustedOutputProjects>$(_AdjustedOutputProjects);Uno.UI.Adapter.Microsoft.Extensions.Logging.csproj <_AdjustedOutputProjects>$(_AdjustedOutputProjects);Uno.UI.Adapter.Microsoft.Extensions.Logging.net6.csproj @@ -112,16 +123,19 @@ <_AdjustedOutputProjects>$(_AdjustedOutputProjects);Uno.UI.Dispatching.net6.csproj <_AdjustedOutputProjects>$(_AdjustedOutputProjects);Uno.UI.Dispatching.Skia.csproj <_AdjustedOutputProjects>$(_AdjustedOutputProjects);Uno.UI.Dispatching.Wasm.csproj + <_AdjustedOutputProjects>$(_AdjustedOutputProjects);Uno.UI.Dispatching.Reference.csproj <_AdjustedOutputProjects>$(_AdjustedOutputProjects);Uno.UI.Composition.csproj <_AdjustedOutputProjects>$(_AdjustedOutputProjects);Uno.UI.Composition.net6.csproj <_AdjustedOutputProjects>$(_AdjustedOutputProjects);Uno.UI.Composition.Skia.csproj <_AdjustedOutputProjects>$(_AdjustedOutputProjects);Uno.UI.Composition.Wasm.csproj + <_AdjustedOutputProjects>$(_AdjustedOutputProjects);Uno.UI.Composition.Reference.csproj <_AdjustedOutputProjects>$(_AdjustedOutputProjects);Uno.UI.XamlHost.csproj <_AdjustedOutputProjects>$(_AdjustedOutputProjects);Uno.UI.XamlHost.net6.csproj <_AdjustedOutputProjects>$(_AdjustedOutputProjects);Uno.UI.XamlHost.Skia.csproj <_AdjustedOutputProjects>$(_AdjustedOutputProjects);Uno.UI.XamlHost.Wasm.csproj + <_AdjustedOutputProjects>$(_AdjustedOutputProjects);Uno.UI.XamlHost.Reference.csproj diff --git a/src/Directory.Build.targets b/src/Directory.Build.targets index e471f18581ef..5904f1481f00 100644 --- a/src/Directory.Build.targets +++ b/src/Directory.Build.targets @@ -50,8 +50,8 @@ - - + + diff --git a/src/PlatformItemGroups.props b/src/PlatformItemGroups.props index f702df5e5d90..815c555d9848 100644 --- a/src/PlatformItemGroups.props +++ b/src/PlatformItemGroups.props @@ -17,7 +17,7 @@ <_IsNet Condition="'$(TargetFramework)'=='net461'">true <_IsNetCore>false - <_IsNetCore Condition="'$(TargetFramework)'=='net5.0'">true + <_IsNetCore Condition="'$(TargetFramework)'=='net5.0' or '$(TargetFramework)'=='net6.0' or '$(TargetFramework)'=='net7.0'">true <_IsNetStd>false <_IsNetStd Condition="'$(TargetFramework)'=='netstandard2.0' or $(_IsNetCore)">true diff --git a/src/SamplesApp/SamplesApp.Shared/Samples/UnitTests/HttpUnitTests.xaml b/src/SamplesApp/SamplesApp.Shared/Samples/UnitTests/HttpUnitTests.xaml index 41211285c72a..3eca35977327 100644 --- a/src/SamplesApp/SamplesApp.Shared/Samples/UnitTests/HttpUnitTests.xaml +++ b/src/SamplesApp/SamplesApp.Shared/Samples/UnitTests/HttpUnitTests.xaml @@ -9,7 +9,7 @@ Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"> - + diff --git a/src/SamplesApp/SamplesApp.Skia.Gtk/SamplesApp.Skia.Gtk.csproj b/src/SamplesApp/SamplesApp.Skia.Gtk/SamplesApp.Skia.Gtk.csproj index 0b3241fdea10..82e1023e1db0 100644 --- a/src/SamplesApp/SamplesApp.Skia.Gtk/SamplesApp.Skia.Gtk.csproj +++ b/src/SamplesApp/SamplesApp.Skia.Gtk/SamplesApp.Skia.Gtk.csproj @@ -4,10 +4,18 @@ Major + + $(TargetFrameworks);net7.0 + + netcoreapp3.1 + + net7.0 + + $(UnoTargetFrameworkOverride) diff --git a/src/SamplesApp/SamplesApp.Skia.WPF/SamplesApp.Skia.WPF.csproj b/src/SamplesApp/SamplesApp.Skia.WPF/SamplesApp.Skia.WPF.csproj index 6fecb7566ed4..6b4e708bd318 100644 --- a/src/SamplesApp/SamplesApp.Skia.WPF/SamplesApp.Skia.WPF.csproj +++ b/src/SamplesApp/SamplesApp.Skia.WPF/SamplesApp.Skia.WPF.csproj @@ -1,13 +1,17 @@  - net5.0-windows + net6.0-windows Major + + net7.0-windows + + <_Parameter1>false @@ -51,7 +55,14 @@ - + + + + + + + + diff --git a/src/SamplesApp/SamplesApp.Skia/SamplesApp.Skia.csproj b/src/SamplesApp/SamplesApp.Skia/SamplesApp.Skia.csproj index d749cfb266d3..2926a17102cc 100644 --- a/src/SamplesApp/SamplesApp.Skia/SamplesApp.Skia.csproj +++ b/src/SamplesApp/SamplesApp.Skia/SamplesApp.Skia.csproj @@ -3,6 +3,10 @@ netstandard2.0;net5.0 + + $(TargetFrameworks);net7.0 + + $(UnoTargetFrameworkOverride) @@ -11,7 +15,8 @@ $(DefineConstants);__SKIA__;HAS_UNO;UNO_REFERENCE_API true Skia - + true + diff --git a/src/SamplesApp/SamplesApp.Wasm/SamplesApp.Wasm.csproj b/src/SamplesApp/SamplesApp.Wasm/SamplesApp.Wasm.csproj index b2216958fd9c..45842c870059 100644 --- a/src/SamplesApp/SamplesApp.Wasm/SamplesApp.Wasm.csproj +++ b/src/SamplesApp/SamplesApp.Wasm/SamplesApp.Wasm.csproj @@ -1,8 +1,15 @@ + + net6.0 + + + + net7.0 + + Exe - net6.0 $(DefineConstants);__WASM__;HAS_UNO;UNO_REFERENCE_API $(NoWarn);NU1701;CS1998;NU1504;UXAML0002 true @@ -62,7 +69,6 @@ - @@ -74,7 +80,7 @@ - + diff --git a/src/SamplesApp/UITests.Shared/Microsoft_UI_Xaml_Controls/BreadcrumbTests/BreadcrumbBarPage.xaml.cs b/src/SamplesApp/UITests.Shared/Microsoft_UI_Xaml_Controls/BreadcrumbTests/BreadcrumbBarPage.xaml.cs index 79306c5afad5..f934612f84c8 100644 --- a/src/SamplesApp/UITests.Shared/Microsoft_UI_Xaml_Controls/BreadcrumbTests/BreadcrumbBarPage.xaml.cs +++ b/src/SamplesApp/UITests.Shared/Microsoft_UI_Xaml_Controls/BreadcrumbTests/BreadcrumbBarPage.xaml.cs @@ -1,5 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. +#pragma warning disable CS0105 // duplicate namespace because of WinUI source conversion using Windows.UI.Xaml; using Windows.UI.Xaml.Controls; diff --git a/src/SamplesApp/UITests.Shared/Microsoft_UI_Xaml_Controls/InfoBarTests/InfoBarPage.xaml.cs b/src/SamplesApp/UITests.Shared/Microsoft_UI_Xaml_Controls/InfoBarTests/InfoBarPage.xaml.cs index 39694eb98f54..0795211c4b4f 100644 --- a/src/SamplesApp/UITests.Shared/Microsoft_UI_Xaml_Controls/InfoBarTests/InfoBarPage.xaml.cs +++ b/src/SamplesApp/UITests.Shared/Microsoft_UI_Xaml_Controls/InfoBarTests/InfoBarPage.xaml.cs @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. // MUX Reference InfoBarPage.xaml.cs, commit b424312 +#pragma warning disable CS0105 // duplicate namespace because of WinUI source conversion using System; using Windows.UI; diff --git a/src/SamplesApp/UITests.Shared/Microsoft_UI_Xaml_Controls/NavigationViewTests/FluentStyle/NavigationViewSample.xaml.cs b/src/SamplesApp/UITests.Shared/Microsoft_UI_Xaml_Controls/NavigationViewTests/FluentStyle/NavigationViewSample.xaml.cs index 7c5b90e14fc2..31c216c2e38f 100644 --- a/src/SamplesApp/UITests.Shared/Microsoft_UI_Xaml_Controls/NavigationViewTests/FluentStyle/NavigationViewSample.xaml.cs +++ b/src/SamplesApp/UITests.Shared/Microsoft_UI_Xaml_Controls/NavigationViewTests/FluentStyle/NavigationViewSample.xaml.cs @@ -20,7 +20,9 @@ namespace SamplesApp.Samples.Microsoft_UI_Xaml_Controls.NavigationViewTests.Flue /// An empty page that can be used on its own or navigated to within a Frame. /// [SampleControlInfo("NavigationView", "FluentStyle_NavigationViewSample")] +#pragma warning disable UXAML0002 // does not explicitly define the Windows.UI.Xaml.Controls.UserControl base type in code behind. public sealed partial class FluentStyle_NavigationViewSample +#pragma warning restore UXAML0002 // does not explicitly define the Windows.UI.Xaml.Controls.UserControl base type in code behind. { public FluentStyle_NavigationViewSample() { diff --git a/src/SamplesApp/UITests.Shared/Microsoft_UI_Xaml_Controls/NumberBoxTests/NumberBoxPage.xaml.cs b/src/SamplesApp/UITests.Shared/Microsoft_UI_Xaml_Controls/NumberBoxTests/NumberBoxPage.xaml.cs index 590badbe8be3..554efa7e6dfc 100644 --- a/src/SamplesApp/UITests.Shared/Microsoft_UI_Xaml_Controls/NumberBoxTests/NumberBoxPage.xaml.cs +++ b/src/SamplesApp/UITests.Shared/Microsoft_UI_Xaml_Controls/NumberBoxTests/NumberBoxPage.xaml.cs @@ -1,4 +1,6 @@ -using System; +#pragma warning disable CS0105 // duplicate namespace because of WinUI source conversion + +using System; using System.Collections.Generic; using System.ComponentModel; using Microsoft.UI.Xaml.Controls; diff --git a/src/SamplesApp/UITests.Shared/Microsoft_UI_Xaml_Controls/PipsPagerTests/PipsPagerPage.xaml.cs b/src/SamplesApp/UITests.Shared/Microsoft_UI_Xaml_Controls/PipsPagerTests/PipsPagerPage.xaml.cs index 61a030fa97ea..300ee5fbeb37 100644 --- a/src/SamplesApp/UITests.Shared/Microsoft_UI_Xaml_Controls/PipsPagerTests/PipsPagerPage.xaml.cs +++ b/src/SamplesApp/UITests.Shared/Microsoft_UI_Xaml_Controls/PipsPagerTests/PipsPagerPage.xaml.cs @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. // MUX reference PipsPagerPage.xaml.cs, commit fc2d862 +#pragma warning disable CS0105 // duplicate namespace because of WinUI source conversion using System; using Windows.UI.Xaml.Controls; diff --git a/src/SamplesApp/UITests.Shared/Microsoft_UI_Xaml_Controls/TreeView/TreeView_ItemInvoked.xaml.cs b/src/SamplesApp/UITests.Shared/Microsoft_UI_Xaml_Controls/TreeView/TreeView_ItemInvoked.xaml.cs index b9d57f66e9a7..eb597a831932 100644 --- a/src/SamplesApp/UITests.Shared/Microsoft_UI_Xaml_Controls/TreeView/TreeView_ItemInvoked.xaml.cs +++ b/src/SamplesApp/UITests.Shared/Microsoft_UI_Xaml_Controls/TreeView/TreeView_ItemInvoked.xaml.cs @@ -1,4 +1,6 @@ -using System; +#pragma warning disable CS0105 // duplicate namespace because of WinUI source conversion + +using System; using System.Collections.Generic; using System.IO; using System.Linq; diff --git a/src/SamplesApp/UITests.Shared/Msal/MsalLoginAndGraph.xaml.cs b/src/SamplesApp/UITests.Shared/Msal/MsalLoginAndGraph.xaml.cs index ed96bbf46741..68b1bde4aa3f 100644 --- a/src/SamplesApp/UITests.Shared/Msal/MsalLoginAndGraph.xaml.cs +++ b/src/SamplesApp/UITests.Shared/Msal/MsalLoginAndGraph.xaml.cs @@ -62,11 +62,7 @@ private async void SignIn(object sender, RoutedEventArgs e) private async void LoadFromGraph(object sender, RoutedEventArgs e) { -#if __WASM__ - var http = new HttpClient(new Uno.UI.Wasm.WasmHttpHandler()); -#else var http = new HttpClient(); -#endif var httpClient = http; var client = new GraphServiceClient(httpClient); client.AuthenticationProvider = this; diff --git a/src/SamplesApp/UITests.Shared/Windows_UI_Xaml_Controls/ImageTests/BitmapImage_vs_SvgImageSource.cs b/src/SamplesApp/UITests.Shared/Windows_UI_Xaml_Controls/ImageTests/BitmapImage_vs_SvgImageSource.cs index c560f4765a25..c28424394b96 100644 --- a/src/SamplesApp/UITests.Shared/Windows_UI_Xaml_Controls/ImageTests/BitmapImage_vs_SvgImageSource.cs +++ b/src/SamplesApp/UITests.Shared/Windows_UI_Xaml_Controls/ImageTests/BitmapImage_vs_SvgImageSource.cs @@ -140,11 +140,7 @@ void Log(string msg) private async Task GetStream() { -#if __WASM__ - using var httpClient = new HttpClient(new Uno.UI.Wasm.WasmHttpHandler()); -#else using var httpClient = new HttpClient(); -#endif var data = await httpClient.GetByteArrayAsync(url.Text); return new MemoryStream(data).AsRandomAccessStream(); diff --git a/src/SamplesApp/UITests.Shared/Windows_UI_Xaml_Controls/ImageTests/ImageSourceStream.xaml.cs b/src/SamplesApp/UITests.Shared/Windows_UI_Xaml_Controls/ImageTests/ImageSourceStream.xaml.cs index f9c925bbb859..c504f13ede8c 100644 --- a/src/SamplesApp/UITests.Shared/Windows_UI_Xaml_Controls/ImageTests/ImageSourceStream.xaml.cs +++ b/src/SamplesApp/UITests.Shared/Windows_UI_Xaml_Controls/ImageTests/ImageSourceStream.xaml.cs @@ -35,11 +35,7 @@ private async void OnLoaded(object sender, RoutedEventArgs e) private static async Task GetStream(string url) { -#if __WASM__ - using var httpClient = new HttpClient(new Uno.UI.Wasm.WasmHttpHandler()); -#else using var httpClient = new HttpClient(); -#endif var data = await httpClient.GetByteArrayAsync(url); return new MemoryStream(data).AsRandomAccessStream(); diff --git a/src/SamplesApp/UITests.Shared/Windows_UI_Xaml_Controls/NavigationViewTests/NavigationViewSample.xaml.cs b/src/SamplesApp/UITests.Shared/Windows_UI_Xaml_Controls/NavigationViewTests/NavigationViewSample.xaml.cs index cdf8a1a3e7dd..62c962d6e18b 100644 --- a/src/SamplesApp/UITests.Shared/Windows_UI_Xaml_Controls/NavigationViewTests/NavigationViewSample.xaml.cs +++ b/src/SamplesApp/UITests.Shared/Windows_UI_Xaml_Controls/NavigationViewTests/NavigationViewSample.xaml.cs @@ -20,7 +20,9 @@ namespace SamplesApp.Samples.NavigationViewSample /// An empty page that can be used on its own or navigated to within a Frame. /// [SampleControlInfo("NavigationView", "NavigationViewSample")] +#pragma warning disable UXAML0002 // does not explicitly define the Windows.UI.Xaml.Controls.UserControl base type in code behind. public sealed partial class NavigationViewSample +#pragma warning restore UXAML0002 // does not explicitly define the Windows.UI.Xaml.Controls.UserControl base type in code behind. { public NavigationViewSample() { diff --git a/src/SamplesApp/UITests.Shared/Windows_UI_Xaml_Controls/PersonPictureTests/PersonPicturePage.xaml.cs b/src/SamplesApp/UITests.Shared/Windows_UI_Xaml_Controls/PersonPictureTests/PersonPicturePage.xaml.cs index 1f1fcf4c6624..3954c4c20e66 100644 --- a/src/SamplesApp/UITests.Shared/Windows_UI_Xaml_Controls/PersonPictureTests/PersonPicturePage.xaml.cs +++ b/src/SamplesApp/UITests.Shared/Windows_UI_Xaml_Controls/PersonPictureTests/PersonPicturePage.xaml.cs @@ -19,9 +19,11 @@ namespace MUXControlsTestApp { [Sample("MUX","PersonPicture")] +#pragma warning disable UXAML0002 // does not explicitly define the Windows.UI.Xaml.Controls.UserControl base type in code behind. public sealed partial class PersonPicturePage - { - private Uri imageUri = new Uri("ms-appx:///Assets/ingredient2.png"); +#pragma warning restore UXAML0002 // does not explicitly define the Windows.UI.Xaml.Controls.UserControl base type in code behind. + { + private Uri imageUri = new Uri("ms-appx:///Assets/ingredient2.png"); private bool primaryEllipseLoaded = false; public PersonPicturePage() diff --git a/src/SamplesApp/UITests.Shared/Windows_UI_Xaml_Media/ImageBrushTests/ImageBrush_StreamSource.xaml.cs b/src/SamplesApp/UITests.Shared/Windows_UI_Xaml_Media/ImageBrushTests/ImageBrush_StreamSource.xaml.cs index dcd0c424d4fe..164e5388fa9f 100644 --- a/src/SamplesApp/UITests.Shared/Windows_UI_Xaml_Media/ImageBrushTests/ImageBrush_StreamSource.xaml.cs +++ b/src/SamplesApp/UITests.Shared/Windows_UI_Xaml_Media/ImageBrushTests/ImageBrush_StreamSource.xaml.cs @@ -37,11 +37,7 @@ public ImageBrush_StreamSource() this.RunWhileLoaded(async ct => { -#if __WASM__ - using var httpClient = new HttpClient(new Uno.UI.Wasm.WasmHttpHandler()); -#else using var httpClient = new HttpClient(); -#endif const string imageUrl = "https://nv-assets.azurewebsites.net/tests/images/uno-overalls.jpg"; var data = await httpClient.GetByteArrayAsync(imageUrl); diff --git a/src/SolutionTemplate/Uno.ProjectTemplates.Dotnet/Uno.ProjectTemplates.Dotnet.csproj b/src/SolutionTemplate/Uno.ProjectTemplates.Dotnet/Uno.ProjectTemplates.Dotnet.csproj index b4d8f5ed9f4a..4150150d5868 100644 --- a/src/SolutionTemplate/Uno.ProjectTemplates.Dotnet/Uno.ProjectTemplates.Dotnet.csproj +++ b/src/SolutionTemplate/Uno.ProjectTemplates.Dotnet/Uno.ProjectTemplates.Dotnet.csproj @@ -88,7 +88,7 @@ <_UnoAppTemplateFilesExclude Include="..\UnoSolutionTemplate\**\*.vstemplate" /> - <_UnoAppTemplateFilesExclude Include="..\UnoSolutionTemplate\__*.png" /> + <_UnoAppTemplateFilesExclude Include="..\UnoSolutionTemplate\**\__*.png" /> <_UnoAppTemplateFilesExclude Include="..\UnoSolutionTemplate\**\obj\**" /> <_UnoAppTemplateFilesExclude Include="..\UnoSolutionTemplate\**\bin\**" /> <_UnoAppTemplateFilesExclude Include="..\UnoSolutionTemplate\Properties\**" /> @@ -99,7 +99,7 @@ <_UnoAppnet6UWPTemplateFilesExclude Include="..\UnoSolutionTemplate.net6\**\*.vstemplate" /> - <_UnoAppnet6UWPTemplateFilesExclude Include="..\UnoSolutionTemplate.net6\__*.png" /> + <_UnoAppnet6UWPTemplateFilesExclude Include="..\UnoSolutionTemplate.net6\**\__*.png" /> <_UnoAppnet6UWPTemplateFilesExclude Include="..\UnoSolutionTemplate.net6\**\obj\**" /> <_UnoAppnet6UWPTemplateFilesExclude Include="..\UnoSolutionTemplate.net6\**\bin\**" /> <_UnoAppnet6UWPTemplateFilesExclude Include="..\UnoSolutionTemplate.net6\Properties\**" /> @@ -110,18 +110,18 @@ <_UnoAppnet6WinUITemplateFilesExclude Include="..\UnoSolutionTemplate.WinUI.net6\**\*.vstemplate" /> - <_UnoAppnet6WinUITemplateFilesExclude Include="..\UnoSolutionTemplate.WinUI.net6\__*.png" /> + <_UnoAppnet6WinUITemplateFilesExclude Include="..\UnoSolutionTemplate.WinUI.net6\**\__*.png" /> <_UnoAppnet6WinUITemplateFilesExclude Include="..\UnoSolutionTemplate.WinUI.net6\**\obj\**" /> <_UnoAppnet6WinUITemplateFilesExclude Include="..\UnoSolutionTemplate.WinUI.net6\**\bin\**" /> <_UnoAppnet6WinUITemplateFilesExclude Include="..\UnoSolutionTemplate.WinUI.net6\Properties\**" /> - <_UnoAppnet6WinUITemplateFilesExclude Include="..\UnoSolutionTemplate.WinUI.net6\UnoSolutionTemplate.csproj" /> + <_UnoAppnet6WinUITemplateFilesExclude Include="..\UnoSolutionTemplate.WinUI.net6\UnoSolutionTemplate.WinUI.net6.csproj" /> <_UnoAppnet6WinUITemplateFiles Include="..\UnoSolutionTemplate.WinUI.net6\**" Exclude="@(_UnoAppnet6WinUITemplateFilesExclude)" /> <_UnoLibTemplateFilesExclude Include="..\UnoLibraryTemplate\*.vstemplate" /> - <_UnoLibTemplateFilesExclude Include="..\UnoLibraryTemplate\__*.png" /> + <_UnoLibTemplateFilesExclude Include="..\UnoLibraryTemplate\**\__*.png" /> <_UnoLibTemplateFilesExclude Include="..\UnoLibraryTemplate\obj\**" /> <_UnoLibTemplateFilesExclude Include="..\UnoLibraryTemplate\bin\**" /> <_UnoLibTemplateFilesExclude Include="..\UnoLibraryTemplate\Properties\**" /> @@ -132,7 +132,7 @@ <_UnoUITestTemplateFilesExclude Include="..\UnoUITestTemplate\*.vstemplate" /> - <_UnoUITestTemplateFilesExclude Include="..\UnoUITestTemplate\__*.png" /> + <_UnoUITestTemplateFilesExclude Include="..\UnoUITestTemplate\**\__*.png" /> <_UnoUITestTemplateFilesExclude Include="..\UnoUITestTemplate\obj\**" /> <_UnoUITestTemplateFilesExclude Include="..\UnoUITestTemplate\bin\**" /> <_UnoUITestTemplateFilesExclude Include="..\UnoUITestTemplate\Properties\**" /> @@ -296,7 +296,7 @@ Directory.EnumerateFiles(SourcePath, f, SearchOption.AllDirectories))) { diff --git a/src/SolutionTemplate/UnoSolutionTemplate.WinUI.net6/Wasm/UnoQuickStart.Wasm.csproj b/src/SolutionTemplate/UnoSolutionTemplate.WinUI.net6/Wasm/UnoQuickStart.Wasm.csproj index c0ce6a879bad..4e3dcccdfc35 100644 --- a/src/SolutionTemplate/UnoSolutionTemplate.WinUI.net6/Wasm/UnoQuickStart.Wasm.csproj +++ b/src/SolutionTemplate/UnoSolutionTemplate.WinUI.net6/Wasm/UnoQuickStart.Wasm.csproj @@ -49,13 +49,14 @@ - + + - - + + diff --git a/src/SourceGenerators/System.Xaml/Uno.Xaml.Reference.csproj b/src/SourceGenerators/System.Xaml/Uno.Xaml.Reference.csproj new file mode 100644 index 000000000000..3735a00e601e --- /dev/null +++ b/src/SourceGenerators/System.Xaml/Uno.Xaml.Reference.csproj @@ -0,0 +1,36 @@ + + + netstandard2.0 + + + + $(TargetFrameworks);net7.0 + + + + true + Uno.Xaml + + false + true + bin\$(Configuration)\$(TargetFramework)\ + $(BaseIntermediateOutputPath)$(Configuration)\$(TargetFramework)\ + false + + Reference + + + + + + $(DefineConstants);NET_4_0;NET_4_5;NET_4_6;MONO;WIN_PLATFORM;MULTIPLEX_OS + true + full + true + + + + + + + diff --git a/src/SourceGenerators/Uno.UI.SourceGenerators.Internal/Uno.UI.SourceGenerators.Internal.csproj b/src/SourceGenerators/Uno.UI.SourceGenerators.Internal/Uno.UI.SourceGenerators.Internal.csproj index e2216f240854..78fd04d2e844 100644 --- a/src/SourceGenerators/Uno.UI.SourceGenerators.Internal/Uno.UI.SourceGenerators.Internal.csproj +++ b/src/SourceGenerators/Uno.UI.SourceGenerators.Internal/Uno.UI.SourceGenerators.Internal.csproj @@ -3,7 +3,6 @@ netstandard2.0 Uno.UI.SourceGenerators.Internal true - true true true diff --git a/src/SourceGenerators/Uno.UI.Tasks/Content/Uno.UI.Tasks.targets b/src/SourceGenerators/Uno.UI.Tasks/Content/Uno.UI.Tasks.targets index f6a33c80fcb2..75ac669f8f24 100644 --- a/src/SourceGenerators/Uno.UI.Tasks/Content/Uno.UI.Tasks.targets +++ b/src/SourceGenerators/Uno.UI.Tasks/Content/Uno.UI.Tasks.targets @@ -163,6 +163,8 @@ OutputPath="$(ProjectDir)$(IntermediateOutputPath)/linkerhints" ReferencePath="@(_UnoLinkerHintsPass1AssembliesForReferencePaths)" ILLinkerPath="$(_UnoLinkerHintGeneratorILLinkerPath)" + TargetFramework="$(TargetFramework)" + TargetFrameworkVersion="$(TargetFrameworkVersion.Substring(1))" UnoUIPackageBasePath="$(_UnoUIPackageBasePath)" UnoRuntimeIdentifier="$(UnoRuntimeIdentifier)"> = new Version("7.0") + ? "net7.0" + : "netstandard2.0"; + return (unoRuntimeIdentifier == "skia" || unoRuntimeIdentifier == "webassembly") && referencePath.StartsWith(unoUIPackageBasePath) ? - referencePath.Replace($"lib{separator}netstandard2.0", $"uno-runtime{separator}{unoRuntimeIdentifier}") : + referencePath.Replace($"lib{separator}{runtimeTargetFramework}", $"uno-runtime{separator}{runtimeTargetFramework}{separator}{unoRuntimeIdentifier}") : referencePath; } } diff --git a/src/Uno.Foundation.Logging/Uno.Foundation.Logging.csproj b/src/Uno.Foundation.Logging/Uno.Foundation.Logging.csproj index 28cf194f576d..7bddf84f7a66 100644 --- a/src/Uno.Foundation.Logging/Uno.Foundation.Logging.csproj +++ b/src/Uno.Foundation.Logging/Uno.Foundation.Logging.csproj @@ -1,8 +1,12 @@  - + xamarinmac20;xamarinios10;MonoAndroid12.0;net461;netstandard2.0 MonoAndroid11.0;MonoAndroid12.0;xamarinios10;net461;netstandard2.0;xamarinmac20 + + + netstandard2.0;net7.0 + $(UnoTargetFrameworkOverride) diff --git a/src/Uno.Foundation.Runtime.WebAssembly/Uno.Foundation.Runtime.WebAssembly.csproj b/src/Uno.Foundation.Runtime.WebAssembly/Uno.Foundation.Runtime.WebAssembly.csproj index 895a38f7d8f1..fa0de4822ff5 100644 --- a/src/Uno.Foundation.Runtime.WebAssembly/Uno.Foundation.Runtime.WebAssembly.csproj +++ b/src/Uno.Foundation.Runtime.WebAssembly/Uno.Foundation.Runtime.WebAssembly.csproj @@ -3,6 +3,10 @@ netstandard2.0 + + $(TargetFrameworks);net7.0 + + diff --git a/src/Uno.Foundation/Uno.Foundation.Reference.csproj b/src/Uno.Foundation/Uno.Foundation.Reference.csproj new file mode 100644 index 000000000000..6aa89127e3b0 --- /dev/null +++ b/src/Uno.Foundation/Uno.Foundation.Reference.csproj @@ -0,0 +1,53 @@ + + + + netstandard2.0 + + + + $(TargetFrameworks);net7.0 + + + + $(UnoTargetFrameworkOverride) + + + + Uno.Foundation + Windows.Foundation + $(NoWarn);NU1701;1572;1712;1711;1574 + true + + false + true + + Reference + + + + + + + + + + + + + + + + + + + $(AssemblyName).xml + + + + + + + + + + diff --git a/src/Uno.Foundation/Uno.Foundation.Skia.csproj b/src/Uno.Foundation/Uno.Foundation.Skia.csproj index d6b8f76d4bef..3dbde4cb07b5 100644 --- a/src/Uno.Foundation/Uno.Foundation.Skia.csproj +++ b/src/Uno.Foundation/Uno.Foundation.Skia.csproj @@ -3,6 +3,10 @@ netstandard2.0 + + $(TargetFrameworks);net7.0 + + diff --git a/src/Uno.Foundation/Uno.Foundation.Wasm.csproj b/src/Uno.Foundation/Uno.Foundation.Wasm.csproj index a9c47fe1eabd..6a7c98a2fd2c 100644 --- a/src/Uno.Foundation/Uno.Foundation.Wasm.csproj +++ b/src/Uno.Foundation/Uno.Foundation.Wasm.csproj @@ -3,6 +3,10 @@ netstandard2.0 + + $(TargetFrameworks);net7.0 + + diff --git a/src/Uno.NUnitTransformTool/Uno.NUnitTransformTool.csproj b/src/Uno.NUnitTransformTool/Uno.NUnitTransformTool.csproj index af111be3c72c..014b89aebaae 100644 --- a/src/Uno.NUnitTransformTool/Uno.NUnitTransformTool.csproj +++ b/src/Uno.NUnitTransformTool/Uno.NUnitTransformTool.csproj @@ -1,13 +1,14 @@ - - Exe - net5.0 + + Exe + net6.0 false + major - - - + + + diff --git a/src/Uno.ReferenceImplComparer/Program.cs b/src/Uno.ReferenceImplComparer/Program.cs index 10b4c7b29775..dec17869721d 100644 --- a/src/Uno.ReferenceImplComparer/Program.cs +++ b/src/Uno.ReferenceImplComparer/Program.cs @@ -20,18 +20,26 @@ static int Main(string[] args) Console.WriteLine($"Validating package {args[0]}"); - foreach(var assembly in Directory.GetFiles(Path.Combine(filePath, "lib", "netstandard2.0"), "*.dll")) - { - var referenceAssemblyDefinition = ReadAssemblyDefinition(assembly); + var referenceTargetFrameworks = new[] { + "netstandard2.0", + "net7.0" + }; - foreach(var runtimeAssembly in Directory.GetFiles(Path.Combine(filePath, "uno-runtime"), Path.GetFileName(assembly), SearchOption.AllDirectories)) + foreach (var targetFramework in referenceTargetFrameworks) + { + foreach (var assembly in Directory.GetFiles(Path.Combine(filePath, "lib", targetFramework), "*.dll")) { - var identifier = $"{Path.GetFileName(runtimeAssembly)}/{Path.GetFileName(Path.GetDirectoryName(runtimeAssembly))}"; - Console.WriteLine($"Validating {identifier}"); + var referenceAssemblyDefinition = ReadAssemblyDefinition(assembly); - var runtimeAssemblyDefinition = ReadAssemblyDefinition(runtimeAssembly); + foreach (var runtimeAssembly in Directory.GetFiles(Path.Combine(filePath, "uno-runtime", targetFramework), Path.GetFileName(assembly), SearchOption.AllDirectories)) + { + var identifier = $"{Path.GetFileName(runtimeAssembly)}/{Path.GetFileName(Path.GetDirectoryName(runtimeAssembly))}"; + Console.WriteLine($"Validating {identifier} ({runtimeAssembly})"); - hasErrors |= CompareAssemblies(referenceAssemblyDefinition, runtimeAssemblyDefinition, identifier); + var runtimeAssemblyDefinition = ReadAssemblyDefinition(runtimeAssembly); + + hasErrors |= CompareAssemblies(referenceAssemblyDefinition, runtimeAssemblyDefinition, identifier); + } } } diff --git a/src/Uno.ReferenceImplComparer/Properties/launchSettings.json b/src/Uno.ReferenceImplComparer/Properties/launchSettings.json index d93d473c14fe..4112c44d34e2 100644 --- a/src/Uno.ReferenceImplComparer/Properties/launchSettings.json +++ b/src/Uno.ReferenceImplComparer/Properties/launchSettings.json @@ -2,7 +2,7 @@ "profiles": { "Uno.ReferenceImplComparer": { "commandName": "Project", - "commandLineArgs": "\"C:\\Temp\\nuget-local\\Uno.UI.3.0.0-dev.wasm-separation.682.nupkg\"" + "commandLineArgs": "\"C:\\temp\\nuget-local\\57728-vslatest\\vslatest\\Uno.UI.4.6.0-PullRequest-10019-57728-10019.nupkg\"" } } } \ No newline at end of file diff --git a/src/Uno.UI-Reference-Only.slnf b/src/Uno.UI-Reference-Only.slnf new file mode 100644 index 000000000000..9cd2b7b0f810 --- /dev/null +++ b/src/Uno.UI-Reference-Only.slnf @@ -0,0 +1,28 @@ +{ + "solution": { + "path": "Uno.UI.sln", + "projects": [ + "AddIns\\Uno.UI.Lottie\\Uno.UI.Lottie.Reference.csproj", + "AddIns\\Uno.UI.MSAL\\Uno.UI.MSAL.Reference.csproj", + "SourceGenerators\\SourceGeneratorHelpers\\SourceGeneratorHelpers.shproj", + "SourceGenerators\\System.Xaml\\Uno.Xaml.Reference.csproj", + "SourceGenerators\\System.Xaml\\Uno.Xaml.csproj", + "SourceGenerators\\Uno.UI.SourceGenerators.Internal\\Uno.UI.SourceGenerators.Internal.csproj", + "SourceGenerators\\Uno.UI.SourceGenerators\\Uno.UI.SourceGenerators.csproj", + "SourceGenerators\\Uno.UI.Tasks\\Uno.UI.Tasks.csproj", + "T4Generator\\T4Generator.csproj", + "Uno.Foundation.Logging\\Uno.Foundation.Logging.csproj", + "Uno.Foundation\\Uno.Foundation.Reference.csproj", + "Uno.UI.Composition\\Uno.UI.Composition.Reference.csproj", + "Uno.UI.Dispatching\\Uno.UI.Dispatching.Reference.csproj", + "Uno.UI.FluentTheme.v1\\Uno.UI.FluentTheme.v1.Reference.csproj", + "Uno.UI.FluentTheme.v2\\Uno.UI.FluentTheme.v2.Reference.csproj", + "Uno.UI.FluentTheme\\Uno.UI.FluentTheme.Reference.csproj", + "Uno.UI.RemoteControl\\Uno.UI.RemoteControl.Reference.csproj", + "Uno.UI.Toolkit\\Uno.UI.Toolkit.Reference.csproj", + "Uno.UI.XamlHost\\Uno.UI.XamlHost.Reference.csproj", + "Uno.UI\\Uno.UI.Reference.csproj", + "Uno.UWP\\Uno.Reference.csproj" + ] + } +} \ No newline at end of file diff --git a/src/Uno.UI.Adapter.Microsoft.Extensions.Logging/Uno.UI.Adapter.Microsoft.Extensions.Logging.csproj b/src/Uno.UI.Adapter.Microsoft.Extensions.Logging/Uno.UI.Adapter.Microsoft.Extensions.Logging.csproj index 1add0dae5719..01b747361c4b 100644 --- a/src/Uno.UI.Adapter.Microsoft.Extensions.Logging/Uno.UI.Adapter.Microsoft.Extensions.Logging.csproj +++ b/src/Uno.UI.Adapter.Microsoft.Extensions.Logging/Uno.UI.Adapter.Microsoft.Extensions.Logging.csproj @@ -1,9 +1,13 @@  - + xamarinmac20;xamarinios10;MonoAndroid12.0;net461;netstandard2.0 MonoAndroid11.0;MonoAndroid12.0;xamarinios10;net461;netstandard2.0;xamarinmac20 + + netstandard2.0;net7.0 + + $(UnoTargetFrameworkOverride) diff --git a/src/Uno.UI.Composition/Uno.UI.Composition.Reference.csproj b/src/Uno.UI.Composition/Uno.UI.Composition.Reference.csproj new file mode 100644 index 000000000000..71a8c961d49c --- /dev/null +++ b/src/Uno.UI.Composition/Uno.UI.Composition.Reference.csproj @@ -0,0 +1,39 @@ + + + + netstandard2.0 + + + + $(TargetFrameworks);net7.0 + + + + $(UnoTargetFrameworkOverride) + + + + Uno.UI.Composition + Uno.UI.Composition + $(DefineConstants);XAMARIN;IS_UNO + true + + $(NoWarn);NU1701 + + false + true + + Reference + + + + + + + + + + + + + diff --git a/src/Uno.UI.Composition/Uno.UI.Composition.Skia.csproj b/src/Uno.UI.Composition/Uno.UI.Composition.Skia.csproj index cf7f1ba0626a..87b3ddbfc207 100644 --- a/src/Uno.UI.Composition/Uno.UI.Composition.Skia.csproj +++ b/src/Uno.UI.Composition/Uno.UI.Composition.Skia.csproj @@ -3,6 +3,10 @@ netstandard2.0 + + $(TargetFrameworks);net7.0 + + diff --git a/src/Uno.UI.Composition/Uno.UI.Composition.Wasm.csproj b/src/Uno.UI.Composition/Uno.UI.Composition.Wasm.csproj index da432f986aef..ea7c3c3d3ad3 100644 --- a/src/Uno.UI.Composition/Uno.UI.Composition.Wasm.csproj +++ b/src/Uno.UI.Composition/Uno.UI.Composition.Wasm.csproj @@ -1,9 +1,13 @@  - - + + netstandard2.0 + + $(TargetFrameworks);net7.0 + + diff --git a/src/Uno.UI.Dispatching/Uno.UI.Dispatching.Reference.csproj b/src/Uno.UI.Dispatching/Uno.UI.Dispatching.Reference.csproj new file mode 100644 index 000000000000..8b13647454e5 --- /dev/null +++ b/src/Uno.UI.Dispatching/Uno.UI.Dispatching.Reference.csproj @@ -0,0 +1,42 @@ + + + + netstandard2.0 + + + + $(TargetFrameworks);net7.0 + + + + $(UnoTargetFrameworkOverride) + + + + Uno.UI.Dispatching + Uno.UI.Dispatching + $(DefineConstants);XAMARIN;IS_UNO;IS_UNO_UI_DISPATCHING_PROJECT + true + + $(NoWarn);NU1701 + + false + true + + Reference + + + + + + + + + + + + + + + + diff --git a/src/Uno.UI.Dispatching/Uno.UI.Dispatching.Skia.csproj b/src/Uno.UI.Dispatching/Uno.UI.Dispatching.Skia.csproj index 3508ff636e78..85f095ce7cbc 100644 --- a/src/Uno.UI.Dispatching/Uno.UI.Dispatching.Skia.csproj +++ b/src/Uno.UI.Dispatching/Uno.UI.Dispatching.Skia.csproj @@ -3,6 +3,10 @@ netstandard2.0 + + $(TargetFrameworks);net7.0 + + diff --git a/src/Uno.UI.Dispatching/Uno.UI.Dispatching.Wasm.csproj b/src/Uno.UI.Dispatching/Uno.UI.Dispatching.Wasm.csproj index 765e8d4a9ea9..0d5374546baa 100644 --- a/src/Uno.UI.Dispatching/Uno.UI.Dispatching.Wasm.csproj +++ b/src/Uno.UI.Dispatching/Uno.UI.Dispatching.Wasm.csproj @@ -1,9 +1,13 @@  - - + + netstandard2.0 + + $(TargetFrameworks);net7.0 + + diff --git a/src/Uno.UI.FluentTheme.v1/Uno.UI.FluentTheme.v1.Reference.csproj b/src/Uno.UI.FluentTheme.v1/Uno.UI.FluentTheme.v1.Reference.csproj new file mode 100644 index 000000000000..e73677bcf273 --- /dev/null +++ b/src/Uno.UI.FluentTheme.v1/Uno.UI.FluentTheme.v1.Reference.csproj @@ -0,0 +1,41 @@ + + + netstandard2.0 + + + + $(TargetFrameworks);net7.0 + + + + $(UnoTargetFrameworkOverride) + + + + $(NoWarn);NU1701 + true + Uno.UI.FluentTheme.v1 + Uno.UI.FluentTheme.v1 + + false + true + + true + Uno.UI + + Reference + + + + + + + + + + + + + + + diff --git a/src/Uno.UI.FluentTheme.v1/Uno.UI.FluentTheme.v1.Skia.csproj b/src/Uno.UI.FluentTheme.v1/Uno.UI.FluentTheme.v1.Skia.csproj index 0c2f14237d14..5ad3e82014b8 100644 --- a/src/Uno.UI.FluentTheme.v1/Uno.UI.FluentTheme.v1.Skia.csproj +++ b/src/Uno.UI.FluentTheme.v1/Uno.UI.FluentTheme.v1.Skia.csproj @@ -3,6 +3,10 @@ netstandard2.0 + + $(TargetFrameworks);net7.0 + + diff --git a/src/Uno.UI.FluentTheme.v1/Uno.UI.FluentTheme.v1.Wasm.csproj b/src/Uno.UI.FluentTheme.v1/Uno.UI.FluentTheme.v1.Wasm.csproj index f2f95f779f0a..5a1469fa291a 100644 --- a/src/Uno.UI.FluentTheme.v1/Uno.UI.FluentTheme.v1.Wasm.csproj +++ b/src/Uno.UI.FluentTheme.v1/Uno.UI.FluentTheme.v1.Wasm.csproj @@ -3,6 +3,10 @@ netstandard2.0 + + $(TargetFrameworks);net7.0 + + diff --git a/src/Uno.UI.FluentTheme.v2/Uno.UI.FluentTheme.v2.Reference.csproj b/src/Uno.UI.FluentTheme.v2/Uno.UI.FluentTheme.v2.Reference.csproj new file mode 100644 index 000000000000..a41800b69d2b --- /dev/null +++ b/src/Uno.UI.FluentTheme.v2/Uno.UI.FluentTheme.v2.Reference.csproj @@ -0,0 +1,41 @@ + + + netstandard2.0 + + + + $(TargetFrameworks);net7.0 + + + + $(UnoTargetFrameworkOverride) + + + + $(NoWarn);NU1701 + true + Uno.UI.FluentTheme.v2 + Uno.UI.FluentTheme.v2 + + false + true + + true + Uno.UI + + Reference + + + + + + + + + + + + + + + diff --git a/src/Uno.UI.FluentTheme.v2/Uno.UI.FluentTheme.v2.Skia.csproj b/src/Uno.UI.FluentTheme.v2/Uno.UI.FluentTheme.v2.Skia.csproj index 15511d41ed7c..c8938ec3b2d9 100644 --- a/src/Uno.UI.FluentTheme.v2/Uno.UI.FluentTheme.v2.Skia.csproj +++ b/src/Uno.UI.FluentTheme.v2/Uno.UI.FluentTheme.v2.Skia.csproj @@ -3,6 +3,10 @@ netstandard2.0 + + $(TargetFrameworks);net7.0 + + diff --git a/src/Uno.UI.FluentTheme.v2/Uno.UI.FluentTheme.v2.Wasm.csproj b/src/Uno.UI.FluentTheme.v2/Uno.UI.FluentTheme.v2.Wasm.csproj index 1b0e4a4db296..38b27b908eb8 100644 --- a/src/Uno.UI.FluentTheme.v2/Uno.UI.FluentTheme.v2.Wasm.csproj +++ b/src/Uno.UI.FluentTheme.v2/Uno.UI.FluentTheme.v2.Wasm.csproj @@ -3,6 +3,10 @@ netstandard2.0 + + $(TargetFrameworks);net7.0 + + diff --git a/src/Uno.UI.FluentTheme/Uno.UI.FluentTheme.Reference.csproj b/src/Uno.UI.FluentTheme/Uno.UI.FluentTheme.Reference.csproj new file mode 100644 index 000000000000..7b4524c756b3 --- /dev/null +++ b/src/Uno.UI.FluentTheme/Uno.UI.FluentTheme.Reference.csproj @@ -0,0 +1,43 @@ + + + netstandard2.0 + + + + $(TargetFrameworks);net7.0 + + + + $(UnoTargetFrameworkOverride) + + + + $(NoWarn);NU1701 + true + Uno.UI.FluentTheme + Uno.UI.FluentTheme + + false + true + + true + Uno.UI + + Reference + + + + + + + + + + + + + + + + + diff --git a/src/Uno.UI.FluentTheme/Uno.UI.FluentTheme.Skia.csproj b/src/Uno.UI.FluentTheme/Uno.UI.FluentTheme.Skia.csproj index 8a542fb71ad3..0846561d802c 100644 --- a/src/Uno.UI.FluentTheme/Uno.UI.FluentTheme.Skia.csproj +++ b/src/Uno.UI.FluentTheme/Uno.UI.FluentTheme.Skia.csproj @@ -3,6 +3,10 @@ netstandard2.0 + + $(TargetFrameworks);net7.0 + + diff --git a/src/Uno.UI.FluentTheme/Uno.UI.FluentTheme.Wasm.csproj b/src/Uno.UI.FluentTheme/Uno.UI.FluentTheme.Wasm.csproj index b0df499729df..9da0330027db 100644 --- a/src/Uno.UI.FluentTheme/Uno.UI.FluentTheme.Wasm.csproj +++ b/src/Uno.UI.FluentTheme/Uno.UI.FluentTheme.Wasm.csproj @@ -3,6 +3,10 @@ netstandard2.0 + + $(TargetFrameworks);net7.0 + + diff --git a/src/Uno.UI.RemoteControl.Host/RemoteControlServer.cs b/src/Uno.UI.RemoteControl.Host/RemoteControlServer.cs index 09c7bc7f0279..fac06f52cc0d 100644 --- a/src/Uno.UI.RemoteControl.Host/RemoteControlServer.cs +++ b/src/Uno.UI.RemoteControl.Host/RemoteControlServer.cs @@ -101,7 +101,9 @@ private void ProcessDiscoveryFrame(Frame frame) var basePath = msg.BasePath.Replace('/', Path.DirectorySeparatorChar); -#if NET6_0_OR_GREATER +#if NET7_0_OR_GREATER + basePath = Path.Combine(basePath, "net7.0"); +#elif NET6_0_OR_GREATER basePath = Path.Combine(basePath, "net6.0"); #else basePath = Path.Combine(basePath, "netcoreapp3.1"); diff --git a/src/Uno.UI.RemoteControl.Host/Uno.UI.RemoteControl.Host.csproj b/src/Uno.UI.RemoteControl.Host/Uno.UI.RemoteControl.Host.csproj index e21fdb57a0b8..c5bbfddf94b1 100644 --- a/src/Uno.UI.RemoteControl.Host/Uno.UI.RemoteControl.Host.csproj +++ b/src/Uno.UI.RemoteControl.Host/Uno.UI.RemoteControl.Host.csproj @@ -2,14 +2,15 @@ Exe - netcoreapp3.1;net6.0 + netcoreapp3.1;net6.0;net7.0 true Major - netcoreapp3.1 + netcoreapp3.1 net6.0 + net6.0;net7.0 diff --git a/src/Uno.UI.RemoteControl.Server.Processors/Uno.UI.RemoteControl.Server.Processors.csproj b/src/Uno.UI.RemoteControl.Server.Processors/Uno.UI.RemoteControl.Server.Processors.csproj index cab9f4a7374e..b1983c76f335 100644 --- a/src/Uno.UI.RemoteControl.Server.Processors/Uno.UI.RemoteControl.Server.Processors.csproj +++ b/src/Uno.UI.RemoteControl.Server.Processors/Uno.UI.RemoteControl.Server.Processors.csproj @@ -1,17 +1,19 @@ - - netcoreapp3.1;net6.0 + + netcoreapp3.1;net6.0 true + true - - netcoreapp3.1 + + netcoreapp3.1 net6.0 + net6.0;net7.0 - - + + @@ -22,8 +24,8 @@ - - + + @@ -48,13 +50,13 @@ - + <_baseNugetPath Condition="'$(USERPROFILE)'!=''">$(USERPROFILE) - <_baseNugetPath Condition="'$(HOME)'!=''">$(HOME) + <_baseNugetPath Condition="'$(HOME)'!=''">$(HOME) <_TargetNugetFolder>$(_baseNugetPath)\.nuget\packages\Uno.UI.RemoteControl\$(UnoNugetOverrideVersion)\tools\rc\processors\$(TargetFramework) diff --git a/src/Uno.UI.RemoteControl.VS/Uno.UI.RemoteControl.VS.csproj b/src/Uno.UI.RemoteControl.VS/Uno.UI.RemoteControl.VS.csproj index a9c8fd645959..363905701671 100644 --- a/src/Uno.UI.RemoteControl.VS/Uno.UI.RemoteControl.VS.csproj +++ b/src/Uno.UI.RemoteControl.VS/Uno.UI.RemoteControl.VS.csproj @@ -27,6 +27,7 @@ + diff --git a/src/Uno.UI.RemoteControl/Uno.UI.RemoteControl.Reference.csproj b/src/Uno.UI.RemoteControl/Uno.UI.RemoteControl.Reference.csproj new file mode 100644 index 000000000000..3c0488441199 --- /dev/null +++ b/src/Uno.UI.RemoteControl/Uno.UI.RemoteControl.Reference.csproj @@ -0,0 +1,89 @@ + + + + netstandard2.0 + + + + $(TargetFrameworks);net7.0 + + + + $(UnoTargetFrameworkOverride) + + + + Uno.UI.RemoteControl + Uno.UI.RemoteControl + + true + + $(NoWarn);NU1701 + + false + true + + Uno.UI.RemoteControl + Uno.WinUI.RemoteControl + + Reference + + + + + + + + + + + build + true + + + + + + + + + + + + + + + + + false + true + TargetFramework + + + + + + false + true + TargetFramework + + + + + + + <_OverrideTargetFramework>$(TargetFramework) + <_baseNugetPath Condition="'$(USERPROFILE)'!=''">$(USERPROFILE) + <_baseNugetPath Condition="'$(HOME)'!=''">$(HOME) + <_TargetNugetFolder>$(_baseNugetPath)\.nuget\packages\uno.ui\$(UnoNugetOverrideVersion)\lib\$(_OverrideTargetFramework) + + + <_OutputFiles Include="$(TargetDir)\*.*" /> + + + + + + + + diff --git a/src/Uno.UI.RemoteControl/Uno.UI.RemoteControl.Skia.csproj b/src/Uno.UI.RemoteControl/Uno.UI.RemoteControl.Skia.csproj index 098b3071790c..37e417e57b3c 100644 --- a/src/Uno.UI.RemoteControl/Uno.UI.RemoteControl.Skia.csproj +++ b/src/Uno.UI.RemoteControl/Uno.UI.RemoteControl.Skia.csproj @@ -4,6 +4,10 @@ netstandard2.0;net5.0 + + $(TargetFrameworks);net7.0 + + $(UnoTargetFrameworkOverride) diff --git a/src/Uno.UI.RemoteControl/Uno.UI.RemoteControl.Wasm.csproj b/src/Uno.UI.RemoteControl/Uno.UI.RemoteControl.Wasm.csproj index fae2f0f32f14..e6d9dfbde370 100644 --- a/src/Uno.UI.RemoteControl/Uno.UI.RemoteControl.Wasm.csproj +++ b/src/Uno.UI.RemoteControl/Uno.UI.RemoteControl.Wasm.csproj @@ -1,7 +1,11 @@  - + - netstandard2.0;net5.0 + netstandard2.0 + + + + $(TargetFrameworks);net7.0 diff --git a/src/Uno.UI.Runtime.Skia.Gtk/Helpers/Dpi/WindowsDpiUtilities.cs b/src/Uno.UI.Runtime.Skia.Gtk/Helpers/Dpi/WindowsDpiUtilities.cs index fbb664b8af93..02cd9f5b4c3d 100644 --- a/src/Uno.UI.Runtime.Skia.Gtk/Helpers/Dpi/WindowsDpiUtilities.cs +++ b/src/Uno.UI.Runtime.Skia.Gtk/Helpers/Dpi/WindowsDpiUtilities.cs @@ -44,7 +44,10 @@ public static int GetDpiForMonitor(IntPtr monitor, MonitorDpiType type = Monitor if (ptr == IntPtr.Zero) return GetDpiForDesktop(); +#pragma warning disable CA1420 // Remove with .NET 7 RC 2 https://github.com/dotnet/roslyn-analyzers/issues/6094 int hr = Marshal.GetDelegateForFunctionPointer(ptr)(monitor, type, out int x, out int y); +#pragma warning restore CA1420 // Remove with .NET 7 RC 2 https://github.com/dotnet/roslyn-analyzers/issues/6094 + if (hr < 0) return GetDpiForDesktop(); diff --git a/src/Uno.UI.Runtime.Skia.Gtk/Uno.UI.Runtime.Skia.Gtk.csproj b/src/Uno.UI.Runtime.Skia.Gtk/Uno.UI.Runtime.Skia.Gtk.csproj index f0452b94845a..e15b07216f24 100644 --- a/src/Uno.UI.Runtime.Skia.Gtk/Uno.UI.Runtime.Skia.Gtk.csproj +++ b/src/Uno.UI.Runtime.Skia.Gtk/Uno.UI.Runtime.Skia.Gtk.csproj @@ -4,8 +4,16 @@ netcoreapp3.1 + + $(TargetFrameworks);net7.0 + + + + $(UnoTargetFrameworkOverride) + + true nventive @@ -21,6 +29,8 @@ true true + + true diff --git a/src/Uno.UI.Runtime.Skia.Linux.FrameBuffer/CoreWindowExtension.cs b/src/Uno.UI.Runtime.Skia.Linux.FrameBuffer/CoreWindowExtension.cs index 21a7cbb639c9..607424142e63 100644 --- a/src/Uno.UI.Runtime.Skia.Linux.FrameBuffer/CoreWindowExtension.cs +++ b/src/Uno.UI.Runtime.Skia.Linux.FrameBuffer/CoreWindowExtension.cs @@ -28,7 +28,7 @@ unsafe internal partial class CoreWindowExtension : ICoreWindowExtension, IDispo private readonly Dictionary _activePointers = new Dictionary(); private readonly HashSet _pointerPressed = new HashSet(); private readonly DisplayInformation _displayInformation; - private readonly Thread _inputThread; + private readonly Thread? _inputThread; private Point _mousePosition; private int _libDevFd; private readonly CancellationTokenSource _cts = new CancellationTokenSource(); diff --git a/src/Uno.UI.Runtime.Skia.Linux.FrameBuffer/Native/LibInput.cs b/src/Uno.UI.Runtime.Skia.Linux.FrameBuffer/Native/LibInput.cs index 861b916894a6..096372cd1d8d 100644 --- a/src/Uno.UI.Runtime.Skia.Linux.FrameBuffer/Native/LibInput.cs +++ b/src/Uno.UI.Runtime.Skia.Linux.FrameBuffer/Native/LibInput.cs @@ -21,9 +21,17 @@ unsafe class LibInput static int OpenRestricted(IntPtr path, int flags, IntPtr userData) { - var fd = Libc.open(Marshal.PtrToStringAnsi(path), flags, 0); + if(!(Marshal.PtrToStringAnsi(path) is { } pathAsString)) + { + return -1; + } + + var fd = Libc.open(pathAsString, flags, 0); + if (fd == -1) + { return -Marshal.GetLastWin32Error(); + } return fd; } @@ -37,7 +45,7 @@ static LibInput() { s_Interface = (IntPtr*)Marshal.AllocHGlobal(IntPtr.Size * 2); - IntPtr Convert(TDelegate del) + static IntPtr Convert(TDelegate del) where TDelegate:notnull { GCHandle.Alloc(del); return Marshal.GetFunctionPointerForDelegate(del); diff --git a/src/Uno.UI.Runtime.Skia.Linux.FrameBuffer/Native/pollfd.cs b/src/Uno.UI.Runtime.Skia.Linux.FrameBuffer/Native/pollfd.cs index 9c5a7f072ceb..cecf4b90ede2 100644 --- a/src/Uno.UI.Runtime.Skia.Linux.FrameBuffer/Native/pollfd.cs +++ b/src/Uno.UI.Runtime.Skia.Linux.FrameBuffer/Native/pollfd.cs @@ -8,8 +8,10 @@ namespace Uno.UI.Runtime.Skia.Native { +#pragma warning disable CS8981 // The type name 'pollfd' only contains lower-cased ascii characters. Such names may become reserved for the language. [StructLayout(LayoutKind.Sequential)] struct pollfd +#pragma warning restore CS8981 // The type name 'pollfd' only contains lower-cased ascii characters. Such names may become reserved for the language. { public int fd; /* file descriptor */ public short events; /* requested events */ diff --git a/src/Uno.UI.Runtime.Skia.Linux.FrameBuffer/Uno.UI.Runtime.Skia.Linux.FrameBuffer.csproj b/src/Uno.UI.Runtime.Skia.Linux.FrameBuffer/Uno.UI.Runtime.Skia.Linux.FrameBuffer.csproj index 7e330e56484c..6b76d32e9add 100644 --- a/src/Uno.UI.Runtime.Skia.Linux.FrameBuffer/Uno.UI.Runtime.Skia.Linux.FrameBuffer.csproj +++ b/src/Uno.UI.Runtime.Skia.Linux.FrameBuffer/Uno.UI.Runtime.Skia.Linux.FrameBuffer.csproj @@ -3,9 +3,13 @@ netcoreapp3.1 enable - true + + $(TargetFrameworks);net7.0 + + + @@ -25,6 +29,7 @@ true true + true diff --git a/src/Uno.UI.Runtime.Skia.Tizen/Uno.UI.Runtime.Skia.Tizen.csproj b/src/Uno.UI.Runtime.Skia.Tizen/Uno.UI.Runtime.Skia.Tizen.csproj index 19cd6258d342..f74e77566c6c 100644 --- a/src/Uno.UI.Runtime.Skia.Tizen/Uno.UI.Runtime.Skia.Tizen.csproj +++ b/src/Uno.UI.Runtime.Skia.Tizen/Uno.UI.Runtime.Skia.Tizen.csproj @@ -16,6 +16,8 @@ Uno.WinUI.Runtime.Skia.Tizen Uno.UI.Runtime.Skia + + true diff --git a/src/Uno.UI.Runtime.Skia.Wpf/Uno.UI.Runtime.Skia.Wpf.csproj b/src/Uno.UI.Runtime.Skia.Wpf/Uno.UI.Runtime.Skia.Wpf.csproj index f1d2a95ae613..63562188ce13 100644 --- a/src/Uno.UI.Runtime.Skia.Wpf/Uno.UI.Runtime.Skia.Wpf.csproj +++ b/src/Uno.UI.Runtime.Skia.Wpf/Uno.UI.Runtime.Skia.Wpf.csproj @@ -4,6 +4,10 @@ net47;netcoreapp3.1 + + $(TargetFrameworks);net7.0-windows + + @@ -22,6 +26,8 @@ 9.0 + + true @@ -35,6 +41,14 @@ + + + + + + + + diff --git a/src/Uno.UI.Runtime.Skia.Wpf/WpfHost.cs b/src/Uno.UI.Runtime.Skia.Wpf/WpfHost.cs index 348127bd00e2..966ca4e8ac15 100644 --- a/src/Uno.UI.Runtime.Skia.Wpf/WpfHost.cs +++ b/src/Uno.UI.Runtime.Skia.Wpf/WpfHost.cs @@ -237,7 +237,7 @@ void IWpfHost.InvalidateRender() InvalidateVisual(); } - private void MainWindow_Closing(object sender, CancelEventArgs e) + private void MainWindow_Closing(object? sender, CancelEventArgs e) { var manager = SystemNavigationManagerPreview.GetForCurrentView(); if (!manager.HasConfirmedClose) diff --git a/src/Uno.UI.Runtime.WebAssembly.Compatibility/Uno.UI.Runtime.WebAssembly.Compatibility.csproj b/src/Uno.UI.Runtime.WebAssembly.Compatibility/Uno.UI.Runtime.WebAssembly.Compatibility.csproj index be6b0aa7e514..7f7e526f6722 100644 --- a/src/Uno.UI.Runtime.WebAssembly.Compatibility/Uno.UI.Runtime.WebAssembly.Compatibility.csproj +++ b/src/Uno.UI.Runtime.WebAssembly.Compatibility/Uno.UI.Runtime.WebAssembly.Compatibility.csproj @@ -1,6 +1,10 @@  - netstandard2.0;net5.0 + netstandard2.0 + + + + $(TargetFrameworks);net7.0 diff --git a/src/Uno.UI.Runtime.WebAssembly/Uno.UI.Runtime.WebAssembly.csproj b/src/Uno.UI.Runtime.WebAssembly/Uno.UI.Runtime.WebAssembly.csproj index ac986f200cf6..c7e35c12faac 100644 --- a/src/Uno.UI.Runtime.WebAssembly/Uno.UI.Runtime.WebAssembly.csproj +++ b/src/Uno.UI.Runtime.WebAssembly/Uno.UI.Runtime.WebAssembly.csproj @@ -2,6 +2,10 @@ netstandard2.0 + + + $(TargetFrameworks);net7.0 + diff --git a/src/Uno.UI.RuntimeTests/Tests/Windows_UI_Xaml_Data/Given_Convert.cs b/src/Uno.UI.RuntimeTests/Tests/Windows_UI_Xaml_Data/Given_Convert.cs index daf64a04c13f..480bf93ba126 100644 --- a/src/Uno.UI.RuntimeTests/Tests/Windows_UI_Xaml_Data/Given_Convert.cs +++ b/src/Uno.UI.RuntimeTests/Tests/Windows_UI_Xaml_Data/Given_Convert.cs @@ -14,7 +14,7 @@ public class Given_Convert [TestMethod] public void When_Uri() { -#if NET5_0 || NET6_0_OR_GREATER || __SKIA__ +#if NET5_0 || NET6_0_OR_GREATER || __SKIA__ || __WASM__ string Expected = "http://platform.uno"; #else string Expected = "http://platform.uno/"; diff --git a/src/Uno.UI.RuntimeTests/Uno.UI.RuntimeTests.Skia.csproj b/src/Uno.UI.RuntimeTests/Uno.UI.RuntimeTests.Skia.csproj index d3d7d3fc9b49..81a73a09e1dd 100644 --- a/src/Uno.UI.RuntimeTests/Uno.UI.RuntimeTests.Skia.csproj +++ b/src/Uno.UI.RuntimeTests/Uno.UI.RuntimeTests.Skia.csproj @@ -3,7 +3,11 @@ netstandard2.0 - + + + $(TargetFrameworks);net7.0 + + diff --git a/src/Uno.UI.RuntimeTests/Uno.UI.RuntimeTests.Wasm.csproj b/src/Uno.UI.RuntimeTests/Uno.UI.RuntimeTests.Wasm.csproj index 837a88d5878a..2c4a12b4aec8 100644 --- a/src/Uno.UI.RuntimeTests/Uno.UI.RuntimeTests.Wasm.csproj +++ b/src/Uno.UI.RuntimeTests/Uno.UI.RuntimeTests.Wasm.csproj @@ -4,6 +4,10 @@ netstandard2.0 + + $(TargetFrameworks);net7.0 + + diff --git a/src/Uno.UI.Toolkit/ElevatedView.cs b/src/Uno.UI.Toolkit/ElevatedView.cs index 840de19bbae2..07d731bf09ee 100644 --- a/src/Uno.UI.Toolkit/ElevatedView.cs +++ b/src/Uno.UI.Toolkit/ElevatedView.cs @@ -133,7 +133,11 @@ public object ElevatedContent set => SetValue(BackgroundProperty, value); } - public static DependencyProperty CornerRadiusProperty { get ; } = DependencyProperty.Register( + public +#if __SKIA__ + new +#endif + static DependencyProperty CornerRadiusProperty { get ; } = DependencyProperty.Register( "CornerRadius", typeof(CornerRadius), typeof(ElevatedView), @@ -144,7 +148,11 @@ public object ElevatedContent #endif ); - public CornerRadius CornerRadius + public +#if __SKIA__ + new +#endif + CornerRadius CornerRadius { get => (CornerRadius)GetValue(CornerRadiusProperty); set => SetValue(CornerRadiusProperty, value); diff --git a/src/Uno.UI.Toolkit/Uno.UI.Toolkit.Reference.csproj b/src/Uno.UI.Toolkit/Uno.UI.Toolkit.Reference.csproj new file mode 100644 index 000000000000..3782bd724fef --- /dev/null +++ b/src/Uno.UI.Toolkit/Uno.UI.Toolkit.Reference.csproj @@ -0,0 +1,86 @@ + + + netstandard2.0 + + + + $(TargetFrameworks);net7.0 + + + + $(UnoTargetFrameworkOverride) + + + + Uno.UI.Toolkit + Uno.UI.Toolkit + $(AssemblyName) ($(TargetFramework)) + en-US + + false + true + + Reference + + true + Uno.UI + + Reference + + + + + + + + + + + + + + $(MSBuildThisFileDirectory)..\SourceGenerators\Uno.UI.Tasks\bin\$(Configuration)_Shadow + + + + + + + Uno.UI + + + Uno + + + Uno.Foundation + + + + + + + + + + + + + + + <_OverrideTargetFramework>$(TargetFramework) + <_OverrideTargetFramework Condition="'$(_OverrideTargetFramework)' == 'uap10.0.18362'">UAP + <_baseNugetPath Condition="'$(USERPROFILE)'!=''">$(USERPROFILE) + <_baseNugetPath Condition="'$(HOME)'!=''">$(HOME) + <_TargetNugetFolder>$(_baseNugetPath)\.nuget\packages\Uno.UI\$(UnoNugetOverrideVersion)\lib\$(_OverrideTargetFramework) + + + <_OutputFiles Include="$(TargetDir)**" /> + + + + + + + + + diff --git a/src/Uno.UI.Toolkit/Uno.UI.Toolkit.Skia.csproj b/src/Uno.UI.Toolkit/Uno.UI.Toolkit.Skia.csproj index b6642f49f05f..3752d4e88a2b 100644 --- a/src/Uno.UI.Toolkit/Uno.UI.Toolkit.Skia.csproj +++ b/src/Uno.UI.Toolkit/Uno.UI.Toolkit.Skia.csproj @@ -3,6 +3,10 @@ netstandard2.0 + + $(TargetFrameworks);net7.0 + + @@ -11,6 +15,7 @@ Uno.UI.Toolkit $(AssemblyName) ($(TargetFramework)) en-US + true false true diff --git a/src/Uno.UI.Toolkit/Uno.UI.Toolkit.Wasm.csproj b/src/Uno.UI.Toolkit/Uno.UI.Toolkit.Wasm.csproj index 9400905b36e5..fbb01eaf30b8 100644 --- a/src/Uno.UI.Toolkit/Uno.UI.Toolkit.Wasm.csproj +++ b/src/Uno.UI.Toolkit/Uno.UI.Toolkit.Wasm.csproj @@ -3,6 +3,10 @@ netstandard2.0 + + $(TargetFrameworks);net7.0 + + diff --git a/src/Uno.UI.Wasm.Tests/Tests/TSBindingsTests.cs b/src/Uno.UI.Wasm.Tests/Tests/TSBindingsTests.cs index 059e41beca30..a70c014e5a14 100644 --- a/src/Uno.UI.Wasm.Tests/Tests/TSBindingsTests.cs +++ b/src/Uno.UI.Wasm.Tests/Tests/TSBindingsTests.cs @@ -7,6 +7,12 @@ using Uno; using Windows.Foundation; using Uno.Foundation.Interop; +using System.Net.WebSockets; +using System.Diagnostics; + +#if NET7_0_OR_GREATER +using System.Runtime.InteropServices.JavaScript; +#endif namespace SamplesApp.UnitTests.TSBindings { @@ -15,6 +21,34 @@ namespace SamplesApp.UnitTests.TSBindings public class TSBindingsTests { +#if NET7_0_OR_GREATER + [TestMethod] + public void When_TestPerf() + { + var sw1 = Stopwatch.StartNew(); + for (int i = 0; i < 1000; i++) + { + string r = TestImport.When_SingleStringNet7(i.ToString()); + } + + Console.WriteLine($"net7 interop: {sw1.Elapsed}"); + + var sw2 = Stopwatch.StartNew(); + for (int i = 0; i < 1000; i++) + { + var param = new When_SingleStringParams() + { + MyString = "This is 42" + }; + + var ret = (GenericReturn)TSInteropMarshaller.InvokeJS("TSBindingsUnitTests:When_SingleString", param, typeof(GenericReturn)); + + } + + Console.WriteLine($"uno ts interop: {sw2.Elapsed}"); + } +#endif + [TestMethod] public void When_IntPtr() { @@ -165,6 +199,14 @@ public void When_ArrayOfNullStrings() } } +#if NET7_0_OR_GREATER + partial class TestImport + { + [JSImport("globalThis.When_SingleStringNet7")] + internal static partial string When_SingleStringNet7(string value); + } +#endif + [TSInteropMessage] [StructLayout(LayoutKind.Sequential, Pack = 4)] public struct When_ArrayOfStringsParams diff --git a/src/Uno.UI.Wasm.Tests/Uno.UI.Wasm.Tests.csproj b/src/Uno.UI.Wasm.Tests/Uno.UI.Wasm.Tests.csproj index 08cf91f97d51..fbb1bdd0b78e 100644 --- a/src/Uno.UI.Wasm.Tests/Uno.UI.Wasm.Tests.csproj +++ b/src/Uno.UI.Wasm.Tests/Uno.UI.Wasm.Tests.csproj @@ -1,7 +1,7 @@  - netstandard2.0;net5.0 + netstandard2.0; $(MSBuildThisFileDirectory)tsbindings $(DefineConstants);__WASM__ @@ -10,6 +10,13 @@ true true + true + + false + + + + $(TargetFrameworks);net7.0 @@ -45,8 +52,40 @@ - + + + + + + + $(MSBuildThisFileDirectory)..\SourceGenerators\Uno.UI.Tasks\bin\$(Configuration)_Shadow + CoreCompile;_UnoSetupTSCompilation; $(CompileTypeScriptDependsOn) + + + + + $(TypeScriptConfigFileAdditionalFlags) --outFile $(IntermediateOutputPath)/javascript/UnitTests.js + + + <_UnoTSDefinitions Include="..\Uno.UI\bin\Uno.UI.Wasm\$(Configuration)\$(TargetFramework)\*.d.ts" /> + + + + + + + + <_generatedTSFiles Include="$(IntermediateOutputPath)/javascript/*.js" /> + + + + + + <_UnoEmbeddedResourcesInjectionAfterTargets Include="CompileTypeScriptWithTSConfig" /> + diff --git a/src/Uno.UI.Wasm.Tests/WasmScripts/UnitTests.d.ts b/src/Uno.UI.Wasm.Tests/WasmScripts/UnitTests.d.ts deleted file mode 100644 index a044c32b47b3..000000000000 --- a/src/Uno.UI.Wasm.Tests/WasmScripts/UnitTests.d.ts +++ /dev/null @@ -1,46 +0,0 @@ -declare class TSBindingsTests { - TSBindingsTests(): void; - When_IntPtr(pParams: number, pReturn: number): boolean; - When_IntPtr_Zero(pParams: number, pReturn: number): boolean; - When_SingleString(pParams: number, pReturn: number): boolean; - When_SingleUnicodeString(pParams: number, pReturn: number): boolean; - When_NullString(pParams: number, pReturn: number): boolean; - When_ArrayOfInt(pParams: number, pReturn: number): boolean; - When_NullArrayOfInt(pParams: number, pReturn: number): boolean; - When_ArrayOfStrings(pParams: number, pReturn: number): boolean; - When_ArrayOfUnicodeStrings(pParams: number, pReturn: number): boolean; - When_NullArrayOfStrings(pParams: number, pReturn: number): boolean; - When_ArrayOfNullStrings(pParams: number, pReturn: number): boolean; -} -declare namespace SamplesApp.UnitTests.TSBindings { - class GenericReturn { - Value: string; - marshal(pData: number): void; - } -} -declare namespace SamplesApp.UnitTests.TSBindings { - class When_ArrayOfIntParams { - MyArray_Length: number; - MyArray: Array; - static unmarshal(pData: number): When_ArrayOfIntParams; - } -} -declare namespace SamplesApp.UnitTests.TSBindings { - class When_ArrayOfStringsParams { - MyArray_Length: number; - MyArray: Array; - static unmarshal(pData: number): When_ArrayOfStringsParams; - } -} -declare namespace SamplesApp.UnitTests.TSBindings { - class When_IntPtrParams { - Id: number; - static unmarshal(pData: number): When_IntPtrParams; - } -} -declare namespace SamplesApp.UnitTests.TSBindings { - class When_SingleStringParams { - MyString: string; - static unmarshal(pData: number): When_SingleStringParams; - } -} diff --git a/src/Uno.UI.Wasm.Tests/WasmScripts/UnitTests.js b/src/Uno.UI.Wasm.Tests/WasmScripts/UnitTests.js deleted file mode 100644 index d09f98b152db..000000000000 --- a/src/Uno.UI.Wasm.Tests/WasmScripts/UnitTests.js +++ /dev/null @@ -1,222 +0,0 @@ -require([`${config.uno_app_base}/Uno.UI`], () => { - MonoSupport.jsCallDispatcher.registerScope("TSBindingsUnitTests", new TSBindingsTests()); -}); -class TSBindingsTests { - TSBindingsTests() { - } - When_IntPtr(pParams, pReturn) { - var params = SamplesApp.UnitTests.TSBindings.When_IntPtrParams.unmarshal(pParams); - var ret = new SamplesApp.UnitTests.TSBindings.GenericReturn(); - ret.Value = String(params.Id); - ret.marshal(pReturn); - return true; - } - When_IntPtr_Zero(pParams, pReturn) { - var params = SamplesApp.UnitTests.TSBindings.When_IntPtrParams.unmarshal(pParams); - var ret = new SamplesApp.UnitTests.TSBindings.GenericReturn(); - ret.Value = String(params.Id); - ret.marshal(pReturn); - return true; - } - When_SingleString(pParams, pReturn) { - var params = SamplesApp.UnitTests.TSBindings.When_SingleStringParams.unmarshal(pParams); - var ret = new SamplesApp.UnitTests.TSBindings.GenericReturn(); - ret.Value = params.MyString; - ret.marshal(pReturn); - return true; - } - When_SingleUnicodeString(pParams, pReturn) { - var params = SamplesApp.UnitTests.TSBindings.When_SingleStringParams.unmarshal(pParams); - var ret = new SamplesApp.UnitTests.TSBindings.GenericReturn(); - ret.Value = params.MyString; - ret.marshal(pReturn); - return true; - } - When_NullString(pParams, pReturn) { - var params = SamplesApp.UnitTests.TSBindings.When_SingleStringParams.unmarshal(pParams); - var ret = new SamplesApp.UnitTests.TSBindings.GenericReturn(); - ret.Value = String(params.MyString === null); - ret.marshal(pReturn); - return true; - } - When_ArrayOfInt(pParams, pReturn) { - var params = SamplesApp.UnitTests.TSBindings.When_ArrayOfIntParams.unmarshal(pParams); - var ret = new SamplesApp.UnitTests.TSBindings.GenericReturn(); - ret.Value = params.MyArray.join(";"); - ret.marshal(pReturn); - return true; - } - When_NullArrayOfInt(pParams, pReturn) { - var params = SamplesApp.UnitTests.TSBindings.When_ArrayOfIntParams.unmarshal(pParams); - var ret = new SamplesApp.UnitTests.TSBindings.GenericReturn(); - ret.Value = String(params.MyArray === null); - ret.marshal(pReturn); - return true; - } - When_ArrayOfStrings(pParams, pReturn) { - var params = SamplesApp.UnitTests.TSBindings.When_ArrayOfStringsParams.unmarshal(pParams); - var ret = new SamplesApp.UnitTests.TSBindings.GenericReturn(); - ret.Value = params.MyArray.join(";"); - ret.marshal(pReturn); - return true; - } - When_ArrayOfUnicodeStrings(pParams, pReturn) { - var params = SamplesApp.UnitTests.TSBindings.When_ArrayOfStringsParams.unmarshal(pParams); - var ret = new SamplesApp.UnitTests.TSBindings.GenericReturn(); - ret.Value = params.MyArray.join(";"); - ret.marshal(pReturn); - return true; - } - When_NullArrayOfStrings(pParams, pReturn) { - var params = SamplesApp.UnitTests.TSBindings.When_ArrayOfStringsParams.unmarshal(pParams); - var ret = new SamplesApp.UnitTests.TSBindings.GenericReturn(); - ret.Value = String(params.MyArray === null); - ret.marshal(pReturn); - return true; - } - When_ArrayOfNullStrings(pParams, pReturn) { - var params = SamplesApp.UnitTests.TSBindings.When_ArrayOfStringsParams.unmarshal(pParams); - var ret = new SamplesApp.UnitTests.TSBindings.GenericReturn(); - ret.Value = params.MyArray.map(v => v === null).join(";"); - ret.marshal(pReturn); - return true; - } -} -/* TSBindingsGenerator Generated code -- this code is regenerated on each build */ -var SamplesApp; -(function (SamplesApp) { - var UnitTests; - (function (UnitTests) { - var TSBindings; - (function (TSBindings) { - class GenericReturn { - marshal(pData) { - { - const stringLength = lengthBytesUTF8(this.Value); - const pString = Module._malloc(stringLength + 1); - stringToUTF8(this.Value, pString, stringLength + 1); - Module.setValue(pData + 0, pString, "*"); - } - } - } - TSBindings.GenericReturn = GenericReturn; - })(TSBindings = UnitTests.TSBindings || (UnitTests.TSBindings = {})); - })(UnitTests = SamplesApp.UnitTests || (SamplesApp.UnitTests = {})); -})(SamplesApp || (SamplesApp = {})); -/* TSBindingsGenerator Generated code -- this code is regenerated on each build */ -var SamplesApp; -(function (SamplesApp) { - var UnitTests; - (function (UnitTests) { - var TSBindings; - (function (TSBindings) { - class When_ArrayOfIntParams { - static unmarshal(pData) { - const ret = new When_ArrayOfIntParams(); - { - ret.MyArray_Length = Number(Module.getValue(pData + 0, "i32")); - } - { - const pArray = Module.getValue(pData + 4, "*"); - if (pArray !== 0) { - ret.MyArray = new Array(); - for (var i = 0; i < ret.MyArray_Length; i++) { - const value = Module.getValue(pArray + i * 4, "*"); - ret.MyArray.push(Number(value)); - } - } - else { - ret.MyArray = null; - } - } - return ret; - } - } - TSBindings.When_ArrayOfIntParams = When_ArrayOfIntParams; - })(TSBindings = UnitTests.TSBindings || (UnitTests.TSBindings = {})); - })(UnitTests = SamplesApp.UnitTests || (SamplesApp.UnitTests = {})); -})(SamplesApp || (SamplesApp = {})); -/* TSBindingsGenerator Generated code -- this code is regenerated on each build */ -var SamplesApp; -(function (SamplesApp) { - var UnitTests; - (function (UnitTests) { - var TSBindings; - (function (TSBindings) { - class When_ArrayOfStringsParams { - static unmarshal(pData) { - const ret = new When_ArrayOfStringsParams(); - { - ret.MyArray_Length = Number(Module.getValue(pData + 0, "i32")); - } - { - const pArray = Module.getValue(pData + 4, "*"); - if (pArray !== 0) { - ret.MyArray = new Array(); - for (var i = 0; i < ret.MyArray_Length; i++) { - const value = Module.getValue(pArray + i * 4, "*"); - if (value !== 0) { - ret.MyArray.push(String(MonoRuntime.conv_string(value))); - } - else { - ret.MyArray.push(null); - } - } - } - else { - ret.MyArray = null; - } - } - return ret; - } - } - TSBindings.When_ArrayOfStringsParams = When_ArrayOfStringsParams; - })(TSBindings = UnitTests.TSBindings || (UnitTests.TSBindings = {})); - })(UnitTests = SamplesApp.UnitTests || (SamplesApp.UnitTests = {})); -})(SamplesApp || (SamplesApp = {})); -/* TSBindingsGenerator Generated code -- this code is regenerated on each build */ -var SamplesApp; -(function (SamplesApp) { - var UnitTests; - (function (UnitTests) { - var TSBindings; - (function (TSBindings) { - class When_IntPtrParams { - static unmarshal(pData) { - const ret = new When_IntPtrParams(); - { - ret.Id = Number(Module.getValue(pData + 0, "*")); - } - return ret; - } - } - TSBindings.When_IntPtrParams = When_IntPtrParams; - })(TSBindings = UnitTests.TSBindings || (UnitTests.TSBindings = {})); - })(UnitTests = SamplesApp.UnitTests || (SamplesApp.UnitTests = {})); -})(SamplesApp || (SamplesApp = {})); -/* TSBindingsGenerator Generated code -- this code is regenerated on each build */ -var SamplesApp; -(function (SamplesApp) { - var UnitTests; - (function (UnitTests) { - var TSBindings; - (function (TSBindings) { - class When_SingleStringParams { - static unmarshal(pData) { - const ret = new When_SingleStringParams(); - { - const ptr = Module.getValue(pData + 0, "*"); - if (ptr !== 0) { - ret.MyString = String(Module.UTF8ToString(ptr)); - } - else { - ret.MyString = null; - } - } - return ret; - } - } - TSBindings.When_SingleStringParams = When_SingleStringParams; - })(TSBindings = UnitTests.TSBindings || (UnitTests.TSBindings = {})); - })(UnitTests = SamplesApp.UnitTests || (SamplesApp.UnitTests = {})); -})(SamplesApp || (SamplesApp = {})); diff --git a/src/Uno.UI.Wasm.Tests/ts/.gitignore b/src/Uno.UI.Wasm.Tests/ts/.gitignore new file mode 100644 index 000000000000..b25fc552f049 --- /dev/null +++ b/src/Uno.UI.Wasm.Tests/ts/.gitignore @@ -0,0 +1,3 @@ +# Ignore the import of the definition file, as it cannot be added manually on the cli +# because of the use of tsconfig.json +Uno.UI.d.ts diff --git a/src/Uno.UI.Wasm.Tests/ts/TSBindingsTests.ts b/src/Uno.UI.Wasm.Tests/ts/TSBindingsTests.ts index ee1534905149..2c1212c4731a 100644 --- a/src/Uno.UI.Wasm.Tests/ts/TSBindingsTests.ts +++ b/src/Uno.UI.Wasm.Tests/ts/TSBindingsTests.ts @@ -2,11 +2,16 @@ MonoSupport.jsCallDispatcher.registerScope("TSBindingsUnitTests", new TSBindingsTests()); + (globalThis).When_SingleStringNet7 = TSBindingsTests.When_SingleStringNet7 }); class TSBindingsTests { public TSBindingsTests() { + // https://github.com/dotnet/runtime/blob/a919d611e832bfee46fc34762f5ded2006c9f16d/src/mono/wasm/runtime/invoke-js.ts + } + public static When_SingleStringNet7(value: string): string { + return value; } public When_IntPtr(pParams: number, pReturn: number): boolean { diff --git a/src/Uno.UI.Wasm.Tests/tsconfig.json b/src/Uno.UI.Wasm.Tests/tsconfig.json index bf34127aa338..93d628f4bfab 100644 --- a/src/Uno.UI.Wasm.Tests/tsconfig.json +++ b/src/Uno.UI.Wasm.Tests/tsconfig.json @@ -4,7 +4,7 @@ "declaration": true, "diagnostics": true, "noImplicitAny": true, - "outFile": "WasmScripts/UnitTests.js", + // "outFile": "WasmScripts/UnitTests.js", //"inlineSourceMap": true, "locale": "en-US", "target": "ES2017", diff --git a/src/Uno.UI.XamlHost.Skia.Wpf/Uno.UI.XamlHost.Skia.Wpf.csproj b/src/Uno.UI.XamlHost.Skia.Wpf/Uno.UI.XamlHost.Skia.Wpf.csproj index a237bd06767b..4a5c00f39ffd 100644 --- a/src/Uno.UI.XamlHost.Skia.Wpf/Uno.UI.XamlHost.Skia.Wpf.csproj +++ b/src/Uno.UI.XamlHost.Skia.Wpf/Uno.UI.XamlHost.Skia.Wpf.csproj @@ -4,6 +4,10 @@ net47;netcoreapp3.1 + + $(TargetFrameworks);net7.0-windows + + diff --git a/src/Uno.UI.XamlHost/Uno.UI.XamlHost.Reference.csproj b/src/Uno.UI.XamlHost/Uno.UI.XamlHost.Reference.csproj new file mode 100644 index 000000000000..a3b9e9013afa --- /dev/null +++ b/src/Uno.UI.XamlHost/Uno.UI.XamlHost.Reference.csproj @@ -0,0 +1,42 @@ + + + netstandard2.0 + + + + $(TargetFrameworks);net7.0 + + + + $(UnoTargetFrameworkOverride) + + + + Uno.UI.XamlHost + Uno.UI.XamlHost + $(DefineConstants);XAMARIN;IS_UNO;IS_UNO_UI_XamlHost_PROJECT + true + + $(NoWarn);NU1701 + + false + true + + Reference + + + + + + + + + + + + + + + + + diff --git a/src/Uno.UI.XamlHost/Uno.UI.XamlHost.Skia.csproj b/src/Uno.UI.XamlHost/Uno.UI.XamlHost.Skia.csproj index 503504cd7c98..1f4742441d73 100644 --- a/src/Uno.UI.XamlHost/Uno.UI.XamlHost.Skia.csproj +++ b/src/Uno.UI.XamlHost/Uno.UI.XamlHost.Skia.csproj @@ -3,6 +3,10 @@ netstandard2.0 + + $(TargetFrameworks);net7.0 + + diff --git a/src/Uno.UI.XamlHost/Uno.UI.XamlHost.Wasm.csproj b/src/Uno.UI.XamlHost/Uno.UI.XamlHost.Wasm.csproj index 0fedfec92a9e..9e8c5e94ab8b 100644 --- a/src/Uno.UI.XamlHost/Uno.UI.XamlHost.Wasm.csproj +++ b/src/Uno.UI.XamlHost/Uno.UI.XamlHost.Wasm.csproj @@ -4,6 +4,10 @@ netstandard2.0 + + $(TargetFrameworks);net7.0 + + diff --git a/src/Uno.UI.sln b/src/Uno.UI.sln index 85885d5477f6..fd6070d9b6ee 100644 --- a/src/Uno.UI.sln +++ b/src/Uno.UI.sln @@ -224,28 +224,46 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Uno.UI.RemoteControl.Server EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Uno.Foundation.net6", "Uno.Foundation\Uno.Foundation.net6.csproj", "{C473858B-8ECF-4476-8CBA-05EA456FFE0E}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Uno.Foundation.Reference", "Uno.Foundation\Uno.Foundation.Reference.csproj", "{0473858B-8ECF-4476-8CBA-05EA456FFE0E}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Uno.net6", "Uno.UWP\Uno.net6.csproj", "{2C4D969A-AF2B-4C78-AF04-5ECE47F7D14C}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Uno.Reference", "Uno.UWP\Uno.Reference.csproj", "{0C4D969A-AF2B-4C78-AF04-5ECE47F7D14C}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Uno.UI.net6", "Uno.UI\Uno.UI.net6.csproj", "{C1AF1FBC-D11D-441D-AD07-5FF2FE295C0D}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Uno.UI.Reference", "Uno.UI\Uno.UI.Reference.csproj", "{01AF1FBC-D11D-441D-AD07-5FF2FE295C0D}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Uno.UI.BindingHelper.Android.net6", "Uno.UI.BindingHelper.Android\Uno.UI.BindingHelper.Android.net6.csproj", "{1EC49129-3FB1-4045-9859-03F72CAD2913}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Uno.Xaml.net6", "SourceGenerators\System.Xaml\Uno.Xaml.net6.csproj", "{4DB56B75-B691-4F8B-879F-D7F36EEE6187}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Uno.Xaml.Reference", "SourceGenerators\System.Xaml\Uno.Xaml.Reference.csproj", "{0DB56B75-B691-4F8B-879F-D7F36EEE6187}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SamplesApp.net6mobile", "SamplesApp\SamplesApp.net6mobile\SamplesApp.net6mobile.csproj", "{3C272635-C7D1-444C-86C2-CB95E367D13D}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Uno.UI.Toolkit.net6", "Uno.UI.Toolkit\Uno.UI.Toolkit.net6.csproj", "{7B3AC6D8-2660-4FC2-9633-F8DFC0F32012}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Uno.UI.Toolkit.Reference", "Uno.UI.Toolkit\Uno.UI.Toolkit.Reference.csproj", "{0B3AC6D8-2660-4FC2-9633-F8DFC0F32012}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Uno.UI.Lottie.net6", "AddIns\Uno.UI.Lottie\Uno.UI.Lottie.net6.csproj", "{CA07C58C-D4E6-4432-8241-55FA016DEA41}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Uno.UI.Lottie.Reference", "AddIns\Uno.UI.Lottie\Uno.UI.Lottie.Reference.csproj", "{57EBE08D-75E9-4024-A7F6-C67752B1DCA0}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Uno.UI.RuntimeTests.net6", "Uno.UI.RuntimeTests\Uno.UI.RuntimeTests.net6.csproj", "{4A5E7CC0-881A-450F-91E0-F5D66F559ADF}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Uno.UI.FluentTheme.net6", "Uno.UI.FluentTheme\Uno.UI.FluentTheme.net6.csproj", "{17802FE5-5A70-42DE-816A-FCC5776A3E02}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Uno.UI.FluentTheme.Reference", "Uno.UI.FluentTheme\Uno.UI.FluentTheme.Reference.csproj", "{07802FE5-5A70-42DE-816A-FCC5776A3E02}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Uno.UI.MSAL.net6", "AddIns\Uno.UI.MSAL\Uno.UI.MSAL.net6.csproj", "{17BB7190-F406-4A26-9C44-4F494B24CF83}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Uno.UI.MSAL.Reference", "AddIns\Uno.UI.MSAL\Uno.UI.MSAL.Reference.csproj", "{07BB7190-F406-4A26-9C44-4F494B24CF83}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Uno.UI.RemoteControl.net6", "Uno.UI.RemoteControl\Uno.UI.RemoteControl.net6.csproj", "{717B3451-3CE4-4FF3-9D7E-3E90348214EA}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Uno.UI.RemoteControl.Reference", "Uno.UI.RemoteControl\Uno.UI.RemoteControl.Reference.csproj", "{017B3451-3CE4-4FF3-9D7E-3E90348214EA}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Uno.UI.Runtime.Skia.Linux.FrameBuffer", "Uno.UI.Runtime.Skia.Linux.FrameBuffer\Uno.UI.Runtime.Skia.Linux.FrameBuffer.csproj", "{AA89E8AC-40EF-4911-99B5-55228188446A}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SamplesApp.Skia.Linux.FrameBuffer", "SamplesApp\SamplesApp.Skia.Linux.FrameBuffer\SamplesApp.Skia.Linux.FrameBuffer.csproj", "{76EBBF09-F39F-48C2-BEE9-9DF5F8EC6A49}" @@ -264,6 +282,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Uno.UI.FluentTheme.v1", "Un EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Uno.UI.FluentTheme.v1.net6", "Uno.UI.FluentTheme.v1\Uno.UI.FluentTheme.v1.net6.csproj", "{34833538-6378-4592-B8DD-929C9F4B0E5C}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Uno.UI.FluentTheme.v1.Reference", "Uno.UI.FluentTheme.v1\Uno.UI.FluentTheme.v1.Reference.csproj", "{04833538-6378-4592-B8DD-929C9F4B0E5C}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Uno.UI.FluentTheme.v1.Skia", "Uno.UI.FluentTheme.v1\Uno.UI.FluentTheme.v1.Skia.csproj", "{8F85881F-05D5-46C8-BBA8-C1CA740C74E6}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Uno.UI.FluentTheme.v1.Wasm", "Uno.UI.FluentTheme.v1\Uno.UI.FluentTheme.v1.Wasm.csproj", "{D297142A-6F19-476F-B6FF-552FC57E1A9A}" @@ -272,6 +292,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Uno.UI.FluentTheme.v2", "Un EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Uno.UI.FluentTheme.v2.net6", "Uno.UI.FluentTheme.v2\Uno.UI.FluentTheme.v2.net6.csproj", "{CDE9C243-5CDC-4DF6-B82F-B9AF4B35A284}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Uno.UI.FluentTheme.v2.Reference", "Uno.UI.FluentTheme.v2\Uno.UI.FluentTheme.v2.Reference.csproj", "{0DE9C243-5CDC-4DF6-B82F-B9AF4B35A284}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Uno.UI.FluentTheme.v2.Skia", "Uno.UI.FluentTheme.v2\Uno.UI.FluentTheme.v2.Skia.csproj", "{54E27C52-4157-4585-B03F-184D8FBCAE3F}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Uno.UI.FluentTheme.v2.Wasm", "Uno.UI.FluentTheme.v2\Uno.UI.FluentTheme.v2.Wasm.csproj", "{AD35E340-34DF-4FA9-B545-B9FBB72D3A2E}" @@ -292,6 +314,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Uno.UI.Composition", "Uno.U EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Uno.UI.Composition.net6", "Uno.UI.Composition\Uno.UI.Composition.net6.csproj", "{1DC9D120-524B-41E5-8988-B4763F6244A1}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Uno.UI.Composition.Reference", "Uno.UI.Composition\Uno.UI.Composition.Reference.csproj", "{0DC9D120-524B-41E5-8988-B4763F6244A1}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Uno.UI.Composition.Wasm", "Uno.UI.Composition\Uno.UI.Composition.Wasm.csproj", "{1E649F79-45AB-402A-A7DE-D4F2D0BBF1E5}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Uno.UI.Dispatching.Skia", "Uno.UI.Dispatching\Uno.UI.Dispatching.Skia.csproj", "{8386DF84-BB52-425F-A36F-E966865D7096}" @@ -300,6 +324,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Uno.UI.Dispatching.Wasm", " EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Uno.UI.Dispatching.net6", "Uno.UI.Dispatching\Uno.UI.Dispatching.net6.csproj", "{45C0AAC5-6797-4E22-9A4C-C7EE6369A53F}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Uno.UI.Dispatching.Reference", "Uno.UI.Dispatching\Uno.UI.Dispatching.Reference.csproj", "{05C0AAC5-6797-4E22-9A4C-C7EE6369A53F}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Uno.UI.Dispatching", "Uno.UI.Dispatching\Uno.UI.Dispatching.csproj", "{AC6E2BD5-3902-46F4-8EA9-9BEF09D8B39C}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnoSolutionTemplate.Wizard.2022", "SolutionTemplate\UnoSolutionTemplate.Wizard.2022\UnoSolutionTemplate.Wizard.2022.csproj", "{138FF660-5EE6-475B-828C-81F96E9BE142}" @@ -324,6 +350,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Uno.UI.XamlHost", "Uno.UI.X EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Uno.UI.XamlHost.net6", "Uno.UI.XamlHost\Uno.UI.XamlHost.net6.csproj", "{2CA6C2AE-BC23-435D-B81D-58C315EEB709}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Uno.UI.XamlHost.Reference", "Uno.UI.XamlHost\Uno.UI.XamlHost.Reference.csproj", "{0CA6C2AE-BC23-435D-B81D-58C315EEB709}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Uno.UI.XamlHost.Skia", "Uno.UI.XamlHost\Uno.UI.XamlHost.Skia.csproj", "{F4C7902D-5143-4351-8C0E-0C4527C52735}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Uno.UI.XamlHost.Wasm", "Uno.UI.XamlHost\Uno.UI.XamlHost.Wasm.csproj", "{F1F1BBD7-93D0-4EFE-82A0-AD4EEDD229D0}" @@ -3788,6 +3816,48 @@ Global {C473858B-8ECF-4476-8CBA-05EA456FFE0E}.Release|x64.Build.0 = Release|Any CPU {C473858B-8ECF-4476-8CBA-05EA456FFE0E}.Release|x86.ActiveCfg = Release|Any CPU {C473858B-8ECF-4476-8CBA-05EA456FFE0E}.Release|x86.Build.0 = Release|Any CPU + {0473858B-8ECF-4476-8CBA-05EA456FFE0E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0473858B-8ECF-4476-8CBA-05EA456FFE0E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0473858B-8ECF-4476-8CBA-05EA456FFE0E}.Debug|ARM.ActiveCfg = Debug|Any CPU + {0473858B-8ECF-4476-8CBA-05EA456FFE0E}.Debug|ARM.Build.0 = Debug|Any CPU + {0473858B-8ECF-4476-8CBA-05EA456FFE0E}.Debug|ARM64.ActiveCfg = Debug|Any CPU + {0473858B-8ECF-4476-8CBA-05EA456FFE0E}.Debug|ARM64.Build.0 = Debug|Any CPU + {0473858B-8ECF-4476-8CBA-05EA456FFE0E}.Debug|iPhone.ActiveCfg = Debug|Any CPU + {0473858B-8ECF-4476-8CBA-05EA456FFE0E}.Debug|iPhone.Build.0 = Debug|Any CPU + {0473858B-8ECF-4476-8CBA-05EA456FFE0E}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {0473858B-8ECF-4476-8CBA-05EA456FFE0E}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU + {0473858B-8ECF-4476-8CBA-05EA456FFE0E}.Debug|x64.ActiveCfg = Debug|Any CPU + {0473858B-8ECF-4476-8CBA-05EA456FFE0E}.Debug|x64.Build.0 = Debug|Any CPU + {0473858B-8ECF-4476-8CBA-05EA456FFE0E}.Debug|x86.ActiveCfg = Debug|Any CPU + {0473858B-8ECF-4476-8CBA-05EA456FFE0E}.Debug|x86.Build.0 = Debug|Any CPU + {0473858B-8ECF-4476-8CBA-05EA456FFE0E}.Release_NoSamples|Any CPU.ActiveCfg = Release|Any CPU + {0473858B-8ECF-4476-8CBA-05EA456FFE0E}.Release_NoSamples|Any CPU.Build.0 = Release|Any CPU + {0473858B-8ECF-4476-8CBA-05EA456FFE0E}.Release_NoSamples|ARM.ActiveCfg = Release|Any CPU + {0473858B-8ECF-4476-8CBA-05EA456FFE0E}.Release_NoSamples|ARM.Build.0 = Release|Any CPU + {0473858B-8ECF-4476-8CBA-05EA456FFE0E}.Release_NoSamples|ARM64.ActiveCfg = Release|Any CPU + {0473858B-8ECF-4476-8CBA-05EA456FFE0E}.Release_NoSamples|ARM64.Build.0 = Release|Any CPU + {0473858B-8ECF-4476-8CBA-05EA456FFE0E}.Release_NoSamples|iPhone.ActiveCfg = Release|Any CPU + {0473858B-8ECF-4476-8CBA-05EA456FFE0E}.Release_NoSamples|iPhone.Build.0 = Release|Any CPU + {0473858B-8ECF-4476-8CBA-05EA456FFE0E}.Release_NoSamples|iPhoneSimulator.ActiveCfg = Release|Any CPU + {0473858B-8ECF-4476-8CBA-05EA456FFE0E}.Release_NoSamples|iPhoneSimulator.Build.0 = Release|Any CPU + {0473858B-8ECF-4476-8CBA-05EA456FFE0E}.Release_NoSamples|x64.ActiveCfg = Release|Any CPU + {0473858B-8ECF-4476-8CBA-05EA456FFE0E}.Release_NoSamples|x64.Build.0 = Release|Any CPU + {0473858B-8ECF-4476-8CBA-05EA456FFE0E}.Release_NoSamples|x86.ActiveCfg = Release|Any CPU + {0473858B-8ECF-4476-8CBA-05EA456FFE0E}.Release_NoSamples|x86.Build.0 = Release|Any CPU + {0473858B-8ECF-4476-8CBA-05EA456FFE0E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0473858B-8ECF-4476-8CBA-05EA456FFE0E}.Release|Any CPU.Build.0 = Release|Any CPU + {0473858B-8ECF-4476-8CBA-05EA456FFE0E}.Release|ARM.ActiveCfg = Release|Any CPU + {0473858B-8ECF-4476-8CBA-05EA456FFE0E}.Release|ARM.Build.0 = Release|Any CPU + {0473858B-8ECF-4476-8CBA-05EA456FFE0E}.Release|ARM64.ActiveCfg = Release|Any CPU + {0473858B-8ECF-4476-8CBA-05EA456FFE0E}.Release|ARM64.Build.0 = Release|Any CPU + {0473858B-8ECF-4476-8CBA-05EA456FFE0E}.Release|iPhone.ActiveCfg = Release|Any CPU + {0473858B-8ECF-4476-8CBA-05EA456FFE0E}.Release|iPhone.Build.0 = Release|Any CPU + {0473858B-8ECF-4476-8CBA-05EA456FFE0E}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU + {0473858B-8ECF-4476-8CBA-05EA456FFE0E}.Release|iPhoneSimulator.Build.0 = Release|Any CPU + {0473858B-8ECF-4476-8CBA-05EA456FFE0E}.Release|x64.ActiveCfg = Release|Any CPU + {0473858B-8ECF-4476-8CBA-05EA456FFE0E}.Release|x64.Build.0 = Release|Any CPU + {0473858B-8ECF-4476-8CBA-05EA456FFE0E}.Release|x86.ActiveCfg = Release|Any CPU + {0473858B-8ECF-4476-8CBA-05EA456FFE0E}.Release|x86.Build.0 = Release|Any CPU {2C4D969A-AF2B-4C78-AF04-5ECE47F7D14C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2C4D969A-AF2B-4C78-AF04-5ECE47F7D14C}.Debug|Any CPU.Build.0 = Debug|Any CPU {2C4D969A-AF2B-4C78-AF04-5ECE47F7D14C}.Debug|ARM.ActiveCfg = Debug|Any CPU @@ -3830,6 +3900,48 @@ Global {2C4D969A-AF2B-4C78-AF04-5ECE47F7D14C}.Release|x64.Build.0 = Release|Any CPU {2C4D969A-AF2B-4C78-AF04-5ECE47F7D14C}.Release|x86.ActiveCfg = Release|Any CPU {2C4D969A-AF2B-4C78-AF04-5ECE47F7D14C}.Release|x86.Build.0 = Release|Any CPU + {0C4D969A-AF2B-4C78-AF04-5ECE47F7D14C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0C4D969A-AF2B-4C78-AF04-5ECE47F7D14C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0C4D969A-AF2B-4C78-AF04-5ECE47F7D14C}.Debug|ARM.ActiveCfg = Debug|Any CPU + {0C4D969A-AF2B-4C78-AF04-5ECE47F7D14C}.Debug|ARM.Build.0 = Debug|Any CPU + {0C4D969A-AF2B-4C78-AF04-5ECE47F7D14C}.Debug|ARM64.ActiveCfg = Debug|Any CPU + {0C4D969A-AF2B-4C78-AF04-5ECE47F7D14C}.Debug|ARM64.Build.0 = Debug|Any CPU + {0C4D969A-AF2B-4C78-AF04-5ECE47F7D14C}.Debug|iPhone.ActiveCfg = Debug|Any CPU + {0C4D969A-AF2B-4C78-AF04-5ECE47F7D14C}.Debug|iPhone.Build.0 = Debug|Any CPU + {0C4D969A-AF2B-4C78-AF04-5ECE47F7D14C}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {0C4D969A-AF2B-4C78-AF04-5ECE47F7D14C}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU + {0C4D969A-AF2B-4C78-AF04-5ECE47F7D14C}.Debug|x64.ActiveCfg = Debug|Any CPU + {0C4D969A-AF2B-4C78-AF04-5ECE47F7D14C}.Debug|x64.Build.0 = Debug|Any CPU + {0C4D969A-AF2B-4C78-AF04-5ECE47F7D14C}.Debug|x86.ActiveCfg = Debug|Any CPU + {0C4D969A-AF2B-4C78-AF04-5ECE47F7D14C}.Debug|x86.Build.0 = Debug|Any CPU + {0C4D969A-AF2B-4C78-AF04-5ECE47F7D14C}.Release_NoSamples|Any CPU.ActiveCfg = Release|Any CPU + {0C4D969A-AF2B-4C78-AF04-5ECE47F7D14C}.Release_NoSamples|Any CPU.Build.0 = Release|Any CPU + {0C4D969A-AF2B-4C78-AF04-5ECE47F7D14C}.Release_NoSamples|ARM.ActiveCfg = Release|Any CPU + {0C4D969A-AF2B-4C78-AF04-5ECE47F7D14C}.Release_NoSamples|ARM.Build.0 = Release|Any CPU + {0C4D969A-AF2B-4C78-AF04-5ECE47F7D14C}.Release_NoSamples|ARM64.ActiveCfg = Release|Any CPU + {0C4D969A-AF2B-4C78-AF04-5ECE47F7D14C}.Release_NoSamples|ARM64.Build.0 = Release|Any CPU + {0C4D969A-AF2B-4C78-AF04-5ECE47F7D14C}.Release_NoSamples|iPhone.ActiveCfg = Release|Any CPU + {0C4D969A-AF2B-4C78-AF04-5ECE47F7D14C}.Release_NoSamples|iPhone.Build.0 = Release|Any CPU + {0C4D969A-AF2B-4C78-AF04-5ECE47F7D14C}.Release_NoSamples|iPhoneSimulator.ActiveCfg = Release|Any CPU + {0C4D969A-AF2B-4C78-AF04-5ECE47F7D14C}.Release_NoSamples|iPhoneSimulator.Build.0 = Release|Any CPU + {0C4D969A-AF2B-4C78-AF04-5ECE47F7D14C}.Release_NoSamples|x64.ActiveCfg = Release|Any CPU + {0C4D969A-AF2B-4C78-AF04-5ECE47F7D14C}.Release_NoSamples|x64.Build.0 = Release|Any CPU + {0C4D969A-AF2B-4C78-AF04-5ECE47F7D14C}.Release_NoSamples|x86.ActiveCfg = Release|Any CPU + {0C4D969A-AF2B-4C78-AF04-5ECE47F7D14C}.Release_NoSamples|x86.Build.0 = Release|Any CPU + {0C4D969A-AF2B-4C78-AF04-5ECE47F7D14C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0C4D969A-AF2B-4C78-AF04-5ECE47F7D14C}.Release|Any CPU.Build.0 = Release|Any CPU + {0C4D969A-AF2B-4C78-AF04-5ECE47F7D14C}.Release|ARM.ActiveCfg = Release|Any CPU + {0C4D969A-AF2B-4C78-AF04-5ECE47F7D14C}.Release|ARM.Build.0 = Release|Any CPU + {0C4D969A-AF2B-4C78-AF04-5ECE47F7D14C}.Release|ARM64.ActiveCfg = Release|Any CPU + {0C4D969A-AF2B-4C78-AF04-5ECE47F7D14C}.Release|ARM64.Build.0 = Release|Any CPU + {0C4D969A-AF2B-4C78-AF04-5ECE47F7D14C}.Release|iPhone.ActiveCfg = Release|Any CPU + {0C4D969A-AF2B-4C78-AF04-5ECE47F7D14C}.Release|iPhone.Build.0 = Release|Any CPU + {0C4D969A-AF2B-4C78-AF04-5ECE47F7D14C}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU + {0C4D969A-AF2B-4C78-AF04-5ECE47F7D14C}.Release|iPhoneSimulator.Build.0 = Release|Any CPU + {0C4D969A-AF2B-4C78-AF04-5ECE47F7D14C}.Release|x64.ActiveCfg = Release|Any CPU + {0C4D969A-AF2B-4C78-AF04-5ECE47F7D14C}.Release|x64.Build.0 = Release|Any CPU + {0C4D969A-AF2B-4C78-AF04-5ECE47F7D14C}.Release|x86.ActiveCfg = Release|Any CPU + {0C4D969A-AF2B-4C78-AF04-5ECE47F7D14C}.Release|x86.Build.0 = Release|Any CPU {C1AF1FBC-D11D-441D-AD07-5FF2FE295C0D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {C1AF1FBC-D11D-441D-AD07-5FF2FE295C0D}.Debug|Any CPU.Build.0 = Debug|Any CPU {C1AF1FBC-D11D-441D-AD07-5FF2FE295C0D}.Debug|ARM.ActiveCfg = Debug|Any CPU @@ -3872,6 +3984,48 @@ Global {C1AF1FBC-D11D-441D-AD07-5FF2FE295C0D}.Release|x64.Build.0 = Release|Any CPU {C1AF1FBC-D11D-441D-AD07-5FF2FE295C0D}.Release|x86.ActiveCfg = Release|Any CPU {C1AF1FBC-D11D-441D-AD07-5FF2FE295C0D}.Release|x86.Build.0 = Release|Any CPU + {01AF1FBC-D11D-441D-AD07-5FF2FE295C0D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {01AF1FBC-D11D-441D-AD07-5FF2FE295C0D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {01AF1FBC-D11D-441D-AD07-5FF2FE295C0D}.Debug|ARM.ActiveCfg = Debug|Any CPU + {01AF1FBC-D11D-441D-AD07-5FF2FE295C0D}.Debug|ARM.Build.0 = Debug|Any CPU + {01AF1FBC-D11D-441D-AD07-5FF2FE295C0D}.Debug|ARM64.ActiveCfg = Debug|Any CPU + {01AF1FBC-D11D-441D-AD07-5FF2FE295C0D}.Debug|ARM64.Build.0 = Debug|Any CPU + {01AF1FBC-D11D-441D-AD07-5FF2FE295C0D}.Debug|iPhone.ActiveCfg = Debug|Any CPU + {01AF1FBC-D11D-441D-AD07-5FF2FE295C0D}.Debug|iPhone.Build.0 = Debug|Any CPU + {01AF1FBC-D11D-441D-AD07-5FF2FE295C0D}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {01AF1FBC-D11D-441D-AD07-5FF2FE295C0D}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU + {01AF1FBC-D11D-441D-AD07-5FF2FE295C0D}.Debug|x64.ActiveCfg = Debug|Any CPU + {01AF1FBC-D11D-441D-AD07-5FF2FE295C0D}.Debug|x64.Build.0 = Debug|Any CPU + {01AF1FBC-D11D-441D-AD07-5FF2FE295C0D}.Debug|x86.ActiveCfg = Debug|Any CPU + {01AF1FBC-D11D-441D-AD07-5FF2FE295C0D}.Debug|x86.Build.0 = Debug|Any CPU + {01AF1FBC-D11D-441D-AD07-5FF2FE295C0D}.Release_NoSamples|Any CPU.ActiveCfg = Release|Any CPU + {01AF1FBC-D11D-441D-AD07-5FF2FE295C0D}.Release_NoSamples|Any CPU.Build.0 = Release|Any CPU + {01AF1FBC-D11D-441D-AD07-5FF2FE295C0D}.Release_NoSamples|ARM.ActiveCfg = Release|Any CPU + {01AF1FBC-D11D-441D-AD07-5FF2FE295C0D}.Release_NoSamples|ARM.Build.0 = Release|Any CPU + {01AF1FBC-D11D-441D-AD07-5FF2FE295C0D}.Release_NoSamples|ARM64.ActiveCfg = Release|Any CPU + {01AF1FBC-D11D-441D-AD07-5FF2FE295C0D}.Release_NoSamples|ARM64.Build.0 = Release|Any CPU + {01AF1FBC-D11D-441D-AD07-5FF2FE295C0D}.Release_NoSamples|iPhone.ActiveCfg = Release|Any CPU + {01AF1FBC-D11D-441D-AD07-5FF2FE295C0D}.Release_NoSamples|iPhone.Build.0 = Release|Any CPU + {01AF1FBC-D11D-441D-AD07-5FF2FE295C0D}.Release_NoSamples|iPhoneSimulator.ActiveCfg = Release|Any CPU + {01AF1FBC-D11D-441D-AD07-5FF2FE295C0D}.Release_NoSamples|iPhoneSimulator.Build.0 = Release|Any CPU + {01AF1FBC-D11D-441D-AD07-5FF2FE295C0D}.Release_NoSamples|x64.ActiveCfg = Release|Any CPU + {01AF1FBC-D11D-441D-AD07-5FF2FE295C0D}.Release_NoSamples|x64.Build.0 = Release|Any CPU + {01AF1FBC-D11D-441D-AD07-5FF2FE295C0D}.Release_NoSamples|x86.ActiveCfg = Release|Any CPU + {01AF1FBC-D11D-441D-AD07-5FF2FE295C0D}.Release_NoSamples|x86.Build.0 = Release|Any CPU + {01AF1FBC-D11D-441D-AD07-5FF2FE295C0D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {01AF1FBC-D11D-441D-AD07-5FF2FE295C0D}.Release|Any CPU.Build.0 = Release|Any CPU + {01AF1FBC-D11D-441D-AD07-5FF2FE295C0D}.Release|ARM.ActiveCfg = Release|Any CPU + {01AF1FBC-D11D-441D-AD07-5FF2FE295C0D}.Release|ARM.Build.0 = Release|Any CPU + {01AF1FBC-D11D-441D-AD07-5FF2FE295C0D}.Release|ARM64.ActiveCfg = Release|Any CPU + {01AF1FBC-D11D-441D-AD07-5FF2FE295C0D}.Release|ARM64.Build.0 = Release|Any CPU + {01AF1FBC-D11D-441D-AD07-5FF2FE295C0D}.Release|iPhone.ActiveCfg = Release|Any CPU + {01AF1FBC-D11D-441D-AD07-5FF2FE295C0D}.Release|iPhone.Build.0 = Release|Any CPU + {01AF1FBC-D11D-441D-AD07-5FF2FE295C0D}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU + {01AF1FBC-D11D-441D-AD07-5FF2FE295C0D}.Release|iPhoneSimulator.Build.0 = Release|Any CPU + {01AF1FBC-D11D-441D-AD07-5FF2FE295C0D}.Release|x64.ActiveCfg = Release|Any CPU + {01AF1FBC-D11D-441D-AD07-5FF2FE295C0D}.Release|x64.Build.0 = Release|Any CPU + {01AF1FBC-D11D-441D-AD07-5FF2FE295C0D}.Release|x86.ActiveCfg = Release|Any CPU + {01AF1FBC-D11D-441D-AD07-5FF2FE295C0D}.Release|x86.Build.0 = Release|Any CPU {1EC49129-3FB1-4045-9859-03F72CAD2913}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1EC49129-3FB1-4045-9859-03F72CAD2913}.Debug|Any CPU.Build.0 = Debug|Any CPU {1EC49129-3FB1-4045-9859-03F72CAD2913}.Debug|ARM.ActiveCfg = Debug|Any CPU @@ -3956,6 +4110,48 @@ Global {4DB56B75-B691-4F8B-879F-D7F36EEE6187}.Release|x64.Build.0 = Release|Any CPU {4DB56B75-B691-4F8B-879F-D7F36EEE6187}.Release|x86.ActiveCfg = Release|Any CPU {4DB56B75-B691-4F8B-879F-D7F36EEE6187}.Release|x86.Build.0 = Release|Any CPU + {0DB56B75-B691-4F8B-879F-D7F36EEE6187}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0DB56B75-B691-4F8B-879F-D7F36EEE6187}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0DB56B75-B691-4F8B-879F-D7F36EEE6187}.Debug|ARM.ActiveCfg = Debug|Any CPU + {0DB56B75-B691-4F8B-879F-D7F36EEE6187}.Debug|ARM.Build.0 = Debug|Any CPU + {0DB56B75-B691-4F8B-879F-D7F36EEE6187}.Debug|ARM64.ActiveCfg = Debug|Any CPU + {0DB56B75-B691-4F8B-879F-D7F36EEE6187}.Debug|ARM64.Build.0 = Debug|Any CPU + {0DB56B75-B691-4F8B-879F-D7F36EEE6187}.Debug|iPhone.ActiveCfg = Debug|Any CPU + {0DB56B75-B691-4F8B-879F-D7F36EEE6187}.Debug|iPhone.Build.0 = Debug|Any CPU + {0DB56B75-B691-4F8B-879F-D7F36EEE6187}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {0DB56B75-B691-4F8B-879F-D7F36EEE6187}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU + {0DB56B75-B691-4F8B-879F-D7F36EEE6187}.Debug|x64.ActiveCfg = Debug|Any CPU + {0DB56B75-B691-4F8B-879F-D7F36EEE6187}.Debug|x64.Build.0 = Debug|Any CPU + {0DB56B75-B691-4F8B-879F-D7F36EEE6187}.Debug|x86.ActiveCfg = Debug|Any CPU + {0DB56B75-B691-4F8B-879F-D7F36EEE6187}.Debug|x86.Build.0 = Debug|Any CPU + {0DB56B75-B691-4F8B-879F-D7F36EEE6187}.Release_NoSamples|Any CPU.ActiveCfg = Release|Any CPU + {0DB56B75-B691-4F8B-879F-D7F36EEE6187}.Release_NoSamples|Any CPU.Build.0 = Release|Any CPU + {0DB56B75-B691-4F8B-879F-D7F36EEE6187}.Release_NoSamples|ARM.ActiveCfg = Release|Any CPU + {0DB56B75-B691-4F8B-879F-D7F36EEE6187}.Release_NoSamples|ARM.Build.0 = Release|Any CPU + {0DB56B75-B691-4F8B-879F-D7F36EEE6187}.Release_NoSamples|ARM64.ActiveCfg = Release|Any CPU + {0DB56B75-B691-4F8B-879F-D7F36EEE6187}.Release_NoSamples|ARM64.Build.0 = Release|Any CPU + {0DB56B75-B691-4F8B-879F-D7F36EEE6187}.Release_NoSamples|iPhone.ActiveCfg = Release|Any CPU + {0DB56B75-B691-4F8B-879F-D7F36EEE6187}.Release_NoSamples|iPhone.Build.0 = Release|Any CPU + {0DB56B75-B691-4F8B-879F-D7F36EEE6187}.Release_NoSamples|iPhoneSimulator.ActiveCfg = Release|Any CPU + {0DB56B75-B691-4F8B-879F-D7F36EEE6187}.Release_NoSamples|iPhoneSimulator.Build.0 = Release|Any CPU + {0DB56B75-B691-4F8B-879F-D7F36EEE6187}.Release_NoSamples|x64.ActiveCfg = Release|Any CPU + {0DB56B75-B691-4F8B-879F-D7F36EEE6187}.Release_NoSamples|x64.Build.0 = Release|Any CPU + {0DB56B75-B691-4F8B-879F-D7F36EEE6187}.Release_NoSamples|x86.ActiveCfg = Release|Any CPU + {0DB56B75-B691-4F8B-879F-D7F36EEE6187}.Release_NoSamples|x86.Build.0 = Release|Any CPU + {0DB56B75-B691-4F8B-879F-D7F36EEE6187}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0DB56B75-B691-4F8B-879F-D7F36EEE6187}.Release|Any CPU.Build.0 = Release|Any CPU + {0DB56B75-B691-4F8B-879F-D7F36EEE6187}.Release|ARM.ActiveCfg = Release|Any CPU + {0DB56B75-B691-4F8B-879F-D7F36EEE6187}.Release|ARM.Build.0 = Release|Any CPU + {0DB56B75-B691-4F8B-879F-D7F36EEE6187}.Release|ARM64.ActiveCfg = Release|Any CPU + {0DB56B75-B691-4F8B-879F-D7F36EEE6187}.Release|ARM64.Build.0 = Release|Any CPU + {0DB56B75-B691-4F8B-879F-D7F36EEE6187}.Release|iPhone.ActiveCfg = Release|Any CPU + {0DB56B75-B691-4F8B-879F-D7F36EEE6187}.Release|iPhone.Build.0 = Release|Any CPU + {0DB56B75-B691-4F8B-879F-D7F36EEE6187}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU + {0DB56B75-B691-4F8B-879F-D7F36EEE6187}.Release|iPhoneSimulator.Build.0 = Release|Any CPU + {0DB56B75-B691-4F8B-879F-D7F36EEE6187}.Release|x64.ActiveCfg = Release|Any CPU + {0DB56B75-B691-4F8B-879F-D7F36EEE6187}.Release|x64.Build.0 = Release|Any CPU + {0DB56B75-B691-4F8B-879F-D7F36EEE6187}.Release|x86.ActiveCfg = Release|Any CPU + {0DB56B75-B691-4F8B-879F-D7F36EEE6187}.Release|x86.Build.0 = Release|Any CPU {3C272635-C7D1-444C-86C2-CB95E367D13D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {3C272635-C7D1-444C-86C2-CB95E367D13D}.Debug|Any CPU.Build.0 = Debug|Any CPU {3C272635-C7D1-444C-86C2-CB95E367D13D}.Debug|Any CPU.Deploy.0 = Debug|Any CPU @@ -4042,6 +4238,48 @@ Global {7B3AC6D8-2660-4FC2-9633-F8DFC0F32012}.Release|x64.Build.0 = Release|Any CPU {7B3AC6D8-2660-4FC2-9633-F8DFC0F32012}.Release|x86.ActiveCfg = Release|Any CPU {7B3AC6D8-2660-4FC2-9633-F8DFC0F32012}.Release|x86.Build.0 = Release|Any CPU + {0B3AC6D8-2660-4FC2-9633-F8DFC0F32012}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0B3AC6D8-2660-4FC2-9633-F8DFC0F32012}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0B3AC6D8-2660-4FC2-9633-F8DFC0F32012}.Debug|ARM.ActiveCfg = Debug|Any CPU + {0B3AC6D8-2660-4FC2-9633-F8DFC0F32012}.Debug|ARM.Build.0 = Debug|Any CPU + {0B3AC6D8-2660-4FC2-9633-F8DFC0F32012}.Debug|ARM64.ActiveCfg = Debug|Any CPU + {0B3AC6D8-2660-4FC2-9633-F8DFC0F32012}.Debug|ARM64.Build.0 = Debug|Any CPU + {0B3AC6D8-2660-4FC2-9633-F8DFC0F32012}.Debug|iPhone.ActiveCfg = Debug|Any CPU + {0B3AC6D8-2660-4FC2-9633-F8DFC0F32012}.Debug|iPhone.Build.0 = Debug|Any CPU + {0B3AC6D8-2660-4FC2-9633-F8DFC0F32012}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {0B3AC6D8-2660-4FC2-9633-F8DFC0F32012}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU + {0B3AC6D8-2660-4FC2-9633-F8DFC0F32012}.Debug|x64.ActiveCfg = Debug|Any CPU + {0B3AC6D8-2660-4FC2-9633-F8DFC0F32012}.Debug|x64.Build.0 = Debug|Any CPU + {0B3AC6D8-2660-4FC2-9633-F8DFC0F32012}.Debug|x86.ActiveCfg = Debug|Any CPU + {0B3AC6D8-2660-4FC2-9633-F8DFC0F32012}.Debug|x86.Build.0 = Debug|Any CPU + {0B3AC6D8-2660-4FC2-9633-F8DFC0F32012}.Release_NoSamples|Any CPU.ActiveCfg = Release|Any CPU + {0B3AC6D8-2660-4FC2-9633-F8DFC0F32012}.Release_NoSamples|Any CPU.Build.0 = Release|Any CPU + {0B3AC6D8-2660-4FC2-9633-F8DFC0F32012}.Release_NoSamples|ARM.ActiveCfg = Release|Any CPU + {0B3AC6D8-2660-4FC2-9633-F8DFC0F32012}.Release_NoSamples|ARM.Build.0 = Release|Any CPU + {0B3AC6D8-2660-4FC2-9633-F8DFC0F32012}.Release_NoSamples|ARM64.ActiveCfg = Release|Any CPU + {0B3AC6D8-2660-4FC2-9633-F8DFC0F32012}.Release_NoSamples|ARM64.Build.0 = Release|Any CPU + {0B3AC6D8-2660-4FC2-9633-F8DFC0F32012}.Release_NoSamples|iPhone.ActiveCfg = Release|Any CPU + {0B3AC6D8-2660-4FC2-9633-F8DFC0F32012}.Release_NoSamples|iPhone.Build.0 = Release|Any CPU + {0B3AC6D8-2660-4FC2-9633-F8DFC0F32012}.Release_NoSamples|iPhoneSimulator.ActiveCfg = Release|Any CPU + {0B3AC6D8-2660-4FC2-9633-F8DFC0F32012}.Release_NoSamples|iPhoneSimulator.Build.0 = Release|Any CPU + {0B3AC6D8-2660-4FC2-9633-F8DFC0F32012}.Release_NoSamples|x64.ActiveCfg = Release|Any CPU + {0B3AC6D8-2660-4FC2-9633-F8DFC0F32012}.Release_NoSamples|x64.Build.0 = Release|Any CPU + {0B3AC6D8-2660-4FC2-9633-F8DFC0F32012}.Release_NoSamples|x86.ActiveCfg = Release|Any CPU + {0B3AC6D8-2660-4FC2-9633-F8DFC0F32012}.Release_NoSamples|x86.Build.0 = Release|Any CPU + {0B3AC6D8-2660-4FC2-9633-F8DFC0F32012}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0B3AC6D8-2660-4FC2-9633-F8DFC0F32012}.Release|Any CPU.Build.0 = Release|Any CPU + {0B3AC6D8-2660-4FC2-9633-F8DFC0F32012}.Release|ARM.ActiveCfg = Release|Any CPU + {0B3AC6D8-2660-4FC2-9633-F8DFC0F32012}.Release|ARM.Build.0 = Release|Any CPU + {0B3AC6D8-2660-4FC2-9633-F8DFC0F32012}.Release|ARM64.ActiveCfg = Release|Any CPU + {0B3AC6D8-2660-4FC2-9633-F8DFC0F32012}.Release|ARM64.Build.0 = Release|Any CPU + {0B3AC6D8-2660-4FC2-9633-F8DFC0F32012}.Release|iPhone.ActiveCfg = Release|Any CPU + {0B3AC6D8-2660-4FC2-9633-F8DFC0F32012}.Release|iPhone.Build.0 = Release|Any CPU + {0B3AC6D8-2660-4FC2-9633-F8DFC0F32012}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU + {0B3AC6D8-2660-4FC2-9633-F8DFC0F32012}.Release|iPhoneSimulator.Build.0 = Release|Any CPU + {0B3AC6D8-2660-4FC2-9633-F8DFC0F32012}.Release|x64.ActiveCfg = Release|Any CPU + {0B3AC6D8-2660-4FC2-9633-F8DFC0F32012}.Release|x64.Build.0 = Release|Any CPU + {0B3AC6D8-2660-4FC2-9633-F8DFC0F32012}.Release|x86.ActiveCfg = Release|Any CPU + {0B3AC6D8-2660-4FC2-9633-F8DFC0F32012}.Release|x86.Build.0 = Release|Any CPU {CA07C58C-D4E6-4432-8241-55FA016DEA41}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {CA07C58C-D4E6-4432-8241-55FA016DEA41}.Debug|Any CPU.Build.0 = Debug|Any CPU {CA07C58C-D4E6-4432-8241-55FA016DEA41}.Debug|ARM.ActiveCfg = Debug|Any CPU @@ -4084,6 +4322,48 @@ Global {CA07C58C-D4E6-4432-8241-55FA016DEA41}.Release|x64.Build.0 = Release|Any CPU {CA07C58C-D4E6-4432-8241-55FA016DEA41}.Release|x86.ActiveCfg = Release|Any CPU {CA07C58C-D4E6-4432-8241-55FA016DEA41}.Release|x86.Build.0 = Release|Any CPU + {57EBE08D-75E9-4024-A7F6-C67752B1DCA0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {57EBE08D-75E9-4024-A7F6-C67752B1DCA0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {57EBE08D-75E9-4024-A7F6-C67752B1DCA0}.Debug|ARM.ActiveCfg = Debug|Any CPU + {57EBE08D-75E9-4024-A7F6-C67752B1DCA0}.Debug|ARM.Build.0 = Debug|Any CPU + {57EBE08D-75E9-4024-A7F6-C67752B1DCA0}.Debug|ARM64.ActiveCfg = Debug|Any CPU + {57EBE08D-75E9-4024-A7F6-C67752B1DCA0}.Debug|ARM64.Build.0 = Debug|Any CPU + {57EBE08D-75E9-4024-A7F6-C67752B1DCA0}.Debug|iPhone.ActiveCfg = Debug|Any CPU + {57EBE08D-75E9-4024-A7F6-C67752B1DCA0}.Debug|iPhone.Build.0 = Debug|Any CPU + {57EBE08D-75E9-4024-A7F6-C67752B1DCA0}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {57EBE08D-75E9-4024-A7F6-C67752B1DCA0}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU + {57EBE08D-75E9-4024-A7F6-C67752B1DCA0}.Debug|x64.ActiveCfg = Debug|Any CPU + {57EBE08D-75E9-4024-A7F6-C67752B1DCA0}.Debug|x64.Build.0 = Debug|Any CPU + {57EBE08D-75E9-4024-A7F6-C67752B1DCA0}.Debug|x86.ActiveCfg = Debug|Any CPU + {57EBE08D-75E9-4024-A7F6-C67752B1DCA0}.Debug|x86.Build.0 = Debug|Any CPU + {57EBE08D-75E9-4024-A7F6-C67752B1DCA0}.Release_NoSamples|Any CPU.ActiveCfg = Release|Any CPU + {57EBE08D-75E9-4024-A7F6-C67752B1DCA0}.Release_NoSamples|Any CPU.Build.0 = Release|Any CPU + {57EBE08D-75E9-4024-A7F6-C67752B1DCA0}.Release_NoSamples|ARM.ActiveCfg = Release|Any CPU + {57EBE08D-75E9-4024-A7F6-C67752B1DCA0}.Release_NoSamples|ARM.Build.0 = Release|Any CPU + {57EBE08D-75E9-4024-A7F6-C67752B1DCA0}.Release_NoSamples|ARM64.ActiveCfg = Release|Any CPU + {57EBE08D-75E9-4024-A7F6-C67752B1DCA0}.Release_NoSamples|ARM64.Build.0 = Release|Any CPU + {57EBE08D-75E9-4024-A7F6-C67752B1DCA0}.Release_NoSamples|iPhone.ActiveCfg = Release|Any CPU + {57EBE08D-75E9-4024-A7F6-C67752B1DCA0}.Release_NoSamples|iPhone.Build.0 = Release|Any CPU + {57EBE08D-75E9-4024-A7F6-C67752B1DCA0}.Release_NoSamples|iPhoneSimulator.ActiveCfg = Release|Any CPU + {57EBE08D-75E9-4024-A7F6-C67752B1DCA0}.Release_NoSamples|iPhoneSimulator.Build.0 = Release|Any CPU + {57EBE08D-75E9-4024-A7F6-C67752B1DCA0}.Release_NoSamples|x64.ActiveCfg = Release|Any CPU + {57EBE08D-75E9-4024-A7F6-C67752B1DCA0}.Release_NoSamples|x64.Build.0 = Release|Any CPU + {57EBE08D-75E9-4024-A7F6-C67752B1DCA0}.Release_NoSamples|x86.ActiveCfg = Release|Any CPU + {57EBE08D-75E9-4024-A7F6-C67752B1DCA0}.Release_NoSamples|x86.Build.0 = Release|Any CPU + {57EBE08D-75E9-4024-A7F6-C67752B1DCA0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {57EBE08D-75E9-4024-A7F6-C67752B1DCA0}.Release|Any CPU.Build.0 = Release|Any CPU + {57EBE08D-75E9-4024-A7F6-C67752B1DCA0}.Release|ARM.ActiveCfg = Release|Any CPU + {57EBE08D-75E9-4024-A7F6-C67752B1DCA0}.Release|ARM.Build.0 = Release|Any CPU + {57EBE08D-75E9-4024-A7F6-C67752B1DCA0}.Release|ARM64.ActiveCfg = Release|Any CPU + {57EBE08D-75E9-4024-A7F6-C67752B1DCA0}.Release|ARM64.Build.0 = Release|Any CPU + {57EBE08D-75E9-4024-A7F6-C67752B1DCA0}.Release|iPhone.ActiveCfg = Release|Any CPU + {57EBE08D-75E9-4024-A7F6-C67752B1DCA0}.Release|iPhone.Build.0 = Release|Any CPU + {57EBE08D-75E9-4024-A7F6-C67752B1DCA0}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU + {57EBE08D-75E9-4024-A7F6-C67752B1DCA0}.Release|iPhoneSimulator.Build.0 = Release|Any CPU + {57EBE08D-75E9-4024-A7F6-C67752B1DCA0}.Release|x64.ActiveCfg = Release|Any CPU + {57EBE08D-75E9-4024-A7F6-C67752B1DCA0}.Release|x64.Build.0 = Release|Any CPU + {57EBE08D-75E9-4024-A7F6-C67752B1DCA0}.Release|x86.ActiveCfg = Release|Any CPU + {57EBE08D-75E9-4024-A7F6-C67752B1DCA0}.Release|x86.Build.0 = Release|Any CPU {4A5E7CC0-881A-450F-91E0-F5D66F559ADF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {4A5E7CC0-881A-450F-91E0-F5D66F559ADF}.Debug|Any CPU.Build.0 = Debug|Any CPU {4A5E7CC0-881A-450F-91E0-F5D66F559ADF}.Debug|ARM.ActiveCfg = Debug|Any CPU @@ -4168,6 +4448,48 @@ Global {17802FE5-5A70-42DE-816A-FCC5776A3E02}.Release|x64.Build.0 = Release|Any CPU {17802FE5-5A70-42DE-816A-FCC5776A3E02}.Release|x86.ActiveCfg = Release|Any CPU {17802FE5-5A70-42DE-816A-FCC5776A3E02}.Release|x86.Build.0 = Release|Any CPU + {07802FE5-5A70-42DE-816A-FCC5776A3E02}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {07802FE5-5A70-42DE-816A-FCC5776A3E02}.Debug|Any CPU.Build.0 = Debug|Any CPU + {07802FE5-5A70-42DE-816A-FCC5776A3E02}.Debug|ARM.ActiveCfg = Debug|Any CPU + {07802FE5-5A70-42DE-816A-FCC5776A3E02}.Debug|ARM.Build.0 = Debug|Any CPU + {07802FE5-5A70-42DE-816A-FCC5776A3E02}.Debug|ARM64.ActiveCfg = Debug|Any CPU + {07802FE5-5A70-42DE-816A-FCC5776A3E02}.Debug|ARM64.Build.0 = Debug|Any CPU + {07802FE5-5A70-42DE-816A-FCC5776A3E02}.Debug|iPhone.ActiveCfg = Debug|Any CPU + {07802FE5-5A70-42DE-816A-FCC5776A3E02}.Debug|iPhone.Build.0 = Debug|Any CPU + {07802FE5-5A70-42DE-816A-FCC5776A3E02}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {07802FE5-5A70-42DE-816A-FCC5776A3E02}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU + {07802FE5-5A70-42DE-816A-FCC5776A3E02}.Debug|x64.ActiveCfg = Debug|Any CPU + {07802FE5-5A70-42DE-816A-FCC5776A3E02}.Debug|x64.Build.0 = Debug|Any CPU + {07802FE5-5A70-42DE-816A-FCC5776A3E02}.Debug|x86.ActiveCfg = Debug|Any CPU + {07802FE5-5A70-42DE-816A-FCC5776A3E02}.Debug|x86.Build.0 = Debug|Any CPU + {07802FE5-5A70-42DE-816A-FCC5776A3E02}.Release_NoSamples|Any CPU.ActiveCfg = Release|Any CPU + {07802FE5-5A70-42DE-816A-FCC5776A3E02}.Release_NoSamples|Any CPU.Build.0 = Release|Any CPU + {07802FE5-5A70-42DE-816A-FCC5776A3E02}.Release_NoSamples|ARM.ActiveCfg = Release|Any CPU + {07802FE5-5A70-42DE-816A-FCC5776A3E02}.Release_NoSamples|ARM.Build.0 = Release|Any CPU + {07802FE5-5A70-42DE-816A-FCC5776A3E02}.Release_NoSamples|ARM64.ActiveCfg = Release|Any CPU + {07802FE5-5A70-42DE-816A-FCC5776A3E02}.Release_NoSamples|ARM64.Build.0 = Release|Any CPU + {07802FE5-5A70-42DE-816A-FCC5776A3E02}.Release_NoSamples|iPhone.ActiveCfg = Release|Any CPU + {07802FE5-5A70-42DE-816A-FCC5776A3E02}.Release_NoSamples|iPhone.Build.0 = Release|Any CPU + {07802FE5-5A70-42DE-816A-FCC5776A3E02}.Release_NoSamples|iPhoneSimulator.ActiveCfg = Release|Any CPU + {07802FE5-5A70-42DE-816A-FCC5776A3E02}.Release_NoSamples|iPhoneSimulator.Build.0 = Release|Any CPU + {07802FE5-5A70-42DE-816A-FCC5776A3E02}.Release_NoSamples|x64.ActiveCfg = Release|Any CPU + {07802FE5-5A70-42DE-816A-FCC5776A3E02}.Release_NoSamples|x64.Build.0 = Release|Any CPU + {07802FE5-5A70-42DE-816A-FCC5776A3E02}.Release_NoSamples|x86.ActiveCfg = Release|Any CPU + {07802FE5-5A70-42DE-816A-FCC5776A3E02}.Release_NoSamples|x86.Build.0 = Release|Any CPU + {07802FE5-5A70-42DE-816A-FCC5776A3E02}.Release|Any CPU.ActiveCfg = Release|Any CPU + {07802FE5-5A70-42DE-816A-FCC5776A3E02}.Release|Any CPU.Build.0 = Release|Any CPU + {07802FE5-5A70-42DE-816A-FCC5776A3E02}.Release|ARM.ActiveCfg = Release|Any CPU + {07802FE5-5A70-42DE-816A-FCC5776A3E02}.Release|ARM.Build.0 = Release|Any CPU + {07802FE5-5A70-42DE-816A-FCC5776A3E02}.Release|ARM64.ActiveCfg = Release|Any CPU + {07802FE5-5A70-42DE-816A-FCC5776A3E02}.Release|ARM64.Build.0 = Release|Any CPU + {07802FE5-5A70-42DE-816A-FCC5776A3E02}.Release|iPhone.ActiveCfg = Release|Any CPU + {07802FE5-5A70-42DE-816A-FCC5776A3E02}.Release|iPhone.Build.0 = Release|Any CPU + {07802FE5-5A70-42DE-816A-FCC5776A3E02}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU + {07802FE5-5A70-42DE-816A-FCC5776A3E02}.Release|iPhoneSimulator.Build.0 = Release|Any CPU + {07802FE5-5A70-42DE-816A-FCC5776A3E02}.Release|x64.ActiveCfg = Release|Any CPU + {07802FE5-5A70-42DE-816A-FCC5776A3E02}.Release|x64.Build.0 = Release|Any CPU + {07802FE5-5A70-42DE-816A-FCC5776A3E02}.Release|x86.ActiveCfg = Release|Any CPU + {07802FE5-5A70-42DE-816A-FCC5776A3E02}.Release|x86.Build.0 = Release|Any CPU {17BB7190-F406-4A26-9C44-4F494B24CF83}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {17BB7190-F406-4A26-9C44-4F494B24CF83}.Debug|Any CPU.Build.0 = Debug|Any CPU {17BB7190-F406-4A26-9C44-4F494B24CF83}.Debug|ARM.ActiveCfg = Debug|Any CPU @@ -4210,6 +4532,48 @@ Global {17BB7190-F406-4A26-9C44-4F494B24CF83}.Release|x64.Build.0 = Release|Any CPU {17BB7190-F406-4A26-9C44-4F494B24CF83}.Release|x86.ActiveCfg = Release|Any CPU {17BB7190-F406-4A26-9C44-4F494B24CF83}.Release|x86.Build.0 = Release|Any CPU + {07BB7190-F406-4A26-9C44-4F494B24CF83}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {07BB7190-F406-4A26-9C44-4F494B24CF83}.Debug|Any CPU.Build.0 = Debug|Any CPU + {07BB7190-F406-4A26-9C44-4F494B24CF83}.Debug|ARM.ActiveCfg = Debug|Any CPU + {07BB7190-F406-4A26-9C44-4F494B24CF83}.Debug|ARM.Build.0 = Debug|Any CPU + {07BB7190-F406-4A26-9C44-4F494B24CF83}.Debug|ARM64.ActiveCfg = Debug|Any CPU + {07BB7190-F406-4A26-9C44-4F494B24CF83}.Debug|ARM64.Build.0 = Debug|Any CPU + {07BB7190-F406-4A26-9C44-4F494B24CF83}.Debug|iPhone.ActiveCfg = Debug|Any CPU + {07BB7190-F406-4A26-9C44-4F494B24CF83}.Debug|iPhone.Build.0 = Debug|Any CPU + {07BB7190-F406-4A26-9C44-4F494B24CF83}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {07BB7190-F406-4A26-9C44-4F494B24CF83}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU + {07BB7190-F406-4A26-9C44-4F494B24CF83}.Debug|x64.ActiveCfg = Debug|Any CPU + {07BB7190-F406-4A26-9C44-4F494B24CF83}.Debug|x64.Build.0 = Debug|Any CPU + {07BB7190-F406-4A26-9C44-4F494B24CF83}.Debug|x86.ActiveCfg = Debug|Any CPU + {07BB7190-F406-4A26-9C44-4F494B24CF83}.Debug|x86.Build.0 = Debug|Any CPU + {07BB7190-F406-4A26-9C44-4F494B24CF83}.Release_NoSamples|Any CPU.ActiveCfg = Release|Any CPU + {07BB7190-F406-4A26-9C44-4F494B24CF83}.Release_NoSamples|Any CPU.Build.0 = Release|Any CPU + {07BB7190-F406-4A26-9C44-4F494B24CF83}.Release_NoSamples|ARM.ActiveCfg = Release|Any CPU + {07BB7190-F406-4A26-9C44-4F494B24CF83}.Release_NoSamples|ARM.Build.0 = Release|Any CPU + {07BB7190-F406-4A26-9C44-4F494B24CF83}.Release_NoSamples|ARM64.ActiveCfg = Release|Any CPU + {07BB7190-F406-4A26-9C44-4F494B24CF83}.Release_NoSamples|ARM64.Build.0 = Release|Any CPU + {07BB7190-F406-4A26-9C44-4F494B24CF83}.Release_NoSamples|iPhone.ActiveCfg = Release|Any CPU + {07BB7190-F406-4A26-9C44-4F494B24CF83}.Release_NoSamples|iPhone.Build.0 = Release|Any CPU + {07BB7190-F406-4A26-9C44-4F494B24CF83}.Release_NoSamples|iPhoneSimulator.ActiveCfg = Release|Any CPU + {07BB7190-F406-4A26-9C44-4F494B24CF83}.Release_NoSamples|iPhoneSimulator.Build.0 = Release|Any CPU + {07BB7190-F406-4A26-9C44-4F494B24CF83}.Release_NoSamples|x64.ActiveCfg = Release|Any CPU + {07BB7190-F406-4A26-9C44-4F494B24CF83}.Release_NoSamples|x64.Build.0 = Release|Any CPU + {07BB7190-F406-4A26-9C44-4F494B24CF83}.Release_NoSamples|x86.ActiveCfg = Release|Any CPU + {07BB7190-F406-4A26-9C44-4F494B24CF83}.Release_NoSamples|x86.Build.0 = Release|Any CPU + {07BB7190-F406-4A26-9C44-4F494B24CF83}.Release|Any CPU.ActiveCfg = Release|Any CPU + {07BB7190-F406-4A26-9C44-4F494B24CF83}.Release|Any CPU.Build.0 = Release|Any CPU + {07BB7190-F406-4A26-9C44-4F494B24CF83}.Release|ARM.ActiveCfg = Release|Any CPU + {07BB7190-F406-4A26-9C44-4F494B24CF83}.Release|ARM.Build.0 = Release|Any CPU + {07BB7190-F406-4A26-9C44-4F494B24CF83}.Release|ARM64.ActiveCfg = Release|Any CPU + {07BB7190-F406-4A26-9C44-4F494B24CF83}.Release|ARM64.Build.0 = Release|Any CPU + {07BB7190-F406-4A26-9C44-4F494B24CF83}.Release|iPhone.ActiveCfg = Release|Any CPU + {07BB7190-F406-4A26-9C44-4F494B24CF83}.Release|iPhone.Build.0 = Release|Any CPU + {07BB7190-F406-4A26-9C44-4F494B24CF83}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU + {07BB7190-F406-4A26-9C44-4F494B24CF83}.Release|iPhoneSimulator.Build.0 = Release|Any CPU + {07BB7190-F406-4A26-9C44-4F494B24CF83}.Release|x64.ActiveCfg = Release|Any CPU + {07BB7190-F406-4A26-9C44-4F494B24CF83}.Release|x64.Build.0 = Release|Any CPU + {07BB7190-F406-4A26-9C44-4F494B24CF83}.Release|x86.ActiveCfg = Release|Any CPU + {07BB7190-F406-4A26-9C44-4F494B24CF83}.Release|x86.Build.0 = Release|Any CPU {717B3451-3CE4-4FF3-9D7E-3E90348214EA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {717B3451-3CE4-4FF3-9D7E-3E90348214EA}.Debug|Any CPU.Build.0 = Debug|Any CPU {717B3451-3CE4-4FF3-9D7E-3E90348214EA}.Debug|ARM.ActiveCfg = Debug|Any CPU @@ -4252,6 +4616,48 @@ Global {717B3451-3CE4-4FF3-9D7E-3E90348214EA}.Release|x64.Build.0 = Release|Any CPU {717B3451-3CE4-4FF3-9D7E-3E90348214EA}.Release|x86.ActiveCfg = Release|Any CPU {717B3451-3CE4-4FF3-9D7E-3E90348214EA}.Release|x86.Build.0 = Release|Any CPU + {017B3451-3CE4-4FF3-9D7E-3E90348214EA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {017B3451-3CE4-4FF3-9D7E-3E90348214EA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {017B3451-3CE4-4FF3-9D7E-3E90348214EA}.Debug|ARM.ActiveCfg = Debug|Any CPU + {017B3451-3CE4-4FF3-9D7E-3E90348214EA}.Debug|ARM.Build.0 = Debug|Any CPU + {017B3451-3CE4-4FF3-9D7E-3E90348214EA}.Debug|ARM64.ActiveCfg = Debug|Any CPU + {017B3451-3CE4-4FF3-9D7E-3E90348214EA}.Debug|ARM64.Build.0 = Debug|Any CPU + {017B3451-3CE4-4FF3-9D7E-3E90348214EA}.Debug|iPhone.ActiveCfg = Debug|Any CPU + {017B3451-3CE4-4FF3-9D7E-3E90348214EA}.Debug|iPhone.Build.0 = Debug|Any CPU + {017B3451-3CE4-4FF3-9D7E-3E90348214EA}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {017B3451-3CE4-4FF3-9D7E-3E90348214EA}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU + {017B3451-3CE4-4FF3-9D7E-3E90348214EA}.Debug|x64.ActiveCfg = Debug|Any CPU + {017B3451-3CE4-4FF3-9D7E-3E90348214EA}.Debug|x64.Build.0 = Debug|Any CPU + {017B3451-3CE4-4FF3-9D7E-3E90348214EA}.Debug|x86.ActiveCfg = Debug|Any CPU + {017B3451-3CE4-4FF3-9D7E-3E90348214EA}.Debug|x86.Build.0 = Debug|Any CPU + {017B3451-3CE4-4FF3-9D7E-3E90348214EA}.Release_NoSamples|Any CPU.ActiveCfg = Release|Any CPU + {017B3451-3CE4-4FF3-9D7E-3E90348214EA}.Release_NoSamples|Any CPU.Build.0 = Release|Any CPU + {017B3451-3CE4-4FF3-9D7E-3E90348214EA}.Release_NoSamples|ARM.ActiveCfg = Release|Any CPU + {017B3451-3CE4-4FF3-9D7E-3E90348214EA}.Release_NoSamples|ARM.Build.0 = Release|Any CPU + {017B3451-3CE4-4FF3-9D7E-3E90348214EA}.Release_NoSamples|ARM64.ActiveCfg = Release|Any CPU + {017B3451-3CE4-4FF3-9D7E-3E90348214EA}.Release_NoSamples|ARM64.Build.0 = Release|Any CPU + {017B3451-3CE4-4FF3-9D7E-3E90348214EA}.Release_NoSamples|iPhone.ActiveCfg = Release|Any CPU + {017B3451-3CE4-4FF3-9D7E-3E90348214EA}.Release_NoSamples|iPhone.Build.0 = Release|Any CPU + {017B3451-3CE4-4FF3-9D7E-3E90348214EA}.Release_NoSamples|iPhoneSimulator.ActiveCfg = Release|Any CPU + {017B3451-3CE4-4FF3-9D7E-3E90348214EA}.Release_NoSamples|iPhoneSimulator.Build.0 = Release|Any CPU + {017B3451-3CE4-4FF3-9D7E-3E90348214EA}.Release_NoSamples|x64.ActiveCfg = Release|Any CPU + {017B3451-3CE4-4FF3-9D7E-3E90348214EA}.Release_NoSamples|x64.Build.0 = Release|Any CPU + {017B3451-3CE4-4FF3-9D7E-3E90348214EA}.Release_NoSamples|x86.ActiveCfg = Release|Any CPU + {017B3451-3CE4-4FF3-9D7E-3E90348214EA}.Release_NoSamples|x86.Build.0 = Release|Any CPU + {017B3451-3CE4-4FF3-9D7E-3E90348214EA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {017B3451-3CE4-4FF3-9D7E-3E90348214EA}.Release|Any CPU.Build.0 = Release|Any CPU + {017B3451-3CE4-4FF3-9D7E-3E90348214EA}.Release|ARM.ActiveCfg = Release|Any CPU + {017B3451-3CE4-4FF3-9D7E-3E90348214EA}.Release|ARM.Build.0 = Release|Any CPU + {017B3451-3CE4-4FF3-9D7E-3E90348214EA}.Release|ARM64.ActiveCfg = Release|Any CPU + {017B3451-3CE4-4FF3-9D7E-3E90348214EA}.Release|ARM64.Build.0 = Release|Any CPU + {017B3451-3CE4-4FF3-9D7E-3E90348214EA}.Release|iPhone.ActiveCfg = Release|Any CPU + {017B3451-3CE4-4FF3-9D7E-3E90348214EA}.Release|iPhone.Build.0 = Release|Any CPU + {017B3451-3CE4-4FF3-9D7E-3E90348214EA}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU + {017B3451-3CE4-4FF3-9D7E-3E90348214EA}.Release|iPhoneSimulator.Build.0 = Release|Any CPU + {017B3451-3CE4-4FF3-9D7E-3E90348214EA}.Release|x64.ActiveCfg = Release|Any CPU + {017B3451-3CE4-4FF3-9D7E-3E90348214EA}.Release|x64.Build.0 = Release|Any CPU + {017B3451-3CE4-4FF3-9D7E-3E90348214EA}.Release|x86.ActiveCfg = Release|Any CPU + {017B3451-3CE4-4FF3-9D7E-3E90348214EA}.Release|x86.Build.0 = Release|Any CPU {AA89E8AC-40EF-4911-99B5-55228188446A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {AA89E8AC-40EF-4911-99B5-55228188446A}.Debug|Any CPU.Build.0 = Debug|Any CPU {AA89E8AC-40EF-4911-99B5-55228188446A}.Debug|ARM.ActiveCfg = Debug|Any CPU @@ -4588,6 +4994,48 @@ Global {34833538-6378-4592-B8DD-929C9F4B0E5C}.Release|x64.Build.0 = Release|Any CPU {34833538-6378-4592-B8DD-929C9F4B0E5C}.Release|x86.ActiveCfg = Release|Any CPU {34833538-6378-4592-B8DD-929C9F4B0E5C}.Release|x86.Build.0 = Release|Any CPU + {04833538-6378-4592-B8DD-929C9F4B0E5C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {04833538-6378-4592-B8DD-929C9F4B0E5C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {04833538-6378-4592-B8DD-929C9F4B0E5C}.Debug|ARM.ActiveCfg = Debug|Any CPU + {04833538-6378-4592-B8DD-929C9F4B0E5C}.Debug|ARM.Build.0 = Debug|Any CPU + {04833538-6378-4592-B8DD-929C9F4B0E5C}.Debug|ARM64.ActiveCfg = Debug|Any CPU + {04833538-6378-4592-B8DD-929C9F4B0E5C}.Debug|ARM64.Build.0 = Debug|Any CPU + {04833538-6378-4592-B8DD-929C9F4B0E5C}.Debug|iPhone.ActiveCfg = Debug|Any CPU + {04833538-6378-4592-B8DD-929C9F4B0E5C}.Debug|iPhone.Build.0 = Debug|Any CPU + {04833538-6378-4592-B8DD-929C9F4B0E5C}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {04833538-6378-4592-B8DD-929C9F4B0E5C}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU + {04833538-6378-4592-B8DD-929C9F4B0E5C}.Debug|x64.ActiveCfg = Debug|Any CPU + {04833538-6378-4592-B8DD-929C9F4B0E5C}.Debug|x64.Build.0 = Debug|Any CPU + {04833538-6378-4592-B8DD-929C9F4B0E5C}.Debug|x86.ActiveCfg = Debug|Any CPU + {04833538-6378-4592-B8DD-929C9F4B0E5C}.Debug|x86.Build.0 = Debug|Any CPU + {04833538-6378-4592-B8DD-929C9F4B0E5C}.Release_NoSamples|Any CPU.ActiveCfg = Release|Any CPU + {04833538-6378-4592-B8DD-929C9F4B0E5C}.Release_NoSamples|Any CPU.Build.0 = Release|Any CPU + {04833538-6378-4592-B8DD-929C9F4B0E5C}.Release_NoSamples|ARM.ActiveCfg = Release|Any CPU + {04833538-6378-4592-B8DD-929C9F4B0E5C}.Release_NoSamples|ARM.Build.0 = Release|Any CPU + {04833538-6378-4592-B8DD-929C9F4B0E5C}.Release_NoSamples|ARM64.ActiveCfg = Release|Any CPU + {04833538-6378-4592-B8DD-929C9F4B0E5C}.Release_NoSamples|ARM64.Build.0 = Release|Any CPU + {04833538-6378-4592-B8DD-929C9F4B0E5C}.Release_NoSamples|iPhone.ActiveCfg = Release|Any CPU + {04833538-6378-4592-B8DD-929C9F4B0E5C}.Release_NoSamples|iPhone.Build.0 = Release|Any CPU + {04833538-6378-4592-B8DD-929C9F4B0E5C}.Release_NoSamples|iPhoneSimulator.ActiveCfg = Release|Any CPU + {04833538-6378-4592-B8DD-929C9F4B0E5C}.Release_NoSamples|iPhoneSimulator.Build.0 = Release|Any CPU + {04833538-6378-4592-B8DD-929C9F4B0E5C}.Release_NoSamples|x64.ActiveCfg = Release|Any CPU + {04833538-6378-4592-B8DD-929C9F4B0E5C}.Release_NoSamples|x64.Build.0 = Release|Any CPU + {04833538-6378-4592-B8DD-929C9F4B0E5C}.Release_NoSamples|x86.ActiveCfg = Release|Any CPU + {04833538-6378-4592-B8DD-929C9F4B0E5C}.Release_NoSamples|x86.Build.0 = Release|Any CPU + {04833538-6378-4592-B8DD-929C9F4B0E5C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {04833538-6378-4592-B8DD-929C9F4B0E5C}.Release|Any CPU.Build.0 = Release|Any CPU + {04833538-6378-4592-B8DD-929C9F4B0E5C}.Release|ARM.ActiveCfg = Release|Any CPU + {04833538-6378-4592-B8DD-929C9F4B0E5C}.Release|ARM.Build.0 = Release|Any CPU + {04833538-6378-4592-B8DD-929C9F4B0E5C}.Release|ARM64.ActiveCfg = Release|Any CPU + {04833538-6378-4592-B8DD-929C9F4B0E5C}.Release|ARM64.Build.0 = Release|Any CPU + {04833538-6378-4592-B8DD-929C9F4B0E5C}.Release|iPhone.ActiveCfg = Release|Any CPU + {04833538-6378-4592-B8DD-929C9F4B0E5C}.Release|iPhone.Build.0 = Release|Any CPU + {04833538-6378-4592-B8DD-929C9F4B0E5C}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU + {04833538-6378-4592-B8DD-929C9F4B0E5C}.Release|iPhoneSimulator.Build.0 = Release|Any CPU + {04833538-6378-4592-B8DD-929C9F4B0E5C}.Release|x64.ActiveCfg = Release|Any CPU + {04833538-6378-4592-B8DD-929C9F4B0E5C}.Release|x64.Build.0 = Release|Any CPU + {04833538-6378-4592-B8DD-929C9F4B0E5C}.Release|x86.ActiveCfg = Release|Any CPU + {04833538-6378-4592-B8DD-929C9F4B0E5C}.Release|x86.Build.0 = Release|Any CPU {8F85881F-05D5-46C8-BBA8-C1CA740C74E6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8F85881F-05D5-46C8-BBA8-C1CA740C74E6}.Debug|Any CPU.Build.0 = Debug|Any CPU {8F85881F-05D5-46C8-BBA8-C1CA740C74E6}.Debug|ARM.ActiveCfg = Debug|Any CPU @@ -4756,6 +5204,48 @@ Global {CDE9C243-5CDC-4DF6-B82F-B9AF4B35A284}.Release|x64.Build.0 = Release|Any CPU {CDE9C243-5CDC-4DF6-B82F-B9AF4B35A284}.Release|x86.ActiveCfg = Release|Any CPU {CDE9C243-5CDC-4DF6-B82F-B9AF4B35A284}.Release|x86.Build.0 = Release|Any CPU + {0DE9C243-5CDC-4DF6-B82F-B9AF4B35A284}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0DE9C243-5CDC-4DF6-B82F-B9AF4B35A284}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0DE9C243-5CDC-4DF6-B82F-B9AF4B35A284}.Debug|ARM.ActiveCfg = Debug|Any CPU + {0DE9C243-5CDC-4DF6-B82F-B9AF4B35A284}.Debug|ARM.Build.0 = Debug|Any CPU + {0DE9C243-5CDC-4DF6-B82F-B9AF4B35A284}.Debug|ARM64.ActiveCfg = Debug|Any CPU + {0DE9C243-5CDC-4DF6-B82F-B9AF4B35A284}.Debug|ARM64.Build.0 = Debug|Any CPU + {0DE9C243-5CDC-4DF6-B82F-B9AF4B35A284}.Debug|iPhone.ActiveCfg = Debug|Any CPU + {0DE9C243-5CDC-4DF6-B82F-B9AF4B35A284}.Debug|iPhone.Build.0 = Debug|Any CPU + {0DE9C243-5CDC-4DF6-B82F-B9AF4B35A284}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {0DE9C243-5CDC-4DF6-B82F-B9AF4B35A284}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU + {0DE9C243-5CDC-4DF6-B82F-B9AF4B35A284}.Debug|x64.ActiveCfg = Debug|Any CPU + {0DE9C243-5CDC-4DF6-B82F-B9AF4B35A284}.Debug|x64.Build.0 = Debug|Any CPU + {0DE9C243-5CDC-4DF6-B82F-B9AF4B35A284}.Debug|x86.ActiveCfg = Debug|Any CPU + {0DE9C243-5CDC-4DF6-B82F-B9AF4B35A284}.Debug|x86.Build.0 = Debug|Any CPU + {0DE9C243-5CDC-4DF6-B82F-B9AF4B35A284}.Release_NoSamples|Any CPU.ActiveCfg = Release|Any CPU + {0DE9C243-5CDC-4DF6-B82F-B9AF4B35A284}.Release_NoSamples|Any CPU.Build.0 = Release|Any CPU + {0DE9C243-5CDC-4DF6-B82F-B9AF4B35A284}.Release_NoSamples|ARM.ActiveCfg = Release|Any CPU + {0DE9C243-5CDC-4DF6-B82F-B9AF4B35A284}.Release_NoSamples|ARM.Build.0 = Release|Any CPU + {0DE9C243-5CDC-4DF6-B82F-B9AF4B35A284}.Release_NoSamples|ARM64.ActiveCfg = Release|Any CPU + {0DE9C243-5CDC-4DF6-B82F-B9AF4B35A284}.Release_NoSamples|ARM64.Build.0 = Release|Any CPU + {0DE9C243-5CDC-4DF6-B82F-B9AF4B35A284}.Release_NoSamples|iPhone.ActiveCfg = Release|Any CPU + {0DE9C243-5CDC-4DF6-B82F-B9AF4B35A284}.Release_NoSamples|iPhone.Build.0 = Release|Any CPU + {0DE9C243-5CDC-4DF6-B82F-B9AF4B35A284}.Release_NoSamples|iPhoneSimulator.ActiveCfg = Release|Any CPU + {0DE9C243-5CDC-4DF6-B82F-B9AF4B35A284}.Release_NoSamples|iPhoneSimulator.Build.0 = Release|Any CPU + {0DE9C243-5CDC-4DF6-B82F-B9AF4B35A284}.Release_NoSamples|x64.ActiveCfg = Release|Any CPU + {0DE9C243-5CDC-4DF6-B82F-B9AF4B35A284}.Release_NoSamples|x64.Build.0 = Release|Any CPU + {0DE9C243-5CDC-4DF6-B82F-B9AF4B35A284}.Release_NoSamples|x86.ActiveCfg = Release|Any CPU + {0DE9C243-5CDC-4DF6-B82F-B9AF4B35A284}.Release_NoSamples|x86.Build.0 = Release|Any CPU + {0DE9C243-5CDC-4DF6-B82F-B9AF4B35A284}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0DE9C243-5CDC-4DF6-B82F-B9AF4B35A284}.Release|Any CPU.Build.0 = Release|Any CPU + {0DE9C243-5CDC-4DF6-B82F-B9AF4B35A284}.Release|ARM.ActiveCfg = Release|Any CPU + {0DE9C243-5CDC-4DF6-B82F-B9AF4B35A284}.Release|ARM.Build.0 = Release|Any CPU + {0DE9C243-5CDC-4DF6-B82F-B9AF4B35A284}.Release|ARM64.ActiveCfg = Release|Any CPU + {0DE9C243-5CDC-4DF6-B82F-B9AF4B35A284}.Release|ARM64.Build.0 = Release|Any CPU + {0DE9C243-5CDC-4DF6-B82F-B9AF4B35A284}.Release|iPhone.ActiveCfg = Release|Any CPU + {0DE9C243-5CDC-4DF6-B82F-B9AF4B35A284}.Release|iPhone.Build.0 = Release|Any CPU + {0DE9C243-5CDC-4DF6-B82F-B9AF4B35A284}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU + {0DE9C243-5CDC-4DF6-B82F-B9AF4B35A284}.Release|iPhoneSimulator.Build.0 = Release|Any CPU + {0DE9C243-5CDC-4DF6-B82F-B9AF4B35A284}.Release|x64.ActiveCfg = Release|Any CPU + {0DE9C243-5CDC-4DF6-B82F-B9AF4B35A284}.Release|x64.Build.0 = Release|Any CPU + {0DE9C243-5CDC-4DF6-B82F-B9AF4B35A284}.Release|x86.ActiveCfg = Release|Any CPU + {0DE9C243-5CDC-4DF6-B82F-B9AF4B35A284}.Release|x86.Build.0 = Release|Any CPU {54E27C52-4157-4585-B03F-184D8FBCAE3F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {54E27C52-4157-4585-B03F-184D8FBCAE3F}.Debug|Any CPU.Build.0 = Debug|Any CPU {54E27C52-4157-4585-B03F-184D8FBCAE3F}.Debug|ARM.ActiveCfg = Debug|Any CPU @@ -5176,6 +5666,48 @@ Global {1DC9D120-524B-41E5-8988-B4763F6244A1}.Release|x64.Build.0 = Release|Any CPU {1DC9D120-524B-41E5-8988-B4763F6244A1}.Release|x86.ActiveCfg = Release|Any CPU {1DC9D120-524B-41E5-8988-B4763F6244A1}.Release|x86.Build.0 = Release|Any CPU + {0DC9D120-524B-41E5-8988-B4763F6244A1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0DC9D120-524B-41E5-8988-B4763F6244A1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0DC9D120-524B-41E5-8988-B4763F6244A1}.Debug|ARM.ActiveCfg = Debug|Any CPU + {0DC9D120-524B-41E5-8988-B4763F6244A1}.Debug|ARM.Build.0 = Debug|Any CPU + {0DC9D120-524B-41E5-8988-B4763F6244A1}.Debug|ARM64.ActiveCfg = Debug|Any CPU + {0DC9D120-524B-41E5-8988-B4763F6244A1}.Debug|ARM64.Build.0 = Debug|Any CPU + {0DC9D120-524B-41E5-8988-B4763F6244A1}.Debug|iPhone.ActiveCfg = Debug|Any CPU + {0DC9D120-524B-41E5-8988-B4763F6244A1}.Debug|iPhone.Build.0 = Debug|Any CPU + {0DC9D120-524B-41E5-8988-B4763F6244A1}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {0DC9D120-524B-41E5-8988-B4763F6244A1}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU + {0DC9D120-524B-41E5-8988-B4763F6244A1}.Debug|x64.ActiveCfg = Debug|Any CPU + {0DC9D120-524B-41E5-8988-B4763F6244A1}.Debug|x64.Build.0 = Debug|Any CPU + {0DC9D120-524B-41E5-8988-B4763F6244A1}.Debug|x86.ActiveCfg = Debug|Any CPU + {0DC9D120-524B-41E5-8988-B4763F6244A1}.Debug|x86.Build.0 = Debug|Any CPU + {0DC9D120-524B-41E5-8988-B4763F6244A1}.Release_NoSamples|Any CPU.ActiveCfg = Release|Any CPU + {0DC9D120-524B-41E5-8988-B4763F6244A1}.Release_NoSamples|Any CPU.Build.0 = Release|Any CPU + {0DC9D120-524B-41E5-8988-B4763F6244A1}.Release_NoSamples|ARM.ActiveCfg = Release|Any CPU + {0DC9D120-524B-41E5-8988-B4763F6244A1}.Release_NoSamples|ARM.Build.0 = Release|Any CPU + {0DC9D120-524B-41E5-8988-B4763F6244A1}.Release_NoSamples|ARM64.ActiveCfg = Release|Any CPU + {0DC9D120-524B-41E5-8988-B4763F6244A1}.Release_NoSamples|ARM64.Build.0 = Release|Any CPU + {0DC9D120-524B-41E5-8988-B4763F6244A1}.Release_NoSamples|iPhone.ActiveCfg = Release|Any CPU + {0DC9D120-524B-41E5-8988-B4763F6244A1}.Release_NoSamples|iPhone.Build.0 = Release|Any CPU + {0DC9D120-524B-41E5-8988-B4763F6244A1}.Release_NoSamples|iPhoneSimulator.ActiveCfg = Release|Any CPU + {0DC9D120-524B-41E5-8988-B4763F6244A1}.Release_NoSamples|iPhoneSimulator.Build.0 = Release|Any CPU + {0DC9D120-524B-41E5-8988-B4763F6244A1}.Release_NoSamples|x64.ActiveCfg = Release|Any CPU + {0DC9D120-524B-41E5-8988-B4763F6244A1}.Release_NoSamples|x64.Build.0 = Release|Any CPU + {0DC9D120-524B-41E5-8988-B4763F6244A1}.Release_NoSamples|x86.ActiveCfg = Release|Any CPU + {0DC9D120-524B-41E5-8988-B4763F6244A1}.Release_NoSamples|x86.Build.0 = Release|Any CPU + {0DC9D120-524B-41E5-8988-B4763F6244A1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0DC9D120-524B-41E5-8988-B4763F6244A1}.Release|Any CPU.Build.0 = Release|Any CPU + {0DC9D120-524B-41E5-8988-B4763F6244A1}.Release|ARM.ActiveCfg = Release|Any CPU + {0DC9D120-524B-41E5-8988-B4763F6244A1}.Release|ARM.Build.0 = Release|Any CPU + {0DC9D120-524B-41E5-8988-B4763F6244A1}.Release|ARM64.ActiveCfg = Release|Any CPU + {0DC9D120-524B-41E5-8988-B4763F6244A1}.Release|ARM64.Build.0 = Release|Any CPU + {0DC9D120-524B-41E5-8988-B4763F6244A1}.Release|iPhone.ActiveCfg = Release|Any CPU + {0DC9D120-524B-41E5-8988-B4763F6244A1}.Release|iPhone.Build.0 = Release|Any CPU + {0DC9D120-524B-41E5-8988-B4763F6244A1}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU + {0DC9D120-524B-41E5-8988-B4763F6244A1}.Release|iPhoneSimulator.Build.0 = Release|Any CPU + {0DC9D120-524B-41E5-8988-B4763F6244A1}.Release|x64.ActiveCfg = Release|Any CPU + {0DC9D120-524B-41E5-8988-B4763F6244A1}.Release|x64.Build.0 = Release|Any CPU + {0DC9D120-524B-41E5-8988-B4763F6244A1}.Release|x86.ActiveCfg = Release|Any CPU + {0DC9D120-524B-41E5-8988-B4763F6244A1}.Release|x86.Build.0 = Release|Any CPU {1E649F79-45AB-402A-A7DE-D4F2D0BBF1E5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1E649F79-45AB-402A-A7DE-D4F2D0BBF1E5}.Debug|Any CPU.Build.0 = Debug|Any CPU {1E649F79-45AB-402A-A7DE-D4F2D0BBF1E5}.Debug|ARM.ActiveCfg = Debug|Any CPU @@ -5344,6 +5876,48 @@ Global {45C0AAC5-6797-4E22-9A4C-C7EE6369A53F}.Release|x64.Build.0 = Release|Any CPU {45C0AAC5-6797-4E22-9A4C-C7EE6369A53F}.Release|x86.ActiveCfg = Release|Any CPU {45C0AAC5-6797-4E22-9A4C-C7EE6369A53F}.Release|x86.Build.0 = Release|Any CPU + {05C0AAC5-6797-4E22-9A4C-C7EE6369A53F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {05C0AAC5-6797-4E22-9A4C-C7EE6369A53F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {05C0AAC5-6797-4E22-9A4C-C7EE6369A53F}.Debug|ARM.ActiveCfg = Debug|Any CPU + {05C0AAC5-6797-4E22-9A4C-C7EE6369A53F}.Debug|ARM.Build.0 = Debug|Any CPU + {05C0AAC5-6797-4E22-9A4C-C7EE6369A53F}.Debug|ARM64.ActiveCfg = Debug|Any CPU + {05C0AAC5-6797-4E22-9A4C-C7EE6369A53F}.Debug|ARM64.Build.0 = Debug|Any CPU + {05C0AAC5-6797-4E22-9A4C-C7EE6369A53F}.Debug|iPhone.ActiveCfg = Debug|Any CPU + {05C0AAC5-6797-4E22-9A4C-C7EE6369A53F}.Debug|iPhone.Build.0 = Debug|Any CPU + {05C0AAC5-6797-4E22-9A4C-C7EE6369A53F}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {05C0AAC5-6797-4E22-9A4C-C7EE6369A53F}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU + {05C0AAC5-6797-4E22-9A4C-C7EE6369A53F}.Debug|x64.ActiveCfg = Debug|Any CPU + {05C0AAC5-6797-4E22-9A4C-C7EE6369A53F}.Debug|x64.Build.0 = Debug|Any CPU + {05C0AAC5-6797-4E22-9A4C-C7EE6369A53F}.Debug|x86.ActiveCfg = Debug|Any CPU + {05C0AAC5-6797-4E22-9A4C-C7EE6369A53F}.Debug|x86.Build.0 = Debug|Any CPU + {05C0AAC5-6797-4E22-9A4C-C7EE6369A53F}.Release_NoSamples|Any CPU.ActiveCfg = Release|Any CPU + {05C0AAC5-6797-4E22-9A4C-C7EE6369A53F}.Release_NoSamples|Any CPU.Build.0 = Release|Any CPU + {05C0AAC5-6797-4E22-9A4C-C7EE6369A53F}.Release_NoSamples|ARM.ActiveCfg = Release|Any CPU + {05C0AAC5-6797-4E22-9A4C-C7EE6369A53F}.Release_NoSamples|ARM.Build.0 = Release|Any CPU + {05C0AAC5-6797-4E22-9A4C-C7EE6369A53F}.Release_NoSamples|ARM64.ActiveCfg = Release|Any CPU + {05C0AAC5-6797-4E22-9A4C-C7EE6369A53F}.Release_NoSamples|ARM64.Build.0 = Release|Any CPU + {05C0AAC5-6797-4E22-9A4C-C7EE6369A53F}.Release_NoSamples|iPhone.ActiveCfg = Release|Any CPU + {05C0AAC5-6797-4E22-9A4C-C7EE6369A53F}.Release_NoSamples|iPhone.Build.0 = Release|Any CPU + {05C0AAC5-6797-4E22-9A4C-C7EE6369A53F}.Release_NoSamples|iPhoneSimulator.ActiveCfg = Release|Any CPU + {05C0AAC5-6797-4E22-9A4C-C7EE6369A53F}.Release_NoSamples|iPhoneSimulator.Build.0 = Release|Any CPU + {05C0AAC5-6797-4E22-9A4C-C7EE6369A53F}.Release_NoSamples|x64.ActiveCfg = Release|Any CPU + {05C0AAC5-6797-4E22-9A4C-C7EE6369A53F}.Release_NoSamples|x64.Build.0 = Release|Any CPU + {05C0AAC5-6797-4E22-9A4C-C7EE6369A53F}.Release_NoSamples|x86.ActiveCfg = Release|Any CPU + {05C0AAC5-6797-4E22-9A4C-C7EE6369A53F}.Release_NoSamples|x86.Build.0 = Release|Any CPU + {05C0AAC5-6797-4E22-9A4C-C7EE6369A53F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {05C0AAC5-6797-4E22-9A4C-C7EE6369A53F}.Release|Any CPU.Build.0 = Release|Any CPU + {05C0AAC5-6797-4E22-9A4C-C7EE6369A53F}.Release|ARM.ActiveCfg = Release|Any CPU + {05C0AAC5-6797-4E22-9A4C-C7EE6369A53F}.Release|ARM.Build.0 = Release|Any CPU + {05C0AAC5-6797-4E22-9A4C-C7EE6369A53F}.Release|ARM64.ActiveCfg = Release|Any CPU + {05C0AAC5-6797-4E22-9A4C-C7EE6369A53F}.Release|ARM64.Build.0 = Release|Any CPU + {05C0AAC5-6797-4E22-9A4C-C7EE6369A53F}.Release|iPhone.ActiveCfg = Release|Any CPU + {05C0AAC5-6797-4E22-9A4C-C7EE6369A53F}.Release|iPhone.Build.0 = Release|Any CPU + {05C0AAC5-6797-4E22-9A4C-C7EE6369A53F}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU + {05C0AAC5-6797-4E22-9A4C-C7EE6369A53F}.Release|iPhoneSimulator.Build.0 = Release|Any CPU + {05C0AAC5-6797-4E22-9A4C-C7EE6369A53F}.Release|x64.ActiveCfg = Release|Any CPU + {05C0AAC5-6797-4E22-9A4C-C7EE6369A53F}.Release|x64.Build.0 = Release|Any CPU + {05C0AAC5-6797-4E22-9A4C-C7EE6369A53F}.Release|x86.ActiveCfg = Release|Any CPU + {05C0AAC5-6797-4E22-9A4C-C7EE6369A53F}.Release|x86.Build.0 = Release|Any CPU {AC6E2BD5-3902-46F4-8EA9-9BEF09D8B39C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {AC6E2BD5-3902-46F4-8EA9-9BEF09D8B39C}.Debug|Any CPU.Build.0 = Debug|Any CPU {AC6E2BD5-3902-46F4-8EA9-9BEF09D8B39C}.Debug|ARM.ActiveCfg = Debug|Any CPU @@ -5722,6 +6296,48 @@ Global {2CA6C2AE-BC23-435D-B81D-58C315EEB709}.Release|x64.Build.0 = Release|Any CPU {2CA6C2AE-BC23-435D-B81D-58C315EEB709}.Release|x86.ActiveCfg = Release|Any CPU {2CA6C2AE-BC23-435D-B81D-58C315EEB709}.Release|x86.Build.0 = Release|Any CPU + {0CA6C2AE-BC23-435D-B81D-58C315EEB709}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0CA6C2AE-BC23-435D-B81D-58C315EEB709}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0CA6C2AE-BC23-435D-B81D-58C315EEB709}.Debug|ARM.ActiveCfg = Debug|Any CPU + {0CA6C2AE-BC23-435D-B81D-58C315EEB709}.Debug|ARM.Build.0 = Debug|Any CPU + {0CA6C2AE-BC23-435D-B81D-58C315EEB709}.Debug|ARM64.ActiveCfg = Debug|Any CPU + {0CA6C2AE-BC23-435D-B81D-58C315EEB709}.Debug|ARM64.Build.0 = Debug|Any CPU + {0CA6C2AE-BC23-435D-B81D-58C315EEB709}.Debug|iPhone.ActiveCfg = Debug|Any CPU + {0CA6C2AE-BC23-435D-B81D-58C315EEB709}.Debug|iPhone.Build.0 = Debug|Any CPU + {0CA6C2AE-BC23-435D-B81D-58C315EEB709}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {0CA6C2AE-BC23-435D-B81D-58C315EEB709}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU + {0CA6C2AE-BC23-435D-B81D-58C315EEB709}.Debug|x64.ActiveCfg = Debug|Any CPU + {0CA6C2AE-BC23-435D-B81D-58C315EEB709}.Debug|x64.Build.0 = Debug|Any CPU + {0CA6C2AE-BC23-435D-B81D-58C315EEB709}.Debug|x86.ActiveCfg = Debug|Any CPU + {0CA6C2AE-BC23-435D-B81D-58C315EEB709}.Debug|x86.Build.0 = Debug|Any CPU + {0CA6C2AE-BC23-435D-B81D-58C315EEB709}.Release_NoSamples|Any CPU.ActiveCfg = Release|Any CPU + {0CA6C2AE-BC23-435D-B81D-58C315EEB709}.Release_NoSamples|Any CPU.Build.0 = Release|Any CPU + {0CA6C2AE-BC23-435D-B81D-58C315EEB709}.Release_NoSamples|ARM.ActiveCfg = Release|Any CPU + {0CA6C2AE-BC23-435D-B81D-58C315EEB709}.Release_NoSamples|ARM.Build.0 = Release|Any CPU + {0CA6C2AE-BC23-435D-B81D-58C315EEB709}.Release_NoSamples|ARM64.ActiveCfg = Release|Any CPU + {0CA6C2AE-BC23-435D-B81D-58C315EEB709}.Release_NoSamples|ARM64.Build.0 = Release|Any CPU + {0CA6C2AE-BC23-435D-B81D-58C315EEB709}.Release_NoSamples|iPhone.ActiveCfg = Release|Any CPU + {0CA6C2AE-BC23-435D-B81D-58C315EEB709}.Release_NoSamples|iPhone.Build.0 = Release|Any CPU + {0CA6C2AE-BC23-435D-B81D-58C315EEB709}.Release_NoSamples|iPhoneSimulator.ActiveCfg = Release|Any CPU + {0CA6C2AE-BC23-435D-B81D-58C315EEB709}.Release_NoSamples|iPhoneSimulator.Build.0 = Release|Any CPU + {0CA6C2AE-BC23-435D-B81D-58C315EEB709}.Release_NoSamples|x64.ActiveCfg = Release|Any CPU + {0CA6C2AE-BC23-435D-B81D-58C315EEB709}.Release_NoSamples|x64.Build.0 = Release|Any CPU + {0CA6C2AE-BC23-435D-B81D-58C315EEB709}.Release_NoSamples|x86.ActiveCfg = Release|Any CPU + {0CA6C2AE-BC23-435D-B81D-58C315EEB709}.Release_NoSamples|x86.Build.0 = Release|Any CPU + {0CA6C2AE-BC23-435D-B81D-58C315EEB709}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0CA6C2AE-BC23-435D-B81D-58C315EEB709}.Release|Any CPU.Build.0 = Release|Any CPU + {0CA6C2AE-BC23-435D-B81D-58C315EEB709}.Release|ARM.ActiveCfg = Release|Any CPU + {0CA6C2AE-BC23-435D-B81D-58C315EEB709}.Release|ARM.Build.0 = Release|Any CPU + {0CA6C2AE-BC23-435D-B81D-58C315EEB709}.Release|ARM64.ActiveCfg = Release|Any CPU + {0CA6C2AE-BC23-435D-B81D-58C315EEB709}.Release|ARM64.Build.0 = Release|Any CPU + {0CA6C2AE-BC23-435D-B81D-58C315EEB709}.Release|iPhone.ActiveCfg = Release|Any CPU + {0CA6C2AE-BC23-435D-B81D-58C315EEB709}.Release|iPhone.Build.0 = Release|Any CPU + {0CA6C2AE-BC23-435D-B81D-58C315EEB709}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU + {0CA6C2AE-BC23-435D-B81D-58C315EEB709}.Release|iPhoneSimulator.Build.0 = Release|Any CPU + {0CA6C2AE-BC23-435D-B81D-58C315EEB709}.Release|x64.ActiveCfg = Release|Any CPU + {0CA6C2AE-BC23-435D-B81D-58C315EEB709}.Release|x64.Build.0 = Release|Any CPU + {0CA6C2AE-BC23-435D-B81D-58C315EEB709}.Release|x86.ActiveCfg = Release|Any CPU + {0CA6C2AE-BC23-435D-B81D-58C315EEB709}.Release|x86.Build.0 = Release|Any CPU {F4C7902D-5143-4351-8C0E-0C4527C52735}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {F4C7902D-5143-4351-8C0E-0C4527C52735}.Debug|Any CPU.Build.0 = Debug|Any CPU {F4C7902D-5143-4351-8C0E-0C4527C52735}.Debug|ARM.ActiveCfg = Debug|Any CPU @@ -6027,17 +6643,26 @@ Global {0C43E58D-3A77-4F2C-A2D3-08F98759AEE8} = {E8E628C1-3BAF-4C67-AF41-78B1B30AC8CC} {D590CED3-7306-447A-A7BF-034777E4F1C1} = {E8E628C1-3BAF-4C67-AF41-78B1B30AC8CC} {C473858B-8ECF-4476-8CBA-05EA456FFE0E} = {416684CF-A4E3-4079-B380-3FF0B00E433C} + {0473858B-8ECF-4476-8CBA-05EA456FFE0E} = {416684CF-A4E3-4079-B380-3FF0B00E433C} {2C4D969A-AF2B-4C78-AF04-5ECE47F7D14C} = {416684CF-A4E3-4079-B380-3FF0B00E433C} + {0C4D969A-AF2B-4C78-AF04-5ECE47F7D14C} = {416684CF-A4E3-4079-B380-3FF0B00E433C} {C1AF1FBC-D11D-441D-AD07-5FF2FE295C0D} = {416684CF-A4E3-4079-B380-3FF0B00E433C} + {01AF1FBC-D11D-441D-AD07-5FF2FE295C0D} = {416684CF-A4E3-4079-B380-3FF0B00E433C} {1EC49129-3FB1-4045-9859-03F72CAD2913} = {416684CF-A4E3-4079-B380-3FF0B00E433C} {4DB56B75-B691-4F8B-879F-D7F36EEE6187} = {02DF1FE3-A56C-4F96-95D8-42B55D2A8988} + {0DB56B75-B691-4F8B-879F-D7F36EEE6187} = {02DF1FE3-A56C-4F96-95D8-42B55D2A8988} {3C272635-C7D1-444C-86C2-CB95E367D13D} = {995C1054-AB61-42EE-9A17-C32155BD6D13} {7B3AC6D8-2660-4FC2-9633-F8DFC0F32012} = {416684CF-A4E3-4079-B380-3FF0B00E433C} + {0B3AC6D8-2660-4FC2-9633-F8DFC0F32012} = {416684CF-A4E3-4079-B380-3FF0B00E433C} {CA07C58C-D4E6-4432-8241-55FA016DEA41} = {E872CD33-A455-4DC4-8A87-5FEEC1C39A44} + {57EBE08D-75E9-4024-A7F6-C67752B1DCA0} = {416684CF-A4E3-4079-B380-3FF0B00E433C} {4A5E7CC0-881A-450F-91E0-F5D66F559ADF} = {416684CF-A4E3-4079-B380-3FF0B00E433C} {17802FE5-5A70-42DE-816A-FCC5776A3E02} = {416684CF-A4E3-4079-B380-3FF0B00E433C} + {07802FE5-5A70-42DE-816A-FCC5776A3E02} = {416684CF-A4E3-4079-B380-3FF0B00E433C} {17BB7190-F406-4A26-9C44-4F494B24CF83} = {E872CD33-A455-4DC4-8A87-5FEEC1C39A44} + {07BB7190-F406-4A26-9C44-4F494B24CF83} = {416684CF-A4E3-4079-B380-3FF0B00E433C} {717B3451-3CE4-4FF3-9D7E-3E90348214EA} = {416684CF-A4E3-4079-B380-3FF0B00E433C} + {017B3451-3CE4-4FF3-9D7E-3E90348214EA} = {416684CF-A4E3-4079-B380-3FF0B00E433C} {AA89E8AC-40EF-4911-99B5-55228188446A} = {416684CF-A4E3-4079-B380-3FF0B00E433C} {76EBBF09-F39F-48C2-BEE9-9DF5F8EC6A49} = {995C1054-AB61-42EE-9A17-C32155BD6D13} {13B713F7-4F6C-4205-BDDA-487CA528B499} = {FCBC6D7C-8F07-4C07-9802-0E2B5B72391D} @@ -6047,10 +6672,12 @@ Global {E0F1F702-6061-49BC-83C0-2BF3B9CDCF30} = {FCBC6D7C-8F07-4C07-9802-0E2B5B72391D} {A5B7419A-CAF2-4901-AAED-FF394B9AB8B8} = {416684CF-A4E3-4079-B380-3FF0B00E433C} {34833538-6378-4592-B8DD-929C9F4B0E5C} = {416684CF-A4E3-4079-B380-3FF0B00E433C} + {04833538-6378-4592-B8DD-929C9F4B0E5C} = {416684CF-A4E3-4079-B380-3FF0B00E433C} {8F85881F-05D5-46C8-BBA8-C1CA740C74E6} = {416684CF-A4E3-4079-B380-3FF0B00E433C} {D297142A-6F19-476F-B6FF-552FC57E1A9A} = {416684CF-A4E3-4079-B380-3FF0B00E433C} {F40CB5E3-4D70-424E-937E-FCBB2A47BBA4} = {416684CF-A4E3-4079-B380-3FF0B00E433C} {CDE9C243-5CDC-4DF6-B82F-B9AF4B35A284} = {416684CF-A4E3-4079-B380-3FF0B00E433C} + {0DE9C243-5CDC-4DF6-B82F-B9AF4B35A284} = {416684CF-A4E3-4079-B380-3FF0B00E433C} {54E27C52-4157-4585-B03F-184D8FBCAE3F} = {416684CF-A4E3-4079-B380-3FF0B00E433C} {AD35E340-34DF-4FA9-B545-B9FBB72D3A2E} = {416684CF-A4E3-4079-B380-3FF0B00E433C} {CC0AF5E6-FA87-4A09-958A-95ADE1E5B946} = {416684CF-A4E3-4079-B380-3FF0B00E433C} @@ -6061,10 +6688,12 @@ Global {94415375-1CDD-4FEC-ACBC-5D92E182FF87} = {416684CF-A4E3-4079-B380-3FF0B00E433C} {39C20EBB-59D8-43E5-9CF6-390521C0C82A} = {416684CF-A4E3-4079-B380-3FF0B00E433C} {1DC9D120-524B-41E5-8988-B4763F6244A1} = {416684CF-A4E3-4079-B380-3FF0B00E433C} + {0DC9D120-524B-41E5-8988-B4763F6244A1} = {416684CF-A4E3-4079-B380-3FF0B00E433C} {1E649F79-45AB-402A-A7DE-D4F2D0BBF1E5} = {416684CF-A4E3-4079-B380-3FF0B00E433C} {8386DF84-BB52-425F-A36F-E966865D7096} = {416684CF-A4E3-4079-B380-3FF0B00E433C} {1E3CF690-9F3D-45DA-95D3-51910CFB1B80} = {416684CF-A4E3-4079-B380-3FF0B00E433C} {45C0AAC5-6797-4E22-9A4C-C7EE6369A53F} = {416684CF-A4E3-4079-B380-3FF0B00E433C} + {05C0AAC5-6797-4E22-9A4C-C7EE6369A53F} = {416684CF-A4E3-4079-B380-3FF0B00E433C} {AC6E2BD5-3902-46F4-8EA9-9BEF09D8B39C} = {416684CF-A4E3-4079-B380-3FF0B00E433C} {138FF660-5EE6-475B-828C-81F96E9BE142} = {FCBC6D7C-8F07-4C07-9802-0E2B5B72391D} {042F79A0-E0BB-4DED-8BC8-419700B9EE30} = {FCBC6D7C-8F07-4C07-9802-0E2B5B72391D} @@ -6077,6 +6706,7 @@ Global {31B0EFDC-94D6-4599-B9BD-DECEA44FA3FE} = {416684CF-A4E3-4079-B380-3FF0B00E433C} {270CF773-1F7B-4C8D-A4AD-46B8D08F3A38} = {31B0EFDC-94D6-4599-B9BD-DECEA44FA3FE} {2CA6C2AE-BC23-435D-B81D-58C315EEB709} = {31B0EFDC-94D6-4599-B9BD-DECEA44FA3FE} + {0CA6C2AE-BC23-435D-B81D-58C315EEB709} = {416684CF-A4E3-4079-B380-3FF0B00E433C} {F4C7902D-5143-4351-8C0E-0C4527C52735} = {31B0EFDC-94D6-4599-B9BD-DECEA44FA3FE} {F1F1BBD7-93D0-4EFE-82A0-AD4EEDD229D0} = {31B0EFDC-94D6-4599-B9BD-DECEA44FA3FE} {1AB2D0BF-DF3C-44F4-88B7-334CC41C2988} = {31B0EFDC-94D6-4599-B9BD-DECEA44FA3FE} diff --git a/src/Uno.UI/UI/Xaml/Application.skia.cs b/src/Uno.UI/UI/Xaml/Application.skia.cs index 93aae33f1b42..ca372d4b33eb 100644 --- a/src/Uno.UI/UI/Xaml/Application.skia.cs +++ b/src/Uno.UI/UI/Xaml/Application.skia.cs @@ -108,7 +108,7 @@ partial void ObserveSystemThemeChanges() _systemThemeChangesObserved = true; } - private void SystemThemeChanged(object sender, EventArgs e) => OnSystemThemeChanged(); + private void SystemThemeChanged(object? sender, EventArgs e) => OnSystemThemeChanged(); } internal interface IApplicationEvents diff --git a/src/Uno.UI/UI/Xaml/Controls/ScrollContentPresenter/CompositorScrollStrategy.cs b/src/Uno.UI/UI/Xaml/Controls/ScrollContentPresenter/CompositorScrollStrategy.cs index 44ad07c69ee9..23fb11e830dd 100644 --- a/src/Uno.UI/UI/Xaml/Controls/ScrollContentPresenter/CompositorScrollStrategy.cs +++ b/src/Uno.UI/UI/Xaml/Controls/ScrollContentPresenter/CompositorScrollStrategy.cs @@ -15,7 +15,7 @@ private CompositorScrollStrategy() { } public void Initialize(ScrollContentPresenter presenter) => presenter.LayoutUpdated += ScrollContentPresenter_LayoutUpdated; - private static void ScrollContentPresenter_LayoutUpdated(object sender, object e) + private static void ScrollContentPresenter_LayoutUpdated(object? sender, object e) { if (sender is ScrollContentPresenter presenter) { diff --git a/src/Uno.UI/UI/Xaml/Documents/Hyperlink.cs b/src/Uno.UI/UI/Xaml/Documents/Hyperlink.cs index 27e5fcb63918..59ba70f32167 100644 --- a/src/Uno.UI/UI/Xaml/Documents/Hyperlink.cs +++ b/src/Uno.UI/UI/Xaml/Documents/Hyperlink.cs @@ -17,8 +17,10 @@ namespace Windows.UI.Xaml.Documents { public sealed partial class Hyperlink : Span - { + { +#pragma warning disable CS0649 // error CS0649: Field '_focusableHelper' is never assigned to, and will always have its default value null private readonly IFocusable _focusableHelper; +#pragma warning restore CS0649 // error CS0649: Field '_focusableHelper' is never assigned to, and will always have its default value null #region Static private static Brush _defaultForeground; diff --git a/src/Uno.UI/UI/Xaml/Documents/Hyperlink.mux.cs b/src/Uno.UI/UI/Xaml/Documents/Hyperlink.mux.cs index c03a39006f55..682777cb56fe 100644 --- a/src/Uno.UI/UI/Xaml/Documents/Hyperlink.mux.cs +++ b/src/Uno.UI/UI/Xaml/Documents/Hyperlink.mux.cs @@ -10,7 +10,11 @@ namespace Windows.UI.Xaml.Documents { public partial class Hyperlink { - internal bool IsFocusable() + internal +#if __WASM__ + new +#endif + bool IsFocusable() { var element = GetContainingFrameworkElement(); return diff --git a/src/Uno.UI/UI/Xaml/DragDrop/DragDropExtension.wasm.cs b/src/Uno.UI/UI/Xaml/DragDrop/DragDropExtension.wasm.cs index 88741ba2d5f3..041468fee513 100644 --- a/src/Uno.UI/UI/Xaml/DragDrop/DragDropExtension.wasm.cs +++ b/src/Uno.UI/UI/Xaml/DragDrop/DragDropExtension.wasm.cs @@ -477,6 +477,7 @@ IEnumerable GetModifiers(DragDropExtensionEventArgs that) [DataContract] private struct DataEntry { +#pragma warning disable CS0649 // error CS0649: Field 'DragDropExtension.DataEntry.kind' is never assigned to, and will always have its default value null [DataMember] public int id; @@ -485,6 +486,7 @@ private struct DataEntry [DataMember] public string type; +#pragma warning restore CS0649 // error CS0649: Field 'DragDropExtension.DataEntry.kind' is never assigned to, and will always have its default value null /// public override string ToString() diff --git a/src/Uno.UI/UI/Xaml/FontFamily.wasm.cs b/src/Uno.UI/UI/Xaml/FontFamily.wasm.cs index a27226061d8a..720842c25d8f 100644 --- a/src/Uno.UI/UI/Xaml/FontFamily.wasm.cs +++ b/src/Uno.UI/UI/Xaml/FontFamily.wasm.cs @@ -61,7 +61,7 @@ private static bool TryGetExternalUri(string? source, out Uri? uri) if (!uri.IsAbsoluteUri || source.StartsWith("/")) { // Support for implicit ms-appx resolution - var assetUri = AssetsPathBuilder.BuildAssetUri(Uri.EscapeUriString(source.TrimStart('/'))); + var assetUri = AssetsPathBuilder.BuildAssetUri(Uri.EscapeDataString(source.TrimStart('/'))); uri = new Uri(assetUri, UriKind.RelativeOrAbsolute); } diff --git a/src/Uno.UI/UI/Xaml/FrameworkElement.Interface.wasm.cs b/src/Uno.UI/UI/Xaml/FrameworkElement.Interface.wasm.cs index be4fdc0f98eb..2dce624a70c6 100644 --- a/src/Uno.UI/UI/Xaml/FrameworkElement.Interface.wasm.cs +++ b/src/Uno.UI/UI/Xaml/FrameworkElement.Interface.wasm.cs @@ -63,8 +63,8 @@ public FrameworkElement(string htmlTag, bool isSvg) : base(htmlTag, isSvg) _logDebug = _log.IsEnabled(LogLevel.Debug) ? _log : null; } - private protected readonly Logger _log; - private protected readonly Logger _logDebug; + private new protected readonly Logger _log; + private new protected readonly Logger _logDebug; private static readonly Uri DefaultBaseUri = new Uri("ms-appx://local"); public global::System.Uri BaseUri { get; internal set; } = DefaultBaseUri; diff --git a/src/Uno.UI/UI/Xaml/IFrameworkElement.cs b/src/Uno.UI/UI/Xaml/IFrameworkElement.cs index de22eba152ed..72df4540eca7 100644 --- a/src/Uno.UI/UI/Xaml/IFrameworkElement.cs +++ b/src/Uno.UI/UI/Xaml/IFrameworkElement.cs @@ -47,6 +47,7 @@ using ObjCRuntime; #endif #elif __WASM__ +#pragma warning disable CS8981 // The type name 'nint' only contains lower-cased ascii characters. Such names may become reserved for the language using nint = System.Int32; using nfloat = System.Double; using Point = Windows.Foundation.Point; @@ -55,6 +56,7 @@ using NMath = System.Math; using View = Windows.UI.Xaml.UIElement; #else +#pragma warning disable CS8981 // The type name 'nint' only contains lower-cased ascii characters. Such names may become reserved for the language using nint = System.Int32; using nfloat = System.Double; using CGSize = Windows.Foundation.Size; diff --git a/src/Uno.UI/UI/Xaml/UIElement.Pointers.wasm.cs b/src/Uno.UI/UI/Xaml/UIElement.Pointers.wasm.cs index 885f202b2138..17cc9d9c12cd 100644 --- a/src/Uno.UI/UI/Xaml/UIElement.Pointers.wasm.cs +++ b/src/Uno.UI/UI/Xaml/UIElement.Pointers.wasm.cs @@ -328,7 +328,7 @@ private static PointerRoutedEventArgs ToPointerArgs( } #endregion - partial void OnManipulationModeChanged(ManipulationModes _, ManipulationModes newMode) + partial void OnManipulationModeChanged(ManipulationModes oldMode, ManipulationModes newMode) { if (newMode is ManipulationModes.None or ManipulationModes.System) { diff --git a/src/Uno.UI/UI/Xaml/UIElement.skia.cs b/src/Uno.UI/UI/Xaml/UIElement.skia.cs index 482158bee862..14b6b799eb86 100644 --- a/src/Uno.UI/UI/Xaml/UIElement.skia.cs +++ b/src/Uno.UI/UI/Xaml/UIElement.skia.cs @@ -245,12 +245,12 @@ public string Name public IntPtr Handle { get; set; } - partial void OnVisibilityChangedPartial(Visibility oldValue, Visibility newVisibility) + partial void OnVisibilityChangedPartial(Visibility oldValue, Visibility newValue) { UpdateHitTest(); UpdateOpacity(); - if (newVisibility == Visibility.Collapsed) + if (newValue == Visibility.Collapsed) { LayoutInformation.SetDesiredSize(this, new Size(0, 0)); _size = new Size(0, 0); @@ -327,20 +327,20 @@ internal virtual void OnArrangeVisual(Rect rect, Rect? clip) ApplyNativeClip(clip ?? Rect.Empty); } - partial void ApplyNativeClip(Rect clip) + partial void ApplyNativeClip(Rect rect) { if (ClippingIsSetByCornerRadius) { return; // already applied } - if (clip.IsEmpty) + if (rect.IsEmpty) { Visual.Clip = null; } else { - var roundedRectClip = LayoutRound(clip); + var roundedRectClip = LayoutRound(rect); Visual.Clip = Visual.Compositor.CreateInsetClip( topInset: (float)roundedRectClip.Top, diff --git a/src/Uno.UI/UI/Xaml/UIElement.wasm.cs b/src/Uno.UI/UI/Xaml/UIElement.wasm.cs index c792165b0f99..3bc0df2975cf 100644 --- a/src/Uno.UI/UI/Xaml/UIElement.wasm.cs +++ b/src/Uno.UI/UI/Xaml/UIElement.wasm.cs @@ -406,12 +406,12 @@ public Rect Arranged public Func DesiredSizeSelector { get; set; } - partial void OnVisibilityChangedPartial(Visibility oldValue, Visibility newVisibility) + partial void OnVisibilityChangedPartial(Visibility oldValue, Visibility newValue) { InvalidateMeasure(); UpdateHitTest(); - WindowManagerInterop.SetVisibility(HtmlId, newVisibility == Visibility.Visible); + WindowManagerInterop.SetVisibility(HtmlId, newValue == Visibility.Visible); if (FeatureConfiguration.UIElement.AssignDOMXamlProperties) { diff --git a/src/Uno.UI/UI/Xaml/VisualStateManager.wasm.cs b/src/Uno.UI/UI/Xaml/VisualStateManager.wasm.cs index 048d05192f33..591d996218c7 100644 --- a/src/Uno.UI/UI/Xaml/VisualStateManager.wasm.cs +++ b/src/Uno.UI/UI/Xaml/VisualStateManager.wasm.cs @@ -18,7 +18,7 @@ private static void TryAssignDOMVisualStates(IList groups, IFr if (Uno.UI.FeatureConfiguration.UIElement.AssignDOMXamlProperties) { var sb = new StringBuilder(); - sb.Append("["); + sb.Append('['); foreach (var group in groups) { sb.Append($"{group}: {group.CurrentState}, "); diff --git a/src/Uno.UI/UI/Xaml/Window.skia.cs b/src/Uno.UI/UI/Xaml/Window.skia.cs index 35dd7135c921..6fbe7bee13fb 100644 --- a/src/Uno.UI/UI/Xaml/Window.skia.cs +++ b/src/Uno.UI/UI/Xaml/Window.skia.cs @@ -47,7 +47,7 @@ internal void OnNativeSizeChanged(Size size) Bounds = newBounds; - _rootVisual?.XamlRoot.InvalidateMeasure(); + _rootVisual?.XamlRoot?.InvalidateMeasure(); RaiseSizeChanged(new Windows.UI.Core.WindowSizeChangedEventArgs(size)); ApplicationView.GetForCurrentView().SetVisibleBounds(newBounds); @@ -64,7 +64,7 @@ private void InternalSetContent(UIElement content) CoreServices.Instance.PutVisualRoot(_rootBorder); _rootVisual = CoreServices.Instance.MainRootVisual; - if (_rootVisual == null) + if (_rootVisual?.XamlRoot == null) { throw new InvalidOperationException("The root visual could not be created."); } diff --git a/src/Uno.UI/Uno.UI.Reference.csproj b/src/Uno.UI/Uno.UI.Reference.csproj new file mode 100644 index 000000000000..338e29eeda10 --- /dev/null +++ b/src/Uno.UI/Uno.UI.Reference.csproj @@ -0,0 +1,186 @@ + + + + netstandard2.0 + + + + $(TargetFrameworks);net7.0 + + + + $(UnoTargetFrameworkOverride) + + + + Uno.UI + Uno.UI + $(DefineConstants);IS_UNO;IS_UNO_UI_PROJECT + true + false + $(NoWarn);NU1701;1572;1587;419;1574;1711;1734;CS0105 + true + + disable + + false + true + + Reference + + + true + + + true + + + false + + + + + Reference + + + + + + + + + + + + + + + + + + + + + True + True + + + True + True + + + True + True + + + True + True + + + + + + + + + + + + + + + + + false + + + false + + + + false + + + false + + + + + + $(AssemblyName).xml + + + + + + $(MSBuildThisFileDirectory)..\SourceGenerators\Uno.UI.Tasks\bin\$(Configuration)_Shadow + + + + + + + + + + + + + + + + + + + false + true + TargetFramework + + + false + Analyzer + + + false + true + TargetFramework + + + + + + BaseActivity.Callbacks.g.cs + + + FrameworkElementMixins.g.cs + + + DependencyPropertyMixins.g.cs + + + FrameworkElementMixins.g.cs + + + FrameworkElementMixins.g.cs + + + + + + + <_ReferenceToRemove Include="@(Reference)" Condition="'%(Reference.Identity)'=='System.Memory'" /> + <_ReferenceToRemove Include="@(Reference)" Condition="'%(Reference.Identity)'=='System.Buffers'" /> + + + + + + + + + diff --git a/src/Uno.UI/Uno.UI.Skia.csproj b/src/Uno.UI/Uno.UI.Skia.csproj index 14cc0cd5853d..5ff679ed160d 100644 --- a/src/Uno.UI/Uno.UI.Skia.csproj +++ b/src/Uno.UI/Uno.UI.Skia.csproj @@ -3,6 +3,10 @@ netstandard2.0 + + $(TargetFrameworks);net7.0 + + @@ -11,6 +15,7 @@ $(NoWarn);NU1701 $(DefineConstants);IS_UNO;IS_UNO_UI_PROJECT true + true false true @@ -19,8 +24,6 @@ Skia .\ - - true true diff --git a/src/Uno.UI/Uno.UI.Wasm.csproj b/src/Uno.UI/Uno.UI.Wasm.csproj index b8b748349ac5..8a07b7364057 100644 --- a/src/Uno.UI/Uno.UI.Wasm.csproj +++ b/src/Uno.UI/Uno.UI.Wasm.csproj @@ -3,6 +3,10 @@ netstandard2.0 + + $(TargetFrameworks);net7.0 + + @@ -16,6 +20,7 @@ Uno.UI Uno.UI true + true $(MSBuildThisFileDirectory)tsBindings Uno;Uno.UI @@ -25,6 +30,8 @@ true WebAssembly .\ + + false @@ -39,6 +46,7 @@ + @@ -51,18 +59,14 @@ - <_UnoEmbeddedResourcesInjectionAfterTargets Include="CompileTypeScriptWithTSConfig" /> - - - - + $(AssemblyName).xml - + @@ -81,6 +85,7 @@ + @@ -110,8 +115,35 @@ $(MSBuildThisFileDirectory)..\SourceGenerators\Uno.UI.Tasks\bin\$(Configuration)_Shadow - CoreCompile; $(CompileTypeScriptDependsOn) + CoreCompile;_UnoSetupTSCompilation; $(CompileTypeScriptDependsOn) + + + + $(TypeScriptConfigFileAdditionalFlags) --outFile $(IntermediateOutputPath)/javascript/Uno.UI.js + + + + + + + <_unoUIDTsFilePath>$(IntermediateOutputPath)/javascript/Uno.UI.d.ts + + + <_generatedTSFiles Include="$(IntermediateOutputPath)/javascript/*.js" /> + + + + + + + <_UnoEmbeddedResourcesInjectionAfterTargets Include="CompileTypeScriptWithTSConfig" /> + diff --git a/src/Uno.UI/WasmScripts/Uno.UI.d.ts b/src/Uno.UI/WasmScripts/Uno.UI.d.ts deleted file mode 100644 index 7d8ebb5f490e..000000000000 --- a/src/Uno.UI/WasmScripts/Uno.UI.d.ts +++ /dev/null @@ -1,1694 +0,0 @@ -interface Clipboard { - writeText(newClipText: string): Promise; - readText(): Promise; -} -interface NavigatorClipboard { - readonly clipboard?: Clipboard; -} -interface Navigator extends NavigatorClipboard { -} -declare namespace Uno.Utils { - class Clipboard { - private static dispatchContentChanged; - private static dispatchGetContent; - static startContentChanged(): void; - static stopContentChanged(): void; - static setText(text: string): string; - static getText(): Promise; - private static onClipboardChanged; - } -} -declare namespace Windows.UI.Core { - /** - * Support file for the Windows.UI.Core - * */ - class CoreDispatcher { - static _coreDispatcherCallback: any; - static _isFirstCall: boolean; - static _isReady: Promise; - static _isWaitingReady: boolean; - static init(isReady: Promise): void; - /** - * Enqueues a core dispatcher callback on the javascript's event loop - * - * */ - static WakeUp(): boolean; - private static InnerWakeUp; - private static initMethods; - } -} -declare namespace Uno.Utils { - class Guid { - private static newGuidMethod; - static NewGuid(): string; - } -} -declare namespace Uno.UI { - class HtmlDom { - /** - * Initialize various polyfills used by Uno - */ - static initPolyfills(): void; - private static isConnectedPolyfill; - } -} -declare module Uno.UI { - enum HtmlEventDispatchResult { - Ok = 0, - StopPropagation = 1, - PreventDefault = 2, - NotDispatched = 128 - } -} -declare namespace Uno.Http { - interface IHttpClientConfig { - id: string; - method: string; - url: string; - headers?: string[][]; - payload?: string; - payloadType?: string; - cacheMode?: RequestCache; - } - class HttpClient { - static send(config: IHttpClientConfig): Promise; - private static blobFromBase64; - private static base64FromBlob; - private static dispatchResponse; - private static dispatchError; - private static dispatchResponseMethod; - private static dispatchErrorMethod; - private static initMethods; - } -} -declare module Uno.UI { - interface IContentDefinition { - id: string; - tagName: string; - handle: number; - uiElementRegistrationId: number; - isSvg: boolean; - isFocusable: boolean; - } -} -declare namespace MonoSupport { - /** - * This class is used by https://github.com/mono/mono/blob/fa726d3ac7153d87ed187abd422faa4877f85bb5/sdks/wasm/dotnet_support.js#L88 to perform - * unmarshaled invocation of javascript from .NET code. - * */ - class jsCallDispatcher { - private static registrations; - private static methodMap; - private static _isUnoRegistered; - private static dispatcherCallback; - /** - * Registers a instance for a specified identier - * @param identifier the scope name - * @param instance the instance to use for the scope - */ - static registerScope(identifier: string, instance: any): void; - static findJSFunction(identifier: string): any; - /** - * Internal dispatcher for methods invoked through TSInteropMarshaller - * @param id The method ID obtained when invoking WebAssemblyRuntime.InvokeJSUnmarshalled with a method name - * @param pParams The parameters structure ID - * @param pRet The pointer to the return value structure - */ - private static dispatch; - /** - * Parses the method identifier - * @param identifier - */ - private static parseIdentifier; - /** - * Adds the a resolved method for a given identifier - * @param identifier the findJSFunction identifier - * @param boundMethod the method to call - */ - private static cacheMethod; - private static getMethodMapId; - static invokeOnMainThread(): void; - } -} -declare const config: any; -declare namespace Uno.UI { - class WindowManager { - private containerElementId; - private loadingElementId; - static current: WindowManager; - private static _isHosted; - private static _isLoadEventsEnabled; - /** - * Defines if the WindowManager is running in hosted mode, and should skip the - * initialization of WebAssembly, use this mode in conjunction with the Uno.UI.WpfHost - * to improve debuggability. - */ - static get isHosted(): boolean; - /** - * Defines if the WindowManager is responsible to raise the loading, loaded and unloaded events, - * or if they are raised directly by the managed code to reduce interop. - */ - static get isLoadEventsEnabled(): boolean; - private static readonly unoRootClassName; - private static readonly unoUnarrangedClassName; - private static readonly unoCollapsedClassName; - private static _cctor; - /** - * Initialize the WindowManager - * @param containerElementId The ID of the container element for the Xaml UI - * @param loadingElementId The ID of the loading element to remove once ready - */ - static init(isHosted: boolean, isLoadEventsEnabled: boolean, containerElementId?: string, loadingElementId?: string): string; - /** - * Builds a promise that will signal the ability for the dispatcher - * to initiate work. - * */ - private static buildReadyPromise; - /** - * Build the splashscreen image eagerly - * */ - private static buildSplashScreen; - /** - * Initialize the WindowManager - * @param containerElementId The ID of the container element for the Xaml UI - * @param loadingElementId The ID of the loading element to remove once ready - */ - static initNative(pParams: number): boolean; - private containerElement; - private rootElement; - private cursorStyleElement; - private allActiveElementsById; - private uiElementRegistrations; - private static resizeMethod; - private static dispatchEventMethod; - private static focusInMethod; - private static dispatchSuspendingMethod; - private static getDependencyPropertyValueMethod; - private static setDependencyPropertyValueMethod; - private constructor(); - /** - * Creates the UWP-compatible splash screen - * - */ - static setupSplashScreen(splashImage: HTMLImageElement): void; - /** - * Reads the window's search parameters - * - */ - static findLaunchArguments(): string; - /** - * Create a html DOM element representing a Xaml element. - * - * You need to call addView to connect it to the DOM. - */ - createContent(contentDefinition: IContentDefinition): string; - /** - * Create a html DOM element representing a Xaml element. - * - * You need to call addView to connect it to the DOM. - */ - createContentNative(pParams: number): boolean; - private createContentInternal; - registerUIElement(typeName: string, isFrameworkElement: boolean, classNames: string[]): number; - registerUIElementNative(pParams: number, pReturn: number): boolean; - getView(elementHandle: number): HTMLElement | SVGElement; - /** - * Set a name for an element. - * - * This is mostly for diagnostic purposes. - */ - setName(elementId: number, name: string): string; - /** - * Set a name for an element. - * - * This is mostly for diagnostic purposes. - */ - setNameNative(pParam: number): boolean; - private setNameInternal; - /** - * Set a name for an element. - * - * This is mostly for diagnostic purposes. - */ - setXUid(elementId: number, name: string): string; - /** - * Set a name for an element. - * - * This is mostly for diagnostic purposes. - */ - setXUidNative(pParam: number): boolean; - private setXUidInternal; - /** - * Sets the visibility of the specified element - */ - setVisibility(elementId: number, visible: boolean): string; - setVisibilityNative(pParam: number): boolean; - private setVisibilityInternal; - /** - * Set an attribute for an element. - */ - setAttributes(elementId: number, attributes: { - [name: string]: string; - }): string; - /** - * Set an attribute for an element. - */ - setAttributesNative(pParams: number): boolean; - /** - * Set an attribute for an element. - */ - setAttributeNative(pParams: number): boolean; - /** - * Removes an attribute for an element. - */ - removeAttribute(elementId: number, name: string): string; - /** - * Removes an attribute for an element. - */ - removeAttributeNative(pParams: number): boolean; - /** - * Get an attribute for an element. - */ - getAttribute(elementId: number, name: string): any; - /** - * Set a property for an element. - */ - setProperty(elementId: number, properties: { - [name: string]: string; - }): string; - /** - * Set a property for an element. - */ - setPropertyNative(pParams: number): boolean; - /** - * Get a property for an element. - */ - getProperty(elementId: number, name: string): any; - /** - * Set the CSS style of a html element. - * - * To remove a value, set it to empty string. - * @param styles A dictionary of styles to apply on html element. - */ - setStyle(elementId: number, styles: { - [name: string]: string; - }): string; - /** - * Set the CSS style of a html element. - * - * To remove a value, set it to empty string. - * @param styles A dictionary of styles to apply on html element. - */ - setStyleNative(pParams: number): boolean; - /** - * Set a single CSS style of a html element - * - */ - setStyleDoubleNative(pParams: number): boolean; - setArrangeProperties(elementId: number): string; - /** - * Remove the CSS style of a html element. - */ - resetStyle(elementId: number, names: string[]): string; - /** - * Remove the CSS style of a html element. - */ - resetStyleNative(pParams: number): boolean; - private resetStyleInternal; - isCssPropertySupported(propertyName: string, value: string): boolean; - isCssConditionSupported(supportCondition: string): boolean; - /** - * Set + Unset CSS classes on an element - */ - setUnsetClasses(elementId: number, cssClassesToSet: string[], cssClassesToUnset: string[]): void; - setUnsetClassesNative(pParams: number): boolean; - /** - * Set CSS classes on an element from a specified list - */ - setClasses(elementId: number, cssClassesList: string[], classIndex: number): string; - setClassesNative(pParams: number): boolean; - /** - * Arrange and clips a native elements - * - */ - arrangeElementNative(pParams: number): boolean; - private setAsArranged; - private setAsUnarranged; - /** - * Sets the color property of the specified element - */ - setElementColor(elementId: number, color: number): string; - setElementColorNative(pParam: number): boolean; - private setElementColorInternal; - /** - * Sets the element's selection highlight. - **/ - setSelectionHighlight(elementId: number, backgroundColor: number, foregroundColor: number): boolean; - setSelectionHighlightNative(pParam: number): boolean; - /** - * Sets the fill property of the specified element - */ - setElementFill(elementId: number, color: number): string; - setElementFillNative(pParam: number): boolean; - private setElementFillInternal; - /** - * Sets the background color property of the specified element - */ - setElementBackgroundColor(pParam: number): boolean; - /** - * Sets the background image property of the specified element - */ - setElementBackgroundGradient(pParam: number): boolean; - /** - * Clears the background property of the specified element - */ - resetElementBackground(pParam: number): boolean; - /** - * Sets the transform matrix of an element - * - */ - setElementTransformNative(pParams: number): boolean; - private setPointerEvents; - setPointerEventsNative(pParams: number): boolean; - /** - * Load the specified URL into a new tab or window - * @param url URL to load - * @returns "True" or "False", depending on whether a new window could be opened or not - */ - open(url: string): string; - /** - * Issue a browser alert to user - * @param message message to display - */ - alert(message: string): string; - /** - * Sets the browser window title - * @param message the new title - */ - setWindowTitle(title: string): string; - /** - * Gets the currently set browser window title - */ - getWindowTitle(): string; - /** - * Add an event handler to a html element. - * - * @param eventName The name of the event - * @param onCapturePhase true means "on trickle down" (going down to target), false means "on bubble up" (bubbling back to ancestors). Default is false. - */ - registerEventOnView(elementId: number, eventName: string, onCapturePhase: boolean, eventExtractorId: number): string; - /** - * Add an event handler to a html element. - * - * @param eventName The name of the event - * @param onCapturePhase true means "on trickle down", false means "on bubble up". Default is false. - */ - registerEventOnViewNative(pParams: number): boolean; - /** - * Add an event handler to a html element. - * - * @param eventName The name of the event - * @param onCapturePhase true means "on trickle down", false means "on bubble up". Default is false. - */ - private registerEventOnViewInternal; - /** - * keyboard event extractor to be used with registerEventOnView - * @param evt - */ - private keyboardEventExtractor; - /** - * tapped (mouse clicked / double clicked) event extractor to be used with registerEventOnView - * @param evt - */ - private tappedEventExtractor; - /** - * focus event extractor to be used with registerEventOnView - * @param evt - */ - private focusEventExtractor; - private customEventDetailExtractor; - private customEventDetailStringExtractor; - /** - * Gets the event extractor function. See UIElement.HtmlEventExtractor - * @param eventExtractorName an event extractor name. - */ - private getEventExtractor; - /** - * Set or replace the root element. - */ - setRootElement(elementId?: number): string; - /** - * Set a view as a child of another one. - * - * "Loading" & "Loaded" events will be raised if necessary. - * - * @param index Position in children list. Appended at end if not specified. - */ - addView(parentId: number, childId: number, index?: number): string; - /** - * Set a view as a child of another one. - * - * "Loading" & "Loaded" events will be raised if necessary. - * - * @param pParams Pointer to a WindowManagerAddViewParams native structure. - */ - addViewNative(pParams: number): boolean; - addViewInternal(parentId: number, childId: number, index?: number): void; - /** - * Remove a child from a parent element. - * - * "Unloading" & "Unloaded" events will be raised if necessary. - */ - removeView(parentId: number, childId: number): string; - /** - * Remove a child from a parent element. - * - * "Unloading" & "Unloaded" events will be raised if necessary. - */ - removeViewNative(pParams: number): boolean; - private removeViewInternal; - /** - * Destroy a html element. - * - * The element won't be available anymore. Usually indicate the managed - * version has been scavenged by the GC. - */ - destroyView(elementId: number): string; - /** - * Destroy a html element. - * - * The element won't be available anymore. Usually indicate the managed - * version has been scavenged by the GC. - */ - destroyViewNative(pParams: number): boolean; - private destroyViewInternal; - getBoundingClientRect(elementId: number): string; - getBBox(elementId: number): string; - getBBoxNative(pParams: number, pReturn: number): boolean; - private getBBoxInternal; - setSvgElementRect(pParams: number): boolean; - /** - * Use the Html engine to measure the element using specified constraints. - * - * @param maxWidth string containing width in pixels. Empty string means infinite. - * @param maxHeight string containing height in pixels. Empty string means infinite. - * @param measureContent if we're interested by the content of the control ('s image, 's text...) - */ - measureView(viewId: string, maxWidth: string, maxHeight: string, measureContent?: boolean): string; - /** - * Use the Html engine to measure the element using specified constraints. - * - * @param maxWidth string containing width in pixels. Empty string means infinite. - * @param maxHeight string containing height in pixels. Empty string means infinite. - */ - measureViewNative(pParams: number, pReturn: number): boolean; - private static MAX_WIDTH; - private static MAX_HEIGHT; - private measureElement; - private measureViewInternal; - private createUnconstrainedStyle; - scrollTo(pParams: number): boolean; - rawPixelsToBase64EncodeImage(dataPtr: number, width: number, height: number): string; - /** - * Sets the provided image with a mono-chrome version of the provided url. - * @param viewId the image to manipulate - * @param url the source image - * @param color the color to apply to the monochrome pixels - */ - setImageAsMonochrome(viewId: number, url: string, color: string): string; - setPointerCapture(viewId: number, pointerId: number): string; - releasePointerCapture(viewId: number, pointerId: number): string; - focusView(elementId: number): string; - /** - * Set the Html content for an element. - * - * Those html elements won't be available as XamlElement in managed code. - * WARNING: you should avoid mixing this and `addView` for the same element. - */ - setHtmlContent(viewId: number, html: string): string; - /** - * Set the Html content for an element. - * - * Those html elements won't be available as XamlElement in managed code. - * WARNING: you should avoid mixing this and `addView` for the same element. - */ - setHtmlContentNative(pParams: number): boolean; - private setHtmlContentInternal; - /** - * Gets the Client and Offset size of the specified element - * - * This method is used to determine the size of the scroll bars, to - * mask the events coming from that zone. - */ - getClientViewSize(elementId: number): string; - /** - * Gets the Client and Offset size of the specified element - * - * This method is used to determine the size of the scroll bars, to - * mask the events coming from that zone. - */ - getClientViewSizeNative(pParams: number, pReturn: number): boolean; - /** - * Gets a dependency property value. - * - * Note that the casing of this method is intentionally Pascal for platform alignment. - */ - GetDependencyPropertyValue(elementId: number, propertyName: string): string; - /** - * Sets a dependency property value. - * - * Note that the casing of this method is intentionally Pascal for platform alignment. - */ - SetDependencyPropertyValue(elementId: number, propertyNameAndValue: string): string; - /** - * Remove the loading indicator. - * - * In a future version it will also handle the splashscreen. - */ - activate(): string; - private init; - private static initMethods; - private initDom; - private removeLoading; - private resize; - private onfocusin; - private onWindowBlur; - private dispatchEvent; - private getIsConnectedToRootElement; - private handleToString; - private numberToCssColor; - setCursor(cssCursor: string): string; - getNaturalImageSize(imageUrl: string): Promise; - selectInputRange(elementId: number, start: number, length: number): void; - } -} -interface PointerEvent { - isOver(this: PointerEvent, element: HTMLElement | SVGElement): boolean; - isOverDeep(this: PointerEvent, element: HTMLElement | SVGElement): boolean; - /** - * Indicates if the pointer is over the given 'element' and there no other element above it (i.e. given 'element' is top most). - */ - isDirectlyOver(this: PointerEvent, element: HTMLElement | SVGElement): boolean; -} -declare namespace Uno.UI.Interop { - class AsyncInteropHelper { - private static dispatchResultMethod; - private static dispatchErrorMethod; - private static init; - static Invoke(handle: number, promiseFunction: () => Promise): void; - } -} -declare module Uno.UI { - interface IAppManifest { - splashScreenImage: URL; - splashScreenColor: string; - displayName: string; - } -} -declare module Uno.UI.Interop { - interface IMonoAssemblyHandle { - } -} -declare module Uno.UI.Interop { - interface IMonoClassHandle { - } -} -declare module Uno.UI.Interop { - interface IMonoMethodHandle { - } -} -declare module Uno.UI.Interop { - interface IMonoRuntime { - assembly_load(assemblyName: string): Interop.IMonoAssemblyHandle; - find_class(moduleHandle: Interop.IMonoAssemblyHandle, namespace: string, typeName: string): Interop.IMonoClassHandle; - find_method(classHandle: Interop.IMonoClassHandle, methodName: string, _: number): Interop.IMonoMethodHandle; - call_method(methodHandle: Interop.IMonoMethodHandle, object: any, params?: any[]): any; - mono_string(str: string): Interop.IMonoStringHandle; - conv_string(strHandle: Interop.IMonoStringHandle): string; - } -} -declare module Uno.UI.Interop { - interface IMonoStringHandle { - } -} -declare module Uno.UI.Interop { - interface IUnoDispatch { - resize(size: string): void; - dispatch(htmlIdStr: string, eventNameStr: string, eventPayloadStr: string): string; - } -} -declare module Uno.UI.Interop { - interface IWebAssemblyApp { - main_module: Interop.IMonoAssemblyHandle; - main_class: Interop.IMonoClassHandle; - } -} -declare namespace Uno.Foundation.Interop { - class ManagedObject { - private static assembly; - private static dispatchMethod; - private static init; - static dispatch(handle: string, method: string, parameters: string): void; - } -} -declare namespace Uno.UI.Interop { - class Runtime { - static readonly engine: any; - private static init; - } -} -declare namespace Uno.UI.Interop { - class Xaml { - } -} -declare const MonoRuntime: Uno.UI.Interop.IMonoRuntime; -declare const WebAssemblyApp: Uno.UI.Interop.IWebAssemblyApp; -declare const UnoAppManifest: Uno.UI.IAppManifest; -declare const UnoDispatch: Uno.UI.Interop.IUnoDispatch; -declare enum ContactProperty { - Address = "address", - Email = "email", - Icon = "icon", - Name = "name", - Tel = "tel" -} -declare class ContactInfo { - address: PaymentAddress[]; - email: string[]; - name: string; - tel: string; -} -declare class ContactsManager { - select(props: ContactProperty[], options: any): Promise; -} -interface Navigator { - contacts: ContactsManager; -} -declare namespace Windows.ApplicationModel.Contacts { - class ContactPicker { - static isSupported(): boolean; - static pickContacts(pickMultiple: boolean): Promise; - } -} -interface NavigatorDataTransferManager { - share(data: any): Promise; -} -interface Navigator extends NavigatorDataTransferManager { -} -declare namespace Windows.ApplicationModel.DataTransfer { - class DataTransferManager { - static isSupported(): boolean; - static showShareUI(title: string, text: string, url: string): Promise; - } -} -declare namespace Windows.ApplicationModel.DataTransfer.DragDrop.Core { - class DragDropExtension { - private static _dispatchDropEventMethod; - private static _dispatchDragDropArgs; - private static _current; - private static _nextDropId; - private _dropHandler; - private _pendingDropId; - private _pendingDropData; - static enable(pArgs: number): void; - static disable(pArgs: number): void; - constructor(); - dispose(): void; - private dispatchDropEvent; - static retrieveText(itemId: number): Promise; - static retrieveFiles(itemIds: number | number[]): Promise; - private static getAsFile; - } -} -declare namespace Uno.Devices.Enumeration.Internal.Providers.Midi { - class MidiDeviceClassProvider { - static findDevices(findInputDevices: boolean): string; - } -} -declare namespace Uno.Devices.Enumeration.Internal.Providers.Midi { - class MidiDeviceConnectionWatcher { - private static dispatchStateChanged; - static startStateChanged(): void; - static stopStateChanged(): void; - static onStateChanged(event: WebMidi.MIDIConnectionEvent): void; - } -} -declare namespace Windows.Devices.Geolocation { - class Geolocator { - private static dispatchAccessRequest; - private static dispatchGeoposition; - private static dispatchError; - private static positionWatches; - static initialize(): void; - static requestAccess(): void; - static getGeoposition(desiredAccuracyInMeters: number, maximumAge: number, timeout: number, requestId: string): void; - static startPositionWatch(desiredAccuracyInMeters: number, requestId: string): boolean; - static stopPositionWatch(desiredAccuracyInMeters: number, requestId: string): void; - private static handleGeoposition; - private static handleError; - private static getAccurateCurrentPosition; - } -} -declare module Windows.Devices.Input { - enum PointerDeviceType { - Touch = 0, - Pen = 1, - Mouse = 2 - } -} -declare namespace Windows.Devices.Midi { - class MidiInPort { - private static dispatchMessage; - private static instanceMap; - private managedId; - private inputPort; - private constructor(); - static createPort(managedId: string, encodedDeviceId: string): void; - static removePort(managedId: string): void; - static startMessageListener(managedId: string): void; - static stopMessageListener(managedId: string): void; - private messageReceived; - } -} -declare namespace Windows.Devices.Midi { - class MidiOutPort { - static sendBuffer(encodedDeviceId: string, timestamp: number, ...args: number[]): void; - } -} -declare namespace Uno.Devices.Midi.Internal { - class WasmMidiAccess { - private static midiAccess; - static request(systemExclusive: boolean): Promise; - static getMidi(): WebMidi.MIDIAccess; - } -} -interface Window { - DeviceMotionEvent(): void; -} -declare namespace Windows.Devices.Sensors { - class Accelerometer { - private static dispatchReading; - static initialize(): boolean; - static startReading(): void; - static stopReading(): void; - private static readingChangedHandler; - } -} -declare class Gyroscope { - constructor(config: any); - addEventListener(type: "reading" | "activate", listener: (this: this, ev: Event) => any, useCapture?: boolean): void; -} -interface Window { - Gyroscope: Gyroscope; -} -declare namespace Windows.Devices.Sensors { - class Gyrometer { - private static dispatchReading; - private static gyroscope; - static initialize(): boolean; - static startReading(): void; - static stopReading(): void; - private static readingChangedHandler; - } -} -declare class AmbientLightSensor { - constructor(config: any); - addEventListener(type: "reading", listener: (this: this, ev: Event) => any): void; - removeEventListener(type: "reading", listener: (this: this, ev: Event) => any): void; - start(): void; - stop(): void; - illuminance: number; -} -interface Window { - AmbientLightSensor: AmbientLightSensor; -} -declare namespace Windows.Devices.Sensors { - class LightSensor { - private static dispatchReading; - private static ambientLightSensor; - static initialize(): boolean; - static startReading(): void; - static stopReading(): void; - private static readingChangedHandler; - } -} -declare class Magnetometer { - constructor(config: any); - addEventListener(type: "reading" | "activate", listener: (this: this, ev: Event) => any, useCapture?: boolean): void; -} -interface Window { - Magnetometer: Magnetometer; -} -declare namespace Windows.Devices.Sensors { - class Magnetometer { - private static dispatchReading; - private static magnetometer; - static initialize(): boolean; - static startReading(): void; - static stopReading(): void; - private static readingChangedHandler; - } -} -declare namespace Windows.Gaming.Input { - class Gamepad { - private static dispatchGamepadAdded; - private static dispatchGamepadRemoved; - static getConnectedGamepadIds(): string; - static getReading(id: number): string; - static startGamepadAdded(): void; - static endGamepadAdded(): void; - static startGamepadRemoved(): void; - static endGamepadRemoved(): void; - private static onGamepadConnected; - private static onGamepadDisconnected; - } -} -declare namespace Windows.Graphics.Display { - enum DisplayOrientations { - None = 0, - Landscape = 1, - Portrait = 2, - LandscapeFlipped = 4, - PortraitFlipped = 8 - } - export class DisplayInformation { - private static readonly DpiCheckInterval; - private static lastDpi; - private static dpiWatcher; - private static dispatchOrientationChanged; - private static dispatchDpiChanged; - private static lockingSupported; - static startOrientationChanged(): void; - static stopOrientationChanged(): void; - static startDpiChanged(): void; - static stopDpiChanged(): void; - static setOrientationAsync(uwpOrientations: DisplayOrientations): Promise; - private static parseUwpOrientation; - private static updateDpi; - private static onOrientationChange; - } - export {}; -} -interface Window { - SpeechRecognition: any; - webkitSpeechRecognition: any; -} -declare namespace Windows.Media { - class SpeechRecognizer { - private static dispatchResult; - private static dispatchHypothesis; - private static dispatchStatus; - private static dispatchError; - private static instanceMap; - private managedId; - private recognition; - private constructor(); - static initialize(managedId: string, culture: string): void; - static recognize(managedId: string): boolean; - static removeInstance(managedId: string): void; - private onResult; - private onSpeechStart; - private onError; - } -} -declare namespace Windows.Networking.Connectivity { - class ConnectionProfile { - static hasInternetAccess(): boolean; - } -} -declare namespace Windows.Networking.Connectivity { - class NetworkInformation { - private static dispatchStatusChanged; - static startStatusChanged(): void; - static stopStatusChanged(): void; - static networkStatusChanged(): void; - } -} -interface Navigator { - webkitVibrate(pattern: number | number[]): boolean; - mozVibrate(pattern: number | number[]): boolean; - msVibrate(pattern: number | number[]): boolean; -} -declare namespace Windows.Phone.Devices.Notification { - class VibrationDevice { - static initialize(): boolean; - static vibrate(duration: number): boolean; - } -} -declare namespace Windows.Security.Authentication.Web { - class WebAuthenticationBroker { - static getReturnUrl(): string; - static authenticateUsingIframe(iframeId: string, urlNavigate: string, urlRedirect: string, timeout: number): Promise; - static authenticateUsingWindow(urlNavigate: string, urlRedirect: string, title: string, popUpWidth: number, popUpHeight: number, timeout: number): Promise; - private static startMonitoringRedirect; - } -} -declare namespace Windows.Storage { - class ApplicationDataContainer { - private static buildStorageKey; - private static buildStoragePrefix; - /** - * Try to get a value from localStorage - * */ - private static tryGetValue; - /** - * Set a value to localStorage - * */ - private static setValue; - /** - * Determines if a key is contained in localStorage - * */ - private static containsKey; - /** - * Gets a key by index in localStorage - * */ - private static getKeyByIndex; - /** - * Determines the number of items contained in localStorage - * */ - private static getCount; - /** - * Clears items contained in localStorage - * */ - private static clear; - /** - * Removes an item contained in localStorage - * */ - private static remove; - /** - * Gets a key by index in localStorage - * */ - private static getValueByIndex; - } -} -declare namespace Windows.Storage { - class AssetManager { - static DownloadAssetsManifest(path: string): Promise; - static DownloadAsset(path: string): Promise; - } -} -declare namespace Uno.Storage { - class NativeStorageFile { - static getBasicPropertiesAsync(guid: string): Promise; - } -} -declare namespace Uno.Storage { - class NativeStorageFolder { - /** - * Creates a new folder inside another folder. - * @param parentGuid The GUID of the folder to create in. - * @param folderName The name of the new folder. - */ - static createFolderAsync(parentGuid: string, folderName: string): Promise; - /** - * Creates a new file inside another folder. - * @param parentGuid The GUID of the folder to create in. - * @param folderName The name of the new file. - */ - static createFileAsync(parentGuid: string, fileName: string): Promise; - /** - * Tries to get a folder in the given parent folder by name. - * @param parentGuid The GUID of the parent folder to get. - * @param folderName The name of the folder to look for. - * @returns A GUID of the folder if found, otherwise null. - */ - static tryGetFolderAsync(parentGuid: string, folderName: string): Promise; - /** - * Tries to get a file in the given parent folder by name. - * @param parentGuid The GUID of the parent folder to get. - * @param folderName The name of the folder to look for. - * @returns A GUID of the folder if found, otherwise null. - */ - static tryGetFileAsync(parentGuid: string, fileName: string): Promise; - static deleteItemAsync(parentGuid: string, itemName: string): Promise; - static getItemsAsync(folderGuid: string): Promise; - static getFoldersAsync(folderGuid: string): Promise; - static getFilesAsync(folderGuid: string): Promise; - static getPrivateRootAsync(): Promise; - private static getEntriesAsync; - } -} -declare namespace Uno.Storage { - class NativeStorageItem { - private static generateGuidBinding; - private static _guidToItemMap; - private static _itemToGuidMap; - static addItem(guid: string, item: FileSystemHandle | File): void; - static removeItem(guid: string): void; - static getItem(guid: string): FileSystemHandle | File; - static getFile(guid: string): Promise; - static getGuid(item: FileSystemHandle | File): string; - static getInfos(...items: Array): NativeStorageItemInfo[]; - private static storeItems; - private static generateGuids; - } -} -declare namespace Uno.Storage { - class NativeStorageItemInfo { - id: string; - name: string; - path: string; - isFile: boolean; - } -} -declare namespace Windows.Storage { - class StorageFolder { - private static _isInitialized; - private static _isSynchronizing; - private static dispatchStorageInitialized; - /** - * Determine if IndexDB is available, some browsers and modes disable it. - * */ - static isIndexDBAvailable(): boolean; - /** - * Setup the storage persistence of a given set of paths. - * */ - private static makePersistent; - /** - * Setup the storage persistence of a given path. - * */ - static setupStorage(path: string): void; - private static onStorageInitialized; - /** - * Synchronize the IDBFS memory cache back to IndexedDB - * populate: requests the filesystem to be popuplated from the IndexedDB - * onSynchronized: function invoked when the synchronization finished - * */ - private static synchronizeFileSystem; - } -} -declare namespace Windows.Storage.Pickers { - class FileOpenPicker { - static isNativeSupported(): boolean; - static nativePickFilesAsync(multiple: boolean, showAllEntry: boolean, fileTypesJson: string, id: string, startIn: StartInDirectory): Promise; - static uploadPickFilesAsync(multiple: boolean, targetPath: string, accept: string): Promise; - } -} -declare namespace Windows.Storage.Pickers { - class FileSavePicker { - static isNativeSupported(): boolean; - static nativePickSaveFileAsync(showAllEntry: boolean, fileTypesJson: string, suggestedFileName: string, id: string, startIn: StartInDirectory): Promise; - static SaveAs(fileName: string, dataPtr: any, size: number): void; - } -} -declare namespace Windows.Storage.Pickers { - class FolderPicker { - static isNativeSupported(): boolean; - static pickSingleFolderAsync(id: string, startIn: StartInDirectory): Promise; - } -} -declare namespace Uno.Storage.Pickers { - class NativeFilePickerAcceptType { - description: string; - accept: NativeFilePickerAcceptTypeItem[]; - } -} -declare namespace Uno.Storage.Pickers { - class NativeFilePickerAcceptTypeItem { - mimeType: string; - extensions: string[]; - } -} -declare namespace Uno.Storage.Streams { - class NativeFileReadStream { - private static _streamMap; - private _file; - private constructor(); - static openAsync(streamId: string, fileId: string): Promise; - static readAsync(streamId: string, targetArrayPointer: number, offset: number, count: number, position: number): Promise; - static close(streamId: string): void; - } -} -declare namespace Uno.Storage.Streams { - class NativeFileWriteStream { - private static _streamMap; - private _stream; - private _buffer; - private constructor(); - static openAsync(streamId: string, fileId: string): Promise; - private static verifyPermissionAsync; - static writeAsync(streamId: string, dataArrayPointer: number, offset: number, count: number, position: number): Promise; - static closeAsync(streamId: string): Promise; - static truncateAsync(streamId: string, length: number): Promise; - } -} -declare namespace Windows.System { - class MemoryManager { - static getAppMemoryUsage(): any; - } -} -interface Navigator { - wakeLock: WakeLock; -} -declare enum WakeLockType { - screen = "screen" -} -interface WakeLock { - request(type: WakeLockType): Promise; -} -interface WakeLockSentinel { - release(): Promise; -} -declare namespace Windows.System.Display { - class DisplayRequest { - private static activeScreenLockPromise; - static activateScreenLock(): void; - static deactivateScreenLock(): void; - } -} -declare namespace Windows.System.Profile { - class AnalyticsInfo { - static getDeviceType(): string; - } -} -interface Window { - opr: any; - opera: any; - mozVibrate(pattern: number | number[]): boolean; - msVibrate(pattern: number | number[]): boolean; - InstallTrigger: any; - HTMLElement: any; - StyleMedia: any; - chrome: any; - CSS: any; - safari: any; -} -interface Document { - documentMode: any; -} -declare namespace Windows.System.Profile { - class AnalyticsVersionInfo { - static getUserAgent(): string; - static getBrowserName(): string; - } -} -declare namespace Windows.UI.Core { - class SystemNavigationManager { - private static _current; - static get current(): SystemNavigationManager; - private _isEnabled; - constructor(); - enable(): void; - disable(): void; - private clearStack; - } -} -interface Navigator { - setAppBadge(value: number): void; - clearAppBadge(): void; -} -declare namespace Windows.UI.Notifications { - class BadgeUpdater { - static setNumber(value: number): void; - static clear(): void; - } -} -declare namespace Windows.UI.ViewManagement { - class ApplicationView { - static setFullScreenMode(turnOn: boolean): boolean; - } -} -declare namespace Windows.UI.ViewManagement { - class ApplicationViewTitleBar { - static setBackgroundColor(colorString: string): void; - } -} -declare namespace Windows.UI.Xaml { - class Application { - private static dispatchThemeChange; - private static dispatchVisibilityChange; - static getDefaultSystemTheme(): string; - static observeSystemTheme(): void; - static observeVisibility(): void; - } -} -declare namespace Windows.UI.Xaml { - enum ApplicationTheme { - Light = "Light", - Dark = "Dark" - } -} -declare namespace Windows.UI.Xaml { - enum NativePointerEvent { - pointerover = 1, - pointerout = 2, - pointerdown = 4, - pointerup = 8, - pointercancel = 16, - pointermove = 32, - wheel = 64 - } - class UIElement_Pointers { - private static _dispatchPointerEventMethod; - private static _dispatchPointerEventArgs; - private static _dispatchPointerEventResult; - static setPointerEventArgs(pArgs: number): void; - static setPointerEventResult(pArgs: number): void; - static subscribePointerEvents(pParams: number): void; - static unSubscribePointerEvents(pParams: number): void; - private static onPointerEventReceived; - private static onPointerOutReceived; - private static dispatchPointerEvent; - private static _wheelLineSize; - private static get wheelLineSize(); - private static toNativePointerEventArgs; - private static toNativeEvent; - private static toPointerDeviceType; - } -} -declare namespace Windows.UI.Xaml { - class UIElement extends Windows.UI.Xaml.UIElement_Pointers { - } -} -declare namespace Windows.UI.Xaml.Media.Animation { - class RenderingLoopAnimator { - private managedHandle; - private static activeInstances; - static createInstance(managedHandle: string, jsHandle: number): void; - static getInstance(jsHandle: number): RenderingLoopAnimator; - static destroyInstance(jsHandle: number): void; - private constructor(); - SetStartFrameDelay(delay: number): void; - SetAnimationFramesInterval(): void; - EnableFrameReporting(): void; - DisableFrameReporting(): void; - private onFrame; - private unscheduleFrame; - private scheduleDelayedFrame; - private scheduleAnimationFrame; - private _delayRequestId?; - private _frameRequestId?; - private _isEnabled; - } -} -declare namespace Windows.UI.Xaml.Input { - class FocusVisual { - private static focusVisualId; - private static focusVisual; - private static focusedElement; - private static currentDispatchTimeout?; - private static dispatchPositionChange; - static attachVisual(focusVisualId: number, focusedElementId: number): void; - static detachVisual(): void; - private static onDocumentScroll; - static updatePosition(): void; - } -} -declare namespace Windows.UI.Xaml.Media { - class FontFamily { - private static managedNotifyFontLoaded?; - private static managedNotifyFontLoadFailed?; - static loadFont(fontFamilyName: string, fontSource: string): Promise; - static forceFontUsage(fontFamilyName: string): Promise; - private static notifyFontLoaded; - private static notifyFontLoadFailed; - } -} -declare class WindowManagerAddViewParams { - HtmlId: number; - ChildView: number; - Index: number; - static unmarshal(pData: number): WindowManagerAddViewParams; -} -declare class WindowManagerArrangeElementParams { - Top: number; - Left: number; - Width: number; - Height: number; - ClipTop: number; - ClipLeft: number; - ClipBottom: number; - ClipRight: number; - HtmlId: number; - Clip: boolean; - static unmarshal(pData: number): WindowManagerArrangeElementParams; -} -declare class WindowManagerCreateContentParams { - HtmlId: number; - TagName: string; - Handle: number; - UIElementRegistrationId: number; - IsSvg: boolean; - IsFocusable: boolean; - static unmarshal(pData: number): WindowManagerCreateContentParams; -} -declare class WindowManagerDestroyViewParams { - HtmlId: number; - static unmarshal(pData: number): WindowManagerDestroyViewParams; -} -declare class WindowManagerGetBBoxParams { - HtmlId: number; - static unmarshal(pData: number): WindowManagerGetBBoxParams; -} -declare class WindowManagerGetBBoxReturn { - X: number; - Y: number; - Width: number; - Height: number; - marshal(pData: number): void; -} -declare class WindowManagerGetClientViewSizeParams { - HtmlId: number; - static unmarshal(pData: number): WindowManagerGetClientViewSizeParams; -} -declare class WindowManagerGetClientViewSizeReturn { - OffsetWidth: number; - OffsetHeight: number; - ClientWidth: number; - ClientHeight: number; - marshal(pData: number): void; -} -declare class WindowManagerInitParams { - IsHostedMode: boolean; - IsLoadEventsEnabled: boolean; - static unmarshal(pData: number): WindowManagerInitParams; -} -declare class WindowManagerMeasureViewParams { - HtmlId: number; - AvailableWidth: number; - AvailableHeight: number; - MeasureContent: boolean; - static unmarshal(pData: number): WindowManagerMeasureViewParams; -} -declare class WindowManagerMeasureViewReturn { - DesiredWidth: number; - DesiredHeight: number; - marshal(pData: number): void; -} -declare class WindowManagerRegisterEventOnViewParams { - HtmlId: number; - EventName: string; - OnCapturePhase: boolean; - EventExtractorId: number; - static unmarshal(pData: number): WindowManagerRegisterEventOnViewParams; -} -declare class WindowManagerRegisterPointerEventsOnViewParams { - HtmlId: number; - static unmarshal(pData: number): WindowManagerRegisterPointerEventsOnViewParams; -} -declare class WindowManagerRegisterUIElementParams { - TypeName: string; - IsFrameworkElement: boolean; - Classes_Length: number; - Classes: Array; - static unmarshal(pData: number): WindowManagerRegisterUIElementParams; -} -declare class WindowManagerRegisterUIElementReturn { - RegistrationId: number; - marshal(pData: number): void; -} -declare class WindowManagerRemoveAttributeParams { - HtmlId: number; - Name: string; - static unmarshal(pData: number): WindowManagerRemoveAttributeParams; -} -declare class WindowManagerRemoveViewParams { - HtmlId: number; - ChildView: number; - static unmarshal(pData: number): WindowManagerRemoveViewParams; -} -declare class WindowManagerResetElementBackgroundParams { - HtmlId: number; - static unmarshal(pData: number): WindowManagerResetElementBackgroundParams; -} -declare class WindowManagerResetStyleParams { - HtmlId: number; - Styles_Length: number; - Styles: Array; - static unmarshal(pData: number): WindowManagerResetStyleParams; -} -declare class WindowManagerScrollToOptionsParams { - Left: number; - Top: number; - HasLeft: boolean; - HasTop: boolean; - DisableAnimation: boolean; - HtmlId: number; - static unmarshal(pData: number): WindowManagerScrollToOptionsParams; -} -declare class WindowManagerSetAttributeParams { - HtmlId: number; - Name: string; - Value: string; - static unmarshal(pData: number): WindowManagerSetAttributeParams; -} -declare class WindowManagerSetAttributesParams { - HtmlId: number; - Pairs_Length: number; - Pairs: Array; - static unmarshal(pData: number): WindowManagerSetAttributesParams; -} -declare class WindowManagerSetClassesParams { - HtmlId: number; - CssClasses_Length: number; - CssClasses: Array; - Index: number; - static unmarshal(pData: number): WindowManagerSetClassesParams; -} -declare class WindowManagerSetContentHtmlParams { - HtmlId: number; - Html: string; - static unmarshal(pData: number): WindowManagerSetContentHtmlParams; -} -declare class WindowManagerSetElementBackgroundColorParams { - HtmlId: number; - Color: number; - static unmarshal(pData: number): WindowManagerSetElementBackgroundColorParams; -} -declare class WindowManagerSetElementBackgroundGradientParams { - HtmlId: number; - CssGradient: string; - static unmarshal(pData: number): WindowManagerSetElementBackgroundGradientParams; -} -declare class WindowManagerSetElementColorParams { - HtmlId: number; - Color: number; - static unmarshal(pData: number): WindowManagerSetElementColorParams; -} -declare class WindowManagerSetElementFillParams { - HtmlId: number; - Color: number; - static unmarshal(pData: number): WindowManagerSetElementFillParams; -} -declare class WindowManagerSetElementTransformParams { - HtmlId: number; - M11: number; - M12: number; - M21: number; - M22: number; - M31: number; - M32: number; - static unmarshal(pData: number): WindowManagerSetElementTransformParams; -} -declare class WindowManagerSetNameParams { - HtmlId: number; - Name: string; - static unmarshal(pData: number): WindowManagerSetNameParams; -} -declare class WindowManagerSetPointerEventsParams { - HtmlId: number; - Enabled: boolean; - static unmarshal(pData: number): WindowManagerSetPointerEventsParams; -} -declare class WindowManagerSetPropertyParams { - HtmlId: number; - Pairs_Length: number; - Pairs: Array; - static unmarshal(pData: number): WindowManagerSetPropertyParams; -} -declare class WindowManagerSetSelectionHighlightParams { - HtmlId: number; - BackgroundColor: number; - ForegroundColor: number; - static unmarshal(pData: number): WindowManagerSetSelectionHighlightParams; -} -declare class WindowManagerSetStyleDoubleParams { - HtmlId: number; - Name: string; - Value: number; - static unmarshal(pData: number): WindowManagerSetStyleDoubleParams; -} -declare class WindowManagerSetStylesParams { - HtmlId: number; - Pairs_Length: number; - Pairs: Array; - static unmarshal(pData: number): WindowManagerSetStylesParams; -} -declare class WindowManagerSetSvgElementRectParams { - X: number; - Y: number; - Width: number; - Height: number; - HtmlId: number; - static unmarshal(pData: number): WindowManagerSetSvgElementRectParams; -} -declare class WindowManagerSetUnsetClassesParams { - HtmlId: number; - CssClassesToSet_Length: number; - CssClassesToSet: Array; - CssClassesToUnset_Length: number; - CssClassesToUnset: Array; - static unmarshal(pData: number): WindowManagerSetUnsetClassesParams; -} -declare class WindowManagerSetVisibilityParams { - HtmlId: number; - Visible: boolean; - static unmarshal(pData: number): WindowManagerSetVisibilityParams; -} -declare class WindowManagerSetXUidParams { - HtmlId: number; - Uid: string; - static unmarshal(pData: number): WindowManagerSetXUidParams; -} -declare namespace Windows.ApplicationModel.DataTransfer.DragDrop.Core { - class DragDropExtensionEventArgs { - eventName: string; - allowedOperations: string; - acceptedOperation: string; - dataItems: string; - timestamp: number; - x: number; - y: number; - id: number; - buttons: number; - shift: boolean; - ctrl: boolean; - alt: boolean; - static unmarshal(pData: number): DragDropExtensionEventArgs; - marshal(pData: number): void; - } -} -declare namespace Windows.Storage { - class ApplicationDataContainer_ClearParams { - Locality: string; - static unmarshal(pData: number): ApplicationDataContainer_ClearParams; - } -} -declare namespace Windows.Storage { - class ApplicationDataContainer_ContainsKeyParams { - Key: string; - Value: string; - Locality: string; - static unmarshal(pData: number): ApplicationDataContainer_ContainsKeyParams; - } -} -declare namespace Windows.Storage { - class ApplicationDataContainer_ContainsKeyReturn { - ContainsKey: boolean; - marshal(pData: number): void; - } -} -declare namespace Windows.Storage { - class ApplicationDataContainer_GetCountParams { - Locality: string; - static unmarshal(pData: number): ApplicationDataContainer_GetCountParams; - } -} -declare namespace Windows.Storage { - class ApplicationDataContainer_GetCountReturn { - Count: number; - marshal(pData: number): void; - } -} -declare namespace Windows.Storage { - class ApplicationDataContainer_GetKeyByIndexParams { - Locality: string; - Index: number; - static unmarshal(pData: number): ApplicationDataContainer_GetKeyByIndexParams; - } -} -declare namespace Windows.Storage { - class ApplicationDataContainer_GetKeyByIndexReturn { - Value: string; - marshal(pData: number): void; - } -} -declare namespace Windows.Storage { - class ApplicationDataContainer_GetValueByIndexParams { - Locality: string; - Index: number; - static unmarshal(pData: number): ApplicationDataContainer_GetValueByIndexParams; - } -} -declare namespace Windows.Storage { - class ApplicationDataContainer_GetValueByIndexReturn { - Value: string; - marshal(pData: number): void; - } -} -declare namespace Windows.Storage { - class ApplicationDataContainer_RemoveParams { - Locality: string; - Key: string; - static unmarshal(pData: number): ApplicationDataContainer_RemoveParams; - } -} -declare namespace Windows.Storage { - class ApplicationDataContainer_RemoveReturn { - Removed: boolean; - marshal(pData: number): void; - } -} -declare namespace Windows.Storage { - class ApplicationDataContainer_SetValueParams { - Key: string; - Value: string; - Locality: string; - static unmarshal(pData: number): ApplicationDataContainer_SetValueParams; - } -} -declare namespace Windows.Storage { - class ApplicationDataContainer_TryGetValueParams { - Key: string; - Locality: string; - static unmarshal(pData: number): ApplicationDataContainer_TryGetValueParams; - } -} -declare namespace Windows.Storage { - class ApplicationDataContainer_TryGetValueReturn { - Value: string; - HasValue: boolean; - marshal(pData: number): void; - } -} -declare namespace Windows.Storage { - class StorageFolderMakePersistentParams { - Paths_Length: number; - Paths: Array; - static unmarshal(pData: number): StorageFolderMakePersistentParams; - } -} -declare namespace Windows.UI.Xaml { - class NativePointerEventArgs { - HtmlId: number; - Event: number; - pointerId: number; - x: number; - y: number; - ctrl: boolean; - shift: boolean; - buttons: number; - buttonUpdate: number; - deviceType: number; - srcHandle: number; - timestamp: number; - pressure: number; - wheelDeltaX: number; - wheelDeltaY: number; - hasRelatedTarget: boolean; - marshal(pData: number): void; - } -} -declare namespace Windows.UI.Xaml { - class NativePointerEventResult { - Result: number; - static unmarshal(pData: number): NativePointerEventResult; - } -} -declare namespace Windows.UI.Xaml { - class NativePointerSubscriptionParams { - HtmlId: number; - Events: number; - static unmarshal(pData: number): NativePointerSubscriptionParams; - } -} diff --git a/src/Uno.UI/WasmScripts/Uno.UI.js b/src/Uno.UI/WasmScripts/Uno.UI.js deleted file mode 100644 index 12bbb095b8d3..000000000000 --- a/src/Uno.UI/WasmScripts/Uno.UI.js +++ /dev/null @@ -1,6268 +0,0 @@ -var Uno; -(function (Uno) { - var Utils; - (function (Utils) { - class Clipboard { - static startContentChanged() { - ['cut', 'copy', 'paste'].forEach(function (event) { - document.addEventListener(event, Clipboard.onClipboardChanged); - }); - } - static stopContentChanged() { - ['cut', 'copy', 'paste'].forEach(function (event) { - document.removeEventListener(event, Clipboard.onClipboardChanged); - }); - } - static setText(text) { - const nav = navigator; - if (nav.clipboard) { - // Use clipboard object when available - nav.clipboard.writeText(text); - // Trigger change notification, as clipboard API does - // not execute "copy". - Clipboard.onClipboardChanged(); - } - else { - // Hack when the clipboard is not available - const textarea = document.createElement("textarea"); - textarea.value = text; - document.body.appendChild(textarea); - textarea.select(); - document.execCommand("copy"); - document.body.removeChild(textarea); - } - return "ok"; - } - static getText() { - const nav = navigator; - if (nav.clipboard) { - return nav.clipboard.readText(); - } - return Promise.resolve(null); - } - static onClipboardChanged() { - if (!Clipboard.dispatchContentChanged) { - Clipboard.dispatchContentChanged = - Module.mono_bind_static_method("[Uno] Windows.ApplicationModel.DataTransfer.Clipboard:DispatchContentChanged"); - } - Clipboard.dispatchContentChanged(); - } - } - Utils.Clipboard = Clipboard; - })(Utils = Uno.Utils || (Uno.Utils = {})); -})(Uno || (Uno = {})); -var Windows; -(function (Windows) { - var UI; - (function (UI) { - var Core; - (function (Core) { - /** - * Support file for the Windows.UI.Core - * */ - class CoreDispatcher { - static init(isReady) { - MonoSupport.jsCallDispatcher.registerScope("CoreDispatcher", Windows.UI.Core.CoreDispatcher); - CoreDispatcher.initMethods(); - CoreDispatcher._isReady = isReady; - } - /** - * Enqueues a core dispatcher callback on the javascript's event loop - * - * */ - static WakeUp() { - // Is there a Ready promise ? - if (CoreDispatcher._isReady) { - // Are we already waiting for a Ready promise ? - if (!CoreDispatcher._isWaitingReady) { - CoreDispatcher._isReady - .then(() => { - CoreDispatcher.InnerWakeUp(); - CoreDispatcher._isReady = null; - }); - CoreDispatcher._isWaitingReady = true; - } - } - else { - CoreDispatcher.InnerWakeUp(); - } - return true; - } - static InnerWakeUp() { - window.setImmediate(() => { - try { - CoreDispatcher._coreDispatcherCallback(); - } - catch (e) { - console.error(`Unhandled dispatcher exception: ${e} (${e.stack})`); - throw e; - } - }); - } - static initMethods() { - if (Uno.UI.WindowManager.isHosted) { - console.debug("Hosted Mode: Skipping CoreDispatcher initialization "); - } - else { - if (!CoreDispatcher._coreDispatcherCallback) { - CoreDispatcher._coreDispatcherCallback = Module.mono_bind_static_method("[Uno.UI.Dispatching] Uno.UI.Dispatching.CoreDispatcher:DispatcherCallback"); - } - } - } - } - CoreDispatcher._isFirstCall = true; - Core.CoreDispatcher = CoreDispatcher; - })(Core = UI.Core || (UI.Core = {})); - })(UI = Windows.UI || (Windows.UI = {})); -})(Windows || (Windows = {})); -var Uno; -(function (Uno) { - var Utils; - (function (Utils) { - class Guid { - static NewGuid() { - if (!Guid.newGuidMethod) { - Guid.newGuidMethod = Module.mono_bind_static_method("[mscorlib] System.Guid:NewGuid"); - } - return Guid.newGuidMethod(); - } - } - Utils.Guid = Guid; - })(Utils = Uno.Utils || (Uno.Utils = {})); -})(Uno || (Uno = {})); -var Uno; -(function (Uno) { - var UI; - (function (UI) { - class HtmlDom { - /** - * Initialize various polyfills used by Uno - */ - static initPolyfills() { - this.isConnectedPolyfill(); - } - static isConnectedPolyfill() { - function get() { - // polyfill implementation - return document.contains(this); - } - (supported => { - if (!supported) { - Object.defineProperty(Node.prototype, "isConnected", { get }); - } - })("isConnected" in Node.prototype); - } - } - UI.HtmlDom = HtmlDom; - })(UI = Uno.UI || (Uno.UI = {})); -})(Uno || (Uno = {})); -var Uno; -(function (Uno) { - var UI; - (function (UI) { - let HtmlEventDispatchResult; - (function (HtmlEventDispatchResult) { - HtmlEventDispatchResult[HtmlEventDispatchResult["Ok"] = 0] = "Ok"; - HtmlEventDispatchResult[HtmlEventDispatchResult["StopPropagation"] = 1] = "StopPropagation"; - HtmlEventDispatchResult[HtmlEventDispatchResult["PreventDefault"] = 2] = "PreventDefault"; - HtmlEventDispatchResult[HtmlEventDispatchResult["NotDispatched"] = 128] = "NotDispatched"; - })(HtmlEventDispatchResult = UI.HtmlEventDispatchResult || (UI.HtmlEventDispatchResult = {})); - })(UI = Uno.UI || (Uno.UI = {})); -})(Uno || (Uno = {})); -var Uno; -(function (Uno) { - var Http; - (function (Http) { - class HttpClient { - static async send(config) { - const params = { - method: config.method, - cache: config.cacheMode || "default", - headers: new Headers(config.headers) - }; - if (config.payload) { - params.body = await this.blobFromBase64(config.payload, config.payloadType); - } - try { - const response = await fetch(config.url, params); - let responseHeaders = ""; - response.headers.forEach((v, k) => responseHeaders += `${k}:${v}\n`); - const responseBlob = await response.blob(); - const responsePayload = responseBlob ? await this.base64FromBlob(responseBlob) : ""; - this.dispatchResponse(config.id, response.status, responseHeaders, responsePayload); - } - catch (error) { - this.dispatchError(config.id, `${error.message || error}`); - console.error(error); - } - } - static async blobFromBase64(base64, contentType) { - contentType = contentType || "application/octet-stream"; - const url = `data:${contentType};base64,${base64}`; - return await (await fetch(url)).blob(); - } - static base64FromBlob(blob) { - return new Promise(resolve => { - const reader = new FileReader(); - reader.onloadend = () => { - const dataUrl = reader.result; - const base64 = dataUrl.split(",", 2)[1]; - resolve(base64); - }; - reader.readAsDataURL(blob); - }); - } - static dispatchResponse(requestId, status, headers, payload) { - this.initMethods(); - const requestIdStr = MonoRuntime.mono_string(requestId); - const statusStr = MonoRuntime.mono_string("" + status); - const headersStr = MonoRuntime.mono_string(headers); - const payloadStr = MonoRuntime.mono_string(payload); - MonoRuntime.call_method(this.dispatchResponseMethod, null, [requestIdStr, statusStr, headersStr, payloadStr]); - } - static dispatchError(requestId, error) { - this.initMethods(); - const requestIdStr = MonoRuntime.mono_string(requestId); - const errorStr = MonoRuntime.mono_string(error); - MonoRuntime.call_method(this.dispatchErrorMethod, null, [requestIdStr, errorStr]); - } - static initMethods() { - if (this.dispatchResponseMethod) { - return; // already initialized. - } - const asm = MonoRuntime.assembly_load("Uno.UI.Runtime.WebAssembly"); - const httpClass = MonoRuntime.find_class(asm, "Uno.UI.Wasm", "WasmHttpHandler"); - this.dispatchResponseMethod = MonoRuntime.find_method(httpClass, "DispatchResponse", -1); - this.dispatchErrorMethod = MonoRuntime.find_method(httpClass, "DispatchError", -1); - } - } - Http.HttpClient = HttpClient; - })(Http = Uno.Http || (Uno.Http = {})); -})(Uno || (Uno = {})); -// eslint-disable-next-line @typescript-eslint/no-namespace -var MonoSupport; -(function (MonoSupport) { - /** - * This class is used by https://github.com/mono/mono/blob/fa726d3ac7153d87ed187abd422faa4877f85bb5/sdks/wasm/dotnet_support.js#L88 to perform - * unmarshaled invocation of javascript from .NET code. - * */ - class jsCallDispatcher { - /** - * Registers a instance for a specified identier - * @param identifier the scope name - * @param instance the instance to use for the scope - */ - static registerScope(identifier, instance) { - jsCallDispatcher.registrations.set(identifier, instance); - } - static findJSFunction(identifier) { - if (!identifier) { - return jsCallDispatcher.dispatch; - } - else { - if (!jsCallDispatcher._isUnoRegistered) { - jsCallDispatcher.registerScope("UnoStatic", Uno.UI.WindowManager); - jsCallDispatcher.registerScope("UnoStatic_Windows_Storage_StorageFolder", Windows.Storage.StorageFolder); - jsCallDispatcher.registerScope("UnoStatic_Windows_Storage_ApplicationDataContainer", Windows.Storage.ApplicationDataContainer); - jsCallDispatcher.registerScope("UnoStatic_Windows_ApplicationModel_DataTransfer_DragDrop_Core_DragDropExtension", Windows.ApplicationModel.DataTransfer.DragDrop.Core.DragDropExtension); - jsCallDispatcher.registerScope("UnoStatic_Windows_UI_Xaml_UIElement", Windows.UI.Xaml.UIElement); - jsCallDispatcher._isUnoRegistered = true; - } - const { ns, methodName } = jsCallDispatcher.parseIdentifier(identifier); - var instance = jsCallDispatcher.registrations.get(ns); - if (instance) { - var boundMethod = instance[methodName].bind(instance); - var methodId = jsCallDispatcher.cacheMethod(boundMethod); - return () => methodId; - } - else { - throw `Unknown scope ${ns}`; - } - } - } - /** - * Internal dispatcher for methods invoked through TSInteropMarshaller - * @param id The method ID obtained when invoking WebAssemblyRuntime.InvokeJSUnmarshalled with a method name - * @param pParams The parameters structure ID - * @param pRet The pointer to the return value structure - */ - static dispatch(id, pParams, pRet) { - return jsCallDispatcher.methodMap[id + ""](pParams, pRet); - } - /** - * Parses the method identifier - * @param identifier - */ - static parseIdentifier(identifier) { - var parts = identifier.split(':'); - const ns = parts[0]; - const methodName = parts[1]; - return { ns, methodName }; - } - /** - * Adds the a resolved method for a given identifier - * @param identifier the findJSFunction identifier - * @param boundMethod the method to call - */ - static cacheMethod(boundMethod) { - var methodId = Object.keys(jsCallDispatcher.methodMap).length; - jsCallDispatcher.methodMap[methodId + ""] = boundMethod; - return methodId; - } - static getMethodMapId(methodHandle) { - return methodHandle + ""; - } - static invokeOnMainThread() { - if (!jsCallDispatcher.dispatcherCallback) { - jsCallDispatcher.dispatcherCallback = Module.mono_bind_static_method("[Uno.UI.Dispatching] Uno.UI.Dispatching.CoreDispatcher:DispatcherCallback"); - } - // Use setImmediate to return avoid blocking the background thread - // on a sync call. - window.setImmediate(() => { - try { - jsCallDispatcher.dispatcherCallback(); - } - catch (e) { - console.error(`Unhandled dispatcher exception: ${e} (${e.stack})`); - throw e; - } - }); - } - } - jsCallDispatcher.registrations = new Map(); - jsCallDispatcher.methodMap = {}; - MonoSupport.jsCallDispatcher = jsCallDispatcher; -})(MonoSupport || (MonoSupport = {})); -// Export the DotNet helper for WebAssembly.JSInterop.InvokeJSUnmarshalled -window.DotNet = MonoSupport; -// Export the main thread invoker for threading support -MonoSupport.invokeOnMainThread = MonoSupport.jsCallDispatcher.invokeOnMainThread; -// eslint-disable-next-line @typescript-eslint/no-namespace -var Uno; -(function (Uno) { - var UI; - (function (UI) { - class WindowManager { - constructor(containerElementId, loadingElementId) { - this.containerElementId = containerElementId; - this.loadingElementId = loadingElementId; - this.allActiveElementsById = {}; - this.uiElementRegistrations = {}; - this.initDom(); - } - /** - * Defines if the WindowManager is running in hosted mode, and should skip the - * initialization of WebAssembly, use this mode in conjunction with the Uno.UI.WpfHost - * to improve debuggability. - */ - static get isHosted() { - return WindowManager._isHosted; - } - /** - * Defines if the WindowManager is responsible to raise the loading, loaded and unloaded events, - * or if they are raised directly by the managed code to reduce interop. - */ - static get isLoadEventsEnabled() { - return WindowManager._isLoadEventsEnabled; - } - /** - * Initialize the WindowManager - * @param containerElementId The ID of the container element for the Xaml UI - * @param loadingElementId The ID of the loading element to remove once ready - */ - static init(isHosted, isLoadEventsEnabled, containerElementId = "uno-body", loadingElementId = "uno-loading") { - WindowManager._isHosted = isHosted; - WindowManager._isLoadEventsEnabled = isLoadEventsEnabled; - Windows.UI.Core.CoreDispatcher.init(WindowManager.buildReadyPromise()); - this.current = new WindowManager(containerElementId, loadingElementId); - MonoSupport.jsCallDispatcher.registerScope("Uno", this.current); - this.current.init(); - return "ok"; - } - /** - * Builds a promise that will signal the ability for the dispatcher - * to initiate work. - * */ - static buildReadyPromise() { - return new Promise(resolve => { - Promise.all([WindowManager.buildSplashScreen()]).then(() => resolve(true)); - }); - } - /** - * Build the splashscreen image eagerly - * */ - static buildSplashScreen() { - return new Promise(resolve => { - const img = new Image(); - let loaded = false; - let loadingDone = () => { - if (!loaded) { - loaded = true; - if (img.width !== 0 && img.height !== 0) { - // Materialize the image content so it shows immediately - // even if the dispatcher is blocked thereafter by all - // the Uno initialization work. The resulting canvas is not used. - // - // If the image fails to load, setup the splashScreen anyways with the - // proper sample. - let canvas = document.createElement("canvas"); - canvas.width = img.width; - canvas.height = img.height; - let ctx = canvas.getContext("2d"); - ctx.drawImage(img, 0, 0); - } - if (document.readyState === "loading") { - document.addEventListener("DOMContentLoaded", () => { - WindowManager.setupSplashScreen(img); - resolve(true); - }); - } - else { - WindowManager.setupSplashScreen(img); - resolve(true); - } - } - }; - // Preload the splash screen so the image element - // created later on - img.onload = loadingDone; - img.onerror = loadingDone; - const UNO_BOOTSTRAP_APP_BASE = config.environmentVariables["UNO_BOOTSTRAP_APP_BASE"] || ""; - const UNO_BOOTSTRAP_WEBAPP_BASE_PATH = config.environmentVariables["UNO_BOOTSTRAP_WEBAPP_BASE_PATH"] || ""; - let fullImagePath = String(UnoAppManifest.splashScreenImage); - // If the splashScreenImage image already points to the app base path, use it, otherwise we build it. - if (UNO_BOOTSTRAP_APP_BASE !== "" && fullImagePath.indexOf(UNO_BOOTSTRAP_APP_BASE) == -1) { - fullImagePath = `${UNO_BOOTSTRAP_WEBAPP_BASE_PATH}${UNO_BOOTSTRAP_APP_BASE}/${UnoAppManifest.splashScreenImage}`; - } - img.src = fullImagePath; - // If there's no response, skip the loading - setTimeout(loadingDone, 2000); - }); - } - /** - * Initialize the WindowManager - * @param containerElementId The ID of the container element for the Xaml UI - * @param loadingElementId The ID of the loading element to remove once ready - */ - static initNative(pParams) { - const params = WindowManagerInitParams.unmarshal(pParams); - WindowManager.init(params.IsHostedMode, params.IsLoadEventsEnabled); - return true; - } - /** - * Creates the UWP-compatible splash screen - * - */ - static setupSplashScreen(splashImage) { - if (UnoAppManifest && UnoAppManifest.splashScreenImage) { - const loading = document.getElementById("loading"); - if (loading) { - loading.remove(); - } - const unoBody = document.getElementById("uno-body"); - if (unoBody) { - const unoLoading = document.createElement("div"); - unoLoading.id = "uno-loading"; - if (UnoAppManifest.splashScreenColor) { - const body = document.getElementsByTagName("body")[0]; - body.style.backgroundColor = UnoAppManifest.splashScreenColor; - } - splashImage.id = "uno-loading-splash"; - splashImage.classList.add("uno-splash"); - unoLoading.appendChild(splashImage); - unoBody.appendChild(unoLoading); - } - } - } - /** - * Reads the window's search parameters - * - */ - static findLaunchArguments() { - if (typeof URLSearchParams === "function") { - return new URLSearchParams(window.location.search).toString(); - } - else { - const queryIndex = document.location.search.indexOf("?"); - if (queryIndex !== -1) { - return document.location.search.substring(queryIndex + 1); - } - return ""; - } - } - /** - * Create a html DOM element representing a Xaml element. - * - * You need to call addView to connect it to the DOM. - */ - createContent(contentDefinition) { - this.createContentInternal(contentDefinition); - return "ok"; - } - /** - * Create a html DOM element representing a Xaml element. - * - * You need to call addView to connect it to the DOM. - */ - createContentNative(pParams) { - const params = WindowManagerCreateContentParams.unmarshal(pParams); - const def = { - id: this.handleToString(params.HtmlId), - handle: params.Handle, - isFocusable: params.IsFocusable, - isSvg: params.IsSvg, - tagName: params.TagName, - uiElementRegistrationId: params.UIElementRegistrationId, - }; - this.createContentInternal(def); - return true; - } - createContentInternal(contentDefinition) { - // Create the HTML element - const element = contentDefinition.isSvg - ? document.createElementNS("http://www.w3.org/2000/svg", contentDefinition.tagName) - : document.createElement(contentDefinition.tagName); - element.id = contentDefinition.id; - const uiElementRegistration = this.uiElementRegistrations[this.handleToString(contentDefinition.uiElementRegistrationId)]; - if (!uiElementRegistration) { - throw `UIElement registration id ${contentDefinition.uiElementRegistrationId} is unknown.`; - } - element.setAttribute("XamlType", uiElementRegistration.typeName); - element.setAttribute("XamlHandle", this.handleToString(contentDefinition.handle)); - if (uiElementRegistration.isFrameworkElement) { - this.setAsUnarranged(element, true); - } - if (element.hasOwnProperty("tabindex")) { - element["tabindex"] = contentDefinition.isFocusable ? 0 : -1; - } - else { - element.setAttribute("tabindex", contentDefinition.isFocusable ? "0" : "-1"); - } - if (contentDefinition) { - let classes = element.classList.value; - for (const className of uiElementRegistration.classNames) { - classes += " uno-" + className; - } - element.classList.value = classes; - } - // Add the html element to list of elements - this.allActiveElementsById[contentDefinition.id] = element; - } - registerUIElement(typeName, isFrameworkElement, classNames) { - const registrationId = Object.keys(this.uiElementRegistrations).length; - this.uiElementRegistrations[this.handleToString(registrationId)] = { - classNames: classNames, - isFrameworkElement: isFrameworkElement, - typeName: typeName, - }; - return registrationId; - } - registerUIElementNative(pParams, pReturn) { - const params = WindowManagerRegisterUIElementParams.unmarshal(pParams); - const registrationId = this.registerUIElement(params.TypeName, params.IsFrameworkElement, params.Classes); - const ret = new WindowManagerRegisterUIElementReturn(); - ret.RegistrationId = registrationId; - ret.marshal(pReturn); - return true; - } - getView(elementHandle) { - const element = this.allActiveElementsById[this.handleToString(elementHandle)]; - if (!element) { - throw `Element id ${elementHandle} not found.`; - } - return element; - } - /** - * Set a name for an element. - * - * This is mostly for diagnostic purposes. - */ - setName(elementId, name) { - this.setNameInternal(elementId, name); - return "ok"; - } - /** - * Set a name for an element. - * - * This is mostly for diagnostic purposes. - */ - setNameNative(pParam) { - const params = WindowManagerSetNameParams.unmarshal(pParam); - this.setNameInternal(params.HtmlId, params.Name); - return true; - } - setNameInternal(elementId, name) { - this.getView(elementId).setAttribute("xamlname", name); - } - /** - * Set a name for an element. - * - * This is mostly for diagnostic purposes. - */ - setXUid(elementId, name) { - this.setXUidInternal(elementId, name); - return "ok"; - } - /** - * Set a name for an element. - * - * This is mostly for diagnostic purposes. - */ - setXUidNative(pParam) { - const params = WindowManagerSetXUidParams.unmarshal(pParam); - this.setXUidInternal(params.HtmlId, params.Uid); - return true; - } - setXUidInternal(elementId, name) { - this.getView(elementId).setAttribute("xuid", name); - } - /** - * Sets the visibility of the specified element - */ - setVisibility(elementId, visible) { - this.setVisibilityInternal(elementId, visible); - return "ok"; - } - setVisibilityNative(pParam) { - const params = WindowManagerSetVisibilityParams.unmarshal(pParam); - this.setVisibilityInternal(params.HtmlId, params.Visible); - return true; - } - setVisibilityInternal(elementId, visible) { - const element = this.getView(elementId); - if (visible) { - element.classList.remove(WindowManager.unoCollapsedClassName); - } - else { - element.classList.add(WindowManager.unoCollapsedClassName); - } - } - /** - * Set an attribute for an element. - */ - setAttributes(elementId, attributes) { - const element = this.getView(elementId); - for (const name in attributes) { - if (attributes.hasOwnProperty(name)) { - element.setAttribute(name, attributes[name]); - } - } - return "ok"; - } - /** - * Set an attribute for an element. - */ - setAttributesNative(pParams) { - const params = WindowManagerSetAttributesParams.unmarshal(pParams); - const element = this.getView(params.HtmlId); - for (let i = 0; i < params.Pairs_Length; i += 2) { - element.setAttribute(params.Pairs[i], params.Pairs[i + 1]); - } - return true; - } - /** - * Set an attribute for an element. - */ - setAttributeNative(pParams) { - const params = WindowManagerSetAttributeParams.unmarshal(pParams); - const element = this.getView(params.HtmlId); - element.setAttribute(params.Name, params.Value); - return true; - } - /** - * Removes an attribute for an element. - */ - removeAttribute(elementId, name) { - const element = this.getView(elementId); - element.removeAttribute(name); - return "ok"; - } - /** - * Removes an attribute for an element. - */ - removeAttributeNative(pParams) { - const params = WindowManagerRemoveAttributeParams.unmarshal(pParams); - const element = this.getView(params.HtmlId); - element.removeAttribute(params.Name); - return true; - } - /** - * Get an attribute for an element. - */ - getAttribute(elementId, name) { - return this.getView(elementId).getAttribute(name); - } - /** - * Set a property for an element. - */ - setProperty(elementId, properties) { - const element = this.getView(elementId); - for (const name in properties) { - if (properties.hasOwnProperty(name)) { - const setVal = properties[name]; - if (setVal === "true") { - element[name] = true; - } - else if (setVal === "false") { - element[name] = false; - } - else { - element[name] = setVal; - } - } - } - return "ok"; - } - /** - * Set a property for an element. - */ - setPropertyNative(pParams) { - const params = WindowManagerSetPropertyParams.unmarshal(pParams); - const element = this.getView(params.HtmlId); - for (let i = 0; i < params.Pairs_Length; i += 2) { - const setVal = params.Pairs[i + 1]; - if (setVal === "true") { - element[params.Pairs[i]] = true; - } - else if (setVal === "false") { - element[params.Pairs[i]] = false; - } - else { - element[params.Pairs[i]] = setVal; - } - } - return true; - } - /** - * Get a property for an element. - */ - getProperty(elementId, name) { - const element = this.getView(elementId); - return element[name] || ""; - } - /** - * Set the CSS style of a html element. - * - * To remove a value, set it to empty string. - * @param styles A dictionary of styles to apply on html element. - */ - setStyle(elementId, styles) { - const element = this.getView(elementId); - for (const style in styles) { - if (styles.hasOwnProperty(style)) { - element.style.setProperty(style, styles[style]); - } - } - return "ok"; - } - /** - * Set the CSS style of a html element. - * - * To remove a value, set it to empty string. - * @param styles A dictionary of styles to apply on html element. - */ - setStyleNative(pParams) { - const params = WindowManagerSetStylesParams.unmarshal(pParams); - const element = this.getView(params.HtmlId); - const elementStyle = element.style; - const pairs = params.Pairs; - for (let i = 0; i < params.Pairs_Length; i += 2) { - const key = pairs[i]; - const value = pairs[i + 1]; - elementStyle.setProperty(key, value); - } - return true; - } - /** - * Set a single CSS style of a html element - * - */ - setStyleDoubleNative(pParams) { - const params = WindowManagerSetStyleDoubleParams.unmarshal(pParams); - const element = this.getView(params.HtmlId); - element.style.setProperty(params.Name, this.handleToString(params.Value)); - return true; - } - setArrangeProperties(elementId) { - const element = this.getView(elementId); - this.setAsArranged(element); - return "ok"; - } - /** - * Remove the CSS style of a html element. - */ - resetStyle(elementId, names) { - this.resetStyleInternal(elementId, names); - return "ok"; - } - /** - * Remove the CSS style of a html element. - */ - resetStyleNative(pParams) { - const params = WindowManagerResetStyleParams.unmarshal(pParams); - this.resetStyleInternal(params.HtmlId, params.Styles); - return true; - } - resetStyleInternal(elementId, names) { - const element = this.getView(elementId); - for (const name of names) { - element.style.setProperty(name, ""); - } - } - isCssPropertySupported(propertyName, value) { - return CSS.supports(propertyName, value); - } - isCssConditionSupported(supportCondition) { - return CSS.supports(supportCondition); - } - /** - * Set + Unset CSS classes on an element - */ - setUnsetClasses(elementId, cssClassesToSet, cssClassesToUnset) { - const element = this.getView(elementId); - if (cssClassesToSet) { - cssClassesToSet.forEach(c => { - element.classList.add(c); - }); - } - if (cssClassesToUnset) { - cssClassesToUnset.forEach(c => { - element.classList.remove(c); - }); - } - } - setUnsetClassesNative(pParams) { - const params = WindowManagerSetUnsetClassesParams.unmarshal(pParams); - this.setUnsetClasses(params.HtmlId, params.CssClassesToSet, params.CssClassesToUnset); - return true; - } - /** - * Set CSS classes on an element from a specified list - */ - setClasses(elementId, cssClassesList, classIndex) { - const element = this.getView(elementId); - for (let i = 0; i < cssClassesList.length; i++) { - if (i === classIndex) { - element.classList.add(cssClassesList[i]); - } - else { - element.classList.remove(cssClassesList[i]); - } - } - return "ok"; - } - setClassesNative(pParams) { - const params = WindowManagerSetClassesParams.unmarshal(pParams); - this.setClasses(params.HtmlId, params.CssClasses, params.Index); - return true; - } - /** - * Arrange and clips a native elements - * - */ - arrangeElementNative(pParams) { - const params = WindowManagerArrangeElementParams.unmarshal(pParams); - const element = this.getView(params.HtmlId); - const style = element.style; - style.position = "absolute"; - style.top = params.Top + "px"; - style.left = params.Left + "px"; - style.width = params.Width === NaN ? "auto" : params.Width + "px"; - style.height = params.Height === NaN ? "auto" : params.Height + "px"; - if (params.Clip) { - style.clip = `rect(${params.ClipTop}px, ${params.ClipRight}px, ${params.ClipBottom}px, ${params.ClipLeft}px)`; - } - else { - style.clip = ""; - } - this.setAsArranged(element); - return true; - } - setAsArranged(element) { - if (!element._unoIsArranged) { - element._unoIsArranged = true; - element.classList.remove(WindowManager.unoUnarrangedClassName); - } - } - setAsUnarranged(element, force = false) { - if (element._unoIsArranged || force) { - element._unoIsArranged = false; - element.classList.add(WindowManager.unoUnarrangedClassName); - } - } - /** - * Sets the color property of the specified element - */ - setElementColor(elementId, color) { - this.setElementColorInternal(elementId, color); - return "ok"; - } - setElementColorNative(pParam) { - const params = WindowManagerSetElementColorParams.unmarshal(pParam); - this.setElementColorInternal(params.HtmlId, params.Color); - return true; - } - setElementColorInternal(elementId, color) { - const element = this.getView(elementId); - element.style.setProperty("color", this.numberToCssColor(color)); - } - /** - * Sets the element's selection highlight. - **/ - setSelectionHighlight(elementId, backgroundColor, foregroundColor) { - const element = this.getView(elementId); - element.classList.add("selection-highlight"); - element.style.setProperty("--selection-background", this.numberToCssColor(backgroundColor)); - element.style.setProperty("--selection-color", this.numberToCssColor(foregroundColor)); - return true; - } - setSelectionHighlightNative(pParam) { - const params = WindowManagerSetSelectionHighlightParams.unmarshal(pParam); - return this.setSelectionHighlight(params.HtmlId, params.BackgroundColor, params.ForegroundColor); - } - /** - * Sets the fill property of the specified element - */ - setElementFill(elementId, color) { - this.setElementColorInternal(elementId, color); - return "ok"; - } - setElementFillNative(pParam) { - const params = WindowManagerSetElementFillParams.unmarshal(pParam); - this.setElementFillInternal(params.HtmlId, params.Color); - return true; - } - setElementFillInternal(elementId, color) { - const element = this.getView(elementId); - element.style.setProperty("fill", this.numberToCssColor(color)); - } - /** - * Sets the background color property of the specified element - */ - setElementBackgroundColor(pParam) { - const params = WindowManagerSetElementBackgroundColorParams.unmarshal(pParam); - const element = this.getView(params.HtmlId); - const style = element.style; - style.setProperty("background-color", this.numberToCssColor(params.Color)); - style.removeProperty("background-image"); - return true; - } - /** - * Sets the background image property of the specified element - */ - setElementBackgroundGradient(pParam) { - const params = WindowManagerSetElementBackgroundGradientParams.unmarshal(pParam); - const element = this.getView(params.HtmlId); - const style = element.style; - style.removeProperty("background-color"); - style.setProperty("background-image", params.CssGradient); - return true; - } - /** - * Clears the background property of the specified element - */ - resetElementBackground(pParam) { - const params = WindowManagerResetElementBackgroundParams.unmarshal(pParam); - const element = this.getView(params.HtmlId); - const style = element.style; - style.removeProperty("background-color"); - style.removeProperty("background-image"); - style.removeProperty("background-size"); - return true; - } - /** - * Sets the transform matrix of an element - * - */ - setElementTransformNative(pParams) { - const params = WindowManagerSetElementTransformParams.unmarshal(pParams); - const element = this.getView(params.HtmlId); - const style = element.style; - const matrix = `matrix(${params.M11},${params.M12},${params.M21},${params.M22},${params.M31},${params.M32})`; - style.transform = matrix; - this.setAsArranged(element); - return true; - } - setPointerEvents(htmlId, enabled) { - const element = this.getView(htmlId); - element.style.pointerEvents = enabled ? "auto" : "none"; - } - setPointerEventsNative(pParams) { - const params = WindowManagerSetPointerEventsParams.unmarshal(pParams); - this.setPointerEvents(params.HtmlId, params.Enabled); - return true; - } - /** - * Load the specified URL into a new tab or window - * @param url URL to load - * @returns "True" or "False", depending on whether a new window could be opened or not - */ - open(url) { - const newWindow = window.open(url, "_blank"); - return newWindow != null - ? "True" - : "False"; - } - /** - * Issue a browser alert to user - * @param message message to display - */ - alert(message) { - window.alert(message); - return "ok"; - } - /** - * Sets the browser window title - * @param message the new title - */ - setWindowTitle(title) { - document.title = title || UnoAppManifest.displayName; - return "ok"; - } - /** - * Gets the currently set browser window title - */ - getWindowTitle() { - return document.title || UnoAppManifest.displayName; - } - /** - * Add an event handler to a html element. - * - * @param eventName The name of the event - * @param onCapturePhase true means "on trickle down" (going down to target), false means "on bubble up" (bubbling back to ancestors). Default is false. - */ - registerEventOnView(elementId, eventName, onCapturePhase = false, eventExtractorId) { - this.registerEventOnViewInternal(elementId, eventName, onCapturePhase, eventExtractorId); - return "ok"; - } - /** - * Add an event handler to a html element. - * - * @param eventName The name of the event - * @param onCapturePhase true means "on trickle down", false means "on bubble up". Default is false. - */ - registerEventOnViewNative(pParams) { - const params = WindowManagerRegisterEventOnViewParams.unmarshal(pParams); - this.registerEventOnViewInternal(params.HtmlId, params.EventName, params.OnCapturePhase, params.EventExtractorId); - return true; - } - /** - * Add an event handler to a html element. - * - * @param eventName The name of the event - * @param onCapturePhase true means "on trickle down", false means "on bubble up". Default is false. - */ - registerEventOnViewInternal(elementId, eventName, onCapturePhase = false, eventExtractorId) { - const element = this.getView(elementId); - const eventExtractor = this.getEventExtractor(eventExtractorId); - const eventHandler = (event) => { - const eventPayload = eventExtractor - ? `${eventExtractor(event)}` - : ""; - const result = this.dispatchEvent(element, eventName, eventPayload); - if (result & UI.HtmlEventDispatchResult.StopPropagation) { - event.stopPropagation(); - } - if (result & UI.HtmlEventDispatchResult.PreventDefault) { - event.preventDefault(); - } - }; - element.addEventListener(eventName, eventHandler, onCapturePhase); - } - /** - * keyboard event extractor to be used with registerEventOnView - * @param evt - */ - keyboardEventExtractor(evt) { - return (evt instanceof KeyboardEvent) ? evt.key : "0"; - } - /** - * tapped (mouse clicked / double clicked) event extractor to be used with registerEventOnView - * @param evt - */ - tappedEventExtractor(evt) { - return evt - ? `0;${evt.clientX};${evt.clientY};${(evt.ctrlKey ? "1" : "0")};${(evt.shiftKey ? "1" : "0")};${evt.button};mouse` - : ""; - } - /** - * focus event extractor to be used with registerEventOnView - * @param evt - */ - focusEventExtractor(evt) { - if (evt) { - const targetElement = evt.target; - if (targetElement) { - const targetXamlHandle = targetElement.getAttribute("XamlHandle"); - if (targetXamlHandle) { - return `${targetXamlHandle}`; - } - } - } - return ""; - } - customEventDetailExtractor(evt) { - if (evt) { - const detail = evt.detail; - if (detail) { - return JSON.stringify(detail); - } - } - return ""; - } - customEventDetailStringExtractor(evt) { - return evt ? `${evt.detail}` : ""; - } - /** - * Gets the event extractor function. See UIElement.HtmlEventExtractor - * @param eventExtractorName an event extractor name. - */ - getEventExtractor(eventExtractorId) { - if (eventExtractorId) { - // - // NOTE TO MAINTAINERS: Keep in sync with Windows.UI.Xaml.UIElement.HtmlEventExtractor - // - switch (eventExtractorId) { - case 3: - return this.keyboardEventExtractor; - case 2: - return this.tappedEventExtractor; - case 4: - return this.focusEventExtractor; - case 6: - return this.customEventDetailExtractor; - case 5: - return this.customEventDetailStringExtractor; - } - throw `Event extractor ${eventExtractorId} is not supported`; - } - return null; - } - /** - * Set or replace the root element. - */ - setRootElement(elementId) { - if (this.rootElement && Number(this.rootElement.id) === elementId) { - return null; // nothing to do - } - if (this.rootElement) { - // Remove existing - this.containerElement.removeChild(this.rootElement); - if (WindowManager.isLoadEventsEnabled) { - this.dispatchEvent(this.rootElement, "unloaded"); - } - this.rootElement.classList.remove(WindowManager.unoRootClassName); - } - if (!elementId) { - return null; - } - // set new root - const newRootElement = this.getView(elementId); - newRootElement.classList.add(WindowManager.unoRootClassName); - this.rootElement = newRootElement; - if (WindowManager.isLoadEventsEnabled) { - this.dispatchEvent(this.rootElement, "loading"); - } - this.containerElement.appendChild(this.rootElement); - if (WindowManager.isLoadEventsEnabled) { - this.dispatchEvent(this.rootElement, "loaded"); - } - this.setAsArranged(newRootElement); // patch because root is not measured/arranged - this.resize(); - return "ok"; - } - /** - * Set a view as a child of another one. - * - * "Loading" & "Loaded" events will be raised if necessary. - * - * @param index Position in children list. Appended at end if not specified. - */ - addView(parentId, childId, index) { - this.addViewInternal(parentId, childId, index); - return "ok"; - } - /** - * Set a view as a child of another one. - * - * "Loading" & "Loaded" events will be raised if necessary. - * - * @param pParams Pointer to a WindowManagerAddViewParams native structure. - */ - addViewNative(pParams) { - const params = WindowManagerAddViewParams.unmarshal(pParams); - this.addViewInternal(params.HtmlId, params.ChildView, params.Index != -1 ? params.Index : null); - return true; - } - addViewInternal(parentId, childId, index) { - const parentElement = this.getView(parentId); - const childElement = this.getView(childId); - let shouldRaiseLoadEvents = false; - if (WindowManager.isLoadEventsEnabled) { - const alreadyLoaded = this.getIsConnectedToRootElement(childElement); - shouldRaiseLoadEvents = !alreadyLoaded && this.getIsConnectedToRootElement(parentElement); - if (shouldRaiseLoadEvents) { - this.dispatchEvent(childElement, "loading"); - } - } - if (index != null && index < parentElement.childElementCount) { - const insertBeforeElement = parentElement.children[index]; - parentElement.insertBefore(childElement, insertBeforeElement); - } - else { - parentElement.appendChild(childElement); - } - if (shouldRaiseLoadEvents) { - this.dispatchEvent(childElement, "loaded"); - } - } - /** - * Remove a child from a parent element. - * - * "Unloading" & "Unloaded" events will be raised if necessary. - */ - removeView(parentId, childId) { - this.removeViewInternal(parentId, childId); - return "ok"; - } - /** - * Remove a child from a parent element. - * - * "Unloading" & "Unloaded" events will be raised if necessary. - */ - removeViewNative(pParams) { - const params = WindowManagerRemoveViewParams.unmarshal(pParams); - this.removeViewInternal(params.HtmlId, params.ChildView); - return true; - } - removeViewInternal(parentId, childId) { - const parentElement = this.getView(parentId); - const childElement = this.getView(childId); - const shouldRaiseLoadEvents = WindowManager.isLoadEventsEnabled - && this.getIsConnectedToRootElement(childElement); - parentElement.removeChild(childElement); - // Mark the element as unarranged, so if it gets measured while being - // disconnected from the root element, it won't be visible. - this.setAsUnarranged(childElement); - if (shouldRaiseLoadEvents) { - this.dispatchEvent(childElement, "unloaded"); - } - } - /** - * Destroy a html element. - * - * The element won't be available anymore. Usually indicate the managed - * version has been scavenged by the GC. - */ - destroyView(elementId) { - this.destroyViewInternal(elementId); - return "ok"; - } - /** - * Destroy a html element. - * - * The element won't be available anymore. Usually indicate the managed - * version has been scavenged by the GC. - */ - destroyViewNative(pParams) { - const params = WindowManagerDestroyViewParams.unmarshal(pParams); - this.destroyViewInternal(params.HtmlId); - return true; - } - destroyViewInternal(elementId) { - const element = this.getView(elementId); - if (element.parentElement) { - element.parentElement.removeChild(element); - } - delete this.allActiveElementsById[elementId]; - } - getBoundingClientRect(elementId) { - const bounds = this.getView(elementId).getBoundingClientRect(); - return `${bounds.left};${bounds.top};${bounds.right - bounds.left};${bounds.bottom - bounds.top}`; - } - getBBox(elementId) { - const bbox = this.getBBoxInternal(elementId); - return `${bbox.x};${bbox.y};${bbox.width};${bbox.height}`; - } - getBBoxNative(pParams, pReturn) { - const params = WindowManagerGetBBoxParams.unmarshal(pParams); - const bbox = this.getBBoxInternal(params.HtmlId); - const ret = new WindowManagerGetBBoxReturn(); - ret.X = bbox.x; - ret.Y = bbox.y; - ret.Width = bbox.width; - ret.Height = bbox.height; - ret.marshal(pReturn); - return true; - } - getBBoxInternal(elementId) { - const element = this.getView(elementId); - let unconnectedRoot = null; - const cleanupUnconnectedRoot = (owner) => { - if (unconnectedRoot !== null) { - owner.removeChild(unconnectedRoot); - } - }; - try { - // On FireFox, the element needs to be connected to the DOM - // or the getBBox() will crash. - if (!element.isConnected) { - unconnectedRoot = element; - while (unconnectedRoot.parentElement) { - // Need to find the top most "unconnected" parent - // of this element - unconnectedRoot = unconnectedRoot.parentElement; - } - this.containerElement.appendChild(unconnectedRoot); - } - return element.getBBox(); - } - finally { - cleanupUnconnectedRoot(this.containerElement); - } - } - setSvgElementRect(pParams) { - const params = WindowManagerSetSvgElementRectParams.unmarshal(pParams); - const element = this.getView(params.HtmlId); - element.x.baseVal.value = params.X; - element.y.baseVal.value = params.Y; - element.width.baseVal.value = params.Width; - element.height.baseVal.value = params.Height; - return true; - } - /** - * Use the Html engine to measure the element using specified constraints. - * - * @param maxWidth string containing width in pixels. Empty string means infinite. - * @param maxHeight string containing height in pixels. Empty string means infinite. - * @param measureContent if we're interested by the content of the control ('s image, 's text...) - */ - measureView(viewId, maxWidth, maxHeight, measureContent = true) { - const ret = this.measureViewInternal(Number(viewId), maxWidth ? Number(maxWidth) : NaN, maxHeight ? Number(maxHeight) : NaN, measureContent); - return `${ret[0]};${ret[1]}`; - } - /** - * Use the Html engine to measure the element using specified constraints. - * - * @param maxWidth string containing width in pixels. Empty string means infinite. - * @param maxHeight string containing height in pixels. Empty string means infinite. - */ - measureViewNative(pParams, pReturn) { - const params = WindowManagerMeasureViewParams.unmarshal(pParams); - const ret = this.measureViewInternal(params.HtmlId, params.AvailableWidth, params.AvailableHeight, params.MeasureContent); - const ret2 = new WindowManagerMeasureViewReturn(); - ret2.DesiredWidth = ret[0]; - ret2.DesiredHeight = ret[1]; - ret2.marshal(pReturn); - return true; - } - measureElement(element) { - const offsetWidth = element.offsetWidth; - const offsetHeight = element.offsetHeight; - const resultWidth = offsetWidth ? offsetWidth : element.clientWidth; - const resultHeight = offsetHeight ? offsetHeight : element.clientHeight; - // +1 is added to take rounding/flooring into account - return [resultWidth + 1, resultHeight]; - } - measureViewInternal(viewId, maxWidth, maxHeight, measureContent) { - const element = this.getView(viewId); - const elementStyle = element.style; - const elementClasses = element.className; - const originalStyleCssText = elementStyle.cssText; - const unconstrainedStyleCssText = this.createUnconstrainedStyle(elementStyle, maxWidth, maxHeight); - let parentElement = null; - let parentElementWidthHeight = null; - let unconnectedRoot = null; - const cleanupUnconnectedRoot = (owner) => { - if (unconnectedRoot !== null) { - owner.removeChild(unconnectedRoot); - } - }; - try { - if (!element.isConnected) { - // If the element is not connected to the DOM, we need it - // to be connected for the measure to provide a meaningful value. - unconnectedRoot = element; - while (unconnectedRoot.parentElement) { - // Need to find the top most "unconnected" parent - // of this element - unconnectedRoot = unconnectedRoot.parentElement; - } - this.containerElement.appendChild(unconnectedRoot); - } - if (measureContent && element instanceof HTMLImageElement) { - elementStyle.cssText = unconstrainedStyleCssText; - const imgElement = element; - return [imgElement.naturalWidth, imgElement.naturalHeight]; - } - else if (measureContent && element instanceof HTMLInputElement) { - elementStyle.cssText = unconstrainedStyleCssText; - const inputElement = element; - cleanupUnconnectedRoot(this.containerElement); - // Create a temporary element that will contain the input's content - const textOnlyElement = document.createElement("p"); - textOnlyElement.style.cssText = unconstrainedStyleCssText; - textOnlyElement.innerText = inputElement.value; - textOnlyElement.className = elementClasses; - unconnectedRoot = textOnlyElement; - this.containerElement.appendChild(unconnectedRoot); - const textSize = this.measureElement(textOnlyElement); - const inputSize = this.measureElement(element); - // Take the width of the inner text, but keep the height of the input element. - return [textSize[0], inputSize[1]]; - } - else if (measureContent && element instanceof HTMLTextAreaElement) { - const inputElement = element; - cleanupUnconnectedRoot(this.containerElement); - // Create a temporary element that will contain the input's content - const textOnlyElement = document.createElement("p"); - textOnlyElement.style.cssText = unconstrainedStyleCssText; - // If the input is null or empty, add a no-width character to force the paragraph to take up one line height - // The trailing new lines are going to be ignored for measure, so we also append no-width char at the end. - textOnlyElement.innerText = inputElement.value ? (inputElement.value + "\u200B") : "\u200B"; - textOnlyElement.className = elementClasses; // Note: Here we will have the uno-textBoxView class name - unconnectedRoot = textOnlyElement; - this.containerElement.appendChild(unconnectedRoot); - const textSize = this.measureElement(textOnlyElement); - // For TextAreas, take the width and height of the inner text - const width = Math.min(textSize[0], maxWidth); - const height = Math.min(textSize[1], maxHeight); - return [width, height]; - } - else { - elementStyle.cssText = unconstrainedStyleCssText; - // As per W3C css-transform spec: - // https://www.w3.org/TR/css-transforms-1/#propdef-transform - // - // > For elements whose layout is governed by the CSS box model, any value other than none - // > for the transform property also causes the element to establish a containing block for - // > all descendants.Its padding box will be used to layout for all of its - // > absolute - position descendants, fixed - position descendants, and descendant fixed - // > background attachments. - // - // We use this feature to allow an measure of text without being influenced by the bounds - // of the viewport. We just need to temporary set both the parent width & height to a very big value. - parentElement = element.parentElement; - parentElementWidthHeight = { width: parentElement.style.width, height: parentElement.style.height }; - parentElement.style.width = WindowManager.MAX_WIDTH; - parentElement.style.height = WindowManager.MAX_HEIGHT; - return this.measureElement(element); - } - } - finally { - elementStyle.cssText = originalStyleCssText; - if (parentElement && parentElementWidthHeight) { - parentElement.style.width = parentElementWidthHeight.width; - parentElement.style.height = parentElementWidthHeight.height; - } - cleanupUnconnectedRoot(this.containerElement); - } - } - createUnconstrainedStyle(elementStyle, maxWidth, maxHeight) { - const updatedStyles = {}; - for (let i = 0; i < elementStyle.length; i++) { - const key = elementStyle[i]; - updatedStyles[key] = elementStyle.getPropertyValue(key); - } - if (updatedStyles.hasOwnProperty("width")) { - delete updatedStyles.width; - } - if (updatedStyles.hasOwnProperty("height")) { - delete updatedStyles.height; - } - // This is required for an unconstrained measure (otherwise the parents size is taken into account) - updatedStyles.position = "fixed"; - updatedStyles["max-width"] = Number.isFinite(maxWidth) ? maxWidth + "px" : "none"; - updatedStyles["max-height"] = Number.isFinite(maxHeight) ? maxHeight + "px" : "none"; - let updatedStyleString = ""; - for (let key in updatedStyles) { - if (updatedStyles.hasOwnProperty(key)) { - updatedStyleString += key + ": " + updatedStyles[key] + "; "; - } - } - // We use a string to prevent the browser to update the element between - // each style assignation. This way, the browser will update the element only once. - return updatedStyleString; - } - scrollTo(pParams) { - const params = WindowManagerScrollToOptionsParams.unmarshal(pParams); - const elt = this.getView(params.HtmlId); - const opts = ({ - left: params.HasLeft ? params.Left : undefined, - top: params.HasTop ? params.Top : undefined, - behavior: (params.DisableAnimation ? "instant" : "smooth") - }); - elt.scrollTo(opts); - return true; - } - rawPixelsToBase64EncodeImage(dataPtr, width, height) { - const rawCanvas = document.createElement("canvas"); - rawCanvas.width = width; - rawCanvas.height = height; - const ctx = rawCanvas.getContext("2d"); - const imgData = ctx.createImageData(width, height); - const bufferSize = width * height * 4; - for (let i = 0; i < bufferSize; i += 4) { - imgData.data[i + 0] = Module.HEAPU8[dataPtr + i + 2]; - imgData.data[i + 1] = Module.HEAPU8[dataPtr + i + 1]; - imgData.data[i + 2] = Module.HEAPU8[dataPtr + i + 0]; - imgData.data[i + 3] = Module.HEAPU8[dataPtr + i + 3]; - } - ctx.putImageData(imgData, 0, 0); - return rawCanvas.toDataURL(); - } - /** - * Sets the provided image with a mono-chrome version of the provided url. - * @param viewId the image to manipulate - * @param url the source image - * @param color the color to apply to the monochrome pixels - */ - setImageAsMonochrome(viewId, url, color) { - const element = this.getView(viewId); - if (element.tagName.toUpperCase() === "IMG") { - const imgElement = element; - const img = new Image(); - img.onload = buildMonochromeImage; - img.src = url; - function buildMonochromeImage() { - // create a colored version of img - const c = document.createElement("canvas"); - const ctx = c.getContext("2d"); - c.width = img.width; - c.height = img.height; - ctx.drawImage(img, 0, 0); - ctx.globalCompositeOperation = "source-atop"; - ctx.fillStyle = color; - ctx.fillRect(0, 0, img.width, img.height); - ctx.globalCompositeOperation = "source-over"; - imgElement.src = c.toDataURL(); - } - return "ok"; - } - else { - throw `setImageAsMonochrome: Element id ${viewId} is not an Img.`; - } - } - setPointerCapture(viewId, pointerId) { - this.getView(viewId).setPointerCapture(pointerId); - return "ok"; - } - releasePointerCapture(viewId, pointerId) { - this.getView(viewId).releasePointerCapture(pointerId); - return "ok"; - } - focusView(elementId) { - const element = this.getView(elementId); - if (!(element instanceof HTMLElement)) { - throw `Element id ${elementId} is not focusable.`; - } - element.focus(); - return "ok"; - } - /** - * Set the Html content for an element. - * - * Those html elements won't be available as XamlElement in managed code. - * WARNING: you should avoid mixing this and `addView` for the same element. - */ - setHtmlContent(viewId, html) { - this.setHtmlContentInternal(viewId, html); - return "ok"; - } - /** - * Set the Html content for an element. - * - * Those html elements won't be available as XamlElement in managed code. - * WARNING: you should avoid mixing this and `addView` for the same element. - */ - setHtmlContentNative(pParams) { - const params = WindowManagerSetContentHtmlParams.unmarshal(pParams); - this.setHtmlContentInternal(params.HtmlId, params.Html); - return true; - } - setHtmlContentInternal(viewId, html) { - this.getView(viewId).innerHTML = html; - } - /** - * Gets the Client and Offset size of the specified element - * - * This method is used to determine the size of the scroll bars, to - * mask the events coming from that zone. - */ - getClientViewSize(elementId) { - const element = this.getView(elementId); - return `${element.clientWidth};${element.clientHeight};${element.offsetWidth};${element.offsetHeight}`; - } - /** - * Gets the Client and Offset size of the specified element - * - * This method is used to determine the size of the scroll bars, to - * mask the events coming from that zone. - */ - getClientViewSizeNative(pParams, pReturn) { - const params = WindowManagerGetClientViewSizeParams.unmarshal(pParams); - const element = this.getView(params.HtmlId); - const ret2 = new WindowManagerGetClientViewSizeReturn(); - ret2.ClientWidth = element.clientWidth; - ret2.ClientHeight = element.clientHeight; - ret2.OffsetWidth = element.offsetWidth; - ret2.OffsetHeight = element.offsetHeight; - ret2.marshal(pReturn); - return true; - } - /** - * Gets a dependency property value. - * - * Note that the casing of this method is intentionally Pascal for platform alignment. - */ - GetDependencyPropertyValue(elementId, propertyName) { - if (!WindowManager.getDependencyPropertyValueMethod) { - WindowManager.getDependencyPropertyValueMethod = Module.mono_bind_static_method("[Uno.UI] Uno.UI.Helpers.Automation:GetDependencyPropertyValue"); - } - const element = this.getView(elementId); - const htmlId = Number(element.getAttribute("XamlHandle")); - return WindowManager.getDependencyPropertyValueMethod(htmlId, propertyName); - } - /** - * Sets a dependency property value. - * - * Note that the casing of this method is intentionally Pascal for platform alignment. - */ - SetDependencyPropertyValue(elementId, propertyNameAndValue) { - if (!WindowManager.setDependencyPropertyValueMethod) { - WindowManager.setDependencyPropertyValueMethod = Module.mono_bind_static_method("[Uno.UI] Uno.UI.Helpers.Automation:SetDependencyPropertyValue"); - } - const element = this.getView(elementId); - const htmlId = Number(element.getAttribute("XamlHandle")); - return WindowManager.setDependencyPropertyValueMethod(htmlId, propertyNameAndValue); - } - /** - * Remove the loading indicator. - * - * In a future version it will also handle the splashscreen. - */ - activate() { - this.removeLoading(); - return "ok"; - } - init() { - if (UnoAppManifest.displayName) { - document.title = UnoAppManifest.displayName; - } - window.addEventListener("beforeunload", () => WindowManager.dispatchSuspendingMethod()); - } - static initMethods() { - if (WindowManager.isHosted) { - console.debug("Hosted Mode: Skipping MonoRuntime initialization "); - } - else { - if (!WindowManager.resizeMethod) { - WindowManager.resizeMethod = Module.mono_bind_static_method("[Uno.UI] Windows.UI.Xaml.Window:Resize"); - } - if (!WindowManager.dispatchEventMethod) { - WindowManager.dispatchEventMethod = Module.mono_bind_static_method("[Uno.UI] Windows.UI.Xaml.UIElement:DispatchEvent"); - } - if (!WindowManager.focusInMethod) { - WindowManager.focusInMethod = Module.mono_bind_static_method("[Uno.UI] Windows.UI.Xaml.Input.FocusManager:ReceiveFocusNative"); - } - if (!WindowManager.dispatchSuspendingMethod) { - WindowManager.dispatchSuspendingMethod = Module.mono_bind_static_method("[Uno.UI] Windows.UI.Xaml.Application:DispatchSuspending"); - } - } - } - initDom() { - this.containerElement = document.getElementById(this.containerElementId); - if (!this.containerElement) { - // If not found, we simply create a new one. - this.containerElement = document.createElement("div"); - } - document.body.addEventListener("focusin", this.onfocusin); - document.body.appendChild(this.containerElement); - window.addEventListener("resize", x => this.resize()); - window.addEventListener("contextmenu", x => { - if (!(x.target instanceof HTMLInputElement) || - x.target.classList.contains("context-menu-disabled")) { - x.preventDefault(); - } - }); - window.addEventListener("blur", this.onWindowBlur); - } - removeLoading() { - if (!this.loadingElementId) { - return; - } - const element = document.getElementById(this.loadingElementId); - if (element) { - element.parentElement.removeChild(element); - } - // UWP Window's default background is white. - const body = document.getElementsByTagName("body")[0]; - body.style.backgroundColor = "#fff"; - } - resize() { - if (WindowManager.isHosted) { - UnoDispatch.resize(`${document.documentElement.clientWidth};${document.documentElement.clientHeight}`); - } - else { - WindowManager.resizeMethod(document.documentElement.clientWidth, document.documentElement.clientHeight); - } - } - onfocusin(event) { - if (WindowManager.isHosted) { - console.warn("Focus not supported in hosted mode"); - } - else { - const newFocus = event.target; - const handle = newFocus.getAttribute("XamlHandle"); - const htmlId = handle ? Number(handle) : -1; // newFocus may not be an Uno element - WindowManager.focusInMethod(htmlId); - } - } - onWindowBlur() { - if (WindowManager.isHosted) { - console.warn("Focus not supported in hosted mode"); - } - else { - // Unset managed focus when Window loses focus - WindowManager.focusInMethod(-1); - } - } - dispatchEvent(element, eventName, eventPayload = null) { - const htmlId = Number(element.getAttribute("XamlHandle")); - // console.debug(`${element.getAttribute("id")}: Raising event ${eventName}.`); - if (!htmlId) { - throw `No attribute XamlHandle on element ${element}. Can't raise event.`; - } - if (WindowManager.isHosted) { - // Dispatch to the C# backed UnoDispatch class. Events propagated - // this way always succeed because synchronous calls are not possible - // between the host and the browser, unlike wasm. - UnoDispatch.dispatch(this.handleToString(htmlId), eventName, eventPayload); - return UI.HtmlEventDispatchResult.Ok; - } - else { - return WindowManager.dispatchEventMethod(htmlId, eventName, eventPayload || ""); - } - } - getIsConnectedToRootElement(element) { - const rootElement = this.rootElement; - if (!rootElement) { - return false; - } - return rootElement === element || rootElement.contains(element); - } - handleToString(handle) { - // Fastest conversion as of 2020-03-25 (when compared to String(handle) or handle.toString()) - return handle + ""; - } - numberToCssColor(color) { - return "#" + color.toString(16).padStart(8, "0"); - } - setCursor(cssCursor) { - const unoBody = document.getElementById(this.containerElementId); - if (unoBody) { - //always cleanup - if (this.cursorStyleElement != undefined) { - this.cursorStyleElement.remove(); - this.cursorStyleElement = undefined; - } - //only add custom overriding style if not auto - if (cssCursor != "auto") { - // this part is only to override default css: .uno-buttonbase {cursor: pointer;} - this.cursorStyleElement = document.createElement("style"); - this.cursorStyleElement.innerHTML = ".uno-buttonbase { cursor: " + cssCursor + "; }"; - document.body.appendChild(this.cursorStyleElement); - } - unoBody.style.cursor = cssCursor; - } - return "ok"; - } - getNaturalImageSize(imageUrl) { - return new Promise((resolve, reject) => { - const img = new Image(); - let loadingDone = () => { - this.containerElement.removeChild(img); - resolve(`${img.width};${img.height}`); - }; - let loadingError = (e) => { - this.containerElement.removeChild(img); - reject(e); - }; - img.style.pointerEvents = "none"; - img.style.opacity = "0"; - img.onload = loadingDone; - img.onerror = loadingError; - img.src = imageUrl; - this.containerElement.appendChild(img); - }); - } - selectInputRange(elementId, start, length) { - this.getView(elementId).setSelectionRange(start, start + length); - } - } - WindowManager._isHosted = false; - WindowManager._isLoadEventsEnabled = false; - WindowManager.unoRootClassName = "uno-root-element"; - WindowManager.unoUnarrangedClassName = "uno-unarranged"; - WindowManager.unoCollapsedClassName = "uno-visibility-collapsed"; - WindowManager._cctor = (() => { - WindowManager.initMethods(); - UI.HtmlDom.initPolyfills(); - })(); - WindowManager.MAX_WIDTH = `${Number.MAX_SAFE_INTEGER}vw`; - WindowManager.MAX_HEIGHT = `${Number.MAX_SAFE_INTEGER}vh`; - UI.WindowManager = WindowManager; - if (typeof define === "function") { - define([`./AppManifest.js`], () => { - }); - } - else { - throw `The Uno.Wasm.Boostrap is not up to date, please upgrade to a later version`; - } - })(UI = Uno.UI || (Uno.UI = {})); -})(Uno || (Uno = {})); -// Ensure the "Uno" namespace is available globally -window.Uno = Uno; -window.Windows = Windows; -PointerEvent.prototype.isOver = function (element) { - const bounds = element.getBoundingClientRect(); - return this.pageX >= bounds.left - && this.pageX < bounds.right - && this.pageY >= bounds.top - && this.pageY < bounds.bottom; -}; -PointerEvent.prototype.isOverDeep = function (element) { - if (!element) { - return false; - } - else if (element.style.pointerEvents != "none") { - return this.isOver(element); - } - else { - for (let elt of element.children) { - if (this.isOverDeep(elt)) { - return true; - } - } - } -}; -PointerEvent.prototype.isDirectlyOver = function (element) { - if (!this.isOver(element)) { - return false; - } - for (let elt of document.elementsFromPoint(this.clientX, this.clientY)) { - if (elt === element) { - // We found our target element, so the pointer effectively over it. - return true; - } - let htmlElt = elt; - if (htmlElt.style.pointerEvents !== "none") { - // This 'htmlElt' is handling the pointers events, this mean that we can stop the loop. - // However, if this 'htmlElt' is one of the children of the element it means that the pointer is over element. - while (htmlElt.parentElement) { - htmlElt = htmlElt.parentElement; - if (htmlElt === element) { - return true; - } - } - // We found an element this is capable to handle the pointers but which is not a child of 'element' - // (a sibling which is covering the element ... like a PopupRoot). - // It means that the pointer is not ** DIRECTLY ** over the element. - return false; - } - } - return false; -}; -var Uno; -(function (Uno) { - var UI; - (function (UI) { - var Interop; - (function (Interop) { - class AsyncInteropHelper { - static init() { - if (AsyncInteropHelper.dispatchErrorMethod) { - return; // already initialized - } - const w = window; - AsyncInteropHelper.dispatchResultMethod = - w.Module.mono_bind_static_method("[Uno.Foundation.Runtime.WebAssembly] Uno.Foundation.WebAssemblyRuntime:DispatchAsyncResult"); - AsyncInteropHelper.dispatchErrorMethod = - w.Module.mono_bind_static_method("[Uno.Foundation.Runtime.WebAssembly] Uno.Foundation.WebAssemblyRuntime:DispatchAsyncError"); - } - static Invoke(handle, promiseFunction) { - AsyncInteropHelper.init(); - try { - promiseFunction() - .then(str => { - if (typeof str == "string") { - AsyncInteropHelper.dispatchResultMethod(handle, str); - } - else { - AsyncInteropHelper.dispatchResultMethod(handle, null); - } - }) - .catch(err => { - if (typeof err == "string") { - AsyncInteropHelper.dispatchErrorMethod(handle, err); - } - else if (err.message && err.stack) { - AsyncInteropHelper.dispatchErrorMethod(handle, err.message + "\n" + err.stack); - } - else { - AsyncInteropHelper.dispatchErrorMethod(handle, "" + err); - } - }); - } - catch (err) { - if (typeof err == "string") { - AsyncInteropHelper.dispatchErrorMethod(handle, err); - } - else if (err.message && err.stack) { - AsyncInteropHelper.dispatchErrorMethod(handle, err.message + "\n" + err.stack); - } - else { - AsyncInteropHelper.dispatchErrorMethod(handle, "" + err); - } - } - } - } - Interop.AsyncInteropHelper = AsyncInteropHelper; - })(Interop = UI.Interop || (UI.Interop = {})); - })(UI = Uno.UI || (Uno.UI = {})); -})(Uno || (Uno = {})); -var Uno; -(function (Uno) { - var Foundation; - (function (Foundation) { - var Interop; - (function (Interop) { - class ManagedObject { - static init() { - ManagedObject.dispatchMethod = Module.mono_bind_static_method("[Uno.Foundation.Runtime.WebAssembly] Uno.Foundation.Interop.JSObject:Dispatch"); - } - static dispatch(handle, method, parameters) { - if (!ManagedObject.dispatchMethod) { - ManagedObject.init(); - } - ManagedObject.dispatchMethod(handle, method, parameters || ""); - } - } - Interop.ManagedObject = ManagedObject; - })(Interop = Foundation.Interop || (Foundation.Interop = {})); - })(Foundation = Uno.Foundation || (Uno.Foundation = {})); -})(Uno || (Uno = {})); -var Uno; -(function (Uno) { - var UI; - (function (UI) { - var Interop; - (function (Interop) { - class Runtime { - static init() { - return ""; - } - } - Runtime.engine = Runtime.init(); - Interop.Runtime = Runtime; - })(Interop = UI.Interop || (UI.Interop = {})); - })(UI = Uno.UI || (Uno.UI = {})); -})(Uno || (Uno = {})); -var Uno; -(function (Uno) { - var UI; - (function (UI) { - var Interop; - (function (Interop) { - class Xaml { - } - Interop.Xaml = Xaml; - })(Interop = UI.Interop || (UI.Interop = {})); - })(UI = Uno.UI || (Uno.UI = {})); -})(Uno || (Uno = {})); -// ReSharper disable InconsistentNaming -var ContactProperty; -(function (ContactProperty) { - ContactProperty["Address"] = "address"; - ContactProperty["Email"] = "email"; - ContactProperty["Icon"] = "icon"; - ContactProperty["Name"] = "name"; - ContactProperty["Tel"] = "tel"; -})(ContactProperty || (ContactProperty = {})); -; -var Windows; -(function (Windows) { - var ApplicationModel; - (function (ApplicationModel) { - var Contacts; - (function (Contacts) { - class ContactPicker { - static isSupported() { - return 'contacts' in navigator && 'ContactsManager' in window; - } - static async pickContacts(pickMultiple) { - const props = [ContactProperty.Name, ContactProperty.Email, ContactProperty.Tel, ContactProperty.Address]; - const opts = { - multiple: pickMultiple - }; - try { - const contacts = await navigator.contacts.select(props, opts); - return JSON.stringify(contacts); - } - catch (ex) { - console.log("Error occurred while picking contacts."); - return null; - } - } - } - Contacts.ContactPicker = ContactPicker; - })(Contacts = ApplicationModel.Contacts || (ApplicationModel.Contacts = {})); - })(ApplicationModel = Windows.ApplicationModel || (Windows.ApplicationModel = {})); -})(Windows || (Windows = {})); -var Windows; -(function (Windows) { - var ApplicationModel; - (function (ApplicationModel) { - var DataTransfer; - (function (DataTransfer) { - class DataTransferManager { - static isSupported() { - var navigatorAny = navigator; - return typeof navigatorAny.share === "function"; - } - static async showShareUI(title, text, url) { - var data = {}; - if (title) { - data.title = title; - } - if (text) { - data.text = text; - } - if (url) { - data.url = url; - } - if (navigator.share) { - try { - await navigator.share(data); - return "true"; - } - catch (e) { - console.log("Sharing failed:" + e); - return "false"; - } - } - console.log("navigator.share API is not available in this browser"); - return "false"; - } - } - DataTransfer.DataTransferManager = DataTransferManager; - })(DataTransfer = ApplicationModel.DataTransfer || (ApplicationModel.DataTransfer = {})); - })(ApplicationModel = Windows.ApplicationModel || (Windows.ApplicationModel = {})); -})(Windows || (Windows = {})); -var Windows; -(function (Windows) { - var ApplicationModel; - (function (ApplicationModel) { - var DataTransfer; - (function (DataTransfer) { - var DragDrop; - (function (DragDrop) { - var Core; - (function (Core) { - class DragDropExtension { - constructor() { - // Events fired on the drop target - // Note: dragenter and dragover events will enable drop on the app - this._dropHandler = this.dispatchDropEvent.bind(this); - document.addEventListener("dragenter", this._dropHandler); - document.addEventListener("dragover", this._dropHandler); - document.addEventListener("dragleave", this._dropHandler); // Seems to be raised also on drop? - document.addEventListener("drop", this._dropHandler); - // Events fired on the draggable target (the source element) - //this._dragHandler = this.dispatchDragEvent.bind(this); - //document.addEventListener("dragstart", this._dragHandler); - //document.addEventListener("drag", this._dragHandler); - //document.addEventListener("dragend", this._dragHandler); - } - static enable(pArgs) { - if (!DragDropExtension._dispatchDropEventMethod) { - DragDropExtension._dispatchDropEventMethod = Module.mono_bind_static_method("[Uno.UI] Windows.ApplicationModel.DataTransfer.DragDrop.Core.DragDropExtension:OnNativeDropEvent"); - } - if (DragDropExtension._current) { - throw new Error("A DragDropExtension has already been enabled"); - } - DragDropExtension._dispatchDragDropArgs = pArgs; - DragDropExtension._nextDropId = 1; - DragDropExtension._current = new DragDropExtension(); - } - static disable(pArgs) { - if (DragDropExtension._dispatchDragDropArgs != pArgs) { - throw new Error("The current DragDropExtension does not match the provided args"); - } - DragDropExtension._current.dispose(); - DragDropExtension._current = null; - DragDropExtension._dispatchDragDropArgs = null; - } - dispose() { - // Events fired on the drop target - document.removeEventListener("dragenter", this._dropHandler); - document.removeEventListener("dragover", this._dropHandler); - document.removeEventListener("dragleave", this._dropHandler); // Seems to be raised also on drop? - document.removeEventListener("drop", this._dropHandler); - } - dispatchDropEvent(evt) { - if (evt.type == "dragleave" - && evt.clientX > 0 - && evt.clientX < document.documentElement.clientWidth - && evt.clientY > 0 - && evt.clientY < document.documentElement.clientHeight) { - // We ignore all dragleave while if pointer is still over the window. - // This is to mute bubbling of drag leave when crossing boundaries of any elements on the app. - return; - } - if (evt.type == "dragenter") { - if (this._pendingDropId > 0) { - // For the same reason as above, we ignore all dragenter if there is already a pending active drop - return; - } - this._pendingDropId = ++DragDropExtension._nextDropId; - } - // We must keep a reference to the dataTransfer in order to be able to retrieve data items - this._pendingDropData = evt.dataTransfer; - // Prepare args - let args = new Core.DragDropExtensionEventArgs(); - args.id = this._pendingDropId; - args.eventName = evt.type; - args.timestamp = evt.timeStamp; - args.x = evt.clientX; - args.y = evt.clientY; - args.buttons = evt.buttons; - args.shift = evt.shiftKey; - args.ctrl = evt.ctrlKey; - args.alt = evt.altKey; - if (evt.type == "dragenter") { // We use the dataItems only for enter, no needs to copy them every time! - const items = new Array(); - for (let itemId = 0; itemId < evt.dataTransfer.items.length; itemId++) { - const item = evt.dataTransfer.items[itemId]; - items.push({ id: itemId, kind: item.kind, type: item.type }); - } - args.dataItems = JSON.stringify(items); - args.allowedOperations = evt.dataTransfer.effectAllowed; - } - else { - // Must be set for marshaling - args.dataItems = ""; - args.allowedOperations = ""; - } - args.acceptedOperation = evt.dataTransfer.dropEffect; - try { - // Raise the managed event - args.marshal(DragDropExtension._dispatchDragDropArgs); - DragDropExtension._dispatchDropEventMethod(); - // Read response from managed code - args = Core.DragDropExtensionEventArgs.unmarshal(DragDropExtension._dispatchDragDropArgs); - evt.dataTransfer.dropEffect = (args.acceptedOperation); - } - finally { - // No matter if the managed code handled the event, we want to prevent thee default behavior (like opening a drop link) - evt.preventDefault(); - if (evt.type == "dragleave" || evt.type == "drop") { - this._pendingDropData = null; - this._pendingDropId = 0; - } - } - } - static async retrieveText(itemId) { - const current = DragDropExtension._current; - const data = current === null || current === void 0 ? void 0 : current._pendingDropData; - if (data == null) { - throw new Error("No pending drag and drop data."); - } - return new Promise((resolve, reject) => { - const item = data.items[itemId]; - const timeout = setTimeout(() => reject("Timeout: for security reason, you cannot access data before drop."), 15000); - item.getAsString(str => { - clearTimeout(timeout); - resolve(str); - }); - }); - } - static async retrieveFiles(itemIds) { - var _a; - const data = (_a = DragDropExtension._current) === null || _a === void 0 ? void 0 : _a._pendingDropData; - if (data == null) { - throw new Error("No pending drag and drop data."); - } - const fileHandles = []; - if (Array.isArray(itemIds)) { - for (const id of itemIds) { - fileHandles.push(await DragDropExtension.getAsFile(data.items[id])); - } - } - else { - fileHandles.push(await DragDropExtension.getAsFile(data.items[itemIds])); - } - const infos = Uno.Storage.NativeStorageItem.getInfos(...fileHandles); - return JSON.stringify(infos); - } - static async getAsFile(item) { - if (item.getAsFileSystemHandle) { - return await item.getAsFileSystemHandle(); - } - else { - return item.getAsFile(); - } - } - } - Core.DragDropExtension = DragDropExtension; - })(Core = DragDrop.Core || (DragDrop.Core = {})); - })(DragDrop = DataTransfer.DragDrop || (DataTransfer.DragDrop = {})); - })(DataTransfer = ApplicationModel.DataTransfer || (ApplicationModel.DataTransfer = {})); - })(ApplicationModel = Windows.ApplicationModel || (Windows.ApplicationModel = {})); -})(Windows || (Windows = {})); -var Uno; -(function (Uno) { - var Devices; - (function (Devices) { - var Enumeration; - (function (Enumeration) { - var Internal; - (function (Internal) { - var Providers; - (function (Providers) { - var Midi; - (function (Midi) { - class MidiDeviceClassProvider { - static findDevices(findInputDevices) { - var result = ""; - const midi = Uno.Devices.Midi.Internal.WasmMidiAccess.getMidi(); - if (findInputDevices) { - midi.inputs.forEach((input, key) => { - const inputId = input.id; - const name = input.name; - const encodedMetadata = encodeURIComponent(inputId) + '#' + encodeURIComponent(name); - result += encodedMetadata + '&'; - }); - } - else { - midi.outputs.forEach((output, key) => { - const outputId = output.id; - const name = output.name; - const encodedMetadata = encodeURIComponent(outputId) + '#' + encodeURIComponent(name); - result += encodedMetadata + '&'; - }); - } - return result; - } - } - Midi.MidiDeviceClassProvider = MidiDeviceClassProvider; - })(Midi = Providers.Midi || (Providers.Midi = {})); - })(Providers = Internal.Providers || (Internal.Providers = {})); - })(Internal = Enumeration.Internal || (Enumeration.Internal = {})); - })(Enumeration = Devices.Enumeration || (Devices.Enumeration = {})); - })(Devices = Uno.Devices || (Uno.Devices = {})); -})(Uno || (Uno = {})); -var Uno; -(function (Uno) { - var Devices; - (function (Devices) { - var Enumeration; - (function (Enumeration) { - var Internal; - (function (Internal) { - var Providers; - (function (Providers) { - var Midi; - (function (Midi) { - class MidiDeviceConnectionWatcher { - static startStateChanged() { - const midi = Uno.Devices.Midi.Internal.WasmMidiAccess.getMidi(); - midi.addEventListener("statechange", MidiDeviceConnectionWatcher.onStateChanged); - } - static stopStateChanged() { - const midi = Uno.Devices.Midi.Internal.WasmMidiAccess.getMidi(); - midi.removeEventListener("statechange", MidiDeviceConnectionWatcher.onStateChanged); - } - static onStateChanged(event) { - if (!MidiDeviceConnectionWatcher.dispatchStateChanged) { - MidiDeviceConnectionWatcher.dispatchStateChanged = - Module.mono_bind_static_method("[Uno] Uno.Devices.Enumeration.Internal.Providers.Midi.MidiDeviceConnectionWatcher:DispatchStateChanged"); - } - const port = event.port; - const isInput = port.type == "input"; - const isConnected = port.state == "connected"; - MidiDeviceConnectionWatcher.dispatchStateChanged(port.id, port.name, isInput, isConnected); - } - } - Midi.MidiDeviceConnectionWatcher = MidiDeviceConnectionWatcher; - })(Midi = Providers.Midi || (Providers.Midi = {})); - })(Providers = Internal.Providers || (Internal.Providers = {})); - })(Internal = Enumeration.Internal || (Enumeration.Internal = {})); - })(Enumeration = Devices.Enumeration || (Devices.Enumeration = {})); - })(Devices = Uno.Devices || (Uno.Devices = {})); -})(Uno || (Uno = {})); -var Windows; -(function (Windows) { - var Devices; - (function (Devices) { - var Geolocation; - (function (Geolocation) { - let GeolocationAccessStatus; - (function (GeolocationAccessStatus) { - GeolocationAccessStatus["Allowed"] = "Allowed"; - GeolocationAccessStatus["Denied"] = "Denied"; - GeolocationAccessStatus["Unspecified"] = "Unspecified"; - })(GeolocationAccessStatus || (GeolocationAccessStatus = {})); - let PositionStatus; - (function (PositionStatus) { - PositionStatus["Ready"] = "Ready"; - PositionStatus["Initializing"] = "Initializing"; - PositionStatus["NoData"] = "NoData"; - PositionStatus["Disabled"] = "Disabled"; - PositionStatus["NotInitialized"] = "NotInitialized"; - PositionStatus["NotAvailable"] = "NotAvailable"; - })(PositionStatus || (PositionStatus = {})); - class Geolocator { - static initialize() { - this.positionWatches = {}; - if (!this.dispatchAccessRequest) { - this.dispatchAccessRequest = Module.mono_bind_static_method("[Uno] Windows.Devices.Geolocation.Geolocator:DispatchAccessRequest"); - } - if (!this.dispatchError) { - this.dispatchError = Module.mono_bind_static_method("[Uno] Windows.Devices.Geolocation.Geolocator:DispatchError"); - } - if (!this.dispatchGeoposition) { - this.dispatchGeoposition = Module.mono_bind_static_method("[Uno] Windows.Devices.Geolocation.Geolocator:DispatchGeoposition"); - } - } - //checks for permission to the geolocation services - static requestAccess() { - Geolocator.initialize(); - if (navigator.geolocation) { - navigator.geolocation.getCurrentPosition((_) => { - Geolocator.dispatchAccessRequest(GeolocationAccessStatus.Allowed); - }, (error) => { - if (error.code == error.PERMISSION_DENIED) { - Geolocator.dispatchAccessRequest(GeolocationAccessStatus.Denied); - } - else if (error.code == error.POSITION_UNAVAILABLE || - error.code == error.TIMEOUT) { - //position unavailable but we still have permission - Geolocator.dispatchAccessRequest(GeolocationAccessStatus.Allowed); - } - else { - Geolocator.dispatchAccessRequest(GeolocationAccessStatus.Unspecified); - } - }, { enableHighAccuracy: false, maximumAge: 86400000, timeout: 100 }); - } - else { - Geolocator.dispatchAccessRequest(GeolocationAccessStatus.Denied); - } - } - //retrieves a single geoposition - static getGeoposition(desiredAccuracyInMeters, maximumAge, timeout, requestId) { - Geolocator.initialize(); - if (navigator.geolocation) { - this.getAccurateCurrentPosition((position) => Geolocator.handleGeoposition(position, requestId), (error) => Geolocator.handleError(error, requestId), desiredAccuracyInMeters, { - enableHighAccuracy: desiredAccuracyInMeters < 50, - maximumAge: maximumAge, - timeout: timeout - }); - } - else { - Geolocator.dispatchError(PositionStatus.NotAvailable, requestId); - } - } - static startPositionWatch(desiredAccuracyInMeters, requestId) { - Geolocator.initialize(); - if (navigator.geolocation) { - Geolocator.positionWatches[requestId] = navigator.geolocation.watchPosition((position) => Geolocator.handleGeoposition(position, requestId), (error) => Geolocator.handleError(error, requestId)); - return true; - } - else { - return false; - } - } - static stopPositionWatch(desiredAccuracyInMeters, requestId) { - navigator.geolocation.clearWatch(Geolocator.positionWatches[requestId]); - delete Geolocator.positionWatches[requestId]; - } - static handleGeoposition(position, requestId) { - var serializedGeoposition = position.coords.latitude + ":" + - position.coords.longitude + ":" + - position.coords.altitude + ":" + - position.coords.altitudeAccuracy + ":" + - position.coords.accuracy + ":" + - position.coords.heading + ":" + - position.coords.speed + ":" + - position.timestamp; - Geolocator.dispatchGeoposition(serializedGeoposition, requestId); - } - static handleError(error, requestId) { - if (error.code == error.TIMEOUT) { - Geolocator.dispatchError(PositionStatus.NoData, requestId); - } - else if (error.code == error.PERMISSION_DENIED) { - Geolocator.dispatchError(PositionStatus.Disabled, requestId); - } - else if (error.code == error.POSITION_UNAVAILABLE) { - Geolocator.dispatchError(PositionStatus.NotAvailable, requestId); - } - } - //this attempts to squeeze out the requested accuracy from the GPS by utilizing the set timeout - //adapted from https://github.com/gregsramblings/getAccurateCurrentPosition/blob/master/geo.js - static getAccurateCurrentPosition(geolocationSuccess, geolocationError, desiredAccuracy, options) { - var lastCheckedPosition; - var locationEventCount = 0; - var watchId; - var timerId; - var checkLocation = function (position) { - lastCheckedPosition = position; - locationEventCount = locationEventCount + 1; - //is the accuracy enough? - if (position.coords.accuracy <= desiredAccuracy) { - clearTimeout(timerId); - navigator.geolocation.clearWatch(watchId); - foundPosition(position); - } - }; - var stopTrying = function () { - navigator.geolocation.clearWatch(watchId); - foundPosition(lastCheckedPosition); - }; - var onError = function (error) { - clearTimeout(timerId); - navigator.geolocation.clearWatch(watchId); - geolocationError(error); - }; - var foundPosition = function (position) { - geolocationSuccess(position); - }; - watchId = navigator.geolocation.watchPosition(checkLocation, onError, options); - timerId = setTimeout(stopTrying, options.timeout); - } - ; - } - Geolocation.Geolocator = Geolocator; - })(Geolocation = Devices.Geolocation || (Devices.Geolocation = {})); - })(Devices = Windows.Devices || (Windows.Devices = {})); -})(Windows || (Windows = {})); -var Windows; -(function (Windows) { - var Devices; - (function (Devices) { - var Input; - (function (Input) { - let PointerDeviceType; - (function (PointerDeviceType) { - PointerDeviceType[PointerDeviceType["Touch"] = 0] = "Touch"; - PointerDeviceType[PointerDeviceType["Pen"] = 1] = "Pen"; - PointerDeviceType[PointerDeviceType["Mouse"] = 2] = "Mouse"; - })(PointerDeviceType = Input.PointerDeviceType || (Input.PointerDeviceType = {})); - })(Input = Devices.Input || (Devices.Input = {})); - })(Devices = Windows.Devices || (Windows.Devices = {})); -})(Windows || (Windows = {})); -var Windows; -(function (Windows) { - var Devices; - (function (Devices) { - var Midi; - (function (Midi) { - class MidiInPort { - constructor(managedId, inputPort) { - this.messageReceived = (event) => { - var serializedMessage = event.data[0].toString(); - for (var i = 1; i < event.data.length; i++) { - serializedMessage += ':' + event.data[i]; - } - MidiInPort.dispatchMessage(this.managedId, serializedMessage, event.timeStamp); - }; - this.managedId = managedId; - this.inputPort = inputPort; - } - static createPort(managedId, encodedDeviceId) { - const midi = Uno.Devices.Midi.Internal.WasmMidiAccess.getMidi(); - const deviceId = decodeURIComponent(encodedDeviceId); - const input = midi.inputs.get(deviceId); - MidiInPort.instanceMap[managedId] = new MidiInPort(managedId, input); - } - static removePort(managedId) { - MidiInPort.stopMessageListener(managedId); - delete MidiInPort.instanceMap[managedId]; - } - static startMessageListener(managedId) { - if (!MidiInPort.dispatchMessage) { - MidiInPort.dispatchMessage = Module.mono_bind_static_method("[Uno] Windows.Devices.Midi.MidiInPort:DispatchMessage"); - } - const instance = MidiInPort.instanceMap[managedId]; - instance.inputPort.addEventListener("midimessage", instance.messageReceived); - } - static stopMessageListener(managedId) { - const instance = MidiInPort.instanceMap[managedId]; - instance.inputPort.removeEventListener("midimessage", instance.messageReceived); - } - } - MidiInPort.instanceMap = {}; - Midi.MidiInPort = MidiInPort; - })(Midi = Devices.Midi || (Devices.Midi = {})); - })(Devices = Windows.Devices || (Windows.Devices = {})); -})(Windows || (Windows = {})); -var Windows; -(function (Windows) { - var Devices; - (function (Devices) { - var Midi; - (function (Midi) { - class MidiOutPort { - static sendBuffer(encodedDeviceId, timestamp, ...args) { - const midi = Uno.Devices.Midi.Internal.WasmMidiAccess.getMidi(); - const deviceId = decodeURIComponent(encodedDeviceId); - const output = midi.outputs.get(deviceId); - output.send(args, timestamp); - } - } - Midi.MidiOutPort = MidiOutPort; - })(Midi = Devices.Midi || (Devices.Midi = {})); - })(Devices = Windows.Devices || (Windows.Devices = {})); -})(Windows || (Windows = {})); -var Uno; -(function (Uno) { - var Devices; - (function (Devices) { - var Midi; - (function (Midi) { - var Internal; - (function (Internal) { - class WasmMidiAccess { - static request(systemExclusive) { - if (navigator.requestMIDIAccess) { - return navigator.requestMIDIAccess({ sysex: systemExclusive }) - .then((midi) => { - WasmMidiAccess.midiAccess = midi; - return "true"; - }, () => "false"); - } - else { - return Promise.resolve("false"); - } - } - static getMidi() { - return WasmMidiAccess.midiAccess; - } - } - Internal.WasmMidiAccess = WasmMidiAccess; - })(Internal = Midi.Internal || (Midi.Internal = {})); - })(Midi = Devices.Midi || (Devices.Midi = {})); - })(Devices = Uno.Devices || (Uno.Devices = {})); -})(Uno || (Uno = {})); -var Windows; -(function (Windows) { - var Devices; - (function (Devices) { - var Sensors; - (function (Sensors) { - class Accelerometer { - static initialize() { - if (window.DeviceMotionEvent) { - this.dispatchReading = Module.mono_bind_static_method("[Uno] Windows.Devices.Sensors.Accelerometer:DispatchReading"); - return true; - } - return false; - } - static startReading() { - window.addEventListener("devicemotion", Accelerometer.readingChangedHandler); - } - static stopReading() { - window.removeEventListener("devicemotion", Accelerometer.readingChangedHandler); - } - static readingChangedHandler(event) { - Accelerometer.dispatchReading(event.accelerationIncludingGravity.x, event.accelerationIncludingGravity.y, event.accelerationIncludingGravity.z); - } - } - Sensors.Accelerometer = Accelerometer; - })(Sensors = Devices.Sensors || (Devices.Sensors = {})); - })(Devices = Windows.Devices || (Windows.Devices = {})); -})(Windows || (Windows = {})); -var Windows; -(function (Windows) { - var Devices; - (function (Devices) { - var Sensors; - (function (Sensors) { - class Gyrometer { - static initialize() { - try { - if (typeof window.Gyroscope === "function") { - this.dispatchReading = Module.mono_bind_static_method("[Uno] Windows.Devices.Sensors.Gyrometer:DispatchReading"); - let GyroscopeClass = window.Gyroscope; - this.gyroscope = new GyroscopeClass({ referenceFrame: "device" }); - return true; - } - } - catch (error) { - //sensor not available - console.log("Gyroscope could not be initialized."); - } - return false; - } - static startReading() { - this.gyroscope.addEventListener("reading", Gyrometer.readingChangedHandler); - this.gyroscope.start(); - } - static stopReading() { - this.gyroscope.removeEventListener("reading", Gyrometer.readingChangedHandler); - this.gyroscope.stop(); - } - static readingChangedHandler(event) { - Gyrometer.dispatchReading(Gyrometer.gyroscope.x, Gyrometer.gyroscope.y, Gyrometer.gyroscope.z); - } - } - Sensors.Gyrometer = Gyrometer; - })(Sensors = Devices.Sensors || (Devices.Sensors = {})); - })(Devices = Windows.Devices || (Windows.Devices = {})); -})(Windows || (Windows = {})); -var Windows; -(function (Windows) { - var Devices; - (function (Devices) { - var Sensors; - (function (Sensors) { - class LightSensor { - static initialize() { - try { - if (typeof window.AmbientLightSensor === "function") { - LightSensor.dispatchReading = Module.mono_bind_static_method("[Uno] Windows.Devices.Sensors.LightSensor:DispatchReading"); - const AmbientLightSensorClass = window.AmbientLightSensor; - LightSensor.ambientLightSensor = new AmbientLightSensorClass(); - return true; - } - } - catch (error) { - // Sensor not available - console.error("AmbientLightSensor could not be initialized."); - } - return false; - } - static startReading() { - LightSensor.ambientLightSensor.addEventListener("reading", LightSensor.readingChangedHandler); - LightSensor.ambientLightSensor.start(); - } - static stopReading() { - LightSensor.ambientLightSensor.removeEventListener("reading", LightSensor.readingChangedHandler); - LightSensor.ambientLightSensor.stop(); - } - static readingChangedHandler(event) { - LightSensor.dispatchReading(LightSensor.ambientLightSensor.illuminance); - } - } - Sensors.LightSensor = LightSensor; - })(Sensors = Devices.Sensors || (Devices.Sensors = {})); - })(Devices = Windows.Devices || (Windows.Devices = {})); -})(Windows || (Windows = {})); -var Windows; -(function (Windows) { - var Devices; - (function (Devices) { - var Sensors; - (function (Sensors) { - class Magnetometer { - static initialize() { - try { - if (typeof window.Magnetometer === "function") { - this.dispatchReading = Module.mono_bind_static_method("[Uno] Windows.Devices.Sensors.Magnetometer:DispatchReading"); - let MagnetometerClass = window.Magnetometer; - this.magnetometer = new MagnetometerClass({ referenceFrame: 'device' }); - return true; - } - } - catch (error) { - //sensor not available - console.log("Magnetometer could not be initialized."); - } - return false; - } - static startReading() { - this.magnetometer.addEventListener("reading", Magnetometer.readingChangedHandler); - this.magnetometer.start(); - } - static stopReading() { - this.magnetometer.removeEventListener("reading", Magnetometer.readingChangedHandler); - this.magnetometer.stop(); - } - static readingChangedHandler(event) { - Magnetometer.dispatchReading(Magnetometer.magnetometer.x, Magnetometer.magnetometer.y, Magnetometer.magnetometer.z); - } - } - Sensors.Magnetometer = Magnetometer; - })(Sensors = Devices.Sensors || (Devices.Sensors = {})); - })(Devices = Windows.Devices || (Windows.Devices = {})); -})(Windows || (Windows = {})); -var Windows; -(function (Windows) { - var Gaming; - (function (Gaming) { - var Input; - (function (Input) { - class Gamepad { - static getConnectedGamepadIds() { - const gamepads = navigator.getGamepads(); - const separator = ";"; - var result = ''; - for (var gamepad of gamepads) { - if (gamepad) { - result += gamepad.index + separator; - } - } - return result; - } - static getReading(id) { - var gamepad = navigator.getGamepads()[id]; - if (!gamepad) { - return ""; - } - var result = ""; - result += gamepad.timestamp; - result += '*'; - for (var axisId = 0; axisId < gamepad.axes.length; axisId++) { - if (axisId != 0) { - result += '|'; - } - result += gamepad.axes[axisId]; - } - result += '*'; - for (var buttonId = 0; buttonId < gamepad.buttons.length; buttonId++) { - if (buttonId != 0) { - result += '|'; - } - result += gamepad.buttons[buttonId].value; - } - return result; - } - static startGamepadAdded() { - window.addEventListener("gamepadconnected", Gamepad.onGamepadConnected); - } - static endGamepadAdded() { - window.removeEventListener("gamepadconnected", Gamepad.onGamepadConnected); - } - static startGamepadRemoved() { - window.addEventListener("gamepaddisconnected", Gamepad.onGamepadDisconnected); - } - static endGamepadRemoved() { - window.removeEventListener("gamepaddisconnected", Gamepad.onGamepadDisconnected); - } - static onGamepadConnected(e) { - if (!Gamepad.dispatchGamepadAdded) { - Gamepad.dispatchGamepadAdded = Module.mono_bind_static_method("[Uno] Windows.Gaming.Input.Gamepad:DispatchGamepadAdded"); - } - Gamepad.dispatchGamepadAdded(e.gamepad.index.toString()); - } - static onGamepadDisconnected(e) { - if (!Gamepad.dispatchGamepadRemoved) { - Gamepad.dispatchGamepadRemoved = Module.mono_bind_static_method("[Uno] Windows.Gaming.Input.Gamepad:DispatchGamepadRemoved"); - } - Gamepad.dispatchGamepadRemoved(e.gamepad.index.toString()); - } - } - Input.Gamepad = Gamepad; - })(Input = Gaming.Input || (Gaming.Input = {})); - })(Gaming = Windows.Gaming || (Windows.Gaming = {})); -})(Windows || (Windows = {})); -var Windows; -(function (Windows) { - var Graphics; - (function (Graphics) { - var Display; - (function (Display) { - let DisplayOrientations; - (function (DisplayOrientations) { - DisplayOrientations[DisplayOrientations["None"] = 0] = "None"; - DisplayOrientations[DisplayOrientations["Landscape"] = 1] = "Landscape"; - DisplayOrientations[DisplayOrientations["Portrait"] = 2] = "Portrait"; - DisplayOrientations[DisplayOrientations["LandscapeFlipped"] = 4] = "LandscapeFlipped"; - DisplayOrientations[DisplayOrientations["PortraitFlipped"] = 8] = "PortraitFlipped"; - })(DisplayOrientations || (DisplayOrientations = {})); - class DisplayInformation { - static startOrientationChanged() { - window.screen.orientation.addEventListener("change", DisplayInformation.onOrientationChange); - } - static stopOrientationChanged() { - window.screen.orientation.removeEventListener("change", DisplayInformation.onOrientationChange); - } - static startDpiChanged() { - // DPI can be observed using matchMedia query, but only for certain breakpoints - // for accurate observation, we use polling - DisplayInformation.lastDpi = window.devicePixelRatio; - // start polling the devicePixel - DisplayInformation.dpiWatcher = window.setInterval(DisplayInformation.updateDpi, DisplayInformation.DpiCheckInterval); - } - static stopDpiChanged() { - window.clearInterval(DisplayInformation.dpiWatcher); - } - static async setOrientationAsync(uwpOrientations) { - let oldOrientation = screen.orientation.type; - let orientations = DisplayInformation.parseUwpOrientation(uwpOrientations); - if (orientations.includes(oldOrientation)) { - return; - } - // Setting the orientation requires briefly changing the device to fullscreen. - // This causes a glitch, which is unnecessary for devices which does not support - // setting the orientation, such as most desktop browsers. - // We therefore attempt to check for support, and do nothing if the feature is - // unavailable. - if (this.lockingSupported == null) { - try { - await screen.orientation.lock(oldOrientation); - this.lockingSupported = true; - } - catch (e) { - if (e instanceof DOMException && e.name === "NotSupportedError") { - this.lockingSupported = false; - console.log("This browser does not support setting the orientation."); - } - else { - // On most mobile devices we should reach this line. - this.lockingSupported = true; - } - } - } - if (!this.lockingSupported) { - return; - } - let wasFullscreen = document.fullscreenElement != null; - if (!wasFullscreen) { - await document.body.requestFullscreen(); - } - for (let orientation of orientations) { - try { - // On success, screen.orientation should fire the 'change' event. - await screen.orientation.lock(orientation); - break; - } - catch (e) { - // Absorb all errors to ensure that the exitFullscreen block below is called. - console.log(`Failed to set the screen orientation to '${orientation}': ${e}`); - } - } - if (!wasFullscreen) { - await document.exitFullscreen(); - } - } - static parseUwpOrientation(uwpOrientations) { - let orientations = []; - if (uwpOrientations & DisplayOrientations.Landscape) { - orientations.push("landscape-primary"); - } - if (uwpOrientations & DisplayOrientations.Portrait) { - orientations.push("portrait-primary"); - } - if (uwpOrientations & DisplayOrientations.LandscapeFlipped) { - orientations.push("landscape-secondary"); - } - if (uwpOrientations & DisplayOrientations.PortraitFlipped) { - orientations.push("portrait-secondary"); - } - return orientations; - } - static updateDpi() { - const currentDpi = window.devicePixelRatio; - if (Math.abs(DisplayInformation.lastDpi - currentDpi) > 0.001) { - if (DisplayInformation.dispatchDpiChanged == null) { - DisplayInformation.dispatchDpiChanged = - Module.mono_bind_static_method("[Uno] Windows.Graphics.Display.DisplayInformation:DispatchDpiChanged"); - } - DisplayInformation.dispatchDpiChanged(currentDpi); - } - DisplayInformation.lastDpi = currentDpi; - } - static onOrientationChange() { - if (DisplayInformation.dispatchOrientationChanged == null) { - DisplayInformation.dispatchOrientationChanged = - Module.mono_bind_static_method("[Uno] Windows.Graphics.Display.DisplayInformation:DispatchOrientationChanged"); - } - DisplayInformation.dispatchOrientationChanged(window.screen.orientation.type); - } - } - DisplayInformation.DpiCheckInterval = 1000; - Display.DisplayInformation = DisplayInformation; - })(Display = Graphics.Display || (Graphics.Display = {})); - })(Graphics = Windows.Graphics || (Windows.Graphics = {})); -})(Windows || (Windows = {})); -var Windows; -(function (Windows) { - var Media; - (function (Media) { - class SpeechRecognizer { - constructor(managedId, culture) { - this.onResult = (event) => { - if (event.results[0].isFinal) { - if (!SpeechRecognizer.dispatchResult) { - SpeechRecognizer.dispatchResult = Module.mono_bind_static_method("[Uno] Windows.Media.SpeechRecognition.SpeechRecognizer:DispatchResult"); - } - SpeechRecognizer.dispatchResult(this.managedId, event.results[0][0].transcript, event.results[0][0].confidence); - } - else { - if (!SpeechRecognizer.dispatchHypothesis) { - SpeechRecognizer.dispatchHypothesis = Module.mono_bind_static_method("[Uno] Windows.Media.SpeechRecognition.SpeechRecognizer:DispatchHypothesis"); - } - SpeechRecognizer.dispatchHypothesis(this.managedId, event.results[0][0].transcript); - } - }; - this.onSpeechStart = () => { - if (!SpeechRecognizer.dispatchStatus) { - SpeechRecognizer.dispatchStatus = Module.mono_bind_static_method("[Uno] Windows.Media.SpeechRecognition.SpeechRecognizer:DispatchStatus"); - } - SpeechRecognizer.dispatchStatus(this.managedId, "SpeechDetected"); - }; - this.onError = (event) => { - if (!SpeechRecognizer.dispatchError) { - SpeechRecognizer.dispatchError = Module.mono_bind_static_method("[Uno] Windows.Media.SpeechRecognition.SpeechRecognizer:DispatchError"); - } - SpeechRecognizer.dispatchError(this.managedId, event.error); - }; - this.managedId = managedId; - if (window.SpeechRecognition) { - this.recognition = new window.SpeechRecognition(culture); - } - else if (window.webkitSpeechRecognition) { - this.recognition = new window.webkitSpeechRecognition(culture); - } - if (this.recognition) { - this.recognition.addEventListener("result", this.onResult); - this.recognition.addEventListener("speechstart", this.onSpeechStart); - this.recognition.addEventListener("error", this.onError); - } - } - static initialize(managedId, culture) { - const recognizer = new SpeechRecognizer(managedId, culture); - SpeechRecognizer.instanceMap[managedId] = recognizer; - } - static recognize(managedId) { - const recognizer = SpeechRecognizer.instanceMap[managedId]; - if (recognizer.recognition) { - recognizer.recognition.continuous = false; - recognizer.recognition.interimResults = true; - recognizer.recognition.start(); - return true; - } - else { - return false; - } - } - static removeInstance(managedId) { - const recognizer = SpeechRecognizer.instanceMap[managedId]; - recognizer.recognition.removeEventListener("result", recognizer.onResult); - recognizer.recognition.removeEventListener("speechstart", recognizer.onSpeechStart); - recognizer.recognition.removeEventListener("error", recognizer.onError); - delete SpeechRecognizer.instanceMap[managedId]; - } - } - SpeechRecognizer.instanceMap = {}; - Media.SpeechRecognizer = SpeechRecognizer; - })(Media = Windows.Media || (Windows.Media = {})); -})(Windows || (Windows = {})); -var Windows; -(function (Windows) { - var Networking; - (function (Networking) { - var Connectivity; - (function (Connectivity) { - class ConnectionProfile { - static hasInternetAccess() { - return navigator.onLine; - } - } - Connectivity.ConnectionProfile = ConnectionProfile; - })(Connectivity = Networking.Connectivity || (Networking.Connectivity = {})); - })(Networking = Windows.Networking || (Windows.Networking = {})); -})(Windows || (Windows = {})); -var Windows; -(function (Windows) { - var Networking; - (function (Networking) { - var Connectivity; - (function (Connectivity) { - class NetworkInformation { - static startStatusChanged() { - window.addEventListener("online", NetworkInformation.networkStatusChanged); - window.addEventListener("offline", NetworkInformation.networkStatusChanged); - } - static stopStatusChanged() { - window.removeEventListener("online", NetworkInformation.networkStatusChanged); - window.removeEventListener("offline", NetworkInformation.networkStatusChanged); - } - static networkStatusChanged() { - if (NetworkInformation.dispatchStatusChanged == null) { - NetworkInformation.dispatchStatusChanged = - Module.mono_bind_static_method("[Uno] Windows.Networking.Connectivity.NetworkInformation:DispatchStatusChanged"); - } - NetworkInformation.dispatchStatusChanged(); - } - } - Connectivity.NetworkInformation = NetworkInformation; - })(Connectivity = Networking.Connectivity || (Networking.Connectivity = {})); - })(Networking = Windows.Networking || (Windows.Networking = {})); -})(Windows || (Windows = {})); -var Windows; -(function (Windows) { - var Phone; - (function (Phone) { - var Devices; - (function (Devices) { - var Notification; - (function (Notification) { - class VibrationDevice { - static initialize() { - navigator.vibrate = navigator.vibrate || navigator.webkitVibrate || navigator.mozVibrate || navigator.msVibrate; - if (navigator.vibrate) { - return true; - } - return false; - } - static vibrate(duration) { - return window.navigator.vibrate(duration); - } - } - Notification.VibrationDevice = VibrationDevice; - })(Notification = Devices.Notification || (Devices.Notification = {})); - })(Devices = Phone.Devices || (Phone.Devices = {})); - })(Phone = Windows.Phone || (Windows.Phone = {})); -})(Windows || (Windows = {})); -var Windows; -(function (Windows) { - var Security; - (function (Security) { - var Authentication; - (function (Authentication) { - var Web; - (function (Web) { - class WebAuthenticationBroker { - static getReturnUrl() { - return window.location.origin; - } - static authenticateUsingIframe(iframeId, urlNavigate, urlRedirect, timeout) { - return new Promise((ok, err) => { - let iframe; - if (iframeId) { - iframe = document.getElementById(iframeId); - } - if (!iframe) { - iframe = document.createElement("iframe"); - iframe.style.opacity = "0"; - iframe.style.pointerEvents = "none"; - document.body.append(iframe); - } - const terminate = () => { - iframe.removeEventListener("load", onload); - iframe.src = "about:blank"; - if (!iframeId) { - iframe.remove(); - } - }; - const onload = () => { - if (!iframe.contentDocument) { - return; // can't access right now - } - const currentUrl = iframe.contentDocument.URL; - console.log("iframe src=" + currentUrl); - if (currentUrl.indexOf(urlRedirect) === 0) { - terminate(); - ok(`success|${currentUrl}`); - } - }; - iframe.addEventListener("load", onload); - iframe.src = urlNavigate; - }); - } - static authenticateUsingWindow(urlNavigate, urlRedirect, title, popUpWidth, popUpHeight, timeout) { - let win = null; - let timerSubscription = null; - return new Promise((ok, err) => { - let finished = false; - const close = () => { - if (win) { - win.close(); - win = null; - } - if (timerSubscription) { - window.clearInterval(timerSubscription); - timerSubscription = null; - } - if (!finished) { - err("Incomplete"); - } - }; - const completeSuccessfully = (url) => { - if (!finished) { - ok(`success|${url}`); - finished = true; - close(); - } - }; - const completeUserCancel = () => { - if (!finished) { - ok(`cancel`); - finished = true; - close(); - } - }; - const completeTimeout = () => { - if (!finished) { - ok(`timeout`); - finished = true; - close(); - } - }; - const completeWithError = (error) => { - if (!finished) { - err(error); - finished = true; - close(); - } - }; - try { - /** - * adding winLeft and winTop to account for dual monitor - * using screenLeft and screenTop for IE8 and earlier - */ - const winLeft = window.screenLeft ? window.screenLeft : window.screenX; - const winTop = window.screenTop ? window.screenTop : window.screenY; - /** - * window.innerWidth displays browser window"s height and width excluding toolbars - * using document.documentElement.clientWidth for IE8 and earlier - */ - const width = window.innerWidth || - document.documentElement.clientWidth || - document.body.clientWidth; - const height = window.innerHeight || - document.documentElement.clientHeight || - document.body.clientHeight; - const left = ((width / 2) - (popUpWidth / 2)) + winLeft; - const top = ((height / 2) - (popUpHeight / 2)) + winTop; - // open the window - win = window.open(urlNavigate, title, "width=" + popUpWidth + ", height=" + popUpHeight + ", top=" + top + ", left=" + left); - if (!win) { - completeWithError("Can't open window"); - return; - } - if (win.focus) { - win.focus(); - } - win.addEventListener("beforeunload", close); - const onFinalUrlReached = (success, timedout, finalUrlOrMessage) => { - if (success) { - completeSuccessfully(finalUrlOrMessage); - } - else { - if (timedout) { - completeTimeout(); - } - else { - completeUserCancel(); - } - } - }; - timerSubscription = this.startMonitoringRedirect(win, urlRedirect, timeout, onFinalUrlReached); - } - catch (e) { - completeWithError(`${e}`); - } - }); - } - static startMonitoringRedirect(win, urlRedirect, timeout, callback) { - const currentTime = (new Date()).getTime(); - const maxTime = currentTime + timeout; - const subscription = window.setInterval(() => { - try { - if ((new Date()).getTime() > maxTime) { - callback(false, true, null); - } - if (win.closed) { - callback(false, false, "Popup closed"); - return; - } - const url = win.document.URL; - if (url.indexOf(urlRedirect) === 0) { - callback(true, false, url); - } - } - catch (e) { - // Expected! DOMException / crossed origin until reached correct redirect page - } - }, 100); - return subscription; - } - } - Web.WebAuthenticationBroker = WebAuthenticationBroker; - })(Web = Authentication.Web || (Authentication.Web = {})); - })(Authentication = Security.Authentication || (Security.Authentication = {})); - })(Security = Windows.Security || (Windows.Security = {})); -})(Windows || (Windows = {})); -// eslint-disable-next-line @typescript-eslint/no-namespace -var Windows; -(function (Windows) { - var Storage; - (function (Storage) { - class ApplicationDataContainer { - static buildStorageKey(locality, key) { - return `UnoApplicationDataContainer_${locality}_${key}`; - } - static buildStoragePrefix(locality) { - return `UnoApplicationDataContainer_${locality}_`; - } - /** - * Try to get a value from localStorage - * */ - static tryGetValue(pParams, pReturn) { - const params = Storage.ApplicationDataContainer_TryGetValueParams.unmarshal(pParams); - const ret = new Storage.ApplicationDataContainer_TryGetValueReturn(); - const storageKey = ApplicationDataContainer.buildStorageKey(params.Locality, params.Key); - if (localStorage.hasOwnProperty(storageKey)) { - ret.HasValue = true; - ret.Value = localStorage.getItem(storageKey); - } - else { - ret.Value = ""; - ret.HasValue = false; - } - ret.marshal(pReturn); - return true; - } - /** - * Set a value to localStorage - * */ - static setValue(pParams) { - const params = Storage.ApplicationDataContainer_SetValueParams.unmarshal(pParams); - const storageKey = ApplicationDataContainer.buildStorageKey(params.Locality, params.Key); - localStorage.setItem(storageKey, params.Value); - return true; - } - /** - * Determines if a key is contained in localStorage - * */ - static containsKey(pParams, pReturn) { - const params = Storage.ApplicationDataContainer_ContainsKeyParams.unmarshal(pParams); - const ret = new Storage.ApplicationDataContainer_ContainsKeyReturn(); - const storageKey = ApplicationDataContainer.buildStorageKey(params.Locality, params.Key); - ret.ContainsKey = localStorage.hasOwnProperty(storageKey); - ret.marshal(pReturn); - return true; - } - /** - * Gets a key by index in localStorage - * */ - static getKeyByIndex(pParams, pReturn) { - const params = Storage.ApplicationDataContainer_GetKeyByIndexParams.unmarshal(pParams); - const ret = new Storage.ApplicationDataContainer_GetKeyByIndexReturn(); - let localityIndex = 0; - let returnKey = ""; - const prefix = ApplicationDataContainer.buildStoragePrefix(params.Locality); - for (let i = 0; i < localStorage.length; i++) { - const storageKey = localStorage.key(i); - if (storageKey.startsWith(prefix)) { - if (localityIndex === params.Index) { - returnKey = storageKey.substr(prefix.length); - } - localityIndex++; - } - } - ret.Value = returnKey; - ret.marshal(pReturn); - return true; - } - /** - * Determines the number of items contained in localStorage - * */ - static getCount(pParams, pReturn) { - const params = Storage.ApplicationDataContainer_GetCountParams.unmarshal(pParams); - const ret = new Storage.ApplicationDataContainer_GetCountReturn(); - ret.Count = 0; - const prefix = ApplicationDataContainer.buildStoragePrefix(params.Locality); - for (let i = 0; i < localStorage.length; i++) { - const storageKey = localStorage.key(i); - if (storageKey.startsWith(prefix)) { - ret.Count++; - } - } - ret.marshal(pReturn); - return true; - } - /** - * Clears items contained in localStorage - * */ - static clear(pParams) { - const params = Storage.ApplicationDataContainer_ClearParams.unmarshal(pParams); - const prefix = ApplicationDataContainer.buildStoragePrefix(params.Locality); - const itemsToRemove = []; - for (let i = 0; i < localStorage.length; i++) { - const storageKey = localStorage.key(i); - if (storageKey.startsWith(prefix)) { - itemsToRemove.push(storageKey); - } - } - for (const item in itemsToRemove) { - localStorage.removeItem(itemsToRemove[item]); - } - return true; - } - /** - * Removes an item contained in localStorage - * */ - static remove(pParams, pReturn) { - const params = Storage.ApplicationDataContainer_RemoveParams.unmarshal(pParams); - const ret = new Storage.ApplicationDataContainer_RemoveReturn(); - const storageKey = ApplicationDataContainer.buildStorageKey(params.Locality, params.Key); - ret.Removed = localStorage.hasOwnProperty(storageKey); - if (ret.Removed) { - localStorage.removeItem(storageKey); - } - ret.marshal(pReturn); - return true; - } - /** - * Gets a key by index in localStorage - * */ - static getValueByIndex(pParams, pReturn) { - const params = Storage.ApplicationDataContainer_GetValueByIndexParams.unmarshal(pParams); - const ret = new Storage.ApplicationDataContainer_GetKeyByIndexReturn(); - let localityIndex = 0; - let returnKey = ""; - const prefix = ApplicationDataContainer.buildStoragePrefix(params.Locality); - for (let i = 0; i < localStorage.length; i++) { - const storageKey = localStorage.key(i); - if (storageKey.startsWith(prefix)) { - if (localityIndex === params.Index) { - returnKey = localStorage.getItem(storageKey); - } - localityIndex++; - } - } - ret.Value = returnKey; - ret.marshal(pReturn); - return true; - } - } - Storage.ApplicationDataContainer = ApplicationDataContainer; - })(Storage = Windows.Storage || (Windows.Storage = {})); -})(Windows || (Windows = {})); -// eslint-disable-next-line @typescript-eslint/no-namespace -var Windows; -(function (Windows) { - var Storage; - (function (Storage) { - class AssetManager { - static async DownloadAssetsManifest(path) { - const response = await fetch(path); - return response.text(); - } - static async DownloadAsset(path) { - const response = await fetch(path); - const arrayBuffer = await response.blob().then(b => b.arrayBuffer()); - const size = arrayBuffer.byteLength; - const responseArray = new Uint8ClampedArray(arrayBuffer); - const pData = Module._malloc(size); - Module.HEAPU8.set(responseArray, pData); - return `${pData};${size}`; - } - } - Storage.AssetManager = AssetManager; - })(Storage = Windows.Storage || (Windows.Storage = {})); -})(Windows || (Windows = {})); -var Uno; -(function (Uno) { - var Storage; - (function (Storage) { - class NativeStorageFile { - static async getBasicPropertiesAsync(guid) { - const file = await Storage.NativeStorageItem.getFile(guid); - var propertyString = ""; - propertyString += file.size; - propertyString += "|"; - propertyString += file.lastModified; - return propertyString; - } - } - Storage.NativeStorageFile = NativeStorageFile; - })(Storage = Uno.Storage || (Uno.Storage = {})); -})(Uno || (Uno = {})); -var __asyncValues = (this && this.__asyncValues) || function (o) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var m = o[Symbol.asyncIterator], i; - return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); - function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } - function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } -}; -var Uno; -(function (Uno) { - var Storage; - (function (Storage) { - class NativeStorageFolder { - /** - * Creates a new folder inside another folder. - * @param parentGuid The GUID of the folder to create in. - * @param folderName The name of the new folder. - */ - static async createFolderAsync(parentGuid, folderName) { - try { - const parentHandle = Storage.NativeStorageItem.getItem(parentGuid); - const newDirectoryHandle = await parentHandle.getDirectoryHandle(folderName, { - create: true, - }); - const info = Storage.NativeStorageItem.getInfos(newDirectoryHandle)[0]; - return JSON.stringify(info); - } - catch (_a) { - console.log("Could not create folder" + folderName); - return null; - } - } - /** - * Creates a new file inside another folder. - * @param parentGuid The GUID of the folder to create in. - * @param folderName The name of the new file. - */ - static async createFileAsync(parentGuid, fileName) { - try { - const parentHandle = Storage.NativeStorageItem.getItem(parentGuid); - const newFileHandle = await parentHandle.getFileHandle(fileName, { - create: true, - }); - const info = Storage.NativeStorageItem.getInfos(newFileHandle)[0]; - return JSON.stringify(info); - } - catch (_a) { - console.log("Could not create file " + fileName); - return null; - } - } - /** - * Tries to get a folder in the given parent folder by name. - * @param parentGuid The GUID of the parent folder to get. - * @param folderName The name of the folder to look for. - * @returns A GUID of the folder if found, otherwise null. - */ - static async tryGetFolderAsync(parentGuid, folderName) { - const parentHandle = Storage.NativeStorageItem.getItem(parentGuid); - let nestedDirectoryHandle = undefined; - try { - nestedDirectoryHandle = await parentHandle.getDirectoryHandle(folderName); - } - catch (ex) { - return null; - } - if (nestedDirectoryHandle) { - return JSON.stringify(Storage.NativeStorageItem.getInfos(nestedDirectoryHandle)[0]); - } - return null; - } - /** - * Tries to get a file in the given parent folder by name. - * @param parentGuid The GUID of the parent folder to get. - * @param folderName The name of the folder to look for. - * @returns A GUID of the folder if found, otherwise null. - */ - static async tryGetFileAsync(parentGuid, fileName) { - const parentHandle = Storage.NativeStorageItem.getItem(parentGuid); - let fileHandle = undefined; - try { - fileHandle = await parentHandle.getFileHandle(fileName); - } - catch (ex) { - return null; - } - if (fileHandle) { - return JSON.stringify(Storage.NativeStorageItem.getInfos(fileHandle)[0]); - } - return null; - } - static async deleteItemAsync(parentGuid, itemName) { - try { - const parentHandle = Storage.NativeStorageItem.getItem(parentGuid); - await parentHandle.removeEntry(itemName, { recursive: true }); - return "OK"; - } - catch (_a) { - return null; - } - } - static async getItemsAsync(folderGuid) { - return await NativeStorageFolder.getEntriesAsync(folderGuid, true, true); - } - static async getFoldersAsync(folderGuid) { - return await NativeStorageFolder.getEntriesAsync(folderGuid, false, true); - } - static async getFilesAsync(folderGuid) { - return await NativeStorageFolder.getEntriesAsync(folderGuid, true, false); - } - static async getPrivateRootAsync() { - if (!navigator.storage.getDirectory) { - return null; - } - const directory = await navigator.storage.getDirectory(); - if (!directory) { - return null; - } - const info = Storage.NativeStorageItem.getInfos(directory)[0]; - return JSON.stringify(info); - } - static async getEntriesAsync(guid, includeFiles, includeDirectories) { - var e_1, _a, e_2, _b; - const folderHandle = Storage.NativeStorageItem.getItem(guid); - var entries = []; - // Default to "modern" implementation - if (folderHandle.values) { - try { - for (var _c = __asyncValues(folderHandle.values()), _d; _d = await _c.next(), !_d.done;) { - var entry = _d.value; - entries.push(entry); - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (_d && !_d.done && (_a = _c.return)) await _a.call(_c); - } - finally { if (e_1) throw e_1.error; } - } - } - else { - try { - for (var _e = __asyncValues(folderHandle.getEntries()), _f; _f = await _e.next(), !_f.done;) { - var handle = _f.value; - entries.push(handle); - } - } - catch (e_2_1) { e_2 = { error: e_2_1 }; } - finally { - try { - if (_f && !_f.done && (_b = _e.return)) await _b.call(_e); - } - finally { if (e_2) throw e_2.error; } - } - } - var filteredHandles = []; - // Filter - for (var handle of entries) { - if (handle.kind == "file" && includeFiles) { - filteredHandles.push(handle); - } - else if (handle.kind == "directory" && includeDirectories) { - filteredHandles.push(handle); - } - } - // Get infos - var infos = Storage.NativeStorageItem.getInfos(...filteredHandles); - var json = JSON.stringify(infos); - return json; - } - } - Storage.NativeStorageFolder = NativeStorageFolder; - })(Storage = Uno.Storage || (Uno.Storage = {})); -})(Uno || (Uno = {})); -var Uno; -(function (Uno) { - var Storage; - (function (Storage) { - class NativeStorageItem { - static addItem(guid, item) { - NativeStorageItem._guidToItemMap.set(guid, item); - NativeStorageItem._itemToGuidMap.set(item, guid); - } - static removeItem(guid) { - const handle = NativeStorageItem._guidToItemMap.get(guid); - NativeStorageItem._guidToItemMap.delete(guid); - NativeStorageItem._itemToGuidMap.delete(handle); - } - static getItem(guid) { - return NativeStorageItem._guidToItemMap.get(guid); - } - static async getFile(guid) { - const item = NativeStorageItem.getItem(guid); - if (item instanceof File) { - return item; - } - if (item instanceof FileSystemFileHandle) { - return await item.getFile(); - } - if (item instanceof FileSystemDirectoryHandle) { - throw new Error("Item " + guid + " is a directory handle. You cannot use it as a File!"); - } - throw new Error("Item " + guid + " is of an unknown type. You cannot use it as a File!"); - } - static getGuid(item) { - return NativeStorageItem._itemToGuidMap.get(item); - } - static getInfos(...items) { - const itemsWithoutGuids = []; - for (const item of items) { - const guid = NativeStorageItem.getGuid(item); - if (!guid) { - itemsWithoutGuids.push(item); - } - } - NativeStorageItem.storeItems(itemsWithoutGuids); - const results = []; - for (const item of items) { - const guid = NativeStorageItem.getGuid(item); - const info = new Storage.NativeStorageItemInfo(); - info.id = guid; - info.name = item.name; - info.isFile = item instanceof File || item.kind === "file"; - results.push(info); - } - return results; - } - static storeItems(handles) { - const missingGuids = NativeStorageItem.generateGuids(handles.length); - for (let i = 0; i < handles.length; i++) { - NativeStorageItem.addItem(missingGuids[i], handles[i]); - } - } - static generateGuids(count) { - if (!NativeStorageItem.generateGuidBinding) { - NativeStorageItem.generateGuidBinding = Module.mono_bind_static_method("[Uno] Uno.Storage.NativeStorageItem:GenerateGuids"); - } - const guids = NativeStorageItem.generateGuidBinding(count); - return guids.split(";"); - } - } - NativeStorageItem._guidToItemMap = new Map(); - NativeStorageItem._itemToGuidMap = new Map(); - Storage.NativeStorageItem = NativeStorageItem; - })(Storage = Uno.Storage || (Uno.Storage = {})); -})(Uno || (Uno = {})); -var Uno; -(function (Uno) { - var Storage; - (function (Storage) { - class NativeStorageItemInfo { - } - Storage.NativeStorageItemInfo = NativeStorageItemInfo; - })(Storage = Uno.Storage || (Uno.Storage = {})); -})(Uno || (Uno = {})); -// eslint-disable-next-line @typescript-eslint/no-namespace -var Windows; -(function (Windows) { - var Storage; - (function (Storage) { - class StorageFolder { - /** - * Determine if IndexDB is available, some browsers and modes disable it. - * */ - static isIndexDBAvailable() { - try { - // IndexedDB may not be available in private mode - window.indexedDB; - return true; - } - catch (err) { - return false; - } - } - /** - * Setup the storage persistence of a given set of paths. - * */ - static makePersistent(pParams) { - const params = Storage.StorageFolderMakePersistentParams.unmarshal(pParams); - for (var i = 0; i < params.Paths.length; i++) { - this.setupStorage(params.Paths[i]); - } - // Ensure to sync pseudo file system on unload (and periodically for safety) - if (!this._isInitialized) { - // Request an initial sync to populate the file system - StorageFolder.synchronizeFileSystem(true, () => StorageFolder.onStorageInitialized()); - window.addEventListener("beforeunload", () => this.synchronizeFileSystem(false)); - setInterval(() => this.synchronizeFileSystem(false), 10000); - this._isInitialized = true; - } - } - /** - * Setup the storage persistence of a given path. - * */ - static setupStorage(path) { - if (Uno.UI.WindowManager.isHosted) { - console.debug("Hosted Mode: skipping IndexDB initialization"); - StorageFolder.onStorageInitialized(); - return; - } - if (!this.isIndexDBAvailable()) { - console.warn("IndexedDB is not available (private mode or uri starts with file:// ?), changes will not be persisted."); - StorageFolder.onStorageInitialized(); - return; - } - if (typeof IDBFS === 'undefined') { - console.warn(`IDBFS is not enabled in mono's configuration, persistence is disabled`); - StorageFolder.onStorageInitialized(); - return; - } - console.debug("Making persistent: " + path); - FS.mkdir(path); - FS.mount(IDBFS, {}, path); - } - static onStorageInitialized() { - if (!StorageFolder.dispatchStorageInitialized) { - StorageFolder.dispatchStorageInitialized = - Module.mono_bind_static_method("[Uno] Windows.Storage.StorageFolder:DispatchStorageInitialized"); - } - StorageFolder.dispatchStorageInitialized(); - } - /** - * Synchronize the IDBFS memory cache back to IndexedDB - * populate: requests the filesystem to be popuplated from the IndexedDB - * onSynchronized: function invoked when the synchronization finished - * */ - static synchronizeFileSystem(populate, onSynchronized = null) { - if (!StorageFolder._isSynchronizing) { - StorageFolder._isSynchronizing = true; - FS.syncfs(populate, err => { - StorageFolder._isSynchronizing = false; - if (onSynchronized) { - onSynchronized(); - } - if (err) { - console.error(`Error synchronizing filesystem from IndexDB: ${err} (errno: ${err.errno})`); - } - }); - } - } - } - StorageFolder._isInitialized = false; - StorageFolder._isSynchronizing = false; - Storage.StorageFolder = StorageFolder; - })(Storage = Windows.Storage || (Windows.Storage = {})); -})(Windows || (Windows = {})); -var Windows; -(function (Windows) { - var Storage; - (function (Storage) { - var Pickers; - (function (Pickers) { - class FileOpenPicker { - static isNativeSupported() { - return typeof showOpenFilePicker === "function"; - } - static async nativePickFilesAsync(multiple, showAllEntry, fileTypesJson, id, startIn) { - if (!FileOpenPicker.isNativeSupported()) { - return JSON.stringify([]); - } - const options = { - excludeAcceptAllOption: !showAllEntry, - id: id, - multiple: multiple, - startIn: startIn, - types: [], - }; - const acceptTypes = JSON.parse(fileTypesJson); - for (const acceptType of acceptTypes) { - const pickerAcceptType = { - accept: {}, - description: acceptType.description, - }; - for (const acceptTypeItem of acceptType.accept) { - pickerAcceptType.accept[acceptTypeItem.mimeType] = acceptTypeItem.extensions; - } - options.types.push(pickerAcceptType); - } - try { - const selectedFiles = await showOpenFilePicker(options); - const infos = Uno.Storage.NativeStorageItem.getInfos(...selectedFiles); - const json = JSON.stringify(infos); - return json; - } - catch (e) { - console.log("User did not make a selection or the file selected was" + - "deemed too sensitive or dangerous to be exposed to the website - " + e); - return JSON.stringify([]); - } - } - static uploadPickFilesAsync(multiple, targetPath, accept) { - return new Promise((resolve, reject) => { - const inputElement = document.createElement("input"); - inputElement.type = "file"; - inputElement.multiple = multiple; - inputElement.accept = accept; - inputElement.onchange = async (e) => { - const existingFileNames = new Set(); - var adjustedTargetPath = targetPath; - if (!adjustedTargetPath.endsWith('/')) { - adjustedTargetPath += '/'; - } - var duplicateFileId = 0; - for (const file of inputElement.files) { - const fileBuffer = await file.arrayBuffer(); - const fileBufferView = new Uint8Array(fileBuffer); - var targetFileName = ""; - if (!existingFileNames.has(file.name)) { - targetFileName = adjustedTargetPath + file.name; - existingFileNames.add(file.name); - } - else { - targetFileName = adjustedTargetPath + duplicateFileId + "_" + file.name; - duplicateFileId++; - } - FS.writeFile(targetFileName, fileBufferView); - } - resolve(inputElement.files.length.toString()); - }; - inputElement.click(); - }); - } - } - Pickers.FileOpenPicker = FileOpenPicker; - })(Pickers = Storage.Pickers || (Storage.Pickers = {})); - })(Storage = Windows.Storage || (Windows.Storage = {})); -})(Windows || (Windows = {})); -var Windows; -(function (Windows) { - var Storage; - (function (Storage) { - var Pickers; - (function (Pickers) { - class FileSavePicker { - static isNativeSupported() { - return typeof showSaveFilePicker === "function"; - } - static async nativePickSaveFileAsync(showAllEntry, fileTypesJson, suggestedFileName, id, startIn) { - if (!FileSavePicker.isNativeSupported()) { - return null; - } - const options = { - excludeAcceptAllOption: !showAllEntry, - id: id, - startIn: startIn, - types: [], - }; - if (suggestedFileName != "") { - options.suggestedName = suggestedFileName; - } - const acceptTypes = JSON.parse(fileTypesJson); - for (const acceptType of acceptTypes) { - const pickerAcceptType = { - accept: {}, - description: acceptType.description, - }; - for (const acceptTypeItem of acceptType.accept) { - pickerAcceptType.accept[acceptTypeItem.mimeType] = acceptTypeItem.extensions; - } - options.types.push(pickerAcceptType); - } - try { - const selectedFile = await showSaveFilePicker(options); - const info = Uno.Storage.NativeStorageItem.getInfos(selectedFile)[0]; - const json = JSON.stringify(info); - return json; - } - catch (e) { - console.log("User did not make a selection or the file selected was" + - "deemed too sensitive or dangerous to be exposed to the website - " + e); - return null; - } - } - static SaveAs(fileName, dataPtr, size) { - const buffer = new Uint8Array(size); - for (var i = 0; i < size; i++) { - buffer[i] = Module.getValue(dataPtr + i, "i8"); - } - const a = window.document.createElement('a'); - const blob = new Blob([buffer]); - a.href = window.URL.createObjectURL(blob); - a.download = fileName; - document.body.appendChild(a); - a.click(); - document.body.removeChild(a); - } - } - Pickers.FileSavePicker = FileSavePicker; - })(Pickers = Storage.Pickers || (Storage.Pickers = {})); - })(Storage = Windows.Storage || (Windows.Storage = {})); -})(Windows || (Windows = {})); -var Windows; -(function (Windows) { - var Storage; - (function (Storage) { - var Pickers; - (function (Pickers) { - class FolderPicker { - static isNativeSupported() { - return typeof showDirectoryPicker === "function"; - } - static async pickSingleFolderAsync(id, startIn) { - if (!FolderPicker.isNativeSupported()) { - return null; - } - try { - const options = { - id: id, - startIn: startIn, - }; - const selectedFolder = await showDirectoryPicker(options); - const info = Uno.Storage.NativeStorageItem.getInfos(selectedFolder)[0]; - return JSON.stringify(info); - } - catch (e) { - console.log("The user dismissed the prompt without making a selection, " + - "or the user agent deems the selected content to be too sensitive or dangerous - " + e); - return null; - } - } - } - Pickers.FolderPicker = FolderPicker; - })(Pickers = Storage.Pickers || (Storage.Pickers = {})); - })(Storage = Windows.Storage || (Windows.Storage = {})); -})(Windows || (Windows = {})); -var Uno; -(function (Uno) { - var Storage; - (function (Storage) { - var Pickers; - (function (Pickers) { - class NativeFilePickerAcceptType { - } - Pickers.NativeFilePickerAcceptType = NativeFilePickerAcceptType; - })(Pickers = Storage.Pickers || (Storage.Pickers = {})); - })(Storage = Uno.Storage || (Uno.Storage = {})); -})(Uno || (Uno = {})); -var Uno; -(function (Uno) { - var Storage; - (function (Storage) { - var Pickers; - (function (Pickers) { - class NativeFilePickerAcceptTypeItem { - } - Pickers.NativeFilePickerAcceptTypeItem = NativeFilePickerAcceptTypeItem; - })(Pickers = Storage.Pickers || (Storage.Pickers = {})); - })(Storage = Uno.Storage || (Uno.Storage = {})); -})(Uno || (Uno = {})); -var Uno; -(function (Uno) { - var Storage; - (function (Storage) { - var Streams; - (function (Streams) { - class NativeFileReadStream { - constructor(file) { - this._file = file; - } - static async openAsync(streamId, fileId) { - const file = await Storage.NativeStorageItem.getFile(fileId); - const fileSize = file.size; - const stream = new NativeFileReadStream(file); - NativeFileReadStream._streamMap.set(streamId, stream); - return fileSize.toString(); - } - static async readAsync(streamId, targetArrayPointer, offset, count, position) { - var streamReader; - var readerNeedsRelease = true; - try { - const instance = NativeFileReadStream._streamMap.get(streamId); - var totalRead = 0; - var stream = await instance._file.slice(position, position + count).stream(); - streamReader = stream.getReader(); - var chunk = await streamReader.read(); - while (!chunk.done && chunk.value) { - for (var i = 0; i < chunk.value.length; i++) { - Module.HEAPU8[targetArrayPointer + offset + totalRead + i] = chunk.value[i]; - } - totalRead += chunk.value.length; - chunk = await streamReader.read(); - } - // If this is the end of stream, it closed itself - readerNeedsRelease = !chunk.done; - return totalRead.toString(); - } - finally { - // Reader must be released only if the underlying stream has not already closed it. - // Otherwise the release operation sets a new Promise.reject as reader.closed which - // raises silent but observable exception in Chromium-based browsers. - if (streamReader && readerNeedsRelease) { - // Silently handling TypeError exceptions on closed event as the releaseLock() - // raises one in case of a successful close. - streamReader.closed.catch(reason => { - if (!(reason instanceof TypeError)) { - throw reason; - } - }); - streamReader.cancel(); - streamReader.releaseLock(); - } - } - } - static close(streamId) { - NativeFileReadStream._streamMap.delete(streamId); - } - } - NativeFileReadStream._streamMap = new Map(); - Streams.NativeFileReadStream = NativeFileReadStream; - })(Streams = Storage.Streams || (Storage.Streams = {})); - })(Storage = Uno.Storage || (Uno.Storage = {})); -})(Uno || (Uno = {})); -var Uno; -(function (Uno) { - var Storage; - (function (Storage) { - var Streams; - (function (Streams) { - class NativeFileWriteStream { - constructor(stream) { - this._stream = stream; - } - static async openAsync(streamId, fileId) { - const item = Storage.NativeStorageItem.getItem(fileId); - if (item instanceof File) { - return "PermissionNotGranted"; - } - const handle = item; - if (!await NativeFileWriteStream.verifyPermissionAsync(handle)) { - return "PermissionNotGranted"; - } - const writableStream = await handle.createWritable({ keepExistingData: true }); - const fileSize = (await handle.getFile()).size; - const stream = new NativeFileWriteStream(writableStream); - NativeFileWriteStream._streamMap.set(streamId, stream); - return fileSize.toString(); - } - static async verifyPermissionAsync(fileHandle) { - const options = {}; - options.mode = "readwrite"; - // Check if permission was already granted. If so, return true. - if ((await fileHandle.queryPermission(options)) === 'granted') { - return true; - } - // Request permission. If the user grants permission, return true. - if ((await fileHandle.requestPermission(options)) === 'granted') { - return true; - } - // The user didn't grant permission, so return false. - return false; - } - static async writeAsync(streamId, dataArrayPointer, offset, count, position) { - const instance = NativeFileWriteStream._streamMap.get(streamId); - if (!instance._buffer || instance._buffer.length < count) { - instance._buffer = new Uint8Array(count); - } - var clampedArray = new Uint8Array(count); - for (var i = 0; i < count; i++) { - clampedArray[i] = Module.HEAPU8[dataArrayPointer + i + offset]; - } - await instance._stream.write({ - type: 'write', - data: clampedArray.subarray(0, count).buffer, - position: position - }); - return ""; - } - static async closeAsync(streamId) { - var instance = NativeFileWriteStream._streamMap.get(streamId); - if (instance) { - await instance._stream.close(); - NativeFileWriteStream._streamMap.delete(streamId); - } - return ""; - } - static async truncateAsync(streamId, length) { - var instance = NativeFileWriteStream._streamMap.get(streamId); - await instance._stream.truncate(length); - return ""; - } - } - NativeFileWriteStream._streamMap = new Map(); - Streams.NativeFileWriteStream = NativeFileWriteStream; - })(Streams = Storage.Streams || (Storage.Streams = {})); - })(Storage = Uno.Storage || (Uno.Storage = {})); -})(Uno || (Uno = {})); -var Windows; -(function (Windows) { - var System; - (function (System) { - class MemoryManager { - static getAppMemoryUsage() { - if (typeof Module === "object") { - // Returns an approximate memory usage for the current wasm module. - // Initial buffer size is determine by the initial wasm memory defined in - // emscripten. - return Module.HEAPU8.length; - } - return 0; - } - } - System.MemoryManager = MemoryManager; - })(System = Windows.System || (Windows.System = {})); -})(Windows || (Windows = {})); -var WakeLockType; -(function (WakeLockType) { - WakeLockType["screen"] = "screen"; -})(WakeLockType || (WakeLockType = {})); -; -; -; -var Windows; -(function (Windows) { - var System; - (function (System) { - var Display; - (function (Display) { - class DisplayRequest { - static activateScreenLock() { - if (navigator.wakeLock) { - DisplayRequest.activeScreenLockPromise = navigator.wakeLock.request(WakeLockType.screen); - DisplayRequest.activeScreenLockPromise.catch(reason => console.log("Could not acquire screen lock (" + reason + ")")); - } - else { - console.log("Wake Lock API is not available in this browser."); - } - } - static deactivateScreenLock() { - if (DisplayRequest.activeScreenLockPromise) { - DisplayRequest.activeScreenLockPromise.then(sentinel => sentinel.release()); - DisplayRequest.activeScreenLockPromise = null; - } - } - } - Display.DisplayRequest = DisplayRequest; - })(Display = System.Display || (System.Display = {})); - })(System = Windows.System || (Windows.System = {})); -})(Windows || (Windows = {})); -var Windows; -(function (Windows) { - var System; - (function (System) { - var Profile; - (function (Profile) { - class AnalyticsInfo { - static getDeviceType() { - // Logic based on https://github.com/barisaydinoglu/Detectizr - var ua = navigator.userAgent; - if (!ua || ua === '') { - // No user agent. - return "unknown"; - } - if (ua.match(/GoogleTV|SmartTV|SMART-TV|Internet TV|NetCast|NETTV|AppleTV|boxee|Kylo|Roku|DLNADOC|hbbtv|CrKey|CE\-HTML/i)) { - // if user agent is a smart TV - http://goo.gl/FocDk - return "Television"; - } - else if (ua.match(/Xbox|PLAYSTATION|Wii/i)) { - // if user agent is a TV Based Gaming Console - return "GameConsole"; - } - else if (ua.match(/QtCarBrowser/i)) { - // if the user agent is a car - return "Car"; - } - else if (ua.match(/iP(a|ro)d/i) || (ua.match(/tablet/i) && !ua.match(/RX-34/i)) || ua.match(/FOLIO/i)) { - // if user agent is a Tablet - return "Tablet"; - } - else if (ua.match(/Linux/i) && ua.match(/Android/i) && !ua.match(/Fennec|mobi|HTC Magic|HTCX06HT|Nexus One|SC-02B|fone 945/i)) { - // if user agent is an Android Tablet - return "Tablet"; - } - else if (ua.match(/Kindle/i) || (ua.match(/Mac OS/i) && ua.match(/Silk/i)) || (ua.match(/AppleWebKit/i) && ua.match(/Silk/i) && !ua.match(/Playstation Vita/i))) { - // if user agent is a Kindle or Kindle Fire - return "Tablet"; - } - else if (ua.match(/GT-P10|SC-01C|SHW-M180S|SGH-T849|SCH-I800|SHW-M180L|SPH-P100|SGH-I987|zt180|HTC( Flyer|_Flyer)|Sprint ATP51|ViewPad7|pandigital(sprnova|nova)|Ideos S7|Dell Streak 7|Advent Vega|A101IT|A70BHT|MID7015|Next2|nook/i) || (ua.match(/MB511/i) && ua.match(/RUTEM/i))) { - // if user agent is a pre Android 3.0 Tablet - return "Tablet"; - } - else if (ua.match(/BOLT|Fennec|Iris|Maemo|Minimo|Mobi|mowser|NetFront|Novarra|Prism|RX-34|Skyfire|Tear|XV6875|XV6975|Google Wireless Transcoder/i) && !ua.match(/AdsBot-Google-Mobile/i)) { - // if user agent is unique phone User Agent - return "Mobile"; - } - else if (ua.match(/Opera/i) && ua.match(/Windows NT 5/i) && ua.match(/HTC|Xda|Mini|Vario|SAMSUNG\-GT\-i8000|SAMSUNG\-SGH\-i9/i)) { - // if user agent is an odd Opera User Agent - http://goo.gl/nK90K - return "Mobile"; - } - else if ((ua.match(/Windows( )?(NT|XP|ME|9)/) && !ua.match(/Phone/i)) && !ua.match(/Bot|Spider|ia_archiver|NewsGator/i) || ua.match(/Win( ?9|NT)/i) || ua.match(/Go-http-client/i)) { - // if user agent is Windows Desktop - return "Desktop"; - } - else if (ua.match(/Macintosh|PowerPC/i) && !ua.match(/Silk|moatbot/i)) { - // if agent is Mac Desktop - return "Desktop"; - } - else if (ua.match(/Linux/i) && ua.match(/X11/i) && !ua.match(/Charlotte|JobBot/i)) { - // if user agent is a Linux Desktop - return "Desktop"; - } - else if (ua.match(/CrOS/)) { - // if user agent is a Chrome Book - return "Desktop"; - } - else if (ua.match(/Solaris|SunOS|BSD/i)) { - // if user agent is a Solaris, SunOS, BSD Desktop - return "Desktop"; - } - else { - // Otherwise returning the unknown type configured - return "Unknown"; - } - } - } - Profile.AnalyticsInfo = AnalyticsInfo; - })(Profile = System.Profile || (System.Profile = {})); - })(System = Windows.System || (Windows.System = {})); -})(Windows || (Windows = {})); -var Windows; -(function (Windows) { - var System; - (function (System) { - var Profile; - (function (Profile) { - class AnalyticsVersionInfo { - static getUserAgent() { - return navigator.userAgent; - } - static getBrowserName() { - // Opera 8.0+ - if ((!!window.opr && !!window.opr.addons) || !!window.opera || navigator.userAgent.indexOf(' OPR/') >= 0) { - return "Opera"; - } - // Firefox 1.0+ - if (typeof window.InstallTrigger !== 'undefined') { - return "Firefox"; - } - // Safari 3.0+ "[object HTMLElementConstructor]" - if (/constructor/i.test(window.HTMLElement) || - ((p) => p.toString() === "[object SafariRemoteNotification]")(typeof window.safari !== 'undefined' && window.safari.pushNotification)) { - return "Safari"; - } - // Edge 20+ - if (!!window.StyleMedia) { - return "Edge"; - } - // Chrome 1 - 71 - if (!!window.chrome && (!!window.chrome.webstore || !!window.chrome.runtime)) { - return "Chrome"; - } - } - } - Profile.AnalyticsVersionInfo = AnalyticsVersionInfo; - })(Profile = System.Profile || (System.Profile = {})); - })(System = Windows.System || (Windows.System = {})); -})(Windows || (Windows = {})); -var Windows; -(function (Windows) { - var UI; - (function (UI) { - var Core; - (function (Core) { - class SystemNavigationManager { - constructor() { - var that = this; - var dispatchBackRequest = Module.mono_bind_static_method("[Uno] Windows.UI.Core.SystemNavigationManager:DispatchBackRequest"); - window.history.replaceState(0, document.title, null); - window.addEventListener("popstate", function (evt) { - if (that._isEnabled) { - if (evt.state === 0) { - // Push something in the stack only if we know that we reached the first page. - // There is no way to track our location in the stack, so we use indexes (in the 'state'). - window.history.pushState(1, document.title, null); - } - dispatchBackRequest(); - } - else if (evt.state === 1) { - // The manager is disabled, but the user requested to navigate forward to our dummy entry, - // but we prefer to keep this dummy entry in the forward stack (is more prompt to be cleared by the browser, - // and as it's less commonly used it should be less annoying for the user) - window.history.back(); - } - }); - } - static get current() { - if (!this._current) { - this._current = new SystemNavigationManager(); - } - return this._current; - } - enable() { - if (this._isEnabled) { - return; - } - // Clear the back stack, so the only items will be ours (and we won't have any remaining forward item) - this.clearStack(); - window.history.pushState(1, document.title, null); - // Then set the enabled flag so the handler will begin its work - this._isEnabled = true; - } - disable() { - if (!this._isEnabled) { - return; - } - // Disable the handler, then clear the history - // Note: As a side effect, the forward button will be enabled :( - this._isEnabled = false; - this.clearStack(); - } - clearStack() { - // There is no way to determine our position in the stack, so we only navigate back if we determine that - // we are currently on our dummy target page. - if (window.history.state === 1) { - window.history.back(); - } - window.history.replaceState(0, document.title, null); - } - } - Core.SystemNavigationManager = SystemNavigationManager; - })(Core = UI.Core || (UI.Core = {})); - })(UI = Windows.UI || (Windows.UI = {})); -})(Windows || (Windows = {})); -var Windows; -(function (Windows) { - var UI; - (function (UI) { - var Notifications; - (function (Notifications) { - class BadgeUpdater { - static setNumber(value) { - if (navigator.setAppBadge) { - navigator.setAppBadge(value); - } - } - static clear() { - if (navigator.clearAppBadge) { - navigator.clearAppBadge(); - } - } - } - Notifications.BadgeUpdater = BadgeUpdater; - })(Notifications = UI.Notifications || (UI.Notifications = {})); - })(UI = Windows.UI || (Windows.UI = {})); -})(Windows || (Windows = {})); -var Windows; -(function (Windows) { - var UI; - (function (UI) { - var ViewManagement; - (function (ViewManagement) { - class ApplicationView { - static setFullScreenMode(turnOn) { - if (turnOn) { - if (document.fullscreenEnabled) { - document.documentElement.requestFullscreen(); - return true; - } - else { - return false; - } - } - else { - document.exitFullscreen(); - return true; - } - } - } - ViewManagement.ApplicationView = ApplicationView; - })(ViewManagement = UI.ViewManagement || (UI.ViewManagement = {})); - })(UI = Windows.UI || (Windows.UI = {})); -})(Windows || (Windows = {})); -var Windows; -(function (Windows) { - var UI; - (function (UI) { - var ViewManagement; - (function (ViewManagement) { - class ApplicationViewTitleBar { - static setBackgroundColor(colorString) { - if (colorString == null) { - //remove theme-color meta - var metaThemeColorEntries = document.querySelectorAll("meta[name='theme-color']"); - for (let entry of metaThemeColorEntries) { - entry.remove(); - } - } - else { - var metaThemeColorEntries = document.querySelectorAll("meta[name='theme-color']"); - var metaThemeColor; - if (metaThemeColorEntries.length == 0) { - //create meta - metaThemeColor = document.createElement("meta"); - metaThemeColor.setAttribute("name", "theme-color"); - document.head.appendChild(metaThemeColor); - } - else { - metaThemeColor = metaThemeColorEntries[0]; - } - metaThemeColor.setAttribute("content", colorString); - } - } - } - ViewManagement.ApplicationViewTitleBar = ApplicationViewTitleBar; - })(ViewManagement = UI.ViewManagement || (UI.ViewManagement = {})); - })(UI = Windows.UI || (Windows.UI = {})); -})(Windows || (Windows = {})); -var Windows; -(function (Windows) { - var UI; - (function (UI) { - var Xaml; - (function (Xaml) { - class Application { - static getDefaultSystemTheme() { - if (window.matchMedia) { - if (window.matchMedia("(prefers-color-scheme: dark)").matches) { - return Xaml.ApplicationTheme.Dark; - } - if (window.matchMedia("(prefers-color-scheme: light)").matches) { - return Xaml.ApplicationTheme.Light; - } - } - return null; - } - static observeSystemTheme() { - if (!Application.dispatchThemeChange) { - Application.dispatchThemeChange = Module.mono_bind_static_method("[Uno.UI] Windows.UI.Xaml.Application:DispatchSystemThemeChange"); - } - if (window.matchMedia) { - window.matchMedia('(prefers-color-scheme: dark)').addEventListener("change", () => { - Application.dispatchThemeChange(); - }); - } - } - static observeVisibility() { - if (!Application.dispatchVisibilityChange) { - Application.dispatchVisibilityChange = Module.mono_bind_static_method("[Uno.UI] Windows.UI.Xaml.Application:DispatchVisibilityChange"); - } - if (document.onvisibilitychange !== undefined) { - document.addEventListener("visibilitychange", () => { - Application.dispatchVisibilityChange(document.visibilityState == "visible"); - }); - } - if (window.onpagehide !== undefined) { - window.addEventListener("pagehide", () => { - Application.dispatchVisibilityChange(false); - }); - } - if (window.onpageshow !== undefined) { - window.addEventListener("pageshow", () => { - Application.dispatchVisibilityChange(true); - }); - } - } - } - Xaml.Application = Application; - })(Xaml = UI.Xaml || (UI.Xaml = {})); - })(UI = Windows.UI || (Windows.UI = {})); -})(Windows || (Windows = {})); -var Windows; -(function (Windows) { - var UI; - (function (UI) { - var Xaml; - (function (Xaml) { - let ApplicationTheme; - (function (ApplicationTheme) { - ApplicationTheme["Light"] = "Light"; - ApplicationTheme["Dark"] = "Dark"; - })(ApplicationTheme = Xaml.ApplicationTheme || (Xaml.ApplicationTheme = {})); - })(Xaml = UI.Xaml || (UI.Xaml = {})); - })(UI = Windows.UI || (Windows.UI = {})); -})(Windows || (Windows = {})); -var Windows; -(function (Windows) { - var UI; - (function (UI) { - var Xaml; - (function (Xaml) { - var WindowManager = Uno.UI.WindowManager; - var HtmlEventDispatchResult = Uno.UI.HtmlEventDispatchResult; - var PointerDeviceType = Windows.Devices.Input.PointerDeviceType; - let NativePointerEvent; - (function (NativePointerEvent) { - NativePointerEvent[NativePointerEvent["pointerover"] = 1] = "pointerover"; - NativePointerEvent[NativePointerEvent["pointerout"] = 2] = "pointerout"; - NativePointerEvent[NativePointerEvent["pointerdown"] = 4] = "pointerdown"; - NativePointerEvent[NativePointerEvent["pointerup"] = 8] = "pointerup"; - NativePointerEvent[NativePointerEvent["pointercancel"] = 16] = "pointercancel"; - // Optional pointer events - NativePointerEvent[NativePointerEvent["pointermove"] = 32] = "pointermove"; - NativePointerEvent[NativePointerEvent["wheel"] = 64] = "wheel"; - })(NativePointerEvent = Xaml.NativePointerEvent || (Xaml.NativePointerEvent = {})); - class UIElement_Pointers { - static setPointerEventArgs(pArgs) { - if (!Xaml.UIElement._dispatchPointerEventMethod) { - Xaml.UIElement._dispatchPointerEventMethod = Module.mono_bind_static_method("[Uno.UI] Windows.UI.Xaml.UIElement:OnNativePointerEvent"); - } - Xaml.UIElement._dispatchPointerEventArgs = pArgs; - } - static setPointerEventResult(pArgs) { - if (!Xaml.UIElement._dispatchPointerEventMethod) { - Xaml.UIElement._dispatchPointerEventMethod = Module.mono_bind_static_method("[Uno.UI] Windows.UI.Xaml.UIElement:OnNativePointerEvent"); - } - Xaml.UIElement._dispatchPointerEventResult = pArgs; - } - static subscribePointerEvents(pParams) { - const params = Windows.UI.Xaml.NativePointerSubscriptionParams.unmarshal(pParams); - const element = WindowManager.current.getView(params.HtmlId); - if (params.Events & NativePointerEvent.pointerover) { - element.addEventListener("pointerover", Xaml.UIElement.onPointerEventReceived); - } - if (params.Events & NativePointerEvent.pointerout) { - element.addEventListener("pointerout", Xaml.UIElement.onPointerOutReceived); - } - if (params.Events & NativePointerEvent.pointerdown) { - element.addEventListener("pointerdown", Xaml.UIElement.onPointerEventReceived); - } - if (params.Events & NativePointerEvent.pointerup) { - element.addEventListener("pointerup", Xaml.UIElement.onPointerEventReceived); - } - if (params.Events & NativePointerEvent.pointercancel) { - element.addEventListener("pointercancel", Xaml.UIElement.onPointerEventReceived); - } - if (params.Events & NativePointerEvent.pointermove) { - element.addEventListener("pointermove", Xaml.UIElement.onPointerEventReceived); - } - if (params.Events & NativePointerEvent.wheel) { - element.addEventListener("wheel", Xaml.UIElement.onPointerEventReceived); - } - } - static unSubscribePointerEvents(pParams) { - const params = Windows.UI.Xaml.NativePointerSubscriptionParams.unmarshal(pParams); - const element = WindowManager.current.getView(params.HtmlId); - if (!element) { - return; - } - if (params.Events & NativePointerEvent.pointerover) { - element.removeEventListener("pointerover", Xaml.UIElement.onPointerEventReceived); - } - if (params.Events & NativePointerEvent.pointerout) { - element.removeEventListener("pointerout", Xaml.UIElement.onPointerOutReceived); - } - if (params.Events & NativePointerEvent.pointerdown) { - element.removeEventListener("pointerdown", Xaml.UIElement.onPointerEventReceived); - } - if (params.Events & NativePointerEvent.pointerup) { - element.removeEventListener("pointerup", Xaml.UIElement.onPointerEventReceived); - } - if (params.Events & NativePointerEvent.pointercancel) { - element.removeEventListener("pointercancel", Xaml.UIElement.onPointerEventReceived); - } - if (params.Events & NativePointerEvent.pointermove) { - element.removeEventListener("pointermove", Xaml.UIElement.onPointerEventReceived); - } - if (params.Events & NativePointerEvent.wheel) { - element.removeEventListener("wheel", Xaml.UIElement.onPointerEventReceived); - } - } - static onPointerEventReceived(evt) { - Xaml.UIElement.dispatchPointerEvent(evt.currentTarget, evt); - } - static onPointerOutReceived(evt) { - const element = evt.currentTarget; - if (evt.relatedTarget && evt.isDirectlyOver(element)) { - // The 'pointerout' event is bubbling so we get the event when the pointer is going out of a nested element, - // but pointer is still over the current element. - // So here we check if the event is effectively because the pointer is leaving the bounds of the current element. - // If not, we stopPropagation so parent won't have to check it again and again. - // Note: We don't have to do that for the "enter" as we anyway maintain the IsOver state in managed. - // Note: If relatedTarget is null it means that pointer is no longer on the app at all - // (alt + tab for mouse, finger removed from screen, pen out of detection range) - // If so, we have to forward the exit in all cases. - evt.stopPropagation(); - return; - } - Xaml.UIElement.onPointerEventReceived(evt); - } - static dispatchPointerEvent(element, evt) { - if (!evt) { - return; - } - const args = Xaml.UIElement.toNativePointerEventArgs(evt); - args.HtmlId = Number(element.getAttribute("XamlHandle")); - args.marshal(Xaml.UIElement._dispatchPointerEventArgs); - Xaml.UIElement._dispatchPointerEventMethod(); - const response = Windows.UI.Xaml.NativePointerEventResult.unmarshal(Xaml.UIElement._dispatchPointerEventResult); - if (response.Result & HtmlEventDispatchResult.StopPropagation) { - evt.stopPropagation(); - } - if (response.Result & HtmlEventDispatchResult.PreventDefault) { - evt.preventDefault(); - } - } - static get wheelLineSize() { - // In web browsers, scroll might happen by pixels, line or page. - // But WinUI works only with pixels, so we have to convert it before send the value to the managed code. - // The issue is that there is no easy way get the "size of a line", instead we have to determine the CSS "line-height" - // defined in the browser settings. - // https://stackoverflow.com/questions/20110224/what-is-the-height-of-a-line-in-a-wheel-event-deltamode-dom-delta-line - if (this._wheelLineSize == undefined) { - const el = document.createElement("div"); - el.style.fontSize = "initial"; - el.style.display = "none"; - document.body.appendChild(el); - const fontSize = window.getComputedStyle(el).fontSize; - document.body.removeChild(el); - this._wheelLineSize = fontSize ? parseInt(fontSize) : 16; /* 16 = The current common default font size */ - // Based on observations, even if the event reports 3 lines (the settings of windows), - // the browser will actually scroll of about 6 lines of text. - this._wheelLineSize *= 2.0; - } - return this._wheelLineSize; - } - //#endregion - //#region Helpers - static toNativePointerEventArgs(evt) { - let src = evt.target; - if (src instanceof SVGElement) { - // The XAML SvgElement are UIElement in Uno (so they have a XamlHandle), - // but as on WinUI they are not part of the visual tree, they should not be used as OriginalElement. - // Instead we should use the actual parent which is the XAML Shape. - const shape = src.ownerSVGElement; - if (shape) { - src = shape; - } - } - else if (src instanceof HTMLImageElement) { - // Same as above for images ( == HtmlImage, we use the parent
which is the XAML Image). - src = src.parentElement; - } - let srcHandle = "0"; - while (src) { - const handle = src.getAttribute("XamlHandle"); - if (handle) { - srcHandle = handle; - break; - } - src = src.parentElement; - } - let pointerId, pointerType, pressure; - let wheelDeltaX, wheelDeltaY; - if (evt instanceof WheelEvent) { - pointerId = evt.mozInputSource ? 0 : 1; // Try to match the mouse pointer ID 0 for FF, 1 for others - pointerType = PointerDeviceType.Mouse; - pressure = 0.5; // like WinUI - wheelDeltaX = evt.deltaX; - wheelDeltaY = evt.deltaY; - switch (evt.deltaMode) { - case WheelEvent.DOM_DELTA_LINE: // Actually this is supported only by FF - const lineSize = Xaml.UIElement.wheelLineSize; - wheelDeltaX *= lineSize; - wheelDeltaY *= lineSize; - break; - case WheelEvent.DOM_DELTA_PAGE: - wheelDeltaX *= document.documentElement.clientWidth; - wheelDeltaY *= document.documentElement.clientHeight; - break; - } - } - else { - pointerId = evt.pointerId; - pointerType = Xaml.UIElement.toPointerDeviceType(evt.pointerType); - pressure = evt.pressure; - wheelDeltaX = 0; - wheelDeltaY = 0; - } - const args = new Windows.UI.Xaml.NativePointerEventArgs(); - args.Event = Xaml.UIElement.toNativeEvent(evt.type); - args.pointerId = pointerId; - args.x = evt.clientX; - args.y = evt.clientY; - args.ctrl = evt.ctrlKey; - args.shift = evt.shiftKey; - args.hasRelatedTarget = evt.relatedTarget !== null; - args.buttons = evt.buttons; - args.buttonUpdate = evt.button; - args.deviceType = pointerType; - args.srcHandle = Number(srcHandle); - args.timestamp = evt.timeStamp; - args.pressure = pressure; - args.wheelDeltaX = wheelDeltaX; - args.wheelDeltaY = wheelDeltaY; - return args; - } - static toNativeEvent(eventName) { - switch (eventName) { - case "pointerover": - return NativePointerEvent.pointerover; - case "pointerout": - return NativePointerEvent.pointerout; - case "pointerdown": - return NativePointerEvent.pointerdown; - case "pointerup": - return NativePointerEvent.pointerup; - case "pointercancel": - return NativePointerEvent.pointercancel; - case "pointermove": - return NativePointerEvent.pointermove; - case "wheel": - return NativePointerEvent.wheel; - default: - return undefined; - } - } - static toPointerDeviceType(type) { - switch (type) { - case "touch": - return PointerDeviceType.Touch; - case "pen": - // Note: As of 2019-11-28, once pen pressed events pressed/move/released are reported as TOUCH on Firefox - // https://bugzilla.mozilla.org/show_bug.cgi?id=1449660 - return PointerDeviceType.Pen; - case "mouse": - default: - return PointerDeviceType.Mouse; - } - } - } - //#region WheelLineSize - UIElement_Pointers._wheelLineSize = undefined; - Xaml.UIElement_Pointers = UIElement_Pointers; - })(Xaml = UI.Xaml || (UI.Xaml = {})); - })(UI = Windows.UI || (Windows.UI = {})); -})(Windows || (Windows = {})); -/// -var Windows; -(function (Windows) { - var UI; - (function (UI) { - var Xaml; - (function (Xaml) { - class UIElement extends Windows.UI.Xaml.UIElement_Pointers { - } - Xaml.UIElement = UIElement; - })(Xaml = UI.Xaml || (UI.Xaml = {})); - })(UI = Windows.UI || (Windows.UI = {})); -})(Windows || (Windows = {})); -var Windows; -(function (Windows) { - var UI; - (function (UI) { - var Xaml; - (function (Xaml) { - var Media; - (function (Media) { - var Animation; - (function (Animation) { - class RenderingLoopAnimator { - constructor(managedHandle) { - this.managedHandle = managedHandle; - this._isEnabled = false; - } - static createInstance(managedHandle, jsHandle) { - RenderingLoopAnimator.activeInstances[jsHandle] = new RenderingLoopAnimator(managedHandle); - } - static getInstance(jsHandle) { - return RenderingLoopAnimator.activeInstances[jsHandle]; - } - static destroyInstance(jsHandle) { - var instance = RenderingLoopAnimator.getInstance(jsHandle); - // If the JSObjectHandle is being disposed before the animator is stopped (GC collecting JSObjectHandle before the animator) - // we won't be able to DisableFrameReporting anymore. - if (instance) { - instance.DisableFrameReporting(); - } - delete RenderingLoopAnimator.activeInstances[jsHandle]; - } - SetStartFrameDelay(delay) { - this.unscheduleFrame(); - if (this._isEnabled) { - this.scheduleDelayedFrame(delay); - } - } - SetAnimationFramesInterval() { - this.unscheduleFrame(); - if (this._isEnabled) { - this.onFrame(); - } - } - EnableFrameReporting() { - if (this._isEnabled) { - return; - } - this._isEnabled = true; - this.scheduleAnimationFrame(); - } - DisableFrameReporting() { - this._isEnabled = false; - this.unscheduleFrame(); - } - onFrame() { - Uno.Foundation.Interop.ManagedObject.dispatch(this.managedHandle, "OnFrame", null); - // Schedule a new frame only if still enabled and no frame was scheduled by the managed OnFrame - if (this._isEnabled && this._frameRequestId == null && this._delayRequestId == null) { - this.scheduleAnimationFrame(); - } - } - unscheduleFrame() { - if (this._delayRequestId != null) { - clearTimeout(this._delayRequestId); - this._delayRequestId = null; - } - if (this._frameRequestId != null) { - window.cancelAnimationFrame(this._frameRequestId); - this._frameRequestId = null; - } - } - scheduleDelayedFrame(delay) { - this._delayRequestId = setTimeout(() => { - this._delayRequestId = null; - this.onFrame(); - }, delay); - } - scheduleAnimationFrame() { - this._frameRequestId = window.requestAnimationFrame(() => { - this._frameRequestId = null; - this.onFrame(); - }); - } - } - RenderingLoopAnimator.activeInstances = {}; - Animation.RenderingLoopAnimator = RenderingLoopAnimator; - })(Animation = Media.Animation || (Media.Animation = {})); - })(Media = Xaml.Media || (Xaml.Media = {})); - })(Xaml = UI.Xaml || (UI.Xaml = {})); - })(UI = Windows.UI || (Windows.UI = {})); -})(Windows || (Windows = {})); -var Windows; -(function (Windows) { - var UI; - (function (UI) { - var Xaml; - (function (Xaml) { - var Input; - (function (Input) { - class FocusVisual { - static attachVisual(focusVisualId, focusedElementId) { - FocusVisual.focusVisualId = focusVisualId; - FocusVisual.focusVisual = Uno.UI.WindowManager.current.getView(focusVisualId); - FocusVisual.focusedElement = Uno.UI.WindowManager.current.getView(focusedElementId); - document.addEventListener("scroll", FocusVisual.onDocumentScroll, true); - } - static detachVisual() { - document.removeEventListener("scroll", FocusVisual.onDocumentScroll, true); - FocusVisual.focusVisualId = null; - } - static onDocumentScroll() { - if (!FocusVisual.dispatchPositionChange) { - FocusVisual.dispatchPositionChange = Module.mono_bind_static_method("[Uno.UI] Uno.UI.Xaml.Controls.SystemFocusVisual:DispatchNativePositionChange"); - } - FocusVisual.updatePosition(); - // Throttle managed notification while actively scrolling - if (FocusVisual.currentDispatchTimeout) { - clearTimeout(FocusVisual.currentDispatchTimeout); - } - FocusVisual.currentDispatchTimeout = setTimeout(() => FocusVisual.dispatchPositionChange(FocusVisual.focusVisualId), 100); - } - static updatePosition() { - const focusVisual = FocusVisual.focusVisual; - const focusedElement = FocusVisual.focusedElement; - const boundingRect = focusedElement.getBoundingClientRect(); - const centerX = boundingRect.x + boundingRect.width / 2; - const centerY = boundingRect.y + boundingRect.height / 2; - focusVisual.style.setProperty("left", boundingRect.x + "px"); - focusVisual.style.setProperty("top", boundingRect.y + "px"); - } - } - Input.FocusVisual = FocusVisual; - })(Input = Xaml.Input || (Xaml.Input = {})); - })(Xaml = UI.Xaml || (UI.Xaml = {})); - })(UI = Windows.UI || (Windows.UI = {})); -})(Windows || (Windows = {})); -var Windows; -(function (Windows) { - var UI; - (function (UI) { - var Xaml; - (function (Xaml) { - var Media; - (function (Media) { - class FontFamily { - static async loadFont(fontFamilyName, fontSource) { - try { - // Launch the loading of the font - const font = new FontFace(fontFamilyName, `url(${fontSource})`); - // Wait for the font to be loaded - await font.load(); - // Make it available to document - document.fonts.add(font); - await FontFamily.forceFontUsage(fontFamilyName); - } - catch (e) { - console.debug(`Font failed to load ${e}`); - FontFamily.notifyFontLoadFailed(fontFamilyName); - } - } - static async forceFontUsage(fontFamilyName) { - // Force the browser to use it - const dummyHiddenElement = document.createElement("p"); - dummyHiddenElement.style.fontFamily = fontFamilyName; - dummyHiddenElement.style.opacity = "0"; - dummyHiddenElement.style.pointerEvents = "none"; - dummyHiddenElement.innerText = fontFamilyName; - document.body.appendChild(dummyHiddenElement); - // Yield an animation frame - await new Promise((ok, err) => requestAnimationFrame(() => ok(null))); - // Remove dummy element - document.body.removeChild(dummyHiddenElement); - // Notify font as loaded to application - FontFamily.notifyFontLoaded(fontFamilyName); - } - static notifyFontLoaded(fontFamilyName) { - if (!FontFamily.managedNotifyFontLoaded) { - FontFamily.managedNotifyFontLoaded = - Module.mono_bind_static_method("[Uno.UI] Windows.UI.Xaml.Media.FontFamilyLoader:NotifyFontLoaded"); - } - FontFamily.managedNotifyFontLoaded(fontFamilyName); - } - static notifyFontLoadFailed(fontFamilyName) { - if (!FontFamily.managedNotifyFontLoadFailed) { - FontFamily.managedNotifyFontLoadFailed = - Module.mono_bind_static_method("[Uno.UI] Windows.UI.Xaml.Media.FontFamilyLoader:NotifyFontLoadFailed"); - } - FontFamily.managedNotifyFontLoadFailed(fontFamilyName); - } - } - Media.FontFamily = FontFamily; - })(Media = Xaml.Media || (Xaml.Media = {})); - })(Xaml = UI.Xaml || (UI.Xaml = {})); - })(UI = Windows.UI || (Windows.UI = {})); -})(Windows || (Windows = {})); -/* TSBindingsGenerator Generated code -- this code is regenerated on each build */ -class WindowManagerAddViewParams { - static unmarshal(pData) { - const ret = new WindowManagerAddViewParams(); - { - ret.HtmlId = Number(Module.getValue(pData + 0, "*")); - } - { - ret.ChildView = Number(Module.getValue(pData + 4, "*")); - } - { - ret.Index = Number(Module.getValue(pData + 8, "i32")); - } - return ret; - } -} -/* TSBindingsGenerator Generated code -- this code is regenerated on each build */ -class WindowManagerArrangeElementParams { - static unmarshal(pData) { - const ret = new WindowManagerArrangeElementParams(); - { - ret.Top = Number(Module.getValue(pData + 0, "double")); - } - { - ret.Left = Number(Module.getValue(pData + 8, "double")); - } - { - ret.Width = Number(Module.getValue(pData + 16, "double")); - } - { - ret.Height = Number(Module.getValue(pData + 24, "double")); - } - { - ret.ClipTop = Number(Module.getValue(pData + 32, "double")); - } - { - ret.ClipLeft = Number(Module.getValue(pData + 40, "double")); - } - { - ret.ClipBottom = Number(Module.getValue(pData + 48, "double")); - } - { - ret.ClipRight = Number(Module.getValue(pData + 56, "double")); - } - { - ret.HtmlId = Number(Module.getValue(pData + 64, "*")); - } - { - ret.Clip = Boolean(Module.getValue(pData + 68, "i32")); - } - return ret; - } -} -/* TSBindingsGenerator Generated code -- this code is regenerated on each build */ -class WindowManagerCreateContentParams { - static unmarshal(pData) { - const ret = new WindowManagerCreateContentParams(); - { - ret.HtmlId = Number(Module.getValue(pData + 0, "*")); - } - { - const ptr = Module.getValue(pData + 4, "*"); - if (ptr !== 0) { - ret.TagName = String(Module.UTF8ToString(ptr)); - } - else { - ret.TagName = null; - } - } - { - ret.Handle = Number(Module.getValue(pData + 8, "*")); - } - { - ret.UIElementRegistrationId = Number(Module.getValue(pData + 12, "i32")); - } - { - ret.IsSvg = Boolean(Module.getValue(pData + 16, "i32")); - } - { - ret.IsFocusable = Boolean(Module.getValue(pData + 20, "i32")); - } - return ret; - } -} -/* TSBindingsGenerator Generated code -- this code is regenerated on each build */ -class WindowManagerDestroyViewParams { - static unmarshal(pData) { - const ret = new WindowManagerDestroyViewParams(); - { - ret.HtmlId = Number(Module.getValue(pData + 0, "*")); - } - return ret; - } -} -/* TSBindingsGenerator Generated code -- this code is regenerated on each build */ -class WindowManagerGetBBoxParams { - static unmarshal(pData) { - const ret = new WindowManagerGetBBoxParams(); - { - ret.HtmlId = Number(Module.getValue(pData + 0, "*")); - } - return ret; - } -} -/* TSBindingsGenerator Generated code -- this code is regenerated on each build */ -class WindowManagerGetBBoxReturn { - marshal(pData) { - Module.setValue(pData + 0, this.X, "double"); - Module.setValue(pData + 8, this.Y, "double"); - Module.setValue(pData + 16, this.Width, "double"); - Module.setValue(pData + 24, this.Height, "double"); - } -} -/* TSBindingsGenerator Generated code -- this code is regenerated on each build */ -class WindowManagerGetClientViewSizeParams { - static unmarshal(pData) { - const ret = new WindowManagerGetClientViewSizeParams(); - { - ret.HtmlId = Number(Module.getValue(pData + 0, "*")); - } - return ret; - } -} -/* TSBindingsGenerator Generated code -- this code is regenerated on each build */ -class WindowManagerGetClientViewSizeReturn { - marshal(pData) { - Module.setValue(pData + 0, this.OffsetWidth, "double"); - Module.setValue(pData + 8, this.OffsetHeight, "double"); - Module.setValue(pData + 16, this.ClientWidth, "double"); - Module.setValue(pData + 24, this.ClientHeight, "double"); - } -} -/* TSBindingsGenerator Generated code -- this code is regenerated on each build */ -class WindowManagerInitParams { - static unmarshal(pData) { - const ret = new WindowManagerInitParams(); - { - ret.IsHostedMode = Boolean(Module.getValue(pData + 0, "i32")); - } - { - ret.IsLoadEventsEnabled = Boolean(Module.getValue(pData + 4, "i32")); - } - return ret; - } -} -/* TSBindingsGenerator Generated code -- this code is regenerated on each build */ -class WindowManagerMeasureViewParams { - static unmarshal(pData) { - const ret = new WindowManagerMeasureViewParams(); - { - ret.HtmlId = Number(Module.getValue(pData + 0, "*")); - } - { - ret.AvailableWidth = Number(Module.getValue(pData + 8, "double")); - } - { - ret.AvailableHeight = Number(Module.getValue(pData + 16, "double")); - } - { - ret.MeasureContent = Boolean(Module.getValue(pData + 24, "i32")); - } - return ret; - } -} -/* TSBindingsGenerator Generated code -- this code is regenerated on each build */ -class WindowManagerMeasureViewReturn { - marshal(pData) { - Module.setValue(pData + 0, this.DesiredWidth, "double"); - Module.setValue(pData + 8, this.DesiredHeight, "double"); - } -} -/* TSBindingsGenerator Generated code -- this code is regenerated on each build */ -class WindowManagerRegisterEventOnViewParams { - static unmarshal(pData) { - const ret = new WindowManagerRegisterEventOnViewParams(); - { - ret.HtmlId = Number(Module.getValue(pData + 0, "*")); - } - { - const ptr = Module.getValue(pData + 4, "*"); - if (ptr !== 0) { - ret.EventName = String(Module.UTF8ToString(ptr)); - } - else { - ret.EventName = null; - } - } - { - ret.OnCapturePhase = Boolean(Module.getValue(pData + 8, "i32")); - } - { - ret.EventExtractorId = Number(Module.getValue(pData + 12, "i32")); - } - return ret; - } -} -/* TSBindingsGenerator Generated code -- this code is regenerated on each build */ -class WindowManagerRegisterPointerEventsOnViewParams { - static unmarshal(pData) { - const ret = new WindowManagerRegisterPointerEventsOnViewParams(); - { - ret.HtmlId = Number(Module.getValue(pData + 0, "*")); - } - return ret; - } -} -/* TSBindingsGenerator Generated code -- this code is regenerated on each build */ -class WindowManagerRegisterUIElementParams { - static unmarshal(pData) { - const ret = new WindowManagerRegisterUIElementParams(); - { - const ptr = Module.getValue(pData + 0, "*"); - if (ptr !== 0) { - ret.TypeName = String(Module.UTF8ToString(ptr)); - } - else { - ret.TypeName = null; - } - } - { - ret.IsFrameworkElement = Boolean(Module.getValue(pData + 4, "i32")); - } - { - ret.Classes_Length = Number(Module.getValue(pData + 8, "i32")); - } - { - const pArray = Module.getValue(pData + 12, "*"); - if (pArray !== 0) { - ret.Classes = new Array(); - for (var i = 0; i < ret.Classes_Length; i++) { - const value = Module.getValue(pArray + i * 4, "*"); - if (value !== 0) { - ret.Classes.push(String(MonoRuntime.conv_string(value))); - } - else { - ret.Classes.push(null); - } - } - } - else { - ret.Classes = null; - } - } - return ret; - } -} -/* TSBindingsGenerator Generated code -- this code is regenerated on each build */ -class WindowManagerRegisterUIElementReturn { - marshal(pData) { - Module.setValue(pData + 0, this.RegistrationId, "i32"); - } -} -/* TSBindingsGenerator Generated code -- this code is regenerated on each build */ -class WindowManagerRemoveAttributeParams { - static unmarshal(pData) { - const ret = new WindowManagerRemoveAttributeParams(); - { - ret.HtmlId = Number(Module.getValue(pData + 0, "*")); - } - { - const ptr = Module.getValue(pData + 4, "*"); - if (ptr !== 0) { - ret.Name = String(Module.UTF8ToString(ptr)); - } - else { - ret.Name = null; - } - } - return ret; - } -} -/* TSBindingsGenerator Generated code -- this code is regenerated on each build */ -class WindowManagerRemoveViewParams { - static unmarshal(pData) { - const ret = new WindowManagerRemoveViewParams(); - { - ret.HtmlId = Number(Module.getValue(pData + 0, "*")); - } - { - ret.ChildView = Number(Module.getValue(pData + 4, "*")); - } - return ret; - } -} -/* TSBindingsGenerator Generated code -- this code is regenerated on each build */ -class WindowManagerResetElementBackgroundParams { - static unmarshal(pData) { - const ret = new WindowManagerResetElementBackgroundParams(); - { - ret.HtmlId = Number(Module.getValue(pData + 0, "*")); - } - return ret; - } -} -/* TSBindingsGenerator Generated code -- this code is regenerated on each build */ -class WindowManagerResetStyleParams { - static unmarshal(pData) { - const ret = new WindowManagerResetStyleParams(); - { - ret.HtmlId = Number(Module.getValue(pData + 0, "*")); - } - { - ret.Styles_Length = Number(Module.getValue(pData + 4, "i32")); - } - { - const pArray = Module.getValue(pData + 8, "*"); - if (pArray !== 0) { - ret.Styles = new Array(); - for (var i = 0; i < ret.Styles_Length; i++) { - const value = Module.getValue(pArray + i * 4, "*"); - if (value !== 0) { - ret.Styles.push(String(MonoRuntime.conv_string(value))); - } - else { - ret.Styles.push(null); - } - } - } - else { - ret.Styles = null; - } - } - return ret; - } -} -/* TSBindingsGenerator Generated code -- this code is regenerated on each build */ -class WindowManagerScrollToOptionsParams { - static unmarshal(pData) { - const ret = new WindowManagerScrollToOptionsParams(); - { - ret.Left = Number(Module.getValue(pData + 0, "double")); - } - { - ret.Top = Number(Module.getValue(pData + 8, "double")); - } - { - ret.HasLeft = Boolean(Module.getValue(pData + 16, "i32")); - } - { - ret.HasTop = Boolean(Module.getValue(pData + 20, "i32")); - } - { - ret.DisableAnimation = Boolean(Module.getValue(pData + 24, "i32")); - } - { - ret.HtmlId = Number(Module.getValue(pData + 28, "*")); - } - return ret; - } -} -/* TSBindingsGenerator Generated code -- this code is regenerated on each build */ -class WindowManagerSetAttributeParams { - static unmarshal(pData) { - const ret = new WindowManagerSetAttributeParams(); - { - ret.HtmlId = Number(Module.getValue(pData + 0, "*")); - } - { - const ptr = Module.getValue(pData + 4, "*"); - if (ptr !== 0) { - ret.Name = String(Module.UTF8ToString(ptr)); - } - else { - ret.Name = null; - } - } - { - const ptr = Module.getValue(pData + 8, "*"); - if (ptr !== 0) { - ret.Value = String(Module.UTF8ToString(ptr)); - } - else { - ret.Value = null; - } - } - return ret; - } -} -/* TSBindingsGenerator Generated code -- this code is regenerated on each build */ -class WindowManagerSetAttributesParams { - static unmarshal(pData) { - const ret = new WindowManagerSetAttributesParams(); - { - ret.HtmlId = Number(Module.getValue(pData + 0, "*")); - } - { - ret.Pairs_Length = Number(Module.getValue(pData + 4, "i32")); - } - { - const pArray = Module.getValue(pData + 8, "*"); - if (pArray !== 0) { - ret.Pairs = new Array(); - for (var i = 0; i < ret.Pairs_Length; i++) { - const value = Module.getValue(pArray + i * 4, "*"); - if (value !== 0) { - ret.Pairs.push(String(MonoRuntime.conv_string(value))); - } - else { - ret.Pairs.push(null); - } - } - } - else { - ret.Pairs = null; - } - } - return ret; - } -} -/* TSBindingsGenerator Generated code -- this code is regenerated on each build */ -class WindowManagerSetClassesParams { - static unmarshal(pData) { - const ret = new WindowManagerSetClassesParams(); - { - ret.HtmlId = Number(Module.getValue(pData + 0, "*")); - } - { - ret.CssClasses_Length = Number(Module.getValue(pData + 4, "i32")); - } - { - const pArray = Module.getValue(pData + 8, "*"); - if (pArray !== 0) { - ret.CssClasses = new Array(); - for (var i = 0; i < ret.CssClasses_Length; i++) { - const value = Module.getValue(pArray + i * 4, "*"); - if (value !== 0) { - ret.CssClasses.push(String(MonoRuntime.conv_string(value))); - } - else { - ret.CssClasses.push(null); - } - } - } - else { - ret.CssClasses = null; - } - } - { - ret.Index = Number(Module.getValue(pData + 12, "i32")); - } - return ret; - } -} -/* TSBindingsGenerator Generated code -- this code is regenerated on each build */ -class WindowManagerSetContentHtmlParams { - static unmarshal(pData) { - const ret = new WindowManagerSetContentHtmlParams(); - { - ret.HtmlId = Number(Module.getValue(pData + 0, "*")); - } - { - const ptr = Module.getValue(pData + 4, "*"); - if (ptr !== 0) { - ret.Html = String(Module.UTF8ToString(ptr)); - } - else { - ret.Html = null; - } - } - return ret; - } -} -/* TSBindingsGenerator Generated code -- this code is regenerated on each build */ -class WindowManagerSetElementBackgroundColorParams { - static unmarshal(pData) { - const ret = new WindowManagerSetElementBackgroundColorParams(); - { - ret.HtmlId = Number(Module.getValue(pData + 0, "*")); - } - { - ret.Color = Module.HEAPU32[(pData + 4) >> 2]; - } - return ret; - } -} -/* TSBindingsGenerator Generated code -- this code is regenerated on each build */ -class WindowManagerSetElementBackgroundGradientParams { - static unmarshal(pData) { - const ret = new WindowManagerSetElementBackgroundGradientParams(); - { - ret.HtmlId = Number(Module.getValue(pData + 0, "*")); - } - { - const ptr = Module.getValue(pData + 4, "*"); - if (ptr !== 0) { - ret.CssGradient = String(Module.UTF8ToString(ptr)); - } - else { - ret.CssGradient = null; - } - } - return ret; - } -} -/* TSBindingsGenerator Generated code -- this code is regenerated on each build */ -class WindowManagerSetElementColorParams { - static unmarshal(pData) { - const ret = new WindowManagerSetElementColorParams(); - { - ret.HtmlId = Number(Module.getValue(pData + 0, "*")); - } - { - ret.Color = Module.HEAPU32[(pData + 4) >> 2]; - } - return ret; - } -} -/* TSBindingsGenerator Generated code -- this code is regenerated on each build */ -class WindowManagerSetElementFillParams { - static unmarshal(pData) { - const ret = new WindowManagerSetElementFillParams(); - { - ret.HtmlId = Number(Module.getValue(pData + 0, "*")); - } - { - ret.Color = Module.HEAPU32[(pData + 4) >> 2]; - } - return ret; - } -} -/* TSBindingsGenerator Generated code -- this code is regenerated on each build */ -class WindowManagerSetElementTransformParams { - static unmarshal(pData) { - const ret = new WindowManagerSetElementTransformParams(); - { - ret.HtmlId = Number(Module.getValue(pData + 0, "*")); - } - { - ret.M11 = Number(Module.getValue(pData + 8, "double")); - } - { - ret.M12 = Number(Module.getValue(pData + 16, "double")); - } - { - ret.M21 = Number(Module.getValue(pData + 24, "double")); - } - { - ret.M22 = Number(Module.getValue(pData + 32, "double")); - } - { - ret.M31 = Number(Module.getValue(pData + 40, "double")); - } - { - ret.M32 = Number(Module.getValue(pData + 48, "double")); - } - return ret; - } -} -/* TSBindingsGenerator Generated code -- this code is regenerated on each build */ -class WindowManagerSetNameParams { - static unmarshal(pData) { - const ret = new WindowManagerSetNameParams(); - { - ret.HtmlId = Number(Module.getValue(pData + 0, "*")); - } - { - const ptr = Module.getValue(pData + 4, "*"); - if (ptr !== 0) { - ret.Name = String(Module.UTF8ToString(ptr)); - } - else { - ret.Name = null; - } - } - return ret; - } -} -/* TSBindingsGenerator Generated code -- this code is regenerated on each build */ -class WindowManagerSetPointerEventsParams { - static unmarshal(pData) { - const ret = new WindowManagerSetPointerEventsParams(); - { - ret.HtmlId = Number(Module.getValue(pData + 0, "*")); - } - { - ret.Enabled = Boolean(Module.getValue(pData + 4, "i32")); - } - return ret; - } -} -/* TSBindingsGenerator Generated code -- this code is regenerated on each build */ -class WindowManagerSetPropertyParams { - static unmarshal(pData) { - const ret = new WindowManagerSetPropertyParams(); - { - ret.HtmlId = Number(Module.getValue(pData + 0, "*")); - } - { - ret.Pairs_Length = Number(Module.getValue(pData + 4, "i32")); - } - { - const pArray = Module.getValue(pData + 8, "*"); - if (pArray !== 0) { - ret.Pairs = new Array(); - for (var i = 0; i < ret.Pairs_Length; i++) { - const value = Module.getValue(pArray + i * 4, "*"); - if (value !== 0) { - ret.Pairs.push(String(MonoRuntime.conv_string(value))); - } - else { - ret.Pairs.push(null); - } - } - } - else { - ret.Pairs = null; - } - } - return ret; - } -} -/* TSBindingsGenerator Generated code -- this code is regenerated on each build */ -class WindowManagerSetSelectionHighlightParams { - static unmarshal(pData) { - const ret = new WindowManagerSetSelectionHighlightParams(); - { - ret.HtmlId = Number(Module.getValue(pData + 0, "*")); - } - { - ret.BackgroundColor = Module.HEAPU32[(pData + 4) >> 2]; - } - { - ret.ForegroundColor = Module.HEAPU32[(pData + 8) >> 2]; - } - return ret; - } -} -/* TSBindingsGenerator Generated code -- this code is regenerated on each build */ -class WindowManagerSetStyleDoubleParams { - static unmarshal(pData) { - const ret = new WindowManagerSetStyleDoubleParams(); - { - ret.HtmlId = Number(Module.getValue(pData + 0, "*")); - } - { - const ptr = Module.getValue(pData + 4, "*"); - if (ptr !== 0) { - ret.Name = String(Module.UTF8ToString(ptr)); - } - else { - ret.Name = null; - } - } - { - ret.Value = Number(Module.getValue(pData + 8, "double")); - } - return ret; - } -} -/* TSBindingsGenerator Generated code -- this code is regenerated on each build */ -class WindowManagerSetStylesParams { - static unmarshal(pData) { - const ret = new WindowManagerSetStylesParams(); - { - ret.HtmlId = Number(Module.getValue(pData + 0, "*")); - } - { - ret.Pairs_Length = Number(Module.getValue(pData + 4, "i32")); - } - { - const pArray = Module.getValue(pData + 8, "*"); - if (pArray !== 0) { - ret.Pairs = new Array(); - for (var i = 0; i < ret.Pairs_Length; i++) { - const value = Module.getValue(pArray + i * 4, "*"); - if (value !== 0) { - ret.Pairs.push(String(MonoRuntime.conv_string(value))); - } - else { - ret.Pairs.push(null); - } - } - } - else { - ret.Pairs = null; - } - } - return ret; - } -} -/* TSBindingsGenerator Generated code -- this code is regenerated on each build */ -class WindowManagerSetSvgElementRectParams { - static unmarshal(pData) { - const ret = new WindowManagerSetSvgElementRectParams(); - { - ret.X = Number(Module.getValue(pData + 0, "double")); - } - { - ret.Y = Number(Module.getValue(pData + 8, "double")); - } - { - ret.Width = Number(Module.getValue(pData + 16, "double")); - } - { - ret.Height = Number(Module.getValue(pData + 24, "double")); - } - { - ret.HtmlId = Number(Module.getValue(pData + 32, "*")); - } - return ret; - } -} -/* TSBindingsGenerator Generated code -- this code is regenerated on each build */ -class WindowManagerSetUnsetClassesParams { - static unmarshal(pData) { - const ret = new WindowManagerSetUnsetClassesParams(); - { - ret.HtmlId = Number(Module.getValue(pData + 0, "*")); - } - { - ret.CssClassesToSet_Length = Number(Module.getValue(pData + 4, "i32")); - } - { - const pArray = Module.getValue(pData + 8, "*"); - if (pArray !== 0) { - ret.CssClassesToSet = new Array(); - for (var i = 0; i < ret.CssClassesToSet_Length; i++) { - const value = Module.getValue(pArray + i * 4, "*"); - if (value !== 0) { - ret.CssClassesToSet.push(String(MonoRuntime.conv_string(value))); - } - else { - ret.CssClassesToSet.push(null); - } - } - } - else { - ret.CssClassesToSet = null; - } - } - { - ret.CssClassesToUnset_Length = Number(Module.getValue(pData + 12, "i32")); - } - { - const pArray = Module.getValue(pData + 16, "*"); - if (pArray !== 0) { - ret.CssClassesToUnset = new Array(); - for (var i = 0; i < ret.CssClassesToUnset_Length; i++) { - const value = Module.getValue(pArray + i * 4, "*"); - if (value !== 0) { - ret.CssClassesToUnset.push(String(MonoRuntime.conv_string(value))); - } - else { - ret.CssClassesToUnset.push(null); - } - } - } - else { - ret.CssClassesToUnset = null; - } - } - return ret; - } -} -/* TSBindingsGenerator Generated code -- this code is regenerated on each build */ -class WindowManagerSetVisibilityParams { - static unmarshal(pData) { - const ret = new WindowManagerSetVisibilityParams(); - { - ret.HtmlId = Number(Module.getValue(pData + 0, "*")); - } - { - ret.Visible = Boolean(Module.getValue(pData + 4, "i32")); - } - return ret; - } -} -/* TSBindingsGenerator Generated code -- this code is regenerated on each build */ -class WindowManagerSetXUidParams { - static unmarshal(pData) { - const ret = new WindowManagerSetXUidParams(); - { - ret.HtmlId = Number(Module.getValue(pData + 0, "*")); - } - { - const ptr = Module.getValue(pData + 4, "*"); - if (ptr !== 0) { - ret.Uid = String(Module.UTF8ToString(ptr)); - } - else { - ret.Uid = null; - } - } - return ret; - } -} -/* TSBindingsGenerator Generated code -- this code is regenerated on each build */ -var Windows; -(function (Windows) { - var ApplicationModel; - (function (ApplicationModel) { - var DataTransfer; - (function (DataTransfer) { - var DragDrop; - (function (DragDrop) { - var Core; - (function (Core) { - class DragDropExtensionEventArgs { - static unmarshal(pData) { - const ret = new DragDropExtensionEventArgs(); - { - const ptr = Module.getValue(pData + 0, "*"); - if (ptr !== 0) { - ret.eventName = String(Module.UTF8ToString(ptr)); - } - else { - ret.eventName = null; - } - } - { - const ptr = Module.getValue(pData + 4, "*"); - if (ptr !== 0) { - ret.allowedOperations = String(Module.UTF8ToString(ptr)); - } - else { - ret.allowedOperations = null; - } - } - { - const ptr = Module.getValue(pData + 8, "*"); - if (ptr !== 0) { - ret.acceptedOperation = String(Module.UTF8ToString(ptr)); - } - else { - ret.acceptedOperation = null; - } - } - { - const ptr = Module.getValue(pData + 12, "*"); - if (ptr !== 0) { - ret.dataItems = String(Module.UTF8ToString(ptr)); - } - else { - ret.dataItems = null; - } - } - { - ret.timestamp = Number(Module.getValue(pData + 16, "double")); - } - { - ret.x = Number(Module.getValue(pData + 24, "double")); - } - { - ret.y = Number(Module.getValue(pData + 32, "double")); - } - { - ret.id = Number(Module.getValue(pData + 40, "i32")); - } - { - ret.buttons = Number(Module.getValue(pData + 44, "i32")); - } - { - ret.shift = Boolean(Module.getValue(pData + 48, "i32")); - } - { - ret.ctrl = Boolean(Module.getValue(pData + 52, "i32")); - } - { - ret.alt = Boolean(Module.getValue(pData + 56, "i32")); - } - return ret; - } - marshal(pData) { - { - const stringLength = lengthBytesUTF8(this.eventName); - const pString = Module._malloc(stringLength + 1); - stringToUTF8(this.eventName, pString, stringLength + 1); - Module.setValue(pData + 0, pString, "*"); - } - { - const stringLength = lengthBytesUTF8(this.allowedOperations); - const pString = Module._malloc(stringLength + 1); - stringToUTF8(this.allowedOperations, pString, stringLength + 1); - Module.setValue(pData + 4, pString, "*"); - } - { - const stringLength = lengthBytesUTF8(this.acceptedOperation); - const pString = Module._malloc(stringLength + 1); - stringToUTF8(this.acceptedOperation, pString, stringLength + 1); - Module.setValue(pData + 8, pString, "*"); - } - { - const stringLength = lengthBytesUTF8(this.dataItems); - const pString = Module._malloc(stringLength + 1); - stringToUTF8(this.dataItems, pString, stringLength + 1); - Module.setValue(pData + 12, pString, "*"); - } - Module.setValue(pData + 16, this.timestamp, "double"); - Module.setValue(pData + 24, this.x, "double"); - Module.setValue(pData + 32, this.y, "double"); - Module.setValue(pData + 40, this.id, "i32"); - Module.setValue(pData + 44, this.buttons, "i32"); - Module.setValue(pData + 48, this.shift, "i32"); - Module.setValue(pData + 52, this.ctrl, "i32"); - Module.setValue(pData + 56, this.alt, "i32"); - } - } - Core.DragDropExtensionEventArgs = DragDropExtensionEventArgs; - })(Core = DragDrop.Core || (DragDrop.Core = {})); - })(DragDrop = DataTransfer.DragDrop || (DataTransfer.DragDrop = {})); - })(DataTransfer = ApplicationModel.DataTransfer || (ApplicationModel.DataTransfer = {})); - })(ApplicationModel = Windows.ApplicationModel || (Windows.ApplicationModel = {})); -})(Windows || (Windows = {})); -/* TSBindingsGenerator Generated code -- this code is regenerated on each build */ -var Windows; -(function (Windows) { - var Storage; - (function (Storage) { - class ApplicationDataContainer_ClearParams { - static unmarshal(pData) { - const ret = new ApplicationDataContainer_ClearParams(); - { - const ptr = Module.getValue(pData + 0, "*"); - if (ptr !== 0) { - ret.Locality = String(Module.UTF8ToString(ptr)); - } - else { - ret.Locality = null; - } - } - return ret; - } - } - Storage.ApplicationDataContainer_ClearParams = ApplicationDataContainer_ClearParams; - })(Storage = Windows.Storage || (Windows.Storage = {})); -})(Windows || (Windows = {})); -/* TSBindingsGenerator Generated code -- this code is regenerated on each build */ -var Windows; -(function (Windows) { - var Storage; - (function (Storage) { - class ApplicationDataContainer_ContainsKeyParams { - static unmarshal(pData) { - const ret = new ApplicationDataContainer_ContainsKeyParams(); - { - const ptr = Module.getValue(pData + 0, "*"); - if (ptr !== 0) { - ret.Key = String(Module.UTF8ToString(ptr)); - } - else { - ret.Key = null; - } - } - { - const ptr = Module.getValue(pData + 4, "*"); - if (ptr !== 0) { - ret.Value = String(Module.UTF8ToString(ptr)); - } - else { - ret.Value = null; - } - } - { - const ptr = Module.getValue(pData + 8, "*"); - if (ptr !== 0) { - ret.Locality = String(Module.UTF8ToString(ptr)); - } - else { - ret.Locality = null; - } - } - return ret; - } - } - Storage.ApplicationDataContainer_ContainsKeyParams = ApplicationDataContainer_ContainsKeyParams; - })(Storage = Windows.Storage || (Windows.Storage = {})); -})(Windows || (Windows = {})); -/* TSBindingsGenerator Generated code -- this code is regenerated on each build */ -var Windows; -(function (Windows) { - var Storage; - (function (Storage) { - class ApplicationDataContainer_ContainsKeyReturn { - marshal(pData) { - Module.setValue(pData + 0, this.ContainsKey, "i32"); - } - } - Storage.ApplicationDataContainer_ContainsKeyReturn = ApplicationDataContainer_ContainsKeyReturn; - })(Storage = Windows.Storage || (Windows.Storage = {})); -})(Windows || (Windows = {})); -/* TSBindingsGenerator Generated code -- this code is regenerated on each build */ -var Windows; -(function (Windows) { - var Storage; - (function (Storage) { - class ApplicationDataContainer_GetCountParams { - static unmarshal(pData) { - const ret = new ApplicationDataContainer_GetCountParams(); - { - const ptr = Module.getValue(pData + 0, "*"); - if (ptr !== 0) { - ret.Locality = String(Module.UTF8ToString(ptr)); - } - else { - ret.Locality = null; - } - } - return ret; - } - } - Storage.ApplicationDataContainer_GetCountParams = ApplicationDataContainer_GetCountParams; - })(Storage = Windows.Storage || (Windows.Storage = {})); -})(Windows || (Windows = {})); -/* TSBindingsGenerator Generated code -- this code is regenerated on each build */ -var Windows; -(function (Windows) { - var Storage; - (function (Storage) { - class ApplicationDataContainer_GetCountReturn { - marshal(pData) { - Module.setValue(pData + 0, this.Count, "i32"); - } - } - Storage.ApplicationDataContainer_GetCountReturn = ApplicationDataContainer_GetCountReturn; - })(Storage = Windows.Storage || (Windows.Storage = {})); -})(Windows || (Windows = {})); -/* TSBindingsGenerator Generated code -- this code is regenerated on each build */ -var Windows; -(function (Windows) { - var Storage; - (function (Storage) { - class ApplicationDataContainer_GetKeyByIndexParams { - static unmarshal(pData) { - const ret = new ApplicationDataContainer_GetKeyByIndexParams(); - { - const ptr = Module.getValue(pData + 0, "*"); - if (ptr !== 0) { - ret.Locality = String(Module.UTF8ToString(ptr)); - } - else { - ret.Locality = null; - } - } - { - ret.Index = Number(Module.getValue(pData + 4, "i32")); - } - return ret; - } - } - Storage.ApplicationDataContainer_GetKeyByIndexParams = ApplicationDataContainer_GetKeyByIndexParams; - })(Storage = Windows.Storage || (Windows.Storage = {})); -})(Windows || (Windows = {})); -/* TSBindingsGenerator Generated code -- this code is regenerated on each build */ -var Windows; -(function (Windows) { - var Storage; - (function (Storage) { - class ApplicationDataContainer_GetKeyByIndexReturn { - marshal(pData) { - { - const stringLength = lengthBytesUTF8(this.Value); - const pString = Module._malloc(stringLength + 1); - stringToUTF8(this.Value, pString, stringLength + 1); - Module.setValue(pData + 0, pString, "*"); - } - } - } - Storage.ApplicationDataContainer_GetKeyByIndexReturn = ApplicationDataContainer_GetKeyByIndexReturn; - })(Storage = Windows.Storage || (Windows.Storage = {})); -})(Windows || (Windows = {})); -/* TSBindingsGenerator Generated code -- this code is regenerated on each build */ -var Windows; -(function (Windows) { - var Storage; - (function (Storage) { - class ApplicationDataContainer_GetValueByIndexParams { - static unmarshal(pData) { - const ret = new ApplicationDataContainer_GetValueByIndexParams(); - { - const ptr = Module.getValue(pData + 0, "*"); - if (ptr !== 0) { - ret.Locality = String(Module.UTF8ToString(ptr)); - } - else { - ret.Locality = null; - } - } - { - ret.Index = Number(Module.getValue(pData + 4, "i32")); - } - return ret; - } - } - Storage.ApplicationDataContainer_GetValueByIndexParams = ApplicationDataContainer_GetValueByIndexParams; - })(Storage = Windows.Storage || (Windows.Storage = {})); -})(Windows || (Windows = {})); -/* TSBindingsGenerator Generated code -- this code is regenerated on each build */ -var Windows; -(function (Windows) { - var Storage; - (function (Storage) { - class ApplicationDataContainer_GetValueByIndexReturn { - marshal(pData) { - { - const stringLength = lengthBytesUTF8(this.Value); - const pString = Module._malloc(stringLength + 1); - stringToUTF8(this.Value, pString, stringLength + 1); - Module.setValue(pData + 0, pString, "*"); - } - } - } - Storage.ApplicationDataContainer_GetValueByIndexReturn = ApplicationDataContainer_GetValueByIndexReturn; - })(Storage = Windows.Storage || (Windows.Storage = {})); -})(Windows || (Windows = {})); -/* TSBindingsGenerator Generated code -- this code is regenerated on each build */ -var Windows; -(function (Windows) { - var Storage; - (function (Storage) { - class ApplicationDataContainer_RemoveParams { - static unmarshal(pData) { - const ret = new ApplicationDataContainer_RemoveParams(); - { - const ptr = Module.getValue(pData + 0, "*"); - if (ptr !== 0) { - ret.Locality = String(Module.UTF8ToString(ptr)); - } - else { - ret.Locality = null; - } - } - { - const ptr = Module.getValue(pData + 4, "*"); - if (ptr !== 0) { - ret.Key = String(Module.UTF8ToString(ptr)); - } - else { - ret.Key = null; - } - } - return ret; - } - } - Storage.ApplicationDataContainer_RemoveParams = ApplicationDataContainer_RemoveParams; - })(Storage = Windows.Storage || (Windows.Storage = {})); -})(Windows || (Windows = {})); -/* TSBindingsGenerator Generated code -- this code is regenerated on each build */ -var Windows; -(function (Windows) { - var Storage; - (function (Storage) { - class ApplicationDataContainer_RemoveReturn { - marshal(pData) { - Module.setValue(pData + 0, this.Removed, "i32"); - } - } - Storage.ApplicationDataContainer_RemoveReturn = ApplicationDataContainer_RemoveReturn; - })(Storage = Windows.Storage || (Windows.Storage = {})); -})(Windows || (Windows = {})); -/* TSBindingsGenerator Generated code -- this code is regenerated on each build */ -var Windows; -(function (Windows) { - var Storage; - (function (Storage) { - class ApplicationDataContainer_SetValueParams { - static unmarshal(pData) { - const ret = new ApplicationDataContainer_SetValueParams(); - { - const ptr = Module.getValue(pData + 0, "*"); - if (ptr !== 0) { - ret.Key = String(Module.UTF8ToString(ptr)); - } - else { - ret.Key = null; - } - } - { - const ptr = Module.getValue(pData + 4, "*"); - if (ptr !== 0) { - ret.Value = String(Module.UTF8ToString(ptr)); - } - else { - ret.Value = null; - } - } - { - const ptr = Module.getValue(pData + 8, "*"); - if (ptr !== 0) { - ret.Locality = String(Module.UTF8ToString(ptr)); - } - else { - ret.Locality = null; - } - } - return ret; - } - } - Storage.ApplicationDataContainer_SetValueParams = ApplicationDataContainer_SetValueParams; - })(Storage = Windows.Storage || (Windows.Storage = {})); -})(Windows || (Windows = {})); -/* TSBindingsGenerator Generated code -- this code is regenerated on each build */ -var Windows; -(function (Windows) { - var Storage; - (function (Storage) { - class ApplicationDataContainer_TryGetValueParams { - static unmarshal(pData) { - const ret = new ApplicationDataContainer_TryGetValueParams(); - { - const ptr = Module.getValue(pData + 0, "*"); - if (ptr !== 0) { - ret.Key = String(Module.UTF8ToString(ptr)); - } - else { - ret.Key = null; - } - } - { - const ptr = Module.getValue(pData + 4, "*"); - if (ptr !== 0) { - ret.Locality = String(Module.UTF8ToString(ptr)); - } - else { - ret.Locality = null; - } - } - return ret; - } - } - Storage.ApplicationDataContainer_TryGetValueParams = ApplicationDataContainer_TryGetValueParams; - })(Storage = Windows.Storage || (Windows.Storage = {})); -})(Windows || (Windows = {})); -/* TSBindingsGenerator Generated code -- this code is regenerated on each build */ -var Windows; -(function (Windows) { - var Storage; - (function (Storage) { - class ApplicationDataContainer_TryGetValueReturn { - marshal(pData) { - { - const stringLength = lengthBytesUTF8(this.Value); - const pString = Module._malloc(stringLength + 1); - stringToUTF8(this.Value, pString, stringLength + 1); - Module.setValue(pData + 0, pString, "*"); - } - Module.setValue(pData + 4, this.HasValue, "i32"); - } - } - Storage.ApplicationDataContainer_TryGetValueReturn = ApplicationDataContainer_TryGetValueReturn; - })(Storage = Windows.Storage || (Windows.Storage = {})); -})(Windows || (Windows = {})); -/* TSBindingsGenerator Generated code -- this code is regenerated on each build */ -var Windows; -(function (Windows) { - var Storage; - (function (Storage) { - class StorageFolderMakePersistentParams { - static unmarshal(pData) { - const ret = new StorageFolderMakePersistentParams(); - { - ret.Paths_Length = Number(Module.getValue(pData + 0, "i32")); - } - { - const pArray = Module.getValue(pData + 4, "*"); - if (pArray !== 0) { - ret.Paths = new Array(); - for (var i = 0; i < ret.Paths_Length; i++) { - const value = Module.getValue(pArray + i * 4, "*"); - if (value !== 0) { - ret.Paths.push(String(MonoRuntime.conv_string(value))); - } - else { - ret.Paths.push(null); - } - } - } - else { - ret.Paths = null; - } - } - return ret; - } - } - Storage.StorageFolderMakePersistentParams = StorageFolderMakePersistentParams; - })(Storage = Windows.Storage || (Windows.Storage = {})); -})(Windows || (Windows = {})); -/* TSBindingsGenerator Generated code -- this code is regenerated on each build */ -var Windows; -(function (Windows) { - var UI; - (function (UI) { - var Xaml; - (function (Xaml) { - class NativePointerEventArgs { - marshal(pData) { - Module.setValue(pData + 0, this.HtmlId, "*"); - Module.setValue(pData + 4, this.Event, "i8"); - Module.setValue(pData + 8, this.pointerId, "double"); - Module.setValue(pData + 16, this.x, "double"); - Module.setValue(pData + 24, this.y, "double"); - Module.setValue(pData + 32, this.ctrl, "i32"); - Module.setValue(pData + 36, this.shift, "i32"); - Module.setValue(pData + 40, this.buttons, "i32"); - Module.setValue(pData + 44, this.buttonUpdate, "i32"); - Module.setValue(pData + 48, this.deviceType, "i32"); - Module.setValue(pData + 52, this.srcHandle, "i32"); - Module.setValue(pData + 56, this.timestamp, "double"); - Module.setValue(pData + 64, this.pressure, "double"); - Module.setValue(pData + 72, this.wheelDeltaX, "double"); - Module.setValue(pData + 80, this.wheelDeltaY, "double"); - Module.setValue(pData + 88, this.hasRelatedTarget, "i32"); - } - } - Xaml.NativePointerEventArgs = NativePointerEventArgs; - })(Xaml = UI.Xaml || (UI.Xaml = {})); - })(UI = Windows.UI || (Windows.UI = {})); -})(Windows || (Windows = {})); -/* TSBindingsGenerator Generated code -- this code is regenerated on each build */ -var Windows; -(function (Windows) { - var UI; - (function (UI) { - var Xaml; - (function (Xaml) { - class NativePointerEventResult { - static unmarshal(pData) { - const ret = new NativePointerEventResult(); - { - ret.Result = Number(Module.getValue(pData + 0, "i8")); - } - return ret; - } - } - Xaml.NativePointerEventResult = NativePointerEventResult; - })(Xaml = UI.Xaml || (UI.Xaml = {})); - })(UI = Windows.UI || (Windows.UI = {})); -})(Windows || (Windows = {})); -/* TSBindingsGenerator Generated code -- this code is regenerated on each build */ -var Windows; -(function (Windows) { - var UI; - (function (UI) { - var Xaml; - (function (Xaml) { - class NativePointerSubscriptionParams { - static unmarshal(pData) { - const ret = new NativePointerSubscriptionParams(); - { - ret.HtmlId = Number(Module.getValue(pData + 0, "*")); - } - { - ret.Events = Number(Module.getValue(pData + 4, "i8")); - } - return ret; - } - } - Xaml.NativePointerSubscriptionParams = NativePointerSubscriptionParams; - })(Xaml = UI.Xaml || (UI.Xaml = {})); - })(UI = Windows.UI || (Windows.UI = {})); -})(Windows || (Windows = {})); diff --git a/src/Uno.UI/ts/HttpClient.ts b/src/Uno.UI/ts/HttpClient.ts index 555a5eed1e66..6b51813b5ce6 100644 --- a/src/Uno.UI/ts/HttpClient.ts +++ b/src/Uno.UI/ts/HttpClient.ts @@ -64,21 +64,13 @@ private static dispatchResponse(requestId: string, status: number, headers: string, payload: string) { this.initMethods(); - - const requestIdStr = MonoRuntime.mono_string(requestId); - const statusStr = MonoRuntime.mono_string("" + status); - const headersStr = MonoRuntime.mono_string(headers); - const payloadStr = MonoRuntime.mono_string(payload); - MonoRuntime.call_method(this.dispatchResponseMethod, null, [requestIdStr, statusStr, headersStr, payloadStr]); + this.dispatchResponseMethod("" + requestId, "" + status, headers, payload); } private static dispatchError(requestId: string, error: string) { this.initMethods(); - - const requestIdStr = MonoRuntime.mono_string(requestId); - const errorStr = MonoRuntime.mono_string(error); - MonoRuntime.call_method(this.dispatchErrorMethod, null, [requestIdStr, errorStr]); + this.dispatchErrorMethod(requestId, error); } private static dispatchResponseMethod: any; @@ -89,10 +81,8 @@ return; // already initialized. } - const asm = MonoRuntime.assembly_load("Uno.UI.Runtime.WebAssembly"); - const httpClass = MonoRuntime.find_class(asm, "Uno.UI.Wasm", "WasmHttpHandler"); - this.dispatchResponseMethod = MonoRuntime.find_method(httpClass, "DispatchResponse", -1); - this.dispatchErrorMethod = MonoRuntime.find_method(httpClass, "DispatchError", -1); + this.dispatchResponseMethod = (Module).mono_bind_static_method("[Uno.UI.Runtime.WebAssembly] Uno.UI.Wasm.WasmHttpHandler:DispatchResponse"); + this.dispatchErrorMethod = (Module).mono_bind_static_method("[Uno.UI.Runtime.WebAssembly] Uno.UI.Wasm.WasmHttpHandler:DispatchError"); } } } diff --git a/src/Uno.UI/tsconfig.json b/src/Uno.UI/tsconfig.json index 91f021d8c0ad..245a7853faee 100644 --- a/src/Uno.UI/tsconfig.json +++ b/src/Uno.UI/tsconfig.json @@ -1,15 +1,16 @@ { "compilerOptions": { - "module": "none", - "declaration": true, - "diagnostics": true, - "noImplicitAny": true, - "outFile": "WasmScripts/Uno.UI.js", - //"inlineSourceMap": true, - "locale": "en-US", - "target": "ES2017", - // We need ES2018 types to have support for async iteration (used in File System APIs) - "lib": [ "ES2018", "DOM", "DOM.Iterable" ] + "module": "none", + "declaration": true, + "diagnostics": true, + "noImplicitAny": true, + // outFile is specified in the csproj to place files in the intermediate folder: + // "outFile": "WasmScripts/Uno.UI.js", + //"inlineSourceMap": true, + "locale": "en-US", + "target": "ES2017", + // We need ES2018 types to have support for async iteration (used in File System APIs) + "lib": [ "ES2018", "DOM", "DOM.Iterable" ] }, "include": [ "ts/**/*", diff --git a/src/Uno.UWP/Collections/HashtableEx.cs b/src/Uno.UWP/Collections/HashtableEx.cs index ed4733f1a3b9..3621ef9fbe5b 100644 --- a/src/Uno.UWP/Collections/HashtableEx.cs +++ b/src/Uno.UWP/Collections/HashtableEx.cs @@ -1,4 +1,6 @@ -#nullable enable +#pragma warning disable CS8981 + +#nullable enable // Based on https://github.com/dotnet/runtime/commit/bdc8e420aa75999021e06b85e2e1869962730a0f // Licensed to the .NET Foundation under one or more agreements. diff --git a/src/Uno.UWP/UI/Input/GestureRecognizer.Manipulation.InertiaProcessor.cs b/src/Uno.UWP/UI/Input/GestureRecognizer.Manipulation.InertiaProcessor.cs index 7903cc830219..3badf5bff936 100644 --- a/src/Uno.UWP/UI/Input/GestureRecognizer.Manipulation.InertiaProcessor.cs +++ b/src/Uno.UWP/UI/Input/GestureRecognizer.Manipulation.InertiaProcessor.cs @@ -54,10 +54,10 @@ public InertiaProcessor(Manipulation owner, Point position, ManipulationDelta cu _isTranslateInertiaXEnabled = _owner._isTranslateXEnabled && _owner._settings.HasFlag(Input.GestureSettings.ManipulationTranslateInertia) - && Abs(velocities.Linear.X) > _owner._inertiaThresholds.TranslateX; + && Math.Abs(velocities.Linear.X) > _owner._inertiaThresholds.TranslateX; _isTranslateInertiaYEnabled = _owner._isTranslateYEnabled && _owner._settings.HasFlag(Input.GestureSettings.ManipulationTranslateInertia) - && Abs(velocities.Linear.Y) > _owner._inertiaThresholds.TranslateY; + && Math.Abs(velocities.Linear.Y) > _owner._inertiaThresholds.TranslateY; _isRotateInertiaEnabled = _owner._isRotateEnabled && _owner._settings.HasFlag(Input.GestureSettings.ManipulationRotateInertia) && Abs(velocities.Angular) > _owner._inertiaThresholds.Rotate; @@ -93,7 +93,7 @@ public void Start() // As of 2021-07-21, according to test, Displacement takes over Deceleration. if (!IsNaN(DesiredDisplacement)) { - var v0 = (Abs(_velocities0.Linear.X) + Abs(_velocities0.Linear.Y)) / 2; + var v0 = (Math.Abs(_velocities0.Linear.X) + Math.Abs(_velocities0.Linear.Y)) / 2; DesiredDisplacementDeceleration = GetDecelerationFromDesiredDisplacement(v0, DesiredDisplacement); } if (!IsNaN(DesiredRotation)) @@ -184,14 +184,14 @@ private float GetValue(bool enabled, double v0, double d, double t, float lastVa // https://docs.microsoft.com/en-us/windows/win32/wintouch/inertia-mechanics#inertia-physics-overview private float GetValue(double v0, double d, double t) => v0 >= 0 - ? (float)(v0 * t - d * Pow(t, 2)) - : -(float)(-v0 * t - d * Pow(t, 2)); + ? (float)(v0 * t - d * Math.Pow(t, 2)) + : -(float)(-v0 * t - d * Math.Pow(t, 2)); private bool IsCompleted(double v0, double d, double t) - => Abs(v0) - d * 2 * t <= 0; // The derivative of the GetValue function + => Math.Abs(v0) - d * 2 * t <= 0; // The derivative of the GetValue function private double GetDecelerationFromDesiredDisplacement(double v0, double displacement, double durationMs = _defaultDurationMs) - => (v0 * durationMs - displacement) / Pow(_defaultDurationMs, 2); + => (v0 * durationMs - displacement) / Math.Pow(_defaultDurationMs, 2); /// public void Dispose() diff --git a/src/Uno.UWP/Uno.Reference.csproj b/src/Uno.UWP/Uno.Reference.csproj new file mode 100644 index 000000000000..013480c38f61 --- /dev/null +++ b/src/Uno.UWP/Uno.Reference.csproj @@ -0,0 +1,50 @@ + + + netstandard2.0 + + + + $(TargetFrameworks);net7.0 + + + + $(UnoTargetFrameworkOverride) + + + + Uno + Windows + $(DefineConstants);XAMARIN;IS_UNO;HAS_UMBRELLA_UI;HAS_UMBRELLA_BINDING;HAS_CRIPPLEDREFLECTION + true + + $(NoWarn);NU1701 + + false + true + + true + + Reference + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Uno.UWP/Uno.Skia.csproj b/src/Uno.UWP/Uno.Skia.csproj index f2c76a3c77f0..482bbea50a5c 100644 --- a/src/Uno.UWP/Uno.Skia.csproj +++ b/src/Uno.UWP/Uno.Skia.csproj @@ -3,6 +3,10 @@ netstandard2.0 + + $(TargetFrameworks);net7.0 + + diff --git a/src/Uno.UWP/Uno.Wasm.csproj b/src/Uno.UWP/Uno.Wasm.csproj index 339cf77ff510..2cc92bca60b5 100644 --- a/src/Uno.UWP/Uno.Wasm.csproj +++ b/src/Uno.UWP/Uno.Wasm.csproj @@ -1,9 +1,13 @@  - - + + netstandard2.0 + + $(TargetFrameworks);net7.0 + + diff --git a/src/crosstargeting_override.props.sample b/src/crosstargeting_override.props.sample index 569faa28e24d..0957fad303c7 100644 --- a/src/crosstargeting_override.props.sample +++ b/src/crosstargeting_override.props.sample @@ -18,20 +18,21 @@ Available build targets and corresponding solution filters: - ┌────────────────────────────┬───────────────────────┬────────────────────────────────────────────────────────────────────────────────────┐ - │ UnoTargetFrameworkOverride │ Platform │ Solution filter file │ - ├────────────────────────────┼───────────────────────┼────────────────────────────────────────────────────────────────────────────────────┤ - │ uap10.0.18362 │ Windows │ Uno.UI-Windows-only.slnf │ - │ xamarinios10 │ iOS │ Uno.UI-iOS-only.slnf │ - │ MonoAndroid12.0 │ Android 12.0 │ Uno.UI-Android-only.slnf │ - │ netstandard2.0 │ WebAssembly, Skia │ Uno.UI-Wasm-only.slnf, Uno.UI-Skia-only.slnf │ - │ net6.0-ios │ .NET 6 iOS │ Uno.UI-net6-only.slnf │ - │ net6.0-android │ .NET 6 Android │ Uno.UI-net6-only.slnf │ - │ net6.0-maccatalyst │ .NET 6 macOS Catalyst │ Uno.UI-net6-only.slnf │ - │ net6.0-macos │ .NET 6 macOS AppKit │ Uno.UI-net6-only.slnf │ - │ xamarinmac20 │ macOS │ Uno.UI-macOS-only.slnf (VS for Windows), Uno.UI-vs4mac-macOS-only.sln (VS for Mac) │ - │ net461 │ Uno.UI.Tests │ Uno.UI-UnitTests-only.slnf │ - └────────────────────────────┴───────────────────────┴────────────────────────────────────────────────────────────────────────────────────┘ + ┌────────────────────────────┬─────────────────────────┬────────────────────────────────────────────────────────────────────────────────────┐ + │ UnoTargetFrameworkOverride │ Platform │ Solution filter file │ + ├────────────────────────────┼─────────────────────────┼────────────────────────────────────────────────────────────────────────────────────┤ + │ uap10.0.18362 │ Windows │ Uno.UI-Windows-only.slnf │ + │ xamarinios10 │ iOS │ Uno.UI-iOS-only.slnf │ + │ MonoAndroid12.0 │ Android 12.0 │ Uno.UI-Android-only.slnf │ + │ netstandard2.0 │ WebAssembly, Skia │ Uno.UI-Wasm-only.slnf, Uno.UI-Skia-only.slnf │ + │ net6.0-ios │ .NET 6 iOS │ Uno.UI-net6-only.slnf │ + │ net6.0-android │ .NET 6 Android │ Uno.UI-net6-only.slnf │ + │ net6.0-maccatalyst │ .NET 6 macOS Catalyst │ Uno.UI-net6-only.slnf │ + │ net6.0-macos │ .NET 6 macOS AppKit │ Uno.UI-net6-only.slnf │ + │ xamarinmac20 │ macOS │ Uno.UI-macOS-only.slnf (VS for Windows), Uno.UI-vs4mac-macOS-only.sln (VS for Mac) │ + │ netstandard2.0 or net7.0 │ Wasm+Skia Reference API │ Uno.UI-Reference-only.slnf │ + │ net461 │ Uno.UI.Tests │ Uno.UI-UnitTests-only.slnf │ + └────────────────────────────┴─────────────────────────┴────────────────────────────────────────────────────────────────────────────────────┘ Only one target can be built, and the corresponding solution filter file must be loaded in Visual Studio (see next to Uno.UI.sln). diff --git a/src/netcore-build-windows.props b/src/netcore-build-windows.props index a5d64ba5c818..26df71607bec 100644 --- a/src/netcore-build-windows.props +++ b/src/netcore-build-windows.props @@ -1,14 +1,14 @@ - - $(TargetFrameworks);net5.0-windows - $(TargetFrameworks);net5.0-windows + + $(TargetFrameworks);net7.0-windows + $(TargetFrameworks);net7.0-windows @@ -22,6 +22,7 @@ $(UnoTargetFrameworkOverride) $(TargetFrameworks)-windows $(TargetFrameworks)-windows + $(TargetFrameworks)-windows diff --git a/src/netcore-build.props b/src/netcore-build.props index ae3125097a7e..99db33c9981c 100644 --- a/src/netcore-build.props +++ b/src/netcore-build.props @@ -1,8 +1,8 @@ - - $(TargetFrameworks);net5.0 - $(TargetFrameworks);net5.0 + + $(TargetFrameworks);net7.0 + $(TargetFrameworks);net7.0