Modified UIX libs to allow use from UWP

This commit is contained in:
Yoshi Askharoun
2021-07-15 22:00:36 -05:00
parent dd63b8d273
commit c3d90fccbd
27 changed files with 326 additions and 173 deletions
@@ -4,18 +4,21 @@
// MVID: D47658B8-A8EA-43D6-8837-ECE823BFFFC1
// Assembly location: C:\Program Files\Zune\UIX.RenderApi.dll
using System;
using System.Runtime.InteropServices;
namespace Microsoft.Iris.Render.Internal
{
internal static class FormApi
{
private const string s_stEhRenderDll = "UIXRender.dll";
public static HRESULT SpGdiplusInit()
{
throw new NotImplementedException();
}
[DllImport("UIXRender.dll")]
public static extern HRESULT SpGdiplusInit();
[DllImport("UIXRender.dll")]
public static extern HRESULT SpGdiplusUninit();
public static HRESULT SpGdiplusUninit()
{
throw new NotImplementedException();
}
}
}
@@ -34,5 +34,8 @@ namespace Microsoft.Iris.Render.Internal
}
public int Int => this.hr;
public static implicit operator HRESULT(int i) => new(i);
public static implicit operator int(HRESULT hr) => hr.Int;
}
}
@@ -292,7 +292,7 @@ namespace Microsoft.Iris.Render.Internal
return fUseSplitWindowingPort ? this.LocalRenderingProtocol.BuildRemoteNullDevice(device, this.LocalRenderingProtocol.LocalDeviceCallbackHandle) : this.RenderingProtocol.BuildRemoteNullDevice(device, this.RenderingProtocol.LocalDeviceCallbackHandle);
}
internal unsafe DataBuffer BuildDataBuffer(IntPtr pData, uint cbSize) => new DataBuffer(this.RenderingPort, pData.ToPointer(), cbSize);
internal unsafe DataBuffer BuildDataBuffer(byte[] pData, uint cbSize) => new DataBuffer(this.RenderingPort, pData, cbSize);
internal void LoadSurface(DataBuffer buffer, Surface surface, ImageHeader header) => RemoteRasterizer.SendLoadRawImage(this.RenderingProtocol, surface.RemoteStub, buffer.RemoteStub, header);