Add WindowsBase, PresentationCore, PresentationFramework (+more) sources (#720)

Add PresentationFramework, PresentationCore, WindowsBase, DirectWriteForwarder sources, along with sources for allied assemblies
This commit is contained in:
Vatsan Madhavan 2019-05-22 14:08:14 -07:00 коммит произвёл GitHub
Родитель 15b055990a
Коммит ae1790531c
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
3987 изменённых файлов: 1776155 добавлений и 2365 удалений

Просмотреть файл

@ -1,4 +1,7 @@
<Project>
<PropertyGroup>
<RepositoryName>wpf</RepositoryName>
</PropertyGroup>
<!-- Normalize $(TestWpfArcadeSdkPath) by appending a '\' to it if one is missing -->
<PropertyGroup Condition="'$(TestWpfArcadeSdkPath)'!=''">
<WpfArcadeSdkPath>$(TestWpfArcadeSdkPath)</WpfArcadeSdkPath>

Просмотреть файл

@ -27,6 +27,60 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.NET.Sdk.WindowsDe
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Microsoft.DotNet.Wpf.ProjectTemplates", "Microsoft.DotNet.Wpf.ProjectTemplates", "{22D643D8-87D6-4FE8-9632-58A3CD3DC7CB}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WindowsBase", "src\Microsoft.DotNet.Wpf\src\WindowsBase\WindowsBase.csproj", "{FA69991B-9696-42D0-A5C7-F5E73F0DEE9E}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DirectWriteForwarder", "src\Microsoft.DotNet.Wpf\src\DirectWriteForwarder\DirectWriteForwarder.vcxproj", "{50A5318F-3B9A-48B9-9615-D5FA9D6D9C3E}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PresentationCore", "src\Microsoft.DotNet.Wpf\src\PresentationCore\PresentationCore.csproj", "{74C63A45-EAE5-407A-9F89-E0C6BC604841}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PresentationFramework", "src\Microsoft.DotNet.Wpf\src\PresentationFramework\PresentationFramework.csproj", "{B0C1157E-8664-44C4-AD8E-35CD6A78C769}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "UIAutomation", "UIAutomation", "{4572CF94-B209-4479-85AB-59CA87BF5AFA}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UIAutomationClient", "src\Microsoft.DotNet.Wpf\src\UIAutomation\UIAutomationClient\UIAutomationClient.csproj", "{2DD6F2F8-DFF4-4EE1-9D48-0FD692DB084D}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UIAutomationClientSideProviders", "src\Microsoft.DotNet.Wpf\src\UIAutomation\UIAutomationClientSideProviders\UIAutomationClientSideProviders.csproj", "{D242FDF9-F132-4154-BB9F-3F85C39F6F4C}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UIAutomationProvider", "src\Microsoft.DotNet.Wpf\src\UIAutomation\UIAutomationProvider\UIAutomationProvider.csproj", "{4C99DEEE-ED7A-4225-8127-3B1E6EDB39D0}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UIAutomationTypes", "src\Microsoft.DotNet.Wpf\src\UIAutomation\UIAutomationTypes\UIAutomationTypes.csproj", "{152C4B33-3B53-4180-B8BC-7BB0BC91A2ED}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PresentationCore-CommonResources", "src\Microsoft.DotNet.Wpf\src\PresentationCore-CommonResources\PresentationCore-CommonResources.csproj", "{EFF2D0A1-7DC0-456F-ACF0-D1AC80F524B6}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Windows.Input.Manipulations", "src\Microsoft.DotNet.Wpf\src\System.Windows.Input.Manipulations\System.Windows.Input.Manipulations.csproj", "{B6F41F07-2117-49E0-A2B7-4BC6F586057B}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ReachFramework", "src\Microsoft.DotNet.Wpf\src\ReachFramework\ReachFramework.csproj", "{17AA6CC2-CAE3-429C-B065-B76B8E14C632}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "cycle-breakers", "cycle-breakers", "{271ED3B3-976D-4253-85F5-E98CC86993D6}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "PresentationFramework", "PresentationFramework", "{47BC9F30-4DFF-4DEB-BFFE-1EC9735E6965}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "PresentationUI", "PresentationUI", "{FC06FD19-DE12-42BF-908E-8391AF63DB7E}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ReachFramework", "ReachFramework", "{3F4CA1F0-0FA6-4191-B29D-1A283D13C55B}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "System.Printing", "System.Printing", "{DF954594-A66A-42CF-87C4-73AFEAD782DE}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PresentationFramework-PresentationUI-api-cycle", "src\Microsoft.DotNet.Wpf\cycle-breakers\PresentationFramework\PresentationFramework-PresentationUI-api-cycle.csproj", "{11D83C2A-1B1E-4569-BCDB-8464382F6ACA}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PresentationFramework-ReachFramework-impl-cycle", "src\Microsoft.DotNet.Wpf\cycle-breakers\PresentationFramework\PresentationFramework-ReachFramework-impl-cycle.csproj", "{52F59378-BF6D-453E-A8B4-A5825CE03918}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PresentationFramework-System.Printing-api-cycle", "src\Microsoft.DotNet.Wpf\cycle-breakers\PresentationFramework\PresentationFramework-System.Printing-api-cycle.csproj", "{6A1CECD0-243E-4CAB-B612-BE815319FBD9}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PresentationFramework-System.Printing-impl-cycle", "src\Microsoft.DotNet.Wpf\cycle-breakers\PresentationFramework\PresentationFramework-System.Printing-impl-cycle.csproj", "{F0C98EC0-7C46-4756-A072-2DBA5B1C2F54}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PresentationUI-PresentationFramework-impl-cycle", "src\Microsoft.DotNet.Wpf\cycle-breakers\PresentationUI\PresentationUI-PresentationFramework-impl-cycle.csproj", "{C315A49B-CC00-4439-9EE8-CF5FB8FDC672}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ReachFramework-PresentationFramework-api-cycle", "src\Microsoft.DotNet.Wpf\cycle-breakers\ReachFramework\ReachFramework-PresentationFramework-api-cycle.csproj", "{C3D16D20-3633-4688-94CC-0FDE17322D6B}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ReachFramework-System.Printing-api-cycle", "src\Microsoft.DotNet.Wpf\cycle-breakers\ReachFramework\ReachFramework-System.Printing-api-cycle.csproj", "{DA58E0CE-A660-44BD-B9D8-CC307F0C70E5}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Printing-PresentationFramework-api-cycle", "src\Microsoft.DotNet.Wpf\cycle-breakers\System.Printing\System.Printing-PresentationFramework-api-cycle.csproj", "{3DFF824A-0753-4A11-A343-16F860214268}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{D0AED517-9972-41CB-8751-983E4EB8F511}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Printing-ref", "src\Microsoft.DotNet.Wpf\src\System.Printing\ref\System.Printing-ref.csproj", "{0D7A2936-51DB-4B6F-906B-301E20141064}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{B0EFDB12-C931-4E7F-A6C2-D4AC111D7EDF}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DrtXaml.Tests", "src\Microsoft.DotNet.Wpf\test\DRT\DrtXaml\DrtXaml\DrtXaml.Tests.csproj", "{FAB114A2-2C6C-4372-A6BB-BC087B646E3A}"
@ -137,6 +191,248 @@ Global
{440D06B8-E3DE-4C0D-AD25-CD4F43D836E1}.Release|x64.Build.0 = Release|x64
{440D06B8-E3DE-4C0D-AD25-CD4F43D836E1}.Release|x86.ActiveCfg = Release|Any CPU
{440D06B8-E3DE-4C0D-AD25-CD4F43D836E1}.Release|x86.Build.0 = Release|Any CPU
{FA69991B-9696-42D0-A5C7-F5E73F0DEE9E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FA69991B-9696-42D0-A5C7-F5E73F0DEE9E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FA69991B-9696-42D0-A5C7-F5E73F0DEE9E}.Debug|x64.ActiveCfg = Debug|x64
{FA69991B-9696-42D0-A5C7-F5E73F0DEE9E}.Debug|x64.Build.0 = Debug|x64
{FA69991B-9696-42D0-A5C7-F5E73F0DEE9E}.Debug|x86.ActiveCfg = Debug|Any CPU
{FA69991B-9696-42D0-A5C7-F5E73F0DEE9E}.Debug|x86.Build.0 = Debug|Any CPU
{FA69991B-9696-42D0-A5C7-F5E73F0DEE9E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FA69991B-9696-42D0-A5C7-F5E73F0DEE9E}.Release|Any CPU.Build.0 = Release|Any CPU
{FA69991B-9696-42D0-A5C7-F5E73F0DEE9E}.Release|x64.ActiveCfg = Release|x64
{FA69991B-9696-42D0-A5C7-F5E73F0DEE9E}.Release|x64.Build.0 = Release|x64
{FA69991B-9696-42D0-A5C7-F5E73F0DEE9E}.Release|x86.ActiveCfg = Release|Any CPU
{FA69991B-9696-42D0-A5C7-F5E73F0DEE9E}.Release|x86.Build.0 = Release|Any CPU
{50A5318F-3B9A-48B9-9615-D5FA9D6D9C3E}.Debug|Any CPU.ActiveCfg = Debug|Win32
{50A5318F-3B9A-48B9-9615-D5FA9D6D9C3E}.Debug|Any CPU.Build.0 = Debug|Win32
{50A5318F-3B9A-48B9-9615-D5FA9D6D9C3E}.Debug|x64.ActiveCfg = Debug|x64
{50A5318F-3B9A-48B9-9615-D5FA9D6D9C3E}.Debug|x64.Build.0 = Debug|x64
{50A5318F-3B9A-48B9-9615-D5FA9D6D9C3E}.Debug|x86.ActiveCfg = Debug|Win32
{50A5318F-3B9A-48B9-9615-D5FA9D6D9C3E}.Debug|x86.Build.0 = Debug|Win32
{50A5318F-3B9A-48B9-9615-D5FA9D6D9C3E}.Debug|x86.Deploy.0 = Debug|Win32
{50A5318F-3B9A-48B9-9615-D5FA9D6D9C3E}.Release|Any CPU.ActiveCfg = Release|Win32
{50A5318F-3B9A-48B9-9615-D5FA9D6D9C3E}.Release|Any CPU.Build.0 = Release|Win32
{50A5318F-3B9A-48B9-9615-D5FA9D6D9C3E}.Release|x64.ActiveCfg = Release|x64
{50A5318F-3B9A-48B9-9615-D5FA9D6D9C3E}.Release|x64.Build.0 = Release|x64
{50A5318F-3B9A-48B9-9615-D5FA9D6D9C3E}.Release|x86.ActiveCfg = Release|Win32
{50A5318F-3B9A-48B9-9615-D5FA9D6D9C3E}.Release|x86.Build.0 = Release|Win32
{50A5318F-3B9A-48B9-9615-D5FA9D6D9C3E}.Release|x86.Deploy.0 = Release|Win32
{74C63A45-EAE5-407A-9F89-E0C6BC604841}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{74C63A45-EAE5-407A-9F89-E0C6BC604841}.Debug|Any CPU.Build.0 = Debug|Any CPU
{74C63A45-EAE5-407A-9F89-E0C6BC604841}.Debug|x64.ActiveCfg = Debug|x64
{74C63A45-EAE5-407A-9F89-E0C6BC604841}.Debug|x64.Build.0 = Debug|x64
{74C63A45-EAE5-407A-9F89-E0C6BC604841}.Debug|x86.ActiveCfg = Debug|Any CPU
{74C63A45-EAE5-407A-9F89-E0C6BC604841}.Debug|x86.Build.0 = Debug|Any CPU
{74C63A45-EAE5-407A-9F89-E0C6BC604841}.Release|Any CPU.ActiveCfg = Release|Any CPU
{74C63A45-EAE5-407A-9F89-E0C6BC604841}.Release|Any CPU.Build.0 = Release|Any CPU
{74C63A45-EAE5-407A-9F89-E0C6BC604841}.Release|x64.ActiveCfg = Release|x64
{74C63A45-EAE5-407A-9F89-E0C6BC604841}.Release|x64.Build.0 = Release|x64
{74C63A45-EAE5-407A-9F89-E0C6BC604841}.Release|x86.ActiveCfg = Release|Any CPU
{74C63A45-EAE5-407A-9F89-E0C6BC604841}.Release|x86.Build.0 = Release|Any CPU
{B0C1157E-8664-44C4-AD8E-35CD6A78C769}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B0C1157E-8664-44C4-AD8E-35CD6A78C769}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B0C1157E-8664-44C4-AD8E-35CD6A78C769}.Debug|x64.ActiveCfg = Debug|x64
{B0C1157E-8664-44C4-AD8E-35CD6A78C769}.Debug|x64.Build.0 = Debug|x64
{B0C1157E-8664-44C4-AD8E-35CD6A78C769}.Debug|x86.ActiveCfg = Debug|Any CPU
{B0C1157E-8664-44C4-AD8E-35CD6A78C769}.Debug|x86.Build.0 = Debug|Any CPU
{B0C1157E-8664-44C4-AD8E-35CD6A78C769}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B0C1157E-8664-44C4-AD8E-35CD6A78C769}.Release|Any CPU.Build.0 = Release|Any CPU
{B0C1157E-8664-44C4-AD8E-35CD6A78C769}.Release|x64.ActiveCfg = Release|x64
{B0C1157E-8664-44C4-AD8E-35CD6A78C769}.Release|x64.Build.0 = Release|x64
{B0C1157E-8664-44C4-AD8E-35CD6A78C769}.Release|x86.ActiveCfg = Release|Any CPU
{B0C1157E-8664-44C4-AD8E-35CD6A78C769}.Release|x86.Build.0 = Release|Any CPU
{2DD6F2F8-DFF4-4EE1-9D48-0FD692DB084D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2DD6F2F8-DFF4-4EE1-9D48-0FD692DB084D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2DD6F2F8-DFF4-4EE1-9D48-0FD692DB084D}.Debug|x64.ActiveCfg = Debug|x64
{2DD6F2F8-DFF4-4EE1-9D48-0FD692DB084D}.Debug|x64.Build.0 = Debug|x64
{2DD6F2F8-DFF4-4EE1-9D48-0FD692DB084D}.Debug|x86.ActiveCfg = Debug|Any CPU
{2DD6F2F8-DFF4-4EE1-9D48-0FD692DB084D}.Debug|x86.Build.0 = Debug|Any CPU
{2DD6F2F8-DFF4-4EE1-9D48-0FD692DB084D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2DD6F2F8-DFF4-4EE1-9D48-0FD692DB084D}.Release|Any CPU.Build.0 = Release|Any CPU
{2DD6F2F8-DFF4-4EE1-9D48-0FD692DB084D}.Release|x64.ActiveCfg = Release|x64
{2DD6F2F8-DFF4-4EE1-9D48-0FD692DB084D}.Release|x64.Build.0 = Release|x64
{2DD6F2F8-DFF4-4EE1-9D48-0FD692DB084D}.Release|x86.ActiveCfg = Release|Any CPU
{2DD6F2F8-DFF4-4EE1-9D48-0FD692DB084D}.Release|x86.Build.0 = Release|Any CPU
{D242FDF9-F132-4154-BB9F-3F85C39F6F4C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D242FDF9-F132-4154-BB9F-3F85C39F6F4C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D242FDF9-F132-4154-BB9F-3F85C39F6F4C}.Debug|x64.ActiveCfg = Debug|x64
{D242FDF9-F132-4154-BB9F-3F85C39F6F4C}.Debug|x64.Build.0 = Debug|x64
{D242FDF9-F132-4154-BB9F-3F85C39F6F4C}.Debug|x86.ActiveCfg = Debug|Any CPU
{D242FDF9-F132-4154-BB9F-3F85C39F6F4C}.Debug|x86.Build.0 = Debug|Any CPU
{D242FDF9-F132-4154-BB9F-3F85C39F6F4C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D242FDF9-F132-4154-BB9F-3F85C39F6F4C}.Release|Any CPU.Build.0 = Release|Any CPU
{D242FDF9-F132-4154-BB9F-3F85C39F6F4C}.Release|x64.ActiveCfg = Release|x64
{D242FDF9-F132-4154-BB9F-3F85C39F6F4C}.Release|x64.Build.0 = Release|x64
{D242FDF9-F132-4154-BB9F-3F85C39F6F4C}.Release|x86.ActiveCfg = Release|Any CPU
{D242FDF9-F132-4154-BB9F-3F85C39F6F4C}.Release|x86.Build.0 = Release|Any CPU
{4C99DEEE-ED7A-4225-8127-3B1E6EDB39D0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4C99DEEE-ED7A-4225-8127-3B1E6EDB39D0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4C99DEEE-ED7A-4225-8127-3B1E6EDB39D0}.Debug|x64.ActiveCfg = Debug|x64
{4C99DEEE-ED7A-4225-8127-3B1E6EDB39D0}.Debug|x64.Build.0 = Debug|x64
{4C99DEEE-ED7A-4225-8127-3B1E6EDB39D0}.Debug|x86.ActiveCfg = Debug|Any CPU
{4C99DEEE-ED7A-4225-8127-3B1E6EDB39D0}.Debug|x86.Build.0 = Debug|Any CPU
{4C99DEEE-ED7A-4225-8127-3B1E6EDB39D0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4C99DEEE-ED7A-4225-8127-3B1E6EDB39D0}.Release|Any CPU.Build.0 = Release|Any CPU
{4C99DEEE-ED7A-4225-8127-3B1E6EDB39D0}.Release|x64.ActiveCfg = Release|x64
{4C99DEEE-ED7A-4225-8127-3B1E6EDB39D0}.Release|x64.Build.0 = Release|x64
{4C99DEEE-ED7A-4225-8127-3B1E6EDB39D0}.Release|x86.ActiveCfg = Release|Any CPU
{4C99DEEE-ED7A-4225-8127-3B1E6EDB39D0}.Release|x86.Build.0 = Release|Any CPU
{152C4B33-3B53-4180-B8BC-7BB0BC91A2ED}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{152C4B33-3B53-4180-B8BC-7BB0BC91A2ED}.Debug|Any CPU.Build.0 = Debug|Any CPU
{152C4B33-3B53-4180-B8BC-7BB0BC91A2ED}.Debug|x64.ActiveCfg = Debug|x64
{152C4B33-3B53-4180-B8BC-7BB0BC91A2ED}.Debug|x64.Build.0 = Debug|x64
{152C4B33-3B53-4180-B8BC-7BB0BC91A2ED}.Debug|x86.ActiveCfg = Debug|Any CPU
{152C4B33-3B53-4180-B8BC-7BB0BC91A2ED}.Debug|x86.Build.0 = Debug|Any CPU
{152C4B33-3B53-4180-B8BC-7BB0BC91A2ED}.Release|Any CPU.ActiveCfg = Release|Any CPU
{152C4B33-3B53-4180-B8BC-7BB0BC91A2ED}.Release|Any CPU.Build.0 = Release|Any CPU
{152C4B33-3B53-4180-B8BC-7BB0BC91A2ED}.Release|x64.ActiveCfg = Release|x64
{152C4B33-3B53-4180-B8BC-7BB0BC91A2ED}.Release|x64.Build.0 = Release|x64
{152C4B33-3B53-4180-B8BC-7BB0BC91A2ED}.Release|x86.ActiveCfg = Release|Any CPU
{152C4B33-3B53-4180-B8BC-7BB0BC91A2ED}.Release|x86.Build.0 = Release|Any CPU
{EFF2D0A1-7DC0-456F-ACF0-D1AC80F524B6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EFF2D0A1-7DC0-456F-ACF0-D1AC80F524B6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EFF2D0A1-7DC0-456F-ACF0-D1AC80F524B6}.Debug|x64.ActiveCfg = Debug|x64
{EFF2D0A1-7DC0-456F-ACF0-D1AC80F524B6}.Debug|x64.Build.0 = Debug|x64
{EFF2D0A1-7DC0-456F-ACF0-D1AC80F524B6}.Debug|x86.ActiveCfg = Debug|Any CPU
{EFF2D0A1-7DC0-456F-ACF0-D1AC80F524B6}.Debug|x86.Build.0 = Debug|Any CPU
{EFF2D0A1-7DC0-456F-ACF0-D1AC80F524B6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EFF2D0A1-7DC0-456F-ACF0-D1AC80F524B6}.Release|Any CPU.Build.0 = Release|Any CPU
{EFF2D0A1-7DC0-456F-ACF0-D1AC80F524B6}.Release|x64.ActiveCfg = Release|x64
{EFF2D0A1-7DC0-456F-ACF0-D1AC80F524B6}.Release|x64.Build.0 = Release|x64
{EFF2D0A1-7DC0-456F-ACF0-D1AC80F524B6}.Release|x86.ActiveCfg = Release|Any CPU
{EFF2D0A1-7DC0-456F-ACF0-D1AC80F524B6}.Release|x86.Build.0 = Release|Any CPU
{B6F41F07-2117-49E0-A2B7-4BC6F586057B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B6F41F07-2117-49E0-A2B7-4BC6F586057B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B6F41F07-2117-49E0-A2B7-4BC6F586057B}.Debug|x64.ActiveCfg = Debug|x64
{B6F41F07-2117-49E0-A2B7-4BC6F586057B}.Debug|x64.Build.0 = Debug|x64
{B6F41F07-2117-49E0-A2B7-4BC6F586057B}.Debug|x86.ActiveCfg = Debug|Any CPU
{B6F41F07-2117-49E0-A2B7-4BC6F586057B}.Debug|x86.Build.0 = Debug|Any CPU
{B6F41F07-2117-49E0-A2B7-4BC6F586057B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B6F41F07-2117-49E0-A2B7-4BC6F586057B}.Release|Any CPU.Build.0 = Release|Any CPU
{B6F41F07-2117-49E0-A2B7-4BC6F586057B}.Release|x64.ActiveCfg = Release|x64
{B6F41F07-2117-49E0-A2B7-4BC6F586057B}.Release|x64.Build.0 = Release|x64
{B6F41F07-2117-49E0-A2B7-4BC6F586057B}.Release|x86.ActiveCfg = Release|Any CPU
{B6F41F07-2117-49E0-A2B7-4BC6F586057B}.Release|x86.Build.0 = Release|Any CPU
{17AA6CC2-CAE3-429C-B065-B76B8E14C632}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{17AA6CC2-CAE3-429C-B065-B76B8E14C632}.Debug|Any CPU.Build.0 = Debug|Any CPU
{17AA6CC2-CAE3-429C-B065-B76B8E14C632}.Debug|x64.ActiveCfg = Debug|x64
{17AA6CC2-CAE3-429C-B065-B76B8E14C632}.Debug|x64.Build.0 = Debug|x64
{17AA6CC2-CAE3-429C-B065-B76B8E14C632}.Debug|x86.ActiveCfg = Debug|Any CPU
{17AA6CC2-CAE3-429C-B065-B76B8E14C632}.Debug|x86.Build.0 = Debug|Any CPU
{17AA6CC2-CAE3-429C-B065-B76B8E14C632}.Release|Any CPU.ActiveCfg = Release|Any CPU
{17AA6CC2-CAE3-429C-B065-B76B8E14C632}.Release|Any CPU.Build.0 = Release|Any CPU
{17AA6CC2-CAE3-429C-B065-B76B8E14C632}.Release|x64.ActiveCfg = Release|x64
{17AA6CC2-CAE3-429C-B065-B76B8E14C632}.Release|x64.Build.0 = Release|x64
{17AA6CC2-CAE3-429C-B065-B76B8E14C632}.Release|x86.ActiveCfg = Release|Any CPU
{17AA6CC2-CAE3-429C-B065-B76B8E14C632}.Release|x86.Build.0 = Release|Any CPU
{11D83C2A-1B1E-4569-BCDB-8464382F6ACA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{11D83C2A-1B1E-4569-BCDB-8464382F6ACA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{11D83C2A-1B1E-4569-BCDB-8464382F6ACA}.Debug|x64.ActiveCfg = Debug|x64
{11D83C2A-1B1E-4569-BCDB-8464382F6ACA}.Debug|x64.Build.0 = Debug|x64
{11D83C2A-1B1E-4569-BCDB-8464382F6ACA}.Debug|x86.ActiveCfg = Debug|Any CPU
{11D83C2A-1B1E-4569-BCDB-8464382F6ACA}.Debug|x86.Build.0 = Debug|Any CPU
{11D83C2A-1B1E-4569-BCDB-8464382F6ACA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{11D83C2A-1B1E-4569-BCDB-8464382F6ACA}.Release|Any CPU.Build.0 = Release|Any CPU
{11D83C2A-1B1E-4569-BCDB-8464382F6ACA}.Release|x64.ActiveCfg = Release|x64
{11D83C2A-1B1E-4569-BCDB-8464382F6ACA}.Release|x64.Build.0 = Release|x64
{11D83C2A-1B1E-4569-BCDB-8464382F6ACA}.Release|x86.ActiveCfg = Release|Any CPU
{11D83C2A-1B1E-4569-BCDB-8464382F6ACA}.Release|x86.Build.0 = Release|Any CPU
{52F59378-BF6D-453E-A8B4-A5825CE03918}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{52F59378-BF6D-453E-A8B4-A5825CE03918}.Debug|Any CPU.Build.0 = Debug|Any CPU
{52F59378-BF6D-453E-A8B4-A5825CE03918}.Debug|x64.ActiveCfg = Debug|x64
{52F59378-BF6D-453E-A8B4-A5825CE03918}.Debug|x64.Build.0 = Debug|x64
{52F59378-BF6D-453E-A8B4-A5825CE03918}.Debug|x86.ActiveCfg = Debug|Any CPU
{52F59378-BF6D-453E-A8B4-A5825CE03918}.Debug|x86.Build.0 = Debug|Any CPU
{52F59378-BF6D-453E-A8B4-A5825CE03918}.Release|Any CPU.ActiveCfg = Release|Any CPU
{52F59378-BF6D-453E-A8B4-A5825CE03918}.Release|Any CPU.Build.0 = Release|Any CPU
{52F59378-BF6D-453E-A8B4-A5825CE03918}.Release|x64.ActiveCfg = Release|x64
{52F59378-BF6D-453E-A8B4-A5825CE03918}.Release|x64.Build.0 = Release|x64
{52F59378-BF6D-453E-A8B4-A5825CE03918}.Release|x86.ActiveCfg = Release|Any CPU
{52F59378-BF6D-453E-A8B4-A5825CE03918}.Release|x86.Build.0 = Release|Any CPU
{6A1CECD0-243E-4CAB-B612-BE815319FBD9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6A1CECD0-243E-4CAB-B612-BE815319FBD9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6A1CECD0-243E-4CAB-B612-BE815319FBD9}.Debug|x64.ActiveCfg = Debug|x64
{6A1CECD0-243E-4CAB-B612-BE815319FBD9}.Debug|x64.Build.0 = Debug|x64
{6A1CECD0-243E-4CAB-B612-BE815319FBD9}.Debug|x86.ActiveCfg = Debug|Any CPU
{6A1CECD0-243E-4CAB-B612-BE815319FBD9}.Debug|x86.Build.0 = Debug|Any CPU
{6A1CECD0-243E-4CAB-B612-BE815319FBD9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6A1CECD0-243E-4CAB-B612-BE815319FBD9}.Release|Any CPU.Build.0 = Release|Any CPU
{6A1CECD0-243E-4CAB-B612-BE815319FBD9}.Release|x64.ActiveCfg = Release|x64
{6A1CECD0-243E-4CAB-B612-BE815319FBD9}.Release|x64.Build.0 = Release|x64
{6A1CECD0-243E-4CAB-B612-BE815319FBD9}.Release|x86.ActiveCfg = Release|Any CPU
{6A1CECD0-243E-4CAB-B612-BE815319FBD9}.Release|x86.Build.0 = Release|Any CPU
{F0C98EC0-7C46-4756-A072-2DBA5B1C2F54}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F0C98EC0-7C46-4756-A072-2DBA5B1C2F54}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F0C98EC0-7C46-4756-A072-2DBA5B1C2F54}.Debug|x64.ActiveCfg = Debug|x64
{F0C98EC0-7C46-4756-A072-2DBA5B1C2F54}.Debug|x64.Build.0 = Debug|x64
{F0C98EC0-7C46-4756-A072-2DBA5B1C2F54}.Debug|x86.ActiveCfg = Debug|Any CPU
{F0C98EC0-7C46-4756-A072-2DBA5B1C2F54}.Debug|x86.Build.0 = Debug|Any CPU
{F0C98EC0-7C46-4756-A072-2DBA5B1C2F54}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F0C98EC0-7C46-4756-A072-2DBA5B1C2F54}.Release|Any CPU.Build.0 = Release|Any CPU
{F0C98EC0-7C46-4756-A072-2DBA5B1C2F54}.Release|x64.ActiveCfg = Release|x64
{F0C98EC0-7C46-4756-A072-2DBA5B1C2F54}.Release|x64.Build.0 = Release|x64
{F0C98EC0-7C46-4756-A072-2DBA5B1C2F54}.Release|x86.ActiveCfg = Release|Any CPU
{F0C98EC0-7C46-4756-A072-2DBA5B1C2F54}.Release|x86.Build.0 = Release|Any CPU
{C315A49B-CC00-4439-9EE8-CF5FB8FDC672}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C315A49B-CC00-4439-9EE8-CF5FB8FDC672}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C315A49B-CC00-4439-9EE8-CF5FB8FDC672}.Debug|x64.ActiveCfg = Debug|x64
{C315A49B-CC00-4439-9EE8-CF5FB8FDC672}.Debug|x64.Build.0 = Debug|x64
{C315A49B-CC00-4439-9EE8-CF5FB8FDC672}.Debug|x86.ActiveCfg = Debug|Any CPU
{C315A49B-CC00-4439-9EE8-CF5FB8FDC672}.Debug|x86.Build.0 = Debug|Any CPU
{C315A49B-CC00-4439-9EE8-CF5FB8FDC672}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C315A49B-CC00-4439-9EE8-CF5FB8FDC672}.Release|Any CPU.Build.0 = Release|Any CPU
{C315A49B-CC00-4439-9EE8-CF5FB8FDC672}.Release|x64.ActiveCfg = Release|x64
{C315A49B-CC00-4439-9EE8-CF5FB8FDC672}.Release|x64.Build.0 = Release|x64
{C315A49B-CC00-4439-9EE8-CF5FB8FDC672}.Release|x86.ActiveCfg = Release|Any CPU
{C315A49B-CC00-4439-9EE8-CF5FB8FDC672}.Release|x86.Build.0 = Release|Any CPU
{C3D16D20-3633-4688-94CC-0FDE17322D6B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C3D16D20-3633-4688-94CC-0FDE17322D6B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C3D16D20-3633-4688-94CC-0FDE17322D6B}.Debug|x64.ActiveCfg = Debug|x64
{C3D16D20-3633-4688-94CC-0FDE17322D6B}.Debug|x64.Build.0 = Debug|x64
{C3D16D20-3633-4688-94CC-0FDE17322D6B}.Debug|x86.ActiveCfg = Debug|Any CPU
{C3D16D20-3633-4688-94CC-0FDE17322D6B}.Debug|x86.Build.0 = Debug|Any CPU
{C3D16D20-3633-4688-94CC-0FDE17322D6B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C3D16D20-3633-4688-94CC-0FDE17322D6B}.Release|Any CPU.Build.0 = Release|Any CPU
{C3D16D20-3633-4688-94CC-0FDE17322D6B}.Release|x64.ActiveCfg = Release|x64
{C3D16D20-3633-4688-94CC-0FDE17322D6B}.Release|x64.Build.0 = Release|x64
{C3D16D20-3633-4688-94CC-0FDE17322D6B}.Release|x86.ActiveCfg = Release|Any CPU
{C3D16D20-3633-4688-94CC-0FDE17322D6B}.Release|x86.Build.0 = Release|Any CPU
{DA58E0CE-A660-44BD-B9D8-CC307F0C70E5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DA58E0CE-A660-44BD-B9D8-CC307F0C70E5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DA58E0CE-A660-44BD-B9D8-CC307F0C70E5}.Debug|x64.ActiveCfg = Debug|x64
{DA58E0CE-A660-44BD-B9D8-CC307F0C70E5}.Debug|x64.Build.0 = Debug|x64
{DA58E0CE-A660-44BD-B9D8-CC307F0C70E5}.Debug|x86.ActiveCfg = Debug|Any CPU
{DA58E0CE-A660-44BD-B9D8-CC307F0C70E5}.Debug|x86.Build.0 = Debug|Any CPU
{DA58E0CE-A660-44BD-B9D8-CC307F0C70E5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DA58E0CE-A660-44BD-B9D8-CC307F0C70E5}.Release|Any CPU.Build.0 = Release|Any CPU
{DA58E0CE-A660-44BD-B9D8-CC307F0C70E5}.Release|x64.ActiveCfg = Release|x64
{DA58E0CE-A660-44BD-B9D8-CC307F0C70E5}.Release|x64.Build.0 = Release|x64
{DA58E0CE-A660-44BD-B9D8-CC307F0C70E5}.Release|x86.ActiveCfg = Release|Any CPU
{DA58E0CE-A660-44BD-B9D8-CC307F0C70E5}.Release|x86.Build.0 = Release|Any CPU
{3DFF824A-0753-4A11-A343-16F860214268}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3DFF824A-0753-4A11-A343-16F860214268}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3DFF824A-0753-4A11-A343-16F860214268}.Debug|x64.ActiveCfg = Debug|x64
{3DFF824A-0753-4A11-A343-16F860214268}.Debug|x64.Build.0 = Debug|x64
{3DFF824A-0753-4A11-A343-16F860214268}.Debug|x86.ActiveCfg = Debug|Any CPU
{3DFF824A-0753-4A11-A343-16F860214268}.Debug|x86.Build.0 = Debug|Any CPU
{3DFF824A-0753-4A11-A343-16F860214268}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3DFF824A-0753-4A11-A343-16F860214268}.Release|Any CPU.Build.0 = Release|Any CPU
{3DFF824A-0753-4A11-A343-16F860214268}.Release|x64.ActiveCfg = Release|x64
{3DFF824A-0753-4A11-A343-16F860214268}.Release|x64.Build.0 = Release|x64
{3DFF824A-0753-4A11-A343-16F860214268}.Release|x86.ActiveCfg = Release|Any CPU
{3DFF824A-0753-4A11-A343-16F860214268}.Release|x86.Build.0 = Release|Any CPU
{0D7A2936-51DB-4B6F-906B-301E20141064}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0D7A2936-51DB-4B6F-906B-301E20141064}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0D7A2936-51DB-4B6F-906B-301E20141064}.Debug|x64.ActiveCfg = Debug|x64
{0D7A2936-51DB-4B6F-906B-301E20141064}.Debug|x64.Build.0 = Debug|x64
{0D7A2936-51DB-4B6F-906B-301E20141064}.Debug|x86.ActiveCfg = Debug|Any CPU
{0D7A2936-51DB-4B6F-906B-301E20141064}.Debug|x86.Build.0 = Debug|Any CPU
{0D7A2936-51DB-4B6F-906B-301E20141064}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0D7A2936-51DB-4B6F-906B-301E20141064}.Release|Any CPU.Build.0 = Release|Any CPU
{0D7A2936-51DB-4B6F-906B-301E20141064}.Release|x64.ActiveCfg = Release|x64
{0D7A2936-51DB-4B6F-906B-301E20141064}.Release|x64.Build.0 = Release|x64
{0D7A2936-51DB-4B6F-906B-301E20141064}.Release|x86.ActiveCfg = Release|Any CPU
{0D7A2936-51DB-4B6F-906B-301E20141064}.Release|x86.Build.0 = Release|Any CPU
{FAB114A2-2C6C-4372-A6BB-BC087B646E3A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FAB114A2-2C6C-4372-A6BB-BC087B646E3A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FAB114A2-2C6C-4372-A6BB-BC087B646E3A}.Debug|x64.ActiveCfg = Debug|x64
@ -235,6 +531,23 @@ Global
{1D4C8AD7-12E7-4987-98AF-AEE79F53E494} = {0159B0F1-0626-4BED-8D1B-CBFF4F12C369}
{440D06B8-E3DE-4C0D-AD25-CD4F43D836E1} = {1D4C8AD7-12E7-4987-98AF-AEE79F53E494}
{22D643D8-87D6-4FE8-9632-58A3CD3DC7CB} = {0159B0F1-0626-4BED-8D1B-CBFF4F12C369}
{2DD6F2F8-DFF4-4EE1-9D48-0FD692DB084D} = {4572CF94-B209-4479-85AB-59CA87BF5AFA}
{D242FDF9-F132-4154-BB9F-3F85C39F6F4C} = {4572CF94-B209-4479-85AB-59CA87BF5AFA}
{4C99DEEE-ED7A-4225-8127-3B1E6EDB39D0} = {4572CF94-B209-4479-85AB-59CA87BF5AFA}
{152C4B33-3B53-4180-B8BC-7BB0BC91A2ED} = {4572CF94-B209-4479-85AB-59CA87BF5AFA}
{47BC9F30-4DFF-4DEB-BFFE-1EC9735E6965} = {271ED3B3-976D-4253-85F5-E98CC86993D6}
{FC06FD19-DE12-42BF-908E-8391AF63DB7E} = {271ED3B3-976D-4253-85F5-E98CC86993D6}
{3F4CA1F0-0FA6-4191-B29D-1A283D13C55B} = {271ED3B3-976D-4253-85F5-E98CC86993D6}
{DF954594-A66A-42CF-87C4-73AFEAD782DE} = {271ED3B3-976D-4253-85F5-E98CC86993D6}
{11D83C2A-1B1E-4569-BCDB-8464382F6ACA} = {47BC9F30-4DFF-4DEB-BFFE-1EC9735E6965}
{52F59378-BF6D-453E-A8B4-A5825CE03918} = {47BC9F30-4DFF-4DEB-BFFE-1EC9735E6965}
{6A1CECD0-243E-4CAB-B612-BE815319FBD9} = {47BC9F30-4DFF-4DEB-BFFE-1EC9735E6965}
{F0C98EC0-7C46-4756-A072-2DBA5B1C2F54} = {47BC9F30-4DFF-4DEB-BFFE-1EC9735E6965}
{C315A49B-CC00-4439-9EE8-CF5FB8FDC672} = {FC06FD19-DE12-42BF-908E-8391AF63DB7E}
{C3D16D20-3633-4688-94CC-0FDE17322D6B} = {3F4CA1F0-0FA6-4191-B29D-1A283D13C55B}
{DA58E0CE-A660-44BD-B9D8-CC307F0C70E5} = {3F4CA1F0-0FA6-4191-B29D-1A283D13C55B}
{3DFF824A-0753-4A11-A343-16F860214268} = {DF954594-A66A-42CF-87C4-73AFEAD782DE}
{0D7A2936-51DB-4B6F-906B-301E20141064} = {D0AED517-9972-41CB-8751-983E4EB8F511}
{FAB114A2-2C6C-4372-A6BB-BC087B646E3A} = {B0EFDB12-C931-4E7F-A6C2-D4AC111D7EDF}
{387F3700-8C0B-4CEC-A68A-1725F656A249} = {B0EFDB12-C931-4E7F-A6C2-D4AC111D7EDF}
{3C1FC36C-E3E6-4EED-9ECA-CFF2EB950486} = {B0EFDB12-C931-4E7F-A6C2-D4AC111D7EDF}

Просмотреть файл

@ -9,6 +9,7 @@
<add key="myget-core" value="https://dotnet.myget.org/F/dotnet-core/api/v3/index.json" />
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
<add key="dotnet-wd" value="https://dotnetfeed.blob.core.windows.net/dotnet-windowsdesktop/index.json" />
<add key="aspnet-core" value="https://dotnetfeed.blob.core.windows.net/aspnet-aspnetcore/index.json" />
<!--
Add additional paths here
For e.g., if you want to test a locally build nuget package, you can add it like this:

Просмотреть файл

@ -4,19 +4,13 @@
# Parameters ARE available in template expressions, and parameters can have default values,
# so they can be used to control yaml flow.
#
# TODO:
# BuildMsBuildSdkPackages, _BuildMsBuildSdkPackages, _BuildMsBuildSdkPackagesArgs should be removed eventually, when
# Microsoft.DotNet.Arcade.Wpf.Sdk is moved from dnceng/dotnet-wpf-int to github/dotnet/wpf.
# When that move happens, there would be no need to suppress the Sdk build by default. Currently,
# allowing the Sdk to build every time will result in an infinite loop that triggers a dotnet/wpf built,
variables:
# clean the local repo on the build agents
Build.Repository.Clean: true
# When set to true in a manual built, it produces and publishes
# Microsoft.DotNet.Arcade.Wpf.Sdk
BuildMsBuildSdkPackages: false
_PublishUsingPipelines: true
_DotNetArtifactsCategory: WINDOWSDESKTOP

Просмотреть файл

@ -79,5 +79,9 @@
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-wpf-int</Uri>
<Sha>9d4340c064627887a27dff7681367124823fffd8</Sha>
</Dependency>
<Dependency Name="System.IO.Packaging" Version="4.6.0-preview6.19270.2" CoherentParentDependency="Microsoft.NETCore.App">
<Uri>https://github.com/dotnet/corefx</Uri>
<Sha>189766719a059512a515d488efc5c65c7abf0650</Sha>
</Dependency>
</ToolsetDependencies>
</Dependencies>

Просмотреть файл

@ -4,7 +4,7 @@
<VersionPrefix>4.8.0</VersionPrefix>
<PreReleaseVersionLabel>preview6</PreReleaseVersionLabel>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<SystemIOPackagingVersion>4.6.0-preview6.19264.8</SystemIOPackagingVersion>
<SystemIOPackagingVersion>4.6.0-preview6.19270.2</SystemIOPackagingVersion>
</PropertyGroup>
<!-- NuGet Package Versions -->
<PropertyGroup>
@ -57,6 +57,7 @@
<RestoreSources>
$(RestoreSources);
https://dotnet.myget.org/F/dotnet-corefxlab/api/v3/index.json;
https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json;
https://dotnetfeed.blob.core.windows.net/dotnet-windowsdesktop/index.json
</RestoreSources>
</PropertyGroup>
@ -67,6 +68,8 @@
<SystemDrawingCommonPackage>System.Drawing.Common</SystemDrawingCommonPackage>
<SystemDirectoryServicesPackage>System.DirectoryServices</SystemDirectoryServicesPackage>
<MicrosoftDotNetWpfDncEngPackage>Microsoft.DotNet.Wpf.DncEng</MicrosoftDotNetWpfDncEngPackage>
<SystemIOPackagingPackage>System.IO.Packaging</SystemIOPackagingPackage>
<SystemReflectionMetadataLoadContextPackage>System.Reflection.MetadataLoadContext</SystemReflectionMetadataLoadContextPackage>
</PropertyGroup>
<!--
This is a toolset dependency added for use *only* by tests

Просмотреть файл

@ -14,9 +14,6 @@
<PropertyGroup>
<GenXmlStringTable>$(WpfArcadeSdkToolsDir)GenXmlStringTable.pl</GenXmlStringTable>
<PublishWindowsPdb Condition="'$(IsShipping)'=='' And '$(IsPackagingProject)'!='true'">true</PublishWindowsPdb>
<LangVersion Condition="'$(LangVersion)'==''">8.0</LangVersion>
<CLSCompliant Condition="'$(CLSCompliant)'==''">true</CLSCompliant>
<IncludeDllSafeSearchPathAttribute Condition="'$(IncludeDllSafeSearchPathAttribute )'==''">true</IncludeDllSafeSearchPathAttribute>
@ -57,6 +54,11 @@
https://github.com/dotnet/arcade/issues/2304
-->
<NoWarn>$(NoWarn);NU3027</NoWarn>
<!--
Suppress NU1605 (Package downgrade warnings) when building inside Visual Studio
-->
<NoWarn Condition="'$(BuildingInsideVisualStudio)'=='true'">$(NoWarn);NU1605</NoWarn>
</PropertyGroup>
<!-- When an Sdk-style project sets NoTargets=true, it will produce no assemblies -->

Просмотреть файл

@ -3,6 +3,7 @@
<Import Project="$(WpfArcadeSdkToolsDir)Signing.targets" />
<Import Project="Sdk.targets" Sdk="Microsoft.DotNet.Arcade.Sdk" />
<Import Project="$(WpfArcadeSdkToolsDir)FolderPaths.targets"/>
<Import Project="$(WpfArcadeSdkToolsDir)RuntimeFrameworkReference.targets"/>
<Import Project="$(WpfArcadeSdkToolsDir)InlineTasks.targets" />
<Import Project="$(WpfArcadeSdkToolsDir)ShippingProjects.targets" />

Просмотреть файл

@ -2,6 +2,8 @@
<PropertyGroup>
<WpfCycleBreakersDir>$(RepoRoot)src\Microsoft.DotNet.Wpf\cycle-breakers\</WpfCycleBreakersDir>
<WpfSourceDir>$(RepoRoot)src\Microsoft.DotNet.Wpf\src\</WpfSourceDir>
<WpfSharedDir>$(WpfSourceDir)shared\</WpfSharedDir>
<WpfGraphicsPath>$(WpfSourceDir)WpfGfx\</WpfGraphicsPath>
<WpfGraphicsDir>$(WpfGraphicsPath)</WpfGraphicsDir>
<WpfPresentationNativeDir>$(WpfSourceDir)PresentationNative\</WpfPresentationNativeDir>
</PropertyGroup>
</Project>

Просмотреть файл

@ -0,0 +1,20 @@
<Project>
<PropertyGroup>
<!-- $(WpfSharedDir) is present in the current repository -->
<WpfSharedDir Condition="Exists('$(WpfSourceDir)shared\') And '$(RepositoryName)'!='dotnet-wpf-int'">$(WpfSourceDir)shared\</WpfSharedDir>
<!-- Consume from NuGet cache -->
<WpfSharedDir Condition="'$(WpfSharedDir)'=='' And Exists('$(WpfArcadeSdkRoot)src\shared\')">$(WpfArcadeSdkRoot)src\shared\</WpfSharedDir>
<!-- Consume from $(WpfTestArcadeWpfSdkPath) -->
<WpfSharedDir Condition="'$(WpfSharedDir)'=='' And Exists('$(WpfArcadeSdkRoot)..\..\src\Microsoft.DotNet.Wpf\src\Shared\')">$(WpfArcadeSdkRoot)..\..\src\Microsoft.DotNet.Wpf\src\Shared\</WpfSharedDir>
<!-- $(WpfCommonDir) is present in the current repository -->
<WpfCommonDir Condition="Exists('$(WpfSourceDir)Common\') And '$(RepositoryName)'!='dotnet-wpf-int'">$(WpfSourceDir)Common\</WpfCommonDir>
<!-- Consume from NuGet cache -->
<WpfCommonDir Condition="'$(WpfCommonDir)'=='' And Exists('$(WpfArcadeSdkRoot)src\Common\')">$(WpfArcadeSdkRoot)src\Common\</WpfCommonDir>
<!-- Consume from $(WpfTestArcadeWpfSdkPath) -->
<WpfCommonDir Condition="'$(WpfCommonDir)'=='' And Exists('$(WpfArcadeSdkRoot)..\..\src\Microsoft.DotNet.Wpf\src\Common\')">$(WpfArcadeSdkRoot)..\..\src\Microsoft.DotNet.Wpf\src\Common\</WpfCommonDir>
<WpfTracingDir>$(WpfSharedDir)Tracing\</WpfTracingDir>
</PropertyGroup>
</Project>

Просмотреть файл

@ -57,7 +57,9 @@
-->
<ItemGroup>
<Reference Include="$(PkgMicrosoft_NETCore_App)\ref\$(TargetFramework)\%(NetCoreReference.Identity).dll"
Condition="Exists('$(PkgMicrosoft_NETCore_App)\ref\$(TargetFramework)\%(NetCoreReference.Identity).dll')" />
Condition="Exists('$(PkgMicrosoft_NETCore_App)\ref\$(TargetFramework)\%(NetCoreReference.Identity).dll')" >
<NuGetPackageId>Microsoft.NetCore.App</NuGetPackageId>
</Reference>
</ItemGroup>
</Target>
@ -102,7 +104,7 @@
<Target Name="ResolveMicrosoftWindowsDesktopAppReferences"
Returns="@(Reference)"
Condition="'$(PkgMicrosoft_WindowsDesktop_App)'!='' And '@(WindowsDesktopAppeference)'!='' and $(TargetFramework.StartsWith('netcoreapp3')) and '$(DoNotLimitWindowsDesktopAppReferences)'!='true'">
Condition="'$(PkgMicrosoft_WindowsDesktop_App)'!='' And '@(WindowsDesktopAppReference)'!='' and $(TargetFramework.StartsWith('netcoreapp3')) and '$(DoNotLimitWindowsDesktopAppReferences)'!='true'">
<!--
In your project, Add a references to assemblies from Microsoft.NETCore.App like this
<ItemGroup>
@ -112,7 +114,9 @@
-->
<ItemGroup>
<Reference Include="$(PkgMicrosoft_WindowsDesktop_App)\ref\$(TargetFramework)\%(NetCoreReference.Identity).dll"
Condition="Exists('$(PkgMicrosoft_WindowsDesktop_App)\ref\$(TargetFramework)\%(NetCoreReference.Identity).dll')" />
Condition="Exists('$(PkgMicrosoft_WindowsDesktop_App)\ref\$(TargetFramework)\%(NetCoreReference.Identity).dll')">
<NuGetPackageId>Microsoft.WindowsDesktop.App</NuGetPackageId>
</Reference>
</ItemGroup>
</Target>
@ -170,7 +174,9 @@
-->
<ItemGroup>
<Reference Include="$(PkgMicrosoft_DotNet_Wpf_GitHub)\ref\$(TargetFramework)\%(MicrosoftDotNetWpfGitHubReference.Identity).dll"
Condition="Exists('$(PkgMicrosoft_DotNet_Wpf_GitHub)\ref\$(TargetFramework)\%(MicrosoftDotNetWpfGitHubReference.Identity).dll')"/>
Condition="Exists('$(PkgMicrosoft_DotNet_Wpf_GitHub)\ref\$(TargetFramework)\%(MicrosoftDotNetWpfGitHubReference.Identity).dll')">
<NuGetPackageId>Microsoft.DotNet.Wpf.GitHub</NuGetPackageId>
</Reference>
</ItemGroup>
</Target>
@ -190,7 +196,9 @@
Condition="'@(MicrosoftPrivateWinFormsReference)'!='' And $(TargetFramework.StartsWith('netcoreapp3'))">
<ItemGroup>
<Reference Include="$(PkgMicrosoft_Private_Winforms)\ref\$(TargetFramework)\%(MicrosoftPrivateWinFormsReference.Identity).dll"
Condition="Exists('$(PkgMicrosoft_Private_Winforms)\ref\$(TargetFramework)\%(MicrosoftPrivateWinFormsReference.Identity).dll')"/>
Condition="Exists('$(PkgMicrosoft_Private_Winforms)\ref\$(TargetFramework)\%(MicrosoftPrivateWinFormsReference.Identity).dll')">
<NuGetPackageId>Microsoft.Private.Winforms</NuGetPackageId>
</Reference>
</ItemGroup>
</Target>
</Project>

Просмотреть файл

@ -2,24 +2,29 @@
<PropertyGroup>
<ExternalShippingProjects>
System.Xaml;
PresentationBuildTasks
</ExternalShippingProjects>
<InternalShippingProjects>
PresentationBuildTasks;
PresentationCore;
DirectWriteForwarder;
PresentationCore-CommonResources;
PresentationFramework;
ReachFramework;
UIAutomationClient;
UIAutomationClientSideProviders;
UIAutomationProvider;
UIAutomationTypes;
WindowsBase;
System.Windows.Input.Manipulations;
</ExternalShippingProjects>
<InternalShippingProjects>
PresentationFramework-SystemCore;
PresentationFramework-SystemData;
PresentationFramework-SystemDrawing;
PresentationFramework-SystemXml;
PresentationFramework-SystemXmlLinq;
PresentationUI;
ReachFramework;
System.Printing;
System.Windows.Controls.Ribbon;
System.Windows.Input.Manipulations;
System.Windows.Presentation;
PresentationFramework.Aero;
PresentationFramework.Aero2;
@ -27,11 +32,6 @@
PresentationFramework.Classic;
PresentationFramework.Luna;
PresentationFramework.Royale;
UIAutomationClient;
UIAutomationClientSideProviders;
UIAutomationProvider;
UIAutomationTypes;
WindowsBase;
WindowsFormsIntegration;
PenImc;
PresentationNative;

Просмотреть файл

@ -4,5 +4,7 @@
<ExcludeRefAssemblies Condition="'$(PackageName)'=='$(WindowsDesktopSdkPackageName)'">true</ExcludeRefAssemblies>
<ExcludePdbs Condition="'$(PackageName)'=='$(WindowsDesktopSdkPackageName)'">true</ExcludePdbs>
<IncludeAssembliesInArchNeutralPackage Condition="'$(PackageName)'=='$(WindowsDesktopSdkPackageName)'">true</IncludeAssembliesInArchNeutralPackage>
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
<PublishWindowsPdb Condition="'$(IsShipping)'=='true' And '$(IsPackagingProject)'!='true'">true</PublishWindowsPdb>
</PropertyGroup>
</Project>

Просмотреть файл

@ -1,27 +1,131 @@
<Project>
<PropertyGroup Condition="'$(WpfTest)'=='true'">
<PropertyGroup Condition="'$(WpfTest)'=='true' Or '$(IsTestProject)'=='true'">
<RuntimeIdentifier Condition="('$(Platform)'!='AnyCPU' and '$(Platform)'!='Win32') Or $(Platform.EndsWith('64'))">win-$(Platform)</RuntimeIdentifier>
<RuntimeIdentifier Condition="'$(Platform)'=='AnyCPU' or '$(Platform)'=='Win32' or '$(Platform)'=='x86'">win-x86</RuntimeIdentifier>
</PropertyGroup>
<!-- Arcade SDK defaults to AnyCpu ~= x64. In WPF, we will map AnyCpu => x86 instead -->
<PropertyGroup Condition="'$(IsTestProject)' == 'true' or '$(WpfTest)'=='true'">
<TestArchitectures Condition="'$(PlatformTarget)' == '' or '$(PlatformTarget)' == 'AnyCpu'">x86</TestArchitectures>
<ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>None</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<IsSelfContained>true</IsSelfContained>
</PropertyGroup>
<ItemGroup Condition="'$(WpfTest)'=='true'">
<PackageReference Include="runtime.$(RuntimeIdentifier).$(MicrosoftDotNetWpfDncEngPackage)"
<ItemGroup Condition="'$(IsTestProject)' == 'true' or '$(WpfTest)'=='true'">
<!--
Only reference Microsoft.DotNet.Wpf.DncEng when building tests in dotnet/wpf
This references is not needed when building tests in dotnet-wpf-int
-->
<PackageReference Include="runtime.$(RuntimeIdentifier).$(MicrosoftDotNetWpfDncEngPackage)"
Condition="'$(RepositoryName)'=='wpf'"
Version="$(MicrosoftDotNetWpfDncEngVersion)">
<CopyLocal>true</CopyLocal>
<GeneratePathProperty>true</GeneratePathProperty>
</PackageReference>
<!--
PackageReference from individual WPF projects here
-->
<PackageReference Include="$(SystemIOPackagingPackage)" Version="$(SystemIOPackagingVersion)" CopyLocal="true" />
<PackageReference Include="Microsoft.Win32.Registry" Version="$(MicrosoftWin32RegistryPackageVersion)" />
<PackageReference Include="System.Configuration.ConfigurationManager" Version="$(SystemConfigurationConfigurationManagerPackageVersion)" CopyLocal="true" />
<PackageReference Include="System.Diagnostics.EventLog" Version="$(SystemDiagnosticsEventLogPackageVersion)" CopyLocal="true" />
<PackageReference Include="System.Security.Cryptography.Xml" Version="$(SystemSecurityCryptographyXmlPackageVersion)" CopyLocal="true" />
<PackageReference Include="System.Security.Permissions" Version="$(SystemSecurityPermissionsPackageVersion)" CopyLocal="true" />
<PackageReference Include="System.Windows.Extensions" Version="$(SystemWindowsExtensionsPackageVersion)" CopyLocal="true" />
<PackageReference Include="System.Security.AccessControl" Version="$(SystemSecurityAccessControlPackageVersion)" CopyLocal="true" />
<PackageReference Include="System.Security.Principal.Windows" Version="$(SystemSecurityPrincipalWindowsPackageVersion)" CopyLocal="true" />
<!-- These exist to ensure that dependencies (esp. native ones) are binplaced with tests correctly -->
<None Condition="'$(RuntimeIdentifier)'=='win-x64'"
Include="$(Pkgruntime_win-x64_Microsoft_DotNet_Wpf_DncEng)\runtimes\$(RuntimeIdentifier)\native\*.dll"
<None Condition="'$(RuntimeIdentifier)'=='win-x64'"
Include="$(Pkgruntime_win-x64_Microsoft_DotNet_Wpf_DncEng)\runtimes\$(RuntimeIdentifier)\native\*.dll"
CopyToOutputDirectory="PreserveNewest"/>
<None Condition="'$(RuntimeIdentifier)'=='win-x86'"
Include="$(Pkgruntime_win-x86_Microsoft_DotNet_Wpf_DncEng)\runtimes\$(RuntimeIdentifier)\native\*.dll"
Include="$(Pkgruntime_win-x86_Microsoft_DotNet_Wpf_DncEng)\runtimes\$(RuntimeIdentifier)\native\*.dll"
CopyToOutputDirectory="PreserveNewest"/>
<_wpfProjectsNotWindowsBase Include="@(WpfProjectPath)" Exclude="WindowsBase" />
<_wpfProjectsWindowsBase Include="@(WpfProjectPath)" Exclude="@(_wpfProjectsWindowsBase)" />
<!--
Do not include WindowsBase. There is a bug in the SDK that will prevent proper deps.json generation when WindowsBase.csproj
and Microsoft.NetCore.App/WindowsBase.dll clash. Part of the problem is due to https://github.com/dotnet/sdk/issues/2674.
Directly referencing DLL's works correctly and generates good deps.json. So instead of reference WindowsBase.csproj, just
obtain the raw path to WindowsBase.dll and add it to @(Reference). This is safe to do since
WindowsBase will be built as a transitive reference via PresentationCore, PresentationFramework etc.
Also make sure that Microsoft.NetCore.App/WindowsBase.dll is removed from @(Reference).
-->
<ProjectReference Include="@(_wpfProjectsNotWindowsBase->'%(ProjectPath)')" >
<Private>True</Private>
<OutputItemType>_wpfProjectReferenceLocallyBuildAssemblies</OutputItemType>
</ProjectReference>
<ProjectReference Include="@(_wpfProjectsWindowsBase->'%(ProjectPath)')" >
<Private>True</Private>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
<OutputItemType>_windowsBaseAssemblyLocallyBuiltPath</OutputItemType>
</ProjectReference>
</ItemGroup>
<PropertyGroup Condition="'$(WpfTest)'=='true' or '$(IsTestProject)'=='true'">
<ResolveAssemblyReferencesDependsOn>
AddWindowsBaseToReferences;
$(ResolveAssemblyReferencesDependsOn)
</ResolveAssemblyReferencesDependsOn>
</PropertyGroup>
<Target Name="AddWindowsBaseToReferences">
<ItemGroup>
<Reference Include="%(_windowsBaseAssemblyLocallyBuiltPath.FullPath)" />
</ItemGroup>
</Target>
<Target Name="RemoveWindowsBaseNetCoreAppReference"
AfterTargets="ResolveTargetingPacks"
Returns="@(Reference)"
Condition="'$(WpfTest)'=='true' or '$(IsTestProject)'=='true'">
<ItemGroup>
<Reference Remove="@(Reference)" Condition="'%(FileName)'=='WindowsBase' and '%(Reference.ResolvedFrom)'=='TargetingPack'" />
</ItemGroup>
</Target>
<!--
This target ensures that Microsoft.DotNet.Wpf.DncEng would not inadvertently over-supply references that
are already satisfied by ProjectReference's from within this repo. This should almost never happen, except
when $(MicrosoftDotNetWpfDncEngVersion) is set to something really old (something that was built <= 05/22/2019)
-->
<Target
Name="LimitMicrosoftDotNetDncEngReferences"
AfterTargets="ResolveTargetingPacks"
Returns="@(Reference)"
Condition="'$(WpfTest)'=='true' or '$(IsTestProject)'=='true'">
<ItemGroup>
<_microsoftDotNetDncEngRefs Remove="@(_microsoftDotNetDncEngRefs)" />
<_microsoftDotNetDncEngRefs Include="@(Reference)"
Condition="'%(Reference.NuGetPackageId)'=='runtime.$(RuntimeIdentifier).Microsoft.DotNet.Wpf.DncEng'">
<OriginalPath>%(Reference.Identity)</OriginalPath>
</_microsoftDotNetDncEngRefs>
</ItemGroup>
<ItemGroup>
<_microsoftDotNetDncEngReferences Remove="@(_microsoftDotNetDncEngReferences)" />
</ItemGroup>
<FilterItem1ByItem2 Item1="@(_microsoftDotNetDncEngRefs->'%(FileName)')"
Item2="@(_wpfProjectReferenceLocallyBuildAssemblies->'%(FileName)')"
Metadata2="Identity"
PreserveItem1Metadata="true">
<Output ItemName="_microsoftDotNetDncEngReferencesToAvoid" TaskParameter="Result" />
</FilterItem1ByItem2>
<ItemGroup>
<Reference Remove="@(_microsoftDotNetDncEngReferencesToAvoid->'%(OriginalPath)')"/>
</ItemGroup>
</Target>
</Project>

Просмотреть файл

@ -1,380 +0,0 @@
src/Microsoft.DotNet.Wpf/src/Common/Graphics/Generated/wgx_commands.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Generated/ContentElement.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Generated/TextDecoration.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Generated/TextDecorationCollection.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Generated/TextDecorationLocation.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Generated/TextDecorationUnit.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Generated/UIElement.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Generated/UIElement3D.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Animatable.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/BooleanAnimationBase.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/BooleanAnimationUsingKeyFrames.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/BooleanKeyFrameCollection.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ByteAnimation.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ByteAnimationBase.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ByteAnimationUsingKeyFrames.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ByteKeyFrameCollection.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/CharAnimationBase.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/CharAnimationUsingKeyFrames.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/CharKeyFrameCollection.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ColorAnimation.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ColorAnimationBase.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ColorAnimationUsingKeyFrames.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ColorIndependentAnimationStorage.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ColorKeyFrameCollection.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/DecimalAnimation.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/DecimalAnimationBase.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/DecimalAnimationUsingKeyFrames.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/DecimalKeyFrameCollection.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/DiscreteKeyFrames.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/DoubleAnimation.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/DoubleAnimationBase.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/DoubleAnimationClockResource.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/DoubleAnimationUsingKeyFrames.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/DoubleIndependentAnimationStorage.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/DoubleKeyFrameCollection.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/EasingKeyFrames.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int16Animation.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int16AnimationBase.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int16AnimationUsingKeyFrames.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int16KeyFrameCollection.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int32Animation.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int32AnimationBase.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int32AnimationUsingKeyFrames.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int32KeyFrameCollection.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int64Animation.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int64AnimationBase.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int64AnimationUsingKeyFrames.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int64KeyFrameCollection.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/KeyFrames.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/LinearKeyFrames.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/MatrixAnimationBase.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/MatrixAnimationUsingKeyFrames.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/MatrixIndependentAnimationStorage.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/MatrixKeyFrameCollection.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ObjectAnimationBase.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ObjectAnimationUsingKeyFrames.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ObjectKeyFrameCollection.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ParallelTimeline.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Point3DAnimation.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Point3DAnimationBase.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Point3DAnimationUsingKeyFrames.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Point3DIndependentAnimationStorage.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Point3DKeyFrameCollection.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/PointAnimation.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/PointAnimationBase.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/PointAnimationClockResource.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/PointAnimationUsingKeyFrames.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/PointIndependentAnimationStorage.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/PointKeyFrameCollection.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/QuaternionAnimation.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/QuaternionAnimationBase.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/QuaternionAnimationUsingKeyFrames.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/QuaternionIndependentAnimationStorage.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/QuaternionKeyFrameCollection.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/RectAnimation.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/RectAnimationBase.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/RectAnimationClockResource.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/RectAnimationUsingKeyFrames.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/RectIndependentAnimationStorage.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/RectKeyFrameCollection.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Rotation3DAnimation.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Rotation3DAnimationBase.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Rotation3DAnimationUsingKeyFrames.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Rotation3DKeyFrameCollection.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/SingleAnimation.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/SingleAnimationBase.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/SingleAnimationUsingKeyFrames.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/SingleKeyFrameCollection.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/SizeAnimation.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/SizeAnimationBase.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/SizeAnimationClockResource.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/SizeAnimationUsingKeyFrames.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/SizeIndependentAnimationStorage.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/SizeKeyFrameCollection.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/SplineKeyFrames.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/StringAnimationBase.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/StringAnimationUsingKeyFrames.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/StringKeyFrameCollection.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Timeline.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/TimelineCollection.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/TimelineGroup.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Vector3DAnimation.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Vector3DAnimationBase.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Vector3DAnimationUsingKeyFrames.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Vector3DIndependentAnimationStorage.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Vector3DKeyFrameCollection.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/VectorAnimation.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/VectorAnimationBase.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/VectorAnimationUsingKeyFrames.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/VectorKeyFrameCollection.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Converters/Generated/BrushValueSerializer.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Converters/Generated/CacheModeValueSerializer.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Converters/Generated/DoubleCollectionValueSerializer.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Converters/Generated/GeometryValueSerializer.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Converters/Generated/Int32CollectionValueSerializer.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Converters/Generated/PathFigureCollectionValueSerializer.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Converters/Generated/PointCollectionValueSerializer.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Converters/Generated/TransformValueSerializer.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Converters/Generated/VectorCollectionValueSerializer.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/BevelBitmapEffect.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/BitmapEffect.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/BitmapEffectCollection.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/BitmapEffectGroup.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/BitmapEffectInput.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/BlurBitmapEffect.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/BlurEffect.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/DropShadowBitmapEffect.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/DropShadowEffect.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/EdgeProfile.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/Effect.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/EmbossBitmapEffect.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/ImplicitInputBrush.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/KernelType.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/OuterGlowBitmapEffect.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/PixelShader.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/RenderingBias.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/ShaderEffect.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/ShaderRenderMode.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/AlignmentX.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/AlignmentY.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/ArcSegment.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/BezierSegment.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/BitmapCache.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/BitmapCacheBrush.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/BitmapScalingMode.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/Brush.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/BrushConverter.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/BrushMappingMode.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/CacheMode.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/CacheModeConverter.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/CachingHint.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/ClearTypeHint.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/ColorCollectionConverter.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/ColorInterpolationMode.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/CombinedGeometry.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DashStyle.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DoubleCollection.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DoubleCollectionConverter.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/Drawing.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DrawingBrush.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DrawingCollection.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DrawingContext.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DrawingContextDrawingContextWalker.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DrawingContextWalker.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DrawingGroup.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DrawingImage.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/EdgeMode.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/EllipseGeometry.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/FillRule.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GeneralTransform.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GeneralTransformCollection.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GeneralTransformGroup.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/Geometry.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GeometryCollection.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GeometryCombineMode.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GeometryConverter.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GeometryDrawing.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GeometryGroup.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GlyphRunDrawing.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GradientBrush.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GradientSpreadMethod.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GradientStop.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GradientStopCollection.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GuidelineSet.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/ImageBrush.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/ImageDrawing.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/ImageSource.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/Int32Collection.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/Int32CollectionConverter.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/LineGeometry.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/LineSegment.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/LinearGradientBrush.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/MatrixTransform.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/MediaTimeline.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PathFigure.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PathFigureCollection.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PathFigureCollectionConverter.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PathGeometry.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PathSegment.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PathSegmentCollection.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/Pen.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PenDashCap.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PenLineCap.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PenLineJoin.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PointCollection.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PointCollectionConverter.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PolyBezierSegment.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PolyBezierSegmentFigureLogic.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PolyLineSegment.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PolyLineSegmentFigureLogic.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PolyQuadraticBezierSegment.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PolyQuadraticBezierSegmentFigureLogic.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/QuadraticBezierSegment.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/RadialGradientBrush.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/RectangleGeometry.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/RenderData.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/RenderDataDrawingContext.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/RotateTransform.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/Rotation.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/ScaleTransform.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/SkewTransform.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/SolidColorBrush.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/StreamGeometry.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/Stretch.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/SweepDirection.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TextEffect.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TextEffectCollection.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TextHintingMode.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TextRenderingMode.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TileBrush.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TileMode.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/ToleranceType.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/Transform.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TransformCollection.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TransformConverter.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TransformGroup.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TranslateTransform.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/VectorCollection.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/VectorCollectionConverter.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/VideoDrawing.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/VisualBrush.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/Generated/BitmapImage.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/Generated/ColorConvertedBitmap.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/Generated/CroppedBitmap.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/Generated/FormatConvertedBitmap.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/Generated/TransformedBitmap.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Converters/Generated/Matrix3DValueSerializer.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Converters/Generated/Point3DCollectionValueSerializer.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Converters/Generated/Point3DValueSerializer.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Converters/Generated/Point4DValueSerializer.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Converters/Generated/QuaternionValueSerializer.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Converters/Generated/Rect3DValueSerializer.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Converters/Generated/Size3DValueSerializer.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Converters/Generated/Vector3DCollectionValueSerializer.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Converters/Generated/Vector3DValueSerializer.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/AffineTransform3D.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/AmbientLight.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/AxisAngleRotation3D.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Camera.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/DiffuseMaterial.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/DirectionalLight.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/EmissiveMaterial.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/GeneralTransform3D.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/GeneralTransform3DCollection.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/GeneralTransform3DGroup.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Geometry3D.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/GeometryModel3D.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Light.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Material.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/MaterialCollection.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/MaterialGroup.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Matrix3D.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Matrix3DConverter.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/MatrixCamera.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/MatrixTransform3D.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/MeshGeometry3D.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Model3D.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Model3DCollection.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Model3DGroup.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/OrthographicCamera.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/PerspectiveCamera.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Point3D.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Point3DCollection.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Point3DCollectionConverter.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Point3DConverter.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Point4D.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Point4DConverter.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/PointLight.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/PointLightBase.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/ProjectionCamera.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Quaternion.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/QuaternionConverter.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/QuaternionRotation3D.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Rect3D.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Rect3DConverter.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/RotateTransform3D.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Rotation3D.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/ScaleTransform3D.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Size3D.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Size3DConverter.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/SpecularMaterial.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/SpotLight.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Transform3D.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Transform3DCollection.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Transform3DGroup.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/TranslateTransform3D.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Vector3D.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Vector3DCollection.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Vector3DCollectionConverter.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Vector3DConverter.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Visual3D.cs
src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Generated/FrameworkContentElement.cs
src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Generated/FrameworkElement.cs
src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Media/Animation/Generated/DiscreteKeyFrames.cs
src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Media/Animation/Generated/EasingKeyFrames.cs
src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Media/Animation/Generated/KeyFrames.cs
src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Media/Animation/Generated/LinearKeyFrames.cs
src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Media/Animation/Generated/SplineKeyFrames.cs
src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Media/Animation/Generated/ThicknessAnimation.cs
src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Media/Animation/Generated/ThicknessAnimationBase.cs
src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Media/Animation/Generated/ThicknessAnimationUsingKeyFrames.cs
src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Media/Animation/Generated/ThicknessKeyFrameCollection.cs
src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/AlignmentXValidation.cs
src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/AlignmentYValidation.cs
src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/BitmapScalingModeValidation.cs
src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/BrushMappingModeValidation.cs
src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/CachingHintValidation.cs
src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/ClearTypeHintValidation.cs
src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/ColorInterpolationModeValidation.cs
src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/EdgeModeValidation.cs
src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/EdgeProfileValidation.cs
src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/FillRuleValidation.cs
src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/GeometryCombineModeValidation.cs
src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/GradientSpreadMethodValidation.cs
src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/KernelTypeValidation.cs
src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/PenLineCapValidation.cs
src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/PenLineJoinValidation.cs
src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/RenderingBiasValidation.cs
src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/RotationValidation.cs
src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/ShaderRenderModeValidation.cs
src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/StretchValidation.cs
src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/SweepDirectionValidation.cs
src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/TextDecorationLocationValidation.cs
src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/TextDecorationUnitValidation.cs
src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/TextHintingModeValidation.cs
src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/TextRenderingModeValidation.cs
src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/TileModeValidation.cs
src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/MS/Internal/Generated/DoubleUtil.cs
src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Generated/PropertyHelper.cs
src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Generated/TreeHelper.cs
src/Microsoft.DotNet.Wpf/src/WindowsBase/System/Windows/Converters/Generated/Int32RectValueSerializer.cs
src/Microsoft.DotNet.Wpf/src/WindowsBase/System/Windows/Converters/Generated/PointValueSerializer.cs
src/Microsoft.DotNet.Wpf/src/WindowsBase/System/Windows/Converters/Generated/RectValueSerializer.cs
src/Microsoft.DotNet.Wpf/src/WindowsBase/System/Windows/Converters/Generated/SizeValueSerializer.cs
src/Microsoft.DotNet.Wpf/src/WindowsBase/System/Windows/Converters/Generated/VectorValueSerializer.cs
src/Microsoft.DotNet.Wpf/src/WindowsBase/System/Windows/Generated/Int32Rect.cs
src/Microsoft.DotNet.Wpf/src/WindowsBase/System/Windows/Generated/Int32RectConverter.cs
src/Microsoft.DotNet.Wpf/src/WindowsBase/System/Windows/Generated/Point.cs
src/Microsoft.DotNet.Wpf/src/WindowsBase/System/Windows/Generated/PointConverter.cs
src/Microsoft.DotNet.Wpf/src/WindowsBase/System/Windows/Generated/Rect.cs
src/Microsoft.DotNet.Wpf/src/WindowsBase/System/Windows/Generated/RectConverter.cs
src/Microsoft.DotNet.Wpf/src/WindowsBase/System/Windows/Generated/Size.cs
src/Microsoft.DotNet.Wpf/src/WindowsBase/System/Windows/Generated/SizeConverter.cs
src/Microsoft.DotNet.Wpf/src/WindowsBase/System/Windows/Generated/Vector.cs
src/Microsoft.DotNet.Wpf/src/WindowsBase/System/Windows/Generated/VectorConverter.cs
src/Microsoft.DotNet.Wpf/src/WindowsBase/System/Windows/Media/Converters/Generated/MatrixValueSerializer.cs
src/Microsoft.DotNet.Wpf/src/WindowsBase/System/Windows/Media/Generated/Matrix.cs
src/Microsoft.DotNet.Wpf/src/WindowsBase/System/Windows/Media/Generated/MatrixConverter.cs
src/Microsoft.DotNet.Wpf/src/WpfGfx/codegen/mcg/ResourceModel/Generated/Elements.cs
src/Microsoft.DotNet.Wpf/src/WpfGfx/include/Generated/wgx_command_types.cs
src/Microsoft.DotNet.Wpf/src/WpfGfx/include/Generated/wgx_command_types.h
src/Microsoft.DotNet.Wpf/src/WpfGfx/include/Generated/wgx_commands.cs
src/Microsoft.DotNet.Wpf/src/WpfGfx/include/Generated/wgx_commands.h
src/Microsoft.DotNet.Wpf/src/WpfGfx/include/Generated/wgx_misc.cs
src/Microsoft.DotNet.Wpf/src/WpfGfx/include/Generated/wgx_misc.h
src/Microsoft.DotNet.Wpf/src/WpfGfx/include/Generated/wgx_render_types_generated.h
src/Microsoft.DotNet.Wpf/src/WpfGfx/include/Generated/wgx_renderdata_commands.h
src/Microsoft.DotNet.Wpf/src/WpfGfx/include/Generated/wgx_resource_types.cs
src/Microsoft.DotNet.Wpf/src/WpfGfx/include/Generated/wgx_resource_types.h
src/Microsoft.DotNet.Wpf/src/WpfGfx/include/Generated/wincodec_private_generated.h

Просмотреть файл

@ -253,12 +253,6 @@
<!-- WPF builds have historically used StdCall by default for all x86 native C++ builds -->
<CallingConvention Condition="('$(ManagedCxx)'=='false') And ('$(Architecture)'=='x86')">StdCall</CallingConvention>
<AdditionalIncludeDirectories Condition="Exists('$(WpfSharedDir)inc\')">%(AdditionalIncludeDirectories);$(WpfSharedDir)inc\</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories Condition="Exists('$(WpfCommonDir)inc\')">%(AdditionalIncludeDirectories);$(WpfCommonDir)inc\</AdditionalIncludeDirectories>
<ForcedIncludeFiles>ddbanned.h</ForcedIncludeFiles>
<!-- See https://developercommunity.visualstudio.com/content/problem/297504/all-cppwinrt-code-fails-to-build-from-abi-and-to-a.html -->
<!--<AdditionalOptions>/Zc:twoPhase- %(AdditionalOptions)</AdditionalOptions>-->
<!--<ConformanceMode>false</ConformanceMode>-->

Просмотреть файл

@ -25,7 +25,10 @@
<ItemDefinitionGroup>
<ClCompile>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(NativeVersionFileDirectory)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories Condition="Exists('$(WpfSharedDir)inc\')">%(AdditionalIncludeDirectories);$(WpfSharedDir)inc\</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories Condition="Exists('$(WpfCommonDir)inc\')">%(AdditionalIncludeDirectories);$(WpfCommonDir)inc\</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(NativeVersionFileDirectory);$(WpfTracingDir)native\</AdditionalIncludeDirectories>
<ForcedIncludeFiles>$(WpfSharedDir)inc\ddbanned.h</ForcedIncludeFiles>
</ClCompile>
<ResourceCompile>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(NativeVersionFileDirectory)</AdditionalIncludeDirectories>
@ -212,7 +215,7 @@ using namespace System::Runtime::Versioning;
</PropertyGroup>
<ItemGroup>
<CppClrSupportProject Include="Project">
<CppClrSupportProject Include="ProjectHeader">
<!--
In the CDATA section that follows,
%40 ~= @
@ -227,12 +230,27 @@ using namespace System::Runtime::Versioning;
<TargetFramework>netcoreapp3.0</TargetFramework>
<Platforms>AnyCPU%3Bx64</Platforms>
</PropertyGroup>
]]>
</Text>
</CppClrSupportProject>
<!--
We need a reference to Microsoft.DotNet.Wpf.GitHub when building from dotnet-wpf-int.
When building from dotnet/wpf, this refernece is not needed.
-->
<CppClrSupportProject Include="MicrosoftDotNetWpfGitHubPackageReference" Condition="'$(RepoLocation)'=='Internal'">
<Text>
<![CDATA[
<ItemGroup>
<PackageReference Include="$(MicrosoftDotNetWpfGitHubPackage)" Version="$(MicrosoftDotNetWpfGitHubVersion)" />
</ItemGroup>
<!-- Ensure that LimitMicrosoftDotNetWpfGitHubReferences target doesn't run -->
]]>
</Text>
</CppClrSupportProject>
<CppClrSupportProject Include="ProjectBody">
<Text>
<![CDATA[
<!-- Ensure that LimitMicrosoftDotNetWpfGitHubReferences target doesn't run -->
<PropertyGroup>
<DoNotLimitMicrosoftDotNetWpfGitHubReferences>true</DoNotLimitMicrosoftDotNetWpfGitHubReferences>
</PropertyGroup>
@ -283,9 +301,11 @@ using namespace System::Runtime::Versioning;
<MakeDir Condition="!Exists('$(IntermediateOutputPath)CppCliSupport\')"
Directories="$(IntermediateOutputPath)CppCliSupport\" />
<Delete Files="$(CppCliHelperProject)" Condition="Exists('$(CppCliHelperProject)')" />
<WriteLinesToFile Lines="%(CppClrSupportProject.Text)"
File="$(CppCliHelperProject)"
Overwrite="true"/>
Overwrite="false"/>
<!--
Do not build - just ask ResolveReferences + IdentifyNetCoreReferences for the information

Просмотреть файл

@ -11,7 +11,9 @@
<WpfProjectPath Include="System.Xaml" ProjectPath="$(WpfSourceDir)System.Xaml\System.Xaml.csproj" />
<WpfProjectPath Include="WindowsBase" ProjectPath="$(WpfSourceDir)WindowsBase\WindowsBase.csproj" />
<WpfProjectPath Include="PresentationCore-CommonResources" ProjectPath="$(WpfSourceDir)PresentationCore-CommonResources\PresentationCore-CommonResources.csproj" />
<WpfProjectPath Include="DirectWriteForwarder" ProjectPath="$(WpfSourceDir)DirectWriteForwarder\DirectWriteForwarder.vcxproj" />
<WpfProjectPath Include="DirectWriteForwarder" ProjectPath="$(WpfSourceDir)DirectWriteForwarder\DirectWriteForwarder.vcxproj">
<UndefineProperties>TargetFramework;TargetFrameworks</UndefineProperties>
</WpfProjectPath>
<WpfProjectPath Include="System.Windows.Input.Manipulations" ProjectPath="$(WpfSourceDir)System.Windows.Input.Manipulations\System.Windows.Input.Manipulations.csproj" />
<WpfProjectPath Include="WindowsFormsIntegration" ProjectPath="$(WpfSourceDir)WindowsFormsIntegration\WindowsFormsIntegration.csproj" />
@ -19,7 +21,9 @@
<WpfProjectPath Include="PresentationFramework" ProjectPath="$(WpfSourceDir)PresentationFramework\PresentationFramework.csproj" />
<WpfProjectPath Include="PresentationUI" ProjectPath="$(WpfSourceDir)PresentationUI\PresentationUI.csproj" />
<WpfProjectPath Include="ReachFramework" ProjectPath="$(WpfSourceDir)ReachFramework\ReachFramework.csproj" />
<WpfProjectPath Include="System.Printing" ProjectPath="$(WpfSourceDir)System.Printing\System.Printing.csproj" />
<WpfProjectPath Include="System.Printing" ProjectPath="$(WpfSourceDir)System.Printing\System.Printing.csproj">
<UndefineProperties>TargetFramework;TargetFrameworks</UndefineProperties>
</WpfProjectPath>
<WpfProjectPath Include="System.Windows.Controls.Ribbon" ProjectPath="$(WpfSourceDir)System.Windows.Controls.Ribbon\System.Windows.Controls.Ribbon.csproj" />
<WpfProjectPath Include="System.Windows.Presentation" ProjectPath="$(WpfSourceDir)System.Windows.Presentation\System.Windows.Presentation.csproj" />

Просмотреть файл

@ -1,51 +0,0 @@
#!/bin/sh
# WPF generated files should only be modified by the file generation scripts.
# This hook prevents users from committing generated files locally. Generated
# files should only be modified by the file generation scripts. The hook
# references a list of generated files that are not allowed to be committed.
# If any generated files are staged, the hook will exit with a non-zero
# status and stop the commit.
# To disable the pre-commit check, use 'git commit --no-verify'.
# Please try to keep this script as basic and easy to read as possible.
# Note that the generated file list must use Unix line endings and remain sorted.
GENERATED_FILE_LIST="eng/WpfArcadeSdk/tools/WPF_Generated_Files.txt"
TEMP_FILE_NAME="WPF_Staged_Files.tmp"
# Redirect output to stderr.
exec 1>&2
# Git staged files
STAGED_FILES=$(git diff --cached --name-only)
# Git repo root
REPO_ROOT=$(git rev-parse --show-toplevel | sort)
# Path of temporary file containing a list of staged files
TEMP_FILE_FULL_PATH=$REPO_ROOT/$TEMP_FILE_NAME
# Create the temporary file containing a list of staged files(always overwrite)
echo "$STAGED_FILES" > "$TEMP_FILE_FULL_PATH"
# Find any staged files that intersect with the generated file list
STAGED_GENERATED_FILES=$(comm -12 $TEMP_FILE_FULL_PATH $GENERATED_FILE_LIST)
# Remove temporary file
[ -f $TEMP_FILE_FULL_PATH ] && $(rm $TEMP_FILE_FULL_PATH)
# If any generated files have been staged, issue an error message and prevent
# the user from committing their change locally.
if test -n "$STAGED_GENERATED_FILES"
then
echo "Error: WPF generated staged files detected. These files must not be modified."
echo "$STAGED_GENERATED_FILES"
exit 1
fi

Просмотреть файл

@ -2,37 +2,6 @@
# This file should be kept in sync across https://www.github.com/dotnet/wpf and dotnet-wpf-int repos.
#
## Install pre-commit WPF Git hook to protect WPF's generated files
function InstallCustomWPFGitHooks {
$WPFPreCommitGitHookSource = Join-Path $RepoRoot "eng\wpfarcadesdk\tools\pre-commit.githook"
$WPFPreCommitGitHookDest = Join-Path $RepoRoot ".git\hooks\pre-commit"
if (-not (Test-Path $WPFPreCommitGitHookSource)) {
Write-Host "WPF PreCommit GitHook file is missing: $WPFPreCommitGitHookSource"
ExitWithExitCode 1
}
Write-Host "Detecting WPF Git hooks..."
if (-not (Test-Path $WPFPreCommitGitHookDest)) {
Write-Host "Installing WPF Git pre-commit hook..."
try {
Copy-Item -Path $WPFPreCommitGitHookSource -Destination $WPFPreCommitGitHookDest
}
catch {
Write-Host "Error: WPF Git pre-commit hook installation failed!"
Write-Host $_
Write-Host $_.Exception
Write-Host $_.ScriptStackTrace
ExitWithExitCode 1
}
}
else
{
Write-Host "Detected existing WPF Git pre-commit hook."
}
}
# This repo uses C++/CLI /clr:pure (or /clr:netcore) switches during compilation, which are
# deprecated. Ensure that this warning is always suppressed during build.
if (($properties -eq $null) -or (-not ($properties -icontains '/nowarn:D9035'))) {
@ -57,9 +26,3 @@ if ($ci) {
# Always generate binary logs
$binaryLog = $true
$DoNotAbortNativeToolsInstallationOnFailure = $true
# Always install custom WPF Git hooks when not in the CI build
if (-not ($ci)) {
InstallCustomWPFGitHooks
}

Просмотреть файл

@ -2,4 +2,35 @@
# This file should be kept in sync across https://www.github.com/dotnet/wpf and dotnet-wpf-int repos.
#
function InitializeWpfCustomToolset() {
if (Test-Path variable:global:_WpfToolsetBuildProj) {
return $global:_WpfToolsetBuildProj
}
$nugetCache = GetNuGetPackageCachePath
$msbuild_sdks = $GlobalJson.'msbuild-sdks'
if ('Microsoft.DotNet.Arcade.Wpf.Sdk' -in $msbuild_sdks.PSobject.Properties.Name) {
$wpfToolsetVersion = $GlobalJson.'msbuild-sdks'.'Microsoft.DotNet.Arcade.Wpf.Sdk'
$wpfToolsetLocationFile = Join-Path $ToolsetDir "$wpfToolsetVersion.txt"
if (Test-Path $wpfToolsetLocationFile) {
$path = Get-Content $wpfToolsetLocationFile -TotalCount 1
if (Test-Path $path) {
return $global:_WpfToolsetBuildProj = $path
}
}
if (-not $restore) {
Write-Host "Wpf Toolset version $toolsetVersion has not been restored." -ForegroundColor Red
ExitWithExitCode 1
}
$proj = Join-Path $ToolsetDir "wpfRestore.proj"
$bl = if ($binaryLog) { "/bl:" + (Join-Path $LogDir "WpfToolsetRestore.binlog") } else { "" }
'<Project Sdk="Microsoft.DotNet.Arcade.Wpf.Sdk"/>' | Set-Content $proj
MSBuild $proj $bl /t:__WriteToolsetLocation /clp:ErrorsOnly`;NoSummary /p:__ToolsetLocationOutputFile=$wpfToolsetLocationFile
$path = Get-Content $wpfToolsetLocationFile -TotalCount 1
if (!(Test-Path $path)) {
throw "Invalid toolset path: $path"
}
return $global:_WpfToolsetBuildProj = $path
}
}
InitializeWpfCustomToolset
. $PsScriptRoot\common\init-tools-native.ps1 -InstallDirectory $PSScriptRoot\..\.tools\native -GlobalJsonFile $PSScriptRoot\..\global.json

Просмотреть файл

@ -29,4 +29,12 @@
<PackagingContent Include="$(RepoRoot)eng\WpfArcadeSdk\tools\WppConfig\rev1\*" SubFolder="root\tools\WppConfig\rev1" />
<PackagingContent Include="$(RepoRoot)eng\WpfArcadeSdk\tools\CodeAnalysis\*" SubFolder="root\tools\CodeAnalysis" />
</ItemGroup>
<!--
Pack $(WpfSharedDir) and $(WpfCommonDir) sources for use by dotnet-wpf-int
-->
<ItemGroup>
<PackagingContent Include="$(WpfSharedDir)**\*" SubFolder="root\Src\Shared\%(RecursiveDir)" />
<PackagingContent Include="$(WpfCommonDir)**\*" SubFolder="root\Src\Common\%(RecursiveDir)" />
</ItemGroup>
</Project>

Просмотреть файл

@ -0,0 +1,6 @@
<Project>
<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))" />
<PropertyGroup>
<GenerateDependencyFile>false</GenerateDependencyFile>
</PropertyGroup>
</Project>

Просмотреть файл

@ -0,0 +1,27 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AssemblyName>PresentationFramework</AssemblyName>
<PackageId>PresentationFramework-PresentationUI-api-cycle</PackageId>
<TargetOutputRelPath>$(TargetGroup)-$(PackageId)/</TargetOutputRelPath>
<ShouldWriteSigningRequired>false</ShouldWriteSigningRequired>
<ProduceReferenceAssembly>false</ProduceReferenceAssembly>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Platforms>AnyCPU;x64</Platforms>
</PropertyGroup>
<PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework>
<EnableDefaultItems>false</EnableDefaultItems>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.Windows.Controls.DocumentViewer.cs" />
<Compile Include="System.Windows.Controls.ToolBar.cs" />
</ItemGroup>
<ItemGroup>
<NetCoreReference Include="System.Runtime" />
<NetCoreReference Include="System.Resources.ResourceManager" />
<NetCoreReference Include="System.Runtime.InteropServices" />
</ItemGroup>
</Project>

Просмотреть файл

@ -0,0 +1,60 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AssemblyName>PresentationFramework</AssemblyName>
<PackageId>PresentationFramework-ReachFramework-impl-cycle</PackageId>
<TargetOutputRelPath>$(TargetGroup)-$(PackageId)/</TargetOutputRelPath>
<!-- don't sign nor binplace this non-shipping assembly -->
<ShouldWriteSigningRequired>false</ShouldWriteSigningRequired>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Platforms>AnyCPU;x64</Platforms>
<ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>None</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
<!--The field '{0}' is never used -->
<NoWarn>$(NoWarn);0169</NoWarn>
</PropertyGroup>
<PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework>
<EnableDefaultItems>false</EnableDefaultItems>
</PropertyGroup>
<ItemGroup>
<Compile Include="PresentationFramework.cs" />
</ItemGroup>
<ItemGroup>
<NetCoreReference Include="System.Collections" />
<NetCoreReference Include="System.Collections.NonGeneric" />
<NetCoreReference Include="System.Collections.Specialized" />
<NetCoreReference Include="System.ComponentModel" />
<NetCoreReference Include="System.ComponentModel.EventBasedAsync" />
<NetCoreReference Include="System.ComponentModel.Primitives" />
<NetCoreReference Include="System.ComponentModel.TypeConverter" />
<NetCoreReference Include="System.Dynamic.Runtime" />
<NetCoreReference Include="System.Linq.Expressions" />
<NetCoreReference Include="System.Net.Primitives" />
<NetCoreReference Include="System.Net.Requests" />
<NetCoreReference Include="System.Net.WebHeaderCollection" />
<NetCoreReference Include="System.ObjectModel" />
<NetCoreReference Include="System.Runtime" />
<NetCoreReference Include="System.Resources.ResourceManager" />
<NetCoreReference Include="System.Runtime.Extensions" />
<NetCoreReference Include="System.Runtime.InteropServices" />
<NetCoreReference Include="System.Xml" />
<NetCoreReference Include="System.Xml.Document" />
<NetCoreReference Include="System.Xml.ReaderWriter" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="$(WpfSourceDir)PresentationCore\PresentationCore.csproj" />
<ProjectReference Include="$(WpfSourceDir)UIAutomation\UIAutomationProvider\UIAutomationProvider.csproj" />
<ProjectReference Include="$(WpfSourceDir)UIAutomation\UIAutomationTypes\UIAutomationTypes.csproj" />
<ProjectReference Include="$(WpfSourceDir)PresentationCore-CommonResources\PresentationCore-CommonResources.csproj" />
<ProjectReference Include="$(WpfSourceDir)System.Xaml\System.Xaml.csproj" />
<ProjectReference Include="$(WpfSourceDir)WindowsBase\WindowsBase.csproj" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="$(WpfCycleBreakersDir)ReachFramework\ReachFramework-PresentationFramework-api-cycle.csproj" />
<ProjectReference Include="$(WpfCycleBreakersDir)System.Printing\System.Printing-PresentationFramework-api-cycle.csproj" />
</ItemGroup>
</Project>

Просмотреть файл

@ -0,0 +1,65 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AssemblyName>PresentationFramework</AssemblyName>
<PackageId>PresentationFramework-System.Printing-api-cycle</PackageId>
<TargetOutputRelPath>$(TargetGroup)-$(PackageId)/</TargetOutputRelPath>
<!-- don't sign nor binplace this non-shipping assembly -->
<ShouldWriteSigningRequired>false</ShouldWriteSigningRequired>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Platforms>AnyCPU;x64</Platforms>
<ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>None</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
</PropertyGroup>
<PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework>
<EnableDefaultItems>false</EnableDefaultItems>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.Windows.Documents.FixedDocument.cs" />
<Compile Include="System.Windows.Documents.FixedDocumentSequence.cs" />
<Compile Include="System.Windows.Documents.FixedPage.cs" />
<Compile Include="System.Windows.Controls.PageRange.cs" />
<Compile Include="System.Windows.Controls.PageRangeSelection.cs" />
<Compile Include="System.Windows.Documents.Serialization.Delegates.cs" />
<Compile Include="System.Windows.Documents.Serialization.SerializerWriter.cs" />
<Compile Include="System.Windows.Documents.Serialization.SerializerWriterCollator.cs" />
</ItemGroup>
<ItemGroup>
<NetCoreReference Include="System.Collections" />
<NetCoreReference Include="System.Collections.NonGeneric" />
<NetCoreReference Include="System.Collections.Specialized" />
<NetCoreReference Include="System.ComponentModel" />
<NetCoreReference Include="System.ComponentModel.EventBasedAsync" />
<NetCoreReference Include="System.ComponentModel.Primitives" />
<NetCoreReference Include="System.ComponentModel.TypeConverter" />
<NetCoreReference Include="System.Dynamic.Runtime" />
<NetCoreReference Include="System.Linq.Expressions" />
<NetCoreReference Include="System.Net.Primitives" />
<NetCoreReference Include="System.Net.Requests" />
<NetCoreReference Include="System.Net.WebHeaderCollection" />
<NetCoreReference Include="System.ObjectModel" />
<NetCoreReference Include="System.Runtime" />
<NetCoreReference Include="System.Resources.ResourceManager" />
<NetCoreReference Include="System.Runtime.Extensions" />
<NetCoreReference Include="System.Runtime.InteropServices" />
<NetCoreReference Include="System.Xml" />
<NetCoreReference Include="System.Xml.Document" />
<NetCoreReference Include="System.Xml.ReaderWriter" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="$(WpfSourceDir)PresentationCore\PresentationCore.csproj" />
<ProjectReference Include="$(WpfSourceDir)PresentationCore-CommonResources\PresentationCore-CommonResources.csproj" />
<ProjectReference Include="$(WpfSourceDir)System.Xaml\System.Xaml.csproj" />
<ProjectReference Include="$(WpfSourceDir)WindowsBase\WindowsBase.csproj" />
<ProjectReference Include="$(WpfSourceDir)UIAutomation\UIAutomationProvider\UIAutomationProvider.csproj" />
<ProjectReference Include="$(WpfSourceDir)UIAutomation\UIAutomationTypes\UIAutomationTypes.csproj" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="$(WpfCycleBreakersDir)System.Printing\System.Printing-PresentationFramework-api-cycle.csproj" />
<ProjectReference Include="$(WpfCycleBreakersDir)ReachFramework\ReachFramework-PresentationFramework-api-cycle.csproj" />
</ItemGroup>
</Project>

Просмотреть файл

@ -0,0 +1,60 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AssemblyName>PresentationFramework</AssemblyName>
<PackageId>PresentationFramework-ReachFramework</PackageId>
<TargetOutputRelPath>$(TargetGroup)-$(PackageId)/</TargetOutputRelPath>
<!-- don't sign nor binplace this non-shipping assembly -->
<ShouldWriteSigningRequired>false</ShouldWriteSigningRequired>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Platforms>AnyCPU;x64</Platforms>
<ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>None</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
<!--The field '{0}' is never used -->
<NoWarn>$(NoWarn);0169</NoWarn>
</PropertyGroup>
<PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework>
<EnableDefaultItems>false</EnableDefaultItems>
</PropertyGroup>
<ItemGroup>
<Compile Include="PresentationFramework.cs" />
</ItemGroup>
<ItemGroup>
<NetCoreReference Include="System.Collections" />
<NetCoreReference Include="System.Collections.NonGeneric" />
<NetCoreReference Include="System.Collections.Specialized" />
<NetCoreReference Include="System.ComponentModel" />
<NetCoreReference Include="System.ComponentModel.EventBasedAsync" />
<NetCoreReference Include="System.ComponentModel.Primitives" />
<NetCoreReference Include="System.ComponentModel.TypeConverter" />
<NetCoreReference Include="System.Dynamic.Runtime" />
<NetCoreReference Include="System.Linq.Expressions" />
<NetCoreReference Include="System.Net.Primitives" />
<NetCoreReference Include="System.Net.Requests" />
<NetCoreReference Include="System.Net.WebHeaderCollection" />
<NetCoreReference Include="System.ObjectModel" />
<NetCoreReference Include="System.Runtime" />
<NetCoreReference Include="System.Resources.ResourceManager" />
<NetCoreReference Include="System.Runtime.Extensions" />
<NetCoreReference Include="System.Runtime.InteropServices" />
<NetCoreReference Include="System.Xml" />
<NetCoreReference Include="System.Xml.Document" />
<NetCoreReference Include="System.Xml.ReaderWriter" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="$(WpfSourceDir)PresentationCore\PresentationCore.csproj" />
<ProjectReference Include="$(WpfSourceDir)PresentationCore-CommonResources\PresentationCore-CommonResources.csproj" />
<ProjectReference Include="$(WpfSourceDir)System.Xaml\System.Xaml.csproj" />
<ProjectReference Include="$(WpfSourceDir)WindowsBase\WindowsBase.csproj" />
<ProjectReference Include="$(WpfSourceDir)UIAutomation\UIAutomationProvider\UIAutomationProvider.csproj" />
<ProjectReference Include="$(WpfSourceDir)UIAutomation\UIAutomationTypes\UIAutomationTypes.csproj" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="$(WpfCycleBreakersDir)ReachFramework\ReachFramework-PresentationFramework-api-cycle.csproj" />
<ProjectReference Include="$(WpfCycleBreakersDir)System.Printing\System.Printing-PresentationFramework-api-cycle.csproj" />
</ItemGroup>
</Project>

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -0,0 +1,13 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
// ------------------------------------------------------------------------------
// Changes to this file must follow the http://aka.ms/api-review process.
// ------------------------------------------------------------------------------
namespace System.Windows.Controls
{
public partial class DocumentViewer
{
}
}

Просмотреть файл

@ -0,0 +1,13 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
// ------------------------------------------------------------------------------
// Changes to this file must follow the http://aka.ms/api-review process.
// ------------------------------------------------------------------------------
namespace System.Windows.Controls
{
public partial struct PageRange
{
}
}

Просмотреть файл

@ -0,0 +1,17 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
// ------------------------------------------------------------------------------
// Changes to this file must follow the http://aka.ms/api-review process.
// ------------------------------------------------------------------------------
namespace System.Windows.Controls
{
public enum PageRangeSelection
{
AllPages = 0,
CurrentPage = 2,
SelectedPages = 3,
UserPages = 1,
}
}

Просмотреть файл

@ -0,0 +1,13 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
// ------------------------------------------------------------------------------
// Changes to this file must follow the http://aka.ms/api-review process.
// ------------------------------------------------------------------------------
namespace System.Windows.Controls
{
public partial class ToolBar
{
}
}

Просмотреть файл

@ -0,0 +1,13 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
// ------------------------------------------------------------------------------
// Changes to this file must follow the http://aka.ms/api-review process.
// ------------------------------------------------------------------------------
namespace System.Windows.Documents
{
public sealed partial class FixedDocument
{
}
}

Просмотреть файл

@ -0,0 +1,13 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
// ------------------------------------------------------------------------------
// Changes to this file must follow the http://aka.ms/api-review process.
// ------------------------------------------------------------------------------
namespace System.Windows.Documents
{
public partial class FixedDocumentSequence
{
}
}

Просмотреть файл

@ -0,0 +1,13 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
// ------------------------------------------------------------------------------
// Changes to this file must follow the http://aka.ms/api-review process.
// ------------------------------------------------------------------------------
namespace System.Windows.Documents
{
public sealed partial class FixedPage
{
}
}

Просмотреть файл

@ -0,0 +1,48 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
// ------------------------------------------------------------------------------
// Changes to this file must follow the http://aka.ms/api-review process.
// ------------------------------------------------------------------------------
namespace System.Windows.Documents.Serialization
{
public delegate void WritingCancelledEventHandler(object sender, System.Windows.Documents.Serialization.WritingCancelledEventArgs e);
public delegate void WritingCompletedEventHandler(object sender, System.Windows.Documents.Serialization.WritingCompletedEventArgs e);
public delegate void WritingProgressChangedEventHandler(object sender, System.Windows.Documents.Serialization.WritingProgressChangedEventArgs e);
public delegate void WritingPrintTicketRequiredEventHandler(object sender, System.Windows.Documents.Serialization.WritingPrintTicketRequiredEventArgs e);
public partial class WritingCancelledEventArgs : System.EventArgs
{
public WritingCancelledEventArgs(System.Exception exception) { }
public System.Exception Error { get { throw null; } }
}
public partial class WritingCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs
{
public WritingCompletedEventArgs(bool cancelled, object state, System.Exception exception) : base (default(System.Exception), default(bool), default(object)) { }
}
public partial class WritingProgressChangedEventArgs : System.ComponentModel.ProgressChangedEventArgs
{
public WritingProgressChangedEventArgs(System.Windows.Documents.Serialization.WritingProgressChangeLevel writingLevel, int number, int progressPercentage, object state) : base (default(int), default(object)) { }
public int Number { get { throw null; } }
public System.Windows.Documents.Serialization.WritingProgressChangeLevel WritingLevel { get { throw null; } }
}
public enum WritingProgressChangeLevel
{
FixedDocumentSequenceWritingProgress = 1,
FixedDocumentWritingProgress = 2,
FixedPageWritingProgress = 3,
None = 0,
}
public partial class WritingPrintTicketRequiredEventArgs : System.EventArgs
{
public WritingPrintTicketRequiredEventArgs(System.Windows.Xps.Serialization.PrintTicketLevel printTicketLevel, int sequence) { }
public System.Printing.PrintTicket CurrentPrintTicket { get { throw null; } set { } }
public System.Windows.Xps.Serialization.PrintTicketLevel CurrentPrintTicketLevel { get { throw null; } }
public int Sequence { get { throw null; } }
}
}

Просмотреть файл

@ -0,0 +1,51 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
// ------------------------------------------------------------------------------
// Changes to this file must follow the http://aka.ms/api-review process.
// ------------------------------------------------------------------------------
namespace System.Windows.Documents.Serialization
{
public abstract partial class SerializerWriter
{
protected SerializerWriter() { }
public abstract event System.Windows.Documents.Serialization.WritingCancelledEventHandler WritingCancelled;
public abstract event System.Windows.Documents.Serialization.WritingCompletedEventHandler WritingCompleted;
public abstract event System.Windows.Documents.Serialization.WritingPrintTicketRequiredEventHandler WritingPrintTicketRequired;
public abstract event System.Windows.Documents.Serialization.WritingProgressChangedEventHandler WritingProgressChanged;
public abstract void CancelAsync();
public abstract System.Windows.Documents.Serialization.SerializerWriterCollator CreateVisualsCollator();
public abstract System.Windows.Documents.Serialization.SerializerWriterCollator CreateVisualsCollator(System.Printing.PrintTicket documentSequencePT, System.Printing.PrintTicket documentPT);
public abstract void Write(System.Windows.Documents.DocumentPaginator documentPaginator);
public abstract void Write(System.Windows.Documents.DocumentPaginator documentPaginator, System.Printing.PrintTicket printTicket);
public abstract void Write(System.Windows.Documents.FixedDocument fixedDocument);
public abstract void Write(System.Windows.Documents.FixedDocument fixedDocument, System.Printing.PrintTicket printTicket);
public abstract void Write(System.Windows.Documents.FixedDocumentSequence fixedDocumentSequence);
public abstract void Write(System.Windows.Documents.FixedDocumentSequence fixedDocumentSequence, System.Printing.PrintTicket printTicket);
public abstract void Write(System.Windows.Documents.FixedPage fixedPage);
public abstract void Write(System.Windows.Documents.FixedPage fixedPage, System.Printing.PrintTicket printTicket);
public abstract void Write(System.Windows.Media.Visual visual);
public abstract void Write(System.Windows.Media.Visual visual, System.Printing.PrintTicket printTicket);
public abstract void WriteAsync(System.Windows.Documents.DocumentPaginator documentPaginator);
public abstract void WriteAsync(System.Windows.Documents.DocumentPaginator documentPaginator, object userState);
public abstract void WriteAsync(System.Windows.Documents.DocumentPaginator documentPaginator, System.Printing.PrintTicket printTicket);
public abstract void WriteAsync(System.Windows.Documents.DocumentPaginator documentPaginator, System.Printing.PrintTicket printTicket, object userState);
public abstract void WriteAsync(System.Windows.Documents.FixedDocument fixedDocument);
public abstract void WriteAsync(System.Windows.Documents.FixedDocument fixedDocument, object userState);
public abstract void WriteAsync(System.Windows.Documents.FixedDocument fixedDocument, System.Printing.PrintTicket printTicket);
public abstract void WriteAsync(System.Windows.Documents.FixedDocument fixedDocument, System.Printing.PrintTicket printTicket, object userState);
public abstract void WriteAsync(System.Windows.Documents.FixedDocumentSequence fixedDocumentSequence);
public abstract void WriteAsync(System.Windows.Documents.FixedDocumentSequence fixedDocumentSequence, object userState);
public abstract void WriteAsync(System.Windows.Documents.FixedDocumentSequence fixedDocumentSequence, System.Printing.PrintTicket printTicket);
public abstract void WriteAsync(System.Windows.Documents.FixedDocumentSequence fixedDocumentSequence, System.Printing.PrintTicket printTicket, object userState);
public abstract void WriteAsync(System.Windows.Documents.FixedPage fixedPage);
public abstract void WriteAsync(System.Windows.Documents.FixedPage fixedPage, object userState);
public abstract void WriteAsync(System.Windows.Documents.FixedPage fixedPage, System.Printing.PrintTicket printTicket);
public abstract void WriteAsync(System.Windows.Documents.FixedPage fixedPage, System.Printing.PrintTicket printTicket, object userState);
public abstract void WriteAsync(System.Windows.Media.Visual visual);
public abstract void WriteAsync(System.Windows.Media.Visual visual, object userState);
public abstract void WriteAsync(System.Windows.Media.Visual visual, System.Printing.PrintTicket printTicket);
public abstract void WriteAsync(System.Windows.Media.Visual visual, System.Printing.PrintTicket printTicket, object userState);
}
}

Просмотреть файл

@ -0,0 +1,24 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
// ------------------------------------------------------------------------------
// Changes to this file must follow the http://aka.ms/api-review process.
// ------------------------------------------------------------------------------
namespace System.Windows.Documents.Serialization
{
public abstract partial class SerializerWriterCollator
{
protected SerializerWriterCollator() { }
public abstract void BeginBatchWrite();
public abstract void Cancel();
public abstract void CancelAsync();
public abstract void EndBatchWrite();
public abstract void Write(System.Windows.Media.Visual visual);
public abstract void Write(System.Windows.Media.Visual visual, System.Printing.PrintTicket printTicket);
public abstract void WriteAsync(System.Windows.Media.Visual visual);
public abstract void WriteAsync(System.Windows.Media.Visual visual, object userState);
public abstract void WriteAsync(System.Windows.Media.Visual visual, System.Printing.PrintTicket printTicket);
public abstract void WriteAsync(System.Windows.Media.Visual visual, System.Printing.PrintTicket printTicket, object userState);
}
}

Просмотреть файл

@ -0,0 +1,41 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<AssemblyName>PresentationUI</AssemblyName>
<PackageId>PresentationUI-PresentationFramework-impl-cycle</PackageId>
<TargetOutputRelPath>$(TargetGroup)-$(PackageId)/</TargetOutputRelPath>
<ShouldWriteSigningRequired>false</ShouldWriteSigningRequired>
<Platforms>AnyCPU;x64</Platforms>
<ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>None</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
<!--The field '{0}' is never used -->
<NoWarn>$(NoWarn);0169</NoWarn>
</PropertyGroup>
<PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework>
<EnableDefaultItems>false</EnableDefaultItems>
</PropertyGroup>
<ItemGroup>
<Compile Include="PresentationUI.cs" />
<Compile Include="PresentationUI.internals.cs" />
<Compile Include="$(WpfSharedDir)RefAssemblyAttrs.cs" />
</ItemGroup>
<ItemGroup>
<NetCoreReference Include="System.Runtime" />
<NetCoreReference Include="System.Resources.ResourceManager" />
<NetCoreReference Include="System.Runtime.InteropServices" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="$(WpfSourceDir)PresentationCore\PresentationCore.csproj" />
<ProjectReference Include="$(WpfSourceDir)PresentationCore-CommonResources\PresentationCore-CommonResources.csproj" />
<ProjectReference Include="$(WpfSourceDir)System.Xaml\System.Xaml.csproj" />
<ProjectReference Include="$(WpfSourceDir)WindowsBase\WindowsBase.csproj" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="$(WpfCycleBreakersDir)PresentationFramework\PresentationFramework-PresentationUI-api-cycle.csproj" />
</ItemGroup>
</Project>

Просмотреть файл

@ -0,0 +1,16 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
// ------------------------------------------------------------------------------
// Changes to this file must follow the http://aka.ms/api-review process.
// ------------------------------------------------------------------------------
namespace System.Windows.Documents
{
/// <summary>
/// This class is used to create ComponentResourceKeys, which require a public class.
/// It should remain empty, and no methods or properties should be added to it.
/// </summary>
public static class PresentationUIStyleResources
{ }
}

Просмотреть файл

@ -0,0 +1,62 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
// ------------------------------------------------------------------------------
// Changes to this file must follow the http://aka.ms/api-review process.
// ------------------------------------------------------------------------------
using System.Runtime.CompilerServices;
using MS.Internal.PresentationCore;
[assembly:InternalsVisibleTo(BuildInfo.PresentationFramework)]
// This is the minimum set of surface area required to enable PresentationFramework to build.
namespace MS.Internal.Documents.Application
{
internal sealed partial class DocumentStream
{
internal static readonly string XpsFileExtension;
}
internal partial struct DocumentApplicationState
{
private int _dummyPrimitive;
public DocumentApplicationState(double zoom, double horizontalOffset, double verticalOffset, int maxPagesAcross) { throw null; }
public double HorizontalOffset { get { throw null; } }
public int MaxPagesAcross { get { throw null; } }
public double VerticalOffset { get { throw null; } }
public double Zoom { get { throw null; } }
}
}
namespace MS.Internal.Documents
{
internal sealed partial class DocumentApplicationDocumentViewer : System.Windows.Controls.DocumentViewer
{
public static System.Windows.Input.RoutedUICommand RequestSigners { get { throw null; } }
public static System.Windows.Input.RoutedUICommand ShowRMCredentialManager { get { throw null; } }
public static System.Windows.Input.RoutedUICommand ShowRMPermissions { get { throw null; } }
public static System.Windows.Input.RoutedUICommand ShowRMPublishingUI { get { throw null; } }
public static System.Windows.Input.RoutedUICommand ShowSignatureSummary { get { throw null; } }
public static System.Windows.Input.RoutedUICommand Sign { get { throw null; } }
public MS.Internal.Documents.Application.DocumentApplicationState StoredDocumentApplicationState { get { throw null; } set { } }
public void SetUIToStoredState() { }
}
internal partial class FindToolBar : System.Windows.Controls.ToolBar //, System.Windows.Markup.IComponentConnector
{
public FindToolBar() { }
public bool DocumentLoaded { set { } }
public bool FindEnabled { get { throw null; } }
public bool MatchAlefHamza { get { throw null; } }
public bool MatchCase { get { throw null; } }
public bool MatchDiacritic { get { throw null; } }
public bool MatchKashida { get { throw null; } }
public bool MatchWholeWord { get { throw null; } }
public string SearchText { get { throw null; } }
public bool SearchUp { get { throw null; } set { } }
public event System.EventHandler FindClicked { add { } remove { } }
public void GoToTextBox() { }
}
}

Просмотреть файл

@ -0,0 +1,27 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AssemblyName>ReachFramework</AssemblyName>
<PackageId>ReachFramework-PresentationFramework-api-cycle</PackageId>
<TargetOutputRelPath>$(TargetGroup)-$(PackageId)/</TargetOutputRelPath>
<DefineConstants>$(DefineConstants);REACHFRAMEWORK;</DefineConstants>
<!-- don't sign nor binplace this non-shipping assembly -->
<ShouldWriteSigningRequired>false</ShouldWriteSigningRequired>
<Platforms>AnyCPU;x64</Platforms>
</PropertyGroup>
<PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework>
<EnableDefaultItems>false</EnableDefaultItems>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.Printing.PrintTicket.cs" />
<Compile Include="System.Windows.Xps.Serialization.PrintTicketLevel.cs" />
<Compile Include="$(WpfSharedDir)RefAssemblyAttrs.cs" />
</ItemGroup>
<ItemGroup>
<NetCoreReference Include="System.Runtime" />
<NetCoreReference Include="System.Runtime.InteropServices" />
<NetCoreReference Include="System.Resources.ResourceManager" />
</ItemGroup>
</Project>

Просмотреть файл

@ -0,0 +1,32 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AssemblyName>ReachFramework</AssemblyName>
<PackageId>ReachFramework-SystemPrinting-api-cycle</PackageId>
<TargetOutputRelPath>$(TargetGroup)-$(PackageId)/</TargetOutputRelPath>
<DefineConstants>$(DefineConstants);REACHFRAMEWORK;</DefineConstants>
<!-- don't sign nor binplace this non-shipping assembly -->
<ShouldWriteSigningRequired>false</ShouldWriteSigningRequired>
<Platforms>AnyCPU;x64</Platforms>
</PropertyGroup>
<PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework>
<EnableDefaultItems>false</EnableDefaultItems>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.Printing.PrintTicket.cs" />
<Compile Include="System.Printing.PrintTicketScope.cs" />
<Compile Include="System.Printing.PrintCapabilities.cs" />
<Compile Include="System.Printing.ValidationResult.cs" />
<Compile Include="System.Windows.Xps.Packaging.PackagingProgressEventArgs.cs" />
<Compile Include="System.Windows.Xps.Serialization.RCW.IXpsOMPackageWriter.cs" />
<Compile Include="System.Windows.Xps.Packaging.XpsDocument.cs" />
<Compile Include="$(WpfSharedDir)RefAssemblyAttrs.cs" />
</ItemGroup>
<ItemGroup>
<NetCoreReference Include="System.Runtime" />
<NetCoreReference Include="System.Runtime.InteropServices" />
<NetCoreReference Include="System.Resources.ResourceManager" />
</ItemGroup>
</Project>

Просмотреть файл

@ -0,0 +1,13 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
// ------------------------------------------------------------------------------
// Changes to this file must follow the http://aka.ms/api-review process.
// ------------------------------------------------------------------------------
namespace System.Printing
{
public sealed partial class PrintCapabilities
{
}
}

Просмотреть файл

@ -0,0 +1,14 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
// ------------------------------------------------------------------------------
// Changes to this file must follow the http://aka.ms/api-review process.
// ------------------------------------------------------------------------------
namespace System.Printing
{
public sealed partial class PrintTicket
{
private PrintTicket() {}
}
}

Просмотреть файл

@ -0,0 +1,13 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
// ------------------------------------------------------------------------------
// Changes to this file must follow the http://aka.ms/api-review process.
// ------------------------------------------------------------------------------
namespace System.Printing
{
public enum PrintTicketScope
{
}
}

Просмотреть файл

@ -0,0 +1,13 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
// ------------------------------------------------------------------------------
// Changes to this file must follow the http://aka.ms/api-review process.
// ------------------------------------------------------------------------------
namespace System.Printing
{
public partial struct ValidationResult
{
}
}

Просмотреть файл

@ -0,0 +1,14 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
// ------------------------------------------------------------------------------
// Changes to this file must follow the http://aka.ms/api-review process.
// ------------------------------------------------------------------------------
namespace System.Windows.Xps.Packaging
{
public partial class PackagingProgressEventArgs
{
private PackagingProgressEventArgs() {}
}
}

Просмотреть файл

@ -0,0 +1,13 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
// ------------------------------------------------------------------------------
// Changes to this file must follow the http://aka.ms/api-review process.
// ------------------------------------------------------------------------------
namespace System.Windows.Xps.Packaging
{
public partial class XpsDocument
{
}
}

Просмотреть файл

@ -0,0 +1,13 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
// ------------------------------------------------------------------------------
// Changes to this file must follow the http://aka.ms/api-review process.
// ------------------------------------------------------------------------------
namespace System.Windows.Xps.Serialization
{
public enum PrintTicketLevel
{
}
}

Просмотреть файл

@ -0,0 +1,17 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
// ------------------------------------------------------------------------------
// Changes to this file must follow the http://aka.ms/api-review process.
// ------------------------------------------------------------------------------
using System.Runtime.CompilerServices;
[assembly:InternalsVisibleTo(MS.Internal.ReachFramework.BuildInfo.SystemPrinting)]
namespace System.Windows.Xps.Serialization.RCW
{
internal partial interface IXpsOMPackageWriter
{
// INTENTIONALLY empty to avoid exposing the entire type closure to reference assemblies
}
}

Просмотреть файл

@ -0,0 +1,26 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AssemblyName>System.Printing</AssemblyName>
<PackageId>System.Printing-PresentationFramework-api-cycle</PackageId>
<TargetOutputRelPath>$(TargetGroup)-$(PackageId)/</TargetOutputRelPath>
<DefineConstants>$(DefineConstants);REACHFRAMEWORK;</DefineConstants>
<!-- don't sign nor binplace this non-shipping assembly -->
<ShouldWriteSigningRequired>false</ShouldWriteSigningRequired>
<Platforms>AnyCPU;x64</Platforms>
</PropertyGroup>
<PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework>
<EnableDefaultItems>false</EnableDefaultItems>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.Printing.PrintQueue.cs" />
<Compile Include="$(WpfSharedDir)RefAssemblyAttrs.cs" />
</ItemGroup>
<ItemGroup>
<NetCoreReference Include="System.Runtime" />
<NetCoreReference Include="System.Runtime.InteropServices" />
<NetCoreReference Include="System.Resources.ResourceManager" />
</ItemGroup>
</Project>

Просмотреть файл

@ -0,0 +1,16 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
// ------------------------------------------------------------------------------
// Changes to this file must follow the http://aka.ms/api-review process.
// ------------------------------------------------------------------------------
namespace System.Printing
{
public class PrintQueue
{
private PrintQueue()
{
}
}
}

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -0,0 +1,29 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.Runtime.InteropServices;
namespace System.Windows.Media
{
//
// AV Events
//
internal enum AVEvent {
AVMediaNone = 0,
AVMediaOpened = 1,
AVMediaClosed = 2,
AVMediaStarted = 3,
AVMediaStopped = 4,
AVMediaPaused = 5,
AVMediaRateChanged = 6,
AVMediaEnded = 7,
AVMediaFailed = 8,
AVMediaBufferingStarted = 9,
AVMediaBufferingEnded = 10,
AVMediaPrerolled = 11,
AVMediaScriptCommand = 12,
AVMediaNewFrame = 13,
};
}

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -0,0 +1,172 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
//
//
namespace MS.Internal
{
#region Enumeration Types
internal enum WinCodecErrors
{
// Range 0x?8982000 - 0x?8982FFF
WINCODEC_ERR_GENERIC_ERROR = unchecked((int) 0x80004005),
WINCODEC_ERR_INVALIDPARAMETER = unchecked((int) 0x80000003),
WINCODEC_ERR_OUTOFMEMORY = unchecked((int) 0x80000002),
WINCODEC_ERR_NOTIMPLEMENTED = unchecked((int) 0x80000001),
WINCODEC_ERR_ABORTED = unchecked((int) 0x80004004),
WINCODEC_ERR_ACCESSDENIED = unchecked((int) 0x80070005),
WINCODEC_ERR_VALUEOVERFLOW = unchecked((int) 0x80070216),
WINCODEC_ERR_WRONGSTATE = unchecked((int) 0x88982f04),
WINCODEC_ERR_VALUEOUTOFRANGE = unchecked((int) 0x88982f05),
WINCODEC_ERR_UNKNOWNIMAGEFORMAT = unchecked((int) 0x88982f07),
WINCODEC_ERR_UNSUPPORTEDVERSION = unchecked((int) 0x88982f0B),
WINCODEC_ERR_NOTINITIALIZED = unchecked((int) 0x88982f0C),
WINCODEC_ERR_ALREADYLOCKED = unchecked((int) 0x88982f0D),
WINCODEC_ERR_PROPERTYNOTFOUND = unchecked((int) 0x88982f40),
WINCODEC_ERR_PROPERTYNOTSUPPORTED = unchecked((int) 0x88982f41),
WINCODEC_ERR_PROPERTYSIZE = unchecked((int) 0x88982f42),
WINCODEC_ERR_CODECPRESENT = unchecked((int) 0x88982f43),
WINCODEC_ERR_CODECNOTHUMBNAIL = unchecked((int) 0x88982f44),
WINCODEC_ERR_PALETTEUNAVAILABLE = unchecked((int) 0x88982f45),
WINCODEC_ERR_CODECTOOMANYSCANLINES = unchecked((int) 0x88982f46),
WINCODEC_ERR_INTERNALERROR = unchecked((int) 0x88982f48),
WINCODEC_ERR_SOURCERECTDOESNOTMATCHDIMENSIONS = unchecked((int) 0x88982f49),
WINCODEC_ERR_COMPONENTNOTFOUND = unchecked((int) 0x88982f50),
WINCODEC_ERR_IMAGESIZEOUTOFRANGE = unchecked((int) 0x88982f51),
WINCODEC_ERR_TOOMUCHMETADATA = unchecked((int) 0x88982f52),
WINCODEC_ERR_BADIMAGE = unchecked((int) 0x88982f60),
WINCODEC_ERR_BADHEADER = unchecked((int) 0x88982f61),
WINCODEC_ERR_FRAMEMISSING = unchecked((int) 0x88982f62),
WINCODEC_ERR_BADMETADATAHEADER = unchecked((int) 0x88982f63),
WINCODEC_ERR_BADSTREAMDATA = unchecked((int) 0x88982f70),
WINCODEC_ERR_STREAMWRITE = unchecked((int) 0x88982f71),
WINCODEC_ERR_STREAMREAD = unchecked((int) 0x88982f72),
WINCODEC_ERR_STREAMNOTAVAILABLE = unchecked((int) 0x88982f73),
WINCODEC_ERR_UNSUPPORTEDPIXELFORMAT = unchecked((int) 0x88982f80),
WINCODEC_ERR_UNSUPPORTEDOPERATION = unchecked((int) 0x88982f81),
WINCODEC_ERR_INVALIDREGISTRATION = unchecked((int) 0x88982f8A),
WINCODEC_ERR_COMPONENTINITIALIZEFAILURE = unchecked((int) 0x88982f8B),
WINCODEC_ERR_INSUFFICIENTBUFFER = unchecked((int) 0x88982f8C),
WINCODEC_ERR_DUPLICATEMETADATAPRESENT = unchecked((int) 0x88982f8D),
WINCODEC_ERR_PROPERTYUNEXPECTEDTYPE = unchecked((int) 0x88982f8E),
WINCODEC_ERR_UNEXPECTEDSIZE = unchecked((int) 0x88982f8F),
WINCODEC_ERR_INVALIDQUERYREQUEST = unchecked((int) 0x88982f90),
WINCODEC_ERR_UNEXPECTEDMETADATATYPE = unchecked((int) 0x88982f91),
WINCODEC_ERR_REQUESTONLYVALIDATMETADATAROOT = unchecked((int) 0x88982f92),
WINCODEC_ERR_INVALIDQUERYCHARACTER = unchecked((int) 0x88982f93),
};
internal enum MILErrors
{
// Range 0x?8980000 - 0x?8980FFF
WGXHR_CLIPPEDTOEMPTY = unchecked((int) 0x8980001),
WGXHR_EMPTYFILL = unchecked((int) 0x8980002),
WGXHR_INTERNALTEMPORARYSUCCESS = unchecked((int) 0x8980003),
WGXHR_RESETSHAREDHANDLEMANAGER = unchecked((int) 0x8980004),
WGXERR_GENERIC_ERROR = unchecked((int) 0x80004005),
WGXERR_INVALIDPARAMETER = unchecked((int) 0x80000003),
WGXERR_OUTOFMEMORY = unchecked((int) 0x80000002),
WGXERR_NOTIMPLEMENTED = unchecked((int) 0x80000001),
WGXERR_ABORTED = unchecked((int) 0x80004004),
WGXERR_ACCESSDENIED = unchecked((int) 0x80070005),
WGXERR_VALUEOVERFLOW = unchecked((int) 0x80070216),
WGXERR_WRONGSTATE = WinCodecErrors.WINCODEC_ERR_WRONGSTATE,
WGXERR_UNSUPPORTEDVERSION = WinCodecErrors.WINCODEC_ERR_UNSUPPORTEDVERSION,
WGXERR_NOTINITIALIZED = WinCodecErrors.WINCODEC_ERR_NOTINITIALIZED,
WGXERR_UNSUPPORTEDPIXELFORMAT = WinCodecErrors.WINCODEC_ERR_UNSUPPORTEDPIXELFORMAT,
WGXERR_UNSUPPORTED_OPERATION = WinCodecErrors.WINCODEC_ERR_UNSUPPORTEDOPERATION,
WGXERR_PALETTEUNAVAILABLE = WinCodecErrors.WINCODEC_ERR_PALETTEUNAVAILABLE,
WGXERR_OBJECTBUSY = unchecked((int) 0x88980001),
WGXERR_INSUFFICIENTBUFFER = unchecked((int) 0x88980002),
WGXERR_WIN32ERROR = unchecked((int) 0x88980003),
WGXERR_SCANNER_FAILED = unchecked((int) 0x88980004),
WGXERR_SCREENACCESSDENIED = unchecked((int) 0x88980005),
WGXERR_DISPLAYSTATEINVALID = unchecked((int) 0x88980006),
WGXERR_NONINVERTIBLEMATRIX = unchecked((int) 0x88980007),
WGXERR_ZEROVECTOR = unchecked((int) 0x88980008),
WGXERR_TERMINATED = unchecked((int) 0x88980009),
WGXERR_BADNUMBER = unchecked((int) 0x8898000A),
WGXERR_INTERNALERROR = unchecked((int) 0x88980080),
WGXERR_DISPLAYFORMATNOTSUPPORTED = unchecked((int) 0x88980084),
WGXERR_INVALIDCALL = unchecked((int) 0x88980085),
WGXERR_ALREADYLOCKED = unchecked((int) 0x88980086),
WGXERR_NOTLOCKED = unchecked((int) 0x88980087),
WGXERR_DEVICECANNOTRENDERTEXT = unchecked((int) 0x88980088),
WGXERR_GLYPHBITMAPMISSED = unchecked((int) 0x88980089),
WGXERR_MALFORMEDGLYPHCACHE = unchecked((int) 0x8898008A),
WGXERR_GENERIC_IGNORE = unchecked((int) 0x8898008B),
WGXERR_MALFORMED_GUIDELINE_DATA = unchecked((int) 0x8898008C),
WGXERR_NO_HARDWARE_DEVICE = unchecked((int) 0x8898008D),
WGXERR_NEED_RECREATE_AND_PRESENT = unchecked((int) 0x8898008E),
WGXERR_ALREADY_INITIALIZED = unchecked((int) 0x8898008F),
WGXERR_MISMATCHED_SIZE = unchecked((int) 0x88980090),
WGXERR_NO_REDIRECTION_SURFACE_AVAILABLE = unchecked((int) 0x88980091),
WGXERR_REMOTING_NOT_SUPPORTED = unchecked((int) 0x88980092),
WGXERR_QUEUED_PRESENT_NOT_SUPPORTED = unchecked((int) 0x88980093),
WGXERR_NOT_QUEUING_PRESENTS = unchecked((int) 0x88980094),
WGXERR_NO_REDIRECTION_SURFACE_RETRY_LATER = unchecked((int) 0x88980095),
WGXERR_TOOMANYSHADERELEMNTS = unchecked((int) 0x88980096),
// AVAILABLE = unchecked((int) 0x88980097),
// AVAILABLE = unchecked((int) 0x88980098),
WGXERR_SHADER_COMPILE_FAILED = unchecked((int) 0x88980099),
WGXERR_MAX_TEXTURE_SIZE_EXCEEDED = unchecked((int) 0x8898009A),
// AVAILABLE = unchecked((int) 0x8898009B),
WGXERR_UCE_INVALIDPACKETHEADER = unchecked((int) 0x88980400),
WGXERR_UCE_UNKNOWNPACKET = unchecked((int) 0x88980401),
WGXERR_UCE_ILLEGALPACKET = unchecked((int) 0x88980402),
WGXERR_UCE_MALFORMEDPACKET = unchecked((int) 0x88980403),
WGXERR_UCE_ILLEGALHANDLE = unchecked((int) 0x88980404),
WGXERR_UCE_HANDLELOOKUPFAILED = unchecked((int) 0x88980405),
WGXERR_UCE_RENDERTHREADFAILURE = unchecked((int) 0x88980406),
WGXERR_UCE_CTXSTACKFRSTTARGETNULL = unchecked((int) 0x88980407),
WGXERR_UCE_CONNECTIONIDLOOKUPFAILED = unchecked((int) 0x88980408),
WGXERR_UCE_BLOCKSFULL = unchecked((int) 0x88980409),
WGXERR_UCE_MEMORYFAILURE = unchecked((int) 0x8898040A),
WGXERR_UCE_PACKETRECORDOUTOFRANGE = unchecked((int) 0x8898040B),
WGXERR_UCE_ILLEGALRECORDTYPE = unchecked((int) 0x8898040C),
WGXERR_UCE_OUTOFHANDLES = unchecked((int) 0x8898040D),
WGXERR_UCE_UNCHANGABLE_UPDATE_ATTEMPTED = unchecked((int) 0x8898040E),
WGXERR_UCE_NO_MULTIPLE_WORKER_THREADS = unchecked((int) 0x8898040F),
WGXERR_UCE_REMOTINGNOTSUPPORTED = unchecked((int) 0x88980410),
WGXERR_UCE_MISSINGENDCOMMAND = unchecked((int) 0x88980411),
WGXERR_UCE_MISSINGBEGINCOMMAND = unchecked((int) 0x88980412),
WGXERR_UCE_CHANNELSYNCTIMEDOUT = unchecked((int) 0x88980413),
WGXERR_UCE_CHANNELSYNCABANDONED = unchecked((int) 0x88980414),
WGXERR_UCE_UNSUPPORTEDTRANSPORTVERSION = unchecked((int) 0x88980415),
WGXERR_UCE_TRANSPORTUNAVAILABLE = unchecked((int) 0x88980416),
WGXERR_UCE_FEEDBACK_UNSUPPORTED = unchecked((int) 0x88980417),
WGXERR_UCE_COMMANDTRANSPORTDENIED = unchecked((int) 0x88980418),
WGXERR_UCE_GRAPHICSSTREAMUNAVAILABLE = unchecked((int) 0x88980419),
WGXERR_UCE_GRAPHICSSTREAMALREADYOPEN = unchecked((int) 0x88980420),
WGXERR_UCE_TRANSPORTDISCONNECTED = unchecked((int) 0x88980421),
WGXERR_UCE_TRANSPORTOVERLOADED = unchecked((int) 0x88980422),
WGXERR_UCE_PARTITION_ZOMBIED = unchecked((int) 0x88980423),
WGXERR_UCE_USER_SHADEREFFECT_ERROR = unchecked((int) 0x88980424),
WGXERR_AV_NOCLOCK = unchecked((int) 0x88980500),
WGXERR_AV_NOMEDIATYPE = unchecked((int) 0x88980501),
WGXERR_AV_NOVIDEOMIXER = unchecked((int) 0x88980502),
WGXERR_AV_NOVIDEOPRESENTER = unchecked((int) 0x88980503),
WGXERR_AV_NOREADYFRAMES = unchecked((int) 0x88980504),
WGXERR_AV_MODULENOTLOADED = unchecked((int) 0x88980505),
WGXERR_AV_WMPFACTORYNOTREGISTERED = unchecked((int) 0x88980506),
WGXERR_AV_INVALIDWMPVERSION = unchecked((int) 0x88980507),
WGXERR_AV_INSUFFICIENTVIDEORESOURCES = unchecked((int) 0x88980508),
WGXERR_AV_VIDEOACCELERATIONNOTAVAILABLE = unchecked((int) 0x88980509),
WGXERR_AV_REQUESTEDTEXTURETOOBIG = unchecked((int) 0x8898050A),
WGXERR_AV_SEEKFAILED = unchecked((int) 0x8898050B),
WGXERR_AV_UNEXPECTEDWMPFAILURE = unchecked((int) 0x8898050C),
WGXERR_AV_MEDIAPLAYERCLOSED = unchecked((int) 0x8898050D),
WGXERR_AV_UNKNOWNHARDWAREERROR = unchecked((int) 0x8898050E),
WGXERR_D3DI_INVALIDSURFACEUSAGE = unchecked((int) 0x88980800),
WGXERR_D3DI_INVALIDSURFACESIZE = unchecked((int) 0x88980801),
WGXERR_D3DI_INVALIDSURFACEPOOL = unchecked((int) 0x88980802),
WGXERR_D3DI_INVALIDSURFACEDEVICE = unchecked((int) 0x88980803),
WGXERR_D3DI_INVALIDANTIALIASINGSETTINGS = unchecked((int) 0x88980804)
};
#endregion
}

Просмотреть файл

@ -0,0 +1,414 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.Windows;
using System.Windows.Media;
using System.Windows.Media.Composition;
using System.Windows.Media.Imaging;
using System.Runtime.InteropServices;
using System.Security;
using System.Security.Permissions;
using MS.Internal.PresentationCore;
namespace MS.Internal
{
#region MILRenderTargetBitmap
internal static class MILRenderTargetBitmap
{
/// <SecurityNote>
/// Critical: Elevates to unmanagedcode permission
/// </SecurityNote>
[SecurityCritical]
[SuppressUnmanagedCodeSecurity]
[DllImport(DllImport.MilCore, EntryPoint="MILRenderTargetBitmapGetBitmap")]//CASRemoval:
internal static extern int /*HRESULT*/
GetBitmap(
SafeMILHandle /* IMILRenderTargetBitmap */ THIS_PTR,
out BitmapSourceSafeMILHandle /* IWICBitmap */ ppIBitmap);
[DllImport(DllImport.MilCore, EntryPoint = "MILRenderTargetBitmapClear")]
internal static extern int /*HRESULT*/
Clear(
SafeMILHandle /* IMILRenderTargetBitmap */ THIS_PTR);
}
#endregion
#region MILMedia
/// <SecurityNote>
/// Critical: Elevates to unmanagedcode permission
/// </SecurityNote>
[SuppressUnmanagedCodeSecurity, SecurityCritical(SecurityCriticalScope.Everything)]
internal static class MILMedia
{
[DllImport(DllImport.MilCore, EntryPoint="MILMediaOpen")]
internal static extern int /* HRESULT */ Open(
SafeMediaHandle /* IMILMedia */ THIS_PTR,
[In, MarshalAs(UnmanagedType.BStr)] string /* LPOLESTR */ src
);
[DllImport(DllImport.MilCore, EntryPoint="MILMediaStop")]//CASRemoval:
internal static extern int /* HRESULT */ Stop(
SafeMediaHandle /* IMILMedia */ THIS_PTR
);
[DllImport(DllImport.MilCore, EntryPoint="MILMediaClose")]//CASRemoval:
internal static extern int /*HRESULT */ Close(
SafeMediaHandle /* IMILMedia */ THIS_PTR
);
[DllImport(DllImport.MilCore, EntryPoint="MILMediaGetPosition")]//CASRemoval:
internal static extern int /* HRESULT */ GetPosition(
SafeMediaHandle /* IMILMedia */ THIS_PTR,
ref long pllTime);
[DllImport(DllImport.MilCore, EntryPoint="MILMediaSetPosition")]//CASRemoval:
internal static extern int /* HRESULT */ SetPosition(
SafeMediaHandle /* IMILMedia */ THIS_PTR,
long llTime);
[DllImport(DllImport.MilCore, EntryPoint="MILMediaSetVolume")]//CASRemoval:
internal static extern int /* HRESULT */ SetVolume(
SafeMediaHandle /* IMILMedia */ THIS_PTR,
double dblVolume
);
[DllImport(DllImport.MilCore, EntryPoint="MILMediaSetBalance")]
internal static extern int /* HRESULT */ SetBalance(
SafeMediaHandle /* IMILMedia */ THIS_PTR,
double dblBalance
);
[DllImport(DllImport.MilCore, EntryPoint="MILMediaSetIsScrubbingEnabled")]
internal static extern int /* HRESULT */ SetIsScrubbingEnabled(
SafeMediaHandle /* IMILMedia */ THIS_PTR,
bool isScrubbingEnabled
);
[DllImport(DllImport.MilCore, EntryPoint="MILMediaIsBuffering")]//CASRemoval:
internal static extern int /* HRESULT */ IsBuffering(
SafeMediaHandle /* IMILMedia */ THIS_PTR,
ref bool pIsBuffering
);
[DllImport(DllImport.MilCore, EntryPoint="MILMediaCanPause")]//CASRemoval:
internal static extern int /* HRESULT */ CanPause(
SafeMediaHandle /* IMILMedia */ THIS_PTR,
ref bool pCanPause
);
[DllImport(DllImport.MilCore, EntryPoint="MILMediaGetDownloadProgress")]//CASRemoval:
internal static extern int /* HRESULT */ GetDownloadProgress(
SafeMediaHandle /* IMILMedia */ THIS_PTR,
ref double pProgress
);
[DllImport(DllImport.MilCore, EntryPoint="MILMediaGetBufferingProgress")]//CASRemoval:
internal static extern int /* HRESULT */ GetBufferingProgress(
SafeMediaHandle /* IMILMedia */ THIS_PTR,
ref double pProgress
);
[DllImport(DllImport.MilCore, EntryPoint="MILMediaSetRate")]//CASRemoval:
internal static extern int /* HRESULT */ SetRate(
SafeMediaHandle /* IMILMedia */ THIS_PTR,
double dblRate
);
[DllImport(DllImport.MilCore, EntryPoint="MILMediaHasVideo")]//CASRemoval:
internal static extern int /* HRESULT */ HasVideo(
SafeMediaHandle /* IMILMedia */ THIS_PTR,
ref bool pfHasVideo
);
[DllImport(DllImport.MilCore, EntryPoint="MILMediaHasAudio")]//CASRemoval:
internal static extern int /* HRESULT */ HasAudio(
SafeMediaHandle /* IMILMedia */ THIS_PTR,
ref bool pfHasAudio
);
[DllImport(DllImport.MilCore, EntryPoint="MILMediaGetNaturalHeight")]//CASRemoval:
internal static extern int /* HRESULT */ GetNaturalHeight(
SafeMediaHandle /* IMILMedia */ THIS_PTR,
ref UInt32 puiHeight
);
[DllImport(DllImport.MilCore, EntryPoint="MILMediaGetNaturalWidth")]//CASRemoval:
internal static extern int /* HRESULT */ GetNaturalWidth(
SafeMediaHandle /* IMILMedia */ THIS_PTR,
ref UInt32 puiWidth
);
[DllImport(DllImport.MilCore, EntryPoint="MILMediaGetMediaLength")]//CASRemoval:
internal static extern int /* HRESULT */ GetMediaLength(
SafeMediaHandle /* IMILMedia */ THIS_PTR,
ref long pllLength
);
[DllImport(DllImport.MilCore, EntryPoint="MILMediaNeedUIFrameUpdate")]
internal static extern int /* HRESULT */ NeedUIFrameUpdate(
SafeMediaHandle /* IMILMedia */ THIS_PTR
);
[DllImport(DllImport.MilCore, EntryPoint="MILMediaShutdown")]//CASRemoval:
internal static extern int /* HRESULT */ Shutdown(
IntPtr /* IMILMedia */ THIS_PTR
);
[DllImport(DllImport.MilCore, EntryPoint = "MILMediaProcessExitHandler")]
internal static extern int /*HRESULT*/ ProcessExitHandler(
SafeMediaHandle /* IMILMedia */ THIS_PTR
);
}
#endregion
#region MILSwDoubleBufferedBitmap
internal static class MILSwDoubleBufferedBitmap
{
[SecurityCritical]
[SuppressUnmanagedCodeSecurity]
[DllImport(DllImport.MilCore, EntryPoint = "MILSwDoubleBufferedBitmapCreate")]
internal static extern int /* HRESULT */ Create(
uint width,
uint height,
double dpiX,
double dpiY,
ref Guid pixelFormatGuid,
SafeMILHandle /* IWICPalette */ pPalette,
out SafeMILHandle /* CSwDoubleBufferedBitmap */ ppSwDoubleBufferedBitmap);
[SecurityCritical]
[SuppressUnmanagedCodeSecurity]
[DllImport(DllImport.MilCore, EntryPoint = "MILSwDoubleBufferedBitmapGetBackBuffer", PreserveSig = false)]
internal static extern void GetBackBuffer(
SafeMILHandle /* CSwDoubleBufferedBitmap */ THIS_PTR,
out BitmapSourceSafeMILHandle /* IWICBitmap */ pBackBuffer,
out uint pBackBufferSize
);
[SecurityCritical]
[SuppressUnmanagedCodeSecurity]
[DllImport(DllImport.MilCore, EntryPoint = "MILSwDoubleBufferedBitmapAddDirtyRect", PreserveSig = false)]
internal static extern void AddDirtyRect(
SafeMILHandle /* CSwDoubleBufferedBitmap */ THIS_PTR,
ref Int32Rect dirtyRect
);
[SecurityCritical]
[SuppressUnmanagedCodeSecurity]
[DllImport(DllImport.MilCore, EntryPoint = "MILSwDoubleBufferedBitmapProtectBackBuffer")]
internal static extern int /* HRESULT */ ProtectBackBuffer(
SafeMILHandle /* CSwDoubleBufferedBitmap */ THIS_PTR
);
}
#endregion
#region MILUpdateSystemParametersInfo
/// <summary>
/// MILUpdateSystemParametersInfo
/// </summary>
internal static class MILUpdateSystemParametersInfo
{
/// <SecurityNote>
/// Critical: This code elevates to unmanaged Code permission
/// </SecurityNote>
[SecurityCritical]
[SuppressUnmanagedCodeSecurity]
[DllImport(DllImport.MilCore, EntryPoint="MILUpdateSystemParametersInfo")]
internal static extern int /* HRESULT */
Update();
}
#endregion
#region WICPixelFormatGuids
internal static class WICPixelFormatGUIDs
{
/* Undefined formats */
internal static readonly Guid WICPixelFormatDontCare = new Guid(0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x00);
/* Indexed formats */
internal static readonly Guid WICPixelFormat1bppIndexed = new Guid(0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x01);
internal static readonly Guid WICPixelFormat2bppIndexed = new Guid(0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x02);
internal static readonly Guid WICPixelFormat4bppIndexed = new Guid(0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x03);
internal static readonly Guid WICPixelFormat8bppIndexed = new Guid(0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x04);
internal static readonly Guid WICPixelFormatBlackWhite = new Guid(0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x05);
internal static readonly Guid WICPixelFormat2bppGray = new Guid(0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x06);
internal static readonly Guid WICPixelFormat4bppGray = new Guid(0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x07);
internal static readonly Guid WICPixelFormat8bppGray = new Guid(0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x08);
/* sRGB formats (gamma is approx. 2.2) */
/* For a full definition, see the sRGB spec */
/* 16bpp formats */
internal static readonly Guid WICPixelFormat16bppBGR555 = new Guid(0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x09);
internal static readonly Guid WICPixelFormat16bppBGR565 = new Guid(0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x0a);
internal static readonly Guid WICPixelFormat16bppGray = new Guid(0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x0b);
/* 24bpp formats */
internal static readonly Guid WICPixelFormat24bppBGR = new Guid(0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x0c);
internal static readonly Guid WICPixelFormat24bppRGB = new Guid(0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x0d);
/* 32bpp format */
internal static readonly Guid WICPixelFormat32bppBGR = new Guid(0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x0e);
internal static readonly Guid WICPixelFormat32bppBGRA = new Guid(0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x0f);
internal static readonly Guid WICPixelFormat32bppPBGRA = new Guid(0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x10);
internal static readonly Guid WICPixelFormat32bppGrayFloat = new Guid(0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x11);
/* scRGB formats. Gamma is 1.0 */
/* For a full definition, see the scRGB spec */
/* 32bpp format */
internal static readonly Guid WICPixelFormat32bppBGR101010 = new Guid(0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x14);
/* 48bpp format */
internal static readonly Guid WICPixelFormat48bppRGB = new Guid(0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x15);
/* 64bpp format */
internal static readonly Guid WICPixelFormat64bppRGBA = new Guid(0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x16);
internal static readonly Guid WICPixelFormat64bppPRGBA = new Guid(0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x17);
/* Floating point scRGB formats */
internal static readonly Guid WICPixelFormat128bppRGBAFloat = new Guid(0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x19);
internal static readonly Guid WICPixelFormat128bppPRGBAFloat = new Guid(0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x1a);
internal static readonly Guid WICPixelFormat128bppRGBFloat = new Guid(0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x1b);
/* CMYK formats. */
internal static readonly Guid WICPixelFormat32bppCMYK = new Guid(0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x1c);
}
#endregion
#region Guids
internal static class MILGuidData
{
[SecurityCritical]
static MILGuidData()
{
}
[SecurityCritical]
internal static readonly Guid IID_IMILRenderTargetBitmap = new Guid(0x00000201, 0xa8f2, 0x4877, 0xba, 0xa, 0xfd, 0x2b, 0x66, 0x45, 0xfb, 0x94);
[SecurityCritical]
internal static readonly Guid IID_IWICPalette = new Guid(0x00000040, 0xa8f2, 0x4877, 0xba, 0x0a, 0xfd, 0x2b, 0x66, 0x45, 0xfb, 0x94);
[SecurityCritical]
internal static readonly Guid IID_IWICBitmapSource = new Guid(0x00000120, 0xa8f2, 0x4877, 0xba, 0x0a, 0xfd, 0x2b, 0x66, 0x45, 0xfb, 0x94);
[SecurityCritical]
internal static readonly Guid IID_IWICFormatConverter = new Guid(0x00000301, 0xa8f2, 0x4877, 0xba, 0x0a, 0xfd, 0x2b, 0x66, 0x45, 0xfb, 0x94);
[SecurityCritical]
internal static readonly Guid IID_IWICBitmapScaler = new Guid(0x00000302, 0xa8f2, 0x4877, 0xba, 0x0a, 0xfd, 0x2b, 0x66, 0x45, 0xfb, 0x94);
[SecurityCritical]
internal static readonly Guid IID_IWICBitmapClipper = new Guid(0xE4FBCF03, 0x223D, 0x4e81, 0x93, 0x33, 0xD6, 0x35, 0x55, 0x6D, 0xD1, 0xB5);
[SecurityCritical]
internal static readonly Guid IID_IWICBitmapFlipRotator = new Guid(0x5009834F, 0x2D6A, 0x41ce, 0x9E, 0x1B, 0x17, 0xC5, 0xAF, 0xF7, 0xA7, 0x82);
[SecurityCritical]
internal static readonly Guid IID_IWICBitmap = new Guid(0x00000121, 0xa8f2, 0x4877, 0xba, 0x0a, 0xfd, 0x2b, 0x66, 0x45, 0xfb, 0x94);
[SecurityCritical]
internal static readonly Guid IID_IWICBitmapEncoder = new Guid(0x00000103, 0xa8f2, 0x4877, 0xba, 0x0a, 0xfd, 0x2b, 0x66, 0x45, 0xfb, 0x94);
[SecurityCritical]
internal static readonly Guid IID_IWICBitmapFrameEncode = new Guid(0x00000105, 0xa8f2, 0x4877, 0xba, 0x0a, 0xfd, 0x2b, 0x66, 0x45, 0xfb, 0x94);
[SecurityCritical]
internal static readonly Guid IID_IWICBitmapDecoder = new Guid(0x9EDDE9E7, 0x8DEE, 0x47ea, 0x99, 0xDF, 0xE6, 0xFA, 0xF2, 0xED, 0x44, 0xBF);
[SecurityCritical]
internal static readonly Guid IID_IWICBitmapFrameDecode = new Guid(0x3B16811B, 0x6A43, 0x4ec9, 0xA8, 0x13, 0x3D, 0x93, 0x0C, 0x13, 0xB9, 0x40);
[SecurityCritical]
internal static readonly Guid IID_IWICMetadataQueryReader = new Guid(0x30989668, 0xE1C9, 0x4597, 0xB3, 0x95, 0x45, 0x8E, 0xED, 0xB8, 0x08, 0xDF);
[SecurityCritical]
internal static readonly Guid IID_IWICMetadataQueryWriter = new Guid(0xA721791A, 0x0DEF, 0x4d06, 0xBD, 0x91, 0x21, 0x18, 0xBF, 0x1D, 0xB1, 0x0B);
[SecurityCritical]
internal static readonly Guid IID_IWICMetadataReader = new Guid(0x9204FE99, 0xD8FC, 0x4FD5, 0xA0, 0x01, 0x95, 0x36, 0xB0, 0x67, 0xA8, 0x99);
[SecurityCritical]
internal static readonly Guid IID_IWICMetadataWriter = new Guid(0xF7836E16, 0x3BE0, 0x470B, 0x86, 0xBB, 0x16, 0x0D, 0x0A, 0xEC, 0xD7, 0xDE);
[SecurityCritical]
internal static readonly Guid IID_IWICPixelFormatInfo = new Guid(0xE8EDA601, 0x3D48, 0x431a, 0xAB, 0x44, 0x69, 0x05, 0x9B, 0xE8, 0x8B, 0xBE);
[SecurityCritical]
internal static readonly Guid IID_IWICImagingFactory = new Guid(0xec5ec8a9, 0xc395, 0x4314, 0x9c, 0x77, 0x54, 0xd7, 0xa9, 0x35, 0xff, 0x70);
[SecurityCritical]
internal static readonly Guid CLSID_WICBmpDecoder = new Guid(0x6b462062, 0x7cbf, 0x400d, 0x9f, 0xdb, 0x81, 0x3d, 0xd1, 0x0f, 0x27, 0x78);
[SecurityCritical]
internal static readonly Guid CLSID_WICPngDecoder = new Guid(0x389ea17b, 0x5078, 0x4cde, 0xb6, 0xef, 0x25, 0xc1, 0x51, 0x75, 0xc7, 0x51);
[SecurityCritical]
internal static readonly Guid CLSID_WICIcoDecoder = new Guid(0xc61bfcdf, 0x2e0f, 0x4aad, 0xa8, 0xd7, 0xe0, 0x6b, 0xaf, 0xeb, 0xcd, 0xfe);
[SecurityCritical]
internal static readonly Guid CLSID_WICJpegDecoder = new Guid(0x9456a480, 0xe88b, 0x43ea, 0x9e, 0x73, 0x0b, 0x2d, 0x9b, 0x71, 0xb1, 0xca);
[SecurityCritical]
internal static readonly Guid CLSID_WICGifDecoder = new Guid(0x381dda3c, 0x9ce9, 0x4834, 0xa2, 0x3e, 0x1f, 0x98, 0xf8, 0xfc, 0x52, 0xbe);
[SecurityCritical]
internal static readonly Guid CLSID_WICTiffDecoder = new Guid(0xb54e85d9, 0xfe23, 0x499f, 0x8b, 0x88, 0x6a, 0xce, 0xa7, 0x13, 0x75, 0x2b);
[SecurityCritical]
internal static readonly Guid CLSID_WICWmpDecoder = new Guid(0xa26cec36, 0x234c, 0x4950, 0xae, 0x16, 0xe3, 0x4a, 0xac, 0xe7, 0x1d, 0x0d);
[SecurityCritical]
internal static readonly Guid CLSID_WICBmpEncoder = new Guid(0x69be8bb4, 0xd66d, 0x47c8, 0x86, 0x5a, 0xed, 0x15, 0x89, 0x43, 0x37, 0x82);
[SecurityCritical]
internal static readonly Guid CLSID_WICPngEncoder = new Guid(0x27949969, 0x876a, 0x41d7, 0x94, 0x47, 0x56, 0x8f, 0x6a, 0x35, 0xa4, 0xdc);
[SecurityCritical]
internal static readonly Guid CLSID_WICJpegEncoder = new Guid(0x1a34f5c1, 0x4a5a, 0x46dc, 0xb6, 0x44, 0x1f, 0x45, 0x67, 0xe7, 0xa6, 0x76);
[SecurityCritical]
internal static readonly Guid CLSID_WICGifEncoder = new Guid(0x114f5598, 0x0b22, 0x40a0, 0x86, 0xa1, 0xc8, 0x3e, 0xa4, 0x95, 0xad, 0xbd);
[SecurityCritical]
internal static readonly Guid CLSID_WICTiffEncoder = new Guid(0x0131be10, 0x2001, 0x4c5f, 0xa9, 0xb0, 0xcc, 0x88, 0xfa, 0xb6, 0x4c, 0xe8);
[SecurityCritical]
internal static readonly Guid CLSID_WICWmpEncoder = new Guid(0xac4ce3cb, 0xe1c1, 0x44cd, 0x82, 0x15, 0x5a, 0x16, 0x65, 0x50, 0x9e, 0xc2);
[SecurityCritical]
internal static readonly Guid GUID_ContainerFormatBmp = new Guid(0x0af1d87e, 0xfcfe, 0x4188, 0xbd, 0xeb, 0xa7, 0x90, 0x64, 0x71, 0xcb, 0xe3);
[SecurityCritical]
internal static readonly Guid GUID_ContainerFormatIco = new Guid(0xa3a860c4, 0x338f, 0x4c17, 0x91, 0x9a, 0xfb, 0xa4, 0xb5, 0x62, 0x8f, 0x21);
[SecurityCritical]
internal static readonly Guid GUID_ContainerFormatGif = new Guid(0x1f8a5601, 0x7d4d, 0x4cbd, 0x9c, 0x82, 0x1b, 0xc8, 0xd4, 0xee, 0xb9, 0xa5);
[SecurityCritical]
internal static readonly Guid GUID_ContainerFormatJpeg = new Guid(0x19e4a5aa, 0x5662, 0x4fc5, 0xa0, 0xc0, 0x17, 0x58, 0x02, 0x8e, 0x10, 0x57);
[SecurityCritical]
internal static readonly Guid GUID_ContainerFormatPng = new Guid(0x1b7cfaf4, 0x713f, 0x473c, 0xbb, 0xcd, 0x61, 0x37, 0x42, 0x5f, 0xae, 0xaf);
[SecurityCritical]
internal static readonly Guid GUID_ContainerFormatTiff = new Guid(0x163bcc30, 0xe2e9, 0x4f0b, 0x96, 0x1d, 0xa3, 0xe9, 0xfd, 0xb7, 0x88, 0xa3);
[SecurityCritical]
internal static readonly Guid GUID_ContainerFormatWmp = new Guid(0x57a37caa, 0x367a, 0x4540, 0x91, 0x6b, 0xf1, 0x83, 0xc5, 0x09, 0x3a, 0x4b);
[SecurityCritical]
internal static readonly byte[] GUID_VendorMicrosoft = new byte[] { 0xca, 0x49, 0xe7, 0xf0, 0xef, 0xed, 0x89, 0x45, 0xa7, 0x3a, 0xee, 0xe, 0x62, 0x6a, 0x2a, 0x2b };
}
#endregion // Guids
}

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -0,0 +1,51 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
//
//
// This file was generated, please do not edit it directly.
//
// Please see MilCodeGen.html for more information.
//
// This code is generated from mcg\generators\ProtocolFingerprint.cs
namespace MS.Internal.Composition
{
/// <summary>
/// This is the automatically generated part of the versioning class that
/// contains definitions of methods returning MIL and DWM SDK versions.
/// </summary>
internal static class Version
{
/// <summary>
/// Returns the MIL SDK version this binary has been compiled against
/// </summary>
internal static uint MilSdkVersion
{
get
{
unchecked
{
return (uint)0x200184C0;
}
}
}
/// <summary>
/// Returns the DWM SDK version this binary has been compiled against
/// </summary>
internal static uint DwmSdkVersion
{
get
{
unchecked
{
return (uint)0xBDDCB2B;
}
}
}
}
}

Просмотреть файл

@ -0,0 +1,37 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
internal static partial class Interop
{
internal static partial class Libraries
{
internal const string Advapi32 = "advapi32.dll";
internal const string BCrypt = "BCrypt.dll";
internal const string CoreComm_L1_1_1 = "api-ms-win-core-comm-l1-1-1.dll";
internal const string Crypt32 = "crypt32.dll";
internal const string Error_L1 = "api-ms-win-core-winrt-error-l1-1-0.dll";
internal const string HttpApi = "httpapi.dll";
internal const string IpHlpApi = "iphlpapi.dll";
internal const string Kernel32 = "kernel32.dll";
internal const string Memory_L1_3 = "api-ms-win-core-memory-l1-1-3.dll";
internal const string Mswsock = "mswsock.dll";
internal const string NCrypt = "ncrypt.dll";
internal const string NtDll = "ntdll.dll";
internal const string Odbc32 = "odbc32.dll";
internal const string OleAut32 = "oleaut32.dll";
internal const string PerfCounter = "perfcounter.dll";
internal const string RoBuffer = "api-ms-win-core-winrt-robuffer-l1-1-0.dll";
internal const string Secur32 = "secur32.dll";
internal const string Shell32 = "shell32.dll";
internal const string SspiCli = "sspicli.dll";
internal const string User32 = "user32.dll";
internal const string Version = "version.dll";
internal const string WebSocket = "websocket.dll";
internal const string WinHttp = "winhttp.dll";
internal const string WinMM = "winmm.dll";
internal const string Ws2_32 = "ws2_32.dll";
internal const string Wtsapi32 = "wtsapi32.dll";
internal const string CompressionNative = "clrcompression.dll";
}
}

Просмотреть файл

@ -0,0 +1,233 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
internal partial class Interop
{
internal partial class User32
{
public const int COLOR_WINDOW = 5;
public const int CTRL_LOGOFF_EVENT = 5;
public const int CTRL_SHUTDOWN_EVENT = 6;
public const int ENDSESSION_CLOSEAPP = 0x00000001;
public const int ENDSESSION_CRITICAL = 0x40000000;
public const int ENDSESSION_LOGOFF = unchecked((int)0x80000000);
public const int GCL_WNDPROC = (-24);
public const int GWL_WNDPROC = (-4);
public const int MWMO_INPUTAVAILABLE = 0x0004;
public const int PBT_APMQUERYSUSPEND = 0x0000;
public const int PBT_APMQUERYSTANDBY = 0x0001;
public const int PBT_APMQUERYSUSPENDFAILED = 0x0002;
public const int PBT_APMQUERYSTANDBYFAILED = 0x0003;
public const int PBT_APMSUSPEND = 0x0004;
public const int PBT_APMSTANDBY = 0x0005;
public const int PBT_APMRESUMECRITICAL = 0x0006;
public const int PBT_APMRESUMESUSPEND = 0x0007;
public const int PBT_APMRESUMESTANDBY = 0x0008;
public const int PBT_APMBATTERYLOW = 0x0009;
public const int PBT_APMPOWERSTATUSCHANGE = 0x000A;
public const int PBT_APMOEMEVENT = 0x000B;
public const int PM_REMOVE = 0x0001;
public const int QS_KEY = 0x0001,
QS_MOUSEMOVE = 0x0002,
QS_MOUSEBUTTON = 0x0004,
QS_POSTMESSAGE = 0x0008,
QS_TIMER = 0x0010,
QS_PAINT = 0x0020,
QS_SENDMESSAGE = 0x0040,
QS_HOTKEY = 0x0080,
QS_ALLPOSTMESSAGE = 0x0100,
QS_MOUSE = QS_MOUSEMOVE | QS_MOUSEBUTTON,
QS_INPUT = QS_MOUSE | QS_KEY,
QS_ALLEVENTS = QS_INPUT | QS_POSTMESSAGE | QS_TIMER | QS_PAINT | QS_HOTKEY,
QS_ALLINPUT = QS_INPUT | QS_POSTMESSAGE | QS_TIMER | QS_PAINT | QS_HOTKEY | QS_SENDMESSAGE;
public const int SPI_GETBEEP = 1;
public const int SPI_SETBEEP = 2;
public const int SPI_GETMOUSE = 3;
public const int SPI_SETMOUSE = 4;
public const int SPI_GETBORDER = 5;
public const int SPI_SETBORDER = 6;
public const int SPI_GETKEYBOARDSPEED = 10;
public const int SPI_SETKEYBOARDSPEED = 11;
public const int SPI_LANGDRIVER = 12;
public const int SPI_ICONHORIZONTALSPACING = 13;
public const int SPI_GETSCREENSAVETIMEOUT = 14;
public const int SPI_SETSCREENSAVETIMEOUT = 15;
public const int SPI_GETSCREENSAVEACTIVE = 16;
public const int SPI_SETSCREENSAVEACTIVE = 17;
public const int SPI_GETGRIDGRANULARITY = 18;
public const int SPI_SETGRIDGRANULARITY = 19;
public const int SPI_SETDESKWALLPAPER = 20;
public const int SPI_SETDESKPATTERN = 21;
public const int SPI_GETKEYBOARDDELAY = 22;
public const int SPI_SETKEYBOARDDELAY = 23;
public const int SPI_ICONVERTICALSPACING = 24;
public const int SPI_GETICONTITLEWRAP = 25;
public const int SPI_SETICONTITLEWRAP = 26;
public const int SPI_GETMENUDROPALIGNMENT = 27;
public const int SPI_SETMENUDROPALIGNMENT = 28;
public const int SPI_SETDOUBLECLKWIDTH = 29;
public const int SPI_SETDOUBLECLKHEIGHT = 30;
public const int SPI_GETICONTITLELOGFONT = 31;
public const int SPI_SETDOUBLECLICKTIME = 32;
public const int SPI_SETMOUSEBUTTONSWAP = 33;
public const int SPI_SETICONTITLELOGFONT = 34;
public const int SPI_GETFASTTASKSWITCH = 35;
public const int SPI_SETFASTTASKSWITCH = 36;
public const int SPI_SETDRAGFULLWINDOWS = 37;
public const int SPI_GETDRAGFULLWINDOWS = 38;
public const int SPI_GETNONCLIENTMETRICS = 41;
public const int SPI_SETNONCLIENTMETRICS = 42;
public const int SPI_GETMINIMIZEDMETRICS = 43;
public const int SPI_SETMINIMIZEDMETRICS = 44;
public const int SPI_GETICONMETRICS = 45;
public const int SPI_SETICONMETRICS = 46;
public const int SPI_SETWORKAREA = 47;
public const int SPI_GETWORKAREA = 48;
public const int SPI_SETPENWINDOWS = 49;
public const int SPI_GETHIGHCONTRAST = 66;
public const int SPI_SETHIGHCONTRAST = 67;
public const int SPI_GETKEYBOARDPREF = 68;
public const int SPI_SETKEYBOARDPREF = 69;
public const int SPI_GETSCREENREADER = 70;
public const int SPI_SETSCREENREADER = 71;
public const int SPI_GETANIMATION = 72;
public const int SPI_SETANIMATION = 73;
public const int SPI_GETFONTSMOOTHING = 74;
public const int SPI_SETFONTSMOOTHING = 75;
public const int SPI_SETDRAGWIDTH = 76;
public const int SPI_SETDRAGHEIGHT = 77;
public const int SPI_SETHANDHELD = 78;
public const int SPI_GETLOWPOWERTIMEOUT = 79;
public const int SPI_GETPOWEROFFTIMEOUT = 80;
public const int SPI_SETLOWPOWERTIMEOUT = 81;
public const int SPI_SETPOWEROFFTIMEOUT = 82;
public const int SPI_GETLOWPOWERACTIVE = 83;
public const int SPI_GETPOWEROFFACTIVE = 84;
public const int SPI_SETLOWPOWERACTIVE = 85;
public const int SPI_SETPOWEROFFACTIVE = 86;
public const int SPI_SETCURSORS = 87;
public const int SPI_SETICONS = 88;
public const int SPI_GETDEFAULTINPUTLANG = 89;
public const int SPI_SETDEFAULTINPUTLANG = 90;
public const int SPI_SETLANGTOGGLE = 91;
public const int SPI_GETWINDOWSEXTENSION = 92;
public const int SPI_SETMOUSETRAILS = 93;
public const int SPI_GETMOUSETRAILS = 94;
public const int SPI_SETSCREENSAVERRUNNING = 97;
public const int SPI_SCREENSAVERRUNNING = SPI_SETSCREENSAVERRUNNING;
public const int SPI_GETFILTERKEYS = 50;
public const int SPI_SETFILTERKEYS = 51;
public const int SPI_GETTOGGLEKEYS = 52;
public const int SPI_SETTOGGLEKEYS = 53;
public const int SPI_GETMOUSEKEYS = 54;
public const int SPI_SETMOUSEKEYS = 55;
public const int SPI_GETSHOWSOUNDS = 56;
public const int SPI_SETSHOWSOUNDS = 57;
public const int SPI_GETSTICKYKEYS = 58;
public const int SPI_SETSTICKYKEYS = 59;
public const int SPI_GETACCESSTIMEOUT = 60;
public const int SPI_SETACCESSTIMEOUT = 61;
public const int SPI_GETSERIALKEYS = 62;
public const int SPI_SETSERIALKEYS = 63;
public const int SPI_GETSOUNDSENTRY = 64;
public const int SPI_SETSOUNDSENTRY = 65;
public const int SPI_GETSNAPTODEFBUTTON = 95;
public const int SPI_SETSNAPTODEFBUTTON = 96;
public const int SPI_GETMOUSEHOVERWIDTH = 98;
public const int SPI_SETMOUSEHOVERWIDTH = 99;
public const int SPI_GETMOUSEHOVERHEIGHT = 100;
public const int SPI_SETMOUSEHOVERHEIGHT = 101;
public const int SPI_GETMOUSEHOVERTIME = 102;
public const int SPI_SETMOUSEHOVERTIME = 103;
public const int SPI_GETWHEELSCROLLLINES = 104;
public const int SPI_SETWHEELSCROLLLINES = 105;
public const int SPI_GETMENUSHOWDELAY = 106;
public const int SPI_SETMENUSHOWDELAY = 107;
public const int SPI_GETSHOWIMEUI = 110;
public const int SPI_SETSHOWIMEUI = 111;
public const int SPI_GETMOUSESPEED = 112;
public const int SPI_SETMOUSESPEED = 113;
public const int SPI_GETSCREENSAVERRUNNING = 114;
public const int SPI_GETDESKWALLPAPER = 115;
public const int SPI_GETACTIVEWINDOWTRACKING = 0x1000;
public const int SPI_SETACTIVEWINDOWTRACKING = 0x1001;
public const int SPI_GETMENUANIMATION = 0x1002;
public const int SPI_SETMENUANIMATION = 0x1003;
public const int SPI_GETCOMBOBOXANIMATION = 0x1004;
public const int SPI_SETCOMBOBOXANIMATION = 0x1005;
public const int SPI_GETLISTBOXSMOOTHSCROLLING = 0x1006;
public const int SPI_SETLISTBOXSMOOTHSCROLLING = 0x1007;
public const int SPI_GETGRADIENTCAPTIONS = 0x1008;
public const int SPI_SETGRADIENTCAPTIONS = 0x1009;
public const int SPI_GETKEYBOARDCUES = 0x100A;
public const int SPI_SETKEYBOARDCUES = 0x100B;
public const int SPI_GETMENUUNDERLINES = SPI_GETKEYBOARDCUES;
public const int SPI_SETMENUUNDERLINES = SPI_SETKEYBOARDCUES;
public const int SPI_GETACTIVEWNDTRKZORDER = 0x100C;
public const int SPI_SETACTIVEWNDTRKZORDER = 0x100D;
public const int SPI_GETHOTTRACKING = 0x100E;
public const int SPI_SETHOTTRACKING = 0x100F;
public const int SPI_GETMENUFADE = 0x1012;
public const int SPI_SETMENUFADE = 0x1013;
public const int SPI_GETSELECTIONFADE = 0x1014;
public const int SPI_SETSELECTIONFADE = 0x1015;
public const int SPI_GETTOOLTIPANIMATION = 0x1016;
public const int SPI_SETTOOLTIPANIMATION = 0x1017;
public const int SPI_GETTOOLTIPFADE = 0x1018;
public const int SPI_SETTOOLTIPFADE = 0x1019;
public const int SPI_GETCURSORSHADOW = 0x101A;
public const int SPI_SETCURSORSHADOW = 0x101B;
public const int SPI_GETUIEFFECTS = 0x103E;
public const int SPI_SETUIEFFECTS = 0x103F;
public const int SPI_GETFOREGROUNDLOCKTIMEOUT = 0x2000;
public const int SPI_SETFOREGROUNDLOCKTIMEOUT = 0x2001;
public const int SPI_GETACTIVEWNDTRKTIMEOUT = 0x2002;
public const int SPI_SETACTIVEWNDTRKTIMEOUT = 0x2003;
public const int SPI_GETFOREGROUNDFLASHCOUNT = 0x2004;
public const int SPI_SETFOREGROUNDFLASHCOUNT = 0x2005;
public const int SPI_GETCARETWIDTH = 0x2006;
public const int SPI_SETCARETWIDTH = 0x2007;
public const int WAIT_TIMEOUT = 0x00000102;
public const int WM_CLOSE = 0x0010;
public const int WM_QUERYENDSESSION = 0x0011;
public const int WM_QUIT = 0x0012;
public const int WM_SYSCOLORCHANGE = 0x0015;
public const int WM_ENDSESSION = 0x0016;
public const int WM_SETTINGCHANGE = 0x001A;
public const int WM_FONTCHANGE = 0x001D;
public const int WM_TIMECHANGE = 0x001E;
public const int WM_COMPACTING = 0x0041;
public const int WM_DISPLAYCHANGE = 0x007E;
public const int WM_TIMER = 0x0113;
public const int WM_POWERBROADCAST = 0x0218;
public const int WM_WTSSESSION_CHANGE = 0x02B1;
public const int WM_PALETTECHANGED = 0x0311;
public const int WM_THEMECHANGED = 0x031A;
public const int WM_USER = 0x0400;
public const int WM_CREATETIMER = WM_USER + 1;
public const int WM_KILLTIMER = WM_USER + 2;
public const int WM_REFLECT = WM_USER + 0x1C00;
public const int WS_POPUP = unchecked((int)0x80000000);
public const int WSF_VISIBLE = 0x0001;
public const int UOI_FLAGS = 1;
public const int MB_ICONHAND = 0x000010;
public const int MB_ICONQUESTION = 0x000020;
public const int MB_ICONEXCLAMATION = 0x000030;
public const int MB_ICONASTERISK = 0x000040;
}
}

Просмотреть файл

@ -0,0 +1,15 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.Runtime.InteropServices;
internal partial class Interop
{
internal partial class User32
{
[DllImport(Libraries.User32, ExactSpelling = true)]
public static extern bool MessageBeep(int type);
}
}

Просмотреть файл

@ -0,0 +1,26 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
internal partial class Interop
{
internal partial class WinMM
{
public const int WAVE_FORMAT_PCM = 0x0001;
public const int WAVE_FORMAT_ADPCM = 0x0002;
public const int WAVE_FORMAT_IEEE_FLOAT = 0x0003;
public const int MMIO_READ = 0x00000000;
public const int MMIO_ALLOCBUF = 0x00010000;
public const int MMIO_FINDRIFF = 0x00000020;
public const int SND_SYNC = 0000;
public const int SND_ASYNC = 0x0001;
public const int SND_NODEFAULT = 0x0002;
public const int SND_MEMORY = 0x0004;
public const int SND_LOOP = 0x0008;
public const int SND_PURGE = 0x0040;
public const int SND_FILENAME = 0x00020000;
public const int SND_NOSTOP = 0x0010;
}
}

Просмотреть файл

@ -0,0 +1,21 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System.Runtime.InteropServices;
internal partial class Interop
{
internal partial class WinMM
{
[StructLayout(LayoutKind.Sequential)]
public class MMCKINFO
{
internal int ckID;
internal int cksize;
internal int fccType;
internal int dwDataOffset;
internal int dwFlags;
}
}
}

Просмотреть файл

@ -0,0 +1,18 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.Runtime.InteropServices;
internal partial class Interop
{
internal partial class WinMM
{
[DllImport(Libraries.WinMM, ExactSpelling = true, CharSet = CharSet.Unicode)]
public static extern bool PlaySoundW(string soundName, IntPtr hmod, int soundFlags);
[DllImport(Libraries.WinMM, ExactSpelling = true)]
public static extern bool PlaySoundW(byte[] soundData, IntPtr hmod, int soundFlags);
}
}

Просмотреть файл

@ -0,0 +1,23 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System.Runtime.InteropServices;
internal partial class Interop
{
internal partial class WinMM
{
[StructLayout(LayoutKind.Sequential)]
public class WAVEFORMATEX
{
internal short wFormatTag;
internal short nChannels;
internal int nSamplesPerSec;
internal int nAvgBytesPerSec;
internal short nBlockAlign;
internal short wBitsPerSample;
internal short cbSize;
}
}
}

Просмотреть файл

@ -0,0 +1,15 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.Runtime.InteropServices;
internal partial class Interop
{
internal partial class WinMM
{
[DllImport(Libraries.WinMM, ExactSpelling = true)]
public static extern int mmioAscend(IntPtr hMIO, MMCKINFO lpck, int flags);
}
}

Просмотреть файл

@ -0,0 +1,15 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.Runtime.InteropServices;
internal partial class Interop
{
internal partial class WinMM
{
[DllImport(Libraries.WinMM, ExactSpelling = true)]
internal static extern int mmioClose(IntPtr hMIO, int flags);
}
}

Просмотреть файл

@ -0,0 +1,15 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.Runtime.InteropServices;
internal partial class Interop
{
internal partial class WinMM
{
[DllImport(Libraries.WinMM, ExactSpelling = true)]
public static extern int mmioDescend(IntPtr hMIO, [MarshalAs(UnmanagedType.LPStruct)] MMCKINFO lpck, [MarshalAs(UnmanagedType.LPStruct)] MMCKINFO lcpkParent, int flags);
}
}

Просмотреть файл

@ -0,0 +1,15 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.Runtime.InteropServices;
internal partial class Interop
{
internal partial class WinMM
{
[DllImport(Libraries.WinMM, ExactSpelling = true, CharSet = CharSet.Unicode)]
public static extern IntPtr mmioOpenW(string fileName, IntPtr lpmmioinfo, int flags);
}
}

Просмотреть файл

@ -0,0 +1,15 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.Runtime.InteropServices;
internal partial class Interop
{
internal partial class WinMM
{
[DllImport(Libraries.WinMM, ExactSpelling = true)]
public static extern int mmioRead(IntPtr hMIO, [MarshalAs(UnmanagedType.LPArray)] byte[] wf, int cch);
}
}

Просмотреть файл

@ -0,0 +1,65 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System.IO.Compression;
using System.Runtime.InteropServices;
internal static partial class Interop
{
internal static partial class zlib
{
internal static readonly byte[] ZLibVersion = { (byte)'1', (byte)'.', (byte)'2', (byte)'.', (byte)'3', 0 };
[DllImport(Libraries.CompressionNative, EntryPoint = "CompressionNative_DeflateInit2_")]
internal static extern ZLibNative.ErrorCode DeflateInit2_(
ref ZLibNative.ZStream stream,
ZLibNative.CompressionLevel level,
ZLibNative.CompressionMethod method,
int windowBits,
int memLevel,
ZLibNative.CompressionStrategy strategy);
[DllImport(Libraries.CompressionNative, EntryPoint = "CompressionNative_Deflate")]
internal static extern ZLibNative.ErrorCode Deflate(ref ZLibNative.ZStream stream, ZLibNative.FlushCode flush);
[DllImport(Libraries.CompressionNative, EntryPoint = "CompressionNative_DeflateEnd")]
internal static extern ZLibNative.ErrorCode DeflateEnd(ref ZLibNative.ZStream stream);
[DllImport(Libraries.CompressionNative, EntryPoint = "CompressionNative_InflateInit2_")]
internal static extern ZLibNative.ErrorCode InflateInit2_(ref ZLibNative.ZStream stream, int windowBits);
[DllImport(Libraries.CompressionNative, EntryPoint = "CompressionNative_Inflate")]
internal static extern ZLibNative.ErrorCode Inflate(ref ZLibNative.ZStream stream, ZLibNative.FlushCode flush);
[DllImport(Libraries.CompressionNative, EntryPoint = "CompressionNative_InflateEnd")]
internal static extern ZLibNative.ErrorCode InflateEnd(ref ZLibNative.ZStream stream);
[DllImport(Libraries.CompressionNative, EntryPoint = "CompressionNative_Crc32")]
internal static extern unsafe uint crc32(uint crc, byte* buffer, int len);
}
}

Просмотреть файл

@ -0,0 +1,30 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System.Runtime.InteropServices;
namespace System.IO.Compression
{
internal static partial class ZLibNative
{
/// <summary>
/// ZLib stream descriptor data structure
/// Do not construct instances of <code>ZStream</code> explicitly.
/// Always use <code>ZLibNative.DeflateInit2_</code> or <code>ZLibNative.InflateInit2_</code> instead.
/// Those methods will wrap this structure into a <code>SafeHandle</code> and thus make sure that it is always disposed correctly.
/// </summary>
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
internal struct ZStream
{
internal IntPtr nextIn; //Bytef *next_in; /* next input byte */
internal IntPtr nextOut; //Bytef *next_out; /* next output byte should be put there */
internal IntPtr msg; //char *msg; /* last error message, NULL if no error */
internal IntPtr state; //struct internal_state FAR *state; /* not visible by applications */
internal uint availIn; //uInt avail_in; /* number of bytes available at next_in */
internal uint availOut; //uInt avail_out; /* remaining free space at next_out */
}
}
}

Просмотреть файл

@ -0,0 +1,331 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System.Runtime.InteropServices;
using System.Security;
namespace System.IO.Compression
{
/// <summary>
/// This class provides declaration for constants and PInvokes as well as some basic tools for exposing the
/// native CLRCompression.dll (effectively, ZLib) library to managed code.
///
/// See also: How to choose a compression level (in comments to <code>CompressionLevel</code>.
/// </summary>
internal static partial class ZLibNative
{
// This is the NULL pointer for using with ZLib pointers;
// we prefer it to IntPtr.Zero to mimic the definition of Z_NULL in zlib.h:
internal static readonly IntPtr ZNullPtr = IntPtr.Zero;
public enum FlushCode : int
{
NoFlush = 0,
SyncFlush = 2,
Finish = 4,
}
public enum ErrorCode : int
{
Ok = 0,
StreamEnd = 1,
NeedDictionary = 2,
StreamError = -2,
DataError = -3,
MemError = -4,
BufError = -5,
VersionError = -6
}
/// <summary>
/// <p>ZLib can accept any integer value between 0 and 9 (inclusive) as a valid compression level parameter:
/// 1 gives best speed, 9 gives best compression, 0 gives no compression at all (the input data is simply copied a block at a time).
/// <code>CompressionLevel.DefaultCompression</code> = -1 requests a default compromise between speed and compression
/// (currently equivalent to level 6).</p>
///
/// <p><strong>How to choose a compression level:</strong></p>
///
/// <p>The names <code>NoCompression</code>, <code>BestSpeed</code>, <code>DefaultCompression</code> are taken over from the corresponding
/// ZLib definitions, which map to our public NoCompression, Fastest, and Optimal respectively.
/// <p><em>Optimal Compression:</em></p>
/// <p><code>ZLibNative.CompressionLevel compressionLevel = ZLibNative.CompressionLevel.DefaultCompression;</code> <br />
/// <code>int windowBits = 15; // or -15 if no headers required</code> <br />
/// <code>int memLevel = 8;</code> <br />
/// <code>ZLibNative.CompressionStrategy strategy = ZLibNative.CompressionStrategy.DefaultStrategy;</code> </p>
///
///<p><em>Fastest compression:</em></p>
///<p><code>ZLibNative.CompressionLevel compressionLevel = ZLibNative.CompressionLevel.BestSpeed;</code> <br />
/// <code>int windowBits = 15; // or -15 if no headers required</code> <br />
/// <code>int memLevel = 8; </code> <br />
/// <code>ZLibNative.CompressionStrategy strategy = ZLibNative.CompressionStrategy.DefaultStrategy;</code> </p>
///
/// <p><em>No compression (even faster, useful for data that cannot be compressed such some image formats):</em></p>
/// <p><code>ZLibNative.CompressionLevel compressionLevel = ZLibNative.CompressionLevel.NoCompression;</code> <br />
/// <code>int windowBits = 15; // or -15 if no headers required</code> <br />
/// <code>int memLevel = 7;</code> <br />
/// <code>ZLibNative.CompressionStrategy strategy = ZLibNative.CompressionStrategy.DefaultStrategy;</code> </p>
/// </summary>
public enum CompressionLevel : int
{
NoCompression = 0,
BestSpeed = 1,
DefaultCompression = -1
}
/// <summary>
/// <p><strong>From the ZLib manual:</strong></p>
/// <p><code>CompressionStrategy</code> is used to tune the compression algorithm.<br />
/// Use the value <code>DefaultStrategy</code> for normal data, <code>Filtered</code> for data produced by a filter (or predictor),
/// <code>HuffmanOnly</code> to force Huffman encoding only (no string match), or <code>Rle</code> to limit match distances to one
/// (run-length encoding). Filtered data consists mostly of small values with a somewhat random distribution. In this case, the
/// compression algorithm is tuned to compress them better. The effect of <code>Filtered</code> is to force more Huffman coding and]
/// less string matching; it is somewhat intermediate between <code>DefaultStrategy</code> and <code>HuffmanOnly</code>.
/// <code>Rle</code> is designed to be almost as fast as <code>HuffmanOnly</code>, but give better compression for PNG image data.
/// The strategy parameter only affects the compression ratio but not the correctness of the compressed output even if it is not set
/// appropriately. <code>Fixed</code> prevents the use of dynamic Huffman codes, allowing for a simpler decoder for special applications.</p>
///
/// <p><strong>For NetFx use:</strong></p>
/// <p>We have investigated compression scenarios for a bunch of different frequently occurring compression data and found that in all
/// cases we investigated so far, <code>DefaultStrategy</code> provided best results</p>
/// <p>See also: How to choose a compression level (in comments to <code>CompressionLevel</code>.</p>
/// </summary>
public enum CompressionStrategy : int
{
DefaultStrategy = 0
}
/// <summary>
/// In version 1.2.3, ZLib provides on the <code>Deflated</code>-<code>CompressionMethod</code>.
/// </summary>
public enum CompressionMethod : int
{
Deflated = 8
}
/// <summary>
/// <p><strong>From the ZLib manual:</strong></p>
/// <p>ZLib's <code>windowBits</code> parameter is the base two logarithm of the window size (the size of the history buffer).
/// It should be in the range 8..15 for this version of the library. Larger values of this parameter result in better compression
/// at the expense of memory usage. The default value is 15 if deflateInit is used instead.<br />
/// <strong>Note</strong>:
/// <code>windowBits</code> can also be –8..–15 for raw deflate. In this case, -windowBits determines the window size.
/// <code>Deflate</code> will then generate raw deflate data with no ZLib header or trailer, and will not compute an adler32 check value.<br />
/// <p>See also: How to choose a compression level (in comments to <code>CompressionLevel</code>.</p>
/// </summary>
public const int Deflate_DefaultWindowBits = -15; // Legal values are 8..15 and -8..-15. 15 is the window size,
// negative val causes deflate to produce raw deflate data (no zlib header).
/// <summary>
/// <p>Zlib's <code>windowBits</code> parameter is the base two logarithm of the window size (the size of the history buffer).
/// For GZip header encoding, <code>windowBits</code> should be equal to a value between 8..15 (to specify Window Size) added to
/// 16. The range of values for GZip encoding is therefore 24..31.
/// <strong>Note</strong>:
/// The GZip header will have no file name, no extra data, no comment, no modification time (set to zero), no header crc, and
/// the operating system will be set based on the OS that the ZLib library was compiled to. <code>ZStream.adler</code>
/// is a crc32 instead of an adler32.</p>
/// </summary>
public const int GZip_DefaultWindowBits = 31;
/// <summary>
/// <p><strong>From the ZLib manual:</strong></p>
/// <p>The <code>memLevel</code> parameter specifies how much memory should be allocated for the internal compression state.
/// <code>memLevel</code> = 1 uses minimum memory but is slow and reduces compression ratio; <code>memLevel</code> = 9 uses maximum
/// memory for optimal speed. The default value is 8.</p>
/// <p>See also: How to choose a compression level (in comments to <code>CompressionLevel</code>.</p>
/// </summary>
public const int Deflate_DefaultMemLevel = 8; // Memory usage by deflate. Legal range: [1..9]. 8 is ZLib default.
// More is faster and better compression with more memory usage.
public const int Deflate_NoCompressionMemLevel = 7;
/**
* Do not remove the nested typing of types inside of <code>System.IO.Compression.ZLibNative</code>.
* This was done on purpose to:
*
* - Achieve the right encapsulation in a situation where <code>ZLibNative</code> may be compiled division-wide
* into different assemblies that wish to consume <code>CLRCompression</code>. Since <code>internal</code>
* scope is effectively like <code>public</code> scope when compiling <code>ZLibNative</code> into a higher
* level assembly, we need a combination of inner types and <code>private</code>-scope members to achieve
* the right encapsulation.
*
* - Achieve late dynamic loading of <code>CLRCompression.dll</code> at the right time.
* The native assembly will not be loaded unless it is actually used since the loading is performed by a static
* constructor of an inner type that is not directly referenced by user code.
*
* In Dev12 we would like to create a proper feature for loading native assemblies from user-specified
* directories in order to PInvoke into them. This would preferably happen in the native interop/PInvoke
* layer; if not we can add a Framework level feature.
*/
/// <summary>
/// The <code>ZLibStreamHandle</code> could be a <code>CriticalFinalizerObject</code> rather than a
/// <code>SafeHandleMinusOneIsInvalid</code>. This would save an <code>IntPtr</code> field since
/// <code>ZLibStreamHandle</code> does not actually use its <code>handle</code> field.
/// Instead it uses a <code>private ZStream zStream</code> field which is the actual handle data
/// structure requiring critical finalization.
/// However, we would like to take advantage if the better debugability offered by the fact that a
/// <em>releaseHandleFailed MDA</em> is raised if the <code>ReleaseHandle</code> method returns
/// <code>false</code>, which can for instance happen if the underlying ZLib <code>XxxxEnd</code>
/// routines return an failure error code.
/// </summary>
public sealed class ZLibStreamHandle : SafeHandle
{
public enum State { NotInitialized, InitializedForDeflate, InitializedForInflate, Disposed }
private ZStream _zStream;
private volatile State _initializationState;
public ZLibStreamHandle()
: base(new IntPtr(-1), true)
{
_zStream = new ZStream();
_initializationState = State.NotInitialized;
SetHandle(IntPtr.Zero);
}
public override bool IsInvalid
{
get { return handle == new IntPtr(-1); }
}
public State InitializationState
{
get { return _initializationState; }
}
protected override bool ReleaseHandle()
{
switch (InitializationState)
{
case State.NotInitialized: return true;
case State.InitializedForDeflate: return (DeflateEnd() == ErrorCode.Ok);
case State.InitializedForInflate: return (InflateEnd() == ErrorCode.Ok);
case State.Disposed: return true;
default: return false; // This should never happen. Did we forget one of the State enum values in the switch?
}
}
public IntPtr NextIn
{
get { return _zStream.nextIn; }
set { _zStream.nextIn = value; }
}
public uint AvailIn
{
get { return _zStream.availIn; }
set { _zStream.availIn = value; }
}
public IntPtr NextOut
{
get { return _zStream.nextOut; }
set { _zStream.nextOut = value; }
}
public uint AvailOut
{
get { return _zStream.availOut; }
set { _zStream.availOut = value; }
}
private void EnsureNotDisposed()
{
if (InitializationState == State.Disposed)
throw new ObjectDisposedException(GetType().ToString());
}
private void EnsureState(State requiredState)
{
if (InitializationState != requiredState)
throw new InvalidOperationException("InitializationState != " + requiredState.ToString());
}
public ErrorCode DeflateInit2_(CompressionLevel level, int windowBits, int memLevel, CompressionStrategy strategy)
{
EnsureNotDisposed();
EnsureState(State.NotInitialized);
ErrorCode errC = Interop.zlib.DeflateInit2_(ref _zStream, level, CompressionMethod.Deflated, windowBits, memLevel, strategy);
_initializationState = State.InitializedForDeflate;
return errC;
}
public ErrorCode Deflate(FlushCode flush)
{
EnsureNotDisposed();
EnsureState(State.InitializedForDeflate);
return Interop.zlib.Deflate(ref _zStream, flush);
}
public ErrorCode DeflateEnd()
{
EnsureNotDisposed();
EnsureState(State.InitializedForDeflate);
ErrorCode errC = Interop.zlib.DeflateEnd(ref _zStream);
_initializationState = State.Disposed;
return errC;
}
public ErrorCode InflateInit2_(int windowBits)
{
EnsureNotDisposed();
EnsureState(State.NotInitialized);
ErrorCode errC = Interop.zlib.InflateInit2_(ref _zStream, windowBits);
_initializationState = State.InitializedForInflate;
return errC;
}
public ErrorCode Inflate(FlushCode flush)
{
EnsureNotDisposed();
EnsureState(State.InitializedForInflate);
return Interop.zlib.Inflate(ref _zStream, flush);
}
public ErrorCode InflateEnd()
{
EnsureNotDisposed();
EnsureState(State.InitializedForInflate);
ErrorCode errC = Interop.zlib.InflateEnd(ref _zStream);
_initializationState = State.Disposed;
return errC;
}
// This can work even after XxflateEnd().
public string GetErrorMessage() => _zStream.msg != ZNullPtr ? Marshal.PtrToStringAnsi(_zStream.msg) : string.Empty;
}
public static ErrorCode CreateZLibStreamForDeflate(out ZLibStreamHandle zLibStreamHandle, CompressionLevel level,
int windowBits, int memLevel, CompressionStrategy strategy)
{
zLibStreamHandle = new ZLibStreamHandle();
return zLibStreamHandle.DeflateInit2_(level, windowBits, memLevel, strategy);
}
public static ErrorCode CreateZLibStreamForInflate(out ZLibStreamHandle zLibStreamHandle, int windowBits)
{
zLibStreamHandle = new ZLibStreamHandle();
return zLibStreamHandle.InflateInit2_(windowBits);
}
}
}

Просмотреть файл

@ -0,0 +1,47 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System.Runtime.CompilerServices;
using System.Threading;
namespace System
{
internal partial class LocalAppContext
{
private static bool s_isDisableCachingInitialized;
private static bool s_disableCaching;
private static object s_syncObject;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
internal static bool GetCachedSwitchValue(string switchName, ref int switchValue)
{
if (switchValue < 0) return false;
if (switchValue > 0) return true;
return GetCachedSwitchValueInternal(switchName, ref switchValue);
}
private static bool GetCachedSwitchValueInternal(string switchName, ref int switchValue)
{
bool isSwitchEnabled;
AppContext.TryGetSwitch(switchName, out isSwitchEnabled);
if (DisableCaching)
{
return isSwitchEnabled;
}
switchValue = isSwitchEnabled ? 1 /*true*/ : -1 /*false*/;
return isSwitchEnabled;
}
private static bool DisableCaching =>
LazyInitializer.EnsureInitialized(ref s_disableCaching, ref s_isDisableCachingInitialized, ref s_syncObject, () =>
{
bool isEnabled;
AppContext.TryGetSwitch(@"TestSwitch.LocalAppContext.DisableCaching", out isEnabled);
return isEnabled;
});
}
}

Просмотреть файл

@ -0,0 +1,26 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
#ifndef __CHAR_ATTRIBUTE_H
#define __CHAR_ATTRIBUTE_H
typedef byte CharAttributeType;
namespace MS { namespace Internal { namespace Text { namespace TextInterface
{
private struct CharAttribute
{
enum Enum
{
None = 0x00,
IsCombining = 0x01,
NeedsCaretInfo = 0x02,
IsIndic = 0x04,
IsLatin = 0x08,
IsStrong = 0x10,
IsExtended = 0x20
};
};
}}}}
#endif //__CHAR_ATTRIBUTE_H

Просмотреть файл

@ -0,0 +1,164 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
#ifndef __COMMON_H
#define __COMMON_H
#include "precomp.hxx"
using namespace System::Security;
using namespace System::Security::Permissions;
namespace MS { namespace Internal { namespace Text { namespace TextInterface { namespace Native
{
#include "DWrite.h"
#include "CorError.h"
private ref class Util sealed
{
public:
/// <SecurityNote>
/// Critical - Call security critical method ThrowExceptionForHR().
/// - Asserts unmanaged code permissions to call ThrowExceptionForHR.
/// Safe - We are using ThrowExceptionForHR() in a safe way
// by ignoring the IErrorInfo of the current thread.
/// </SecurityNote>
[SecuritySafeCritical]
[SecurityPermission(SecurityAction::Assert, UnmanagedCode=true)]
__declspec(noinline) void static ConvertHresultToException(HRESULT hr)
{
if (FAILED(hr))
{
if (hr == DWRITE_E_FILENOTFOUND)
{
throw gcnew System::IO::FileNotFoundException();
}
else if (hr == DWRITE_E_FILEACCESS)
{
throw gcnew System::UnauthorizedAccessException();
}
else if (hr == DWRITE_E_FILEFORMAT)
{
throw gcnew System::IO::FileFormatException();
}
else
{
SanitizeAndThrowIfKnownException(hr);
// ThrowExceptionForHR method returns an exception based on the IErrorInfo of
// the current thread if one is set. When this happens, the errorCode parameter
// is ignored.
// We pass an IntPtr that has a value of -1 so that ThrowExceptionForHR ignores
// IErrorInfo of the current thread.
System::Runtime::InteropServices::Marshal::ThrowExceptionForHR(hr, System::IntPtr(-1));
}
}
}
/// <SecurityNote>
/// Critical - Asserts unmanaged code permissions to call ThrowExceptionForHR.
/// - Exposes a pointer to the contents of a managed string.
/// </SecurityNote>
[SecurityCritical]
[SecurityPermission(SecurityAction::Assert, UnmanagedCode=true)]
__declspec(noinline) const cli::interior_ptr<const System::Char> static GetPtrToStringChars(System::String^ s)
{
return CriticalPtrToStringChars(s);
}
/// <summary>
/// The implementation of this method is taken from this msdn article:
/// http://msdn.microsoft.com/en-us/library/wb8scw8f(VS.100).aspx
/// </summary>
/// <SecurityNote>
/// Critical - Asserts unmanaged code permissions.
/// Safe - Does not expose critical data.
/// </SecurityNote>
[SecuritySafeCritical]
[SecurityPermission(SecurityAction::Assert, UnmanagedCode=true)]
__declspec(noinline) static _GUID ToGUID( System::Guid& guid )
{
array<System::Byte>^ guidData = guid.ToByteArray();
pin_ptr<System::Byte> data = &(guidData[ 0 ]);
return *(_GUID *)data;
}
private:
/// <summary>
/// Exceptions known to have security sensitive data are sanitized in this method,
/// by creating copy of original exception without sensitive data and re-thrown.
/// Or, to put another way - this funciton acts only on a known whitelist of HRESULT/IErrorInfo combinations, throwing for matches.
/// The IErrorInfo is taken into account in a call to GetExceptionForHR(HRESULT), see MSDN for more details.
/// </summary>
/// <SecurityNote>
/// Critical - Calls critical IsFullTrustCaller and Marshal::GetExceptionForHR
/// </SecurityNote>
[SecurityCritical]
void static SanitizeAndThrowIfKnownException(HRESULT hr)
{
if (hr == COR_E_INVALIDOPERATION)
{
System::Exception^ e = System::Runtime::InteropServices::Marshal::GetExceptionForHR(hr);
if (dynamic_cast<System::Net::WebException^>(e) != nullptr)
{
if (IsFullTrustCaller())
{
throw e;//rethrow original exception for full trust case.
}
else
{
throw gcnew System::Net::WebException();// throw sanitized exception
}
}
}
}
/// <summary>
/// Checks if the caller is in full trust mode.
/// </summary>
/// <SecurityNote>
/// Critical - Performs a demand. Transparent methods should not be responsible
/// for verifying the security of an operation, and therefore should not demand permissions.
/// Safe - It is safe to perform a demand.
/// </SecurityNote>
[SecurityCritical]
static bool IsFullTrustCaller()
{
#ifndef _CLR_NETCORE
try
{
if (_fullTrustPermissionSet == nullptr)
{
_fullTrustPermissionSet = gcnew PermissionSet(PermissionState::Unrestricted);
}
_fullTrustPermissionSet->Demand();
}
catch (SecurityException^)
{
return false;
}
#endif
return true;
}
#ifndef _CLR_NETCORE
private:
static PermissionSet^ _fullTrustPermissionSet = nullptr;
#endif
};
#define ConvertHresultToException(hr, msg) Native::Util::ConvertHresultToException(hr)
}}}}}//MS::Internal::Text::TextInterface::Native
using namespace MS::Internal::Text::TextInterface::Native;
#endif //__COMMON_H

Просмотреть файл

@ -0,0 +1,44 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
#ifndef __FONTFEATURE_H
#define __FONTFEATURE_H
#include "DWriteFontFeatureTag.h"
namespace MS { namespace Internal { namespace Text { namespace TextInterface
{
/// <summary>
/// Specifies properties used to identify and execute typographic feature in the font.
///
/// COMPATIBILITY WARNING: The layout of this struct must match exactly the layout of DWRITE_FONT_FEATURE from DWrite.h
/// We will perform an unsafe cast from this type to DWRITE_FONT_FEATURE when obtaining Font Features. We do this to improve perf.
///
/// </summary>
[StructLayout(LayoutKind::Sequential)]
private value struct DWriteFontFeature
{
/// <summary>
/// The feature OpenType name identifier.
/// </summary>
DWriteFontFeatureTag nameTag;
/// <summary>
/// Execution parameter of the feature.
/// </summary>
/// <remarks>
/// The parameter should be non-zero to enable the feature. Once enabled, a feature can't be disabled again within
/// the same range. Features requiring a selector use this value to indicate the selector index.
/// </remarks>
UINT32 parameter;
DWriteFontFeature(DWriteFontFeatureTag dwriteNameTag, UINT32 dwriteParameter)
{
nameTag = dwriteNameTag;
parameter = dwriteParameter;
}
};
}}}}
#endif //__FONTFEATURE_H

Просмотреть файл

@ -0,0 +1,98 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
#ifndef __FONTFEATURETAG_H
#define __FONTFEATURETAG_H
namespace MS { namespace Internal { namespace Text { namespace TextInterface
{
/// <summary>
/// Typographic feature of text supplied by the font.
/// </summary>
private enum class DWriteFontFeatureTag
{
AlternativeFractions = 0x63726661, // 'afrc'
PetiteCapitalsFromCapitals = 0x63703263, // 'c2pc'
SmallCapitalsFromCapitals = 0x63733263, // 'c2sc'
ContextualAlternates = 0x746c6163, // 'calt'
CaseSensitiveForms = 0x65736163, // 'case'
GlyphCompositionDecomposition = 0x706d6363, // 'ccmp'
ContextualLigatures = 0x67696c63, // 'clig'
CapitalSpacing = 0x70737063, // 'cpsp'
ContextualSwash = 0x68777363, // 'cswh'
CursivePositioning = 0x73727563, // 'curs'
Default = 0x746c6664, // 'dflt'
DiscretionaryLigatures = 0x67696c64, // 'dlig'
ExpertForms = 0x74707865, // 'expt'
Fractions = 0x63617266, // 'frac'
FullWidth = 0x64697766, // 'fwid'
HalfForms = 0x666c6168, // 'half'
HalantForms = 0x6e6c6168, // 'haln'
AlternateHalfWidth = 0x746c6168, // 'halt'
HistoricalForms = 0x74736968, // 'hist'
HorizontalKanaAlternates = 0x616e6b68, // 'hkna'
HistoricalLigatures = 0x67696c68, // 'hlig'
HalfWidth = 0x64697768, // 'hwid'
HojoKanjiForms = 0x6f6a6f68, // 'hojo'
JIS04Forms = 0x3430706a, // 'jp04'
JIS78Forms = 0x3837706a, // 'jp78'
JIS83Forms = 0x3338706a, // 'jp83'
JIS90Forms = 0x3039706a, // 'jp90'
Kerning = 0x6e72656b, // 'kern'
StandardLigatures = 0x6167696c, // 'liga'
LiningFigures = 0x6d756e6c, // 'lnum'
LocalizedForms = 0x6c636f6c, // 'locl'
MarkPositioning = 0x6b72616d, // 'mark'
MathematicalGreek = 0x6b72676d, // 'mgrk'
MarkToMarkPositioning = 0x6b6d6b6d, // 'mkmk'
AlternateAnnotationForms = 0x746c616e, // 'nalt'
NLCKanjiForms = 0x6b636c6e, // 'nlck'
OldStyleFigures = 0x6d756e6f, // 'onum'
Ordinals = 0x6e64726f, // 'ordn'
ProportionalAlternateWidth = 0x746c6170, // 'palt'
PetiteCapitals = 0x70616370, // 'pcap'
ProportionalFigures = 0x6d756e70, // 'pnum'
ProportionalWidths = 0x64697770, // 'pwid'
QuarterWidths = 0x64697771, // 'qwid'
RequiredLigatures = 0x67696c72, // 'rlig'
RubyNotationForms = 0x79627572, // 'ruby'
StylisticAlternates = 0x746c6173, // 'salt'
ScientificInferiors = 0x666e6973, // 'sinf'
SmallCapitals = 0x70636d73, // 'smcp'
SimplifiedForms = 0x6c706d73, // 'smpl'
StylisticSet1 = 0x31307373, // 'ss01'
StylisticSet2 = 0x32307373, // 'ss02'
StylisticSet3 = 0x33307373, // 'ss03'
StylisticSet4 = 0x34307373, // 'ss04'
StylisticSet5 = 0x35307373, // 'ss05'
StylisticSet6 = 0x36307373, // 'ss06'
StylisticSet7 = 0x37307373, // 'ss07'
StylisticSet8 = 0x38307373, // 'ss08'
StylisticSet9 = 0x39307373, // 'ss09'
StylisticSet10 = 0x30317373, // 'ss10'
StylisticSet11 = 0x31317373, // 'ss11'
StylisticSet12 = 0x32317373, // 'ss12'
StylisticSet13 = 0x33317373, // 'ss13'
StylisticSet14 = 0x34317373, // 'ss14'
StylisticSet15 = 0x35317373, // 'ss15'
StylisticSet16 = 0x36317373, // 'ss16'
StylisticSet17 = 0x37317373, // 'ss17'
StylisticSet18 = 0x38317373, // 'ss18'
StylisticSet19 = 0x39317373, // 'ss19'
StylisticSet20 = 0x30327373, // 'ss20'
Subscript = 0x73627573, // 'subs'
Superscript = 0x73707573, // 'sups'
Swash = 0x68737773, // 'swsh'
Titling = 0x6c746974, // 'titl'
TraditionalNameForms = 0x6d616e74, // 'tnam'
TabularFigures = 0x6d756e74, // 'tnum'
TraditionalForms = 0x64617274, // 'trad'
ThirdWidths = 0x64697774, // 'twid'
Unicase = 0x63696e75, // 'unic'
SlashedZero = 0x6f72657a, // 'zero'
};
}}}}
#endif //__FONTFEATURETAG_H

Просмотреть файл

@ -0,0 +1,31 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
#ifndef __DWRITEGLYPHOFFSET_H
#define __DWRITEGLYPHOFFSET_H
namespace MS { namespace Internal { namespace Text { namespace TextInterface
{
/// <summary>
/// Optional adjustment to a glyph's position. An glyph offset changes the position of a glyph without affecting
/// the pen position. Offsets are in logical, pre-transform units.
/// </summary>
private value struct DWriteGlyphOffset sealed
{
/// <summary>
/// Offset in the advance direction of the run. A positive advance offset moves the glyph to the right
/// (in pre-transform coordinates) if the run is left-to-right or to the left if the run is right-to-left.
/// </summary>
FLOAT AdvanceOffset;
/// <summary>
/// Offset in the ascent direction, i.e., the direction ascenders point. A positive ascender offset moves
/// the glyph up (in pre-transform coordinates).
/// </summary>
FLOAT AscenderOffset;
};
}}}}//MS::Internal::Text::TextInterface
#endif //__DWRITEGLYPHOFFSET_H

Просмотреть файл

@ -0,0 +1,218 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
#ifndef __DWRITEINTERFACES_H
#define __DWRITEINTERFACES_H
using namespace System;
using namespace System::Runtime::InteropServices;
///
/// COMPATIBILITY WARNING
/// These interfaces are copies of the interfaces defined in DWrite.h
/// You can not modify them unless the matching ones in DWrite.h have
/// changed
///
namespace MS { namespace Internal { namespace Text { namespace TextInterface { namespace Interfaces {
/// <summary>
/// The interface for loading font file data.
/// </summary>
[ComImport(), Guid("6d4865fe-0ab8-4d91-8f62-5dd6be34a3e0"), InterfaceType(ComInterfaceType::InterfaceIsIUnknown)]
interface class IDWriteFontFileStreamMirror
{
/// <summary>
/// Reads a fragment from a file.
/// </summary>
/// <param name="fragmentStart">Receives the pointer to the start of the font file fragment.</param>
/// <param name="fileOffset">Offset of the fragment from the beginning of the font file.</param>
/// <param name="fragmentSize">Size of the fragment in bytes.</param>
/// <param name="fragmentContext">The client defined context to be passed to the ReleaseFileFragment.</param>
/// <returns>
/// Standard HRESULT error code.
/// </returns>
/// <remarks>
/// IMPORTANT: ReadFileFragment() implementations must check whether the requested file fragment
/// is within the file bounds. Otherwise, an error should be returned from ReadFileFragment.
/// </remarks>
/// <SecurityNote>
/// Critical - receives native pointers as parameters.
/// </SecurityNote>
[SecurityCritical]
[PreserveSig]
HRESULT ReadFileFragment(
[Out] const void **fragmentStart,
[In, MarshalAs(UnmanagedType::U8)] UINT64 fileOffset,
[In, MarshalAs(UnmanagedType::U8)] UINT64 fragmentSize,
[Out] void **fragmentContext
);
/// <summary>
/// Releases a fragment from a file.
/// </summary>
/// <param name="fragmentContext">The client defined context of a font fragment returned from ReadFileFragment.</param>
/// <SecurityNote>
/// Critical - receives native pointers as parameters.
/// </SecurityNote>
[SecurityCritical]
[PreserveSig]
void ReleaseFileFragment(
[In] void *fragmentContext
);
/// <summary>
/// Obtains the total size of a file.
/// </summary>
/// <param name="fileSize">Receives the total size of the file.</param>
/// <returns>
/// Standard HRESULT error code.
/// </returns>
/// <remarks>
/// Implementing GetFileSize() for asynchronously loaded font files may require
/// downloading the complete file contents, therefore this method should only be used for operations that
/// either require complete font file to be loaded (e.g., copying a font file) or need to make
/// decisions based on the value of the file size (e.g., validation against a persisted file size).
/// </remarks>
/// <SecurityNote>
/// Critical - receives native pointers as parameters.
/// </SecurityNote>
[SecurityCritical]
[PreserveSig]
HRESULT GetFileSize(
[Out/*, MarshalAs(UnmanagedType::U8)*/] UINT64 *fileSize
);
/// <summary>
/// Obtains the last modified time of the file. The last modified time is used by DirectWrite font selection algorithms
/// to determine whether one font resource is more up to date than another one.
/// </summary>
/// <param name="lastWriteTime">Receives the last modifed time of the file in the format that represents
/// the number of 100-nanosecond intervals since January 1, 1601 (UTC).</param>
/// <returns>
/// Standard HRESULT error code. For resources that don't have a concept of the last modified time, the implementation of
/// GetLastWriteTime should return E_NOTIMPL.
/// </returns>
/// <SecurityNote>
/// Critical - receives native pointers as parameters.
/// </SecurityNote>
[SecurityCritical]
[PreserveSig]
HRESULT GetLastWriteTime(
[Out/*, MarshalAs(UnmanagedType::U8)*/] UINT64 *lastWriteTime
);
};
/// <summary>
/// Font file loader interface handles loading font file resources of a particular type from a key.
/// The font file loader interface is recommended to be implemented by a singleton object.
/// IMPORTANT: font file loader implementations must not register themselves with DirectWrite factory
/// inside their constructors and must not unregister themselves in their destructors, because
/// registration and unregistraton operations increment and decrement the object reference count respectively.
/// Instead, registration and unregistration of font file loaders with DirectWrite factory should be performed
/// outside of the font file loader implementation as a separate step.
/// </summary>
[ComImport(), Guid("727cad4e-d6af-4c9e-8a08-d695b11caa49"), InterfaceType(ComInterfaceType::InterfaceIsIUnknown)]
interface class IDWriteFontFileLoaderMirror
{
/// <summary>
/// Creates a font file stream object that encapsulates an open file resource.
/// The resource is closed when the last reference to fontFileStream is released.
/// </summary>
/// <param name="fontFileReferenceKey">Font file reference key that uniquely identifies the font file resource
/// within the scope of the font loader being used.</param>
/// <param name="fontFileReferenceKeySize">Size of font file reference key in bytes.</param>
/// <param name="fontFileStream">Pointer to the newly created font file stream.</param>
/// <returns>
/// Standard HRESULT error code.
/// </returns>
/// <SecurityNote>
/// Critical - receives native pointers as parameters.
/// </SecurityNote>
[SecurityCritical]
[PreserveSig]
HRESULT CreateStreamFromKey(
[In] void const* fontFileReferenceKey,
[In, MarshalAs(UnmanagedType::U4)] UINT32 fontFileReferenceKeySize,
[Out/*, MarshalAs(UnmanagedType::Interface)*/] IntPtr* fontFileStream
);
};
/// <summary>
/// The font file enumerator interface encapsulates a collection of font files. The font system uses this interface
/// to enumerate font files when building a font collection.
/// </summary>
[ComImport(), Guid("72755049-5ff7-435d-8348-4be97cfa6c7c"), InterfaceType(ComInterfaceType::InterfaceIsIUnknown)]
interface class IDWriteFontFileEnumeratorMirror
{
/// <summary>
/// Advances to the next font file in the collection. When it is first created, the enumerator is positioned
/// before the first element of the collection and the first call to MoveNext advances to the first file.
/// </summary>
/// <param name="hasCurrentFile">Receives the value TRUE if the enumerator advances to a file, or FALSE if
/// the enumerator advanced past the last file in the collection.</param>
/// <returns>
/// Standard HRESULT error code.
/// </returns>
[PreserveSig]
HRESULT MoveNext(
[Out, MarshalAs(UnmanagedType::Bool)] bool% hasCurrentFile
);
/// <summary>
/// Gets a reference to the current font file.
/// </summary>
/// <param name="fontFile">Pointer to the newly created font file object.</param>
/// <returns>
/// Standard HRESULT error code.
/// </returns>
/// <SecurityNote>
/// Critical - receives native pointers as parameters.
/// </SecurityNote>
[SecurityCritical]
[PreserveSig]
HRESULT GetCurrentFontFile(
/*[Out, MarshalAs(UnmanagedType::Interface)]*/ IDWriteFontFile** fontFile
);
};
/// <summary>
/// The font collection loader interface is used to construct a collection of fonts given a particular type of key.
/// The font collection loader interface is recommended to be implemented by a singleton object.
/// IMPORTANT: font collection loader implementations must not register themselves with DirectWrite factory
/// inside their constructors and must not unregister themselves in their destructors, because
/// registration and unregistraton operations increment and decrement the object reference count respectively.
/// Instead, registration and unregistration of font file loaders with DirectWrite factory should be performed
/// outside of the font file loader implementation as a separate step.
/// </summary>
[ComImport(), Guid("cca920e4-52f0-492b-bfa8-29c72ee0a468"), InterfaceType(ComInterfaceType::InterfaceIsIUnknown)]
interface class IDWriteFontCollectionLoaderMirror
{
/// <summary>
/// Creates a font file enumerator object that encapsulates a collection of font files.
/// The font system calls back to this interface to create a font collection.
/// </summary>
/// <param name="collectionKey">Font collection key that uniquely identifies the collection of font files within
/// the scope of the font collection loader being used.</param>
/// <param name="collectionKeySize">Size of the font collection key in bytes.</param>
/// <param name="fontFileEnumerator">Pointer to the newly created font file enumerator.</param>
/// <returns>
/// Standard HRESULT error code.
/// </returns>
/// <SecurityNote>
/// Critical - receives native pointers as parameters.
/// </SecurityNote>
[SecurityCritical]
[PreserveSig]
HRESULT CreateEnumeratorFromKey(
/*[In, MarshalAs(UnmanagedType::Interface)]*/ IntPtr factory,
[In] void const* collectionKey,
[In, MarshalAs(UnmanagedType::U4)] UINT32 collectionKeySize,
/*[Out, MarshalAs(UnmanagedType::Interface)]*/ IntPtr* fontFileEnumerator
);
};
}}}}}
using namespace MS::Internal::Text::TextInterface::Interfaces;
#endif

Просмотреть файл

@ -0,0 +1,49 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
#ifndef __DWRITEMATRIX_H
#define __DWRITEMATRIX_H
namespace MS { namespace Internal { namespace Text { namespace TextInterface
{
/// <summary>
/// The DWRITE_MATRIX structure specifies the graphics transform to be applied
/// to rendered glyphs.
/// </summary>
private value struct DWriteMatrix sealed
{
/// <summary>
/// Horizontal scaling / cosine of rotation
/// </summary>
FLOAT M11;
/// <summary>
/// Horizontal shear / sine of rotation
/// </summary>
FLOAT M12;
/// <summary>
/// Vertical shear / negative sine of rotation
/// </summary>
FLOAT M21;
/// <summary>
/// Vertical scaling / cosine of rotation
/// </summary>
FLOAT M22;
/// <summary>
/// Horizontal shift (always orthogonal regardless of rotation)
/// </summary>
FLOAT Dx;
/// <summary>
/// Vertical shift (always orthogonal regardless of rotation)
/// </summary>
FLOAT Dy;
};
}}}}//MS::Internal::Text::TextInterface
#endif //__DWRITEMATRIX_H

Просмотреть файл

@ -0,0 +1,401 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
#include "DWriteTypeConverter.h"
namespace MS { namespace Internal { namespace Text { namespace TextInterface
{
DWRITE_FACTORY_TYPE DWriteTypeConverter::Convert(FactoryType factoryType)
{
switch(factoryType)
{
case FactoryType::Shared : return DWRITE_FACTORY_TYPE_SHARED;
case FactoryType::Isolated : return DWRITE_FACTORY_TYPE_ISOLATED;
default : throw gcnew System::InvalidOperationException();
}
}
FontWeight DWriteTypeConverter::Convert(DWRITE_FONT_WEIGHT fontWeight)
{
// The commented cases are here only for completeness so that the code captures all the possible enum values.
// However, these enum values are commented out since there are several enums having the same value.
// For example, both Normal and Regular have a value of 400.
switch(fontWeight)
{
case DWRITE_FONT_WEIGHT_THIN : return FontWeight::Thin;
case DWRITE_FONT_WEIGHT_EXTRA_LIGHT : return FontWeight::ExtraLight;
//case DWRITE_FONT_WEIGHT_ULTRA_LIGHT : return FontWeight::UltraLight;
case DWRITE_FONT_WEIGHT_LIGHT : return FontWeight::Light;
case DWRITE_FONT_WEIGHT_NORMAL : return FontWeight::Normal;
//case DWRITE_FONT_WEIGHT_REGULAR : return FontWeight::Regular;
case DWRITE_FONT_WEIGHT_MEDIUM : return FontWeight::Medium;
//case DWRITE_FONT_WEIGHT_DEMI_BOLD : return FontWeight::DemiBold;
case DWRITE_FONT_WEIGHT_SEMI_BOLD : return FontWeight::SemiBOLD;
case DWRITE_FONT_WEIGHT_BOLD : return FontWeight::Bold;
case DWRITE_FONT_WEIGHT_EXTRA_BOLD : return FontWeight::ExtraBold;
//case DWRITE_FONT_WEIGHT_ULTRA_BOLD : return FontWeight::UltraBold;
case DWRITE_FONT_WEIGHT_BLACK : return FontWeight::Black;
//case DWRITE_FONT_WEIGHT_HEAVY : return FontWeight::Heavy;
case DWRITE_FONT_WEIGHT_EXTRA_BLACK : return FontWeight::ExtraBlack;
//case DWRITE_FONT_WEIGHT_ULTRA_BLACK : return FontWeight::UltraBlack;
case DWRITE_FONT_WEIGHT_SEMI_LIGHT : // let it fall through - because I don't know what else to do with it
default : int weight = (int)fontWeight;
if ( weight >= 1 && weight <= 999)
{
return (FontWeight) fontWeight;
}
else
{
throw gcnew System::InvalidOperationException();
}
}
}
DWRITE_FONT_WEIGHT DWriteTypeConverter::Convert(FontWeight fontWeight)
{
// The commented cases are here only for completeness so that the code captures all the possible enum values.
// However, these enum values are commented out since there are several enums having the same value.
// For example, both Normal and Regular have a value of 400.
switch(fontWeight)
{
case FontWeight::Thin : return DWRITE_FONT_WEIGHT_THIN;
case FontWeight::ExtraLight : return DWRITE_FONT_WEIGHT_EXTRA_LIGHT;
//case FontWeight::UltraLight : return DWRITE_FONT_WEIGHT_ULTRA_LIGHT;
case FontWeight::Light : return DWRITE_FONT_WEIGHT_LIGHT;
case FontWeight::Normal : return DWRITE_FONT_WEIGHT_NORMAL;
//case FontWeight::Regular : return DWRITE_FONT_WEIGHT_REGULAR;
case FontWeight::Medium : return DWRITE_FONT_WEIGHT_MEDIUM;
//case FontWeight::DemiBold : return DWRITE_FONT_WEIGHT_DEMI_BOLD;
case FontWeight::SemiBOLD : return DWRITE_FONT_WEIGHT_SEMI_BOLD;
case FontWeight::Bold : return DWRITE_FONT_WEIGHT_BOLD;
case FontWeight::ExtraBold : return DWRITE_FONT_WEIGHT_EXTRA_BOLD;
//case FontWeight::UltraBold : return DWRITE_FONT_WEIGHT_ULTRA_BOLD;
case FontWeight::Black : return DWRITE_FONT_WEIGHT_BLACK;
//case FontWeight::Heavy : return DWRITE_FONT_WEIGHT_HEAVY;
case FontWeight::ExtraBlack : return DWRITE_FONT_WEIGHT_EXTRA_BLACK;
//case FontWeight::UltraBlack : return DWRITE_FONT_WEIGHT_ULTRA_BLACK;
default : int weight = (int)fontWeight;
if ( weight >= 1 && weight <= 999)
{
return (DWRITE_FONT_WEIGHT) fontWeight;
}
else
{
throw gcnew System::InvalidOperationException();
}
}
}
FontSimulations DWriteTypeConverter::Convert(DWRITE_FONT_SIMULATIONS fontSimulations)
{
//Converting to char because the compiler was complaining about it.
char fontSim = (char)fontSimulations;
switch(fontSim)
{
case DWRITE_FONT_SIMULATIONS_BOLD : return FontSimulations::Bold;
case DWRITE_FONT_SIMULATIONS_OBLIQUE : return FontSimulations::Oblique;
case DWRITE_FONT_SIMULATIONS_NONE : return FontSimulations::None;
// We did have (DWRITE_FONT_SIMULATIONS_BOLD | DWRITE_FONT_SIMULATIONS_OBLIQUE) as a switch case, but the compiler
// started throwing C2051 on this when I ported from WPFText to WPFDWrite. Probably some compiler or build setting
// change caused this. Just moved it to the default case instead.
default : if (fontSim == (DWRITE_FONT_SIMULATIONS_BOLD | DWRITE_FONT_SIMULATIONS_OBLIQUE)) return (FontSimulations::Bold | FontSimulations::Oblique);
else throw gcnew System::InvalidOperationException();
}
}
unsigned char DWriteTypeConverter::Convert(FontSimulations fontSimulations)
{
//Converting to char because the compiler was complaining about it.
char fontSim = (char)fontSimulations;
switch(fontSim)
{
case FontSimulations::Bold : return DWRITE_FONT_SIMULATIONS_BOLD;
case FontSimulations::Oblique : return DWRITE_FONT_SIMULATIONS_OBLIQUE;
case (FontSimulations::Bold | FontSimulations::Oblique) : return (unsigned char)(DWRITE_FONT_SIMULATIONS_BOLD | DWRITE_FONT_SIMULATIONS_OBLIQUE);
case FontSimulations::None : return DWRITE_FONT_SIMULATIONS_NONE;
default : throw gcnew System::InvalidOperationException();
}
}
DWRITE_FONT_FACE_TYPE DWriteTypeConverter::Convert(FontFaceType fontFaceType)
{
switch (fontFaceType)
{
case FontFaceType::Bitmap : return DWRITE_FONT_FACE_TYPE_BITMAP;
case FontFaceType::CFF : return DWRITE_FONT_FACE_TYPE_CFF;
case FontFaceType::TrueType : return DWRITE_FONT_FACE_TYPE_TRUETYPE;
case FontFaceType::TrueTypeCollection : return DWRITE_FONT_FACE_TYPE_TRUETYPE_COLLECTION;
case FontFaceType::Type1 : return DWRITE_FONT_FACE_TYPE_TYPE1;
case FontFaceType::Vector : return DWRITE_FONT_FACE_TYPE_VECTOR;
case FontFaceType::Unknown : return DWRITE_FONT_FACE_TYPE_UNKNOWN;
// The following were added to DWrite.h in the Win8 SDK, but are not currently supported by WPF.
// case FontFaceType::RawCFF : return DWRITE_FONT_FACE_TYPE_RAW_CFF;
default : throw gcnew System::InvalidOperationException();
}
}
FontFaceType DWriteTypeConverter::Convert(DWRITE_FONT_FACE_TYPE fontFaceType)
{
switch (fontFaceType)
{
case DWRITE_FONT_FACE_TYPE_BITMAP : return FontFaceType::Bitmap;
case DWRITE_FONT_FACE_TYPE_CFF : return FontFaceType::CFF;
case DWRITE_FONT_FACE_TYPE_TRUETYPE : return FontFaceType::TrueType;
case DWRITE_FONT_FACE_TYPE_TRUETYPE_COLLECTION : return FontFaceType::TrueTypeCollection;
case DWRITE_FONT_FACE_TYPE_TYPE1 : return FontFaceType::Type1;
case DWRITE_FONT_FACE_TYPE_VECTOR : return FontFaceType::Vector;
case DWRITE_FONT_FACE_TYPE_UNKNOWN : return FontFaceType::Unknown;
// The following were added to DWrite.h in the Win8 SDK, but are not currently supported by WPF.
case DWRITE_FONT_FACE_TYPE_RAW_CFF : // return FontFaceType::RawCFF;
default : throw gcnew System::InvalidOperationException();
}
}
FontFileType DWriteTypeConverter::Convert(DWRITE_FONT_FILE_TYPE dwriteFontFileType)
{
switch(dwriteFontFileType)
{
case DWRITE_FONT_FILE_TYPE_UNKNOWN : return FontFileType::Unknown;
case DWRITE_FONT_FILE_TYPE_CFF : return FontFileType::CFF;
case DWRITE_FONT_FILE_TYPE_TRUETYPE : return FontFileType::TrueType;
case DWRITE_FONT_FILE_TYPE_TRUETYPE_COLLECTION : return FontFileType::TrueTypeCollection;
case DWRITE_FONT_FILE_TYPE_TYPE1_PFM : return FontFileType::Type1PFM;
case DWRITE_FONT_FILE_TYPE_TYPE1_PFB : return FontFileType::Type1PFB;
case DWRITE_FONT_FILE_TYPE_VECTOR : return FontFileType::Vector;
case DWRITE_FONT_FILE_TYPE_BITMAP : return FontFileType::Bitmap;
default : throw gcnew System::InvalidOperationException();
}
}
FontStretch DWriteTypeConverter::Convert(DWRITE_FONT_STRETCH fontStretch)
{
// The commented cases are here only for completeness so that the code captures all the possible enum values.
// However, these enum values are commented out since there are several enums having the same value.
// For example, both Normal and Medium have a value of 5.
switch(fontStretch)
{
case DWRITE_FONT_STRETCH_UNDEFINED : return FontStretch::Undefined;
case DWRITE_FONT_STRETCH_ULTRA_CONDENSED : return FontStretch::UltraCondensed;
case DWRITE_FONT_STRETCH_EXTRA_CONDENSED : return FontStretch::ExtraCondensed;
case DWRITE_FONT_STRETCH_CONDENSED : return FontStretch::Condensed;
case DWRITE_FONT_STRETCH_SEMI_CONDENSED : return FontStretch::SemiCondensed;
case DWRITE_FONT_STRETCH_NORMAL : return FontStretch::Normal;
//case DWRITE_FONT_STRETCH_MEDIUM : return FontStretch::Medium;
case DWRITE_FONT_STRETCH_SEMI_EXPANDED : return FontStretch::SemiExpanded;
case DWRITE_FONT_STRETCH_EXPANDED : return FontStretch::Expanded;
case DWRITE_FONT_STRETCH_EXTRA_EXPANDED : return FontStretch::ExtraExpanded;
case DWRITE_FONT_STRETCH_ULTRA_EXPANDED : return FontStretch::UltraExpanded;
default : throw gcnew System::InvalidOperationException();
}
}
DWRITE_FONT_STRETCH DWriteTypeConverter::Convert(FontStretch fontStretch)
{
// The commented cases are here only for completeness so that the code captures all the possible enum values.
// However, these enum values are commented out since there are several enums having the same value.
// For example, both Normal and Medium have a value of 5.
switch(fontStretch)
{
case FontStretch::Undefined : return DWRITE_FONT_STRETCH_UNDEFINED;
case FontStretch::UltraCondensed : return DWRITE_FONT_STRETCH_ULTRA_CONDENSED;
case FontStretch::ExtraCondensed : return DWRITE_FONT_STRETCH_EXTRA_CONDENSED;
case FontStretch::Condensed : return DWRITE_FONT_STRETCH_CONDENSED;
case FontStretch::SemiCondensed : return DWRITE_FONT_STRETCH_SEMI_CONDENSED;
case FontStretch::Normal : return DWRITE_FONT_STRETCH_NORMAL;
//case FontStretch::Medium : return DWRITE_FONT_STRETCH_MEDIUM;
case FontStretch::SemiExpanded : return DWRITE_FONT_STRETCH_SEMI_EXPANDED;
case FontStretch::Expanded : return DWRITE_FONT_STRETCH_EXPANDED;
case FontStretch::ExtraExpanded : return DWRITE_FONT_STRETCH_EXTRA_EXPANDED;
case FontStretch::UltraExpanded : return DWRITE_FONT_STRETCH_ULTRA_EXPANDED;
default : throw gcnew System::InvalidOperationException();
}
}
DWRITE_FONT_STYLE DWriteTypeConverter::Convert(FontStyle fontStyle)
{
switch(fontStyle)
{
case FontStyle::Normal : return DWRITE_FONT_STYLE_NORMAL;
case FontStyle::Italic : return DWRITE_FONT_STYLE_ITALIC;
case FontStyle::Oblique : return DWRITE_FONT_STYLE_OBLIQUE;
default : throw gcnew System::InvalidOperationException();
}
}
FontStyle DWriteTypeConverter::Convert(DWRITE_FONT_STYLE fontStyle)
{
switch(fontStyle)
{
case DWRITE_FONT_STYLE_NORMAL : return FontStyle::Normal;
case DWRITE_FONT_STYLE_ITALIC : return FontStyle::Italic;
case DWRITE_FONT_STYLE_OBLIQUE : return FontStyle::Oblique;
default : throw gcnew System::InvalidOperationException();
}
}
FontMetrics^ DWriteTypeConverter::Convert(DWRITE_FONT_METRICS dwriteFontMetrics)
{
FontMetrics^ fontMetrics = gcnew FontMetrics();
fontMetrics->Ascent = dwriteFontMetrics.ascent;
fontMetrics->CapHeight = dwriteFontMetrics.capHeight;
fontMetrics->Descent = dwriteFontMetrics.descent;
fontMetrics->DesignUnitsPerEm = dwriteFontMetrics.designUnitsPerEm;
fontMetrics->LineGap = dwriteFontMetrics.lineGap;
fontMetrics->StrikethroughPosition = dwriteFontMetrics.strikethroughPosition;
fontMetrics->StrikethroughThickness = dwriteFontMetrics.strikethroughThickness;
fontMetrics->UnderlinePosition = dwriteFontMetrics.underlinePosition;
fontMetrics->UnderlineThickness = dwriteFontMetrics.underlineThickness;
fontMetrics->XHeight = dwriteFontMetrics.xHeight;
return fontMetrics;
}
DWRITE_FONT_METRICS DWriteTypeConverter::Convert(FontMetrics^ fontMetrics)
{
DWRITE_FONT_METRICS dwriteFontMetrics;
dwriteFontMetrics.ascent = fontMetrics->Ascent;
dwriteFontMetrics.capHeight = fontMetrics->CapHeight;
dwriteFontMetrics.descent = fontMetrics->Descent;
dwriteFontMetrics.designUnitsPerEm = fontMetrics->DesignUnitsPerEm;
dwriteFontMetrics.lineGap = fontMetrics->LineGap;
dwriteFontMetrics.strikethroughPosition = fontMetrics->StrikethroughPosition;
dwriteFontMetrics.strikethroughThickness = fontMetrics->StrikethroughThickness;
dwriteFontMetrics.underlinePosition = fontMetrics->UnderlinePosition;
dwriteFontMetrics.underlineThickness = fontMetrics->UnderlineThickness;
dwriteFontMetrics.xHeight = fontMetrics->XHeight;
return dwriteFontMetrics;
}
DWRITE_MATRIX DWriteTypeConverter::Convert(DWriteMatrix^ matrix)
{
DWRITE_MATRIX dwriteMatrix;
dwriteMatrix.dx = matrix->Dx;
dwriteMatrix.dy = matrix->Dy;
dwriteMatrix.m11 = matrix->M11;
dwriteMatrix.m12 = matrix->M12;
dwriteMatrix.m21 = matrix->M21;
dwriteMatrix.m22 = matrix->M22;
return dwriteMatrix;
}
DWriteMatrix^ DWriteTypeConverter::Convert(DWRITE_MATRIX dwriteMatrix)
{
DWriteMatrix^ matrix = gcnew DWriteMatrix;
matrix->Dx = dwriteMatrix.dx;
matrix->Dy = dwriteMatrix.dy;
matrix->M11 = dwriteMatrix.m11;
matrix->M12 = dwriteMatrix.m12;
matrix->M21 = dwriteMatrix.m21;
matrix->M22 = dwriteMatrix.m22;
return matrix;
}
System::Windows::Point DWriteTypeConverter::Convert(DWRITE_GLYPH_OFFSET dwriteGlyphOffset)
{
System::Windows::Point glyphOffset;
glyphOffset.X = dwriteGlyphOffset.advanceOffset;
glyphOffset.Y = dwriteGlyphOffset.ascenderOffset;
return glyphOffset;
}
DWRITE_INFORMATIONAL_STRING_ID DWriteTypeConverter::Convert(InformationalStringID informationStringID)
{
switch(informationStringID)
{
case InformationalStringID::None : return DWRITE_INFORMATIONAL_STRING_NONE;
case InformationalStringID::CopyrightNotice : return DWRITE_INFORMATIONAL_STRING_COPYRIGHT_NOTICE;
case InformationalStringID::VersionStrings : return DWRITE_INFORMATIONAL_STRING_VERSION_STRINGS;
case InformationalStringID::Trademark : return DWRITE_INFORMATIONAL_STRING_TRADEMARK;
case InformationalStringID::Manufacturer : return DWRITE_INFORMATIONAL_STRING_MANUFACTURER;
case InformationalStringID::Designer : return DWRITE_INFORMATIONAL_STRING_DESIGNER;
case InformationalStringID::DesignerURL : return DWRITE_INFORMATIONAL_STRING_DESIGNER_URL;
case InformationalStringID::Description : return DWRITE_INFORMATIONAL_STRING_DESCRIPTION;
case InformationalStringID::FontVendorURL : return DWRITE_INFORMATIONAL_STRING_FONT_VENDOR_URL;
case InformationalStringID::LicenseDescription : return DWRITE_INFORMATIONAL_STRING_LICENSE_DESCRIPTION;
case InformationalStringID::LicenseInfoURL : return DWRITE_INFORMATIONAL_STRING_LICENSE_INFO_URL;
case InformationalStringID::WIN32FamilyNames : return DWRITE_INFORMATIONAL_STRING_WIN32_FAMILY_NAMES;
case InformationalStringID::Win32SubFamilyNames : return DWRITE_INFORMATIONAL_STRING_WIN32_SUBFAMILY_NAMES;
case InformationalStringID::PreferredFamilyNames : return DWRITE_INFORMATIONAL_STRING_PREFERRED_FAMILY_NAMES;
case InformationalStringID::PreferredSubFamilyNames : return DWRITE_INFORMATIONAL_STRING_PREFERRED_SUBFAMILY_NAMES;
case InformationalStringID::SampleText : return DWRITE_INFORMATIONAL_STRING_SAMPLE_TEXT;
// The following were added to DWrite.h in the Win8 SDK, but are not currently supported by WPF.
// case InformationalStringID::PostscriptCidName : return DWRITE_INFORMATIONAL_STRING_POSTSCRIPT_CID_NAME;
// case InformationalStringID::PostscriptName : return DWRITE_INFORMATIONAL_STRING_POSTSCRIPT_NAME;
// case InformationalStringID::FullName : return DWRITE_INFORMATIONAL_STRING_FULL_NAME;
default : throw gcnew System::InvalidOperationException();
}
}
InformationalStringID DWriteTypeConverter::Convert(DWRITE_INFORMATIONAL_STRING_ID dwriteInformationStringID)
{
switch(dwriteInformationStringID)
{
case DWRITE_INFORMATIONAL_STRING_NONE : return InformationalStringID::None;
case DWRITE_INFORMATIONAL_STRING_COPYRIGHT_NOTICE : return InformationalStringID::CopyrightNotice;
case DWRITE_INFORMATIONAL_STRING_VERSION_STRINGS : return InformationalStringID::VersionStrings;
case DWRITE_INFORMATIONAL_STRING_TRADEMARK : return InformationalStringID::Trademark;
case DWRITE_INFORMATIONAL_STRING_MANUFACTURER : return InformationalStringID::Manufacturer;
case DWRITE_INFORMATIONAL_STRING_DESIGNER : return InformationalStringID::Designer;
case DWRITE_INFORMATIONAL_STRING_DESIGNER_URL : return InformationalStringID::DesignerURL;
case DWRITE_INFORMATIONAL_STRING_DESCRIPTION : return InformationalStringID::Description;
case DWRITE_INFORMATIONAL_STRING_FONT_VENDOR_URL : return InformationalStringID::FontVendorURL;
case DWRITE_INFORMATIONAL_STRING_LICENSE_DESCRIPTION : return InformationalStringID::LicenseDescription;
case DWRITE_INFORMATIONAL_STRING_LICENSE_INFO_URL : return InformationalStringID::LicenseInfoURL;
case DWRITE_INFORMATIONAL_STRING_WIN32_FAMILY_NAMES : return InformationalStringID::WIN32FamilyNames;
case DWRITE_INFORMATIONAL_STRING_WIN32_SUBFAMILY_NAMES : return InformationalStringID::Win32SubFamilyNames;
case DWRITE_INFORMATIONAL_STRING_PREFERRED_FAMILY_NAMES : return InformationalStringID::PreferredFamilyNames;
case DWRITE_INFORMATIONAL_STRING_PREFERRED_SUBFAMILY_NAMES : return InformationalStringID::PreferredSubFamilyNames;
case DWRITE_INFORMATIONAL_STRING_SAMPLE_TEXT : return InformationalStringID::SampleText;
// The following were added to DWrite.h in the Win8 SDK, but are not currently supported by WPF.
case DWRITE_INFORMATIONAL_STRING_POSTSCRIPT_CID_NAME : // return InformationalStringID::PostscriptCidName;
case DWRITE_INFORMATIONAL_STRING_POSTSCRIPT_NAME : // return InformationalStringID::PostscriptName;
case DWRITE_INFORMATIONAL_STRING_FULL_NAME : // return InformationalStringID::FullName;
default : throw gcnew System::InvalidOperationException();
}
}
DWRITE_MEASURING_MODE DWriteTypeConverter::Convert(TextFormattingMode measuringMode)
{
switch(measuringMode)
{
case TextFormattingMode::Ideal : return DWRITE_MEASURING_MODE_NATURAL;
case TextFormattingMode::Display : return DWRITE_MEASURING_MODE_GDI_CLASSIC;
// We do not support Natural Metrics mode in WPF
default : throw gcnew System::InvalidOperationException();
}
}
TextFormattingMode DWriteTypeConverter::Convert(DWRITE_MEASURING_MODE dwriteMeasuringMode)
{
switch(dwriteMeasuringMode)
{
case DWRITE_MEASURING_MODE_NATURAL : return TextFormattingMode::Ideal;
case DWRITE_MEASURING_MODE_GDI_CLASSIC : return TextFormattingMode::Display;
// We do not support Natural Metrics mode in WPF
// However, the build system complained about not having an explicit case
// for DWRITE_TEXT_MEASURING_METHOD_USE_DISPLAY_NATURAL_METRICS
case DWRITE_MEASURING_MODE_GDI_NATURAL : throw gcnew System::InvalidOperationException();
default : throw gcnew System::InvalidOperationException();
}
}
}}}}//MS::Internal::Text::TextInterface

Просмотреть файл

@ -0,0 +1,58 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
#ifndef __DWRITETYPECONVERTER_H
#define __DWRITETYPECONVERTER_H
#include "Common.h"
#include "FactoryType.h"
#include "FontWeight.h"
#include "FontFaceType.h"
#include "FontFileType.h"
#include "FontSimulation.h"
#include "FontStretch.h"
#include "FontStyle.h"
#include "FontMetrics.h"
#include "GlyphMetrics.h"
#include "DWriteMatrix.h"
#include "DWriteGlyphOffset.h"
#include "InformationalStringID.h"
using namespace System::Windows::Media;
namespace MS { namespace Internal { namespace Text { namespace TextInterface
{
/// <summary>
/// This class is used to convert data types back anf forth between DWrite and DWriteWrapper.
/// </summary>
[System::Security::SecurityCritical(System::Security::SecurityCriticalScope::Everything)]
private ref class DWriteTypeConverter sealed
{
internal:
static DWRITE_FACTORY_TYPE Convert(FactoryType factoryType);
static FontWeight Convert(DWRITE_FONT_WEIGHT fontWeight);
static DWRITE_FONT_WEIGHT Convert(FontWeight fontWeight);
static FontFileType Convert(DWRITE_FONT_FILE_TYPE dwriteFontFileType);
static FontSimulations Convert(DWRITE_FONT_SIMULATIONS fontSimulations);
static unsigned char Convert(FontSimulations fontSimulations);
static DWRITE_FONT_FACE_TYPE Convert(FontFaceType fontFaceType);
static FontFaceType Convert(DWRITE_FONT_FACE_TYPE fontFaceType);
static FontStretch Convert(DWRITE_FONT_STRETCH fontStrech);
static DWRITE_FONT_STRETCH Convert(FontStretch fontStrech);
static FontStyle Convert(DWRITE_FONT_STYLE fontStyle);
static DWRITE_FONT_STYLE Convert(FontStyle fontStyle);
static DWRITE_FONT_METRICS Convert(FontMetrics^ fontMetrics);
static FontMetrics^ Convert(DWRITE_FONT_METRICS dwriteFontMetrics);
static DWRITE_MATRIX Convert(DWriteMatrix^ matrix);
static DWriteMatrix^ Convert(DWRITE_MATRIX dwriteMatrix);
static System::Windows::Point Convert(DWRITE_GLYPH_OFFSET dwriteGlyphOffset);
static DWRITE_INFORMATIONAL_STRING_ID Convert(InformationalStringID informationStringID);
static InformationalStringID Convert(DWRITE_INFORMATIONAL_STRING_ID dwriteInformationStringID);
static DWRITE_MEASURING_MODE Convert(TextFormattingMode measuringMode);
static TextFormattingMode Convert(DWRITE_MEASURING_MODE dwriteMeasuringMode);
};
}}}}//MS::Internal::Text::TextInterface
#endif //__DWRITETYPECONVERTER_H

Просмотреть файл

@ -0,0 +1,525 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
#include "Factory.h"
#include <float.h>
#include "DWriteInterfaces.h"
using namespace System::Runtime::InteropServices;
using namespace MS::Internal::Text::TextInterface::Interfaces;
#ifndef _CLR_NETCORE
using namespace System::Security::Permissions;
#endif
using namespace System::Threading;
typedef HRESULT (WINAPI *DWRITECREATEFACTORY)(DWRITE_FACTORY_TYPE factoryType, REFIID iid, IUnknown **factory);
/// <SecurityNote>
/// Critical - Returns a pointer to the DWriteCreateFactory method which
/// can be used to access the shared factory.
/// </SecurityNote>
[System::Security::SecurityCritical]
extern void *GetDWriteCreateFactoryFunctionPointer();
namespace MS { namespace Internal { namespace Text { namespace TextInterface
{
/// <summary>
/// static ctor to initialize the GUID of IDWriteFactory interface.
/// </summary>
/// <SecurityNote>
/// Critical - Asserts unmanaged code permissions.
/// - Assigns security critical _guidForIDWriteFactory
/// Safe - The data used to initialize _guidForIDWriteFactory is const.
/// </SecurityNote>
[SecuritySafeCritical]
#ifndef _CLR_NETCORE
[SecurityPermission(SecurityAction::Assert, UnmanagedCode=true)]
#endif
static Factory::Factory()
{
System::Guid guid = System::Guid("b859ee5a-d838-4b5b-a2e8-1adc7d93db48");
_GUID* pGuidForIDWriteFactory = new _GUID();
*pGuidForIDWriteFactory = Native::Util::ToGUID(guid);
_guidForIDWriteFactory = gcnew NativePointerWrapper<_GUID>(pGuidForIDWriteFactory);
}
/// <SecurityNote>
/// Critical - Calls security critical Factory ctor().
/// </SecurityNote>
[SecurityCritical]
Factory^ Factory::Create(
FactoryType factoryType,
IFontSourceCollectionFactory^ fontSourceCollectionFactory,
IFontSourceFactory^ fontSourceFactory
)
{
return gcnew Factory(factoryType, fontSourceCollectionFactory, fontSourceFactory);
}
/// <SecurityNote>
/// Critical - references security critical member '_pFactory'.
/// references security critical method 'MS.Internal.Text.TextInterface.FontFileLoader..ctor(MS.Internal.Text.TextInterface.IFontSourceFactory)'.
/// references security critical method 'MS.Internal.Text.TextInterface.FontCollectionLoader..ctor(MS.Internal.Text.TextInterface.IFontSourceCollectionFactory, MS.Internal.Text.TextInterface.FontFileLoader)'.
/// references security critical method 'System.Runtime.InteropServices.Marshal.GetComInterfaceForObject(System.Object, System.Type)' &
/// 'System.Runtime.InteropServices.Marshal.Release(System.IntPtr)' but this is ok since they are called for objects that this method create.
/// Asserts unmanaged code permissions to call Marshal.*
/// </SecurityNote>
//[SecurityCritical] - tagged in header file
//[SecurityPermission(SecurityAction::Assert, UnmanagedCode=true)]
Factory::Factory(
FactoryType factoryType,
IFontSourceCollectionFactory^ fontSourceCollectionFactory,
IFontSourceFactory^ fontSourceFactory
) : CriticalHandle(IntPtr::Zero)
{
Initialize(factoryType);
_wpfFontFileLoader = gcnew FontFileLoader(fontSourceFactory);
_wpfFontCollectionLoader = gcnew FontCollectionLoader(
fontSourceCollectionFactory,
_wpfFontFileLoader
);
_fontSourceFactory = fontSourceFactory;
IntPtr pIDWriteFontFileLoaderMirror = Marshal::GetComInterfaceForObject(
_wpfFontFileLoader,
IDWriteFontFileLoaderMirror::typeid);
// Future improvement note:
// This seems a bit hacky, but unclear at this time how to implement this any better.
// When we attempt to unregister these, do we need to keep around the same IntPtr
// representing the result of GetComInterfaceForObject to free it ? Or will it
// be the same if we call it again?
HRESULT hr = _pFactory->RegisterFontFileLoader(
(IDWriteFontFileLoader *)pIDWriteFontFileLoaderMirror.ToPointer()
);
Marshal::Release(pIDWriteFontFileLoaderMirror);
ConvertHresultToException(hr, "Factory::Factory");
IntPtr pIDWriteFontCollectionLoaderMirror = Marshal::GetComInterfaceForObject(
_wpfFontCollectionLoader,
IDWriteFontCollectionLoaderMirror::typeid);
hr = _pFactory->RegisterFontCollectionLoader(
(IDWriteFontCollectionLoader *)pIDWriteFontCollectionLoaderMirror.ToPointer()
);
Marshal::Release(pIDWriteFontCollectionLoaderMirror);
ConvertHresultToException(hr, "Factory::Factory");
}
/// <SecurityNote>
/// Critical - Calls security critical GetDWriteCreateFactoryFunctionPointer().
/// Assigns security critical member _pFactory.
/// Safe - Does not expose any critical info.
/// </SecurityNote>
[SecuritySafeCritical]
__declspec(noinline) void Factory::Initialize(
FactoryType factoryType
)
{
IUnknown* factoryTemp;
DWRITECREATEFACTORY pfnDWriteCreateFactory = (DWRITECREATEFACTORY)GetDWriteCreateFactoryFunctionPointer();
HRESULT hr = (*pfnDWriteCreateFactory)(
DWriteTypeConverter::Convert(factoryType),
(REFIID)(*(_guidForIDWriteFactory->Value)),
&factoryTemp
);
ConvertHresultToException(hr, "Factory::Initialize");
_pFactory = (IDWriteFactory*)factoryTemp;
}
/// <SecurityNote>
/// Critical - Manipulates security critical member _pFactory.
/// - Asserts Unmanaged code permissions to call Marshal.*
/// Safe - Just releases the interface.
/// - Marshal is called with trusted inputs.
/// </SecurityNote>
[SecuritySafeCritical]
[ReliabilityContract(Consistency::WillNotCorruptState, Cer::Success)]
[SecurityPermission(SecurityAction::Assert, UnmanagedCode=true)]
__declspec(noinline) bool Factory::ReleaseHandle()
{
if (_wpfFontCollectionLoader != nullptr)
{
IntPtr pIDWriteFontCollectionLoaderMirror = Marshal::GetComInterfaceForObject(
_wpfFontCollectionLoader,
IDWriteFontCollectionLoaderMirror::typeid);
_pFactory->UnregisterFontCollectionLoader((IDWriteFontCollectionLoader *)pIDWriteFontCollectionLoaderMirror.ToPointer());
Marshal::Release(pIDWriteFontCollectionLoaderMirror);
_wpfFontCollectionLoader = nullptr;
}
if (_wpfFontFileLoader != nullptr)
{
IntPtr pIDWriteFontFileLoaderMirror = Marshal::GetComInterfaceForObject(
_wpfFontFileLoader,
IDWriteFontFileLoaderMirror::typeid);
_pFactory->UnregisterFontFileLoader((IDWriteFontFileLoader *)pIDWriteFontFileLoaderMirror.ToPointer());
Marshal::Release(pIDWriteFontFileLoaderMirror);
_wpfFontFileLoader = nullptr;
}
if (_pFactory != NULL)
{
_pFactory ->Release();
_pFactory = NULL;
}
return true;
}
/// <SecurityNote>
/// Critical - Assumes that the user has permissions to access filePathUri.
/// </SecurityNote>
[SecurityCritical]
__declspec(noinline) FontFile^ Factory::CreateFontFile(
System::Uri^ filePathUri
)
{
IDWriteFontFile* dwriteFontFile = NULL;
HRESULT hr = Factory::CreateFontFile(_pFactory, _wpfFontFileLoader, filePathUri, &dwriteFontFile);
// If DWrite's CreateFontFileReference fails then try opening the file using WPF's logic.
// The failures that WPF returns are more granular than the HRESULTs that DWrite returns
// thus we use WPF's logic to open the file to throw the same exceptions that
// WPF would have thrown before.
if (FAILED(hr))
{
IFontSource^ fontSource = _fontSourceFactory->Create(filePathUri->AbsoluteUri);
fontSource->TestFileOpenable();
}
//This call is made to prevent this object from being collected and hence get its finalize method called
//While there are others referencing it.
System::GC::KeepAlive(this);
ConvertHresultToException(hr, "FontFile^ Factory::CreateFontFile");
return gcnew FontFile(dwriteFontFile);
}
/// <SecurityNote>
/// Critical - Calls security critical CreateFontFace.
/// </SecurityNote>
[SecurityCritical]
FontFace^ Factory::CreateFontFace(
System::Uri^ filePathUri,
unsigned int faceIndex
)
{
return CreateFontFace(
filePathUri,
faceIndex,
FontSimulations::None
);
}
/// <SecurityNote>
/// Critical - Calls security critical CreateFontFile.
/// </SecurityNote>
[SecurityCritical]
FontFace^ Factory::CreateFontFace(
System::Uri^ filePathUri,
unsigned int faceIndex,
FontSimulations fontSimulationFlags
)
{
FontFile^ fontFile = CreateFontFile(filePathUri);
DWRITE_FONT_FILE_TYPE dwriteFontFileType;
DWRITE_FONT_FACE_TYPE dwriteFontFaceType;
unsigned int numberOfFaces = 0;
HRESULT hr;
if (fontFile->Analyze(
dwriteFontFileType,
dwriteFontFaceType,
numberOfFaces,
hr
))
{
if (faceIndex >= numberOfFaces)
{
throw gcnew System::ArgumentOutOfRangeException("faceIndex");
}
unsigned char dwriteFontSimulationsFlags = DWriteTypeConverter::Convert(fontSimulationFlags);
IDWriteFontFace* dwriteFontFace = NULL;
IDWriteFontFile* dwriteFontFile = fontFile->DWriteFontFileNoAddRef;
HRESULT hr = _pFactory->CreateFontFace(
dwriteFontFaceType,
1,
&dwriteFontFile,
faceIndex,
(DWRITE_FONT_SIMULATIONS) dwriteFontSimulationsFlags,
&dwriteFontFace
);
System::GC::KeepAlive(fontFile);
System::GC::KeepAlive(this);
ConvertHresultToException(hr, "FontFace^ Factory::CreateFontFace");
return gcnew FontFace(dwriteFontFace);
}
// This path is here because there is a behavior mismatch between DWrite and WPF.
// If a directory was given instead of a font uri WPF previously throws
// System.UnauthorizedAccessException. We handle most of the exception behavior mismatch
// in FontFile^ Factory::CreateFontFile by opening the file using WPF's previous (prior to DWrite integration) logic if
// CreateFontFileReference fails (please see comments in FontFile^ Factory::CreateFontFile).
// However in this special case DWrite's CreateFontFileReference will succeed if given
// a directory instead of a font file and it is the Analyze() call will fail returning DWRITE_E_FILEFORMAT.
// Thus, incase the hr returned from Analyze() was DWRITE_E_FILEFORMAT we do as we did in FontFile^ Factory::CreateFontFile
// to try and open the file using WPF old logic and throw System.UnauthorizedAccessException as WPF used to do.
// If a file format exception is expected then opening the file should succeed and ConvertHresultToException()
// Should throw the correct exception.
// A final note would be that this overhead is only incurred in error conditions and so the normal execution path should
// not be affected.
else
{
if (hr == DWRITE_E_FILEFORMAT)
{
IFontSource^ fontSource = _fontSourceFactory->Create(filePathUri->AbsoluteUri);
fontSource->TestFileOpenable();
}
ConvertHresultToException(hr, "FontFace^ Factory::CreateFontFace");
}
return nullptr;
}
FontCollection^ Factory::GetSystemFontCollection()
{
return GetSystemFontCollection(false);
}
/// <SecurityNote>
/// Critical - Uses security critical _pFactory pointer.
/// Safe - It does not expose the pointer it uses.
/// </SecurityNote>
[SecuritySafeCritical]
__declspec(noinline) FontCollection^ Factory::GetSystemFontCollection(
bool checkForUpdates
)
{
IDWriteFontCollection* dwriteFontCollection = NULL;
HRESULT hr = _pFactory->GetSystemFontCollection(
&dwriteFontCollection,
checkForUpdates
);
System::GC::KeepAlive(this);
ConvertHresultToException(hr, "FontCollection^ Factory::GetSystemFontCollection");
return gcnew FontCollection(dwriteFontCollection);
}
/// <SecurityNote>
/// Critical - The caller of this method should own the verification of
/// the access permissions to the given Uri.
///
/// Other reasons why this method should be critical (but safe)
/// ----------------------------------------------------------
/// - Uses security critical _pFactory pointer. But
/// It does not expose the pointer it uses.
/// - Asserts Unmanaged code permissions to call Marshal.* But
/// Marshal is called with trusted inputs.
/// </SecurityNote>
[SecurityCritical]
[SecurityPermission(SecurityAction::Assert, UnmanagedCode=true)]
__declspec(noinline) FontCollection^ Factory::GetFontCollection(System::Uri^ uri)
{
System::String^ uriString = uri->AbsoluteUri;
IDWriteFontCollection* dwriteFontCollection = NULL;
pin_ptr<const WCHAR> uriPathWChar = CriticalPtrToStringChars(uriString);
IntPtr pIDWriteFontCollectionLoaderMirror = Marshal::GetComInterfaceForObject(
_wpfFontCollectionLoader,
IDWriteFontCollectionLoaderMirror::typeid);
IDWriteFontCollectionLoader * pIDWriteFontCollectionLoader =
(IDWriteFontCollectionLoader *)pIDWriteFontCollectionLoaderMirror.ToPointer();
HRESULT hr = _pFactory->CreateCustomFontCollection(
pIDWriteFontCollectionLoader,
uriPathWChar,
(uriString->Length+1) * sizeof(WCHAR),
&dwriteFontCollection
);
Marshal::Release(pIDWriteFontCollectionLoaderMirror);
System::GC::KeepAlive(this);
ConvertHresultToException(hr, "FontCollection^ Factory::GetFontCollection");
return gcnew FontCollection(dwriteFontCollection);
}
/// <SecurityNote>
/// Critical - Receives and returns native pointers.
/// - References security critical method 'System.Runtime.InteropServices.Marshal.GetComInterfaceForObject(System.Object, System.Type)'.
/// - References security critical method 'System.Runtime.InteropServices.Marshal.Release(System.IntPtr)'.
/// - Asserts unmanaged code permissions to call Marshal.* However the call to Marshal is safe
/// because it is called with trusted inputs.
/// </SecurityNote>
[SecurityCritical]
[SecurityPermission(SecurityAction::Assert, UnmanagedCode=true)]
HRESULT Factory::CreateFontFile(
IDWriteFactory* factory,
FontFileLoader^ fontFileLoader,
System::Uri^ filePathUri,
__out IDWriteFontFile** dwriteFontFile
)
{
bool isLocal = Factory::IsLocalUri(filePathUri);
HRESULT hr = E_FAIL;
if (isLocal)
{
//Protect the pointer to the filepath from being moved around by the garbage collector.
pin_ptr<const WCHAR> uriPathWChar = CriticalPtrToStringChars(filePathUri->LocalPath);
// DWrite currently has a slow lookup for the last write time, which
// introduced a noticable perf regression when we switched over.
// To mitigate this scenario, we will fetch the timestamp ourselves
// and cache it for future calls.
//
// Note: we only do this if a Dispatcher exists for the current
// thread. There is a seperate cache for each thread.
::FILETIME timeStamp;
::FILETIME * pTimeStamp = NULL; // If something fails, do nothing and let DWrite sort it out.
System::Runtime::InteropServices::ComTypes::FILETIME cachedTimeStamp;
Dispatcher^ currentDispatcher = Dispatcher::FromThread(Thread::CurrentThread);
if(currentDispatcher != nullptr)
{
// One-time initialization per thread.
if(_timeStampCache == nullptr)
{
_timeStampCache = gcnew Dictionary<System::Uri^,System::Runtime::InteropServices::ComTypes::FILETIME>();
}
if(_timeStampCache->TryGetValue(filePathUri, cachedTimeStamp))
{
// Convert managed FILETIME to native FILETIME, pass to DWrite
timeStamp.dwLowDateTime = cachedTimeStamp.dwLowDateTime;
timeStamp.dwHighDateTime = cachedTimeStamp.dwHighDateTime;
pTimeStamp = &timeStamp;
}
else
{
// Nothing was in the cache for this font URI, so try to open
// the file to fetch the timestamp. We open the file, rather
// than calling APIs like GetFileAttributesEx, so that symbolic
// links will resolve and also to ensure the timestamp is
// accurate.
//
// As of 10/7/2011 these flags we the same as DWrite uses.
HANDLE hFile = ::CreateFile(
uriPathWChar,
GENERIC_READ,
FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE,
NULL,
OPEN_EXISTING,
FILE_FLAG_RANDOM_ACCESS, // hint to the OS that the file is accessed randomly
NULL);
if(hFile != INVALID_HANDLE_VALUE)
{
::BY_HANDLE_FILE_INFORMATION fileInfo;
if(::GetFileInformationByHandle(hFile, &fileInfo))
{
// Convert native FILETIME to managed FILETIME and cache.
cachedTimeStamp.dwLowDateTime = fileInfo.ftLastWriteTime.dwLowDateTime;
cachedTimeStamp.dwHighDateTime = fileInfo.ftLastWriteTime.dwHighDateTime;
_timeStampCache->Add(filePathUri, cachedTimeStamp);
// We don't want to hold this cached value for a long time since
// all font references will be tied to this timestamp, and any font
// update during the lifetime of the application will cause is to
// encounter errors. So we use a dispatcher operation to clear
// the cache as soon as we get back to pumping messages.
if(_timeStampCacheCleanupOp == nullptr)
{
_timeStampCacheCleanupOp = currentDispatcher->BeginInvoke(gcnew Action(CleanupTimeStampCache));
}
// Pass this write time to DWrite
timeStamp = fileInfo.ftLastWriteTime;
pTimeStamp = &timeStamp;
}
CloseHandle(hFile);
hFile = NULL;
}
}
}
hr = factory->CreateFontFileReference(
uriPathWChar,
pTimeStamp,
dwriteFontFile
);
}
else
{
System::String^ filePath = filePathUri->AbsoluteUri;
//Protect the pointer to the filepath from being moved around by the garbage collector.
pin_ptr<const WCHAR> uriPathWChar = CriticalPtrToStringChars(filePath);
IntPtr pIDWriteFontFileLoaderMirror = Marshal::GetComInterfaceForObject(
fontFileLoader,
IDWriteFontFileLoaderMirror::typeid);
hr = factory->CreateCustomFontFileReference(
uriPathWChar,
(filePath->Length + 1) * sizeof(WCHAR),
(IDWriteFontFileLoader *)pIDWriteFontFileLoaderMirror.ToPointer(),
dwriteFontFile
);
Marshal::Release(pIDWriteFontFileLoaderMirror);
}
return hr;
}
__declspec(noinline) void Factory::CleanupTimeStampCache()
{
_timeStampCacheCleanupOp = nullptr;
_timeStampCache->Clear();
}
/// <SecurityNote>
/// Critical - Uses security critical _pFactory pointer.
/// - Calls security critical TextAnalyzer ctor()
/// Safe - It does not expose the pointer it uses.
/// - TextAnalyzer ctor() is called with a trusted pointer.
/// </SecurityNote>
[SecuritySafeCritical]
__declspec(noinline) TextAnalyzer^ Factory::CreateTextAnalyzer()
{
IDWriteTextAnalyzer* textAnalyzer = NULL;
HRESULT hr = _pFactory->CreateTextAnalyzer(&textAnalyzer);
System::GC::KeepAlive(this);
ConvertHresultToException(hr, "TextAnalyzer^ Factory::CreateTextAnalyzer");
return gcnew TextAnalyzer(textAnalyzer);
}
bool Factory::IsInvalid::get()
{
return (_pFactory == NULL);
}
}}}}//MS::Internal::Text::TextInterface

Просмотреть файл

@ -0,0 +1,281 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
#ifndef __FACTORY_H
#define __FACTORY_H
#include "Common.h"
#include "FactoryType.h"
#include "FontFile.h"
#include "FontFace.h"
#include "FontCollection.h"
#include "DWriteTypeConverter.h"
#include "IFontSourceCollection.h"
#include "FontCollectionLoader.h"
#include "FontFileLoader.h"
#include "TextAnalyzer.h"
#include "NativePointerWrapper.h"
using namespace MS::Internal::Text::TextInterface::Generics;
using namespace System::Windows::Threading;
namespace MS { namespace Internal { namespace Text { namespace TextInterface
{
/// <summary>
/// The root factory interface for all DWrite objects.
/// </summary>
private ref class Factory sealed : public CriticalHandle
{
private:
/// <summary>
/// This variable stores the GUID of the IDWriteFactory interface.
/// The reason we are not using __uuidof(IDWriteFactory) is because the complier generates a global
/// variable and a static method to initialize it which is not annotated properly with security tags.
/// This makes the static method fail NGENing and causes Jitting which affects perf.
/// If the complier gets fixed then we can remove this scheme and use __uuidof(IDWriteFactory).
/// </summary>
[SecurityCritical]
static NativePointerWrapper<_GUID>^ _guidForIDWriteFactory;
/// <summary>
/// A pointer to the wrapped DWrite factory object.
/// </summary>
/// <SecurityNote>
/// Critical - native pointer.
/// </SecurityNote>
[SecurityCritical]
IDWriteFactory* _pFactory;
/// <summary>
/// static ctor to initialize the GUID of IDWriteFactory interface.
/// </summary>
static Factory();
/// <summary>
/// Constructs a factory object.
/// </summary>
/// <param name="factoryType">Identifies whether the factory object will be shared or isolated.</param>
/// <param name="fontSourceCollectionFactory">A factory object that will create managed FontSourceCollection
/// objects that will be utilized to load embedded fonts.</param>
/// <param name="fontSourceFactory">A factory object that will create managed FontSource
/// objects that will be utilized to load embedded fonts.</param>
/// <returns>
/// The factory just created.
/// </returns>
[SecurityCritical]
[SecurityPermission(SecurityAction::Assert, UnmanagedCode=true)]
Factory(
FactoryType factoryType,
IFontSourceCollectionFactory^ fontSourceCollectionFactory,
IFontSourceFactory^ fontSourceFactory
);
/// <summary>
/// Initializes a factory object.
/// </summary>
/// <param name="factoryType">Identifies whether the factory object will be shared or isolated.</param>
void Initialize(FactoryType factoryType);
/// <summary>
/// The custom loader used by WPF to load font collections.
/// </summary>
/// <SecurityNote>
/// Critical - We call Marshal.* with this member variable and we
// assume it is trusted.
/// </SecurityNote>
[SecurityCritical]
FontCollectionLoader^ _wpfFontCollectionLoader;
/// <summary>
/// The custom loader used by WPF to load font files.
/// </summary>
/// <SecurityNote>
/// Critical - We call Marshal.* with this member variable and we
// assume it is trusted.
/// </SecurityNote>
[SecurityCritical]
FontFileLoader^ _wpfFontFileLoader;
IFontSourceFactory^ _fontSourceFactory;
[ThreadStatic]
static Dictionary<System::Uri^,System::Runtime::InteropServices::ComTypes::FILETIME>^ _timeStampCache;
[ThreadStatic]
static DispatcherOperation^ _timeStampCacheCleanupOp;
static void CleanupTimeStampCache();
protected:
[SecuritySafeCritical]
[ReliabilityContract(Consistency::WillNotCorruptState, Cer::Success)]
virtual bool ReleaseHandle() override;
internal:
property IDWriteFactory* DWriteFactoryAddRef
{
/// <SecurityNote>
/// Critical - Exposes critical member _pFactory.
/// </SecurityNote>
[SecurityCritical]
IDWriteFactory* get()
{
_pFactory->AddRef();
return _pFactory;
}
}
/// <summary>
/// Creates a DirectWrite factory object that is used for subsequent creation of individual DirectWrite objects.
/// </summary>
/// <param name="factoryType">Identifies whether the factory object will be shared or isolated.</param>
/// <param name="fontSourceCollectionFactory">A factory object that will create managed FontSourceCollection
/// objects that will be utilized to load embedded fonts.</param>
/// <param name="fontSourceFactory">A factory object that will create managed FontSource
/// objects that will be utilized to load embedded fonts.</param>
/// <returns>
/// The factory just created.
/// </returns>
[SecurityCritical]
static Factory^ Create(
FactoryType factoryType,
IFontSourceCollectionFactory^ fontSourceCollectionFactory,
IFontSourceFactory^ fontSourceFactory
);
/// <summary>
/// Creates a font file object from a local font file.
/// </summary>
/// <param name="filePathUri">file path uri.</param>
/// <returns>
/// Newly created font file object, or NULL in case of failure.
/// </returns>
[SecurityCritical]
FontFile^ CreateFontFile(System::Uri^ filePathUri);
/// <summary>
/// Creates a font face object.
/// </summary>
/// <param name="filePathUri">The file path of the font face.</param>
/// <param name="faceIndex">The zero based index of a font face in cases when the font files contain a collection of font faces.
/// If the font files contain a single face, this value should be zero.</param>
/// <param name="fontSimulationFlags">Font face simulation flags for algorithmic emboldening and italicization.</param>
/// <returns>
/// Newly created font face object, or NULL in case of failure.
/// </returns>
[SecurityCritical]
FontFace^ CreateFontFace(
System::Uri^ filePathUri,
unsigned int faceIndex,
FontSimulations fontSimulationFlags
);
/// <summary>
/// Creates a font face object.
/// </summary>
/// <param name="filePathUri">The file path of the font face.</param>
/// <param name="faceIndex">The zero based index of a font face in cases when the font files contain a collection of font faces.
/// If the font files contain a single face, this value should be zero.</param>
/// <returns>
/// Newly created font face object, or NULL in case of failure.
/// </returns>
[SecurityCritical]
FontFace^ CreateFontFace(
System::Uri^ filePathUri,
unsigned int faceIndex
);
/// <summary>
/// Gets a font collection representing the set of installed fonts.
/// </summary>
/// <returns>
/// The system font collection.
/// </returns>
FontCollection^ GetSystemFontCollection();
/// <summary>
/// Gets a font collection in a custom location.
/// </summary>
/// <param name="uri">The uri of the font collection.</param>
/// <returns>
/// The font collection.
/// </returns>
[SecurityCritical]
FontCollection^ GetFontCollection(System::Uri^ uri);
/// <summary>
/// Gets a font collection representing the set of installed fonts.
/// </summary>
/// <param name="checkForUpdates">If this parameter is true, the function performs an immediate check for changes to the set of
/// installed fonts. If this parameter is FALSE, the function will still detect changes if the font cache service is running, but
/// there may be some latency. For example, an application might specify TRUE if it has itself just installed a font and wants to
/// be sure the font collection contains that font.</param>
/// <returns>
/// The system font collection.
/// </returns>
FontCollection^ GetSystemFontCollection(bool checkForUpdates);
static bool IsLocalUri(System::Uri^ uri)
{
return (uri->IsFile && uri->IsLoopback && !uri->IsUnc);
}
/// <summary>
/// Creates an IDWriteFontFile* from a URI, using either the DWrite built in local font file loader or our custom font
/// file loader implementation
/// </summary>
/// <param name="factory">The IDWriteFactory object<param>
/// <param name="fontFileLoader">Reference to our previously created and registered custom font file loader</param>
/// <param name="filePathUri">The URI</param>
/// <param name="dwriteFontFile">The newly created IDWRiteFontFile representation</param>
/// <returns>
/// Standard HRESULT error code
/// </returns>
[SecurityCritical]
static HRESULT CreateFontFile(
IDWriteFactory* factory,
FontFileLoader^ fontFileLoader,
System::Uri^ filePathUri,
__out IDWriteFontFile** dwriteFontFile
);
/// <SecurityNote>
/// This is a workaround.
/// DWRITE_MATRIX is flagged as a critical type since it uses some security critical
/// attributes from Microsoft.VisualC.dll (MiscellaneousBitsAttribute & DebugInfoInPDBAttribute)
/// This should be fixed in Microsoft.VisualC.dll.
/// </SecurityNote>
[SecuritySafeCritical]
__declspec(noinline) static DWRITE_MATRIX GetIdentityTransform()
{
DWRITE_MATRIX transform;
transform.m11=1;
transform.m12=0;
transform.m22=1;
transform.m21=0;
transform.dx =0;
transform.dy =0;
return transform;
}
TextAnalyzer^ CreateTextAnalyzer();
public:
virtual property bool IsInvalid
{
[SecuritySafeCritical]
[ReliabilityContract(Consistency::WillNotCorruptState, Cer::Success)]
bool get() override;
}
};
}}}}//MS::Internal::Text::TextInterface
#endif //__FACTORY_H

Просмотреть файл

@ -0,0 +1,21 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
#ifndef __FACTORYTYPE_H
#define __FACTORYTYPE_H
namespace MS { namespace Internal { namespace Text { namespace TextInterface
{
/// <summary>
///The type of the Factory.
/// </summary>
private enum class FactoryType
{
Shared,
Isolated
};
}}}}//MS::Internal::Text::TextInterface
#endif //__FACTORYTYPE_H

Просмотреть файл

@ -0,0 +1,398 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
#include "Font.h"
#include "FontFamily.h"
#include "DWriteTypeConverter.h"
namespace MS { namespace Internal { namespace Text { namespace TextInterface
{
enum
{
Flags_VersionInitialized = 0x0001,
Flags_IsSymbolFontInitialized = 0x0002,
Flags_IsSymbolFontValue = 0x0004,
};
/// <SecurityNote>
/// Critical - Receives a native pointer and stores it internally.
/// This whole object is wrapped around the passed in pointer
/// So this ctor assumes safety of the passed in pointer.
/// </SecurityNote>
//[SecurityCritical] – tagged in header file
Font::Font(
IDWriteFont* font
)
{
_font = gcnew NativeIUnknownWrapper<IDWriteFont>(font);
_version = System::Double::MinValue;
_flags = 0;
}
FontFace^ Font::AddFontFaceToCache()
{
FontFace^ fontFace = CreateFontFace();
FontFace^ bumpedFontFace = nullptr;
// NB: if the cache is busy, we simply return the new FontFace
// without bothering to cache it.
if (System::Threading::Interlocked::Increment(_mutex) == 1)
{
if (nullptr == _fontFaceCache)
{
_fontFaceCache = gcnew array<FontFaceCacheEntry>(_fontFaceCacheSize);
}
// Default to a slot that is not the MRU.
_fontFaceCacheMRU = (_fontFaceCacheMRU + 1) % _fontFaceCacheSize;
// Look for an empty slot.
for (int i=0; i < _fontFaceCacheSize; i++)
{
if (_fontFaceCache[i].font == nullptr)
{
_fontFaceCacheMRU = i;
break;
}
}
// Keep a reference to any discarded entry, clean it up after releasing
// the mutex.
bumpedFontFace = _fontFaceCache[_fontFaceCacheMRU].fontFace;
// Record the new entry.
_fontFaceCache[_fontFaceCacheMRU].font = this;
_fontFaceCache[_fontFaceCacheMRU].fontFace = fontFace;
fontFace->AddRef();
}
System::Threading::Interlocked::Decrement(_mutex);
// If the cache was full and we replaced an unreferenced entry, release it now.
if (bumpedFontFace != nullptr)
{
bumpedFontFace->Release();
}
return fontFace;
}
FontFace^ Font::LookupFontFaceSlow()
{
FontFace^ fontFace = nullptr;
for (int i=0; i < _fontFaceCacheSize; i++)
{
if (_fontFaceCache[i].font == this)
{
fontFace = _fontFaceCache[i].fontFace;
fontFace->AddRef();
_fontFaceCacheMRU = i;
break;
}
}
return fontFace;
}
void Font::ResetFontFaceCache()
{
array<FontFaceCacheEntry>^ fontFaceCache = nullptr;
// NB: If the cache is busy, we do nothing.
if (System::Threading::Interlocked::Increment(_mutex) == 1)
{
fontFaceCache = _fontFaceCache;
_fontFaceCache = nullptr;
}
System::Threading::Interlocked::Decrement(_mutex);
if (fontFaceCache != nullptr)
{
for (int i=0; i < _fontFaceCacheSize; i++)
{
if (fontFaceCache[i].fontFace != nullptr)
{
fontFaceCache[i].fontFace->Release();
}
}
}
}
FontFace^ Font::GetFontFace()
{
FontFace^ fontFace = nullptr;
if (System::Threading::Interlocked::Increment(_mutex) == 1)
{
if (_fontFaceCache != nullptr)
{
FontFaceCacheEntry entry;
// Try the fast path first -- is caller accessing exactly the mru entry?
if ((entry = _fontFaceCache[_fontFaceCacheMRU]).font == this)
{
entry.fontFace->AddRef();
fontFace = entry.fontFace;
}
else
{
// No luck, do a search through the cache.
fontFace = LookupFontFaceSlow();
}
}
}
System::Threading::Interlocked::Decrement(_mutex);
// If the cache was busy or did not contain this Font, create a new FontFace.
if (nullptr == fontFace)
{
fontFace = AddFontFaceToCache();
}
return fontFace;
}
/// <SecurityNote>
/// Critical - Exposes the critical member _font.
/// </SecurityNote>
[SecurityCritical]
System::IntPtr Font::DWriteFontAddRef::get()
{
_font->Value->AddRef();
return (System::IntPtr)_font->Value;
}
/// <SecurityNote>
/// Critical - Uses security critical _font pointer.
/// Safe - It does not expose the pointer it uses.
/// </SecurityNote>
[SecuritySafeCritical]
__declspec(noinline) FontFamily^ Font::Family::get()
{
IDWriteFontFamily* dwriteFontFamily;
HRESULT hr = _font->Value->GetFontFamily(
&dwriteFontFamily
);
System::GC::KeepAlive(_font);
ConvertHresultToException(hr, "FontFamily^ Font::Family::get");
return gcnew FontFamily(dwriteFontFamily);
}
/// <SecurityNote>
/// Critical - Uses security critical _font pointer.
/// Safe - It does not expose the pointer it uses.
/// </SecurityNote>
[SecuritySafeCritical]
__declspec(noinline) FontWeight Font::Weight::get()
{
DWRITE_FONT_WEIGHT dwriteFontWeight = _font->Value->GetWeight();
System::GC::KeepAlive(_font);
return DWriteTypeConverter::Convert(dwriteFontWeight);
}
/// <SecurityNote>
/// Critical - Uses security critical _font pointer.
/// Safe - It does not expose the pointer it uses.
/// </SecurityNote>
[SecuritySafeCritical]
__declspec(noinline) FontStretch Font::Stretch::get()
{
DWRITE_FONT_STRETCH dwriteFontStretch = _font->Value->GetStretch();
System::GC::KeepAlive(_font);
return DWriteTypeConverter::Convert(dwriteFontStretch);
}
/// <SecurityNote>
/// Critical - Uses security critical _font pointer.
/// Safe - It does not expose the pointer it uses.
/// </SecurityNote>
[SecuritySafeCritical]
__declspec(noinline) FontStyle Font::Style::get()
{
DWRITE_FONT_STYLE dwriteFontStyle = _font->Value->GetStyle();
System::GC::KeepAlive(_font);
return DWriteTypeConverter::Convert(dwriteFontStyle);
}
/// <SecurityNote>
/// Critical - Uses security critical _font pointer.
/// Safe - It does not expose the pointer it uses.
/// </SecurityNote>
[SecuritySafeCritical]
__declspec(noinline) bool Font::IsSymbolFont::get()
{
if ((_flags & Flags_IsSymbolFontInitialized) != Flags_IsSymbolFontInitialized)
{
BOOL isSymbolFont = _font->Value->IsSymbolFont();
System::GC::KeepAlive(_font);
_flags |= Flags_IsSymbolFontInitialized;
if (isSymbolFont)
{
_flags |= Flags_IsSymbolFontValue;
}
}
return ((_flags & Flags_IsSymbolFontValue) == Flags_IsSymbolFontValue);
}
/// <SecurityNote>
/// Critical - Uses security critical _font pointer and calls
/// Security Critical LocalizedStrings ctor.
/// Safe - It does not expose the pointer it uses.
/// </SecurityNote>
[SecuritySafeCritical]
__declspec(noinline) LocalizedStrings^ Font::FaceNames::get()
{
IDWriteLocalizedStrings* dwriteLocalizedStrings;
HRESULT hr = _font->Value->GetFaceNames(
&dwriteLocalizedStrings
);
System::GC::KeepAlive(_font);
ConvertHresultToException(hr, "LocalizedStrings^ Font::FaceNames::get");
return gcnew LocalizedStrings(dwriteLocalizedStrings);
}
/// <SecurityNote>
/// Critical - Uses security critical _font pointer.
/// Safe - It does not expose the pointer it uses.
/// </SecurityNote>
[SecuritySafeCritical]
__declspec(noinline) bool Font::GetInformationalStrings(
InformationalStringID informationalStringID,
[System::Runtime::InteropServices::Out] LocalizedStrings^% informationalStrings
)
{
IDWriteLocalizedStrings* dwriteInformationalStrings;
BOOL exists = FALSE;
HRESULT hr = _font->Value->GetInformationalStrings(
DWriteTypeConverter::Convert(informationalStringID),
&dwriteInformationalStrings,
&exists
);
System::GC::KeepAlive(_font);
ConvertHresultToException(hr, "bool Font::GetInformationalStrings");
informationalStrings = gcnew LocalizedStrings(dwriteInformationalStrings);
return (!!exists);
}
/// <SecurityNote>
/// Critical - Uses security critical _font pointer.
/// Safe - It does not expose the pointer it uses.
/// </SecurityNote>
[SecuritySafeCritical]
__declspec(noinline) FontSimulations Font::SimulationFlags::get()
{
DWRITE_FONT_SIMULATIONS dwriteFontSimulations = _font->Value->GetSimulations();
System::GC::KeepAlive(_font);
return DWriteTypeConverter::Convert(dwriteFontSimulations);
}
/// <SecurityNote>
/// Critical - Uses security critical _font pointer.
/// Safe - It does not expose the pointer it uses.
/// </SecurityNote>
[SecuritySafeCritical]
__declspec(noinline) FontMetrics^ Font::Metrics::get()
{
if (_fontMetrics == nullptr)
{
DWRITE_FONT_METRICS fontMetrics;
_font->Value->GetMetrics(
&fontMetrics
);
System::GC::KeepAlive(_font);
_fontMetrics = DWriteTypeConverter::Convert(fontMetrics);
}
return _fontMetrics;
}
/// <SecurityNote>
/// Critical - Uses security critical _font pointer.
/// Safe - It does not expose the pointer it uses.
/// </SecurityNote>
[SecuritySafeCritical]
__declspec(noinline) bool Font::HasCharacter(
UINT32 unicodeValue
)
{
BOOL exists = FALSE;
HRESULT hr = _font->Value->HasCharacter(
unicodeValue,
&exists
);
System::GC::KeepAlive(_font);
ConvertHresultToException(hr, "bool Font::HasCharacter");
return (!!exists);
}
/// <SecurityNote>
/// Critical - Uses security critical _font pointer and calls
/// security critical FontFace ctor.
/// Safe - It does not expose the pointer it uses.
/// </SecurityNote>
[SecuritySafeCritical]
__declspec(noinline) FontFace^ Font::CreateFontFace()
{
IDWriteFontFace* dwriteFontFace;
HRESULT hr = _font->Value->CreateFontFace(
&dwriteFontFace
);
System::GC::KeepAlive(_font);
ConvertHresultToException(hr, "FontFace^ Font::CreateFontFace");
return gcnew FontFace(dwriteFontFace);
}
double Font::Version::get()
{
if ((_flags & Flags_VersionInitialized) != Flags_VersionInitialized)
{
LocalizedStrings^ versionNumbers;
double version = 0.0;
if (GetInformationalStrings(InformationalStringID::VersionStrings, versionNumbers))
{
String^ versionString = versionNumbers->GetString(0);
// The following logic assumes that the version string is always formatted in this way: "Version X.XX"
if(versionString->Length > 1)
{
versionString = versionString->Substring(versionString->LastIndexOf(' ') + 1);
if (!System::Double::TryParse(versionString, System::Globalization::NumberStyles::Float, System::Globalization::CultureInfo::InvariantCulture, version))
{
version = 0.0;
}
}
}
_flags |= Flags_VersionInitialized;
_version = version;
}
return _version;
}
/// <SecurityNote>
/// Critical - Uses security critical _font pointer.
/// Safe - It does not expose the pointer it uses.
/// </SecurityNote>
[SecuritySafeCritical]
__declspec(noinline) FontMetrics^ Font::DisplayMetrics(FLOAT emSize, FLOAT pixelsPerDip)
{
DWRITE_FONT_METRICS fontMetrics;
IDWriteFontFace* fontFace = NULL;
HRESULT hr = _font->Value->CreateFontFace(&fontFace);
ConvertHresultToException(hr, "FontMetrics^ Font::DisplayMetrics");
DWRITE_MATRIX transform = Factory::GetIdentityTransform();
hr = fontFace->GetGdiCompatibleMetrics(
emSize,
pixelsPerDip,
&transform,
&fontMetrics
);
if (fontFace != NULL)
{
fontFace->Release();
}
ConvertHresultToException(hr, "FontMetrics^ Font::DisplayMetrics");
System::GC::KeepAlive(_font);
return DWriteTypeConverter::Convert(fontMetrics);
}
}}}}//MS::Internal::Text::TextInterface

Просмотреть файл

@ -0,0 +1,255 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
#ifndef __FONT_H
#define __FONT_H
#include "Common.h"
#include "FontWeight.h"
#include "FontStyle.h"
#include "FontMetrics.h"
#include "FontStretch.h"
#include "FontSimulation.h"
#include "LocalizedStrings.h"
#include "InformationalStringID.h"
#include "FontFace.h"
#include "NativePointerWrapper.h"
namespace MS { namespace Internal { namespace Text { namespace TextInterface
{
/*******************************************************************************************************************************/
//Forward declaration of FontFamily since there was a circular reference between "Font" & "FontFamily"
ref class FontFamily;
/*******************************************************************************************************************************/
/// <summary>
/// Represents a physical font in a font collection.
/// </summary>
private ref class Font sealed
{
private:
/// <summary>
/// An entry in the _fontFaceCache array, maps Font to FontFace.
/// </summary>
value struct FontFaceCacheEntry
{
Font^ font;
FontFace^ fontFace;
};
/// <summary>
/// The DWrite font object that this class wraps.
/// </summary>
/// <SecurityNote>
/// Critical - native pointer.
/// </SecurityNote>
[SecurityCritical]
NativeIUnknownWrapper<IDWriteFont>^ _font;
/// <summary>
/// The font's version number.
/// </summary>
double _version;
/// <summary>
/// FontMetrics for this font. Lazily allocated.
/// </summary>
FontMetrics^ _fontMetrics;
/// <summary>
/// Flags reflecting the state of the object.
/// </summary>
int _flags;
/// <summary>
/// Mutex used to control access to _fontFaceCache, which is locked when
/// _mutex > 0.
/// </summary>
static int _mutex;
/// <summary>
/// Size of the _fontFaceCache, maximum number of FontFace instances cached.
/// </summary>
/// <remarks>
/// Cache size could be based upon measurements of the TextFormatter micro benchmarks.
/// English test cases allocate 1 - 3 FontFace instances, at the opposite extreme
/// the Korean test maxes out at 13. 16 looks like a reasonable cache size.
///
/// However, dwrite circa win7 has an issue aggressively consuming address space and
/// therefore we need to be conservative holding on to font references.
///
static const int _fontFaceCacheSize = 4;
/// <summary>
/// Cached FontFace instances.
/// </summary>
static array<FontFaceCacheEntry>^ _fontFaceCache;
/// <summary>
/// Most recently used element in the FontFace cache.
/// </summary>
static int _fontFaceCacheMRU;
/// <summary>
/// Adds a new FontFace to the cache, discarding an older entry if necessary.
/// </summary>
FontFace^ AddFontFaceToCache();
/// <summary>
/// Does a linear search through the FontFace cache, looking for a match for the current Font.
/// </summary>
FontFace^ LookupFontFaceSlow();
/// <summary>
/// Creates a font face object for the font.
/// </summary>
/// <returns>The newly created font face object.</returns>
FontFace^ CreateFontFace();
internal:
/// <summary>
/// Contructs a Font object.
/// </summary>
/// <param name="font">The DWrite font object that this class wraps.</param>
/// <SecurityNote>
/// Critical - Receives a native pointer and stores it internally.
/// This whole object is wrapped around the passed in pointer
/// So this ctor assumes safety of the passed in pointer.
/// </SecurityNote>
[SecurityCritical]
Font(
IDWriteFont* font
);
/// <summary>
/// Gets the pointer to the DWrite Font object.
/// </summary>
property System::IntPtr DWriteFontAddRef
{
[SecurityCritical]
System::IntPtr get();
}
/// <summary>
/// Gets the FontFamily that this Font belongs to.
/// </summary>
property FontFamily^ Family
{
FontFamily^ get();
}
/// <summary>
/// Gets the weight of the font.
/// </summary>
property FontWeight Weight
{
FontWeight get();
}
/// <summary>
/// Gets the stretch of the font.
/// </summary>
property FontStretch Stretch
{
FontStretch get();
}
/// <summary>
/// Gets the style of the font.
/// </summary>
property FontStyle Style
{
FontStyle get();
}
/// <summary>
/// Returns whether this is a symbol font.
/// </summary>
property bool IsSymbolFont
{
bool get();
}
/// <summary>
/// Gets a localized strings collection containing the face names for the font (e.g., Regular or Bold), indexed by locale name.
/// </summary>
property LocalizedStrings^ FaceNames
{
LocalizedStrings^ get();
}
/// <summary>
/// Gets the simulation flags.
/// </summary>
property FontSimulations SimulationFlags
{
FontSimulations get();
}
/// <summary>
/// Gets the font metrics.
/// </summary>
property FontMetrics^ Metrics
{
FontMetrics^ get();
}
/// <summary>
/// Gets the version of the font.
/// </summary>
property double Version
{
double get();
}
/// <summary>
/// Gets the font metrics for display device.
/// </summary>
FontMetrics^ DisplayMetrics(FLOAT emSize, FLOAT pixelsPerDip);
/// <summary>
/// Clears the FontFace cache, releasing all native resources.
/// </summary>
/// <remarks>
/// This method does not guarantee that the cache will be cleared.
/// If the cache is busy, nothing happens.
/// </remarks>
static void ResetFontFaceCache();
/// <summary>
/// Returns a FontFace matching this Font.
/// </summary>
/// <remarks>
/// Caller must use FontFace::Release to free native resources allocated by the FontFace.
/// While FontFace does have a finalizer, it is not hard to exhaust available address space
/// by enumerating all installed FontFaces synchronously, before the gc has a chance to
/// kick off finalization.
/// </remarks>
FontFace^ GetFontFace();
/// <summary>
/// Gets a localized strings collection containing the specified informational strings, indexed by locale name.
/// </summary>
/// <param name="informationalStringID">Identifies the string to get.</param>
/// <param name="informationalStrings">Receives the newly created localized strings object.</param>
/// <returns>Whether the requested string was found or not.</returns>
bool GetInformationalStrings(
InformationalStringID informationalStringID,
[System::Runtime::InteropServices::Out] LocalizedStrings^% informationalStrings
);
/// <summary>
/// Determines whether the font supports the specified character.
/// </summary>
/// <param name="unicodeValue">Unicode (UCS-4) character value.</param>
/// <returns>TRUE if the font supports the specified character or FALSE if not.</returns>
bool HasCharacter(
UINT32 unicodeValue
);
};
}}}}//MS::Internal::Text::TextInterface
#endif //__FONT_H

Просмотреть файл

@ -0,0 +1,115 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
#include "FontCollection.h"
#include <wpfvcclr.h>
namespace MS { namespace Internal { namespace Text { namespace TextInterface
{
/// <SecurityNote>
/// Critical - Receives a native pointer and stores it internally.
/// This whole object is wrapped around the passed in pointer
/// So this ctor assumes safety of the passed in pointer.
/// </SecurityNote>
//[SecurityCritical] – tagged in header file
FontCollection::FontCollection(IDWriteFontCollection* fontCollection)
{
_fontCollection = gcnew NativeIUnknownWrapper<IDWriteFontCollection>(fontCollection);
}
/// <SecurityNote>
/// Critical - Uses security critical member _fontCollection.
/// - Calls security critical Util::GetPtrToStringChars.
/// Safe - Does not expose any security critical info.
/// </SecurityNote>
[SecuritySafeCritical]
__declspec(noinline) bool FontCollection::FindFamilyName(
System::String^ familyName,
[System::Runtime::InteropServices::Out] unsigned int% index
)
{
pin_ptr<const WCHAR> familyNameWchar = Native::Util::GetPtrToStringChars(familyName);
BOOL exists = FALSE;
UINT32 familyIndex = 0;
HRESULT hr = _fontCollection->Value->FindFamilyName(
familyNameWchar,
&familyIndex,
&exists
);
System::GC::KeepAlive(_fontCollection);
//This is a MACRO
ConvertHresultToException(hr, "bool FontCollection::FindFamilyName");
index = familyIndex;
return (!!exists);
}
/// <SecurityNote>
/// Critical - Uses security critical member _fontCollection and fontFace->DWriteFontFace.
/// Safe - It does not expose the pointer it uses.
/// </SecurityNote>
[SecuritySafeCritical]
__declspec(noinline) Font^ FontCollection::GetFontFromFontFace(FontFace^ fontFace)
{
IDWriteFontFace* dwriteFontFace = fontFace->DWriteFontFaceNoAddRef;
IDWriteFont* dwriteFont = NULL;
HRESULT hr = _fontCollection->Value->GetFontFromFontFace(
dwriteFontFace,
&dwriteFont
);
System::GC::KeepAlive(fontFace);
System::GC::KeepAlive(_fontCollection);
if (DWRITE_E_NOFONT == hr)
{
return nullptr;
}
ConvertHresultToException(hr, "Font^ FontCollection::GetFontFromFontFace");
return gcnew Font(dwriteFont);
}
/// <SecurityNote>
/// Critical - Uses security critical member _fontCollection and calls security critical ctor FontFamily.
/// Safe - It does not expose the pointer it uses.
/// </SecurityNote>
[SecuritySafeCritical]
__declspec(noinline) FontFamily^ FontCollection::default::get(unsigned int familyIndex)
{
IDWriteFontFamily* dwriteFontFamily = NULL;
HRESULT hr = _fontCollection->Value->GetFontFamily(
familyIndex,
&dwriteFontFamily
);
System::GC::KeepAlive(_fontCollection);
ConvertHresultToException(hr, "FontFamily^ FontCollection::default::get");
return gcnew FontFamily(dwriteFontFamily);
}
FontFamily^ FontCollection::default::get(System::String^ familyName)
{
unsigned int index;
bool exists = this->FindFamilyName(
familyName,
index
);
if (exists)
{
return this[index];
}
return nullptr;
}
/// <SecurityNote>
/// Critical - Uses security critical member _fontCollection.
/// Safe - It does not expose the pointer it uses.
/// </SecurityNote>
[SecuritySafeCritical]
__declspec(noinline) unsigned int FontCollection::FamilyCount::get()
{
UINT32 familyCount = _fontCollection->Value->GetFontFamilyCount();
System::GC::KeepAlive(_fontCollection);
return familyCount;
}
}}}}//MS::Internal::Text::TextInterface

Просмотреть файл

@ -0,0 +1,94 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
#ifndef __FONTCOLLECTION_H
#define __FONTCOLLECTION_H
#include "Common.h"
#include "FontFamily.h"
#include "Font.h"
#include "FontFace.h"
#include "NativePointerWrapper.h"
using namespace MS::Internal::Text::TextInterface::Generics;
namespace MS { namespace Internal { namespace Text { namespace TextInterface
{
/// <summary>
/// The FontCollection encapsulates a collection of fonts.
/// </summary>
private ref class FontCollection sealed
{
private:
/// <summary>
/// The DWrite font collection.
/// </summary>
/// <SecurityNote>
/// Critical - native pointer.
/// </SecurityNote>
[SecurityCritical]
NativeIUnknownWrapper<IDWriteFontCollection>^ _fontCollection;
internal:
/// <summary>
/// Contructs a FontCollection object.
/// </summary>
/// <param name="fontCollection">The DWrite font collection object that this class wraps.</param>
/// <SecurityNote>
/// Critical - Receives a native pointer and stores it internally.
/// This whole object is wrapped around the passed in pointer
/// So this ctor assumes safety of the passed in pointer.
/// </SecurityNote>
[SecurityCritical]
FontCollection(IDWriteFontCollection* fontCollection);
/// <summary>
/// Gets the number of families in this font collection.
/// </summary>
property unsigned int FamilyCount
{
unsigned int get();
}
/// <summary>
/// Gets a font family by index.
/// </summary>
property FontFamily^ default[unsigned int]
{
FontFamily^ get(unsigned int familyIndex);
}
/// <summary>
/// Gets a font family by name.
/// </summary>
property FontFamily^ default[System::String^]
{
FontFamily^ get(System::String^ familyName);
}
/// <summary>
/// Finds the font family with the specified family name.
/// </summary>
/// <param name="familyName">Name of the font family. The name is not case-sensitive but must otherwise exactly match a family name in the collection.</param>
/// <param name="index">Receives the zero-based index of the matching font family if the family name was found or UINT_MAX otherwise.</param>
/// <returns>TRUE if the family name exists or FALSE otherwise.</returns>
bool FindFamilyName(
System::String^ familyName,
[System::Runtime::InteropServices::Out] unsigned int% index
);
/// <summary>
/// Gets the font object that corresponds to the same physical font as the specified font face object. The specified physical font must belong
/// to the font collection.
/// </summary>
/// <param name="fontFace">Font face object that specifies the physical font.</param>
/// <returns>The newly created font object if successful or NULL otherwise.</returns>
Font^ GetFontFromFontFace(FontFace^ fontFace);
};
}}}}//MS::Internal::Text::TextInterface
#endif //__FONTCOLLECTION_H

Просмотреть файл

@ -0,0 +1,70 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
#include "FontCollectionLoader.h"
namespace MS { namespace Internal { namespace Text { namespace TextInterface
{
FontCollectionLoader::FontCollectionLoader(
IFontSourceCollectionFactory^ fontSourceCollectionFactory,
FontFileLoader^ fontFileLoader
)
{
_fontSourceCollectionFactory = fontSourceCollectionFactory;
_fontFileLoader = fontFileLoader;
}
/// <SecurityNote>
/// Critical - Receives and returns native pointers.
/// - Asserts unmanaged code permissions to call Marshal.* However the call to Marshal is safe
/// because it is called with trusted inputs.
/// </SecurityNote>
[ComVisible(true)]
[SecurityCritical]
[SecurityPermission(SecurityAction::Assert, UnmanagedCode=true)]
HRESULT FontCollectionLoader::CreateEnumeratorFromKey(
IntPtr factory,
__in_bcount(collectionKeySize) void const* collectionKey,
UINT32 collectionKeySize,
__out IntPtr* fontFileEnumerator
)
{
UINT32 numberOfCharacters = collectionKeySize / sizeof(WCHAR);
if ( (fontFileEnumerator == NULL)
|| (collectionKeySize % sizeof(WCHAR) != 0) // The collectionKeySize must be divisible by sizeof(WCHAR)
|| (numberOfCharacters <= 1) // The collectionKey cannot be less than or equal 1 character as it has to contain the NULL character.
|| (((WCHAR*)collectionKey)[numberOfCharacters - 1] != '\0')) // The collectionKey must end with the NULL character
{
return E_INVALIDARG;
}
*fontFileEnumerator = IntPtr::Zero;
String^ uriString = gcnew String((WCHAR*)collectionKey);
HRESULT hr = S_OK;
try
{
IFontSourceCollection^ fontSourceCollection = _fontSourceCollectionFactory->Create(uriString);
FontFileEnumerator^ fontFileEnum = gcnew FontFileEnumerator(
fontSourceCollection,
_fontFileLoader,
(IDWriteFactory *)factory.ToPointer()
);
IntPtr pIDWriteFontFileEnumeratorMirror = Marshal::GetComInterfaceForObject(
fontFileEnum,
IDWriteFontFileEnumeratorMirror::typeid);
*fontFileEnumerator = pIDWriteFontFileEnumeratorMirror;
}
catch(System::Exception^ exception)
{
hr = System::Runtime::InteropServices::Marshal::GetHRForException(exception);
}
return hr;
}
}}}}//MS::Internal::Text::TextInterface

Просмотреть файл

@ -0,0 +1,58 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
#ifndef __FONTCOLLECTIONLOADER_H
#define __FONTCOLLECTIONLOADER_H
#include "IFontSourceCollection.h"
#include "FontFileEnumerator.h"
#include "Common.h"
#include "DWriteInterfaces.h"
using namespace System;
using namespace System::Diagnostics;
namespace MS { namespace Internal { namespace Text { namespace TextInterface
{
[ClassInterface(ClassInterfaceType::None), ComVisible(true)]
[System::Security::SecurityCritical(System::Security::SecurityCriticalScope::Everything)]
private ref class FontCollectionLoader : public IDWriteFontCollectionLoaderMirror
{
private:
IFontSourceCollectionFactory^ _fontSourceCollectionFactory;
FontFileLoader^ _fontFileLoader;
public:
FontCollectionLoader() { Debug::Assert(false); }
FontCollectionLoader(
IFontSourceCollectionFactory^ fontSourceCollectionFactory,
FontFileLoader^ fontFileLoader
);
/// <summary>
/// Creates a font file enumerator object that encapsulates a collection of font files.
/// The font system calls back to this interface to create a font collection.
/// </summary>
/// <param name="collectionKey">Font collection key that uniquely identifies the collection of font files within
/// the scope of the font collection loader being used.</param>
/// <param name="collectionKeySize">Size of the font collection key in bytes.</param>
/// <param name="fontFileEnumerator">Pointer to the newly created font file enumerator.</param>
/// <returns>
/// Standard HRESULT error code.
/// </returns>
[ComVisible(true)]
[SecurityCritical]
virtual HRESULT CreateEnumeratorFromKey(
IntPtr factory,
__in_bcount(collectionKeySize) void const* collectionKey,
UINT32 collectionKeySize,
__out IntPtr* fontFileEnumerator
);
};
}}}}//MS::Internal::Text::TextInterface
#endif //__FONTCOLLECTIONLOADER_H

Просмотреть файл

@ -0,0 +1,343 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
#include "FontFace.h"
#include "Factory.h"
#include "DWriteTypeConverter.h"
namespace MS { namespace Internal { namespace Text { namespace TextInterface
{
/// <SecurityNote>
/// Critical - Receives a native pointer and stores it internally.
/// This whole object is wrapped around the passed in pointer
/// So this ctor assumes safety of the passed in pointer.
/// </SecurityNote>
//[SecurityCritical] – tagged in header file
FontFace::FontFace(IDWriteFontFace* fontFace)
{
_fontFace = gcnew NativeIUnknownWrapper<IDWriteFontFace>(fontFace);
}
/// <SecurityNote>
/// Critical - Manipulates security critical member _fontCollection.
/// Safe - Just releases the interface.
/// </SecurityNote>
//[SecuritySafeCritical]
__declspec(noinline) FontFace::~FontFace()
{
if (_fontFace != nullptr)
{
delete _fontFace;
_fontFace = nullptr;
}
}
/// WARNING: AFTER GETTING THIS NATIVE POINTER YOU ARE RESPONSIBLE FOR MAKING SURE THAT THE WRAPPING MANAGED
/// OBJECT IS KEPT ALIVE BY THE GC OR ELSE YOU ARE RISKING THE POINTER GETTING RELEASED BEFORE YOU'D
/// WANT TO.
///
/// <SecurityNote>
/// Critical - Exposes the native pointer that this object wraps.
/// </SecurityNote>
[SecurityCritical]
IDWriteFontFace* FontFace::DWriteFontFaceNoAddRef::get()
{
return _fontFace->Value;
}
/// <SecurityNote>
/// Critical - Exposes the native pointer that this object wraps.
/// </SecurityNote>
[SecurityCritical]
System::IntPtr FontFace::DWriteFontFaceAddRef::get()
{
_fontFace->Value->AddRef();
return (System::IntPtr)_fontFace->Value;
}
/// <SecurityNote>
/// Critical - Uses security critical member _fontFace.
/// Safe - It does not expose the pointer it uses.
/// </SecurityNote>
[SecuritySafeCritical]
__declspec(noinline) FontFaceType FontFace::Type::get()
{
DWRITE_FONT_FACE_TYPE dwriteFontFaceType = _fontFace->Value->GetType();
System::GC::KeepAlive(_fontFace);
return DWriteTypeConverter::Convert(dwriteFontFaceType);
}
/// <SecurityNote>
/// Critical - Uses security critical member _fontFace.
/// Safe - It does not expose the pointer it uses.
/// </SecurityNote>
[SecuritySafeCritical]
__declspec(noinline) FontFile^ FontFace::GetFileZero()
{
unsigned int numberOfFiles = 0;
IDWriteFontFile* pfirstDWriteFontFile = NULL;
IDWriteFontFile** ppDWriteFontFiles = NULL;
// This first call is to retrieve the numberOfFiles.
HRESULT hr = _fontFace->Value->GetFiles(
&numberOfFiles,
NULL
);
ConvertHresultToException(hr, "array<FontFile^>^ FontFace::Files::get");
if (numberOfFiles > 0)
{
ppDWriteFontFiles = new IDWriteFontFile*[numberOfFiles];
try
{
hr = _fontFace->Value->GetFiles(
&numberOfFiles,
ppDWriteFontFiles
);
ConvertHresultToException(hr, "array<FontFile^>^ FontFace::Files::get");
pfirstDWriteFontFile = ppDWriteFontFiles[0];
for(unsigned int i = 1; i < numberOfFiles; ++i)
{
ppDWriteFontFiles[i]->Release();
ppDWriteFontFiles[i] = NULL;
}
}
finally
{
delete[] ppDWriteFontFiles;
}
}
System::GC::KeepAlive(_fontFace);
return (numberOfFiles > 0) ? gcnew FontFile(pfirstDWriteFontFile) : nullptr;
}
/// <SecurityNote>
/// Critical - Uses security critical member _fontFace.
/// Safe - It does not expose the pointer it uses.
/// </SecurityNote>
[SecuritySafeCritical]
__declspec(noinline) unsigned int FontFace::Index::get()
{
unsigned int index = _fontFace->Value->GetIndex();
System::GC::KeepAlive(_fontFace);
return index;
}
/// <SecurityNote>
/// Critical - Uses security critical member _fontFace.
/// Safe - It does not expose the pointer it uses.
/// </SecurityNote>
[SecuritySafeCritical]
__declspec(noinline) FontSimulations FontFace::SimulationFlags::get()
{
DWRITE_FONT_SIMULATIONS dwriteFontSimulations = _fontFace->Value->GetSimulations();
System::GC::KeepAlive(_fontFace);
return DWriteTypeConverter::Convert(dwriteFontSimulations);
}
/// <SecurityNote>
/// Critical - Uses security critical member _fontFace.
/// Safe - It does not expose the pointer it uses.
/// </SecurityNote>
[SecuritySafeCritical]
__declspec(noinline) bool FontFace::IsSymbolFont::get()
{
BOOL isSymbolFont = _fontFace->Value->IsSymbolFont();
System::GC::KeepAlive(_fontFace);
return (!!isSymbolFont);
}
/// <SecurityNote>
/// Critical - Uses security critical member _fontFace.
/// Safe - It does not expose the pointer it uses.
/// </SecurityNote>
[SecuritySafeCritical]
__declspec(noinline) FontMetrics^ FontFace::Metrics::get()
{
if (_fontMetrics == nullptr)
{
DWRITE_FONT_METRICS fontMetrics;
_fontFace->Value->GetMetrics(
&fontMetrics
);
System::GC::KeepAlive(_fontFace);
_fontMetrics = DWriteTypeConverter::Convert(fontMetrics);
}
return _fontMetrics;
}
/// <SecurityNote>
/// Critical - Uses security critical member _fontFace.
/// Safe - It does not expose the pointer it uses.
/// </SecurityNote>
[SecuritySafeCritical]
__declspec(noinline) UINT16 FontFace::GlyphCount::get()
{
UINT16 glyphCount = _fontFace->Value->GetGlyphCount();
System::GC::KeepAlive(_fontFace);
return glyphCount;
}
/// <SecurityNote>
/// Critical - Uses security critical member _fontFace.
/// Receives a native pointer as an argument.
/// Exposes a native pointer to the caller.
/// </SecurityNote>
[SecurityCritical]
void FontFace::GetDesignGlyphMetrics(
__in_ecount(glyphCount) const UINT16 *pGlyphIndices,
UINT32 glyphCount,
__out_ecount(glyphCount) GlyphMetrics *pGlyphMetrics
)
{
HRESULT hr = _fontFace->Value->GetDesignGlyphMetrics(
pGlyphIndices,
glyphCount,
reinterpret_cast<DWRITE_GLYPH_METRICS *>(pGlyphMetrics)
);
System::GC::KeepAlive(_fontFace);
ConvertHresultToException(hr, "array<GlyphMetrics^>^ FontFace::GetDesignGlyphMetrics");
}
/// <SecurityNote>
/// Critical - Uses security critical member _fontFace.
/// Receives a native pointer as an argument.
/// Exposes a native pointer to the caller.
/// </SecurityNote>
[SecurityCritical]
void FontFace::GetDisplayGlyphMetrics(
__in_ecount(glyphCount) const UINT16 *pGlyphIndices,
UINT32 glyphCount,
__out_ecount(glyphCount) GlyphMetrics *pGlyphMetrics,
FLOAT emSize,
bool useDisplayNatural,
bool isSideways,
float pixelsPerDip
)
{
HRESULT hr = _fontFace->Value->GetGdiCompatibleGlyphMetrics(
emSize,
pixelsPerDip, //FLOAT pixelsPerDip,
NULL,
useDisplayNatural, //BOOL useGdiNatural,
pGlyphIndices,//__in_ecount(glyphCount) UINT16 const* glyphIndices,
glyphCount, //UINT32 glyphCount,
reinterpret_cast<DWRITE_GLYPH_METRICS *>(pGlyphMetrics), //__out_ecount(glyphCount) DWRITE_GLYPH_METRICS* glyphMetrics
isSideways //BOOL isSideways,
);
System::GC::KeepAlive(_fontFace);
ConvertHresultToException(hr, "array<GlyphMetrics^>^ FontFace::GetDesignGlyphMetrics");
}
/// <SecurityNote>
/// Critical - Uses security critical member _fontFace.
/// Receives a native pointer as an argument.
/// Exposes a native pointer to the caller.
/// </SecurityNote>
[SecurityCritical]
void FontFace::GetArrayOfGlyphIndices(
__in_ecount(glyphCount) const UINT32* pCodePoints,
UINT32 glyphCount,
__out_ecount(glyphCount) UINT16* pGlyphIndices
)
{
const pin_ptr<const UINT32> pCodePointsPinned = pCodePoints;
pin_ptr<UINT16> pGlyphIndicesPinned = pGlyphIndices;
HRESULT hr = _fontFace->Value->GetGlyphIndices(pCodePointsPinned,
glyphCount,
pGlyphIndicesPinned
);
System::GC::KeepAlive(_fontFace);
ConvertHresultToException(hr, "array<UINT16>^ FontFace::GetArrayOfGlyphIndices");
}
/// <SecurityNote>
/// Critical - Exposes the data from a font.
/// </SecurityNote>
[SecurityCritical]
__declspec(noinline) bool FontFace::TryGetFontTable(
OpenTypeTableTag openTypeTableTag,
[System::Runtime::InteropServices::Out] array<byte>^% tableData
)
{
void* tableDataDWrite;
void* tableContext;
UINT32 tableSizeDWrite = 0;
BOOL exists = FALSE;
tableData = nullptr;
HRESULT hr = _fontFace->Value->TryGetFontTable(
(UINT32)openTypeTableTag,
(const void**)&tableDataDWrite,
&tableSizeDWrite,
&tableContext,
&exists
);
ConvertHresultToException(hr, "bool FontFace::TryGetFontTable");
if (exists)
{
tableData = gcnew array<byte>(tableSizeDWrite);
for(unsigned int i = 0; i < tableSizeDWrite; ++i)
{
tableData[i] = ((byte*)tableDataDWrite)[i];
}
_fontFace->Value->ReleaseFontTable(
tableContext
);
}
System::GC::KeepAlive(_fontFace);
return (!!exists);
}
/// <SecurityNote>
/// Critical - Uses security critical member _fontFace.
/// Safe - It does not expose the pointer it uses.
/// </SecurityNote>
[SecuritySafeCritical]
__declspec(noinline) bool FontFace::ReadFontEmbeddingRights([System::Runtime::InteropServices::Out] unsigned short% fsType)
{
void* os2Table;
void* tableContext;
UINT32 tableSizeDWrite = 0;
BOOL exists = FALSE;
fsType = 0;
HRESULT hr = _fontFace->Value->TryGetFontTable(
(UINT32)DWRITE_MAKE_OPENTYPE_TAG('O','S','/','2'),
(const void**)&os2Table,
&tableSizeDWrite,
&tableContext,
&exists
);
ConvertHresultToException(hr, "bool FontFace::ReadFontEmbeddingRights");
const int OFFSET_OS2_fsType = 8;
bool success = false;
if (exists)
{
if (tableSizeDWrite >= OFFSET_OS2_fsType + 1)
{
byte *readBuffer = (byte *)os2Table + OFFSET_OS2_fsType;
fsType = (unsigned short)((readBuffer[0] << 8) + readBuffer[1]);
success = true;
}
_fontFace->Value->ReleaseFontTable(tableContext);
}
System::GC::KeepAlive(_fontFace);
return success;
}
}}}}//MS::Internal::Text::TextInterface

Просмотреть файл

@ -0,0 +1,245 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
#ifndef __FONTFACE_H
#define __FONTFACE_H
#include "Common.h"
#include "FontFaceType.h"
#include "FontSimulation.h"
#include "FontFile.h"
#include "FontWeight.h"
#include "FontStyle.h"
#include "FontStretch.h"
#include "FontMetrics.h"
#include "GlyphMetrics.h"
#include "DWriteMatrix.h"
#include "OpenTypeTableTag.h"
#include "NativePointerWrapper.h"
using namespace MS::Internal::Text::TextInterface::Generics;
namespace MS { namespace Internal { namespace Text { namespace TextInterface
{
/// <summary>
/// An absolute reference to a font face.
/// It contains font face type, appropriate file references and face identification data.
/// Various font data such as metrics, names and glyph outlines is obtained from FontFace.
/// </summary>
private ref class FontFace sealed
{
private:
/// <summary>
/// The DWrite font face object.
/// </summary>
/// <SecurityNote>
/// Critical - native pointer.
/// </SecurityNote>
[SecurityCritical]
NativeIUnknownWrapper<IDWriteFontFace>^ _fontFace;
/// <summary>
/// FontMetrics for this font. Lazily allocated.
/// </summary>
FontMetrics^ _fontMetrics;
/// <summary>
/// Reference count.
/// </summary>
/// <remarks>
/// FontFace instances are ref counted to manage the lifetime of associated native
/// resources.
/// </remarks>
int _refCount;
internal:
/// <summary>
/// Constructs a font face object.
/// </summary>
/// <param name="fontFace">A pointer to the DWrite font face object.</param>
/// <SecurityNote>
/// Critical - Receives a native pointer and stores it internally.
/// This whole object is wrapped around the passed in pointer
/// So this ctor assumes safety of the passed in pointer.
/// </SecurityNote>
[SecurityCritical]
FontFace(IDWriteFontFace* fontFace);
/// <summary>
/// Gets the pointer to the DWrite Font Face object.
///
/// WARNING: AFTER GETTING THIS NATIVE POINTER YOU ARE RESPONSIBLE FOR MAKING SURE THAT THE WRAPPING MANAGED
/// OBJECT IS KEPT ALIVE BY THE GC OR ELSE YOU ARE RISKING THE POINTER GETTING RELEASED BEFORE YOU'D
/// WANT TO
/// </summary>
property IDWriteFontFace* DWriteFontFaceNoAddRef
{
[SecurityCritical]
IDWriteFontFace* get();
}
/// <summary>
/// Gets the pointer to the DWrite Font Face object.
/// </summary>
property System::IntPtr DWriteFontFaceAddRef
{
[SecurityCritical]
System::IntPtr get();
}
/// <summary>
/// Gets the file format type of a font face.
/// </summary>
property FontFaceType Type
{
FontFaceType get();
}
/// <summary>
/// Gets the index of a font face in the context of its font files.
/// </summary>
property unsigned int Index
{
unsigned int get();
}
/// <summary>
/// Gets the algorithmic style simulation flags of a font face.
/// </summary>
property FontSimulations SimulationFlags
{
FontSimulations get();
}
/// <summary>
/// Gets whether the font is a symbol font.
/// </summary>
property bool IsSymbolFont
{
bool get();
}
/// <summary>
/// Gets design units and common metrics for the font face.
/// These metrics are applicable to all the glyphs within a fontface and are used by applications for layout calculations.
/// </summary>
property FontMetrics^ Metrics
{
FontMetrics^ get();
}
/// <summary>
/// Gets the number of glyphs in the font face.
/// </summary>
property UINT16 GlyphCount
{
UINT16 get();
}
/// <summary>
/// Gets the first font file representing the font face.
/// </summary>
FontFile^ GetFileZero();
/// <summary>
/// Increments the reference count on this FontFace.
/// </summary>
void AddRef()
{
System::Threading::Interlocked::Increment(_refCount);
}
/// <summary>
/// Decrements the reference count on this FontFace.
/// </summary>
void Release()
{
if (-1 == System::Threading::Interlocked::Decrement(_refCount))
{
// At this point we know the FontFace is eligable for the finalizer queue.
// However, because native dwrite font faces consume enormous amounts of
// address space, we need to be aggressive about disposing immediately.
// If we rely solely on the GC finalizer, we will exhaust available address
// space in reasonable scenarios like enumerating all installed fonts.
delete this;
}
}
/// <summary>
/// Obtains ideal glyph metrics in font design units. Design glyphs metrics are used for glyph positioning.
/// </summary>
/// <param name="glyphIndices">An array of glyph indices to compute the metrics for.</param>
/// <param name="pGlyphMetrics">Unsafe pointer to flat array of GlyphMetrics structs for output. Passed as
/// unsafe to allow optimization by the caller of stack or heap allocation.
/// The metrics returned are in font design units</param>
[SecurityCritical]
void GetDesignGlyphMetrics(
__in_ecount(glyphCount) const UINT16 *pGlyphIndices,
UINT32 glyphCount,
__out_ecount(glyphCount) GlyphMetrics *pGlyphMetrics
);
[SecurityCritical]
void GetDisplayGlyphMetrics(
__in_ecount(glyphCount) const UINT16 *pGlyphIndices,
UINT32 glyphCount,
__out_ecount(glyphCount) GlyphMetrics *pGlyphMetrics,
FLOAT emSize,
bool useDisplayNatural,
bool isSideways,
float pixelsPerDip
);
/// <summary>
/// Returns the nominal mapping of UCS4 Unicode code points to glyph indices as defined by the font 'CMAP' table.
/// Note that this mapping is primarily provided for line layout engines built on top of the physical font API.
/// Because of OpenType glyph substitution and line layout character substitution, the nominal conversion does not always correspond
/// to how a Unicode string will map to glyph indices when rendering using a particular font face.
/// Also, note that Unicode Variant Selectors provide for alternate mappings for character to glyph.
/// This call will always return the default variant.
/// </summary>
/// <param name="codePoints">An array of USC4 code points to obtain nominal glyph indices from.</param>
/// <returns>Array of nominal glyph indices filled by this function.</returns>
// "GetGlyphIndices" is defined in WinGDI.h to be "GetGlyphIndicesW" that why we chose
// "GetArrayOfGlyphIndices"
[SecurityCritical]
void GetArrayOfGlyphIndices(
__in_ecount(glyphCount) const UINT32* pCodePoints,
UINT32 glyphCount,
__out_ecount(glyphCount) UINT16* pGlyphIndices
);
/// <summary>
/// Finds the specified OpenType font table if it exists and returns a pointer to it.
/// </summary>
/// <param name="openTypeTableTag">The tag of table to find.</param>
/// <param name="tableData">The table.</param>
/// <returns>True if table exists.</returns>
[SecurityCritical]
bool TryGetFontTable(
OpenTypeTableTag openTypeTableTag,
[System::Runtime::InteropServices::Out] array<byte>^% tableData
);
/// <summary>
/// Reads the FontEmbeddingRights
/// </summary>
/// <param name="tableData">The font embedding rights value.</param>
/// <returns>True if os2 table exists and the FontEmbeddingRights was read successfully.</returns>
bool ReadFontEmbeddingRights([System::Runtime::InteropServices::Out] unsigned short% fsType);
/// <summary>
/// dtor.
/// </summary>
[SecuritySafeCritical]
~FontFace();
};
}}}}//MS::Internal::Text::TextInterface
#endif //__FONTFACE_H

Просмотреть файл

@ -0,0 +1,55 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
#ifndef __FONTFACETYPE_H
#define __FONTFACETYPE_H
namespace MS { namespace Internal { namespace Text { namespace TextInterface
{
/// <summary>
/// The file format of a complete font face.
/// Font formats that consist of multiple files, e.g. Type 1 .PFM and .PFB, have
/// a single enum entry.
/// </summary>
private enum class FontFaceType
{
/// <summary>
/// OpenType font face with CFF outlines.
/// </summary>
CFF,
/// <summary>
/// OpenType font face with TrueType outlines.
/// </summary>
TrueType,
/// <summary>
/// OpenType font face that is a part of a TrueType collection.
/// </summary>
TrueTypeCollection,
/// <summary>
/// A Type 1 font face.
/// </summary>
Type1,
/// <summary>
/// A vector .FON format font face.
/// </summary>
Vector,
/// <summary>
/// A bitmap .FON format font face.
/// </summary>
Bitmap,
/// <summary>
/// Font face type is not recognized by the DirectWrite font system.
/// </summary>
Unknown
};
}}}}//MS::Internal::Text::TextInterface
#endif //__FONTFACETYPE_H

Просмотреть файл

@ -0,0 +1,118 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
#include "FontFamily.h"
#include "DWriteTypeConverter.h"
namespace MS { namespace Internal { namespace Text { namespace TextInterface
{
/// <SecurityNote>
/// Critical - Receives a native pointer and stores it internally.
/// This whole object is wrapped around the passed in pointer
/// So this ctor assumes safety of the passed in pointer.
/// </SecurityNote>
//[SecurityCritical] – tagged in header file
FontFamily::FontFamily(IDWriteFontFamily* fontFamily) : FontList(fontFamily)
{
_regularFont = nullptr;
}
/// <SecurityNote>
/// Critical - Uses security critical FontFamilyObject pointer.
/// Safe - It does not expose the pointer it uses.
/// </SecurityNote>
[SecuritySafeCritical]
__declspec(noinline) LocalizedStrings^ FontFamily::FamilyNames::get()
{
IDWriteLocalizedStrings* dwriteLocalizedStrings;
HRESULT hr = ((IDWriteFontFamily*)FontListObject->Value)->GetFamilyNames(
&dwriteLocalizedStrings
);
System::GC::KeepAlive(FontListObject);
ConvertHresultToException(hr, "LocalizedStrings^ FontFamily::FamilyNames::get");
return gcnew LocalizedStrings(dwriteLocalizedStrings);
}
bool FontFamily::IsPhysical::get()
{
return true;
}
bool FontFamily::IsComposite::get()
{
return false;
}
System::String^ FontFamily::OrdinalName::get()
{
if (FamilyNames->StringsCount > 0)
{
return FamilyNames->GetString(0);
}
return System::String::Empty;
}
FontMetrics^ FontFamily::Metrics::get()
{
if (_regularFont == nullptr)
{
_regularFont = GetFirstMatchingFont(FontWeight::Normal, FontStretch::Normal, FontStyle::Normal);
}
return _regularFont->Metrics;
}
FontMetrics^ FontFamily::DisplayMetrics(float emSize, float pixelsPerDip)
{
Font^ regularFont = GetFirstMatchingFont(FontWeight::Normal, FontStretch::Normal, FontStyle::Normal);
return regularFont->DisplayMetrics(emSize, pixelsPerDip);
}
/// <SecurityNote>
/// Critical - Uses security critical FontFamilyObject pointer.
/// Safe - It does not expose the pointer it uses.
/// </SecurityNote>
[SecuritySafeCritical]
__declspec(noinline) Font^ FontFamily::GetFirstMatchingFont(
FontWeight weight,
FontStretch stretch,
FontStyle style
)
{
IDWriteFont* dwriteFont;
HRESULT hr = ((IDWriteFontFamily*)FontListObject->Value)->GetFirstMatchingFont(
DWriteTypeConverter::Convert(weight),
DWriteTypeConverter::Convert(stretch),
DWriteTypeConverter::Convert(style),
&dwriteFont
);
System::GC::KeepAlive(FontListObject);
ConvertHresultToException(hr, "Font^ FontFamily::GetFirstMatchingFont");
return gcnew Font(dwriteFont);
}
/// <SecurityNote>
/// Critical - Uses security critical FontFamilyObject pointer.
/// Safe - It does not expose the pointer it uses.
/// </SecurityNote>
[SecuritySafeCritical]
__declspec(noinline) FontList^ FontFamily::GetMatchingFonts(
FontWeight weight,
FontStretch stretch,
FontStyle style
)
{
IDWriteFontList* dwriteFontList;
HRESULT hr = ((IDWriteFontFamily*)FontListObject->Value)->GetMatchingFonts(
DWriteTypeConverter::Convert(weight),
DWriteTypeConverter::Convert(stretch),
DWriteTypeConverter::Convert(style),
&dwriteFontList
);
System::GC::KeepAlive(FontListObject);
ConvertHresultToException(hr, "FontList^ FontFamily::GetMatchingFonts");
return gcnew FontList(dwriteFontList);
}
}}}}//MS::Internal::Text::TextInterface

Просмотреть файл

@ -0,0 +1,119 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
#ifndef __FONTFAMILY_H
#define __FONTFAMILY_H
#include "Common.h"
#include "LocalizedStrings.h"
#include "Font.h"
#include "FontList.h"
#include "FontWeight.h"
#include "FontStretch.h"
#include "FontStyle.h"
namespace MS { namespace Internal { namespace Text { namespace TextInterface
{
/// <summary>
/// Represents a set of fonts that share the same design but are differentiated
/// by weight, stretch, and style.
/// </summary>
private ref class FontFamily sealed : public FontList
{
private:
/// <summary>
/// A reference to the regular font in this family. This is used by upper layers in WPF.
/// </summary>
Font^ _regularFont;
internal:
/// <summary>
/// Contructs a FontFamily object.
/// </summary>
/// <param name="fontFamily">The DWrite font family object that this class wraps.</param>
/// <SecurityNote>
/// Critical - Receives a native pointer and stores it internally.
/// This whole object is wrapped around the passed in pointer
/// So this ctor assumes safety of the passed in pointer.
/// </SecurityNote>
[SecurityCritical]
FontFamily(IDWriteFontFamily* fontFamily);
/// <summary>
/// Gets a localized strings object that contains the family names for the font family, indexed by locale name.
/// </summary>
property LocalizedStrings^ FamilyNames
{
LocalizedStrings^ get();
}
/// <summary>
/// Gets whether this FontFamily is a physical one.
/// </summary>
property bool IsPhysical
{
bool get();
}
/// <summary>
/// Gets whether this FontFamily is a composite one.
/// </summary>
property bool IsComposite
{
bool get();
}
/// <summary>
/// Returns a name that uniquely identifies this family.
/// The name culture doesn't matter, as the name is supposed to be used only
/// for FontFamily construction. This is used by WPF only.
/// </summary>
property System::String^ OrdinalName
{
System::String^ get();
}
/// <summary>
/// Gets the font metrics for the regular font in this family.
/// </summary>
property FontMetrics^ Metrics
{
FontMetrics^ get();
}
FontMetrics^ DisplayMetrics(float emSize, float pixelsPerDip);
/// <summary>
/// Gets the font that best matches the specified properties.
/// </summary>
/// <param name="weight">Requested font weight.</param>
/// <param name="stretch">Requested font stretch.</param>
/// <param name="style">Requested font style.</param>
/// <returns>The newly created font object.</returns>
Font^ GetFirstMatchingFont(
FontWeight weight,
FontStretch stretch,
FontStyle style
);
/// <summary>
/// Gets a list of fonts in the font family ranked in order of how well they match the specified properties.
/// </summary>
/// <param name="weight">Requested font weight.</param>
/// <param name="stretch">Requested font stretch.</param>
/// <param name="style">Requested font style.</param>
/// <returns>The newly created font object.</returns>
FontList^ GetMatchingFonts(
FontWeight weight,
FontStretch stretch,
FontStyle style
);
};
}}}}//MS::Internal::Text::TextInterface
#endif //__FONTFAMILY_H

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше