Moved plat-specific windows to UIX.Skia

This commit is contained in:
Yoshi Askharoun
2021-10-06 22:26:42 -05:00
parent 69c2a8006e
commit 68a7919f49
7 changed files with 55 additions and 551 deletions
+1 -2
View File
@@ -17,5 +17,4 @@ using System.Security.Permissions;
[assembly: AssemblyVersion("4.8.0.0")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
// Allow platform-specific extensions to access internals
[assembly: InternalsVisibleTo("UIX.RenderAPI.Skia.Uno")]
[assembly: InternalsVisibleTo("UIX.Skia")]
File diff suppressed because it is too large Load Diff
@@ -16,6 +16,7 @@ using Microsoft.Iris.Session;
using Microsoft.Iris.UI;
using Microsoft.Iris.ViewItems;
using System;
using Range = Microsoft.Iris.ModelItems.Range;
namespace Microsoft.Iris.InputHandlers
{
@@ -24,10 +24,10 @@ namespace Microsoft.Iris.Render
private IVisualContainer visualRoot;
private RenderSession session;
private Window WpfWindow { get; set; }
private System.Windows.Window WpfWindow { get; set; }
private WindowInteropHelper InteropHelper { get; set; }
public WpfRenderWindow(Window window)
public WpfRenderWindow(System.Windows.Window window)
{
WpfWindow = window;
InteropHelper = new WindowInteropHelper(window);
@@ -283,7 +283,7 @@ namespace Microsoft.Iris.Render
}
public override HWND AppNotifyWindow { set => appNotifyWindow = value; }
TreeNode Root => throw new NotImplementedException();
Graphics.TreeNode Root => throw new NotImplementedException();
private bool _IsClosing = false;
internal override bool IsClosing => _IsClosing;
@@ -12,6 +12,7 @@ using Windows.UI.ViewManagement;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Media;
using XamlWindow = Windows.UI.Xaml.Window;
namespace Microsoft.Iris.Render
{
@@ -19,11 +20,11 @@ namespace Microsoft.Iris.Render
{
private bool isDragging = false;
private GraphicsDevice graphicsDevice;
private Window XamlWindow { get; set; }
private XamlWindow XamlWindow { get; set; }
private ApplicationView CurrentView => ApplicationView.GetForCurrentView();
private Rect VisibleBounds => CurrentView.VisibleBounds;
public XamlRenderWindow(Window window)
public XamlRenderWindow(XamlWindow window)
{
XamlWindow = window;
@@ -174,7 +175,7 @@ namespace Microsoft.Iris.Render
public override IVisualContainer VisualRoot => throw new NotImplementedException();
TreeNode Root => throw new NotImplementedException();
Graphics.TreeNode Root => throw new NotImplementedException();
internal override bool IsClosing => throw new NotImplementedException();
+40 -2
View File
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="MSBuild.Sdk.Extras/3.0.23">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<TargetFrameworks>netstandard2.0;uap10.0.19041;net5.0-windows</TargetFrameworks>
<ProjectGuid>{5681A1BD-B3EC-450B-BF6E-38187204B6BE}</ProjectGuid>
<OutputType>Library</OutputType>
<AssemblyName>UIX.Skia</AssemblyName>
@@ -26,4 +26,42 @@
<ProjectReference Include="..\UIX.RenderApi.Skia\UIX.RenderApi.Skia.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="SkiaSharp" Version="2.80.3" />
<Compile Include="*.UWP.cs" Condition="$(TargetFramework.StartsWith('uap'))" />
<Compile Remove="*.UWP.cs" Condition="!$(TargetFramework.StartsWith('uap'))" />
<Compile Include="*.WPF.cs" Condition="$(TargetFramework.StartsWith('net5.0-windows'))" />
<Compile Remove="*.WPF.cs" Condition="!$(TargetFramework.StartsWith('net5.0-windows'))" />
</ItemGroup>
<!-- UWP -->
<PropertyGroup Condition="$(TargetFramework.StartsWith('uap'))">
<DefineConstants>$(DefineConstants);UWP</DefineConstants>
</PropertyGroup>
<ItemGroup Condition="$(TargetFramework.StartsWith('uap'))">
<PackageReference Include="Microsoft.UI.Xaml" Version="2.5.0" />
<PackageReference Include="SkiaSharp.Views.Uno" Version="2.80.3" />
<PackageReference Include="Uno.Core" Version="2.4.0" />
<PackageReference Include="Uno.UI" Version="3.8.11" />
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform">
<!--
If, in the same solution, you are referencing a project that uses https://github.com/onovotny/MSBuildSdkExtras,
you need to make sure that the version provided here matches https://github.com/novotnyllc/MSBuildSdkExtras/blob/main/Source/MSBuild.Sdk.Extras/DefaultItems/ImplicitPackages.targets#L11.
This is not an issue when libraries are referenced through nuget packages. See https://github.com/unoplatform/uno/issues/446 for more details.
-->
<Version>6.2.11</Version>
</PackageReference>
</ItemGroup>
<!-- WPF -->
<PropertyGroup Condition="$(TargetFramework.StartsWith('net5.0-windows'))">
<DefineConstants>$(DefineConstants);WPF</DefineConstants>
<UseWPF>true</UseWPF>
</PropertyGroup>
<ItemGroup Condition="$(TargetFramework.StartsWith('net5.0-windows'))">
<PackageReference Include="SkiaSharp.Views.Wpf" Version="2.80.3" />
</ItemGroup>
</Project>
-1
View File
@@ -1,7 +1,6 @@
using Microsoft.Iris.Render;
using SkiaSharp;
using SkiaSharp.Views.Desktop;
using System.Reflection;
using System.Threading.Tasks;
using System.Windows;